summaryrefslogtreecommitdiff
path: root/emulators/darcnes
diff options
context:
space:
mode:
authorwiz <wiz@pkgsrc.org>2000-02-20 18:15:13 +0000
committerwiz <wiz@pkgsrc.org>2000-02-20 18:15:13 +0000
commit3de5bbda60231a53cfb8f3ec9ba3cdf444d78632 (patch)
tree637167734bd8a6337417dd91db5d9f0dafafcc6d /emulators/darcnes
parentc098a3a4a64befb71b7bf9ef6a060efd884433d7 (diff)
downloadpkgsrc-3de5bbda60231a53cfb8f3ec9ba3cdf444d78632.tar.gz
Updated darcnes to 2000-02-19.
Changes: o Unified cd_freebsd.c and cd_linux.c into cd_unix.c. o Added support for NetBSD CDROM (untested), and sound interfaces (thanks to Thomas Klausner for the NetBSD changes). o Changed the nes bank 4 and 6 I/O hooks. o Fixed FDS mapper to compile again. o Fixed some problems with the PCE timer. o Changed the PCE VDP interface not to use procpointers. o Added clipping sprites to the right side of the screen to the PCE VDP. o Removed the old (disabled) ROM type identification routine. o Fixed the battery file handling to not use a cheap hack to get the filename (this breaks all gg savegames until you rename the battery file).
Diffstat (limited to 'emulators/darcnes')
-rw-r--r--emulators/darcnes/Makefile6
-rw-r--r--emulators/darcnes/files/md54
-rw-r--r--emulators/darcnes/files/patch-sum9
-rw-r--r--emulators/darcnes/patches/patch-aa19
-rw-r--r--emulators/darcnes/patches/patch-ab110
-rw-r--r--emulators/darcnes/patches/patch-ac108
-rw-r--r--emulators/darcnes/patches/patch-af12
7 files changed, 33 insertions, 235 deletions
diff --git a/emulators/darcnes/Makefile b/emulators/darcnes/Makefile
index 722d84fb824..756a6630acb 100644
--- a/emulators/darcnes/Makefile
+++ b/emulators/darcnes/Makefile
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.4 2000/02/19 01:38:01 wiz Exp $
+# $NetBSD: Makefile,v 1.5 2000/02/20 18:15:13 wiz Exp $
-DISTNAME= dn9a0212
-PKGNAME= darcnes-20000212
+DISTNAME= dn9a0219
+PKGNAME= darcnes-20000219
WRKSRC= ${WRKDIR}/darcnes
CATEGORIES= emulators
MASTER_SITES= http://www.netway.com/~nyef/
diff --git a/emulators/darcnes/files/md5 b/emulators/darcnes/files/md5
index 147f632df5c..9de09f460a3 100644
--- a/emulators/darcnes/files/md5
+++ b/emulators/darcnes/files/md5
@@ -1,3 +1,3 @@
-$NetBSD: md5,v 1.1.1.1 2000/02/13 23:28:06 wiz Exp $
+$NetBSD: md5,v 1.2 2000/02/20 18:15:14 wiz Exp $
-MD5 (dn9a0212.tgz) = 63b03e250a8cf6bd8f21777c577a39a3
+MD5 (dn9a0219.tgz) = 559c66f484f53ea04681499560cff3da
diff --git a/emulators/darcnes/files/patch-sum b/emulators/darcnes/files/patch-sum
index 5a2b8cf5ab1..6d7ea986afb 100644
--- a/emulators/darcnes/files/patch-sum
+++ b/emulators/darcnes/files/patch-sum
@@ -1,10 +1,9 @@
-$NetBSD: patch-sum,v 1.2 2000/02/14 02:44:33 wiz Exp $
+$NetBSD: patch-sum,v 1.3 2000/02/20 18:15:14 wiz Exp $
-MD5 (patch-aa) = 1ce29e1665be04dc2120b0ca10ebbab8
-MD5 (patch-ab) = 49976d407355afa04a598e981b89ecd0
-MD5 (patch-ac) = 56a4b80b41c302bfa75b287bde33e379
+MD5 (patch-aa) = dde77dcc4474d70299ba9a8d32aa585c
+MD5 (patch-ab) = 91ba1ba5b132d34256e74eae72d12940
+MD5 (patch-ac) = 70fa597ae95b4dd9a2f861846454a5b6
MD5 (patch-ad) = 7653f1e8ecc021932392acc7fca509ec
MD5 (patch-ae) = 0c46cde110f4ae3616218068dd77cd8b
-MD5 (patch-af) = caa0f3455a5309131d1e70e390a4ba35
MD5 (patch-ag) = c437935b2db34ac9a4c950dca458f1db
MD5 (patch-ah) = 1aa5af7a684eccbdfb62f33eeb8fefec
diff --git a/emulators/darcnes/patches/patch-aa b/emulators/darcnes/patches/patch-aa
index a4875946250..c76262ba41e 100644
--- a/emulators/darcnes/patches/patch-aa
+++ b/emulators/darcnes/patches/patch-aa
@@ -1,8 +1,8 @@
-$NetBSD: patch-aa,v 1.2 2000/02/14 02:44:33 wiz Exp $
+$NetBSD: patch-aa,v 1.3 2000/02/20 18:15:15 wiz Exp $
---- ./Makefile.orig Sat Feb 12 20:04:24 2000
-+++ ./Makefile Mon Feb 14 03:27:44 2000
-@@ -11,23 +11,23 @@
+--- ./Makefile.orig Mon Feb 14 03:36:58 2000
++++ ./Makefile Sun Feb 20 15:28:50 2000
+@@ -11,10 +11,10 @@
#C_ONLY=-DC_ONLY
@@ -15,14 +15,7 @@ $NetBSD: patch-aa,v 1.2 2000/02/14 02:44:33 wiz Exp $
DEBUG=-g
- CDFLAGS=-DPCE_CD_SUPPORT
-
--CD_SRC=cd_freebsd.c
--CD_OBJ=cd_freebsd.o
-+CD_SRC=cd_netbsd.c
-+CD_OBJ=cd_netbsd.o
- #CD_SRC=cd_linux.c
- #CD_OBJ=cd_linux.o
+@@ -25,7 +25,7 @@
OPTFLAGS=-O2 -fomit-frame-pointer
@@ -31,7 +24,7 @@ $NetBSD: patch-aa,v 1.2 2000/02/14 02:44:33 wiz Exp $
BASE_SFLAGS=-Wall $(DEBUG) $(OPTFLAGS) $(CDFLAGS)
#
-@@ -53,9 +53,9 @@
+@@ -51,9 +51,9 @@
AS=gcc
LD=gcc
diff --git a/emulators/darcnes/patches/patch-ab b/emulators/darcnes/patches/patch-ab
index 6e1ede12b76..07d70a90923 100644
--- a/emulators/darcnes/patches/patch-ab
+++ b/emulators/darcnes/patches/patch-ab
@@ -1,98 +1,14 @@
-$NetBSD: patch-ab,v 1.2 2000/02/14 02:44:34 wiz Exp $
+$NetBSD: patch-ab,v 1.3 2000/02/20 18:15:15 wiz Exp $
---- ./cd_netbsd.c.orig Mon Feb 14 00:38:08 2000
-+++ ./cd_netbsd.c Mon Feb 14 00:38:08 2000
-@@ -0,0 +1,93 @@
-+/*
-+ * cd_netbsd.c
-+ *
-+ * NetBSD CDROM interface
-+ */
-+
-+#include <sys/types.h>
-+#include <sys/stat.h>
-+#include <fcntl.h>
-+#include <sys/ioctl.h>
-+#include <unistd.h>
-+#include <stdio.h>
-+
-+#include <sys/cdio.h>
-+
-+#include "types.h"
-+#include "cd.h"
-+
-+#define CDROM_DEVICE "/dev/rcd0d"
-+
-+int pce_cd_drive;
-+
-+struct ioc_read_toc_entry pce_cd_tocentry;
-+
-+void cd_set_sector_address(u32 sector)
-+{
-+ int result;
-+
-+ result = lseek(pce_cd_drive, (sector) * 2048, SEEK_SET);
-+ if (result < 0) {
-+ perror("pce_cd: seeking to CD sector");
-+ }
-+}
-+
-+void cd_read_next_sector(u8 *buf)
-+{
-+ int result;
-+
-+ result = read(pce_cd_drive, buf, 2048);
-+ if (result < 0) {
-+ perror("pce_cd: reading CD data");
-+ }
-+}
-+
-+void cd_get_tocheader(u8 *start_track, u8 *stop_track)
-+{
-+ struct ioc_toc_header toc_header;
-+ int result;
-+
-+ result = ioctl(pce_cd_drive, CDIOREADTOCHEADER, &toc_header);
-+ if (result < 0) {
-+ perror("pce_cd: reading tocheader");
-+ /* XXX: use dummy values? */
-+ *start_track = 1;
-+ *stop_track = 4;
-+ } else {
-+ *start_track = toc_header.starting_track;
-+ *stop_track = toc_header.ending_track;
-+ }
-+}
-+
-+void cd_get_tocentry(u8 track, u32 *lba, u8 *flags)
-+{
-+ int result;
-+ struct cd_toc_entry toc_entry;
-+
-+ pce_cd_tocentry.starting_track = track;
-+ pce_cd_tocentry.address_format = CD_LBA_FORMAT;
-+ pce_cd_tocentry.data_len = sizeof(toc_entry);
-+ pce_cd_tocentry.data = &toc_entry;
-+
-+ result = ioctl(pce_cd_drive, CDIOREADTOCENTRYS, &pce_cd_tocentry);
-+ if (result < 0) {
-+ perror("pce_cd: reading tocentry");
-+/* deb_printf("pce_cd: tocread failure.\n"); */
-+ } else {
-+ /* is this what you want? */
-+ *lba = toc_entry.addr.lba;
-+ *flags = toc_entry.control;
-+ /* ???: FIXME: may want cdte.adr << 4 in here as well */
-+ }
-+}
-+
-+void cd_init(void)
-+{
-+ pce_cd_drive = open(CDROM_DEVICE, O_RDONLY);
-+ if (pce_cd_drive < 0) {
-+ perror("pce_cd: opening CD drive");
-+ pce_cd_drive = 0;
-+ } else {
-+ /* Do something? */
-+ }
-+}
+--- ./cd_unix.c.orig Mon Feb 14 03:09:03 2000
++++ ./cd_unix.c Sun Feb 20 15:41:46 2000
+@@ -8,7 +8,7 @@
+
+ /* #define CD_LINUX */ /* use linux-specific code */
+-#define CD_FREEBSD /* use freebsd-specific code */
+-/* #define CD_NETBSD */ /* use netbsd-specific code */
++/* #define CD_FREEBSD */ /* use freebsd-specific code */
++#define CD_NETBSD /* use netbsd-specific code */
+
+ #ifdef CD_LINUX
+ #define CDROM_DEVICE "/dev/cdrom"
diff --git a/emulators/darcnes/patches/patch-ac b/emulators/darcnes/patches/patch-ac
index a9921d42248..65cc39ccf9c 100644
--- a/emulators/darcnes/patches/patch-ac
+++ b/emulators/darcnes/patches/patch-ac
@@ -1,112 +1,14 @@
-$NetBSD: patch-ac,v 1.2 2000/02/14 02:44:35 wiz Exp $
+$NetBSD: patch-ac,v 1.3 2000/02/20 18:15:15 wiz Exp $
---- ./snd_unix.c.orig Wed Jan 26 21:22:18 2000
-+++ ./snd_unix.c Mon Feb 14 00:38:09 2000
-@@ -8,13 +8,21 @@
+--- ./snd_unix.c.orig Mon Feb 14 03:04:13 2000
++++ ./snd_unix.c Sun Feb 20 15:41:22 2000
+@@ -8,7 +8,7 @@
/* #define SOUND_LINUX */ /* use linux sound header */
-#define SOUND_FREEBSD /* use freebsd sound header */
+-/* #define SOUND_NETBSD */ /* use netbsd sound system */
+/* #define SOUND_FREEBSD */ /* use freebsd sound header */
+#define SOUND_NETBSD /* use netbsd sound system */
#ifdef SOUND_LINUX
#define SOUND_HEADER <sys/soundcard.h>
-+#define SOUND_DEVICE "/dev/dsp"
- #endif
-
- #ifdef SOUND_FREEBSD
- #define SOUND_HEADER <machine/soundcard.h>
-+#define SOUND_DEVICE "/dev/dsp"
-+#endif
-+
-+#ifdef SOUND_NETBSD
-+#define SOUND_HEADER <sys/audioio.h>
-+#define SOUND_DEVICE "/dev/sound"
- #endif
-
- #include <stdio.h>
-@@ -66,16 +74,21 @@
-
- int snd_open(int samples_per_sync, int sample_rate)
- {
-- int tmp;
- int result;
-+#if defined(SOUND_LINUX) || defined(SOUND_FREEBSD)
-+ int tmp;
- int sound_rate;
- int sound_frag;
-+#endif
-+#ifdef SOUND_NETBSD
-+ audio_info_t info;
-+#endif
-
- waveptr = 0;
- wavflag = 0;
-
-- printf("opening /dev/dsp...");
-- sound_fd = open("/dev/dsp", O_WRONLY);
-+ printf("opening "SOUND_DEVICE"...");
-+ sound_fd = open(SOUND_DEVICE, O_WRONLY);
- if (sound_fd < 0) {
- perror("failed");
- sound_fd = 0;
-@@ -83,7 +96,8 @@
- } else {
- printf("done.\n");
- }
--
-+
-+#if defined(SOUND_LINUX) || defined(SOUND_FREEBSD)
- printf("setting unsigned 8-bit format...");
- tmp = AFMT_U8;
- result = ioctl(sound_fd, SNDCTL_DSP_SETFMT, &tmp);
-@@ -132,7 +146,41 @@
- } else {
- printf("done.\n");
- }
-+#endif
-+#ifdef SOUND_NETBSD
-+ AUDIO_INITINFO(&info);
-+ printf("setting unsigned 8-bit format...");
-+ info.play.encoding = AUDIO_ENCODING_ULINEAR;
-+ /* this doesn't work for me, so ignore results */
-+ result = ioctl(sound_fd, AUDIO_SETINFO, &info);
-+ if (result < 0)
-+ {
-+ perror("warning: unsigned linear mode failed, using signed");
-+ info.play.encoding = AUDIO_ENCODING_SLINEAR;
-+ }
-
-+ printf("setting sound rate to %dHz...", sample_rate);
-+ info.play.sample_rate = sample_rate;
-+ /* 8 bits per sample */
-+ info.play.precision = 8;
-+ printf("setting mono mode...");
-+ info.play.channels = 1;
-+ info.mode = AUMODE_PLAY_ALL;
-+ /* "frag size" */
-+ info.blocksize = 1 << 8;
-+ /* "number of frags", hiwater mark */
-+ info.hiwat = 8;
-+ result = ioctl(sound_fd, AUDIO_SETINFO, &info);
-+ if (result < 0) {
-+ perror("initializing sound failed");
-+ close(sound_fd);
-+ sound_fd = 0;
-+ return 0;
-+ } else {
-+ printf("done.\n");
-+ }
-+#endif
-+
- return 1;
- }
-
-@@ -141,6 +189,7 @@
- if (sound_fd) {
- close(sound_fd);
- }
-+ sound_fd = 0;
- }
-
- /*
diff --git a/emulators/darcnes/patches/patch-af b/emulators/darcnes/patches/patch-af
deleted file mode 100644
index ed3f830c995..00000000000
--- a/emulators/darcnes/patches/patch-af
+++ /dev/null
@@ -1,12 +0,0 @@
-$NetBSD: patch-af,v 1.1 2000/02/14 02:44:43 wiz Exp $
-
---- ./pce_vdp.c.orig Sun Feb 6 23:28:03 2000
-+++ ./pce_vdp.c Mon Feb 14 02:36:38 2000
-@@ -13,6 +13,7 @@
- #include "video.h"
- #include "blitters.h"
- #include "tiledraw.h"
-+#include "endian.h"
-
- #define PCE_VDP_RAMSIZE 0x10000
-