Can't get MAME to work for Ubuntu

I have been trying to set up a computer to use as an arcade cabinet computer, but I can't figure out how to set up MAME and ROMs on it. I have installed MAME with

sudo apt-get install mame mame-tools gnome-video-arcade sdlmame sdlmame-tools

and I have set up all of the folders and made sure that the .ini file points to the correct ROM path. I downloaded a ROM from freeRoms and put it in the Rom folder still in a zip file. I started up mame by

mame

in the terminal, but when I do that it says "No games found. Please check the rompath specified in the mame.ini file." Could I please have help setting MAME up? I've done pretty much everything that I know how to do and it seems to me like I just have the wrong version of ROMS. I am open to re-installing everything if that would help. Thanks!


Ubuntu 13.04 onwards:

The default path for user roms changed in MAME v0.147 to ~/mame/roms, while settings are still at ~/.mame, so before changing any ini files, please first try putting a known-to-work ROM zip there and test it.

When you run mame for the first time, ~/mame or its roms subfolder may not be automatically created. So do this:

mkdir -p ~/mame/roms

Personally, instead of cluttering my top-level home dir and my small HOME partition with MAME and large ROMS, I usually choose to symlink it to my data partition ROMs folder:

ln -s /path/to/your/roms ~/mame/roms

You can also edit ~/.mame/mame.ini (note the leading dot, it's a hidden dir!) and set the location of all MAME-related data paths, or edit the global config /etc/mame/mame.ini for all users, including changing the default top level data path ~/mame or the settings path ~/.mame to other paths.

Also it's worth noting that you don't need all those packages to install MAME. sdlmame* was a dummy transitional package and was removed in recent Ubuntu releases, mame-tools is not needed to run games, and gnome-video-arcade is just a GUI (that you're not using, considering you're starting MAME in the terminal). So mame is the only package you really need.

Note for previous Ubuntu releases:

The user paths for MAME-related dirs were changed in recent Ubuntu releases. For older releases such as 12.04, both settings and data (like ROMs) are inside the hidden ~/.mame

After a lot of digging and researching, I've found out when and where such changes were made: the .ini location and default user paths are not an upstream setting, so it's not the MAME developers that set it, but rather configured by each distro.

It was changed in Debian, and later incorporated in Ubuntu, starting in MAME v0.146-5 and finished in v0.147-1.

From the Debian Changelog:

mame (0.146-5) unstable; urgency=low

  [ Cesare Falco ]
  * Replace -march with -mtune=generic gcc flag for compatibility issues
    with older CPUs (LP: #1063993)

  [ Emmanuel Kasper ]
  * Add support for parallel building using DEB_BUILD_OPTIONS
  * Reorganize default paths:
       $HOME/.mame for ini file and output files
       $HOME/mame for data search paths

 -- Emmanuel Kasper   Tue, 13 Nov 2012 22:54:27 +0100

mame (0.146-4) unstable; urgency=low

The relevant commits for such changes were

  • 2012-10-26 - 9677867a63c6 - Switch local folder to ~/mame (from ~/.mame)

  • 2012-11-14 - 824bc168084b - Edited config files; use personal non-hidden resources dirs.


Mame is just the emulator - now you need to find ROMs for the games you would like to play and put them in ~/mame/roms (create the directory if it doesn't exist)


From : http://www.upubuntu.com/2012/10/how-to-install-mame-multiple-arcade.html

  1. MAME Configuration

Start now MAME with this command so that a hidden folder (.mame) is created in your home directory which will contain all emulator settings:

mame

You can now close the emulator. Run this command to create the configuration file for MAME:

cd ~/.mame && mame -cc

The "mame.ini" file will be created in the ~/.mame folder. Edit now this file with this command:

gedit ~/.mame/mame.ini

For Linux Mint:

pluma ~/.mame/mame.ini

In "rompath", you can set your own ROM directory path or leave default paths:

Next, create the following directories in the ~/.mame folder:

nvram
sta
roms
memcard
inp
comments
snap
diff

You can create them all with this command:

mkdir ~/.mame/nvram memcard roms inp comments sta snap diff

You can access the rom folder with this command to place your downloaded roms in:

nautilus ~/.mame/roms

As for player controls, you can easily configure them from the main interface of MAME (Configure General Inputs):