MAME 0.171 for Raspberry Pi2 – And it’s playable!

EDIT: You may prefer to read this page for detailed compile instructions.

MAME 0.171 is out and this time there are some big and awesome changes to the core app. The GUI is far more advanced than previous versions, good enough for a lot of people to stop using 3rd party frontends. Also the first pass at the integration of BGFX, the unified GPU backend is here. This bodes well for a speed bump for alternative platforms, I’m especially excited to compile this for Raspberry Pi2 to see how it performs with the hardware accelerated OGLES in SDL2.0.4.

Well it took a couple of days to get the requirements sorted out properly but I finally got it to compile properly and the good news is, it’s playable! Don’t expect miracles but most of the older games seem to be playable with a small amount of frameskip, MESS works too! This is optimized for Raspberry Pi2 and SDL2.0.4

Pop on over to my MAME for Raspberry Pi page to grab a copy!

 

22 Responses

  1. nowhereman999 says:

    Hi Steve,

    I’m very glad you were finally able to compile mame 0.171. In the end did you end up compiling it so that it needs the full desktop X11 version of raspbian?

    I know there were some extra libraries you needed to add. Can you give me a short summary of what’s needed to compile it? Also what was the final make compile command you end up using?

    Besides following your previous mame guide on the RPI (adding the latest versions of SDL as per that same post of yours) Does this look correct?
    sudo apt-get install qt5-default
    sudo apt-get install libxinerama-dev

    Did you end up with only the make command as:
    make -j4 TARGET=mame

    or did you have to be sudo as:
    sudo make -j4 TARGET=mame

    Thanks for sharing your compiled version, but I still want to compile this myself. I finally had it compile the tiny target but all I got was a black screen when I tried to run it with the circus.zip rom and I had to reboot my Pi afterwards… 🙁

    Please let me know what the secret sauce is.

    Thanks,
    Nowhereman

  2. I started with a clean full Jessie build, built SDL2-2.0.4 and SDL TTF like I did for 164, I installed

    sudo apt-get install libqt5widgets5
    sudo apt-get install libqt5qml*
    sudo apt-get install libqt5open*
    sudo apt-get install qt5-default

    from your comment, then I added

    apt-get install libxinerama-dev

    I edited the makefile and added

    ARCHOPTS = -mcpu=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard

    to it

    then it just compiled with

    make -j 4

    I doubt I needed as much of that qt5 stuff as I added but it doesn’t do any harm.

    Don’t forget to up your swap space and lower the gpu split prior to building and reverse it prior to running!

    Good luck mate, thanks for the help!

    • nowhereman999 says:

      Hi Steve,

      Thanks for the help and the quick reply… You Rock!

      I’ll start with a fresh install and I’ll document the whole process. Do you mind if I post this info on my blog? Of course I’ll link to your awesome website and give you full credit. I just like to have full instructions for myself to refer to in the future as well as anyone else who wants it.

      Thanks again,
      Nowhereman

      • Go for it! if you want a place to keep little snippets of code and bash, stuff like that, I’d recommend Github gist

        • nowhereman999 says:

          Cool, I never new about Github gist.

          A quick question about the SDL configure, didi you still use the same options as 164? The reason I’m asking is I had to remove the –disable-video-x11 –disable-video-opengl in order to get my tiny to compile. But that could have been because I didn’t modify the makefile like you did. I just want to be clear that the .configure options for SDL 2.0.4 should be the same as usual:

          ./configure –host=armv7l-raspberry-linux-gnueabihf –disable-pulseaudio –disable-esd –disable-video-mir –disable-video-wayland –disable-video-x11 –disable-video-opengl

          Cheers,
          Glen

  3. nowhereman999 says:

    Thanks for that update, it just saved me a half hour of compiling for nothing. 🙂

  4. nowhereman999 says:

    Wow! Those ./configure options caused me hours of grief and trial and error. With the ./configure options from the buildbot and as you suggested of:
    ./configure –host=arm-raspberry-linux-gnueabihf –disable-pulseaudio –disable-esd –disable-video-mir –disable-video-wayland

    I was getting a black screen when I compiled mametiny…

    SDL2 needs to be configured the same as you had it on your 164 build webpage as (this includes the options –disable-video-x11 –disable-video-opengl):
    ./configure –disable-pulseaudio –disable-esd –disable-video-mir –disable-video-wayland –disable-video-x11 –disable-video-opengl –host=armv7l-raspberry-linux-gnueabihf

    With this .configure my mametiny worked perfectly.

    Nowhereman

  5. Pegaz says:

    Hi Steve, thank you so much for this great work I would try later to compile my own mess build from 0171.
    I can see, that you are interested in the BBC B emulation as I do, but for now I cant manage to find a valid BIOS roms and always get the message “The selected mashine missed one or more required rom …”.
    As far as I know the bbc b emulation required bbca.zip and bbcb.zip files.
    I tried this files from various BIOS rom sets (0149, 0152, 0156, 0158, 0162), but emulator constantly reports this same error message.
    I did some google and see that it looks like a problem in the CRC checksum verification of the BIOS files, just do not know how to solve this.
    Do you have any idea?
    Also, I could not even start Atari800Xl for the same reasons, but I see that you’ve done it, so I was wondering what the bios files you used?
    Thanks.

    • For BBCB I needed bbcb, saa5050 and bbcb_cass/elite.zip in my roms folder. I ran “./mame bbcb elite”, then *TAPE then CH”” It runs at 17% speed, it’s not usable, sorry!

      For Atari800xl I needed a800xl and a800/zybex.zip in my roms folder. I ran “./mame a800xl zybex”, it autoboots and runs at 55% it works but its not useable either

  6. Pegaz says:

    Right now, I try to test your mame0171 build on Pi2, but speed is the same as before.
    Do I need to hange something in .ini file and where is the location of mame.ini in this version?
    I cant find him in main mame directory.

    • I’ve left all the option in mame.ini as their defaults so far except for ”

      artwork_crop 1
      multithreading 1

      if you don’t have a mame.ini next to the mame exe type

      ./mame -cc

      to create a default one

      I’ve overclocked to “High” (1000, 500, 500, 2)

      one last thought… type

      sdl2-config –version

      if it doesn’t say 2.0.4, you don’t have the GLES hardware support so it will be running in software and be slooow

      • Pegaz says:

        Thanks Steve for your help, I really appreciate it.
        I just like to know, do I need to set video option to BGFX or OpenGL or leave it to auto?
        I have libsdl2.04 installed same as libsdl_ttf, but when I set video option (in option menu or editing ini file) emulator wont start and gives me Segmentation error message.
        Otherwise, emulator runs, but obviously in soft mode and its really slow…
        Basically I cant get benefit of faster renedering and dont know what to do next.
        I have every prerequisition installed sam as you pointed out above, but emulator only works in soft rendering mode and slow.
        I didnt try jet to compile myself, becouse I dont know is this would make any difference, becouse you get your binary in same environment.
        Can you give me some hint, what to do next, please?

      • Pegaz says:

        Than you for this clarification, but did you manage to get benefit of this faster rendering and how?

        • The only benefit you get from SDL2 2.0.4 is that when rendering or scaling the screen it does it using hardware acceleration using opengles2

          If you run mame using the -verbose switch and look at the output you can see how it is setting everything up.

  7. nowhereman999 says:

    Hi Steve,

    I think I figured out what is going on with the SDL .configure options. You are right in order to compile MAME you need to use the following:
    ./configure –disable-pulseaudio –disable-esd –disable-video-mir –disable-video-wayland –host=armv7l-raspberry-linux-gnueabihf

    But I am unable to use MAME booting to the console or booting to X11 in the GUI Desktop environment unless I configure SDL (and recompile SDL and do a sudo make install) after compiling MAME with the following which includes X11 and OpenGL like this:
    ./configure –disable-pulseaudio –disable-esd –disable-video-mir –disable-video-wayland –disable-video-x11 –disable-video-opengl –host=armv7l-raspberry-linux-gnueabihf

    Just wanted to set the record straight in case others want to compile it.
    Nowhereman

    • Pegaz says:

      Thank you for this clarification, but did you manage to get benefit of this faster rendering and how?
      I still cant see any speed up, for now…

    • Pegaz says:

      I finnaly made to compile, thanks to your instructions.
      I have few questions and I’ll put them on your blog, if you do not mind

  8. gorgon2016 says:

    I from spain and not speak english very well, have a raspberry pi1. This is a great try to improbe the retro-arcade homebrew in raspberry. I hope the people of this forum not abandoned this big project. If being possible play all arcades by the 164 mame versión (or 170, 171, nevermind) at full-speed in the raspberry without overclockin is the dream of my life.
    I have no idea of programin but I think the executable bin of mame 0.164 is too heavy (most of 60MB?) and some roms more of 20MB. The rpi suffering move this. Maybe cutting the executable in parts (games 1980 to 1981, 1981-1982, etc,) but I might be too hard and exaustive work.
    Hope responses about this, please.

  9. Dan says:

    I’m curious how this performs on the Pi 3. Would it benefit from a recompile or would most of the performance gain be achievable using the same executable?

    • You’d need to recompile for the Pi3, you’d also need to check the archopts to make sure you used the ones optimized for the new processor. I’m hoping this will be fast enough to replace mame4all and gngeo with the improved emulation of the last 20 years. I don’t hold out much hope that anything newer will be playable