summaryrefslogtreecommitdiff
path: root/emulators/snes9x
diff options
context:
space:
mode:
authorwiz <wiz>2000-11-09 16:43:40 +0000
committerwiz <wiz>2000-11-09 16:43:40 +0000
commita8ccc1b0f3a56cfcaf8acf6a36feb6235cc6021f (patch)
tree3a5499401e316c9776287b239196fd47b798a933 /emulators/snes9x
parent22c4276b01c9a76a067cacb19f33f7e3417fcd4b (diff)
downloadpkgsrc-a8ccc1b0f3a56cfcaf8acf6a36feb6235cc6021f.tar.gz
Import snes9x, a SNES (Super Nintendo) emulator. Package provided by
Jared D. McNeill in pkg/11439, touched up by me. XXX: i386/ELF only for now, patch-ab and patch-ac improve compilation on a.out, but linking fails (underbar problems).
Diffstat (limited to 'emulators/snes9x')
-rw-r--r--emulators/snes9x/Makefile41
-rw-r--r--emulators/snes9x/files/md53
-rw-r--r--emulators/snes9x/files/patch-sum8
-rw-r--r--emulators/snes9x/patches/patch-aa60
-rw-r--r--emulators/snes9x/patches/patch-ab13
-rw-r--r--emulators/snes9x/patches/patch-ac9
-rw-r--r--emulators/snes9x/patches/patch-ad15
-rw-r--r--emulators/snes9x/patches/patch-ae13
-rw-r--r--emulators/snes9x/patches/patch-af68
-rw-r--r--emulators/snes9x/pkg/COMMENT1
-rw-r--r--emulators/snes9x/pkg/DESCR4
-rw-r--r--emulators/snes9x/pkg/PLIST12
12 files changed, 247 insertions, 0 deletions
diff --git a/emulators/snes9x/Makefile b/emulators/snes9x/Makefile
new file mode 100644
index 00000000000..3e70b1e8609
--- /dev/null
+++ b/emulators/snes9x/Makefile
@@ -0,0 +1,41 @@
+# $NetBSD: Makefile,v 1.1.1.1 2000/11/09 16:43:40 wiz Exp $
+
+DISTNAME= s9xs129
+PKGNAME= snes9x-1.29
+WRKSRC= ${WRKDIR}/release
+CATEGORIES= emulators
+MASTER_SITES= http://www.snes9x.com/zips/
+EXTRACT_SUFX= .zip
+
+MAINTAINER= jmcneill@invisible.yi.org
+HOMEPAGE= http://www.snes9x.com/
+
+BUILD_DEPENDS+= nasm:../../devel/nasm
+
+# for now, only builds on i386/ELF
+ONLY_FOR_PLATFORM= NetBSD-1.4[A-Z]*-i386 NetBSD-1.[5-9]*-i386
+
+USE_X11= yes
+USE_GMAKE= yes
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/snes9x ${PREFIX}/bin
+ ${INSTALL_PROGRAM} ${WRKSRC}/s9xserver ${PREFIX}/bin
+ ${INSTALL_PROGRAM} ${WRKSRC}/offsets ${PREFIX}/bin
+ ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/snes9x
+ ${INSTALL_MAN} ${WRKSRC}/CHANGES.TXT ${PREFIX}/share/doc/snes9x
+ ${INSTALL_MAN} ${WRKSRC}/COPYRIGHT.TXT ${PREFIX}/share/doc/snes9x
+ ${INSTALL_MAN} ${WRKSRC}/HARDWARE.TXT ${PREFIX}/share/doc/snes9x
+ ${INSTALL_MAN} ${WRKSRC}/HOW2PORT.TXT ${PREFIX}/share/doc/snes9x
+ ${INSTALL_MAN} ${WRKSRC}/PROBLEMS.TXT ${PREFIX}/share/doc/snes9x
+ ${INSTALL_MAN} ${WRKSRC}/README.TXT ${PREFIX}/share/doc/snes9x
+ ${INSTALL_MAN} ${WRKSRC}/TODO.TXT ${PREFIX}/share/doc/snes9x
+
+.include "../../mk/bsd.pkg.mk"
+
+.if ( ${OBJECT_FMT} == "a.out" )
+MAKE_ENV+= FILEFORMAT=aoutb
+MAKE_FLAGS+= _ASM_UNDERBARS=1
+.else
+MAKE_ENV+= FILEFORMAT=elf
+.endif
diff --git a/emulators/snes9x/files/md5 b/emulators/snes9x/files/md5
new file mode 100644
index 00000000000..8692cf7f96a
--- /dev/null
+++ b/emulators/snes9x/files/md5
@@ -0,0 +1,3 @@
+$NetBSD: md5,v 1.1.1.1 2000/11/09 16:43:40 wiz Exp $
+
+MD5 (s9xs129.zip) = 1af2990cd62925359ad9786a52dda748
diff --git a/emulators/snes9x/files/patch-sum b/emulators/snes9x/files/patch-sum
new file mode 100644
index 00000000000..2076225cc99
--- /dev/null
+++ b/emulators/snes9x/files/patch-sum
@@ -0,0 +1,8 @@
+$Id: patch-sum,v 1.1.1.1 2000/11/09 16:43:40 wiz Exp $
+
+MD5 (patch-aa) = 506547364b5709eca8699d5715e0e90c
+MD5 (patch-ab) = 626e8bc7e260ff83708e13ef54e61cdd
+MD5 (patch-ac) = ad48bfa7a5b65c581c67ababd09cca99
+MD5 (patch-ad) = 79cf18843562488e62fdbaf503dd50c4
+MD5 (patch-ae) = 2ce2c9ae1a0abb2c42a4a4139b6d1a8e
+MD5 (patch-af) = ca4cdb571de8e6eb5826c451666522d7
diff --git a/emulators/snes9x/patches/patch-aa b/emulators/snes9x/patches/patch-aa
new file mode 100644
index 00000000000..394bfc03f67
--- /dev/null
+++ b/emulators/snes9x/patches/patch-aa
@@ -0,0 +1,60 @@
+$NetBSD: patch-aa,v 1.1.1.1 2000/11/09 16:43:40 wiz Exp $
+
+--- Makefile.orig Mon Jan 24 16:15:50 2000
++++ Makefile
+@@ -4,7 +4,7 @@
+ NETPLAY=1
+ UNZIP=1
+ #GLIDE=1
+-THREAD_SOUND=1
++#THREAD_SOUND=1
+
+ ifdef ZSNESFX
+ FXOBJ=i386/fxemu2b.o i386/fxemu2.o i386/fxemu2c.o i386/fxtable.o i386/sfxproc.o i386/zsnes.o
+@@ -70,7 +70,7 @@
+ CC = gcc
+ NASM = nasm
+
+-INCLUDES=-I/usr/X11R6/include -I/usr/local/include
++INCLUDES=-I${X11BASE}/include
+
+ OPTIMISE=-O6 -mpentium -fomit-frame-pointer -fno-exceptions
+
+@@ -78,7 +78,6 @@
+ -Ii386 \
+ -I. \
+ -Iunzip \
+--DJOYSTICK_SUPPORT \
+ -DZLIB \
+ -DNO_INLINE_SET_GET \
+ -DVAR_CYCLES \
+@@ -108,7 +107,7 @@
+ # system using the egcs compiler get an undefined __register_frame_info
+ # symbol error when run on a Redhat box.
+
+-LDLIBS = -L/usr/X11R6/lib frame.o
++LDLIBS = -L${X11BASE}/lib -Wl,-R${X11BASE}/lib
+
+ ifdef GLIDE
+ ifdef NETPLAY
+@@ -118,9 +117,9 @@
+ endif
+ else
+ ifdef NETPLAY
+-all: offsets snes9x ssnes9x s9xserver
++all: offsets snes9x s9xserver
+ else
+-all: offsets snes9x ssnes9x
++all: offsets snes9x
+ endif
+ endif
+
+@@ -170,7 +169,7 @@
+ $(CCC) $(INCLUDES) -c -E $(CCFLAGS) $*.S -o $@
+
+ .asm.o:
+- $(NASM) -f elf -i . -i i386 -o $@ $*.asm
++ $(NASM) -f ${FILEFORMAT} -i . -i i386 -o $@ $*.asm
+
+ clean:
+ rm -f $(OBJECTS) offsets.o unix/svga.o unix/x11.o unix/ggi.o unix/xf86.o
diff --git a/emulators/snes9x/patches/patch-ab b/emulators/snes9x/patches/patch-ab
new file mode 100644
index 00000000000..818448e5f18
--- /dev/null
+++ b/emulators/snes9x/patches/patch-ab
@@ -0,0 +1,13 @@
+$NetBSD: patch-ab,v 1.1.1.1 2000/11/09 16:43:40 wiz Exp $
+
+--- i386/asmstruc.h.orig Mon Jan 24 16:13:54 2000
++++ i386/asmstruc.h
+@@ -36,7 +36,7 @@
+ * Nintendo Co., Limited and its subsidiary companies.
+ */
+
+-#if defined(__DJGCC) || defined(MICROSOFT_C) || defined(_WINDOWS)
++#if defined(__DJGCC) || defined(MICROSOFT_C) || defined(_WINDOWS) || defined(_ASM_UNDERBARS)
+ #define S9xTraceMessage _S9xTraceMessage
+ #define S9xGetPPU _S9xGetPPU
+ #define S9xSetPPU _S9xSetPPU
diff --git a/emulators/snes9x/patches/patch-ac b/emulators/snes9x/patches/patch-ac
new file mode 100644
index 00000000000..81c87894ffd
--- /dev/null
+++ b/emulators/snes9x/patches/patch-ac
@@ -0,0 +1,9 @@
+$NetBSD: patch-ac,v 1.1.1.1 2000/11/09 16:43:42 wiz Exp $
+
+--- i386/fxemu2.asm.orig Fri Sep 10 19:18:40 1999
++++ i386/fxemu2.asm
+@@ -2683,4 +2683,3 @@
+ SECTION .data
+ NEWSYM fxtrace, db 0; times 65536 db 0
+
+-SECTION .TEXT
diff --git a/emulators/snes9x/patches/patch-ad b/emulators/snes9x/patches/patch-ad
new file mode 100644
index 00000000000..3af4610b47b
--- /dev/null
+++ b/emulators/snes9x/patches/patch-ad
@@ -0,0 +1,15 @@
+$NetBSD: patch-ad,v 1.1.1.1 2000/11/09 16:43:42 wiz Exp $
+
+--- port.h.orig Mon Jan 24 16:13:54 2000
++++ port.h
+@@ -164,6 +164,10 @@
+ #define TITLE "Snes9X: Linux"
+ #endif
+
++#ifdef __NetBSD__
++#define TITLE "Snes9X: NetBSD"
++#endif
++
+ #ifndef TITLE
+ #define TITLE "Snes9x"
+ #endif
diff --git a/emulators/snes9x/patches/patch-ae b/emulators/snes9x/patches/patch-ae
new file mode 100644
index 00000000000..017b4b2ccb3
--- /dev/null
+++ b/emulators/snes9x/patches/patch-ae
@@ -0,0 +1,13 @@
+$NetBSD: patch-ae,v 1.1.1.1 2000/11/09 16:43:42 wiz Exp $
+
+--- soundux.h.orig Mon Jan 24 16:13:54 2000
++++ soundux.h
+@@ -77,7 +77,7 @@
+ int stereo;
+ bool8 sixteen_bit;
+ bool8 encoded;
+-#ifdef __sun
++#if defined(__sun) || defined(__NetBSD__)
+ int last_eof;
+ #endif
+ #ifdef __sgi
diff --git a/emulators/snes9x/patches/patch-af b/emulators/snes9x/patches/patch-af
new file mode 100644
index 00000000000..3133e12b901
--- /dev/null
+++ b/emulators/snes9x/patches/patch-af
@@ -0,0 +1,68 @@
+$NetBSD: patch-af,v 1.1.1.1 2000/11/09 16:43:42 wiz Exp $
+
+--- unix/unix.cpp.orig Mon Jan 24 16:13:54 2000
++++ unix/unix.cpp
+@@ -79,7 +79,14 @@
+ #endif
+ #endif
+
+-#if defined(__sun) && defined(__GNUC__)
++#ifdef __NetBSD__
++#include <sys/ioctl.h>
++#include <sys/audioio.h>
++#endif
++
++#if defined(__NetBSD__)
++typedef void (*SIG_PF)(int);
++#elif defined(__sun) && defined(__GNUC__)
+ typedef void (*SIG_PF)();
+ #endif
+
+@@ -160,7 +167,7 @@
+ char *rom_filename = NULL;
+ char *snapshot_filename = NULL;
+
+-#if defined(__linux) || defined(__sun)
++#if defined(__linux) || defined(__sun) || defined(__NetBSD__)
+ static void sigbrkhandler(int)
+ {
+ #ifdef DEBUGGER
+@@ -1354,7 +1361,7 @@
+ }
+ #endif
+
+-#ifdef __sun
++#if defined(__sun) || defined(__NetBSD__)
+ static int Rates[8] =
+ {
+ 0, 8000, 11025, 16000, 22050, 32000, 37800, 44100
+@@ -1423,9 +1430,9 @@
+ {
+ int I, J, K;
+
+- if ((so.sound_fd = open ("/dev/dsp", O_WRONLY)) < 0)
++ if ((so.sound_fd = open ("/dev/audio", O_WRONLY)) < 0)
+ {
+- perror ("/dev/dsp");
++ perror ("/dev/audio");
+ return (FALSE);
+ }
+
+@@ -1525,7 +1532,7 @@
+ }
+ #endif
+
+-#if defined (__linux) || defined (__sun)
++#if defined (__linux) || defined (__sun) || defined(__NetBSD__)
+ void S9xUnixProcessSound (void)
+ {
+ }
+@@ -1646,7 +1653,7 @@
+ #endif
+
+ #endif
+-#ifdef __sun
++#if defined(__sun) || defined(__NetBSD__)
+ audio_info_t audio;
+ if (!Settings.ThreadSound)
+ {
diff --git a/emulators/snes9x/pkg/COMMENT b/emulators/snes9x/pkg/COMMENT
new file mode 100644
index 00000000000..f93550df26a
--- /dev/null
+++ b/emulators/snes9x/pkg/COMMENT
@@ -0,0 +1 @@
+Super Nintendo Entertainment System (SNES) emulator
diff --git a/emulators/snes9x/pkg/DESCR b/emulators/snes9x/pkg/DESCR
new file mode 100644
index 00000000000..a877db8e59c
--- /dev/null
+++ b/emulators/snes9x/pkg/DESCR
@@ -0,0 +1,4 @@
+Snes9x is a portable, freeware Super Nintendo Entertainment System (SNES)
+emulator. It basically allows you to play most games designed for the SNES
+and Super Famicom Nintendo game systems on your PC or Workstation; which
+includes some real gems that were only ever released in Japan.
diff --git a/emulators/snes9x/pkg/PLIST b/emulators/snes9x/pkg/PLIST
new file mode 100644
index 00000000000..2ba915f74e0
--- /dev/null
+++ b/emulators/snes9x/pkg/PLIST
@@ -0,0 +1,12 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2000/11/09 16:43:42 wiz Exp $
+bin/snes9x
+bin/s9xserver
+bin/offsets
+share/doc/snes9x/CHANGES.TXT
+share/doc/snes9x/COPYRIGHT.TXT
+share/doc/snes9x/HARDWARE.TXT
+share/doc/snes9x/HOW2PORT.TXT
+share/doc/snes9x/PROBLEMS.TXT
+share/doc/snes9x/README.TXT
+share/doc/snes9x/TODO.TXT
+@dirrm share/doc/snes9x