Thursday, December 16, 2010

How to compile mame in Ubuntu 10.04 Lucid Lynx

UPDATE: A newer guide is available at Compiling Mame on Ubuntu 14.04 Trusty Tahr.

Using the following instructions you should be able to compile Mame on Ubuntu 10.04 Lucid Lynx, though it should also work in most any other version of Ubuntu too.
  1. Download the latest source from Grab the .zip version. The following command will grab the latest source as of the time I wrote this tutorial.
    wget --user-agent="Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/20070725 Firefox/" -O
    Here we change the user/agent string, because the server is set to prevent robots, like wget, from programmatically downloading the file.
  2. Unzip the file, and then unzip that file. Place it anywhere you like, perhaps your home directory.
    mkdir mame
    unzip -d mame
  3. Next we install all the libraries and dependencies necessary to build mame.
    sudo aptitude install build-essential libgtk2.0-dev libgnome2-dev libsdl1.2-dev
  4. Finally, lets get to building it.
    cd mame
  5. Let's setup a rom folder and get some roms.
    mkdir roms
    cd roms
    wget --user-agent="Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/20070725 Firefox/"
  6. Now that we have legally obtained an arcade ROM, let's play it!
    cd ..

Once you know what libraries to install, compiling Mame from source is quite easy in Ubuntu. Drop me a line in the comments if this is helpful, or if you run into any problems or have any suggestions.