summaryrefslogtreecommitdiff
path: root/emulators
diff options
context:
space:
mode:
Diffstat (limited to 'emulators')
-rw-r--r--emulators/xmame/Makefile20
-rw-r--r--emulators/xmame/files/md52
-rw-r--r--emulators/xmame/patches/patch-aa247
-rw-r--r--emulators/xmame/patches/patch-ab25
-rw-r--r--emulators/xmame/patches/patch-ac29
-rw-r--r--emulators/xmame/patches/patch-ad10
-rw-r--r--emulators/xmame/patches/patch-ae19
-rw-r--r--emulators/xmame/patches/patch-af29
-rw-r--r--emulators/xmame/patches/patch-ag11
-rw-r--r--emulators/xmame/pkg/PLIST6
10 files changed, 131 insertions, 267 deletions
diff --git a/emulators/xmame/Makefile b/emulators/xmame/Makefile
index dba8e3ebd1c..1cbcb4f59ae 100644
--- a/emulators/xmame/Makefile
+++ b/emulators/xmame/Makefile
@@ -1,32 +1,34 @@
-# $NetBSD: Makefile,v 1.9 1998/07/04 09:18:57 mycroft Exp $
+# $NetBSD: Makefile,v 1.10 1998/07/04 12:05:06 mycroft Exp $
#
-DISTNAME= xmame-0.30.1_src
-PKGNAME= xmame-0.30.1
+DISTNAME= xmame-0.33b6.1
CATEGORIES= emulators games x11
MASTER_SITES= ftp://drake.dit.upm.es/pub/emulators/mame/
EXTRACT_SUFX= .tgz
MAINTAINER= mycroft@NetBSD.ORG
+CONFLICTS= xmame-0.30.1
+
RUN_DEPENDS= unzip:../../archivers/unzip
DEPENDS+= xpm-3.4k:../../graphics/xpm
-WRKSRC= ${WRKDIR}/xmame-0.30.1
USE_X11= yes
USE_GMAKE= yes
MAKE_ENV+= OPSYS=${OPSYS} ARCH=${ARCH} DESTDIR=${DESTDIR} \
INSTALL_MAN="${INSTALL_MAN}" \
INSTALL_PROGRAM="${INSTALL_PROGRAM}"
+MAMEDIR= ${PREFIX}/share/mame
+
post-patch:
${CP} ${WRKSRC}/makefile.unix ${WRKSRC}/Makefile
- ${SED} 's|XXX|${PREFIX}/lib/mame|' ${WRKSRC}/doc/xmamerc.dist >${WRKSRC}/doc/xmamerc
- ${MV} ${WRKSRC}/src/unix/netbsd_i386.c ${WRKSRC}/src/unix/NetBSD.c
+ ${SED} 's|@MAMEDIR@|${MAMEDIR}|' ${WRKSRC}/doc/xmamerc.dist >${WRKSRC}/doc/xmamerc
+ ${MV} ${WRKSRC}/src/unix/netbsd_i386.c ${WRKSRC}/src/unix/netbsd.c
post-install:
- ${MKDIR} ${PREFIX}/lib/mame
- ${CP} ${WRKSRC}/doc/xmamerc ${PREFIX}/lib/mame/xmamerc
- @${ECHO} Remember to set MAMEDIR to ${PREFIX}/lib/mame.
+ ${MKDIR} -p ${MAMEDIR}
+ ${CP} ${WRKSRC}/doc/xmamerc ${MAMEDIR}/xmamerc
+ @${ECHO} Remember to set MAMEDIR to ${MAMEDIR}.
.include "../../mk/bsd.pkg.mk"
diff --git a/emulators/xmame/files/md5 b/emulators/xmame/files/md5
index 749d861b1cc..2dd4025610c 100644
--- a/emulators/xmame/files/md5
+++ b/emulators/xmame/files/md5
@@ -1 +1 @@
-MD5 (xmame-0.30.1_src.tgz) = 3cfea645f0edceffb3fa4ef7cffa39c1
+MD5 (xmame-0.33b6.1.tgz) = 6d0a801031f33ae5610005ed82e7e35f
diff --git a/emulators/xmame/patches/patch-aa b/emulators/xmame/patches/patch-aa
index c3cb6ca8ba4..919622b4f43 100644
--- a/emulators/xmame/patches/patch-aa
+++ b/emulators/xmame/patches/patch-aa
@@ -1,6 +1,6 @@
---- makefile.unix.orig Thu Jan 29 12:21:09 1998
-+++ makefile.unix Tue May 12 21:57:05 1998
-@@ -36,18 +36,18 @@
+--- makefile.unix.orig Wed Jun 17 06:07:13 1998
++++ makefile.unix Sat Jul 4 07:31:19 1998
+@@ -36,7 +36,7 @@
# GNU MAKE is MANDATORY !!!
# so please give me the path...
# if GNU make is "native" use this
@@ -9,99 +9,67 @@
# else ...
# MAKE=/usr/people/jantonio/bin/gmake
- # *** Choose your compiler
- # Where posible, please enforce ansi usage
--CC = gcc -ansi -pedantic -D_XOPEN_SOURCE -DM_PI=3.141592 -DPEDANTIC
-+#CC = gcc -ansi -pedantic -D_XOPEN_SOURCE -DM_PI=3.141592 -DPEDANTIC
- #
- # Some OS either libs are not ANSI-Compliant. If previous line fails, please
- # use next and report me item, to add to README.UNIX file
- #
--# CC = gcc
-+CC = gcc
- # for IRIX systems seems that DCC gets better code than GNU. so use it:
- # CC = DCC
- #
-@@ -73,10 +73,18 @@
- ### normal optimization flags
- # OPTFLAGS = -O2
- # OPTFLAGS = -O2 -m486 -Wall
-+ifeq ($(ARCH),i386)
-+ARCHOPS= -m486
-+endif
- ### to get full optimization under gcc/x Intel based OS's.. ( !!else comment!! )
--OPTFLAGS = -O3 -m486 -Wall -Wno-parentheses -funroll-loops \
-+ifeq ($(ARCH),i386)
-+OPTFLAGS = -O2 $(ARCHOPS) -Wall -Wno-parentheses -funroll-loops \
- -fstrength-reduce -fomit-frame-pointer -ffast-math -malign-functions=2 \
- -malign-jumps=2 -malign-loops=2
-+else
-+OPTFLAGS = -O2 $(ARCHOPS) -Wall -Wno-parentheses -funroll-loops \
-+ -fstrength-reduce -fomit-frame-pointer -ffast-math
-+endif
- ### for Linux/X11/PowerPC use following opts
- # OPTFLAGS = -O3 -Wall -Wno-parentheses -funroll-loops \
- # -fstrength-reduce -fomit-frame-pointer -ffast-math -fsigned-char
-@@ -92,7 +100,9 @@
+@@ -95,7 +95,9 @@
##############################################################################
# *** To disable joystick support comment next line
-+ifeq ($(ARCH),i386)
- JOY = -DUSE_JOYSTICK
+-# JOY = -DUSE_JOYSTICK
++ifeq (${MACHINE},i386)
++JOY = -DUSE_JOYSTICK
+endif
# *** To disable mouse support comment next line
MOUSE = -DUSE_MOUSE
-@@ -114,7 +124,9 @@
+@@ -114,7 +116,9 @@
# JSLIB = -lXi
# On iX86 based OS's, if supported, you can use standard joystick driver
-+ifeq ($(ARCH),i386)
- JS = -DI386_JOYSTICK
+-# 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
-@@ -156,8 +168,8 @@
- # *** where does your X11 source tree resides ?? use aproppiate switch
-
- # standard location for X11
--X11INC = -I/usr/include/X11
--X11LIB = -L/usr/lib/X11
-+#X11INC = -I/usr/include/X11
-+#X11LIB = -L/usr/lib/X11
+@@ -148,8 +152,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
-@@ -175,18 +187,18 @@
+-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
+@@ -164,18 +168,18 @@
# *** Select destination directory for your compiled program , manual page
# and binary distribution ( if you want to... )
# ( only needed to install, not to compile... )
-DESTDIR = /usr/games
-MANDIR = /usr/local/man/man6
--DISTDIR = /home/ftp/pub/emulators/mame
-+#DESTDIR = /usr/games
-+#MANDIR = /usr/local/man/man6
-+#DISTDIR = /home/ftp/pub/emulators/mame
++DESTDIR = ${PREFIX}/bin
++MANDIR = ${PREFIX}/man/man6
+ DISTDIR = /home/ftp/pub/emulators/mame
# *** Where the ROM source tree ?
-MDIR = \"/usr/games/lib/mame\"
-+MDIR = \"$(PREFIX)/lib/mame\"
++MDIR = \"${PREFIX}/share/mame\"
# *** Where to store high scores ?
-SDIR = \"/usr/games/lib/mame\"
-+SDIR = \"$(PREFIX)/lib/mame\"
++SDIR = \"${PREFIX}/share/mame\"
# *** Where resides global configuration file ?
-MRC = \"/usr/games/lib/mame/xmamerc\"
-+MRC = \"$(PREFIX)/lib/mame/xmamerc\"
++MRC = \"${PREFIX}/share/mame/xmamerc\"
# *** Use this definition as default X Display
DP = \":0.0\"
-@@ -209,8 +221,8 @@
+@@ -197,8 +201,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
#
- # DONTUSE_TIMER is mandatory for SVGALIB -else you'll get a compile error-
-S_TIM = -DDONTUSE_TIMER
-# S_TIM = -DUSE_TIMER
+# S_TIM = -DDONTUSE_TIMER
@@ -109,7 +77,7 @@
# *** When using timer, you should provide the frequency to generate audio sample
# frames in your system. See readme.unix notes about these item
-@@ -232,7 +244,7 @@
+@@ -220,7 +224,7 @@
######## Alpha/Linux/X11
# ARCH = linux_alpha
######## ix86/Linux/X11
@@ -118,142 +86,37 @@
######## ix86/Linux/SVGALIB
# ARCH = svgalib
######## ix86/Linux/GGI *New* *New* *New* Please test - no mouse or joy yet
-@@ -321,12 +333,12 @@
- #If you want sound add to DEFS.netbsd_i386 "-DUSE_AUDIO" and
+@@ -228,7 +232,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
+@@ -304,17 +309,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_i386 -DNETBSD \
- -DHAVE_GETTIMEOFDAY -DUSE_AUDIO
++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 -lXi -lm
-+CFLAGS.NetBSD = $(X11INC) -O2 $(ARCHOPS) -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
++INST.netbsd = doinstall
# SunOS
#####################
-@@ -414,7 +426,7 @@
- # Perhaps one day original mame sources will use POSIX strcasecmp and M_PI
- # instead MS-DOS counterparts... ( a long and sad history ...)
- CFLAGS = $(CAPABILITIES) $(SOUND_OPTS) $(DBGFLAGS) $(OPTFLAGS) \
-- $(XPM) $(IL) $(INCDIRS) $(CFLAGS.$(ARCH)) -Dstricmp=strcasecmp -DPI=M_PI
-+ $(XPM) $(IL) $(INCDIRS) $(CFLAGS.$(OPSYS)) -Dstricmp=strcasecmp -DPI=M_PI
-
- OBJOSDEP = obj/unix/osdepend.a
-
-@@ -585,13 +597,13 @@
- # not sure why, but was in original xmame makefile long time ago...
- VPATH = src src/Z80 src/M6502 src/I86 src/M6809 src/M68000 src/unix src/zipfiles
-
--all: objdirs osdepend zipfiles xmame.$(ARCH)
-+all: objdirs osdepend zipfiles xmame.$(OPSYS)
-
--OBJDIRS= obj.$(ARCH) obj.$(ARCH)/msdos obj.$(ARCH)/unix obj.$(ARCH)/zipfiles \
-- obj.$(ARCH)/I86 obj.$(ARCH)/I8039 obj.$(ARCH)/Z80 obj.$(ARCH)/M6502 \
-- obj.$(ARCH)/M6808 obj.$(ARCH)/M6809 obj.$(ARCH)/M68000 \
-- obj.$(ARCH)/drivers obj.$(ARCH)/machine \
-- obj.$(ARCH)/vidhrdw obj.$(ARCH)/sndhrdw
-+OBJDIRS= obj.$(OPSYS) obj.$(OPSYS)/msdos obj.$(OPSYS)/unix obj.$(OPSYS)/zipfiles \
-+ obj.$(OPSYS)/I86 obj.$(OPSYS)/I8039 obj.$(OPSYS)/Z80 obj.$(OPSYS)/M6502 \
-+ obj.$(OPSYS)/M6808 obj.$(OPSYS)/M6809 obj.$(OPSYS)/M68000 \
-+ obj.$(OPSYS)/drivers obj.$(OPSYS)/machine \
-+ obj.$(OPSYS)/vidhrdw obj.$(OPSYS)/sndhrdw
-
- $(OBJDIRS):
- -mkdir $@
-@@ -600,36 +612,36 @@
-
- objlnk:
- -rm -fR obj
-- ln -s obj.$(ARCH) obj
-+ ln -s obj.$(OPSYS) obj
-
--xmame.$(ARCH): $(OBJS)
-- $(LD) -g3 -o xmame.$(ARCH) $(OBJS) $(ZLIB) $(JSLIB) $(XPMLIB) $(LIBS.$(ARCH))
-+xmame.$(OPSYS): $(OBJS)
-+ $(LD) -g3 -o xmame.$(OPSYS) $(OBJS) $(ZLIB) $(JSLIB) $(XPMLIB) $(LIBS.$(OPSYS))
-
- xlistdev: xlistdev.c
-- $(CC) $(X11INC) xlistdev.c -o xlistdev $(JSLIB) $(LIBS.$(ARCH))
-+ $(CC) $(X11INC) xlistdev.c -o xlistdev $(JSLIB) $(LIBS.$(OPSYS))
-
- # obj/unix/osdepend.a:
-
- osdepend:
- ( \
- cd src/unix; \
-- $(MAKE) CC="$(CC)" ARCH="$(ARCH)" DEFS="$(CONF) $(DEFS.$(ARCH))" CFLAGS="$(CFLAGS)" \
-+ $(MAKE) CC="$(CC)" OPSYS="$(OPSYS)" DEFS="$(CONF) $(DEFS.$(OPSYS))" CFLAGS="$(CFLAGS)" \
- )
-
- zipfiles: FRC
- ( \
- cd src/zipfiles; \
-- $(MAKE) CC="$(CC)" ARCH="$(ARCH)" DEFS="$(CONF) $(DEFS.$(ARCH))" CFLAGS="$(CFLAGS)" \
-+ $(MAKE) CC="$(CC)" OPSYS="$(OPSYS)" ZLIB="$(ZLIB)" DEFS="$(CONF) $(DEFS.$(OPSYS))" CFLAGS="$(CFLAGS)" \
- )
-
- FRC:
-
-
--sndserver.$(ARCH): obj/unix/sndserver.o obj/unix/osdepend.a
-- $(LD) -g3 -o sndserver.$(ARCH) obj/unix/sndserver.o $(LIBS.$(ARCH))
-+sndserver.$(OPSYS): obj/unix/sndserver.o obj/unix/osdepend.a
-+ $(LD) -g3 -o sndserver.$(OPSYS) obj/unix/sndserver.o $(LIBS.$(OPSYS))
-
- obj/%.o: src/%.c
-- $(CC) $(DEFS.$(ARCH)) $(CFLAGS) -o $@ -c $<
-+ $(CC) $(DEFS.$(OPSYS)) $(CFLAGS) -o $@ -c $<
-
- sndtest: sndtest.c
- gcc -o sndtest sndtest.c
-@@ -647,33 +659,33 @@
- src/I86/instr.h
-
- install: install-bin install-man
-- @echo X-Mame $(VERSION) for $(ARCH) installation completed
-+ @echo X-Mame $(VERSION) for $(OPSYS) installation completed
-
--install-bin: $(INST.$(ARCH)) xmame.$(ARCH)
-+install-bin: $(INST.$(OPSYS)) xmame.$(OPSYS)
-
- install-man:
-- @echo installing manual pages under $(MANDIR) ...
-- $(INSTALL) doc/xmame.man $(MANDIR)/xmame.6
-+ @echo installing manual pages under $(PREFIX)/man/man6 ...
-+ $(INSTALL_MAN) doc/xmame.man $(PREFIX)/man/man6/xmame.6
-
- doinstall:
-- @echo installing binaries under $(DESTDIR)...
-- $(INSTALL) xmame.$(ARCH) $(DESTDIR)/xmame
-+ @echo installing binaries under $(PREFIX)/bin...
-+ $(INSTALL_PROGRAM) xmame.$(OPSYS) $(PREFIX)/bin/xmame
-
- # Every SVGALIB-based software must be run setuid. Beware security !!!
- doinstallsvgalib:
-- @echo installing binaries under $(DESTDIR)...
-- $(INSTALL) xmame.$(ARCH) $(DESTDIR)/mame
-- chmod 4755 $(DESTDIR)/mame
-+ @echo installing binaries under $(PREFIX)...
-+ $(INSTALL) xmame.$(OPSYS) $(PREFIX)/mame
-+ chmod 4755 $(PREFIX)/mame
-
- #clean now depends on objdirs, cause otherwise it just might rm the wrong ARCH
- clean: objdirs
-- rm -f $(OBJS) xmame.$(ARCH) xlistdev sndserver.*
-- ( cd src/unix; $(MAKE) ARCH="$(ARCH)" clean; )
-- ( cd src/zipfiles; $(MAKE) ARCH="$(ARCH)" clean; )
-+ rm -f $(OBJS) xmame.$(OPSYS) xlistdev sndserver.*
-+ ( cd src/unix; $(MAKE) OPSYS="$(OPSYS)" clean; )
-+ ( cd src/zipfiles; $(MAKE) OPSYS="$(OPSYS)" clean; )
- rm -f sndtest
-
- bindist:
-- tar zcvf $(DISTDIR)/xmame.$(ARCH)_bin.tgz xmame.$(ARCH) doc
-+ tar zcvf $(DISTDIR)/xmame.$(OPSYS)_bin.tgz xmame.$(OPSYS) doc
-
- srcdist: pristine
- ( cd ..; tar zcvf $(DISTDIR)/xmame-$(VERSION)_src.tgz xmame-$(VERSION) )
diff --git a/emulators/xmame/patches/patch-ab b/emulators/xmame/patches/patch-ab
index 3ef3f105630..4033dcb8d49 100644
--- a/emulators/xmame/patches/patch-ab
+++ b/emulators/xmame/patches/patch-ab
@@ -1,20 +1,19 @@
---- src/unix/Makefile.orig Thu Jan 1 18:31:14 1998
-+++ src/unix/Makefile Fri Feb 13 08:12:11 1998
-@@ -1,2 +1,2 @@
--OBJDIR = ../../obj.$(ARCH)/unix
-+OBJDIR = ../../obj.$(OPSYS)/unix
+--- src/unix/Makefile.orig Fri Jun 5 07:32:04 1998
++++ src/unix/Makefile Sat Jul 4 07:37:41 1998
+@@ -25,6 +25,7 @@
-@@ -8,3 +8,3 @@
- UOBJS = $(OBJDIR)/main.o $(OBJDIR)/sound.o $(OBJDIR)/xdep.o \
-- $(OBJDIR)/update_dsp.o $(OBJDIR)/$(ARCH).o $(OBJDIR)/lin2ulaw.o \
-+ $(OBJDIR)/update_dsp.o $(OBJDIR)/$(OPSYS).o $(OBJDIR)/lin2ulaw.o \
- $(OBJDIR)/keyboard.o $(OBJDIR)/devices.o
-@@ -24,2 +24,3 @@
+ $(TRG): $(ALLOBJS)
ar -rcv $@ $(UOBJS)
+ ranlib $@
-@@ -41,3 +42,3 @@
+ $(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)/$(OPSYS).o: $(OPSYS).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/xmame/patches/patch-ac b/emulators/xmame/patches/patch-ac
deleted file mode 100644
index 5b42d4a9e50..00000000000
--- a/emulators/xmame/patches/patch-ac
+++ /dev/null
@@ -1,29 +0,0 @@
---- src/unix/netbsd_i386.c.orig Thu Jan 1 20:32:36 1998
-+++ src/unix/netbsd_i386.c Wed Mar 11 15:38:04 1998
-@@ -66,7 +66,6 @@
- play_sound = FALSE;
- } else {
- /* empty buffers before change config */
-- ioctl(audio_fd, AUDIO_DRAIN, 0); /* drain everything out */
- ioctl(audio_fd, AUDIO_FLUSH, 0); /* flush everything */
-
- /* identify audio device. */
-@@ -82,15 +81,12 @@
- AUDIO_INITINFO(&a_info);
-
- a_info.play.sample_rate = (uint) audio_sample_freq = AUDIO_SAMPLE_FREQ;
-- a_info.play.encoding = (uint) AUDIO_ENCODING_LINEAR;
-+ a_info.play.encoding = (uint) AUDIO_ENCODING_ULINEAR;
- a_info.play.precision = (uint) AUDIO_SAMPLE_BITS;
- a_info.play.channels = (uint) 1;
-- a_info.play.port = (uint) 1;
-- a_info.play.pause = (uint) 0;
-- a_info.play.gain = (uint) 130;
- a_info.blocksize = AUDIO_SAMPLE_FREQ / AUDIO_TIMER_FREQ;
-- a_info.buffersize = AUDIO_BUFF_SIZE;
-- a_info.mode = AUMODE_PLAY;
-+ a_info.play.buffer_size = AUDIO_BUFF_SIZE;
-+ a_info.mode = AUMODE_PLAY | AUMODE_PLAY_ALL;
-
- if (ioctl(audio_fd, AUDIO_SETINFO, &a_info) < 0) {
- perror("cannot set audio device parameters");
diff --git a/emulators/xmame/patches/patch-ad b/emulators/xmame/patches/patch-ad
deleted file mode 100644
index 2f1d646d4b9..00000000000
--- a/emulators/xmame/patches/patch-ad
+++ /dev/null
@@ -1,10 +0,0 @@
---- src/zipfiles/Makefile.orig Thu Jan 1 18:37:06 1998
-+++ src/zipfiles/Makefile Fri Feb 13 08:10:45 1998
-@@ -1,2 +1,2 @@
--OBJDIR = ../../obj.$(ARCH)/zipfiles
-+OBJDIR = ../../obj.$(OPSYS)/zipfiles
-
-@@ -32,2 +32,3 @@
- ar -rcv $@ $(ZOBJS)
-+ ranlib $@
-
diff --git a/emulators/xmame/patches/patch-ae b/emulators/xmame/patches/patch-ae
index 36bf4697b77..2b35b8aa3f6 100644
--- a/emulators/xmame/patches/patch-ae
+++ b/emulators/xmame/patches/patch-ae
@@ -1,16 +1,15 @@
---- doc/xmamerc.dist.orig Sat Feb 14 05:42:01 1998
-+++ doc/xmamerc.dist Sat Feb 14 05:43:14 1998
-@@ -25,6 +25,6 @@
+--- doc/xmamerc.dist.orig Sun Jun 7 07:50:24 1998
++++ doc/xmamerc.dist Sat Jul 4 07:17:18 1998
+@@ -23,10 +23,10 @@
+
+ # Where does your Mame rom files reside?
# This option can be overriden by MAMEDIR environment variable
-mamedir /usr/games/lib/mame
-+mamedir XXX
++mamedir @MAMEDIR@
# Also Mame needs a public-writable directory to store high scores
-spooldir /var/games/mame
-+spooldir XXX
-
-@@ -77,3 +77,3 @@
- # Do you want use trackball emulation via mouse?
--use_trakball 0
-+#use_trakball 0
++spooldir @MAMEDIR@
+ # What is your loved game? ( remember that mame defaults to "pacman" )
+ defaultgame galturbo
diff --git a/emulators/xmame/patches/patch-af b/emulators/xmame/patches/patch-af
new file mode 100644
index 00000000000..af53219f957
--- /dev/null
+++ b/emulators/xmame/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/xmame/patches/patch-ag b/emulators/xmame/patches/patch-ag
new file mode 100644
index 00000000000..3c7e16d1257
--- /dev/null
+++ b/emulators/xmame/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/xmame/pkg/PLIST b/emulators/xmame/pkg/PLIST
index 72c4a454d55..de3e9e838e5 100644
--- a/emulators/xmame/pkg/PLIST
+++ b/emulators/xmame/pkg/PLIST
@@ -1,5 +1,5 @@
-@comment $NetBSD: PLIST,v 1.1 1998/02/14 22:06:18 tron Exp $
+@comment $NetBSD: PLIST,v 1.2 1998/07/04 12:05:07 mycroft Exp $
bin/xmame
-lib/mame/xmamerc
-@dirrm lib/mame
man/man6/xmame.6
+share/mame/xmamerc
+@dirrm share/mame