Saturday, March 24, 2012

Easier to compile Advmame.

How to get advmame on the rasberry pi.
I found a tip about using advmame instead of xmame and decided it was worth a try.
advmame has an awesome configure script that takes all the work out of editing makefiles.
It also runs a lot faster.

First you will need to have some sort of rasberry pi simulator I went with this method.
RPi on Virtual Box

As before
Use the following command to ensure your running on the arm kernal

uname -a

here is my output.

Linux rasberry-pi 3.0.4 #2 mon oct 17 17:39:42 ict 2011 armv61 GNU/Linux
If you dont have X set up install it by using the command

apt-get install lxde xorg python geany

Now we need to install some dependencies to build advmame. You may not need all of these. I put them together from a lot of tinkering.

apt-get install build-essential libgtk2.0-dev libgnome2-dev libsdl1.2-dev
apt-get install libxv-dev libxv1

Download the advmame source. I tried 106.1 without success.

extract the archive.
tar -zxvf advancemame-0.106.0.tar.gz
cd advancemame-0.106.0

Now we configure and compile.
make install
Pretty easy huh. Thanks to advmame team for all there work. 


  1. I’d like to say, your posts are good and your tips are very useful for me. Thanks.

  2. Thanks for the upload, very useful for my RPi based Mame Cabinet Build. As a new linux user, would you be able to tell me how this could be ran automatically with no user intervention after power on? And will the Pi be able to use some sort of GUI for game selection with the joystick etc?

    Thanks in advance

    1. Actually Im in the process of figuring out how to autorun in X myself. Im sure Im missing some sort of init script for Xorg.

      If you check out the advancemame site they have a front end called advancemenu.

      Also if you run "apt-cache search mame" you will see some front ends in the repository.

    2. Thanks for your help Nick, I've looked into advancemenu and it does look like a nice front end for my application. Did a bit of looking and found this link.

      Not sure if it will help you with your autorun problems.


  3. Really struggling to make this work on the actual hardware, has anyone got this working on an actual raspberry pi or is it just on the simulator.

  4. Hi guys,

    I tested this in my Raspberry Pi.

    I compile and test xmame but it was too slow on most roms. Then I tried advancemame and the result is the same, too slow in most games. Is there any chance to get good speed on this or we are dommed?

  5. Hi, I've followed these instructions on my Rpi and have built advancemame (took a while!) however I'm struggling to load any roms. As far as I'm concerned I've copied them to the correct location but advancemame still reports "files cannot be found" (and yet I can see them in the \ROMS\ folder

    Do I need to change the configuration file or something? Actually where is the configuration file so I can check it's a valid location.

    Any help would be most appreciated


  6. Unfortunately I wont see my pi till June. As I understand it gpu accelerated X isn't supported on Debian Yet. So that is my first guess on the performance issues. Can anyone post some benchmarks on a few different games?

  7. I won't be getting my Pi till June either. I plan on going just about this route myself, also trying to get Wah!Cade up and running along with a few other small emulators and building an arcade cabinet to house it all along with a disused CRT TV. Any news regarding ADVMame and anything else with your virtual pi, or anyone have any luck getting their hands on the hardware and getting this going in the real world?

  8. I've now got Advmame working on my Pi however it's very slow. Any ideas anyone?

    Also how are you running that rom in a window within LXDE? When I launch a rom from LXTerminal it defaults to fullscreen mode.

    Are there any other Mame Emulators we could try with the Pi that may have better performance?


  9. Thanks Nick for the tutorial - it's working great on real hardware :-)

    It does run slowly, but it is fine for older games such as Galaxian.

    A few extra tips for anyone out there struggling...

    - I always run advmame from the command line, not inside X-Windows

    - advMame 0.160.1 seems to work ok. Try "wget" to download it. You then follow the normal instructions replacing 0.160.0 with 0.160.1.

    - to enable sound, type "sudo modprobe snd_bcm2835". This is because the alpha quality ALSA sound drivers are disabled on the standard Debian image. You will need to enter this every time you reboot your Pi.

    - you need to run advmame once to configure itself before you can use it "sudo advmame" should do the trick

    - lastly to configure settings, type "sudo advcfg". I had success choosing PC Monitor (> 30Khz), Generic SVGA HighRes, Manual Low Centering. (note selecting low or hires doesn't seem to affect speed at all).

    Finally, should this be added to the eLinux wiki? I think the community would find it useful?


  10. I downloaded the VBox image and have it running. However, uname -a reports back i686. I've been trying to figure out how to get it switched to ARM but I must be missing something. Anyone have any pointers?

  11. Oh and to add... in your original post you mention having issues downloading 0.160.1 ... Well the link to download it is...

    Hope that helps.

  12. Andy, I'm interested how you got this running from the Command Line on the Rpi (not inside X) as whenever I try this I get loads of Frame Buffer issues and Permission Denied messages.

    I must admit I am running 0.106.0 unlike your 0.106.1 and I'm also connecting to a HDTV over HDMI although I doubt that would cause the issue (I could try composite to TV)

    Are there any other commands your running in the command line before launching advmame?

    Any help would be most appreciated.


    1. I get that from the command line if I don't elevate the permissions on both 0.106.0 and 0.106.1. Simply add 'sudo' in front of the command to start advmame, eg:

      sudo advmame galaxian

      Hope that helps!

  13. Cheers Andy yes that will work a treat.

    I should have realised this as what I've done of late is switch to root user first and then run advmame.

    How are you finding the performance of some of the roms. See my post here for my findings so far:

    Anyone know how to get MAME4ALL or MAME037b5 running on the Pi. I've been searching for build instructions.

  14. It seems to be possible to steal a bit more allocated memory back from the GPU, maybe this would help if openGL etc are not being used anyway?

  15. I'm getting a compiler error when trying to build 106.1 sources:
    src/cpu/sh2/sh2.c: In function sh2_get_info:
    src/cpu/sh2/sh2.c:3217:1: error: unrecognizable insn:
    (insn 2034 2033 2035 183 (set (subreg:SI (reg: DI 362 [sh2.irq_line_state ]) 0)
    (sign_extend:SI (mem/s/j/c:QI (plus:SI (reg/f:SI 361)
    (const_int 260 [0x104])) [0 sh2.irq_line_state+0 S1 A32]))) src/cpu/sh2/sh2.c:3111 -1
    src/cpu/sh2/sh2.c:3217:1: internal compiler error: in extract_insn, at recog.c:2109

    I'm compiling on a RasPi, using the above instructions. Everything installed without any problems. I noticed the instructions mentioned that 106.1 wasn't successful, but when I tried to wget 106.0 from sourceforge, it wasn't there. If anyone has an idea about what I should be looking at, or if there is another location where I can get the 106.0 sources to try, let me know.

  16. OK, so I just got my Raspberry Pi and want to use it for a MAME system. I am a extreme beginner in both Linux and MAME , (although I have good knowledge of PC's). Is there a good Video Tutorial that shows how to set-up the SD Card for Raspberry Pi and also another easy to follow Video Tutorial that shows how to set-up Advance MAME all the way thru a front end? This is something that would really help me (and others I'm sure).

  17. Hey OP,

    I am a beginer to this and I have built the cab ready, I Am just wondering if you have a step by step tutorial to set this all up as well as getting the USB joysticks to work as I have a 6 button one.


  18. I'm having the opposite issue of some of the others - I can't seem to get advmame to run from an LXTerminal inside X. It gives me the "Unable to initialize, fb: unsupported in X" etc. message. I've got device_video_output auto in the advance.rc file. And it works fine from a command console outside of X.
    I have wahcade running now, too (and it only runs inside X so far)... so I can choose to use a frontend that can't launch advmame or advmame without a front end :)