wiki:howto/Mame

MAME

MAME is an open source emulator built to recreate the hardware of old arcade games on your modern computer. The main focus is on documenting the old hardware and the heritage of old arcade games in order to avoid that they will be forgotten. To get further information on the project, you can check the documentation.

Installing MAME

sudo port install mame 

Configuring MAME

Once the port is successfully installed, you'll have an executable called mame. To be able to run the ROMs, you need to build the right filesystem tree in a directory. What I generally do is to create a directory in my home directory called mame:

mkdir ~/mame

Go inside that directory:

cd ~/mame

and run the mame executable inside of it. MAME will run full screen and it will create a folder inside of ~/mame called cfg. That is the folder where MAME stores the configuration files. In the MAME initial dashboard you won't see much for the moment...

mame initial screenshot

Let's add a game to the list. Generally, to play the most famous titles, you'll need a specific BIOS, i.e. a proprietary set of instructions that are specific to a certain hardware. For example, to run NeoGeo games, you'll need the last release of the NeoGeo BIOS whose file is called neogeo.zip. The problem with these kinds of BIOSes is that in general they're under copyright and you're not allowed to run them. So to start, we'll try to use one of the ROMs offered on the official dev website of MAME. They're free for non-commercial use.

Let's try Alien Arena.

Running a ROM

  • First download the ROM of the game alienar.zip.
  • Then create the folder that will store our ROMs: mkdir ~/mame/roms.
  • Then move the Alien Arean ROMs inside this directory: mv ~/Downloads/alienar.zip ~/mame/roms
  • Then run mame within the ~/mame directory.

mame screenshot with Alien Arena Game

As you can see we finally have the game. Let's try to run it by pressing Enter.

game splashscreen

We are in the initial splash screen of the game. Cool! To actually start the game, you need to insert coins. In order to do that, you have to use keyboard keys 5 or 6 to add coins for the 1st or 2nd player respectively. Then you can use the keyboard arrows to move around, and the keys control and option correspond to the first two buttons of the arcade cabinet. You can find further information on the keys here.

playing the game

Adding more material to a ROM

You can add original artwork and screen snapshots of the game such that you can see from the MAME dashboard which game you are navigating into. There are several websites offering such files, one of which is Progetto-Snaps. It was born to provide snapshots, but nowadays you can find whatever resource you want and you can download them in bulk.

We'll instead use my ugly screenshot just above. Take that image, rename it with the same name of the game ROM—in our case alienar.png—and put it in the folder snap (create it first) within our root folder mame.

mkdir ~/mame/snap
mv alienar.png ~/mame/snap

And now have the snapshot in your MAME dashboard.

There's more to add, like the artwork (in the artwork folder). You can explore and configure your MAME installation as you wish. Here you can find more information about the directory tree and what all you can add.

Last modified 7 months ago Last modified on Oct 14, 2021, 6:05:11 PM

Attachments (5)

Download all attachments as: .zip