Mini XMame Howto
October 8th, 2006Because of my Emenulate Howto, a lot of referred traffic is from a search for “XMame+Howto”. I don’t know for sure what people are trying to do, so I’ll assume you’ve got it installed and now want to get a game up and running with it.
XMame is a command line utility. There are a number of front ends for it that you may find easier to use once you’ve grasped the basics, a couple of examples are KAF (Qt3) or GXMame (GTK).
XMame has a list of known games it will emulate. The list of games supported can be extracted to a text file called xmame.txt by using the following command. This list gets updated with each new version of XMame.
xmame -listfull > xmame.txt
If you open xmame.txt you will see a list with two columns, name and description. Each line represents a game (or variant of) and is referred to as a ROM.
In order to play one of the supported games you need to find yourself a copy of that ROM. ROM files are usually zip files, and have the filename listed in the name column. eg, The game “Gridlee” (which happens to be public domain) would be a file called gridlee.zip.
The simplest way to start a ROM in XMame is to call it specifying the name and path to the folder containing the ROM. For example if you had the ROM in ~/Mame/gridlee.zip, you would start it as follows.
xmame gridlee -rompath ~/Mame
Where “gridlee” is the name listed by -listfull (in the xmame.txt file generated above) and -rompath ~/Mame is the folder containing the ROM. It is NOT what the more intuitive call of “xmame gridless.zip” would be because some ROMS have dependencies on other roms so need to use the -rompath argument to find them also.
This starts it in a pretty rubbish window, and forces you to type OK and press any key to continue.

You can supress the information screen by using the -skip_gameinfo argument, however the error screen (which doesn’t appear on all ROMS) will remain.
xmame gridlee -rompath ~/Mame -skip_gameinfo
After continuing through the above screen, you are in to the game.

In order to start playing you need to “insert some coins” to get some credits. This is done by using the keys 5, 6, 7 or 8 for players 1 to 4. Once you have added some credits you start the game using keys 1, 2, 3 or 4 for players 1 to 4.
So for Gridlee, press 5 followed by 1.

The defaults keys for player 1 are the cursor keys for up, down, left and right. There are six fire buttons for player one, Left Ctrl, Left Alt, Space, Left Shift, Z & A. Most games use Left Ctrl, Left Alt and Space bar though.
Pressing Escape quits XMame straight away.
In order to get the game in a slightly more playable resolution you can use the arguments -widthscale and -heightscale.
xmame gridlee -rompath ~/Mame -skip_gameinfo -widthscale 2 -heightscale 2

…and use -fullscreen to go full screen.
xmame gridlee -rompath ~/Mame -skip_gameinfo -widthscale 2 -heightscale 2 -fullscreen
There is actually sound, however it’s very soft. To correct this use the -volume switch, which takes a value between -32 (for soft) to 0 (loudest). eg,
xmame gridlee -rompath ~/Mame -skip_gameinfo -widthscale 2 -heightscale 2 -volume 0
(If you are using gridlee, don’t expect a lot - it’s a bad example because there’s not a lot of sound ;))
This is by no means a comprehensive how to, but I hope it gives you the basic information to get you started with xmame. Unless you really require the command line for an arcade cabinet or similar, it’s probably best you use one of the front ends available, they handle most of the available parameters and hard work for you.
