summaryrefslogtreecommitdiff
path: root/emulators
diff options
context:
space:
mode:
authormycroft <mycroft@pkgsrc.org>1998-07-09 12:34:56 +0000
committermycroft <mycroft@pkgsrc.org>1998-07-09 12:34:56 +0000
commit460839434cf84c396253f31fabf4f6595436aba4 (patch)
treee417431f36188be19e4be46c42b3daee6f89df80 /emulators
parent7310ab5c42b86eb534896935cfe03cc53becaed0 (diff)
downloadpkgsrc-460839434cf84c396253f31fabf4f6595436aba4.tar.gz
Initial port of the XMESS game console emulator.
Diffstat (limited to 'emulators')
-rw-r--r--emulators/xmess/Makefile35
-rw-r--r--emulators/xmess/files/md51
-rw-r--r--emulators/xmess/patches/patch-aa116
-rw-r--r--emulators/xmess/patches/patch-ab19
-rw-r--r--emulators/xmess/patches/patch-ae11
-rw-r--r--emulators/xmess/patches/patch-af29
-rw-r--r--emulators/xmess/patches/patch-ag11
-rw-r--r--emulators/xmess/pkg/COMMENT1
-rw-r--r--emulators/xmess/pkg/DESCR13
-rw-r--r--emulators/xmess/pkg/PLIST4
10 files changed, 240 insertions, 0 deletions
diff --git a/emulators/xmess/Makefile b/emulators/xmess/Makefile
new file mode 100644
index 00000000000..0065c51ff14
--- /dev/null
+++ b/emulators/xmess/Makefile
@@ -0,0 +1,35 @@
+# $NetBSD: Makefile,v 1.1 1998/07/09 12:34:56 mycroft Exp $
+#
+
+DISTNAME= unix01
+PKGNAME= xmess-0.1
+CATEGORIES= emulators games x11
+MASTER_SITES= http://internetter.com/titan/mess/
+EXTRACT_SUFX= .tgz
+
+MAINTAINER= mycroft@NetBSD.ORG
+
+RUN_DEPENDS= unzip:../../archivers/unzip
+DEPENDS+= xpm-3.4k:../../graphics/xpm
+
+USE_X11= yes
+USE_GMAKE= yes
+MAKE_ENV+= OPSYS=${OPSYS} ARCH=${ARCH} DESTDIR=${DESTDIR} \
+ INSTALL_MAN="${INSTALL_MAN}" \
+ INSTALL_PROGRAM="${INSTALL_PROGRAM}"
+
+WRKSRC= ${WRKDIR}/xmess-0.1
+
+MESSDIR= ${PREFIX}/share/mess
+
+post-patch:
+ ${CP} ${WRKSRC}/makefile.unix ${WRKSRC}/Makefile
+ ${SED} 's|@MESSDIR@|${MESSDIR}|' ${WRKSRC}/doc/xmessrc.dist >${WRKSRC}/doc/xmessrc
+ ${MV} ${WRKSRC}/src/unix/netbsd_i386.c ${WRKSRC}/src/unix/netbsd.c
+
+post-install:
+ ${MKDIR} -p ${MESSDIR}
+ ${CP} ${WRKSRC}/doc/xmessrc ${MESSDIR}/xmessrc
+ @${ECHO} Remember to set MESSDIR to ${MESSDIR}.
+
+.include "../../mk/bsd.pkg.mk"
diff --git a/emulators/xmess/files/md5 b/emulators/xmess/files/md5
new file mode 100644
index 00000000000..365d95b8a5c
--- /dev/null
+++ b/emulators/xmess/files/md5
@@ -0,0 +1 @@
+MD5 (unix01.tgz) = a97c1357d8caee829a3e2f6679f44535
diff --git a/emulators/xmess/patches/patch-aa b/emulators/xmess/patches/patch-aa
new file mode 100644
index 00000000000..e39a53285ea
--- /dev/null
+++ b/emulators/xmess/patches/patch-aa
@@ -0,0 +1,116 @@
+--- makefile.unix.orig Fri Jun 5 09:49:04 1998
++++ makefile.unix Thu Jul 9 08:14:27 1998
+@@ -13,7 +13,7 @@
+ # GNU MAKE is MANDATORY !!!
+ # so please give me the path...
+ # if GNU make is "native" use this
+-MAKE = make
++MAKE = gmake
+ # else ...
+ # MAKE=/usr/people/jantonio/bin/gmake
+
+@@ -72,7 +72,9 @@
+ ##############################################################################
+
+ # *** To disable joystick support comment next line
+-# JOY = -DUSE_JOYSTICK
++ifeq (${MACHINE},i386)
++JOY = -DUSE_JOYSTICK
++endif
+
+ # *** To disable mouse support comment next line
+ MOUSE = -DUSE_MOUSE
+@@ -91,7 +93,9 @@
+ # JSLIB = -lXi
+
+ # On iX86 based OS's, if supported, you can use standard joystick driver
+-# JS = -DI386_JOYSTICK
++ifeq (${MACHINE},i386)
++JS = -DI386_JOYSTICK
++endif
+
+ # Linux FM-TOWNS game PAD joystick emulation support
+ # Thanks to Osamu Kurati for provided patch
+@@ -125,8 +129,8 @@
+ # X11INC = -I/usr/include/X11
+ # X11LIB = -L/usr/lib/X11
+ # standard location for XFree86
+-X11INC = -I/usr/X11R6/include
+-X11LIB = -L/usr/X11R6/lib
++X11INC = -I${PREFIX}/include
++X11LIB = -L${PREFIX}/lib
+ # for Sun systems
+ # X11INC = -I/usr/openwin/include
+ # X11LIB = -L/usr/openwin/lib
+@@ -141,14 +145,14 @@
+ # *** Select destination directory for your compiled program
+ # and binary distribution ( if you want to... )
+ # ( only needed to install, not to compile... )
+-DESTDIR = /usr/games
++DESTDIR = ${PREFIX}/bin
+ DISTDIR = /home/ftp/pub/emulators/mess
+
+ # *** Where to store high scores ?
+-SDIR = \"/usr/games/lib/mess\"
++SDIR = \"${PREFIX}/share/mess\"
+
+ # *** Where resides global configuration file ?
+-MRC = \"/usr/games/lib/mess/xmessrc\"
++MRC = \"${PREFIX}/share/mess/xmessrc\"
+
+ # *** Use this definition as default X Display
+ DP = \":0.0\"
+@@ -170,8 +174,8 @@
+ # you might decide to use these feature. Otherwise, you should use a
+ # timer based audio code and ajust in src/unix/sound.h AUDIO_TIMER_FREQ item
+ #
+-S_TIM = -DDONTUSE_TIMER
+-# S_TIM = -DUSE_TIMER
++# S_TIM = -DDONTUSE_TIMER
++S_TIM = -DUSE_TIMER
+
+ # *** When using timer, you should provide the frequency to generate audio sample
+ # frames in your system. See readme.unix notes about these item
+@@ -193,7 +197,7 @@
+ ######## Alpha/Linux/X11
+ # ARCH = linux_alpha
+ ######## ix86/Linux/X11
+-ARCH = linux
++# ARCH = linux
+ ######## ix86/Linux/SVGALIB
+ # ARCH = svgalib
+ ######## ix86/Linux/GGI *New* *New* *New* Please test - no mouse or joy yet
+@@ -201,7 +205,8 @@
+ ######## ix86/FreeBSD/X11 and ix86/BSDi/X11
+ # ARCH = FREEBSD
+ ######## ix86/NetBSD/X11
+-# ARCH = netbsd_i386
++ARCH = netbsd
++MACHINE != uname -m
+ ######## Sparc/SunOS/X11 ( no sound )
+ # ARCH = sunos
+ ######## ix86/Solaris/X11
+@@ -277,17 +282,17 @@
+ -fomit-frame-pointer -Wall
+ INST.FREEBSD = doinstall
+
+-# netbsd_i386
++# netbsd
+ #####################
+-#If you want sound add to DEFS.netbsd_i386 "-DUSE_AUDIO" and
++#If you want sound add to DEFS.netbsd "-DUSE_AUDIO" and
+ #set STIM=-DUSE_TIMER above
+ #
+-DEFS.netbsd_i386 = -DX86_ASM -DLSB_FIRST -DUNIX -Dnetbsd_i386 -DNETBSD \
++DEFS.netbsd = -DX86_ASM -DLSB_FIRST -DUNIX -DNETBSD \
+ -DHAVE_GETTIMEOFDAY -DUSE_AUDIO -DSIGNED_SAMPLES
+-LIBS.netbsd_i386 = $(X11LIB) -lX11 -lXext -lm
+-CFLAGS.netbsd_i386 = $(X11INC) -m486 -fstrength-reduce -funroll-loops \
++LIBS.netbsd = $(X11LIB) -lX11 -lXext -lm
++CFLAGS.netbsd = $(X11INC) -O3 -fstrength-reduce -funroll-loops \
+ -fomit-frame-pointer -Wall
+-INST.netbsd_i386 = doinstall
++INST.netbsd = doinstall
+
+ # SunOS
+ #####################
diff --git a/emulators/xmess/patches/patch-ab b/emulators/xmess/patches/patch-ab
new file mode 100644
index 00000000000..ea0e687ee40
--- /dev/null
+++ b/emulators/xmess/patches/patch-ab
@@ -0,0 +1,19 @@
+--- src/unix/Makefile.orig Fri Jun 5 07:32:04 1998
++++ src/unix/Makefile Thu Jul 9 08:15:16 1998
+@@ -25,6 +25,7 @@
+
+ $(TRG): $(ALLOBJS)
+ ar -rcv $@ $(UOBJS)
++ ranlib $@
+
+ $(OBJDIR)/%.o: %.c xmame.h
+ $(CC) $(DEFS) -I../../src/ $(MS) $(JS) $(CFLAGS) -o $@ -c $<
+@@ -42,7 +43,7 @@
+ $(OBJDIR)/irix.o: irix.c xmame.h sound.h
+ $(OBJDIR)/hpux.o: hpux.c xmame.h sound.h
+ $(OBJDIR)/aix.o: aix.c xmame.h sound.h
+-$(OBJDIR)/netbsd_i386.o: netbsd_i386.c xmame.h sound.h
++$(OBJDIR)/netbsd.o: netbsd.c xmame.h sound.h
+ $(OBJDIR)/sndserver.o: sndserver.c xmame.h
+ $(OBJDIR)/svgalib.o: svgalib.c linux.c xmame.h sound.h
+ $(OBJDIR)/ultrix.c: ultrix.c xmame.h sound.h
diff --git a/emulators/xmess/patches/patch-ae b/emulators/xmess/patches/patch-ae
new file mode 100644
index 00000000000..09d492d8e3f
--- /dev/null
+++ b/emulators/xmess/patches/patch-ae
@@ -0,0 +1,11 @@
+--- doc/xmessrc.dist.orig Tue Jun 9 08:14:22 1998
++++ doc/xmessrc.dist Thu Jul 9 08:11:39 1998
+@@ -21,7 +21,7 @@
+ ############################ General options ##########################
+ #
+ # Mess needs a public-writable directory to store high scores
+-spooldir /var/games/mess
++spooldir @MESSDIR@
+
+ # Type here the name of the display where play xmame
+ # overriden by DISPLAY environment variable. Not usefull in config file but...
diff --git a/emulators/xmess/patches/patch-af b/emulators/xmess/patches/patch-af
new file mode 100644
index 00000000000..af53219f957
--- /dev/null
+++ b/emulators/xmess/patches/patch-af
@@ -0,0 +1,29 @@
+--- src/unix/devices.c.orig Wed Jun 17 05:48:00 1998
++++ src/unix/devices.c Sat Jul 4 07:42:07 1998
+@@ -60,7 +60,7 @@
+ #elif I386_JOYSTICK
+ void i386_poll_joystick (void);
+ /* specific joystick for PC clones */
+-#ifdef netbsd_i386
++#ifdef NETBSD
+ #include <machine/joystick.h>
+ extern struct joystick joy_data,joy_orig;
+ #else
+@@ -658,7 +658,7 @@
+ {
+ #if ( defined USE_JOYSTICK ) && ( defined I386_JOYSTICK )
+ int res;
+-#ifdef netbsd_i386
++#ifdef NETBSD
+ res = read(joy_fd,&joy_data,sizeof(struct joystick) );
+ if (res == sizeof(struct joystick )) {
+ #else
+@@ -666,7 +666,7 @@
+ if (res == sizeof(struct JS_DATA_TYPE )) {
+ #endif
+ /* get value of buttons */
+-#ifdef netbsd_i386
++#ifdef NETBSD
+ joy_b1 = joy_data.b1;
+ joy_b2 = joy_data.b2;
+ #else
diff --git a/emulators/xmess/patches/patch-ag b/emulators/xmess/patches/patch-ag
new file mode 100644
index 00000000000..3c7e16d1257
--- /dev/null
+++ b/emulators/xmess/patches/patch-ag
@@ -0,0 +1,11 @@
+--- src/unix/netbsd_i386.c.orig Fri Jun 5 07:00:43 1998
++++ src/unix/netbsd_i386.c Sat Jul 4 07:42:09 1998
+@@ -5,7 +5,7 @@
+ * Audio code is based on the solaris driver, by jantonio@dit.upm.es
+ */
+
+-#ifdef netbsd_i386
++#ifdef NETBSD
+
+ #include "xmame.h"
+ #include "sound.h"
diff --git a/emulators/xmess/pkg/COMMENT b/emulators/xmess/pkg/COMMENT
new file mode 100644
index 00000000000..f9579d155db
--- /dev/null
+++ b/emulators/xmess/pkg/COMMENT
@@ -0,0 +1 @@
+X11 emulator for game consoles
diff --git a/emulators/xmess/pkg/DESCR b/emulators/xmess/pkg/DESCR
new file mode 100644
index 00000000000..97a6fcabb18
--- /dev/null
+++ b/emulators/xmess/pkg/DESCR
@@ -0,0 +1,13 @@
+X-MESS is the X11 port of the MESS game console emulator.
+
+MESS is virtual machine emulator; it includes emulators for the CPUs,
+sound and video chips used in game consoles, as well as special purpose
+PALs and detailed information about the memory layout of each machine.
+
+MESS currently emulates the Nintendo Entertainment System (NES), Sega
+Genesis/Megadrive, TRS-80, Colour Genie and Colecovision. The next
+version is expected to emulate the Vectrex, Apple ][, Atari 800, Atari
+5200, Sega Master System/Game Gear and the Nintendo Gameboy.
+
+To play games in X-MESS you must have a copy of the original game,
+extracted from a cartridge, floppy or tape image.
diff --git a/emulators/xmess/pkg/PLIST b/emulators/xmess/pkg/PLIST
new file mode 100644
index 00000000000..c1d1d66ff8d
--- /dev/null
+++ b/emulators/xmess/pkg/PLIST
@@ -0,0 +1,4 @@
+@comment $NetBSD: PLIST,v 1.1 1998/07/09 12:34:57 mycroft Exp $
+bin/xmess
+share/mess/xmessrc
+@dirrm share/mess