MAME Installation

From LinuxMCE
(Redirected from Mame installation)
Jump to: navigation, search
The information in this article is now deprecated

Instructions for LinuxMCE 810 and later can be found here: Play Games on LinuxMCE

Before installing

  1. Apparently only compiles on core runnning i386. Fails on amd64 with make: *** Error 1 If you were able to get it compiled on amd64, please update this.
  2. Make sure, no ZIP files in the /home/public directory. Any zip files the update media finds it will assume they are game roms. (I now have zipped up ebooks listed as games!!!!!!!)
  3. You obviously need to copy your game ROMs to one of the public directories on the system and put them in /home/public/data/games. Non-commercially licensed free MAME ROMs are available at: (You must acknowledge non-commercial use for each one). MAME ROMs can also be licensed (usually for a small fee) from the vendors on this list:
  4. All the downloads and steps I have listed below HAVE to be done on your core. I did them through ssh on my desktop, but the files must be on the core and compiled there.

Installation Steps

First compile of the regular sources

Download the source using svn. is where the repository is located. Do the folowing command (NOT AS ROOT) to download the sourcecode from this repository. ONLY use this repository, none of the others!!!! If you do not have svn on your core (and you probably don't) run apt-get install subversion in order to get the command.

svn checkout trunk
cd trunk

Now, go and catch a good cup of coffee. Better make it a grande. It will take a while (like maybe hours)

Compiling special libs

Still inside your source directory ( mine is ~/trunk/)

cd src/WindowUtils
sudo cp /usr/pluto/lib
cd ../lmce_game
sudo cp /usr/pluto/lib
sudo ldconfig

Now we have the first part of the needed libs. As LinuxMCE is very datadriven, we need to get some additional files and create a database for them.

echo "DROP DATABASE IF EXISTS lmce_game; CREATE DATABASE lmce_game;" |mysql -uroot
mysql lmce_game -uroot < lmce_game.sql

The database is up to date now. Lets do the plugin.

cd ../../MAME_PlugIn
make so
sudo cp /usr/pluto/bin
cd ../MAME_Player
make bin
sudo cp MAME_Player /usr/pluto/bin

Additional Libs

The MAME plugin for LinuxMCE works together with an openly availabel MAME lib. We need to get and make that.

cd sdlmame0125
sudo cp mame /usr/local/bin

Getting the MAME metadata in place

The metadata contains the entire artwork, sounds and sample packages. It also created needed directories for the plugin.

The file is 1GB big.

cd /home  (NOT the home directory of any user, but the /home directory)
sudo wget
sudo tar xzvf mamedata.tar.gz
sudo wget
sudo tar xzvf snap.tar.gz
sudo wget
mysql pluto_main -uroot < pluto_main_game_additions.sql
sudo wget
mysql pluto_media -uroot < pluto_media_game_additions.sql

Setup The Orbiters

  • Reload router
  • Switch to KDE Desktop
  • Click the "Open admin website" button in the LinuxMCE Launch Manager and log in
  • In the top menu bar, select Wizard->Devices->Orbiters
  • click on Advanced for the Orbiter you want MAME support on
  • Click on the "Create Child Device" link near the top of the main web frame
  • Click on the "Pick device template" button and choose MAME player in the popup
  • Click on the "Save" button in the Device Info for the new MAME Player device
  • In the top menu bar, select Wizard->Scenarios->Media Scenarios
  • Add a media scenario to the room with your game MD and call it games, then choose the entertainment area, then the device, then the type. Click the "Add" button that now appears. It should show up in the list with games as the description with all the choices you made.
  • Edit the command and delete the command "MH Play Media" command that was generated automatically.
  • Go to the very bottom of this page and you see a box labeled Device: with a pulldown menu next to it. From the pulldown menu add a new command by choosing the [Local Orbiter]
  • Now from the now visible Command: pulldown, choose "Show File List" then click the "Add" button.
  • Now there is a box there with #29 PK_MediaType (int) there. Put a 29 in the box and click save.
  • Do a quick regen of orbiter.

Verify The Setup

Open a terminal window, and watch the log as the MAME spider is finding games and adding them to the system, with

tail -f /var/log/pluto/DCERouter.log

Once the spidering gets done, and it can take an hour or more and it will crash the spider and restart itself several times. Once you are sure it is finished, reload router and regenerate the orbiter. Now go into the scenario section on the webmin and UNCHECK the “lmce games” that was autogenerated by lmce. This is not the button for the games, it will be just games. Enjoy your playing, and thank TSCHAK for this plugin!

uploaded may 6, 2008 -- will be outdated once the plugin is moved into the releases!!! Delete once that happens!!!