Raspberry Pi and MAME Part 2

THIS IS AN OLD POST!  Please go to the latest update here!

Hello everyone from raspberrypi.org!  Thanks for visiting, more updated tutorials and binaries are available by clicking the menu item Raspberry Pi Gaming!

UPDATE: New Raspbian Binaries Available (new binaries above)

So I’ve spent even more time playing around with my MAME compile and my Raspberry Pi.  I have a new set of downloads, once is a set of binaries so you don’t even need to do a make install.

  1. Unzip MAME directory.
  2. chmod 777 /dev/fb0
  3. Put your roms into mame/share/advance/roms/
  4. run mame/bin/advmame
    1. The first time it’s run it will generate a set of folders and files into ~/.advance
  5. edit your ~/.advance/advmame.rc to include the proper display configuration
    1. For HDMI try:
      1. device_video_clock 5 – 50 / 15.62 / 50 ; 5 – 50 / 15.73 / 60
    2. For NTSC TVs try:
      1. device_video_clock 5 – 50 / 15.73 / 60
  6. run mame/bin/advmame <gamename>
    1. cd into mame/bin/ then ./advmame gamename
  7. ENJOY!!!

Download AdvanceMAME Raspberry Pi Binaries

As an aside, I overclocked my Pi to 900Mhz, and Street Fighter 2 is slow, but playable :D

edit: fixed an error in the path.  Also added a different way to run advmame (the way I run it).  Just cd into the bin directory then ./advmame gamename.

 

