CaptSaltyJack
Posts: 24
Joined: Wed Dec 12, 2012 6:40 am

Can we get an official/sticky MAME how-to post?

Wed Dec 12, 2012 9:22 pm

I'm sure someone has come up with a fairly simple step-by-step guide on how to get MAME running on Raspbian. Hard to find though, since searching for "mame" brings up hundreds of posts. :) Is there one particular method that works the best?

Also on a related note, how hard would it be to get the package maintainers for Pi to just add a completely working MAME build into the repository??

User avatar
BirchJD
Posts: 162
Joined: Tue Nov 13, 2012 7:43 pm

Re: Can we get an official/sticky MAME how-to post?

Wed Dec 12, 2012 9:38 pm

There is a compiled AdvMame on my GitHub:
https://github.com/BirchJD/advancemame-0.106.1-RPi
The compiled filename is advmame

The source code for both AdvMame and XMame can be found there.

Instructions for building the source and a Mame project can be found here:
http://www.newsdownload.co.uk/pages/RPi ... stick.html
http://www.newsdownload.co.uk/

CaptSaltyJack
Posts: 24
Joined: Wed Dec 12, 2012 6:40 am

Re: Can we get an official/sticky MAME how-to post?

Thu Dec 13, 2012 12:47 am

This lost me. Not sure these instructions are up to date:

http://www.newsdownload.co.uk/pages/RPiMameMess.html

There is no "pacman" command on my Raspbian install. I did "git clone https://github.com/BirchJD/advancemame-0.106.1-RPi advancemame" to pull it into a folder. I went into that folder and did "sh configure" then "make." It got quite far before a compiler error was thrown.

User avatar
BirchJD
Posts: 162
Joined: Tue Nov 13, 2012 7:43 pm

Re: Can we get an official/sticky MAME how-to post?

Thu Dec 13, 2012 9:03 pm

You don't need to build it, in the base directory of the GitHub repository there is a file called advmame, which is the compiled application for the Raspberry Pi, just use that. It works on Raspbian and Arch Linux as it is.

First run it and it will create a directory called .advmame in your home directory. In that directory is the configuration file advmame.rc, just configure that. Sorry I should have posted the following page, the advmeme config is at the bottom of that page:
http://www.newsdownload.co.uk/pages/RPiAdvMame.html
http://www.newsdownload.co.uk/

CaptSaltyJack
Posts: 24
Joined: Wed Dec 12, 2012 6:40 am

Re: Can we get an official/sticky MAME how-to post?

Thu Dec 13, 2012 10:30 pm

Ah, thanks! Found it. So I ran "./advmame dkong" as a test, and it crashed. "Failed to open file: /sys/class/gpio/export". Of course, this might have to do with the fact that I'm emulating Raspbian via QEMU. I wanted to make sure I could get MAME running before I bought a Raspberry Pi, basically. :)

User avatar
BirchJD
Posts: 162
Joined: Tue Nov 13, 2012 7:43 pm

Re: Can we get an official/sticky MAME how-to post?

Fri Dec 14, 2012 7:12 am

It is because I implemented a joystick driver directly into AdvMame for the Raspberry Pi, which uses the GPIO pins. There may be an option to disable the GPIO joystick in the config file for your emulator, I can't remember without looking.
http://www.newsdownload.co.uk/

CaptSaltyJack
Posts: 24
Joined: Wed Dec 12, 2012 6:40 am

Re: Can we get an official/sticky MAME how-to post?

Fri Dec 14, 2012 4:53 pm

What sort of interface is GPIO, physically? I mean, what does it look like and what kind of joystick can plug into it?

My ultimate goal is to allow two wireless gamepads to connect to the Pi. I'm not sure if that's possible.

User avatar
BirchJD
Posts: 162
Joined: Tue Nov 13, 2012 7:43 pm

Re: Can we get an official/sticky MAME how-to post?

Fri Dec 14, 2012 5:10 pm

They are just switches connected to the GPIO pins with resistors to limit the current for safety. Any wired joystick can be used. The original link in this post has the circuit diagram for each switch.

I don't know about wireless, it will depend if the Raspberry Pi sees them automatically as a user input device. If so they would just work, if not you would have to see if anyone has created a driver for them on Linux, or write one.
http://www.newsdownload.co.uk/

