diff options
-rw-r--r-- | emulators/snes9x/Makefile | 3 | ||||
-rw-r--r-- | emulators/snes9x/distinfo | 8 | ||||
-rw-r--r-- | emulators/snes9x/patches/patch-aa | 6 | ||||
-rw-r--r-- | emulators/snes9x/patches/patch-ag | 54 | ||||
-rw-r--r-- | emulators/snes9x/patches/patch-aj | 4 |
5 files changed, 42 insertions, 33 deletions
diff --git a/emulators/snes9x/Makefile b/emulators/snes9x/Makefile index 9dfd65a3966..2e0fff90312 100644 --- a/emulators/snes9x/Makefile +++ b/emulators/snes9x/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.29 2005/06/16 06:57:51 jlam Exp $ +# $NetBSD: Makefile,v 1.30 2005/11/17 14:21:02 joerg Exp $ DISTNAME= s9xs139 PKGNAME= snes9x-1.39 @@ -67,6 +67,7 @@ MAKE_ENV+= USBHID_H=1 .endif .endif +.include "../../mk/ossaudio.buildlink3.mk" .include "../../mk/pthread.buildlink3.mk" .include "../../mk/x11.buildlink3.mk" .include "../../mk/bsd.pkg.mk" diff --git a/emulators/snes9x/distinfo b/emulators/snes9x/distinfo index e6910c30929..ceb0d6b1761 100644 --- a/emulators/snes9x/distinfo +++ b/emulators/snes9x/distinfo @@ -1,18 +1,18 @@ -$NetBSD: distinfo,v 1.10 2005/02/23 18:49:20 agc Exp $ +$NetBSD: distinfo,v 1.11 2005/11/17 14:21:02 joerg Exp $ SHA1 (s9xs139.zip) = 15acf6d8a31dc51b26a42abf747cec1b72c2aa29 RMD160 (s9xs139.zip) = b7ede5bda5adb4ee92428264d689624212becc5d Size (s9xs139.zip) = 666463 bytes -SHA1 (patch-aa) = 42b0cf5c4a1387ad1c572c1516771b2cd2e979f4 +SHA1 (patch-aa) = 29b335e4e6f2057ae22e3d9e0ed2e1483e440ef6 SHA1 (patch-ab) = b99893934074d8693a9609d49e49953ade2b2062 SHA1 (patch-ac) = e54f4fff397dd4ca3be28711fd23c4fbef57ed54 SHA1 (patch-ad) = 72cc9904c74e0668cce450fcada24453aec344e4 SHA1 (patch-ae) = cb2ed8dc3ad409ffb88cb9851b04c6c42c3b2b0e SHA1 (patch-af) = 302967c91a1e0b384c4990687fb11bf236202783 -SHA1 (patch-ag) = 22959b95af726e773a7386cc43e489fc933e8846 +SHA1 (patch-ag) = 79a6339bf1e1b7b8f1d7977df1a8096ea96abea7 SHA1 (patch-ah) = 60bd35e51faca36fbd8d8d6354487554af17fe7a SHA1 (patch-ai) = 2f522a560577aff89af9efa7a6b129faa99670fd -SHA1 (patch-aj) = 71f228195be1381f52b1fe875506abde54fd8396 +SHA1 (patch-aj) = 131a2a64a14ebeabb8e988b1882acbb533e893d6 SHA1 (patch-ak) = 4154979877ac98976a6eaf364030b840e8715e30 SHA1 (patch-al) = 7c703d57d7b0058d9ef7e598c7a03e18a9a234f8 SHA1 (patch-am) = 0630f836f8f7d44ee5476a73de4f7934897814f2 diff --git a/emulators/snes9x/patches/patch-aa b/emulators/snes9x/patches/patch-aa index 73cb35218e0..f0671a7a6f0 100644 --- a/emulators/snes9x/patches/patch-aa +++ b/emulators/snes9x/patches/patch-aa @@ -1,4 +1,4 @@ -$NetBSD: patch-aa,v 1.10 2003/09/21 18:22:15 kristerw Exp $ +$NetBSD: patch-aa,v 1.11 2005/11/17 14:21:02 joerg Exp $ --- Makefile.orig Tue Sep 18 08:03:58 2001 +++ Makefile Sun Sep 21 19:48:50 2003 @@ -1,14 +1,14 @@ @@ -67,12 +67,12 @@ $NetBSD: patch-aa,v 1.10 2003/09/21 18:22:15 kristerw Exp $ UNZIPDEFINES=-DUNZIP_SUPPORT endif -+EXTRALIBS += -lossaudio ++EXTRALIBS += ${LIBOSSAUDIO} ifdef THREAD_SOUND -CPUDEFINES += -DUSE_THREADS -EXTRALIBS += -lpthread +CPUDEFINES += -DUSE_THREADS -I${BUILDLINK_DIR}/include -+EXTRALIBS += -Wl,-R${LOCALBASE}/lib -L${BUILDLINK_DIR}/lib -lpthread ++EXTRALIBS += -Wl,-R${LOCALBASE}/lib -L${BUILDLINK_DIR}/lib ${PTHREAD_LDFLAGS} ${PTHREAD_LIBS} endif ifdef GLIDE diff --git a/emulators/snes9x/patches/patch-ag b/emulators/snes9x/patches/patch-ag index 82960c213c9..ed81126d123 100644 --- a/emulators/snes9x/patches/patch-ag +++ b/emulators/snes9x/patches/patch-ag @@ -1,12 +1,13 @@ -$NetBSD: patch-ag,v 1.5 2003/09/21 18:22:16 kristerw Exp $ +$NetBSD: patch-ag,v 1.6 2005/11/17 14:21:02 joerg Exp $ + --- unix/unix.cpp.orig 2001-09-18 06:03:40.000000000 +0000 -+++ unix/unix.cpp 2003-09-21 17:59:18.000000000 +0000 ++++ unix/unix.cpp @@ -51,7 +51,7 @@ #include <ctype.h> #include <dirent.h> -#if defined(__linux) || defined(__sun) -+#if defined(__linux) || defined(__sun) || defined(__NetBSD__) ++#if defined(__linux) || defined(__sun) || defined(__NetBSD__) || defined(__DragonFly__) #undef USE_THREADS #define USE_THREADS #include <unistd.h> @@ -22,39 +23,46 @@ $NetBSD: patch-ag,v 1.5 2003/09/21 18:22:16 kristerw Exp $ pthread_t thread; pthread_mutex_t mutex; -@@ -72,6 +76,9 @@ +@@ -72,6 +76,11 @@ pthread_mutex_t mutex; #include <sys/soundcard.h> #include <sys/mman.h> #endif +#ifdef __NetBSD__ +#include <soundcard.h> ++#elif defined(__DragonFly__) ++#include <sys/soundcard.h> +#endif #ifdef __sun #ifdef __SVR4 -@@ -84,6 +91,9 @@ +@@ -84,6 +93,9 @@ pthread_mutex_t mutex; #if defined(__sun) && defined(__GNUC__) typedef void (*SIG_PF)(); #endif -+#if defined(__NetBSD__) ++#if defined(__NetBSD__) || defined(__DragonFly__) +typedef void (*SIG_PF)(int); +#endif #include "snes9x.h" #include "memmap.h" -@@ -111,6 +121,51 @@ +@@ -111,6 +123,56 @@ uint32 joypads [5] = {0}; int NumControllers = 5; #ifdef JOYSTICK_SUPPORT -+#ifdef __NetBSD__ ++#if defined( __NetBSD__) || defined(__DragonFly__) +#ifdef HAVE_USBHID_H +#include <usbhid.h> +#else +#include <usb.h> +#endif +#define class Class ++#if defined(__DragonFly__) ++#include <bus/usb/usb.h> ++#include <bus/usb/usbhid.h> ++#else +#include <dev/usb/usb.h> +#include <dev/usb/usbhid.h> ++#endif + +struct priv_joydata_struct +{ @@ -94,20 +102,20 @@ $NetBSD: patch-ag,v 1.5 2003/09/21 18:22:16 kristerw Exp $ #ifdef __linux #include <linux/joystick.h> int js_fd [4] = {-1, -1, -1, -1}; -@@ -168,7 +223,7 @@ +@@ -168,7 +230,7 @@ void *S9xProcessSound (void *); char *rom_filename = NULL; char *snapshot_filename = NULL; -#if defined(__linux) || defined(__sun) -+#if defined(__linux) || defined(__sun) || defined(__NetBSD__) ++#if defined(__linux) || defined(__sun) || defined(__NetBSD__) || defined(__DragonFly__) static void sigbrkhandler(int) { #ifdef DEBUGGER -@@ -612,6 +667,106 @@ +@@ -612,6 +674,106 @@ void S9xInitInputDevices () #ifdef JOYSTICK_SUPPORT void InitJoysticks () { -+#ifdef __NetBSD__ ++#if defined(__NetBSD__) || defined(__DragonFly__) + int i, size, is_joystick, report_id = 0; + struct hid_data *d; + struct hid_item h; @@ -210,11 +218,11 @@ $NetBSD: patch-ag,v 1.5 2003/09/21 18:22:16 kristerw Exp $ #ifdef JSIOCGVERSION int version; unsigned char axes, buttons; -@@ -664,6 +819,77 @@ +@@ -664,6 +826,77 @@ void InitJoysticks () void ReadJoysticks () { -+#ifdef __NetBSD__ ++#if defined(__NetBSD__) || defined(__DragonFly__) + int i, usage, page, d; + struct hid_item *h; + @@ -288,16 +296,16 @@ $NetBSD: patch-ag,v 1.5 2003/09/21 18:22:16 kristerw Exp $ #ifdef JSIOCGVERSION struct js_event js_ev; int i; -@@ -1422,7 +1648,7 @@ +@@ -1422,7 +1655,7 @@ bool8 S9xOpenSoundDevice (int mode, bool } #endif -#if defined(__linux) -+#if defined(__linux) || defined(__NetBSD__) ++#if defined(__linux) || defined(__NetBSD__) || defined(__DragonFly__) static int Rates[8] = { 0, 8192, 11025, 16500, 22050, 29300, 36600, 44000 -@@ -1437,11 +1663,19 @@ +@@ -1437,11 +1670,19 @@ bool8 S9xOpenSoundDevice (int mode, bool { int J, K; @@ -317,7 +325,7 @@ $NetBSD: patch-ag,v 1.5 2003/09/21 18:22:16 kristerw Exp $ #ifdef MMAP_SOUND if (ioctl (so.sound_fd, SNDCTL_DSP_GETCAPS, &J) < 0) -@@ -1485,14 +1719,14 @@ +@@ -1485,14 +1726,14 @@ bool8 S9xOpenSoundDevice (int mode, bool so.sixteen_bit = TRUE; so.stereo = stereo; @@ -334,7 +342,7 @@ $NetBSD: patch-ag,v 1.5 2003/09/21 18:22:16 kristerw Exp $ { perror ("ioctl SNDCTL_DSP_SPEED"); return (FALSE); -@@ -1517,7 +1751,7 @@ +@@ -1517,7 +1758,7 @@ bool8 S9xOpenSoundDevice (int mode, bool perror ("ioctl SNDCTL_DSP_SETFRAGMENT"); return (FALSE); } @@ -343,21 +351,21 @@ $NetBSD: patch-ag,v 1.5 2003/09/21 18:22:16 kristerw Exp $ #ifdef MMAP_SOUND J = PCM_ENABLE_OUTPUT; -@@ -1541,7 +1775,7 @@ +@@ -1541,7 +1782,7 @@ bool8 S9xOpenSoundDevice (int mode, bool } #endif -#if defined (__linux) || defined (__sun) -+#if defined (__linux) || defined (__sun) || defined(__NetBSD__) ++#if defined (__linux) || defined (__sun) || defined(__NetBSD__) || defined(__DragonFly__) void S9xUnixProcessSound (void) { } -@@ -1640,7 +1874,7 @@ +@@ -1640,7 +1881,7 @@ void S9xGenerateSound () void *S9xProcessSound (void *) { -#ifdef __linux -+#if defined(__linux) || defined(__NetBSD__) ++#if defined(__linux) || defined(__NetBSD__) || defined(__DragonFly__) audio_buf_info info; if (!Settings.ThreadSound && diff --git a/emulators/snes9x/patches/patch-aj b/emulators/snes9x/patches/patch-aj index 58935358c51..f89dfd79882 100644 --- a/emulators/snes9x/patches/patch-aj +++ b/emulators/snes9x/patches/patch-aj @@ -1,11 +1,11 @@ -$NetBSD: patch-aj,v 1.1 2002/07/14 07:44:44 kristerw Exp $ +$NetBSD: patch-aj,v 1.2 2005/11/17 14:21:02 joerg Exp $ --- snes9x.cpp.orig Sat Jul 13 22:00:14 2002 +++ snes9x.cpp Sat Jul 13 22:04:07 2002 @@ -141,6 +141,9 @@ -joydevX /dev/jsY Use joystick device /dev/jsY for emulation of gamepad X\n"); S9xMessage (S9X_INFO, S9X_USAGE, "\ -joymapX 0 1 2 3 4 5 6 7 Joystick buttons which should be assigned to gamepad X - A B X Y TL TR Start and Select\n"); -+#elif defined(__NetBSD__) ++#elif defined(__NetBSD__) || defined(__DragonFly__) + S9xMessage (S9X_INFO, S9X_USAGE, "\ +-joymapX 0 1 2 3 4 5 6 7 Joystick buttons which should be assigned to gamepad X - A B X Y TL TR Start and Select\n"); #else |