Mini XMame Howto

October 8th, 2006

Because 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.

Error Screen Info Screen

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.

Title Screen

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.

In Game

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

Scaled

…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.

Gens command line parameters

August 30th, 2006

Following a post on my forum, and noticing several searches referred from google with gens+command+line in them this may help quite a few people trying to get gens to launch from the command line in linux.

In my emenulate page I mention I hacked my way around the command line parameters. I’m no expert C programmer so “hack” is an appropriate term! I’ve sourced the original code from portage, gentoo’s package management system, which I think is this on sourceforge, but I’m not 100% sure.

I made the changes about 15 months ago, so please forgive me for not remembering exactly what I’ve modified. The changes allow you to load a ROM up on the command line (–rompath switch and filename at the end), specify that you want Escape to quit you out immediately (–quickexit, handy for Mame cabinets), and that you want it to start fullscreen without the GUI (–fs).

Example,
gens --rompath ~/.gens/roms/ --quickexit --fs Sonic.BIN

Click here to download the sourcecode for my patched version of gens.

To build and install, extact the tar.gz and from the GensForLinux folder run

./configure
make
make install (as su)
make clean

gens will now be installed as /usr/local/bin/gens

Megadrive

UPDATE 19/05/2007 : This code has now been patched in to the Gens for Linux - MythGame Edition project at http://mythtv.wbond.net/gens_for_linux_mythgame_edition/.

xoops gameserver plugin 0.3 released

June 17th, 2006

I’ve added warsow to the gameserver plugin for xoops. It can be downloaded here.

I’ve also given the entire xoops-gameserver-plugin section a facelift. In it you will find instructions on how to install, upgrade, add new games using one of the supported protocols, and add map thumbnails.

Worm God - The Resurrection

June 4th, 2006

I used to run a website dedicated to the game Worms. Recently I found some of the levels I created for Worms Reinforcements, so went searching for other custom content and programs I created for it. These are now available for download in the Worm God - Downloads section.

Batch Image Conversion - batchconvert.py

April 26th, 2006

The ImageMagick “convert” program is a pretty handy command line utility for converting images. From Linux I wanted to be able to convert a whole bunch of images on a per folder basis and write them out to a spearate thumbnails folder, so I wrote this script to do the work for me.

Download batchconvert.py here

It’s simple to use, just make sure it’s chmod +x and call it from the command line.


brian@localhost ~ $ bin/batchconvert.py
batchconvert.py v0.1
This program is a wrapper for ImageMagick "convert" - http://www.imagemagick.org

Usage : batchconvert.py [convert parameters]
- folder containing source images
- filetype extension, eg, jpg
- folder to place converted files in
- filetype extension, eg, png
- convert parameters exc [file] (See convert –help)

eg, batchconvert.py images jpg thumbs png -scale 25%
This will convert images/*.jpg to thumbs/*.png scaling to 25% of the original size

brianhearn.com online

April 10th, 2006

The old site was neglected, looked rubbish and was very specific to one of my projects. So, I’ve started afresh using the wordpress blogging software, simply because I saw that http://fox.gentoo-clan.org/ was using it… which incidentally is the new home of GFE.