CaptSaltyJack
Posts: 24
Joined: Wed Dec 12, 2012 6:40 am

Re: Can we get an official/sticky MAME how-to post?

Fri Dec 14, 2012 5:34 pm

So GPIO will work with USB gamepads, correct?

I'll have to research wireless controllers and see if anyone else has managed this. Thanks for your help!

User avatar
BirchJD
Posts: 162
Joined: Tue Nov 13, 2012 7:43 pm

Re: Can we get an official/sticky MAME how-to post?

Fri Dec 14, 2012 6:47 pm

USB keypads will probably work by plugging them into the USB port as they should be recognized as a USB joystick by AdvMame. GPIO is if you want to wire an old ZX Spectrum joystick or similar, or improvise your own set of switched wired to the GPIO pins.
http://www.newsdownload.co.uk/

CaptSaltyJack
Posts: 24
Joined: Wed Dec 12, 2012 6:40 am

Re: Can we get an official/sticky MAME how-to post?

Sun Jan 06, 2013 12:01 am

I've finally got my Pi set up enough where I've been able to get advmame on there.

When I run it, though, it crashes:

Code: Select all

AdvanceMAME - Copyright (C) 1999-2003 by Andrea Mazzoleni
MAME - Copyright (C) 1997-2003 by Nicola Salmoria and the MAME Team
Signal SIGSEGV[MAPERR], fault at 0x6c, from code at (nil)
Compiled Nov 27 2012, 09:48:45
Is there anything I've missed? The only thing I changed from the default config is setting device_alsa_device to bcm2835 (to hopefully use the HDMI as audio output). Am I doing something wrong?

User avatar
BirchJD
Posts: 162
Joined: Tue Nov 13, 2012 7:43 pm

Re: Can we get an official/sticky MAME how-to post?

Sun Jan 06, 2013 3:22 am

The sound will be driven via SDL, so the only change to the configuration required should be the following for the video:
device_video_clock 5 - 50 / 15.62 / 50 ; 5 - 50 / 15.73 / 60

As long as the Linux sound driver for the Raspberry Pi is loaded the sound should work:
modprobe snd-bcm2835

If you are using the GPIO joystick version it will require permission to the GPIO interface, the simplest way to do this is to run it as root user.
http://www.newsdownload.co.uk/

CaptSaltyJack
Posts: 24
Joined: Wed Dec 12, 2012 6:40 am

Re: Can we get an official/sticky MAME how-to post?

Sun Jan 06, 2013 3:33 am

Ok, added that device_video_clock line to my config.

Is there a non-GPIO version? I'll be using USB gamepads.

As far as sound.. unfortunately my Pi unit refuses to run the audio out via HDMI for some reason, even if I put hdmi_drive=2 in the /boot/config.txt file. Still trying to sort that out.

CaptSaltyJack
Posts: 24
Joined: Wed Dec 12, 2012 6:40 am

Re: Can we get an official/sticky MAME how-to post?

Sun Jan 06, 2013 3:35 am

PS: I'm running the Pi via HDMI into a 46" LCD TV. Just double checking to make sure those video clock settings are OK for that.

User avatar
BirchJD
Posts: 162
Joined: Tue Nov 13, 2012 7:43 pm

Re: Can we get an official/sticky MAME how-to post?

Sun Jan 06, 2013 3:44 am

Have you installed the SDL sound packages:

Install the audio drivers:
pacman -S alsa-lib

Install the SDL drivers. Install all of the packages:
pacman -S sdl
pacman -S sdl_sound

For non-GPIO version you would have to build the original source code available here, though it now says it's version 1.2 which has been placed there a couple of days ago. I haven't tried to build this version myself:
http://advancemame.sourceforge.net/download.html
http://www.newsdownload.co.uk/

CaptSaltyJack
Posts: 24
Joined: Wed Dec 12, 2012 6:40 am

Re: Can we get an official/sticky MAME how-to post?

Sun Jan 06, 2013 6:24 am

I think we're talking about two different things maybe.

I don't have "pacman." On my Pi system, pacman is a game. I'm running Raspbian wheezy, which uses apt-get.

I tried running advmame as root, that worked, but all animations are VERY very slow, and sound is choppy. Something is wrong.

