Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 8 Feb 1998 18:47:17 -0800 (PST)
From:      dburr@POBoxes.com
To:        FreeBSD-gnats-submit@FreeBSD.ORG
Subject:   ports/5687: UPDATED PORT: emulators/xmame, Arcade game machine emulator
Message-ID:  <199802090247.SAA06684@colossus.dyn.ml.org>

next in thread | raw e-mail | index | archive | help

>Number:         5687
>Category:       ports
>Synopsis:       UPDATED PORT: emulators/xmame, Arcade game machine emulator
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports
>State:          open
>Quarter:
>Keywords:
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Feb  8 18:50:00 PST 1998
>Last-Modified:
>Originator:     Donald Burr
>Organization:
Starfleet Command
>Release:        FreeBSD 2.2.5-RELEASE i386
>Environment:

Irrelevant.

>Description:

[A couple months ago, I promised an update of my xmame port to version
0.29.  Unfortunately, I got really busy at the time, plus suffered various
computer failures, etc.  By the time I was able to work on the port, version
0.30 was close to coming out, so I thought I'd wait for it.  Anyway, I have
now completed my port of 0.30.  This port is much improved over my previous
port... it properly respects all of the FreeBSD porting conventions, for one,
and I portlint'ed it and got rid of all the errors and warnings.  This one
should be very nice.]

#define NITPICKING_MODE
[NOTE TO PORTS TEAM: My previous xmame port was imported into the category
"games".  I do not believe this is completely accurate.  It is an arcade
machine EMULATOR, so it sould go into the "emulators" category.  I cite,
as examples, the emulators/iNES port (it *emulates* the Nintendo *game*
console), the emulators/stella port (again, it *emulates* the Atari 2600
*game console*), etc.]
#undef NITPICKING_MODE

X-Mame 0.30.1 is an emulator.  It emulates many classic coin-operated arcade
game machines, right on your FreeBSD PC.

This emulator supports over 200 arcade games, and the nunmber grows every
day!  A partial list of the (more popular and well-known) games currently
supported by this emulator include:

PacMan, Ms. PacMan, Jr. PacMan, Super PacMan, Dig Dug, Star Trek, Galaga,
Space Invaders, Tempest, Frogger, Mr. Do!, Battle Zone, Missile Command,
Asteroids, Burger Time, Centipede, Millipede, Gorf, Donkey Kong, Donkey
Kong III, Donkey Kong Jr., Mario Bros., Defender, Stargate, Galaxians,
Gyruss, Kangaroo, Moon Patrol, Phoenix, Q*Bert, Rally X, Robotron,
Star Wars, Zaxxon, ... you get the idea.

To run these games, however, you will need images of the ROM chips that
are used on these games.  If you actually have one of these games (or the
motherboard to one of them), and access to a ROM burner, it is a fairly
trivial process to make ROM image files for use with MAME.  If you DON'T
have access to a ROM burner, or you don't own one of these video games
(and you are aware of the possible legal ramifications of doing this),
you can obtain ROM images for MAME on the Net.

[ This port is maintained by Donald Burr <dburr@POBoxes.com>. ]

>How-To-Repeat:

	

>Fix:
	
#!/bin/sh
# This is a shell archive (produced by GNU sharutils 4.1.4).
# To extract the files from this archive, save it to some FILE, remove
# everything before the `!/bin/sh' line above, then type `sh FILE'.
#
# Made on 1998-02-08 18:40 PST by <dburr@control.colossus.dyn.ml.org>.
# Source directory was `/usr/ports/emulators'.
#
# Existing files will *not* be overwritten unless `-c' is specified.
#
# This shar contains:
# length mode       name
# ------ ---------- ------------------------------------------
#   1060 -rw-r--r-- xmame/Makefile
#   4827 -rw-r--r-- xmame/patches/patch-aa
#    687 -rw-r--r-- xmame/patches/patch-ab
#   5570 -rw-r--r-- xmame/patches/patch-ac
#  35839 -rw-r--r-- xmame/patches/patch-ae
#    461 -rw-r--r-- xmame/patches/patch-af
#   1254 -rw-r--r-- xmame/patches/patch-ag
#    445 -rw-r--r-- xmame/patches/patch-ah
#    477 -rw-r--r-- xmame/patches/patch-ai
#    367 -rw-r--r-- xmame/patches/patch-aj
#    468 -rw-r--r-- xmame/patches/patch-ak
#    805 -rw-r--r-- xmame/patches/patch-al
#   6897 -rw-r--r-- xmame/patches/patch-ad
#    460 -rw-r--r-- xmame/files/dos2unx
#     62 -rw-r--r-- xmame/files/md5
#    262 -rw-r--r-- xmame/pkg/PLIST
#    103 -rw-r--r-- xmame/pkg/MESSAGE
#   1248 -rw-r--r-- xmame/pkg/DESCR
#     57 -rw-r--r-- xmame/pkg/COMMENT
#
touch -am 1231235999 $$.touch >/dev/null 2>&1
if test ! -f 1231235999 && test -f $$.touch; then
  shar_touch=touch
else
  shar_touch=:
  echo
  echo 'WARNING: not restoring timestamps.  Consider getting and'
  echo "installing GNU \`touch', distributed in GNU File Utilities..."
  echo
fi
rm -f 1231235999 $$.touch
#
# ============= xmame/Makefile ==============
if test ! -d 'xmame'; then
  echo 'x - creating directory xmame'
  mkdir 'xmame'
fi
if test -f 'xmame/Makefile' && test X"$1" != X"-c"; then
  echo 'x - skipping xmame/Makefile (file already exists)'
else
  echo 'x - extracting xmame/Makefile (text)'
  sed 's/^X//' << 'SHAR_EOF' > 'xmame/Makefile' &&
# New ports collection makefile for:    xmame
# Version required:     0.30.1
# Date created:         8 Feb 1998
# Whom:                 Donald Burr <dburr@POBoxes.com>
#
# $Id$
#
X
DISTNAME=	xmame-0.30.1_src
PKGNAME=        xmame-0.30.1
CATEGORIES=	emulators
MASTER_SITES=	ftp://drake.dit.upm.es/pub/emulators/mame/
EXTRACT_SUFX=	.tgz
X
MAINTAINER=	dburr@POBoxes.com
X
LIB_DEPENDS=	Xpm\\.4\\.:${PORTSDIR}/graphics/xpm
X
WRKSRC=		${WRKDIR}/${PKGNAME}
X
USE_GMAKE=	YES
MAKEFILE=	makefile.unix
X
MAN6=		xmame.6
X
post-install:
X.ifdef NOPORTDOCS
X	@echo "==> Extra documentation WILL NOT be installed."
X.else
X	@echo "==> Installing extra documentation..."
X	${MKDIR} ${PREFIX}/lib/mame
X	for DOC in CHEAT.DOC Changes MailList.notes README.unix mamelist.txt readme.txt whatsnew.txt; do ${INSTALL} -c -o bin -g bin -m 444 ${WRKSRC}/doc/$${DOC} ${PREFIX}/lib/mame/$${DOC}; done
X.endif
X	(cd ${PREFIX}/lib/mame; sh ${FILESDIR}/dos2unx CHEAT.DOC Changes MailList.notes README.unix cheat.dat mamelist.txt readme.txt whatsnew.txt)
X	@${CAT} ${PKGDIR}/MESSAGE
X
X.include <bsd.port.mk>
SHAR_EOF
  $shar_touch -am 0208184098 'xmame/Makefile' &&
  chmod 0644 'xmame/Makefile' ||
  echo 'restore of xmame/Makefile failed'
  shar_count="`wc -c < 'xmame/Makefile'`"
  test 1060 -eq "$shar_count" ||
    echo "xmame/Makefile: original size 1060, current size $shar_count"
fi
# ============= xmame/patches/patch-aa ==============
if test ! -d 'xmame/patches'; then
  echo 'x - creating directory xmame/patches'
  mkdir 'xmame/patches'
fi
if test -f 'xmame/patches/patch-aa' && test X"$1" != X"-c"; then
  echo 'x - skipping xmame/patches/patch-aa (file already exists)'
else
  echo 'x - extracting xmame/patches/patch-aa (text)'
  sed 's/^X//' << 'SHAR_EOF' > 'xmame/patches/patch-aa' &&
diff -ruN ../../OLD/xmame-0.30.1/./README.port ./README.port
--- ../../OLD/xmame-0.30.1/./README.port	Wed Dec 31 16:00:00 1969
+++ ./README.port	Fri Jan 30 19:54:06 1998
@@ -0,0 +1,94 @@
+NOTES on the xmame port to FreeBSD:
+
+Congratulations, you have successfully installed the xmame port for
+FreeBSD.  But, before you begin playing games, please read these notes.
+
+Before you can play any games, you will need to get and install the ROM
+file(s) for the game(s) you wish to play.  Please see the xmame(6) man
+page for information on how and where to do this.
+
+Also check out /usr/local/lib/mame/readme.txt and
+/usr/local/lib/mame/README.unix for more useful info.
+Enjoy!
+
+TO THOSE WHO USED A PREVIOUS VERSION OF THE XMAME PORT:
+I've moved the file locations around to conform to FreeBSD's
+directory structure.  Here are the changes:
+
+xmame executable is now in /usr/local/bin/xmame instead of /usr/local/games
+MAME library files (games) are now in /usr/local/lib/mame, instead of
+/usr/local/games/lib/mame.
+
+In particular, you should move all of your game ROMs from
+/usr/local/games/lib/mame into /usr/local/lib/mame.
+
+The new version of MAME also supports automatic "unzip-on-the-fly" of
+ROM images and sample files, so you no longer have to keep all of your
+ROMs and samples unzipped into separate directories.  Please see "NOTE #2"
+below for more information.
+
+NOTE: If you are a user of X-Mame 0.28.1 or earlier, please note
+that the MAME directory structure has changed.  A shell script,
+/usr/local/lib/mame/mov, has been installed, that will
+convert your old-style directory hierarchy into the new one.
+Be sure to run this script (as root) before playing any games
+using the new MAME.
+
+NOTE #2: X-Mame 0.29.2 now supports storing ROM and sample files as
+ZIP files.  When you want to play a particular game, the ROM files and
+samples are un-zipped on the fly.  (This is great for low-disk-space
+situations.)  Store all of your ROM files in ZIP files in the directory
+/usr/local/lib/mame/roms, and samples in /usr/local/lib/mame/samples.
+A script, /usr/local/lib/mame/conv2zip, has been installed, that will
+automatically convert all of your game ROMs to ZIP files.  (Unfortunately,
+you will have to convert your samples files yourself.)  You will need
+to install one of the ZIP programs packages (see /usr/ports/archivers).
+Then run this script as root.  (This script must be run AFTER the "mov"
+script [see above].)
+
+NOTE #3: xmame is a huge program, and as such, it runs REALLY slowly.
+Game performance is pretty good on most relatively modern systems (e.g.
+Pentium 120 or above).  But if you own a lower-powered system, you can
+get acceptable performance by doing the following:
+
+* always use the ``-frameskip'' switch (``-frameskip 1'' should be
+  enough, but you may need to go up to higher values for some particularly
+  slow games)
+* The "-xsync" option speeds up display refreshes as well.
+* If you use sound, using a lower sample rate (-samplefreq) will help speed
+  things up as well.
+* make the xmame binary setuid root (chmod u+s /usr/local/bin/xmame).
+  I have patched the xmame source to call a "nice(-20)" when running;
+  this increases the xmame process's scheduling priority, which makes
+  it more responsive and run faster.  This call requires root privileges
+  to run; if the binary is setuid root, it will work, BUT IF THE BINARY
+  IS NOT SETUID ROOT, THIS CALL WILL DO ABSOLUTELY NOTHING.
+
+Some people may be squeamish about the second step.  It is true that
+setuid root binaries are a dangerous thing.  But, FWIW, I don't see any
+way xmame can violate security.  Besides, immediately after the nice(-20)
+call, I use the setuid() function to set the process's EUID to the user's,
+which effectively gets rid of root privileges for the rest of the program.
+Of course, you have the source code, and can (and should) review it to
+look for potential security gotcha's.
+
+If you are truly squeamish, you can omit the second step; you will get
+somewhat better performance than if you did nothing at all, but it still
+won't be perfect.
+
+(Of course, the best solution would be to upgrade to that dream Pentium II
+system... :) )
+
+NOTE #4: I believe I have fixed the bug (or at least worked around i)
+that causes xmame to crash if you hit <TAB> when using the -sound switch.
+Please let me know if this still happens to you.
+
+xmame does not yet handle color depths higher than 8-bits perfectly.
+If you want the best (and, incidentally, fastest) screen output, you are
+recommended to run X in 8-bit mode.
+
+NOTE #5: (last one, honestly!)  If you have any problems or questions
+about the xmame port for FreeBSD, MAME in general, or arcade emulation,
+please feel free to send me E-mail.  <dburr@POBoxes.com>
+
+Enjoy the port!
SHAR_EOF
  $shar_touch -am 0202134898 'xmame/patches/patch-aa' &&
  chmod 0644 'xmame/patches/patch-aa' ||
  echo 'restore of xmame/patches/patch-aa failed'
  shar_count="`wc -c < 'xmame/patches/patch-aa'`"
  test 4827 -eq "$shar_count" ||
    echo "xmame/patches/patch-aa: original size 4827, current size $shar_count"
fi
# ============= xmame/patches/patch-ab ==============
if test -f 'xmame/patches/patch-ab' && test X"$1" != X"-c"; then
  echo 'x - skipping xmame/patches/patch-ab (file already exists)'
else
  echo 'x - extracting xmame/patches/patch-ab (text)'
  sed 's/^X//' << 'SHAR_EOF' > 'xmame/patches/patch-ab' &&
