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@FreeBSD.ORG>

Enjoy the port!