EDIT: Never mind, looks like someone released a special image meant for Pi users who want a MAME box: http://blog.sheasilverman.com/pimame-ra ... -download/ (will give that a try)

User avatar
malakai
Posts: 1382
Joined: Sat Sep 15, 2012 10:35 am
Contact: Website

Re: Can we get an official/sticky MAME how-to post?

Sun Jan 06, 2013 6:29 am

The one person with a lot of experience getting mame to work is Shea Silverman he has some build tutorials, debs, and a fully functional (More than any I have tried) SD Image that you can drop straight to a card load and run, now with ftp support to upload roms from pc or mac straight to Pi

http://blog.sheasilverman.com/raspberry-pi-emulation/

http://blog.sheasilverman.com/pimame-ra ... -download/
http://www.raspians.com - always looking for content feel free to ask to have it posted. Or sign up and message me to become a contributor to the site. Raspians is not affiliated with the Raspberry Pi Foundation. (RPi's + You = Raspians)

CaptSaltyJack
Posts: 24
Joined: Wed Dec 12, 2012 6:40 am

Re: Can we get an official/sticky MAME how-to post?

Sun Jan 06, 2013 6:39 am

Yep, I just found the SD image! Copying it to my SD card right now. Fingers crossed.

User avatar
malakai
Posts: 1382
Joined: Sat Sep 15, 2012 10:35 am
Contact: Website

Re: Can we get an official/sticky MAME how-to post?

Sun Jan 06, 2013 7:04 am

Here is the thread of reports note some games may still be buggy but It would be worth trying to stick to that image it just seems he does the most work and he's the best shot at getting it up to speed even if you just let him know you tried 'x' game and the issues you received he can look into it.

http://www.raspberrypi.org/phpBB3/viewt ... 78&t=25723
http://www.raspians.com - always looking for content feel free to ask to have it posted. Or sign up and message me to become a contributor to the site. Raspians is not affiliated with the Raspberry Pi Foundation. (RPi's + You = Raspians)

CaptSaltyJack
Posts: 24
Joined: Wed Dec 12, 2012 6:40 am

Re: Can we get an official/sticky MAME how-to post?

Sun Jan 06, 2013 7:35 am

Cool, works great!

SSilver2k2
Posts: 179
Joined: Wed Jun 06, 2012 1:51 am
Location: United States
Contact: Website AOL

Re: Can we get an official/sticky MAME how-to post?

Sun Jan 06, 2013 9:34 pm

Glad it's working for you :)
My blog of various geeky things - http://blog.sheasilverman.com
PiPLAY - http://piplay.org
DeskCade.com - Mini Raspberry Pi Arcade Cabinet

CaptSaltyJack
Posts: 24
Joined: Wed Dec 12, 2012 6:40 am

Re: Can we get an official/sticky MAME how-to post?

Sun Jan 06, 2013 10:20 pm

Ergh. I forgot, AdvanceMAME is ancient, and many of my ROMs do not work. Gonna see about building MAME 0.147 from scratch. I don't understand why AdvanceMAME is still so popular when it's so far behind.

User avatar
BirchJD
Posts: 162
Joined: Tue Nov 13, 2012 7:43 pm

Re: Can we get an official/sticky MAME how-to post?

Sun Jan 06, 2013 10:32 pm

Because there are two Mame streams which work with Linux, XMame and Advance Mame.
I haven't looked but I do not believe you will find the SDL code in the standard Mame 0.147.
http://www.newsdownload.co.uk/

CaptSaltyJack
Posts: 24
Joined: Wed Dec 12, 2012 6:40 am

Re: Can we get an official/sticky MAME how-to post?

Sun Jan 06, 2013 10:40 pm

SDL support is now integrated into MAME 0.147.

User avatar
BirchJD
Posts: 162
Joined: Tue Nov 13, 2012 7:43 pm

Re: Can we get an official/sticky MAME how-to post?

Sun Jan 06, 2013 11:04 pm

I just had a quick look and I think you are referring to the Windows port of SDL and not the Linux source code. I may have downloaded a different archive from the wrong location.

Let me know how you get on, I am very interested in it if you get it to build.
http://www.newsdownload.co.uk/

Return to “Gaming”