From wikiPodLinux

The title of this article should be iPodMame. The initial letter is capitalized due to technical limitations.

This is a Port of MAME (http://www.mame.net) v0.18 to the iPod. A list of working roms is available here.

For discussion, please refer to the forum topic: http://ipodlinux.org/forums/viewtopic.php?p=53583

Table of contents





5g (320x240)Nano (176x132)

BleuLlama has put up some screenshots of it running on his Nano in his gallery here:


BleuLlama is also working on some Nano-sized arcade cabinets, and graphics rom hacks to get it looking better on the tiny screen. He's got a web page about the project which you can check out here:


Current Status

Currently, iPod Mame runs on Nano and 5g ("Video") hardware. Due to some strange video driver bug, iPod Color/Photo hardware does not work. Monochrome iPods are untested, and probably won't work correctly... who knows.

The known tested, working romsets are available here. Rom files are also listed in the 'romlist.ipl.txt' file within the package.


The current control mapping for Pac-Man and Pengo are as follows:

hold .............. switch to alternate menu
menu .............. left
next .............. up
prev .............. down
play .............. right
action ............ push / fire

Flipping the 'hold' switch will change input modes. There can be up to three alternate input setups. They are signified by a blinking square in one corner of the display.

For the default setup, only the GREEN and RED input banks are used. GREEN is used for extra inputs, while RED is used for system-level control, and are set up as follows:

       menu .............. player 2 start
       next .............. player 2 coin drop
       prev .............. player 1 coin drop
       play .............. player 1 start
       action ............ exit back to standard input bank
       hold .............. switch to RED input bank
       menu .............. quit from iPod Mame
       next .............. exit back to standard input bank
       prev .............. exit back to standard input bank
       play .............. reset emulation
       action ............ exit back to standard input bank
       hold .............. switch to GREEN input bank

The ipodmame.ini file along with this distribution is documented decently enough that you should be able to figure out the format and how to use it.

There's a new setting in the ini file as of release 05, which uses an internal input mechanism rather than the new config file version. Some iPods seem to have trouble with the new mechanism, so this was put back into the release. By default, with the new .ini file, or if no ini file is found, this is enabled. Read the .ini and readme files for more information about how to en/disable this. This internal input scheme is the same for the regular control mappings. The Alternate (blinking pixel) input scheme is defined as follows:

   Alternate input:
       menu .............. exit
       next .............. reset emulation
       prev .............. player 1 coin drop
       play .............. player 1 start
       action ............ switch back to base input scheme (above)


Another change from the regular version of MAME is the use of symlinks for the filename. If you go into the ipodmame directory, you can run a specific game with a shell script like so:

mame pengo

or, you can make a symlink instead like so:

ln -s mame mame-pengo

the basic syntax is: "mame-[gamename]"

This will let you have lots of symlinks, each for a specific supported game, rather than shell scripts. Either way works.

Usage with Loader2

One way that you can launch ipodmame is via loader2/loader2args. Once you have those loaded and configured for your iPod, you can extract some information from this section to properly suit your needs.

First of all, we'll need to edit the loader.cfg file on your iPod. This is the one that we're using:

backlight = 1
timeout = 10
default = 1

AppleOS RAM @ ramimg
iPodLinux @ (hd0,1)/linux.bin podzilla
Podzilla 0 @ (hd0,1)/linux.bin podzilla0
iDoom @ (hd0,1)/linux.bin /iDoom/run_doom
MAME Nibbler @ (hd0,1)/linux.bin /ipodmame/mame_nibbler
MAME Frogger @ (hd0,1)/linux.bin /ipodmame/mame_frogger
MAME Pengo @ (hd0,1)/linux.bin /ipodmame/mame_pengo
Sleep @ standby
Disk Mode @ diskmode

If you notice, the MAME entries have the exact path to the four shell scripts that run MAME. I'll get to those in a moment. The path for those can be whatever you want. If your ipodmame folder is in your MSDOS-FAT partition, then those lines would be something like:

MAME Nibbler @ (hd0,1)/linux.bin /mnt/ipodmame/mame_nibbler
MAME Frogger @ (hd0,1)/linux.bin /mnt/ipodmame/mame_frogger
MAME Pengo @ (hd0,1)/linux.bin /mnt/ipodmame/mame_pengo

And likewise, you can add entries for pac-man or mspacman, whatever.

Here is the mame_nibbler shell script:

cd /ipodmame/
./mame nibbler

Again, if you've got the files in the MSDOS Partition, you'll probably want something like:

cd /mnt/ipodmame/
./mame nibbler

The pengo script looks like this:

cd /ipodmame/
./mame pengo2u

And so on.

If these files are not on the MSDOS partition, if they're on the linux EXT partition, or if they're on an HFS partition, remember to make sure the execute flag is set on them via your start script, or via direct shell interaction like so:

chmod +x /path/to/your/ipod/ipodmame/mame_pengo
chmod +x /path/to/your/ipod/ipodmame/mame_nibbler
chmod +x /path/to/your/ipod/etc/rc

NOTE: for completeness sake, here's my "run_doom" script:

cd /iDoom


Do not ask where to download roms from. The proper way to get a romset is to take your arcade board, pop off the ROM chips, drop them in a Rom burner, and dump them into files. It is also gray, but okay to find roms on the net for games which you own. It is not legal to posess romsets for game boards/machines that you do not own!

There are a few free rom sets available on the net that are included in the svn.

The roms are kept in a directory named "roms", right next to the mame executable. On a typical installation, you might see something like this:

% cd ipodmame
% ls -F
READ_ME.TXT     readme.ipl.txt  roms/
mame            readme.txt      whatsnew.txt
% cd roms
% ls -F
hellopac/       matrxpac/       pacman/         pengo/

The rom directory names in there signify the name of the romset.

Rom filenames are based on modern MAME romsets, and not the 0.18 romset filenames you might expect to find. This was done to insure maximum compatibility, and ease of use.

Due to the unwieldly size that the list has become, the listing of expected rom filenames has been removed from this page. Please look at the "romlist.ipl.txt" file included with the distribution.

Getting the Source

The ipodmame source is stored in a Subversion repository, so you'll need the svn program to get it.

The development tools you need to build this are the same as for podzilla 2. You should have that toolset installed before proceeding.

When you retrieve it, make sure you're in the "tools" directory... the same as your 'hotdog', 'ttk' and 'podzilla', so that the 'hotdog' library can be linked in properly.

Here's the link to the repository:

% svn co http://opensvn.csie.org/ipodmame/

Or, you can just go there (http://opensvn.csie.org/ipodmame) and explore the source tree...

Once you have it, and you get a directory listing in that directory, you should see this:

% ls
README.txt      installer       ipodmame        pzconf          ucdl
SDL             iplsign         libipod         rawpod
armemu          ipodinfo        podfile         ttk
hotdog          ipodloader2     podzilla2       ttkzilla

Just be sure to build hotdog first before building ipodmame, as per its instructions.

original MAME 0.18 source:

Getting the Binary

The current version is release 07, made on July 19th, 2006.

Use at your own risk!

Binary: http://ipodlinux.org/images/1/1d/Ipodmame_bin_0.18.07.tar.gz

or, you can grab the .gz file from http://umlautllama.com/projects/iPod/ipodmame/

This includes two legal free romsets to get you started.


Obviously, extra special thanks go out to Nicola Salmoria and the MAME team for writing this software.

Personal tools