65 thoughts on “Raspberry Pi and MAME Part 2

  1. To avoid use “chmod 777 /dev/fb0″ every boot you can use this command:

    sudo usermod -a -G video [your_username]

    Then log out and log back in.

    Great work! :)

  2. I’ve followed the instructions in this tutorial, but with every rom I’ve tried, I get an error message listing bin files like ’1-n31.bin’ and ’1-n4.bin’, saying NOT FOUND, followed by a line reading “ERROR: required files are missing, the game cannot be run.”
    After a bit of googling, it appears this may be due to some discrepancy between the version of advmame and the roms, but I’m not sure what I can do to solve this problem. Any advice?

    Much thanks.

    • Hi Shea came across your blog as I also want to use my pi as a gaming platform (specifically as a handheld). Thanks for all the information.

      I compiled Cave story and installed mednafen for emulation and it works quite well, however in both cases I found that the sound is a bit of a mess. I can hear the audio in the background but it is extremely noisy/scratchy. So I was wondering if anyone here got decent sound output for any games through the audio jack? Thanks

      • I’ll test it out through the audio jack. My latest post showing youtube-player and omxplayer is playing the audio through the headphone jack without stutter or cracklyness.

    • Either the version of the rom that you are trying to run is incompatible with your version of mame. In this case you either need to install a newer rom from the web or find the correct rom for the specific version that you want to run.

      Or you are missing some shared files that the game needs. These files are shared with other roms and should either be packaged together with each rom or seperate in its own appropriate zip archive. Hope this helps

    • Hi Andrew, I had a similar problem. Place the roms in /home/pi/.advance/roms instead of /mame/share/advance/roms. Worked for me

  3. Andrew, I wish I could help but I can’t discuss any questions regarding ROMs, where to get them, why they aren’t working, etc.

    If you have any other questions, please feel free to ask.

  4. Pingback: Retro games and a retro joystick | Raspberry Pi

  5. Pingback: Cómo utilizar Raspberry Pi para instalar viejos juegos de arcade | GeeksRoom

  6. Pingback: Retro games and a retro joystick | Massif Software

  7. Pingback: Retro games and a retro joystick | Information News

  8. Pingback: Cómo utilizar Raspberry Pi para instalar viejos juegos de arcade – Portal Geek | Juegos | Gadgets | Aplicaciones | Turoriales y mas

  9. Pingback: Cómo utilizar Raspberry Pi para instalar viejos juegos de arcade

  10. Pingback: Raspberry Pi | Aprende a instalar abandonware y disfrutar de viejos juegos

  11. Pingback: Pagina Web Gratis - Raspberry Pi | Aprende a instalar abandonware y disfrutar de viejos juegos

  12. Pingback: Raspberry Pi’de MAME Oyunlarını Açmak | Raspberry Pi Türkiye Topluluğu

  13. Hello, thanks for the tut, but I have big problems here, please hear me out, I am not the only one!

    I, like many are very excited about the RPi, especially for my 13yr old son, I dev code for PIC micros in asm, have written VB.net, C, C++, (all windows) so far so good…… but have never dabbled with linux :(

    So my problem is this, I see the instruction…..

    1:Unzip MAME directory. …… Tick, no problem
    2:chmod 777 /dev/fb0…… big problem, what does this mean? I assume it is a linux command, but I use a windows PC to grab files etc, so do I copy the zip contents to my RPi card, if so what directory, if not what do I do? When I have the files on the card, where do I type chmod? What distro do I need?

    I know alot of you will be screaming, “dumb-ass windows user” but its not surprising, I have found linux is SUCH a hard subject to get into because many people seems to assume that everyone knows the “simple” stuff, and this is killing it for me :(

    Before you flame, I HAVE googled linux tutorials, many are the same as above, now I am not saying the above is wrong, and I know it’s frustrating to teach new idiots all the time, but if experienced programmers like myself have problems doing “simple” things like the above, what chance does my 13yr old son have?

    OK, rant over, I am just getting VERY frustrated, I really want to make a go of the RPi, but seem to be coming up against a “no novices” brick wall :(

    Be gentle with me ;)

    Matt

    • OK, I have now wiki’d the chmod command, I understand it……. (chmod 777 file change the permissions of the file file to read, write, and execute for all.)

      But this still doesn’t help me on how to actually use it…… yes I really am THAT stupid, but I have NEVER used linux before so how would I? argghhhhhhh :)

      Just to make it clear, I am not angry at anyone, just frustrated at my own inability to overcome the simplest of issues. ;)

      Matt

      • Hey no worries. We’ve all had to start somewhere. All the directions assume you already have the zip file on your Raspberry Pi already. You should also be using the Raspbian OS on your Pi.

        So if you’re typing on your Pi, you can type in wget http://sheasilverman.com/rpi/raspbian/mameBin.zip

        which is a command to download a file from the internet to your computer.

        then type in unzip mameBin.zip
        then type in chmod 777 /dev/fb0
        etc…

        • I guess itll also help if I tell you how to run a program.

          ./ is the command to run a program from a folder.
          so since advmame is in /mameBin/bin/
          type in cd /mameBin
          cd /bin
          ./advmame

          That will run the program.

          • Thank you so much, it may be “stupidly” simple to 99% of people who come here, but I am definitely in the 1% ;) Hopefully that won’t be for long and I can help others.

            Thanks again, I will have a play tonight ;)

            Matt :)

          • Thank you so much. It is my fault for not knowing what to do with what. Please be more specific for us noobs next time.

  14. Pingback: Raspberry Pi | modlog.net

  15. I try to run the chmod 777 /dev/fb0 command from the CLI but it says:

    chmod: changing permission of `/dev/fb0′: Operation not permitted

    So now what?

    Oh LINUX, you are so paranoid.

  16. Hello.
    when i try to run the rom (i tried with the zip inside the ROM foderl. i unzip the it in the ROM folder, i did the same trying with the ROMS folder, nothing changes). the emulator says:
    201-p1.bin NOT FOUND
    201-s1.bin NOT FOUND
    ….. etc …

    but all the files are there!

    Idea?

    • solved, partially. what’s now is not findings are
      sfix.sfx
      sp-s2.sp1
      sm1.sm1
      000-lo.lo

      PS: does anyone can point me to a rom that is tested and working? so i’ll be sure that it’s not a rom problem.

      • I had the same issue with the missing files:
        sfix.sfx
        sp-s2.sp1
        sm1.sm1
        000-lo.lo

        I just extracted the zip and added the files and re-zipped and it worked.

  17. Hello, i have this error
    Signal SIGSEGV[MAPERR], fault at 0x54442d18, from code at (nil)
    Compiled Jun 11 2012, 17:28:43
    No stack backtrace: compile without CFLAGS=-fomit-frame-pointer and with LDFLAGS=-rdynamic
    i know that is already solved but for me any solution don’t work; i tried all solution you posted
    i have a pc monitor attached in HDMI resolution 1920*1080
    please help me

  18. Thanks for the post! I’ll try your pre-compiled out. I managed to get one compiled (not sure if it’s an older version — will check), along with advmenu and both working with my Ultrastic. Trials and tribulations documented http://blog.flowbuzz.com/2012/09/raspberry-pi-mame-and-ultrastik-pt-1.html
    That was all pre-turbo mode (I was using Adafruit’s Occidentalis) so I’m starting over with a new image to see for myself how fast it goes on turbo :)

  19. I run advmame wrong and it didn’t create necesary files like ~/.advance/advmame.rc
    Now i am running by following your tutorial step by step but it now asks: “No game specified in the command line.” instead of creating .rc file.

    By the way, where can i find the rom files and what are they?

    • Everything is working now. The .rc file was hidden like other files that were created on first start.
      One thing is the framerate of DoDonPachi whitch is very low, but i try to add your code line with hdmi options.

  20. Thanks for the binary. I have everything up and running – running on Wheezy, installed advmame without issues, edited the default configuration to work on my monitor, loaded up track and field. The game plays fine, but I have no sound.

    My monitor is a DVI one (via the HDMI), and I have headphones plugged into the audio output.

    The audio output works fine on the Pi (I have the command line version of mplayer installed, and it plays MP3s just fine with it), but I get no sound from any MAME games. I have tried altering the following in advmame.rc:

    device_alsa_device auto
    device_alsa_device default
    device_alsa_device sdl (this last one generates an error when leaving MAME)

    I’ve tried the depmod and modprobe snd-bcm2835 – made no difference

    I’m usually self-sufficient in sorting out issues like these, but I’m out of ideas. Can anyone help?

  21. what version of raspbian is this for? i just tried it on the new 512mb image and it gives me a segmentation fault…. should i use an older image for the mame binaries or is there something else wrong?

  22. I have followed all the steps but it always tells me “cant find….” and then LOADS of files, when i run advmame it dosnt make any new folders please help me

  23. I’m having issues with this i keep getting files cannot be found

    starting from a brand new SD image
    sudo su
    wget http://sheasilverman.com/rpi/raspbian/mameBin.zip
    unzip mameBin.zip
    cd mameBin/bin
    ./advmame
    cd /root/.advance
    nano advmame.rc
    added
    device_video_clock 5 – 50 / 15.62 / 50 ; 5 – 50 / 15.73 / 60
    chmod 777 /dev/fb0
    cd mameBin/bin
    ./advmame Game name ive tried pacman and invaders tried in a .zip file a folder and extracted in the Rom folder itself but i keep getting errors about files not found?

    Any ideas?

    Thanks for any help i want to build my own mini mame Cab :)

  24. Thanks for all your great work, Shea!

    But my Raspberry is running the games really slow. In Street Fighter 2, 10 seconds in the game are 30 seconds in real time. It’s unplayable. Even Space Invaders is slow.

    Overclocking speeds up the games a little bit, but not enough. Any advices on what I can do to make it run faster?

    Thanks

  25. Gave this ago as I’ve used Mame in both, Win and Linux Debian, and haven’t got one rom to work yet. Errors about missing files, on roms that run on both other systems.

  26. Hey guys,

    I’ve been a windows guy for the past 20 years or so and I’ve been trying to get into Linux, but every book I get is never enough information and when I go to site like these it always seems that I’m always coming into a conversation that’s well it’s start and beyond what I’ve read.

    Can anyone suggest a book or a website where I could get enough info to finally get my feet wet?

    Right now I have Umbuntu installed and I have it 100% working, but now I would like to install wine or most importantly I would like to get mame working.

    Thanks in advance

  27. I just set up the Pi with this for a Boy Scout overnight game party. When everyone else is killing zombies and FPS, a few kids constantly feel left out. I set up the original Mario and a few others after which these Scouts felt like the party included them and a few others stopped by and learned something new – at 3:30am no less.

    No crashes. Sound works and speed only depends upon the horsepower needed for the game. Overscan was a regular pain, but we ignored it and had fun anyways. HDMI and joystick support was great.

    Thanks for porting this tool!

  28. Pingback: 공대팬더의 좌충우돌 이야기 – MAME 설치하기

  29. Pingback: Playing Mame Arcade Game on Raspberry Pi | David Yin's Blog

  30. Pingback: Raspberry Pi'de MAME Oyunlarını Açmak - Raspberry Pi Türkiye Topluluğu

Leave a Reply

Your email address will not be published. Required fields are marked *


+ 4 = 8

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>