diff -ruN ../../OLD/xmame-0.30.1/./conv2zip ./conv2zip
--- ../../OLD/xmame-0.30.1/./conv2zip	Wed Dec 31 16:00:00 1969
+++ ./conv2zip	Fri Jan 30 19:54:06 1998
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+if [ ! -x /usr/local/bin/zip ]
+then
+	echo "ZIP program not installed.  Check /usr/ports/archivers."
+	exit 1
+fi
+
+cd /usr/local/lib/mame
+find . -type d -print | sed 's/^\.\///g' | grep -v ^\\. | grep -v cfg | \
+grep -v hi | grep -v roms | grep -v samples > /tmp/dirs.$$
+
+for D in `cat /tmp/dirs.$$`
+do
+	cd ${D}
+	echo "Converting: ${D}"
+	zip -9 ../roms/${D}.zip *
+	echo ""
+	cd ..
+	rm -rf ${D}
+done
+
+echo "All ROM directories have been converted to zipfiles."
+
+rm -f /tmp/dirs.$$
SHAR_EOF
  $shar_touch -am 0202134898 'xmame/patches/patch-ab' &&
  chmod 0644 'xmame/patches/patch-ab' ||
  echo 'restore of xmame/patches/patch-ab failed'
  shar_count="`wc -c < 'xmame/patches/patch-ab'`"
  test 687 -eq "$shar_count" ||
    echo "xmame/patches/patch-ab: original size 687, current size $shar_count"
fi
# ============= xmame/patches/patch-ac ==============
if test -f 'xmame/patches/patch-ac' && test X"$1" != X"-c"; then
  echo 'x - skipping xmame/patches/patch-ac (file already exists)'
else
  echo 'x - extracting xmame/patches/patch-ac (text)'
  sed 's/^X//' << 'SHAR_EOF' > 'xmame/patches/patch-ac' &&
diff -ruN ../../OLD/xmame-0.30.1/./doc/xmame.man ./doc/xmame.man
--- ../../OLD/xmame-0.30.1/./doc/xmame.man	Thu Jan  1 17:01:33 1998
+++ ./doc/xmame.man	Fri Jan 30 19:54:06 1998
@@ -1,4 +1,4 @@
-.\" Copyright (c) 1997 Donald Burr <dburr@POBoxes.com>
+.\" Copyright (c) 1998 Donald Burr <dburr@POBoxes.com>
X .\" All rights reserved.
X .\"
X .\" Redistribution and use in source and binary forms, with or without
@@ -26,7 +26,7 @@
X .\"
X .\" Note: The date here should be updated whenever a non-trivial
X .\" change is made to the manual page.
-.Dd November 25 1997
+.Dd January 30 1998
X .Dt XMAME 6
X .\" Note: Only specify the operating system when the command
X .\" is FreeBSD specific, otherwise use the .Os macro with no
@@ -51,8 +51,6 @@
X with ``no'', which acts to disable the option in question.
X Here are the most common ones:
X .Bl -tag -width Fl
-.It Fl help
-Displays a help screen, summarizing the command line options.
X .It Fl joy
X Allows you to use the joystick driver to control the game.  (Specific to
X Linux.)
@@ -112,6 +110,11 @@
X .Ar nframes
X frames between video refreshes.  Useful for making slowish games run
X faster on slow video hardware or CPU's.
+.It Fl display Ar display
+Displays the
+.Nm
+window on X display
+.Ar display
X .It Fl mitshm
X Activates MIT shared memory X server extension support.  The default
X XFree86 servers support this, so you should probably use it.  If enabled,
@@ -177,6 +180,8 @@
X .It Fl showconfig
X Displays the running parameters in a style suitable for insertion into an
X xmamerc file.
+.It Fl help
+Displays a help screen, summarizing the command line options.
X .It Fl list
X Lists all of the games supported by this version of
X .Nm
@@ -269,16 +274,19 @@
X (see the LEGAL NOTICE section for more details.)
X 
X The game ROM images come in ZIP files.  Download the ZIP files for the games
-you want, and move them to the /usr/local/games/lib/mame directory.  For
-each game, unzip it into its own directory (i.e. if you want to install
-PacMan, get ``pacman.zip,'' make a directory called ``pacman'' (under the
-/usr/local/games/lib/mame hierarchy), and unzip the pacman.zip file INSIDE
-that directory.
-
-Some games require the game ROM files to be in an unusually-named directory.
-For example, Dig Dug uses the directory name ``digdugnm.''  Read the file
-/usr/local/games/lib/mame/readme.txt to find out the names of the directories
-for particular games.
+you want, and move them to the /usr/local/lib/mame/roms directory.
+
+Some games require audio samples to enable sound.  These can usually be
+downloaded at the same place where you obtain ROMs.  These can be installed,
+in zipped form, in the directory /usr/local/lib/mame/samples.
+
+(In previous versions of
+.Nm
+you had to un-zip each game and the samples that it uses
+into its own directory.  This is no longer
+necessary, as
+.Nm
+now automatically un-zips games and samples ``on the fly'' as needed.)
X .Sh PLAYING GAMES
X Okay, so you've got your games installed.  Now what?
X 
@@ -334,7 +342,7 @@
X has MANY controls for shields, warp speed, whatnot; while the Mario Bros.
X game uses a second set of keys to control the Luigi player (2nd player).
X If you want to find out what keys a particular game uses, look at the
-/usr/local/games/lib/mame/readme.txt file.
+/usr/local/lib/mame/readme.txt file.
X 
X HAVE FUN!!!
X .Sh ENVIRONMENT
@@ -349,23 +357,32 @@
X X server to display in.
X .El
X .Sh FILES
-.Bl -tag -width /usr/local/games/lib/mame/readme.txt -compact
-.It Pa /usr/local/games/lib/mame
-Directory containing arcade game ROM files
-(the ROMs for each game live in a subdirectory with the same name as
-the game, e.g. ``/usr/local/games/lib/mame/pacman''.
-.It Pa /usr/local/games/lib/mame/readme.txt
+.Bl -tag -width /usr/local/lib/mame/readme.txt -compact
+.It Pa /usr/local/lib/mame
+Main
+.Nm
+directory.  Contains the default configuration file (xmamerc); the
+directories for game configurations, high scores, ROMs, and samples;
+various README and documentation files; and the cheat data file,
+among others.
+.It Pa /usr/local/lib/mame/cfg
+Directory containing the configuration data for each game.
+.It Pa /usr/local/lib/mame/hi
+Directory containing high score tables for each game.
+.It Pa /usr/local/lib/mame/roms
+Directory containing (zipped) ROM files.
+.It Pa /usr/local/lib/mame/samples
+Directory containing (zipped) audio sample files.
+.It Pa /usr/local/lib/mame/readme.txt
X File containing list of supported games, keyboard commands for each
X game, and bugs and other incompatibilities with certain games.
-.It Pa /usr/local/games/lib/mame/xmamerc
+.It Pa /usr/local/lib/mame/xmamerc
X System-wide configuration file for
X .Nm
X .It Pa ${HOME}/xmame/xmamerc
X Per-user configuration file for
X .Nm
X (overrides system configuration if exists).
-.It Pa ${HOME}/xmame/<game>.cnf
-Per-user configuration file of a particular game.
X .El
X .Sh EXAMPLES
X The following is an example of a typical usage
@@ -373,23 +390,15 @@
X .Nm
X command:
X .Pp
-.Dl %
-.Nm
-pacman
+.Dl % xmame pacman
X plays Pacman with all default options
-.Dl %
-.Nm
-dkong -frameskip 1
+.Dl % xmame dkong -frameskip 1
X plays Donkey Kong using frameskip of 1.  Useful for slower computers,
X if the game is running really slowly.
-.Dl %
-.Nm
-superpac -scale 2
+.Dl % xmame superpac -scale 2
X plays Super PacMan with a double-sized screen (note that this slows the
X game down).
-.Dl %
-.Nm
-superpac -heightscale 2 -widthscale 2
+.Dl % xmame superpac -heightscale 2 -widthscale 2
X Same as above, but using separate -heightscale and -widthscale arguments.
X .Sh SEE ALSO
X .Xr X 1
SHAR_EOF
  $shar_touch -am 0202134898 'xmame/patches/patch-ac' &&
  chmod 0644 'xmame/patches/patch-ac' ||
  echo 'restore of xmame/patches/patch-ac failed'
  shar_count="`wc -c < 'xmame/patches/patch-ac'`"
  test 5570 -eq "$shar_count" ||
    echo "xmame/patches/patch-ac: original size 5570, current size $shar_count"
fi
# ============= xmame/patches/patch-ae ==============
if test -f 'xmame/patches/patch-ae' && test X"$1" != X"-c"; then
  echo 'x - skipping xmame/patches/patch-ae (file already exists)'
else
  echo 'x - extracting xmame/patches/patch-ae (text)'
  sed 's/^X//' << 'SHAR_EOF' > 'xmame/patches/patch-ae' &&
diff -ruN ../../OLD/xmame-0.30.1/./mov ./mov
--- ../../OLD/xmame-0.30.1/./mov	Wed Dec 31 16:00:00 1969
+++ ./mov	Fri Jan 30 19:54:06 1998
@@ -0,0 +1,915 @@
+#!/bin/sh
+if [ ! -d /usr/local/lib/mame ]
+then
+	echo you don\'t have a mame directory!  doh!
+	exit 1
+else
+
+cd /usr/local/lib/mame
+
+if [ ! -d cfg ]
+then
+	mkdir cfg
+fi
+
+if [ ! -d hi ]
+then
+	mkdir hi
+fi
+
+if [ ! -d roms ]
+then
+	mkdir roms
+fi
+
+if [ ! -d samples ]
+then
+	mkdir samples
+fi
+
+mv -f 1942/1942.cfg cfg 2>/dev/null
+mv -f 3stooges/3stooges.cfg cfg 2>/dev/null
+mv -f amidar/amidar.cfg cfg 2>/dev/null
+mv -f amidarjp/amidarjp.cfg cfg 2>/dev/null
+mv -f amigo/amigo.cfg cfg 2>/dev/null
+mv -f anteater/anteater.cfg cfg 2>/dev/null
+mv -f arabian/arabian.cfg cfg 2>/dev/null
+mv -f astrmu1/astdelux.cfg cfg 2>/dev/null
+mv -f astrmux/astdelux.cfg cfg 2>/dev/null
+mv -f astrmux/astdelu2.cfg cfg 2>/dev/null
+mv -f asteroi2/asteroi2.cfg cfg 2>/dev/null
+mv -f asteroid/asteroid.cfg cfg 2>/dev/null
+mv -f atlantis/atlantis.cfg cfg 2>/dev/null
+mv -f bagman/bagman.cfg cfg 2>/dev/null
+mv -f bankp/bankp.cfg cfg 2>/dev/null
+mv -f blaster/blaster.cfg cfg 2>/dev/null
+mv -f blueprnt/blueprnt.cfg cfg 2>/dev/null
+mv -f boblbobl/boblbobl.cfg cfg 2>/dev/null
+mv -f bombjack/bombjack.cfg cfg 2>/dev/null
+mv -f bosco/bosco.cfg cfg 2>/dev/null
+mv -f btime/btime.cfg cfg 2>/dev/null
+mv -f btimea/btimea.cfg cfg 2>/dev/null
+mv -f bubbles/bubbles.cfg cfg 2>/dev/null
+mv -f bublbobl/bublbobl.cfg cfg 2>/dev/null
+mv -f bwidow/bwidow.cfg cfg 2>/dev/null
+mv -f bzone/bzone.cfg cfg 2>/dev/null
+mv -f bzone2/bzone.cfg cfg 2>/dev/null
+mv -f carnival/carnival.cfg cfg 2>/dev/null
+mv -f cavenger/cavenger.cfg cfg 2>/dev/null
+mv -f ccastles/ccastles.cfg cfg 2>/dev/null
+mv -f ccboot/ccboot.cfg cfg 2>/dev/null
+mv -f ccjap/ccjap.cfg cfg 2>/dev/null
+mv -f cclimber/cclimber.cfg cfg 2>/dev/null
+mv -f centiped/centiped.cfg cfg 2>/dev/null
+mv -f ckong/ckong.cfg cfg 2>/dev/null
+mv -f ckonga/ckonga.cfg cfg 2>/dev/null
+mv -f ckongjeu/ckongjeu.cfg cfg 2>/dev/null
+mv -f ckongs/ckongs.cfg cfg 2>/dev/null
+mv -f commandj/commandj.cfg cfg 2>/dev/null
+mv -f commando/commando.cfg cfg 2>/dev/null
+mv -f congo/congo.cfg cfg 2>/dev/null
+mv -f crush/crush.cfg cfg 2>/dev/null
+mv -f defender/defender.cfg cfg 2>/dev/null
+mv -f destderb/destderb.cfg cfg 2>/dev/null
+mv -f diamond/diamond.cfg cfg 2>/dev/null
+mv -f digdug2/digdug2.cfg cfg 2>/dev/null
+mv -f digdugat/digdug.cfg cfg 2>/dev/null
+mv -f digdugat/digdugat.cfg cfg 2>/dev/null
+mv -f digdugnm/digdugnm.cfg cfg 2>/dev/null
+mv -f dkong/dkong.cfg cfg 2>/dev/null
+mv -f dkong3/dkong3.cfg cfg 2>/dev/null
+mv -f dkongjp/dkongjp.cfg cfg 2>/dev/null
+mv -f dkongjr/dkongjr.cfg cfg 2>/dev/null
+mv -f docastl2/docastl2.cfg cfg 2>/dev/null
+mv -f docastle/docastle.cfg cfg 2>/dev/null
+mv -f dorunrun/dorunrun.cfg cfg 2>/dev/null
+mv -f dotron/dotron.cfg cfg 2>/dev/null
+mv -f douni/douni.cfg cfg 2>/dev/null
+mv -f dowild/dowild.cfg cfg 2>/dev/null
+mv -f eggs/eggs.cfg cfg 2>/dev/null
+mv -f elevatob/elevatob.cfg cfg 2>/dev/null
+mv -f elevator/elevator.cfg cfg 2>/dev/null
+mv -f elim2/elim2.cfg cfg 2>/dev/null
+mv -f exedexes/exedexes.cfg cfg 2>/dev/null
+mv -f fantasy/fantasy.cfg cfg 2>/dev/null
+mv -f fantazia/fantazia.cfg cfg 2>/dev/null
+mv -f frogger/frogger.cfg cfg 2>/dev/null
+mv -f froggers/froggers.cfg cfg 2>/dev/null
+mv -f frogsega/frogsega.cfg cfg 2>/dev/null
+mv -f frontlin/frontlin.cfg cfg 2>/dev/null
+mv -f galaga/galaga.cfg cfg 2>/dev/null
+mv -f galagabl/galagabl.cfg cfg 2>/dev/null
+mv -f galaganm/galaganm.cfg cfg 2>/dev/null
+mv -f galap1/galap1.cfg cfg 2>/dev/null
+mv -f galap4/galap4.cfg cfg 2>/dev/null
+mv -f galapx/galapx.cfg cfg 2>/dev/null
+mv -f galaxian/galaxian.cfg cfg 2>/dev/null
+mv -f gallag/gallag.cfg cfg 2>/dev/null
+mv -f galmidw/galmidw.cfg cfg 2>/dev/null
+mv -f galnamco/galnamco.cfg cfg 2>/dev/null
+mv -f galturbo/galturbo.cfg cfg 2>/dev/null
+mv -f gberet/gberet.cfg cfg 2>/dev/null
+mv -f gng/gng.cfg cfg 2>/dev/null
+mv -f gngcross/gng.cfg cfg 2>/dev/null
+mv -f gngcross/gngcross.cfg cfg 2>/dev/null
+mv -f gorf/gorf.cfg cfg 2>/dev/null
+mv -f gravitar/gravitar.cfg cfg 2>/dev/null
+mv -f gyruss/gyruss.cfg cfg 2>/dev/null
+mv -f hangly/hangly.cfg cfg 2>/dev/null
+mv -f hunchy/hunchy.cfg cfg 2>/dev/null
+mv -f invaders/invaders.cfg cfg 2>/dev/null
+mv -f japirem/japirem.cfg cfg 2>/dev/null
+mv -f jbugsega/jbugsega.cfg cfg 2>/dev/null
+mv -f jhunt/jhunt.cfg cfg 2>/dev/null
+mv -f joust/joust.cfg cfg 2>/dev/null
+mv -f jrpacman/jrpacman.cfg cfg 2>/dev/null
+mv -f jumpbug/jumpbug.cfg cfg 2>/dev/null
+mv -f junglek/junglek.cfg cfg 2>/dev/null
+mv -f kangaroo/kangaroo.cfg cfg 2>/dev/null
+mv -f kick/kick.cfg cfg 2>/dev/null
+mv -f kickridr/kickridr.cfg cfg 2>/dev/null
+mv -f krull/krull.cfg cfg 2>/dev/null
+mv -f kungfub/kungfub.cfg cfg 2>/dev/null
+mv -f kungfum/kungfum.cfg cfg 2>/dev/null
+mv -f ladybug/ladybug.cfg cfg 2>/dev/null
+mv -f llander/llander.cfg cfg 2>/dev/null
+mv -f locomotn/locomotn.cfg cfg 2>/dev/null
+mv -f losttomb/losttomb.cfg cfg 2>/dev/null
+mv -f mappy/mappy.cfg cfg 2>/dev/null
+mv -f mario/mario.cfg cfg 2>/dev/null
+mv -f milliped/milliped.cfg cfg 2>/dev/null
+mv -f missile/missile.cfg cfg 2>/dev/null
+mv -f mooncrsb/mooncrsb.cfg cfg 2>/dev/null
+mv -f mooncrst/mooncrst.cfg cfg 2>/dev/null
+mv -f moonqsr/moonqsr.cfg cfg 2>/dev/null
+mv -f mpatrol/mpatrol.cfg cfg 2>/dev/null
+mv -f mplanets/mplanets.cfg cfg 2>/dev/null
+mv -f mrdo/mrdo.cfg cfg 2>/dev/null
+mv -f mrdot/mrdot.cfg cfg 2>/dev/null
+mv -f mrlo/mrlo.cfg cfg 2>/dev/null
+mv -f mspacatk/mspacatk.cfg cfg 2>/dev/null
+mv -f mspacman/mspacman.cfg cfg 2>/dev/null
+mv -f mtrap/mtrap.cfg cfg 2>/dev/null
+mv -f mystston/mystston.cfg cfg 2>/dev/null
+mv -f namcopac/namcopac.cfg cfg 2>/dev/null
+mv -f naughtyb/naughtyb.cfg cfg 2>/dev/null
+mv -f nibbler/nibbler.cfg cfg 2>/dev/null
+mv -f omegrace/omegrace.cfg cfg 2>/dev/null
+mv -f pacman/pacman.cfg cfg 2>/dev/null
+mv -f pacmanbl/pacmanbl.cfg cfg 2>/dev/null
+mv -f pacmanjp/pacmanjp.cfg cfg 2>/dev/null
+mv -f pacmod/pacmod.cfg cfg 2>/dev/null
+mv -f pacnpal/pacpals.cfg cfg 2>/dev/null
+mv -f pacnpal/pacpal.cfg cfg 2>/dev/null
+mv -f pacnpal/pacnpal.cfg cfg 2>/dev/null
+mv -f pacplus/pacplus.cfg cfg 2>/dev/null
+mv -f panic/panic.cfg cfg 2>/dev/null
+mv -f panica/panic.cfg cfg 2>/dev/null
+mv -f panica/panica.cfg cfg 2>/dev/null
+mv -f pengo/pengo.cfg cfg 2>/dev/null
+mv -f pengoa/pengoa.cfg cfg 2>/dev/null
+mv -f penta/penta.cfg cfg 2>/dev/null
+mv -f pepper2/pepper2.cfg cfg 2>/dev/null
+mv -f phoenix/phoenix.cfg cfg 2>/dev/null
+mv -f phoenix/phoenixa.cfg cfg 2>/dev/null
+mv -f phoenix3/phoenix3.cfg cfg 2>/dev/null
+mv -f phoenixt/phoenixa.cfg cfg 2>/dev/null
+mv -f phoenixt/phoenixt.cfg cfg 2>/dev/null
+mv -f phoenixt/phoenix.cfg cfg 2>/dev/null
+mv -f piranha/piranha.cfg cfg 2>/dev/null
+mv -f pisces/pisces.cfg cfg 2>/dev/null
+mv -f pleiads/pleiads.cfg cfg 2>/dev/null
+mv -f pooyan/pooyan.cfg cfg 2>/dev/null
+mv -f popeyebl/popeyebl.cfg cfg 2>/dev/null
+mv -f puckman/puckman.cfg cfg 2>/dev/null
+mv -f qbert/qbert.cfg cfg 2>/dev/null
+mv -f qbertjp/qbertjp.cfg cfg 2>/dev/null
+mv -f qbertqub/qbertqub.cfg cfg 2>/dev/null
+mv -f qix/qix.cfg cfg 2>/dev/null
+mv -f rallyx/rallyx.cfg cfg 2>/dev/null
+mv -f rastan/rastan.cfg cfg 2>/dev/null
+mv -f reactor/reactor.cfg cfg 2>/dev/null
+mv -f redbaron/redbaron.cfg cfg 2>/dev/null
+mv -f redufo/redufo.cfg cfg 2>/dev/null
+mv -f rescue/rescue.cfg cfg 2>/dev/null
+mv -f robby/robby.cfg cfg 2>/dev/null
+mv -f robotron/robotron.cfg cfg 2>/dev/null
+mv -f rushatck/rushatck.cfg cfg 2>/dev/null
+mv -f sbagman/sbagman.cfg cfg 2>/dev/null
+mv -f sbasketb/sbasketb.cfg cfg 2>/dev/null
+mv -f scobra/scobra.cfg cfg 2>/dev/null
+mv -f scobrab/scobrab.cfg cfg 2>/dev/null
+mv -f scobrak/scobrak.cfg cfg 2>/dev/null
+mv -f scramble/scramble.cfg cfg 2>/dev/null
+mv -f seawolf2/seawolf2.cfg cfg 2>/dev/null
+mv -f seicross/seicross.cfg cfg 2>/dev/null
+mv -f sinistar/sinistar.cfg cfg 2>/dev/null
+mv -f snapjack/snapjack.cfg cfg 2>/dev/null
+mv -f sonson/sonson.cfg cfg 2>/dev/null
+mv -f spacduel/spacduel.cfg cfg 2>/dev/null
+mv -f spacefb/spacefb.cfg cfg 2>/dev/null
+mv -f spaceplt/spaceplt.cfg cfg 2>/dev/null
+mv -f spacezap/spacezap.cfg cfg 2>/dev/null
+mv -f spacfury/spacfury.cfg cfg 2>/dev/null
+mv -f splat/splat.cfg cfg 2>/dev/null
+mv -f starforc/starforc.cfg cfg 2>/dev/null
+mv -f stargate/stargate.cfg cfg 2>/dev/null
+mv -f startrek/startrek.cfg cfg 2>/dev/null
+mv -f starwars/starwars.cfg cfg 2>/dev/null
+mv -f superg/superg.cfg cfg 2>/dev/null
+mv -f superpac/superpac.cfg cfg 2>/dev/null
+mv -f sxevious/sxevious.cfg cfg 2>/dev/null
+mv -f tacscan/tacscan.cfg cfg 2>/dev/null
+mv -f tapper/tapper.cfg cfg 2>/dev/null
+mv -f tempest/tempest.cfg cfg 2>/dev/null
+mv -f theend/theend.cfg cfg 2>/dev/null
+mv -f timeplt/timeplt.cfg cfg 2>/dev/null
+mv -f tp84/tp84.cfg cfg 2>/dev/null
+mv -f tron/tron.cfg cfg 2>/dev/null
+mv -f turpin/turpin.cfg cfg 2>/dev/null
+mv -f turtles/turtles.cfg cfg 2>/dev/null
+mv -f tutankhm/tutankhm.cfg cfg 2>/dev/null
+mv -f uniwars/uniwars.cfg cfg 2>/dev/null
+mv -f vanguard/vanguard.cfg cfg 2>/dev/null
+mv -f venture/venture.cfg cfg 2>/dev/null
+mv -f vulgus/vulgus.cfg cfg 2>/dev/null
+mv -f wacko/wacko.cfg cfg 2>/dev/null
+mv -f warlord/warlord.cfg cfg 2>/dev/null
+mv -f warofbug/warofbug.cfg cfg 2>/dev/null
+mv -f warpwarp/warpwarp.cfg cfg 2>/dev/null
+mv -f wow/wow.cfg cfg 2>/dev/null
+mv -f wwestern/wwestern.cfg cfg 2>/dev/null
+mv -f xevious/xevious.cfg cfg 2>/dev/null
+mv -f xeviousn/xevious.cfg cfg 2>/dev/null
+mv -f xeviousn/xeviousn.cfg cfg 2>/dev/null
+mv -f yard/yard.cfg cfg 2>/dev/null
+mv -f yiear/yiear.cfg cfg 2>/dev/null
+mv -f zaxxon/zaxxon.cfg cfg 2>/dev/null
+mv -f zektor/zektor.cfg cfg 2>/dev/null
+
+mv -f 1942/1942.hi hi 2>/dev/null
+mv -f 3stooges/3stooges.hi hi 2>/dev/null
+mv -f amidar/amidar.hi hi 2>/dev/null
+mv -f amidarjp/amidarjp.hi hi 2>/dev/null
+mv -f amigo/amigo.hi hi 2>/dev/null
+mv -f anteater/anteater.hi hi 2>/dev/null
+mv -f arabian/arabian.hi hi 2>/dev/null
+mv -f astrmu1/astdelux.hi hi 2>/dev/null
+mv -f astrmux/astdelux.hi hi 2>/dev/null
+mv -f astrmux/astdelu2.hi hi 2>/dev/null
+mv -f asteroi2/asteroi2.hi hi 2>/dev/null
+mv -f asteroid/asteroid.hi hi 2>/dev/null
+mv -f atlantis/atlantis.hi hi 2>/dev/null
+mv -f bagman/bagman.hi hi 2>/dev/null
+mv -f bankp/bankp.hi hi 2>/dev/null
+mv -f blaster/blaster.hi hi 2>/dev/null
+mv -f blueprnt/blueprnt.hi hi 2>/dev/null
+mv -f boblbobl/boblbobl.hi hi 2>/dev/null
+mv -f bombjack/bombjack.hi hi 2>/dev/null
+mv -f bosco/bosco.hi hi 2>/dev/null
+mv -f btime/btime.hi hi 2>/dev/null
+mv -f btimea/btimea.hi hi 2>/dev/null
+mv -f bubbles/bubbles.hi hi 2>/dev/null
+mv -f bublbobl/bublbobl.hi hi 2>/dev/null
+mv -f bwidow/bwidow.hi hi 2>/dev/null
+mv -f bzone/bzone.hi hi 2>/dev/null
+mv -f bzone2/bzone.hi hi 2>/dev/null
+mv -f carnival/carnival.hi hi 2>/dev/null
+mv -f cavenger/cavenger.hi hi 2>/dev/null
+mv -f ccastles/ccastles.hi hi 2>/dev/null
+mv -f ccboot/ccboot.hi hi 2>/dev/null
+mv -f ccjap/ccjap.hi hi 2>/dev/null
+mv -f cclimber/cclimber.hi hi 2>/dev/null
+mv -f centiped/centiped.hi hi 2>/dev/null
+mv -f ckong/ckong.hi hi 2>/dev/null
+mv -f ckonga/ckonga.hi hi 2>/dev/null
+mv -f ckongjeu/ckongjeu.hi hi 2>/dev/null
+mv -f ckongs/ckongs.hi hi 2>/dev/null
+mv -f commandj/commandj.hi hi 2>/dev/null
+mv -f commando/commando.hi hi 2>/dev/null
+mv -f congo/congo.hi hi 2>/dev/null
+mv -f crush/crush.hi hi 2>/dev/null
+mv -f defender/defender.hi hi 2>/dev/null
+mv -f destderb/destderb.hi hi 2>/dev/null
+mv -f diamond/diamond.hi hi 2>/dev/null
+mv -f digdug2/digdug2.hi hi 2>/dev/null
+mv -f digdugat/digdug.hi hi 2>/dev/null
+mv -f digdugat/digdugat.hi hi 2>/dev/null
+mv -f digdugnm/digdugnm.hi hi 2>/dev/null
+mv -f dkong/dkong.hi hi 2>/dev/null
+mv -f dkong3/dkong3.hi hi 2>/dev/null
+mv -f dkongjp/dkongjp.hi hi 2>/dev/null
+mv -f dkongjr/dkongjr.hi hi 2>/dev/null
+mv -f docastl2/docastl2.hi hi 2>/dev/null
+mv -f docastle/docastle.hi hi 2>/dev/null
+mv -f dorunrun/dorunrun.hi hi 2>/dev/null
+mv -f dotron/dotron.hi hi 2>/dev/null
+mv -f douni/douni.hi hi 2>/dev/null
+mv -f dowild/dowild.hi hi 2>/dev/null
+mv -f eggs/eggs.hi hi 2>/dev/null
+mv -f elevatob/elevatob.hi hi 2>/dev/null
+mv -f elevator/elevator.hi hi 2>/dev/null
+mv -f elim2/elim2.hi hi 2>/dev/null
+mv -f exedexes/exedexes.hi hi 2>/dev/null
+mv -f fantasy/fantasy.hi hi 2>/dev/null
+mv -f fantazia/fantazia.hi hi 2>/dev/null
+mv -f frogger/frogger.hi hi 2>/dev/null
+mv -f froggers/froggers.hi hi 2>/dev/null
+mv -f frogsega/frogsega.hi hi 2>/dev/null
+mv -f frontlin/frontlin.hi hi 2>/dev/null
+mv -f galaga/galaga.hi hi 2>/dev/null
+mv -f galagabl/galagabl.hi hi 2>/dev/null
+mv -f galaganm/galaganm.hi hi 2>/dev/null
+mv -f galap1/galap1.hi hi 2>/dev/null
+mv -f galap4/galap4.hi hi 2>/dev/null
+mv -f galapx/galapx.hi hi 2>/dev/null
+mv -f galaxian/galaxian.hi hi 2>/dev/null
+mv -f gallag/gallag.hi hi 2>/dev/null
+mv -f galmidw/galmidw.hi hi 2>/dev/null
+mv -f galnamco/galnamco.hi hi 2>/dev/null
+mv -f galturbo/galturbo.hi hi 2>/dev/null
+mv -f gberet/gberet.hi hi 2>/dev/null
+mv -f gng/gng.hi hi 2>/dev/null
+mv -f gngcross/gng.hi hi 2>/dev/null
+mv -f gngcross/gngcross.hi hi 2>/dev/null
+mv -f gorf/gorf.hi hi 2>/dev/null
+mv -f gravitar/gravitar.hi hi 2>/dev/null
+mv -f gyruss/gyruss.hi hi 2>/dev/null
+mv -f hangly/hangly.hi hi 2>/dev/null
+mv -f hunchy/hunchy.hi hi 2>/dev/null
+mv -f invaders/invaders.hi hi 2>/dev/null
+mv -f japirem/japirem.hi hi 2>/dev/null
+mv -f jbugsega/jbugsega.hi hi 2>/dev/null
+mv -f jhunt/jhunt.hi hi 2>/dev/null
+mv -f joust/joust.hi hi 2>/dev/null
+mv -f jrpacman/jrpacman.hi hi 2>/dev/null
+mv -f jumpbug/jumpbug.hi hi 2>/dev/null
+mv -f junglek/junglek.hi hi 2>/dev/null
+mv -f kangaroo/kangaroo.hi hi 2>/dev/null
+mv -f kick/kick.hi hi 2>/dev/null
+mv -f kickridr/kickridr.hi hi 2>/dev/null
+mv -f krull/krull.hi hi 2>/dev/null
+mv -f kungfub/kungfub.hi hi 2>/dev/null
+mv -f kungfum/kungfum.hi hi 2>/dev/null
+mv -f ladybug/ladybug.hi hi 2>/dev/null
+mv -f llander/llander.hi hi 2>/dev/null
+mv -f locomotn/locomotn.hi hi 2>/dev/null
+mv -f losttomb/losttomb.hi hi 2>/dev/null
+mv -f mappy/mappy.hi hi 2>/dev/null
+mv -f mario/mario.hi hi 2>/dev/null
+mv -f milliped/milliped.hi hi 2>/dev/null
+mv -f missile/missile.hi hi 2>/dev/null
+mv -f mooncrsb/mooncrsb.hi hi 2>/dev/null
+mv -f mooncrst/mooncrst.hi hi 2>/dev/null
+mv -f moonqsr/moonqsr.hi hi 2>/dev/null
+mv -f mpatrol/mpatrol.hi hi 2>/dev/null
+mv -f mplanets/mplanets.hi hi 2>/dev/null
+mv -f mrdo/mrdo.hi hi 2>/dev/null
+mv -f mrdot/mrdot.hi hi 2>/dev/null
+mv -f mrlo/mrlo.hi hi 2>/dev/null
+mv -f mspacatk/mspacatk.hi hi 2>/dev/null
+mv -f mspacman/mspacman.hi hi 2>/dev/null
+mv -f mtrap/mtrap.hi hi 2>/dev/null
+mv -f mystston/mystston.hi hi 2>/dev/null
+mv -f namcopac/namcopac.hi hi 2>/dev/null
+mv -f naughtyb/naughtyb.hi hi 2>/dev/null
+mv -f nibbler/nibbler.hi hi 2>/dev/null
+mv -f omegrace/omegrace.hi hi 2>/dev/null
+mv -f pacman/pacman.hi hi 2>/dev/null
+mv -f pacmanbl/pacmanbl.hi hi 2>/dev/null
+mv -f pacmanjp/pacmanjp.hi hi 2>/dev/null
+mv -f pacmod/pacmod.hi hi 2>/dev/null
+mv -f pacnpal/pacpals.hi hi 2>/dev/null
+mv -f pacnpal/pacpal.hi hi 2>/dev/null
+mv -f pacnpal/pacnpal.hi hi 2>/dev/null
+mv -f pacplus/pacplus.hi hi 2>/dev/null
+mv -f panic/panic.hi hi 2>/dev/null
+mv -f panica/panic.hi hi 2>/dev/null
+mv -f panica/panica.hi hi 2>/dev/null
+mv -f pengo/pengo.hi hi 2>/dev/null
+mv -f pengoa/pengoa.hi hi 2>/dev/null
+mv -f penta/penta.hi hi 2>/dev/null
+mv -f pepper2/pepper2.hi hi 2>/dev/null
+mv -f phoenix/phoenix.hi hi 2>/dev/null
+mv -f phoenix/phoenixa.hi hi 2>/dev/null
+mv -f phoenix3/phoenix3.hi hi 2>/dev/null
+mv -f phoenixt/phoenixa.hi hi 2>/dev/null
+mv -f phoenixt/phoenixt.hi hi 2>/dev/null
+mv -f phoenixt/phoenix.hi hi 2>/dev/null
+mv -f piranha/piranha.hi hi 2>/dev/null
+mv -f pisces/pisces.hi hi 2>/dev/null
+mv -f pleiads/pleiads.hi hi 2>/dev/null
+mv -f pooyan/pooyan.hi hi 2>/dev/null
+mv -f popeyebl/popeyebl.hi hi 2>/dev/null
+mv -f puckman/puckman.hi hi 2>/dev/null
+mv -f qbert/qbert.hi hi 2>/dev/null
+mv -f qbertjp/qbertjp.hi hi 2>/dev/null
+mv -f qbertqub/qbertqub.hi hi 2>/dev/null
+mv -f qix/qix.hi hi 2>/dev/null
+mv -f rallyx/rallyx.hi hi 2>/dev/null
+mv -f rastan/rastan.hi hi 2>/dev/null
+mv -f reactor/reactor.hi hi 2>/dev/null
+mv -f redbaron/redbaron.hi hi 2>/dev/null
+mv -f redufo/redufo.hi hi 2>/dev/null
+mv -f rescue/rescue.hi hi 2>/dev/null
+mv -f robby/robby.hi hi 2>/dev/null
+mv -f robotron/robotron.hi hi 2>/dev/null
+mv -f rushatck/rushatck.hi hi 2>/dev/null
+mv -f sbagman/sbagman.hi hi 2>/dev/null
+mv -f sbasketb/sbasketb.hi hi 2>/dev/null
+mv -f scobra/scobra.hi hi 2>/dev/null
+mv -f scobrab/scobrab.hi hi 2>/dev/null
+mv -f scobrak/scobrak.hi hi 2>/dev/null
+mv -f scramble/scramble.hi hi 2>/dev/null
+mv -f seawolf2/seawolf2.hi hi 2>/dev/null
+mv -f seicross/seicross.hi hi 2>/dev/null
+mv -f sinistar/sinistar.hi hi 2>/dev/null
+mv -f snapjack/snapjack.hi hi 2>/dev/null
+mv -f sonson/sonson.hi hi 2>/dev/null
+mv -f spacduel/spacduel.hi hi 2>/dev/null
+mv -f spacefb/spacefb.hi hi 2>/dev/null
+mv -f spaceplt/spaceplt.hi hi 2>/dev/null
+mv -f spacezap/spacezap.hi hi 2>/dev/null
+mv -f spacfury/spacfury.hi hi 2>/dev/null
+mv -f splat/splat.hi hi 2>/dev/null
+mv -f starforc/starforc.hi hi 2>/dev/null
+mv -f stargate/stargate.hi hi 2>/dev/null
+mv -f startrek/startrek.hi hi 2>/dev/null
+mv -f starwars/starwars.hi hi 2>/dev/null
+mv -f superg/superg.hi hi 2>/dev/null
+mv -f superpac/superpac.hi hi 2>/dev/null
+mv -f sxevious/sxevious.hi hi 2>/dev/null
+mv -f tacscan/tacscan.hi hi 2>/dev/null
+mv -f tapper/tapper.hi hi 2>/dev/null
+mv -f tempest/tempest.hi hi 2>/dev/null
+mv -f theend/theend.hi hi 2>/dev/null
+mv -f timeplt/timeplt.hi hi 2>/dev/null
+mv -f tp84/tp84.hi hi 2>/dev/null
+mv -f tron/tron.hi hi 2>/dev/null
+mv -f turpin/turpin.hi hi 2>/dev/null
+mv -f turtles/turtles.hi hi 2>/dev/null
+mv -f tutankhm/tutankhm.hi hi 2>/dev/null
+mv -f uniwars/uniwars.hi hi 2>/dev/null
+mv -f vanguard/vanguard.hi hi 2>/dev/null
+mv -f venture/venture.hi hi 2>/dev/null
+mv -f vulgus/vulgus.hi hi 2>/dev/null
+mv -f wacko/wacko.hi hi 2>/dev/null
+mv -f warlord/warlord.hi hi 2>/dev/null
+mv -f warofbug/warofbug.hi hi 2>/dev/null
+mv -f warpwarp/warpwarp.hi hi 2>/dev/null
+mv -f wow/wow.hi hi 2>/dev/null
+mv -f wwestern/wwestern.hi hi 2>/dev/null
+mv -f xevious/xevious.hi hi 2>/dev/null
+mv -f xeviousn/xevious.hi hi 2>/dev/null
+mv -f xeviousn/xeviousn.hi hi 2>/dev/null
+mv -f yard/yard.hi hi 2>/dev/null
+mv -f yiear/yiear.hi hi 2>/dev/null
+mv -f zaxxon/zaxxon.hi hi 2>/dev/null
+mv -f zektor/zektor.hi hi 2>/dev/null
+
+rm -f 1942/1942.dsw 2>/dev/null
+rm -f 3stooges/3stooges.dsw 2>/dev/null
+rm -f amidar/amidar.dsw 2>/dev/null
+rm -f amidarjp/amidarjp.dsw 2>/dev/null
+rm -f amigo/amigo.dsw 2>/dev/null
+rm -f anteater/anteater.dsw 2>/dev/null
+rm -f arabian/arabian.dsw 2>/dev/null
+rm -f astrmu1/astdelux.dsw 2>/dev/null
+rm -f astrmux/astdelux.dsw 2>/dev/null
+rm -f astrmux/astdelu2.dsw 2>/dev/null
+rm -f asteroi2/asteroi2.dsw 2>/dev/null
+rm -f asteroid/asteroid.dsw 2>/dev/null
+rm -f atlantis/atlantis.dsw 2>/dev/null
+rm -f bagman/bagman.dsw 2>/dev/null
+rm -f bankp/bankp.dsw 2>/dev/null
+rm -f blaster/blaster.dsw 2>/dev/null
+rm -f blueprnt/blueprnt.dsw 2>/dev/null
+rm -f boblbobl/boblbobl.dsw 2>/dev/null
+rm -f bombjack/bombjack.dsw 2>/dev/null
+rm -f bosco/bosco.dsw 2>/dev/null
+rm -f btime/btime.dsw 2>/dev/null
+rm -f btimea/btimea.dsw 2>/dev/null
+rm -f bubbles/bubbles.dsw 2>/dev/null
+rm -f bublbobl/bublbobl.dsw 2>/dev/null
+rm -f bwidow/bwidow.dsw 2>/dev/null
+rm -f bzone/bzone.dsw 2>/dev/null
+rm -f bzone2/bzone.dsw 2>/dev/null
+rm -f carnival/carnival.dsw 2>/dev/null
+rm -f cavenger/cavenger.dsw 2>/dev/null
+rm -f ccastles/ccastles.dsw 2>/dev/null
+rm -f ccboot/ccboot.dsw 2>/dev/null
+rm -f ccjap/ccjap.dsw 2>/dev/null
+rm -f cclimber/cclimber.dsw 2>/dev/null
+rm -f centiped/centiped.dsw 2>/dev/null
+rm -f ckong/ckong.dsw 2>/dev/null
+rm -f ckonga/ckonga.dsw 2>/dev/null
+rm -f ckongjeu/ckongjeu.dsw 2>/dev/null
+rm -f ckongs/ckongs.dsw 2>/dev/null
+rm -f commandj/commandj.dsw 2>/dev/null
+rm -f commando/commando.dsw 2>/dev/null
+rm -f congo/congo.dsw 2>/dev/null
+rm -f crush/crush.dsw 2>/dev/null
+rm -f defender/defender.dsw 2>/dev/null
+rm -f destderb/destderb.dsw 2>/dev/null
+rm -f diamond/diamond.dsw 2>/dev/null
+rm -f digdug2/digdug2.dsw 2>/dev/null
+rm -f digdugat/digdug.dsw 2>/dev/null
+rm -f digdugat/digdugat.dsw 2>/dev/null
+rm -f digdugnm/digdugnm.dsw 2>/dev/null
+rm -f dkong/dkong.dsw 2>/dev/null
+rm -f dkong3/dkong3.dsw 2>/dev/null
+rm -f dkongjp/dkongjp.dsw 2>/dev/null
+rm -f dkongjr/dkongjr.dsw 2>/dev/null
+rm -f docastl2/docastl2.dsw 2>/dev/null
+rm -f docastle/docastle.dsw 2>/dev/null
+rm -f dorunrun/dorunrun.dsw 2>/dev/null
+rm -f dotron/dotron.dsw 2>/dev/null
+rm -f douni/douni.dsw 2>/dev/null
+rm -f dowild/dowild.dsw 2>/dev/null
+rm -f eggs/eggs.dsw 2>/dev/null
+rm -f elevatob/elevatob.dsw 2>/dev/null
+rm -f elevator/elevator.dsw 2>/dev/null
+rm -f elim2/elim2.dsw 2>/dev/null
+rm -f exedexes/exedexes.dsw 2>/dev/null
+rm -f fantasy/fantasy.dsw 2>/dev/null
+rm -f fantazia/fantazia.dsw 2>/dev/null
+rm -f frogger/frogger.dsw 2>/dev/null
+rm -f froggers/froggers.dsw 2>/dev/null
+rm -f frogsega/frogsega.dsw 2>/dev/null
+rm -f frontlin/frontlin.dsw 2>/dev/null
+rm -f galaga/galaga.dsw 2>/dev/null
+rm -f galagabl/galagabl.dsw 2>/dev/null
+rm -f galaganm/galaganm.dsw 2>/dev/null
+rm -f galap1/galap1.dsw 2>/dev/null
+rm -f galap4/galap4.dsw 2>/dev/null
+rm -f galapx/galapx.dsw 2>/dev/null
+rm -f galaxian/galaxian.dsw 2>/dev/null
+rm -f gallag/gallag.dsw 2>/dev/null
+rm -f galmidw/galmidw.dsw 2>/dev/null
+rm -f galnamco/galnamco.dsw 2>/dev/null
+rm -f galturbo/galturbo.dsw 2>/dev/null
+rm -f gberet/gberet.dsw 2>/dev/null
+rm -f gng/gng.dsw 2>/dev/null
+rm -f gngcross/gng.dsw 2>/dev/null
+rm -f gngcross/gngcross.dsw 2>/dev/null
+rm -f gorf/gorf.dsw 2>/dev/null
+rm -f gravitar/gravitar.dsw 2>/dev/null
+rm -f gyruss/gyruss.dsw 2>/dev/null
+rm -f hangly/hangly.dsw 2>/dev/null
+rm -f hunchy/hunchy.dsw 2>/dev/null
+rm -f invaders/invaders.dsw 2>/dev/null
+rm -f japirem/japirem.dsw 2>/dev/null
+rm -f jbugsega/jbugsega.dsw 2>/dev/null
+rm -f jhunt/jhunt.dsw 2>/dev/null
+rm -f joust/joust.dsw 2>/dev/null
+rm -f jrpacman/jrpacman.dsw 2>/dev/null
+rm -f jumpbug/jumpbug.dsw 2>/dev/null
+rm -f junglek/junglek.dsw 2>/dev/null
+rm -f kangaroo/kangaroo.dsw 2>/dev/null
+rm -f kick/kick.dsw 2>/dev/null
+rm -f kickridr/kickridr.dsw 2>/dev/null
+rm -f krull/krull.dsw 2>/dev/null
+rm -f kungfub/kungfub.dsw 2>/dev/null
+rm -f kungfum/kungfum.dsw 2>/dev/null
+rm -f ladybug/ladybug.dsw 2>/dev/null
+rm -f llander/llander.dsw 2>/dev/null
+rm -f locomotn/locomotn.dsw 2>/dev/null
+rm -f losttomb/losttomb.dsw 2>/dev/null
+rm -f mappy/mappy.dsw 2>/dev/null
+rm -f mario/mario.dsw 2>/dev/null
+rm -f milliped/milliped.dsw 2>/dev/null
+rm -f missile/missile.dsw 2>/dev/null
+rm -f mooncrsb/mooncrsb.dsw 2>/dev/null
+rm -f mooncrst/mooncrst.dsw 2>/dev/null
+rm -f moonqsr/moonqsr.dsw 2>/dev/null
+rm -f mpatrol/mpatrol.dsw 2>/dev/null
+rm -f mplanets/mplanets.dsw 2>/dev/null
+rm -f mrdo/mrdo.dsw 2>/dev/null
+rm -f mrdot/mrdot.dsw 2>/dev/null
+rm -f mrlo/mrlo.dsw 2>/dev/null
+rm -f mspacatk/mspacatk.dsw 2>/dev/null
+rm -f mspacman/mspacman.dsw 2>/dev/null
+rm -f mtrap/mtrap.dsw 2>/dev/null
+rm -f mystston/mystston.dsw 2>/dev/null
+rm -f namcopac/namcopac.dsw 2>/dev/null
+rm -f naughtyb/naughtyb.dsw 2>/dev/null
+rm -f nibbler/nibbler.dsw 2>/dev/null
+rm -f omegrace/omegrace.dsw 2>/dev/null
+rm -f pacman/pacman.dsw 2>/dev/null
+rm -f pacmanbl/pacmanbl.dsw 2>/dev/null
+rm -f pacmanjp/pacmanjp.dsw 2>/dev/null
+rm -f pacmod/pacmod.dsw 2>/dev/null
+rm -f pacnpal/pacpals.dsw 2>/dev/null
+rm -f pacnpal/pacpal.dsw 2>/dev/null
+rm -f pacnpal/pacnpal.dsw 2>/dev/null
+rm -f pacplus/pacplus.dsw 2>/dev/null
+rm -f panic/panic.dsw 2>/dev/null
+rm -f panica/panic.dsw 2>/dev/null
+rm -f panica/panica.dsw 2>/dev/null
+rm -f pengo/pengo.dsw 2>/dev/null
+rm -f pengoa/pengoa.dsw 2>/dev/null
+rm -f penta/penta.dsw 2>/dev/null
+rm -f pepper2/pepper2.dsw 2>/dev/null
+rm -f phoenix/phoenix.dsw 2>/dev/null
+rm -f phoenix/phoenixa.dsw 2>/dev/null
+rm -f phoenix3/phoenix3.dsw 2>/dev/null
+rm -f phoenixt/phoenixa.dsw 2>/dev/null
+rm -f phoenixt/phoenixt.dsw 2>/dev/null
+rm -f phoenixt/phoenix.dsw 2>/dev/null
+rm -f piranha/piranha.dsw 2>/dev/null
+rm -f pisces/pisces.dsw 2>/dev/null
+rm -f pleiads/pleiads.dsw 2>/dev/null
+rm -f pooyan/pooyan.dsw 2>/dev/null
+rm -f popeyebl/popeyebl.dsw 2>/dev/null
+rm -f puckman/puckman.dsw 2>/dev/null
+rm -f qbert/qbert.dsw 2>/dev/null
+rm -f qbertjp/qbertjp.dsw 2>/dev/null
+rm -f qbertqub/qbertqub.dsw 2>/dev/null
+rm -f qix/qix.dsw 2>/dev/null
+rm -f rallyx/rallyx.dsw 2>/dev/null
+rm -f rastan/rastan.dsw 2>/dev/null
+rm -f reactor/reactor.dsw 2>/dev/null
+rm -f redbaron/redbaron.dsw 2>/dev/null
+rm -f redufo/redufo.dsw 2>/dev/null
+rm -f rescue/rescue.dsw 2>/dev/null
+rm -f robby/robby.dsw 2>/dev/null
+rm -f robotron/robotron.dsw 2>/dev/null
+rm -f rushatck/rushatck.dsw 2>/dev/null
+rm -f sbagman/sbagman.dsw 2>/dev/null
+rm -f sbasketb/sbasketb.dsw 2>/dev/null
+rm -f scobra/scobra.dsw 2>/dev/null
+rm -f scobrab/scobrab.dsw 2>/dev/null
+rm -f scobrak/scobrak.dsw 2>/dev/null
+rm -f scramble/scramble.dsw 2>/dev/null
+rm -f seawolf2/seawolf2.dsw 2>/dev/null
+rm -f seicross/seicross.dsw 2>/dev/null
+rm -f sinistar/sinistar.dsw 2>/dev/null
+rm -f snapjack/snapjack.dsw 2>/dev/null
+rm -f sonson/sonson.dsw 2>/dev/null
+rm -f spacduel/spacduel.dsw 2>/dev/null
+rm -f spacefb/spacefb.dsw 2>/dev/null
+rm -f spaceplt/spaceplt.dsw 2>/dev/null
+rm -f spacezap/spacezap.dsw 2>/dev/null
+rm -f spacfury/spacfury.dsw 2>/dev/null
+rm -f splat/splat.dsw 2>/dev/null
+rm -f starforc/starforc.dsw 2>/dev/null
+rm -f stargate/stargate.dsw 2>/dev/null
+rm -f startrek/startrek.dsw 2>/dev/null
+rm -f starwars/starwars.dsw 2>/dev/null
+rm -f superg/superg.dsw 2>/dev/null
+rm -f superpac/superpac.dsw 2>/dev/null
+rm -f sxevious/sxevious.dsw 2>/dev/null
+rm -f tacscan/tacscan.dsw 2>/dev/null
+rm -f tapper/tapper.dsw 2>/dev/null
+rm -f tempest/tempest.dsw 2>/dev/null
+rm -f theend/theend.dsw 2>/dev/null
+rm -f timeplt/timeplt.dsw 2>/dev/null
+rm -f tp84/tp84.dsw 2>/dev/null
+rm -f tron/tron.dsw 2>/dev/null
+rm -f turpin/turpin.dsw 2>/dev/null
+rm -f turtles/turtles.dsw 2>/dev/null
+rm -f tutankhm/tutankhm.dsw 2>/dev/null
+rm -f uniwars/uniwars.dsw 2>/dev/null
+rm -f vanguard/vanguard.dsw 2>/dev/null
+rm -f venture/venture.dsw 2>/dev/null
+rm -f vulgus/vulgus.dsw 2>/dev/null
+rm -f wacko/wacko.dsw 2>/dev/null
+rm -f warlord/warlord.dsw 2>/dev/null
+rm -f warofbug/warofbug.dsw 2>/dev/null
+rm -f warpwarp/warpwarp.dsw 2>/dev/null
+rm -f wow/wow.dsw 2>/dev/null
+rm -f wwestern/wwestern.dsw 2>/dev/null
+rm -f xevious/xevious.dsw 2>/dev/null
+rm -f xeviousn/xevious.dsw 2>/dev/null
+rm -f xeviousn/xeviousn.dsw 2>/dev/null
+rm -f yard/yard.dsw 2>/dev/null
+rm -f yiear/yiear.dsw 2>/dev/null
+rm -f zaxxon/zaxxon.dsw 2>/dev/null
+rm -f zektor/zektor.dsw 2>/dev/null
+
+rm -f 1942/1942.key 2>/dev/null
+rm -f 3stooges/3stooges.key 2>/dev/null
+rm -f amidar/amidar.key 2>/dev/null
+rm -f amidarjp/amidarjp.key 2>/dev/null
+rm -f amigo/amigo.key 2>/dev/null
+rm -f anteater/anteater.key 2>/dev/null
+rm -f arabian/arabian.key 2>/dev/null
+rm -f astrmu1/astdelux.key 2>/dev/null
+rm -f astrmux/astdelux.key 2>/dev/null
+rm -f astrmux/astdelu2.key 2>/dev/null
+rm -f asteroi2/asteroi2.key 2>/dev/null
+rm -f asteroid/asteroid.key 2>/dev/null
+rm -f atlantis/atlantis.key 2>/dev/null
+rm -f bagman/bagman.key 2>/dev/null
+rm -f bankp/bankp.key 2>/dev/null
+rm -f blaster/blaster.key 2>/dev/null
+rm -f blueprnt/blueprnt.key 2>/dev/null
+rm -f boblbobl/boblbobl.key 2>/dev/null
+rm -f bombjack/bombjack.key 2>/dev/null
+rm -f bosco/bosco.key 2>/dev/null
+rm -f btime/btime.key 2>/dev/null
+rm -f btimea/btimea.key 2>/dev/null
+rm -f bubbles/bubbles.key 2>/dev/null
+rm -f bublbobl/bublbobl.key 2>/dev/null
+rm -f bwidow/bwidow.key 2>/dev/null
+rm -f bzone/bzone.key 2>/dev/null
+rm -f bzone2/bzone.key 2>/dev/null
+rm -f carnival/carnival.key 2>/dev/null
+rm -f cavenger/cavenger.key 2>/dev/null
+rm -f ccastles/ccastles.key 2>/dev/null
+rm -f ccboot/ccboot.key 2>/dev/null
+rm -f ccjap/ccjap.key 2>/dev/null
+rm -f cclimber/cclimber.key 2>/dev/null
+rm -f centiped/centiped.key 2>/dev/null
+rm -f ckong/ckong.key 2>/dev/null
+rm -f ckonga/ckonga.key 2>/dev/null
+rm -f ckongjeu/ckongjeu.key 2>/dev/null
+rm -f ckongs/ckongs.key 2>/dev/null
+rm -f commandj/commandj.key 2>/dev/null
+rm -f commando/commando.key 2>/dev/null
+rm -f congo/congo.key 2>/dev/null
+rm -f crush/crush.key 2>/dev/null
+rm -f defender/defender.key 2>/dev/null
+rm -f destderb/destderb.key 2>/dev/null
+rm -f diamond/diamond.key 2>/dev/null
+rm -f digdug2/digdug2.key 2>/dev/null
+rm -f digdugat/digdug.key 2>/dev/null
+rm -f digdugat/digdugat.key 2>/dev/null
+rm -f digdugnm/digdugnm.key 2>/dev/null
+rm -f dkong/dkong.key 2>/dev/null
+rm -f dkong3/dkong3.key 2>/dev/null
+rm -f dkongjp/dkongjp.key 2>/dev/null
+rm -f dkongjr/dkongjr.key 2>/dev/null
+rm -f docastl2/docastl2.key 2>/dev/null
+rm -f docastle/docastle.key 2>/dev/null
+rm -f dorunrun/dorunrun.key 2>/dev/null
+rm -f dotron/dotron.key 2>/dev/null
+rm -f douni/douni.key 2>/dev/null
+rm -f dowild/dowild.key 2>/dev/null
+rm -f eggs/eggs.key 2>/dev/null
+rm -f elevatob/elevatob.key 2>/dev/null
+rm -f elevator/elevator.key 2>/dev/null
+rm -f elim2/elim2.key 2>/dev/null
+rm -f exedexes/exedexes.key 2>/dev/null
+rm -f fantasy/fantasy.key 2>/dev/null
+rm -f fantazia/fantazia.key 2>/dev/null
+rm -f frogger/frogger.key 2>/dev/null
+rm -f froggers/froggers.key 2>/dev/null
+rm -f frogsega/frogsega.key 2>/dev/null
+rm -f frontlin/frontlin.key 2>/dev/null
+rm -f galaga/galaga.key 2>/dev/null
+rm -f galagabl/galagabl.key 2>/dev/null
+rm -f galaganm/galaganm.key 2>/dev/null
+rm -f galap1/galap1.key 2>/dev/null
+rm -f galap4/galap4.key 2>/dev/null
+rm -f galapx/galapx.key 2>/dev/null
+rm -f galaxian/galaxian.key 2>/dev/null
+rm -f gallag/gallag.key 2>/dev/null
+rm -f galmidw/galmidw.key 2>/dev/null
+rm -f galnamco/galnamco.key 2>/dev/null
+rm -f galturbo/galturbo.key 2>/dev/null
+rm -f gberet/gberet.key 2>/dev/null
+rm -f gng/gng.key 2>/dev/null
+rm -f gngcross/gng.key 2>/dev/null
+rm -f gngcross/gngcross.key 2>/dev/null
+rm -f gorf/gorf.key 2>/dev/null
+rm -f gravitar/gravitar.key 2>/dev/null
+rm -f gyruss/gyruss.key 2>/dev/null
+rm -f hangly/hangly.key 2>/dev/null
+rm -f hunchy/hunchy.key 2>/dev/null
+rm -f invaders/invaders.key 2>/dev/null
+rm -f japirem/japirem.key 2>/dev/null
+rm -f jbugsega/jbugsega.key 2>/dev/null
+rm -f jhunt/jhunt.key 2>/dev/null
+rm -f joust/joust.key 2>/dev/null
+rm -f jrpacman/jrpacman.key 2>/dev/null
+rm -f jumpbug/jumpbug.key 2>/dev/null
+rm -f junglek/junglek.key 2>/dev/null
+rm -f kangaroo/kangaroo.key 2>/dev/null
+rm -f kick/kick.key 2>/dev/null
+rm -f kickridr/kickridr.key 2>/dev/null
+rm -f krull/krull.key 2>/dev/null
+rm -f kungfub/kungfub.key 2>/dev/null
+rm -f kungfum/kungfum.key 2>/dev/null
+rm -f ladybug/ladybug.key 2>/dev/null
+rm -f llander/llander.key 2>/dev/null
+rm -f locomotn/locomotn.key 2>/dev/null
+rm -f losttomb/losttomb.key 2>/dev/null
+rm -f mappy/mappy.key 2>/dev/null
+rm -f mario/mario.key 2>/dev/null
+rm -f milliped/milliped.key 2>/dev/null
+rm -f missile/missile.key 2>/dev/null
+rm -f mooncrsb/mooncrsb.key 2>/dev/null
+rm -f mooncrst/mooncrst.key 2>/dev/null
+rm -f moonqsr/moonqsr.key 2>/dev/null
+rm -f mpatrol/mpatrol.key 2>/dev/null
+rm -f mplanets/mplanets.key 2>/dev/null
+rm -f mrdo/mrdo.key 2>/dev/null
+rm -f mrdot/mrdot.key 2>/dev/null
+rm -f mrlo/mrlo.key 2>/dev/null
+rm -f mspacatk/mspacatk.key 2>/dev/null
+rm -f mspacman/mspacman.key 2>/dev/null
+rm -f mtrap/mtrap.key 2>/dev/null
+rm -f mystston/mystston.key 2>/dev/null
+rm -f namcopac/namcopac.key 2>/dev/null
+rm -f naughtyb/naughtyb.key 2>/dev/null
+rm -f nibbler/nibbler.key 2>/dev/null
+rm -f omegrace/omegrace.key 2>/dev/null
+rm -f pacman/pacman.key 2>/dev/null
+rm -f pacmanbl/pacmanbl.key 2>/dev/null
+rm -f pacmanjp/pacmanjp.key 2>/dev/null
+rm -f pacmod/pacmod.key 2>/dev/null
+rm -f pacnpal/pacpals.key 2>/dev/null
+rm -f pacnpal/pacpal.key 2>/dev/null
+rm -f pacnpal/pacnpal.key 2>/dev/null
+rm -f pacplus/pacplus.key 2>/dev/null
+rm -f panic/panic.key 2>/dev/null
+rm -f panica/panic.key 2>/dev/null
+rm -f panica/panica.key 2>/dev/null
+rm -f pengo/pengo.key 2>/dev/null
+rm -f pengoa/pengoa.key 2>/dev/null
+rm -f penta/penta.key 2>/dev/null
+rm -f pepper2/pepper2.key 2>/dev/null
+rm -f phoenix/phoenix.key 2>/dev/null
+rm -f phoenix/phoenixa.key 2>/dev/null
+rm -f phoenix3/phoenix3.key 2>/dev/null
+rm -f phoenixt/phoenixa.key 2>/dev/null
+rm -f phoenixt/phoenixt.key 2>/dev/null
+rm -f phoenixt/phoenix.key 2>/dev/null
+rm -f piranha/piranha.key 2>/dev/null
+rm -f pisces/pisces.key 2>/dev/null
+rm -f pleiads/pleiads.key 2>/dev/null
+rm -f pooyan/pooyan.key 2>/dev/null
+rm -f popeyebl/popeyebl.key 2>/dev/null
+rm -f puckman/puckman.key 2>/dev/null
+rm -f qbert/qbert.key 2>/dev/null
+rm -f qbertjp/qbertjp.key 2>/dev/null
+rm -f qbertqub/qbertqub.key 2>/dev/null
+rm -f qix/qix.key 2>/dev/null
+rm -f rallyx/rallyx.key 2>/dev/null
+rm -f rastan/rastan.key 2>/dev/null
+rm -f reactor/reactor.key 2>/dev/null
+rm -f redbaron/redbaron.key 2>/dev/null
+rm -f redufo/redufo.key 2>/dev/null
+rm -f rescue/rescue.key 2>/dev/null
+rm -f robby/robby.key 2>/dev/null
+rm -f robotron/robotron.key 2>/dev/null
+rm -f rushatck/rushatck.key 2>/dev/null
+rm -f sbagman/sbagman.key 2>/dev/null
+rm -f sbasketb/sbasketb.key 2>/dev/null
+rm -f scobra/scobra.key 2>/dev/null
+rm -f scobrab/scobrab.key 2>/dev/null
+rm -f scobrak/scobrak.key 2>/dev/null
+rm -f scramble/scramble.key 2>/dev/null
+rm -f seawolf2/seawolf2.key 2>/dev/null
+rm -f seicross/seicross.key 2>/dev/null
+rm -f sinistar/sinistar.key 2>/dev/null
+rm -f snapjack/snapjack.key 2>/dev/null
+rm -f sonson/sonson.key 2>/dev/null
+rm -f spacduel/spacduel.key 2>/dev/null
+rm -f spacefb/spacefb.key 2>/dev/null
+rm -f spaceplt/spaceplt.key 2>/dev/null
+rm -f spacezap/spacezap.key 2>/dev/null
+rm -f spacfury/spacfury.key 2>/dev/null
+rm -f splat/splat.key 2>/dev/null
+rm -f starforc/starforc.key 2>/dev/null
+rm -f stargate/stargate.key 2>/dev/null
+rm -f startrek/startrek.key 2>/dev/null
+rm -f starwars/starwars.key 2>/dev/null
+rm -f superg/superg.key 2>/dev/null
+rm -f superpac/superpac.key 2>/dev/null
+rm -f sxevious/sxevious.key 2>/dev/null
+rm -f tacscan/tacscan.key 2>/dev/null
+rm -f tapper/tapper.key 2>/dev/null
+rm -f tempest/tempest.key 2>/dev/null
+rm -f theend/theend.key 2>/dev/null
+rm -f timeplt/timeplt.key 2>/dev/null
+rm -f tp84/tp84.key 2>/dev/null
+rm -f tron/tron.key 2>/dev/null
+rm -f turpin/turpin.key 2>/dev/null
+rm -f turtles/turtles.key 2>/dev/null
+rm -f tutankhm/tutankhm.key 2>/dev/null
+rm -f uniwars/uniwars.key 2>/dev/null
+rm -f vanguard/vanguard.key 2>/dev/null
+rm -f venture/venture.key 2>/dev/null
+rm -f vulgus/vulgus.key 2>/dev/null
+rm -f wacko/wacko.key 2>/dev/null
+rm -f warlord/warlord.key 2>/dev/null
+rm -f warofbug/warofbug.key 2>/dev/null
+rm -f warpwarp/warpwarp.key 2>/dev/null
+rm -f wow/wow.key 2>/dev/null
+rm -f wwestern/wwestern.key 2>/dev/null
+rm -f xevious/xevious.key 2>/dev/null
+rm -f xeviousn/xevious.key 2>/dev/null
+rm -f xeviousn/xeviousn.key 2>/dev/null
+rm -f yard/yard.key 2>/dev/null
+rm -f yiear/yiear.key 2>/dev/null
+rm -f zaxxon/zaxxon.key 2>/dev/null
+rm -f zektor/zektor.key 2>/dev/null
+
+chown -R root.games /usr/local/lib/mame
+find /usr/local/lib/mame -type d -exec chmod 775 {} \;
+find /usr/local/lib/mame -type f -exec chmod 664 {} \;
+chmod 755 /usr/local/lib/mame/mov
+
+mv /usr/local/lib/mame/*.zip /usr/local/lib/mame/roms
SHAR_EOF
  $shar_touch -am 0202134898 'xmame/patches/patch-ae' &&
  chmod 0644 'xmame/patches/patch-ae' ||
  echo 'restore of xmame/patches/patch-ae failed'
  shar_count="`wc -c < 'xmame/patches/patch-ae'`"
  test 35839 -eq "$shar_count" ||
    echo "xmame/patches/patch-ae: original size 35839, current size $shar_count"
fi
# ============= xmame/patches/patch-af ==============
if test -f 'xmame/patches/patch-af' && test X"$1" != X"-c"; then
  echo 'x - skipping xmame/patches/patch-af (file already exists)'
else
  echo 'x - extracting xmame/patches/patch-af (text)'
  sed 's/^X//' << 'SHAR_EOF' > 'xmame/patches/patch-af' &&
diff -ruN ../../OLD/xmame-0.30.1/./src/cheat.c ./src/cheat.c
--- ../../OLD/xmame-0.30.1/./src/cheat.c	Thu Jan 22 02:54:49 1998
+++ ./src/cheat.c	Fri Jan 30 19:54:07 1998
@@ -192,7 +192,11 @@
X 
X /* Load the cheats for that game */
X /* Ex.: pacman:0:4e14:6:0:Infinite Lives  */
+#ifdef UNIX
+  if ((f = fopen("/usr/local/lib/mame/cheat.dat","r")) != 0){
+#else
X   if ((f = fopen("CHEAT.DAT","r")) != 0){
+#endif
X     for(;;){
X 
X       if(fgets(str,80,f) == NULL)
SHAR_EOF
  $shar_touch -am 0202134898 'xmame/patches/patch-af' &&
  chmod 0644 'xmame/patches/patch-af' ||
  echo 'restore of xmame/patches/patch-af failed'
  shar_count="`wc -c < 'xmame/patches/patch-af'`"
  test 461 -eq "$shar_count" ||
    echo "xmame/patches/patch-af: original size 461, current size $shar_count"
fi
# ============= xmame/patches/patch-ag ==============
if test -f 'xmame/patches/patch-ag' && test X"$1" != X"-c"; then
  echo 'x - skipping xmame/patches/patch-ag (file already exists)'
else
  echo 'x - extracting xmame/patches/patch-ag (text)'
  sed 's/^X//' << 'SHAR_EOF' > 'xmame/patches/patch-ag' &&
diff -ruN ../../OLD/xmame-0.30.1/./src/mame.c ./src/mame.c
--- ../../OLD/xmame-0.30.1/./src/mame.c	Thu Jan 22 02:33:40 1998
+++ ./src/mame.c	Fri Jan 30 19:54:07 1998
@@ -93,6 +93,25 @@
X {
X 	int i,j,list,help,log,success;  /* MAURY_BEGIN: varie */
X 
+#ifdef UNIX
+	/* This will make the xmame process run at full tilt, at the exclusion
+	 * of all other processes on the system.  It may be needed if your
+	 * system is a particularly slow one.  Xmame is very frustrating to
+	 * play on my old 486DX4/133 without this hack, for example.  (It runs
+	 * fine on my Pentium/133 without it.)  The only way this will have
+	 * any effect is if the xmame binary is setuid to root, so if you
+	 * don't want this hack, you don't need to recompile, just don't make
+	 * it setuid root.  Yes, I know, setuid root programs are bad, security
+	 * risks, etc. but the only thing I do while setuid is to run the
+	 * nice() syscall [sets process priority to be very high], then I
+	 * "revoke" my root privileges and make it a normal process.
+	 */
+	if (geteuid() == 0)  {		/* are we running setuid root? */
+		nice(-20);		/* yes: make it run full tilt */
+		seteuid(getuid());	/* get rid of our root privileges */
+	}
+#endif	/* UNIX */
+
X 	list = 0;
X 	log = 0;
X 	
SHAR_EOF
  $shar_touch -am 0202134898 'xmame/patches/patch-ag' &&
  chmod 0644 'xmame/patches/patch-ag' ||
  echo 'restore of xmame/patches/patch-ag failed'
  shar_count="`wc -c < 'xmame/patches/patch-ag'`"
  test 1254 -eq "$shar_count" ||
    echo "xmame/patches/patch-ag: original size 1254, current size $shar_count"
fi
# ============= xmame/patches/patch-ah ==============
if test -f 'xmame/patches/patch-ah' && test X"$1" != X"-c"; then
  echo 'x - skipping xmame/patches/patch-ah (file already exists)'
else
  echo 'x - extracting xmame/patches/patch-ah (text)'
  sed 's/^X//' << 'SHAR_EOF' > 'xmame/patches/patch-ah' &&
diff -ruN ../../OLD/xmame-0.30.1/./src/unix/FREEBSD.c ./src/unix/FREEBSD.c
--- ../../OLD/xmame-0.30.1/./src/unix/FREEBSD.c	Thu Jan  1 17:31:13 1998
+++ ./src/unix/FREEBSD.c	Fri Jan 30 19:54:07 1998
@@ -10,7 +10,8 @@
X #include "sound.h"
X 
X #ifdef USE_JOYSTICK
-#include <linux/joystick.h>
+#include <machine/joystick.h>
+#define JS_DATA_TYPE joystick
X struct 	 JS_DATA_TYPE joy_data,joy_orig;
X int	 joy_fd; /* joystick file descriptor */
X #endif
SHAR_EOF
  $shar_touch -am 0202134898 'xmame/patches/patch-ah' &&
  chmod 0644 'xmame/patches/patch-ah' ||
  echo 'restore of xmame/patches/patch-ah failed'
  shar_count="`wc -c < 'xmame/patches/patch-ah'`"
  test 445 -eq "$shar_count" ||
    echo "xmame/patches/patch-ah: original size 445, current size $shar_count"
fi
# ============= xmame/patches/patch-ai ==============
if test -f 'xmame/patches/patch-ai' && test X"$1" != X"-c"; then
  echo 'x - skipping xmame/patches/patch-ai (file already exists)'
else
  echo 'x - extracting xmame/patches/patch-ai (text)'
  sed 's/^X//' << 'SHAR_EOF' > 'xmame/patches/patch-ai' &&
diff -ruN ../../OLD/xmame-0.30.1/./src/unix/devices.c ./src/unix/devices.c
--- ../../OLD/xmame-0.30.1/./src/unix/devices.c	Thu Jan 29 02:58:38 1998
+++ ./src/unix/devices.c	Fri Jan 30 19:54:07 1998
@@ -64,7 +64,12 @@
X #include <machine/joystick.h>
X extern struct joystick joy_data,joy_orig;
X #else
+#ifdef FREEBSD
+#include <machine/joystick.h>
+#define JS_DATA_TYPE joystick
+#else
X #include <linux/joystick.h>
+#endif
X extern struct JS_DATA_TYPE joy_data,joy_orig;
X #endif
X 
SHAR_EOF
  $shar_touch -am 0202134898 'xmame/patches/patch-ai' &&
  chmod 0644 'xmame/patches/patch-ai' ||
  echo 'restore of xmame/patches/patch-ai failed'
  shar_count="`wc -c < 'xmame/patches/patch-ai'`"
  test 477 -eq "$shar_count" ||
    echo "xmame/patches/patch-ai: original size 477, current size $shar_count"
fi
# ============= xmame/patches/patch-aj ==============
if test -f 'xmame/patches/patch-aj' && test X"$1" != X"-c"; then
  echo 'x - skipping xmame/patches/patch-aj (file already exists)'
else
  echo 'x - extracting xmame/patches/patch-aj (text)'
  sed 's/^X//' << 'SHAR_EOF' > 'xmame/patches/patch-aj' &&
diff -ruN ../../OLD/xmame-0.30.1/./src/zipfiles/Makefile ./src/zipfiles/Makefile
--- ../../OLD/xmame-0.30.1/./src/zipfiles/Makefile	Thu Jan  1 17:37:06 1998
+++ ./src/zipfiles/Makefile	Fri Jan 30 19:54:07 1998
@@ -30,6 +30,7 @@
X 
X $(TRG):	$(ZOBJS)
X 	ar -rcv $@ $(ZOBJS)
+	ranlib $@
X 
X $(OBJDIR)/%.o: %.c
X 	$(CC) $(DEFS) -I../../src/ $(MS) $(JS) $(CFLAGS) -o $@ -c $<
SHAR_EOF
  $shar_touch -am 0202134898 'xmame/patches/patch-aj' &&
  chmod 0644 'xmame/patches/patch-aj' ||
  echo 'restore of xmame/patches/patch-aj failed'
  shar_count="`wc -c < 'xmame/patches/patch-aj'`"
  test 367 -eq "$shar_count" ||
    echo "xmame/patches/patch-aj: original size 367, current size $shar_count"
fi
# ============= xmame/patches/patch-ak ==============
if test -f 'xmame/patches/patch-ak' && test X"$1" != X"-c"; then
  echo 'x - skipping xmame/patches/patch-ak (file already exists)'
else
  echo 'x - extracting xmame/patches/patch-ak (text)'
  sed 's/^X//' << 'SHAR_EOF' > 'xmame/patches/patch-ak' &&
diff -ruN ../../OLD/xmame-0.30.1/./src/zipfiles/uzipsupp.c ./src/zipfiles/uzipsupp.c
--- ../../OLD/xmame-0.30.1/./src/zipfiles/uzipsupp.c	Sun Jan 11 05:32:16 1998
+++ ./src/zipfiles/uzipsupp.c	Fri Jan 30 19:54:07 1998
@@ -23,7 +23,9 @@
X #if (( ! defined NETBSD ) && ( ! defined FREEBSD ) \
X     && ( ! defined linux_alpha ) && (__GNU_LIBRARY__ < 6) \
X     || (defined PEDANTIC))
+#ifndef FREEBSD
X extern char   *sys_errlist[];
+#endif
X #endif
X 
X #include "uzipsupp.h"
SHAR_EOF
  $shar_touch -am 0202134898 'xmame/patches/patch-ak' &&
  chmod 0644 'xmame/patches/patch-ak' ||
  echo 'restore of xmame/patches/patch-ak failed'
  shar_count="`wc -c < 'xmame/patches/patch-ak'`"
  test 468 -eq "$shar_count" ||
    echo "xmame/patches/patch-ak: original size 468, current size $shar_count"
fi
# ============= xmame/patches/patch-al ==============
if test -f 'xmame/patches/patch-al' && test X"$1" != X"-c"; then
  echo 'x - skipping xmame/patches/patch-al (file already exists)'
else
  echo 'x - extracting xmame/patches/patch-al (text)'
  sed 's/^X//' << 'SHAR_EOF' > 'xmame/patches/patch-al' &&
diff -ruN ../../OLD/xmame-0.30.1/./src/unix/sound.c ./src/unix/sound.c
--- ../../OLD/xmame-0.30.1/./src/unix/sound.c	Sun Jan 11 05:32:16 1998
+++ ./src/unix/sound.c	Fri Jan 30 19:54:07 1998
X
@@ -250,13 +250,15 @@
X 
X void osd_set_mastervolume(int volume)
X {
-	int channel;
+	int channel, myvolume = volume;
X 	float old_master_volume_divider;
X 	
X 	if (! play_sound ) return;
X 	
X         old_master_volume_divider=master_volume_divider;
-        master_volume_divider=(float)256 * 100 / volume;
+	/* printf("%f %f %d\n", old_master_volume_divider, master_volume_divider, volume); */
+	if (myvolume == 0)  { myvolume = 1; }
+        master_volume_divider=(float)256 * (float)100 / (float)myvolume;
X         
X 	for (channel=0; channel < AUDIO_NUM_VOICES; channel++) {
X 	   SAMPLE_T *pt=voices[channel].sample;
SHAR_EOF
  $shar_touch -am 0202134898 'xmame/patches/patch-al' &&
  chmod 0644 'xmame/patches/patch-al' ||
  echo 'restore of xmame/patches/patch-al failed'
  shar_count="`wc -c < 'xmame/patches/patch-al'`"
  test 805 -eq "$shar_count" ||
    echo "xmame/patches/patch-al: original size 805, current size $shar_count"
fi
# ============= xmame/patches/patch-ad ==============
if test -f 'xmame/patches/patch-ad' && test X"$1" != X"-c"; then
  echo 'x - skipping xmame/patches/patch-ad (file already exists)'
else
  echo 'x - extracting xmame/patches/patch-ad (text)'
  sed 's/^X//' << 'SHAR_EOF' > 'xmame/patches/patch-ad' &&
diff -ruN ../../OLD/xmame-0.30.1/./makefile.unix ./makefile.unix
--- ../../OLD/xmame-0.30.1/./makefile.unix	Thu Jan 29 04:21:09 1998
+++ ./makefile.unix	Fri Jan 30 20:03:48 1998
@@ -36,18 +36,18 @@
X # GNU MAKE is MANDATORY !!!
X # so please give me the path...
X # if GNU make is "native" use this
-MAKE	= make
+MAKE	= gmake
X # else ...
X # MAKE=/usr/people/jantonio/bin/gmake
X 
X # *** Choose your compiler
X # 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
X #
X # Some OS either libs are not ANSI-Compliant. If previous line fails, please
X # use next and report me item, to add to README.UNIX file
X #
-# CC	= gcc
+CC	= gcc
X # for IRIX systems seems that DCC gets better code than GNU. so use it:
X # CC	= DCC
X #
@@ -58,14 +58,14 @@
X 
X # *** Choose your linker ( some OS's needs native linker instead GNU one )
X # normal
-# LD	= $(CC) -s
+LD	= $(CC) -s
X # to profile with gcc and gprof
X # LD	= $(CC) -pg
X # no profiling (less strace output)
-LD	= $(CC)
+# LD	= $(CC)
X 
X # *** How to install executable? ( some OS's doesn't support install command )
-INSTALL = cp
+INSTALL = install
X 
X # *** set to aproppiate flag if want to debug/optimize
X DBGFLAGS =
@@ -75,8 +75,8 @@
X # OPTFLAGS    = -O2 -m486 -Wall
X ### to get full optimization under gcc/x Intel based OS's.. ( !!else comment!! )
X OPTFLAGS     = -O3 -m486 -Wall -Wno-parentheses -funroll-loops \
-  -fstrength-reduce -fomit-frame-pointer -ffast-math -malign-functions=2 \
-  -malign-jumps=2 -malign-loops=2
+  -fstrength-reduce -fomit-frame-pointer -ffast-math -malign-functions=4 \
+  -malign-jumps=4 -malign-loops=4
X ### for Linux/X11/PowerPC use following opts
X # OPTFLAGS     = -O3 -Wall -Wno-parentheses -funroll-loops \
X #  -fstrength-reduce -fomit-frame-pointer -ffast-math -fsigned-char
@@ -84,8 +84,8 @@
X # *** Does your compiler supports inline funcs?. use appropiate item:
X # do not use IL = inline : wont work due to Z80 and 6809 stuffs
X # if strict ansi used set IL to "static"
-# IL	= '-DINLINE=static inline'
-IL     = -DINLINE=static
+IL	= '-DINLINE=static inline'
+# IL     = -DINLINE=static
X 
X ##############################################################################
X # *** Capabilities
@@ -108,13 +108,13 @@
X # and choose polling method ( event processing or device polling )
X # use provided program "xlistdev" to now available ones
X # and dont forget to include library in linker definition !!
-#JS	= -DX11_JOYSTICK
-JSNAME = \"Joystick\"
-# JSPOLL  = -DUSE_X11_JOYEVENTS
-# JSLIB   = -lXi
+JS	= -DX11_JOYSTICK
+JSNAME = \"joy0\"
+JSPOLL  = -DUSE_X11_JOYEVENTS
+JSLIB   = -lXi
X 
X # On iX86 based OS's, if supported, you can use standard joystick driver
-JS	= -DI386_JOYSTICK
+# JS	= -DI386_JOYSTICK
X 
X # Linux FM-TOWNS game PAD joystick emulation support
X # Thanks to Osamu Kurati for provided patch
@@ -139,8 +139,8 @@
X # this item. Warnning: beta , not tested nor working in all configurations
X # if you want to try dirty_line refresh strategy use -DDIRTY_RFSH too
X DIRTY	= -DUSE_DIRTY -DDIRTY_RFSH
-#DIRTY  = -DUSE_DIRTY
-#DIRTY  =
+# DIRTY  = -DUSE_DIRTY
+# DIRTY  =
X 
X # *** Does your system support gettimeofday() function? If do, we encourage you
X # to enable this feature . Else .... comment it :-(
@@ -156,8 +156,8 @@
X # *** where does your X11 source tree resides ?? use aproppiate switch 
X 
X # standard location for X11 
-X11INC		= -I/usr/include/X11
-X11LIB		= -L/usr/lib/X11
+# X11INC		= -I/usr/include/X11
+# X11LIB		= -L/usr/lib/X11
X # standard location for XFree86
X X11INC		= -I/usr/X11R6/include
X X11LIB		= -L/usr/X11R6/lib
@@ -175,18 +175,22 @@
X # *** Select destination directory for your compiled program , manual page
X # and binary distribution ( if you want to... )
X # ( only needed to install, not to compile... )
-DESTDIR = /usr/games
-MANDIR = /usr/local/man/man6
+DESTDIR = ${PREFIX}/bin
+MANDIR = ${PREFIX}/man/man6
X DISTDIR = /home/ftp/pub/emulators/mame
X 
+# where to put the docs and the libraries
+DOCDIR = ${PREFIX}/lib/mame
+LIBDIR = ${PREFIX}/lib/mame
+
X # *** Where the ROM source tree ?
-MDIR = \"/usr/games/lib/mame\"
+MDIR = \"${PREFIX}/lib/mame\"
X 
X # *** Where to store high scores ?
-SDIR = \"/usr/games/lib/mame\"
+SDIR = \"${PREFIX}/lib/mame/hi\"
X 
X # *** Where resides global configuration file ?
-MRC = \"/usr/games/lib/mame/xmamerc\"
+MRC = \"${PREFIX}/lib/mame/xmamerc\"
X 
X # *** Use this definition as default X Display
X DP = \":0.0\"
@@ -209,13 +213,16 @@
X # timer based audio code and ajust in src/unix/sound.h AUDIO_TIMER_FREQ item
X #
X # DONTUSE_TIMER is mandatory for SVGALIB -else you'll get a compile error-
-S_TIM = -DDONTUSE_TIMER
+# S_TIM = -DDONTUSE_TIMER
X # S_TIM = -DUSE_TIMER
+S_TIM =
+
X 
X # *** When using timer, you should provide the frequency to generate audio sample
X # frames in your system. See readme.unix notes about these item
X #
-S_AFR =	-DAUDIO_TIMER_FREQ=50
+# S_AFR =	-DAUDIO_TIMER_FREQ=50
+S_AFR =
X 
X # Dont modify next line !!
X SOUND_OPTS = $(S_LIN) $(S_TIM) $(S_AFR)
@@ -232,13 +239,13 @@
X ######## Alpha/Linux/X11
X # ARCH  = linux_alpha
X ######## ix86/Linux/X11
-ARCH  = linux
+# ARCH  = linux
X ######## ix86/Linux/SVGALIB
X # ARCH	= svgalib
X ######## ix86/Linux/GGI *New* *New* *New* Please test - no mouse or joy yet
X # ARCH  = ggi
X ######## ix86/FreeBSD/X11 and ix86/BSDi/X11
-# ARCH  = FREEBSD
+ARCH  = FREEBSD
X ######## ix86/NetBSD/X11
X # ARCH  = netbsd_i386
X ######## Sparc/SunOS/X11 ( no sound )
@@ -646,18 +653,38 @@
X obj/I86/I86.o:		src/I86/I86.c src/I86/I86.h \
X 			src/I86/instr.h
X 
-install: install-bin install-man
+install: install-dirs install-bin install-man install-extra
X 	@echo X-Mame $(VERSION) for $(ARCH) installation completed
X 
+install-dirs:
+	@echo "making all directories..."
+	-mkdir -p ${DESTDIR} ${MANDIR} $[DOCDIR} ${LIBDIR} \
+		${LIBDIR}/cfg ${LIBDIR}/hi ${LIBDIR}/roms ${LIBDIR}/samples
+
X install-bin: $(INST.$(ARCH)) xmame.$(ARCH)
X 
X install-man:
X 	@echo installing manual pages under $(MANDIR) ...
-	$(INSTALL) doc/xmame.man $(MANDIR)/xmame.6
+	mkdir -p ${MANDIR}
+	$(INSTALL) -c -o bin -g bin -m 444  doc/xmame.man $(MANDIR)/xmame.6
+
+install-extra:
+	${INSTALL} -c -o bin -g bin -m 444 doc/cheat.dat ${DOCDIR}
+	${INSTALL} -c -o bin -g bin -m 444 README.port ${DOCDIR}
+	mkdir -p ${LIBDIR}
+	mkdir -p ${LIBDIR}/cfg
+	mkdir -p ${LIBDIR}/hi
+	mkdir -p ${LIBDIR}/roms
+	mkdir -p ${LIBDIR}/samples
+	chown -R root.games ${LIBDIR}
+	chmod -R g+w ${LIBDIR}
+	${INSTALL} -c -o root -g games -m 111 mov ${LIBDIR}/mov
+	${INSTALL} -c -o root -g games -m 111 conv2zip ${LIBDIR}/conv2zip
X 
X doinstall:
X 	@echo installing binaries under $(DESTDIR)...
-	$(INSTALL) xmame.$(ARCH) $(DESTDIR)/xmame
+	mkdir -p ${DESTDIR}
+	$(INSTALL) -c -o root -g games -m 2111 xmame.$(ARCH) $(DESTDIR)/xmame
X 
X # Every SVGALIB-based software must be run setuid. Beware security !!!
X doinstallsvgalib:
SHAR_EOF
  $shar_touch -am 0202134898 'xmame/patches/patch-ad' &&
  chmod 0644 'xmame/patches/patch-ad' ||
  echo 'restore of xmame/patches/patch-ad failed'
  shar_count="`wc -c < 'xmame/patches/patch-ad'`"
  test 6897 -eq "$shar_count" ||
    echo "xmame/patches/patch-ad: original size 6897, current size $shar_count"
fi
# ============= xmame/files/dos2unx ==============
if test ! -d 'xmame/files'; then
  echo 'x - creating directory xmame/files'
  mkdir 'xmame/files'
fi
if test -f 'xmame/files/dos2unx' && test X"$1" != X"-c"; then
  echo 'x - skipping xmame/files/dos2unx (file already exists)'
else
  echo 'x - extracting xmame/files/dos2unx (text)'
  sed 's/^X//' << 'SHAR_EOF' > 'xmame/files/dos2unx' &&
#!/bin/sh
#
# dos2unx file [file...]
#
# Converts text files (names specified on command line) from MS-DOS
# format to UNIX format.  Essentially, gets rid of all newlines (\n),
# since linefeeds (\l) are all it needs.
X
if [ $# -lt 1 ]
then
X	echo usage: dos2unx file [file ...]
X	exit 1
fi
X
for FILE
do
X	echo -n "dos2unx: converting ${FILE} ... "
X	tr -d '\r' < ${FILE} > /tmp/conv$$
X	rm -f ${FILE}
X	cp -f /tmp/conv$$ ${FILE}
X	rm -f /tmp/conv$$
X	echo "done"
done
SHAR_EOF
  $shar_touch -am 0202134898 'xmame/files/dos2unx' &&
  chmod 0644 'xmame/files/dos2unx' ||
  echo 'restore of xmame/files/dos2unx failed'
  shar_count="`wc -c < 'xmame/files/dos2unx'`"
  test 460 -eq "$shar_count" ||
    echo "xmame/files/dos2unx: original size 460, current size $shar_count"
fi
# ============= xmame/files/md5 ==============
if test -f 'xmame/files/md5' && test X"$1" != X"-c"; then
  echo 'x - skipping xmame/files/md5 (file already exists)'
else
  echo 'x - extracting xmame/files/md5 (text)'
  sed 's/^X//' << 'SHAR_EOF' > 'xmame/files/md5' &&
MD5 (xmame-0.30.1_src.tgz) = 3cfea645f0edceffb3fa4ef7cffa39c1
SHAR_EOF
  $shar_touch -am 0202134898 'xmame/files/md5' &&
  chmod 0644 'xmame/files/md5' ||
  echo 'restore of xmame/files/md5 failed'
  shar_count="`wc -c < 'xmame/files/md5'`"
  test 62 -eq "$shar_count" ||
    echo "xmame/files/md5: original size 62, current size $shar_count"
fi
# ============= xmame/pkg/PLIST ==============
if test ! -d 'xmame/pkg'; then
  echo 'x - creating directory xmame/pkg'
  mkdir 'xmame/pkg'
fi
if test -f 'xmame/pkg/PLIST' && test X"$1" != X"-c"; then
  echo 'x - skipping xmame/pkg/PLIST (file already exists)'
else
  echo 'x - extracting xmame/pkg/PLIST (text)'
  sed 's/^X//' << 'SHAR_EOF' > 'xmame/pkg/PLIST' &&
bin/xmame
lib/mame/CHEAT.DOC
lib/mame/Changes
lib/mame/MailList.notes
lib/mame/README.port
lib/mame/README.unix
lib/mame/cheat.dat
lib/mame/conv2zip
lib/mame/mamelist.txt
lib/mame/mov
lib/mame/readme.txt
lib/mame/whatsnew.txt
man/man6/xmame.6.gz
@dirrm lib/mame
SHAR_EOF
  $shar_touch -am 0202134898 'xmame/pkg/PLIST' &&
  chmod 0644 'xmame/pkg/PLIST' ||
  echo 'restore of xmame/pkg/PLIST failed'
  shar_count="`wc -c < 'xmame/pkg/PLIST'`"
  test 262 -eq "$shar_count" ||
    echo "xmame/pkg/PLIST: original size 262, current size $shar_count"
fi
# ============= xmame/pkg/MESSAGE ==============
if test -f 'xmame/pkg/MESSAGE' && test X"$1" != X"-c"; then
  echo 'x - skipping xmame/pkg/MESSAGE (file already exists)'
else
  echo 'x - extracting xmame/pkg/MESSAGE (text)'
  sed 's/^X//' << 'SHAR_EOF' > 'xmame/pkg/MESSAGE' &&
X
*** PLEASE READ THE FILE ``/usr/local/lib/mame/README.port''
*** BEFORE USING THIS PORT.  Thank you.
X
SHAR_EOF
  $shar_touch -am 0202134898 'xmame/pkg/MESSAGE' &&
  chmod 0644 'xmame/pkg/MESSAGE' ||
  echo 'restore of xmame/pkg/MESSAGE failed'
  shar_count="`wc -c < 'xmame/pkg/MESSAGE'`"
  test 103 -eq "$shar_count" ||
    echo "xmame/pkg/MESSAGE: original size 103, current size $shar_count"
fi
# ============= xmame/pkg/DESCR ==============
if test -f 'xmame/pkg/DESCR' && test X"$1" != X"-c"; then
  echo 'x - skipping xmame/pkg/DESCR (file already exists)'
else
  echo 'x - extracting xmame/pkg/DESCR (text)'
  sed 's/^X//' << 'SHAR_EOF' > 'xmame/pkg/DESCR' &&
XX-Mame 0.30.1 is an emulator.  It emulates many classic coin-operated arcade
game machines, right on your FreeBSD PC.
X
This emulator supports over 200 arcade games, and the nunmber grows every
day!  A partial list of the (more popular and well-known) games currently
supported by this emulator include:
X
PacMan, Ms. PacMan, Jr. PacMan, Super PacMan, Dig Dug, Star Trek, Galaga,
Space Invaders, Tempest, Frogger, Mr. Do!, Battle Zone, Missile Command,
Asteroids, Burger Time, Centipede, Millipede, Gorf, Donkey Kong, Donkey
Kong III, Donkey Kong Jr., Mario Bros., Defender, Stargate, Galaxians,
Gyruss, Kangaroo, Moon Patrol, Phoenix, Q*Bert, Rally X, Robotron,
Star Wars, Zaxxon, ... you get the idea.
X
To run these games, however, you will need images of the ROM chips that
are used on these games.  If you actually have one of these games (or the
motherboard to one of them), and access to a ROM burner, it is a fairly
trivial process to make ROM image files for use with MAME.  If you DON'T
have access to a ROM burner, or you don't own one of these video games
(and you are aware of the possible legal ramifications of doing this),
you can obtain ROM images for MAME on the Net.
X
[ This port is maintained by Donald Burr <dburr@POBoxes.com>. ]
SHAR_EOF
  $shar_touch -am 0202134898 'xmame/pkg/DESCR' &&
  chmod 0644 'xmame/pkg/DESCR' ||
  echo 'restore of xmame/pkg/DESCR failed'
  shar_count="`wc -c < 'xmame/pkg/DESCR'`"
  test 1248 -eq "$shar_count" ||
    echo "xmame/pkg/DESCR: original size 1248, current size $shar_count"
fi
# ============= xmame/pkg/COMMENT ==============
if test -f 'xmame/pkg/COMMENT' && test X"$1" != X"-c"; then
  echo 'x - skipping xmame/pkg/COMMENT (file already exists)'
else
  echo 'x - extracting xmame/pkg/COMMENT (text)'
  sed 's/^X//' << 'SHAR_EOF' > 'xmame/pkg/COMMENT' &&
Emulator that emulates many classic arcade game machines
SHAR_EOF
  $shar_touch -am 0202134898 'xmame/pkg/COMMENT' &&
  chmod 0644 'xmame/pkg/COMMENT' ||
  echo 'restore of xmame/pkg/COMMENT failed'
  shar_count="`wc -c < 'xmame/pkg/COMMENT'`"
  test 57 -eq "$shar_count" ||
    echo "xmame/pkg/COMMENT: original size 57, current size $shar_count"
fi
exit 0
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199802090247.SAA06684>