Running the MAME arcade emulator on Mac OS X

The free OpenEmu is great for running all sorts of emulators on your Mac with a beautiful frontend, and I heartily recommend it for consoles and computers, but its MAME support is classed as ‘experimental’ – indeed, you need to download a separate build to get MAME supported at all. It works great for most games, but you need to compile your own binary to get sample support for games like Zaxxon, and you can’t get access to the DIP switch settings for games, or advanced configurations.

Thankfully, r0ni works really hard at maintaining a version of MAME that runs natively on OS X (via Command Line, it has no windowed GUI). You can download the latest version here.

Before you try and use it, though, you need to install the SDL2 framework, download it here.

Open the DMG, and copy the SDL2.framework to /Library/Frameworks

Alternatively, you can install it in <Your home directory>/Library/Frameworks if your access privileges are not high enough.

Once that’s done, unzip the MAME release you downloaded, and copy it to your Applications folder.

Next, to make things easy, download a useful little application called M64, here. Unzip it, and put it in your new MAME folder. It’s just a double-clickable application that will launch MAME. The original source for this is here. I found this after I’d been running MAME from the command line for a while (if you want to do it this way, the easiest is to open a Terminal window, drag the mame64 icon to it, and press enter).

Put unzipped game ROMs in the roms folder within the mame folder, and unzipped samples in the samples folder.

You can use your mouse or cursor keys to navigate the menus once launched, and press TAB in-game to bring up the options screen. Remember to setup Input Options (General) or per game, to make sure you can use your chosen controller.

This is enough to get you up and running, and there are lots of resources on the web for using MAME beyond the basics.

Happy gaming!

 


43 thoughts on “Running the MAME arcade emulator on Mac OS X

  1. Will this work on Catalina? I’m running a REALLY old version of MAME from 2001 or 2003. It just works and has followed me from Mac to Mac. I’m sad to lose it.

    Like

      1. Thanks for that confirmation! I just upgraded to Catalina but can’t seem to find the right download for MAME. The link above doesn’t work. Would you mind posting the link here? Thanks

        Like

      2. I’m not sure what you’re asking? All links above work in as much as they take you to the correct pages. If you’re saying the latest version of MAME doesn’t work I’m not sure I can help you, as I don’t have any involvement in it.

        Like

  2. Just wanted to confirm that mame0215-64bit does in fact work fine on Catalina. Just follow the links and instructions above. I needed my Galaga fix. Thanks.

    Like

  3. Thanks for this write up! It helped me get MAME working on my MAC! Do you have any suggested links for getting good ROMs?

    Like

  4. Hi there, much obliged to your beautiful work, both of you (please feel free to forward my regards to r0ni, since i’m not on twitter). I’ve followed all the steps described here, and I get a fatal error when I try to run MAME in Terminal. It says: “Fatal error: BGFX: Unable to load required shaders. Please check and reinstall the bgfx folder”

    I’m sensing system requirements issues here.. are there any? I’m trying to run this on mac os10.11.6 (that’s my mac’s limit for os)

    Thanks again, may you have a great day!

    Like

    1. Have you moved MAME from the location you installed it to? The BGFX folder needs to be in the same place. Failing that, navigate to your mame.ini file and change the ‘video’ setting to OpenGL if it currently says BGFX.

      Like

      1. Thanks for your quick response. No, I haven’t. I only moved the unzipped MAME folder to Applications, as instructed. Then opening a Terminal window and dragging “mame64” to it, pressing enter and I get a brief black screen as if emulater is opening and quicly shuts down giving me the error notice in the Terminal window. (the whole notice saying: “Error opening translation file English Unable to open effect file bgfx/effects/gui_opaque.json Unable to open effect file bgfx/effects/gui_blend.json Unable to open effect file bgfx/effects/gui_multiply.json Unable to open effect file bgfx/effects/gui_add.json Unable to open effect file bgfx/effects/screen_opaque.json Unable to open effect file bgfx/effects/screen_blend.json Unable to open effect file bgfx/effects/screen_multiply.json Unable to open effect file bgfx/effects/screen_add.json Ignoring MAME exception: BGFX: Unable to load required shaders. Please check and reinstall the bgfx folder

        Fatal error: BGFX: Unable to load required shaders. Please check and reinstall the bgfx folder

        Segmentation fault: 11” Also I cannot find any ‘video’ setting in mame.ini file, it has this: ini examples bt601-525.ini bt601-625.ini bt709.ini ntscj.ini p1.ini p2.ini p3.ini p4.ini p7.ini p14.ini p35.ini p55.ini presets gameboy.ini gba.ini lcd-matrix.ini lcd.ini raster.ini vector-mono.ini vector.ini

        Like

      2. As I’m sure you can tell, I’m not a computer expert, though I have an inquisitive nature…

        … and I ran into this “mame.6″ file when searching for mama.ini, and opening that, I found this part that talks about ‘video’ as you mentioned. Is this where I could change the setting if necessary? It seems to be default to OpenGL where it says at the bottom ” Default is ‘soft’ on Linux or ‘opengl’ on macOS.”

        .\” .\” ******************************************************* .SS Video options .\” ******************************************************* .\” +++++++++++++++++++++++++++++++++++++++++++++++++++++++ .\” SDL specific .\” +++++++++++++++++++++++++++++++++++++++++++++++++++++++ .TP .B \-video\fR [\fIsoft\fR|\fIopengl\fR|\fIbgfx\fR|\fInone\fR] Specifies which video subsystem to use for drawing: .br \fBsoft\fR  uses software rendering, which is slower but more compatible. .br \fBopengl\fR  uses OpenGL and your graphics accelerator to speed up many aspects of drawing MAME including compositing artwork, overlays, and bezels, as well as stretching the image to fit your screen. .br \fBbgfx\fR  uses the bgfx renderer which supports portable shaders and multiple graphics APIs including OpenGL, OpenGL ES and DirectX. .br \fBnone\fR  does no drawing and is intended for CPU benchmarking. .br Default is ‘soft’ on Linux or ‘opengl’ on macOS. .TP .B \-numscreens \fR[\fI1-4\fR] Number of screens to create; usually, you want just one. Default is ‘1’. .TP

        Like

      3. Hi, I left replies to the notification email of your reply, not sure if you got these, so I’m leaving it here now. No, I haven’t moved the MAME, apart from moving the unzipped folder to Applications as instructed, so everything is there with the MAME folder. I drag the ‘mame64’ to a Terminal window, press enter, the screen goes black as if the emulator is opening, then quickly turns back to the Terminal window with this message:

        “Error opening translation file English
        Unable to open effect file bgfx/effects/gui_opaque.json
        Unable to open effect file bgfx/effects/gui_blend.json
        Unable to open effect file bgfx/effects/gui_multiply.json
        Unable to open effect file bgfx/effects/gui_add.json
        Unable to open effect file bgfx/effects/screen_opaque.json
        Unable to open effect file bgfx/effects/screen_blend.json
        Unable to open effect file bgfx/effects/screen_multiply.json
        Unable to open effect file bgfx/effects/screen_add.json
        Ignoring MAME exception: BGFX: Unable to load required shaders. Please check and reinstall the bgfx folder

        Fatal error: BGFX: Unable to load required shaders. Please check and reinstall the bgfx folder

        Segmentation fault: 11″

        in mame.ini I get this:

        .\”
        .\” *******************************************************
        .SS Video options
        .\” *******************************************************
        .\” +++++++++++++++++++++++++++++++++++++++++++++++++++++++
        .\” SDL specific
        .\” +++++++++++++++++++++++++++++++++++++++++++++++++++++++
        .TP
        .B \-video\fR [\fIsoft\fR|\fIopengl\fR|\fIbgfx\fR|\fInone\fR]
        Specifies which video subsystem to use for drawing:
        .br
        \fBsoft\fR uses software rendering, which is slower but more compatible.
        .br
        \fBopengl\fR uses OpenGL and your graphics accelerator to speed up many
        aspects of drawing MAME including compositing artwork, overlays, and
        bezels, as well as stretching the image to fit your screen.
        .br
        \fBbgfx\fR uses the bgfx renderer which supports portable shaders and
        multiple graphics APIs including OpenGL, OpenGL ES and DirectX.
        .br
        \fBnone\fR does no drawing and is intended for CPU benchmarking.
        .br
        Default is ‘soft’ on Linux or ‘opengl’ on macOS.
        .TP

        Is this the part where I could change the setting, while it does say ‘opengl’ at the end there..

        Hope this helps to locate my problem or no problem, so where to look next if possible.
        Thanks for your help in any case!

        Like

  5. Open a Terminal window. Type: “cd ~/Library/Application Support/mame”.
    Delete mame.ini from there.
    Then cd to your mame folder in Applications and run “./mame64 -createconfig”.

    Also, make sure the ‘bgfx’ folder is present in your mame directory.

    Like

    1. Success!! Our combined efforts did it 🙂

      Had to google how to use Terminal on the mac for a better comprehension of the ‘cd’ thing etc. The first thing you said to enter gave me “no such file or directory”. Initially, after unzipping the mame folder and copying it to Applications, it was called “mame0221-64bit”. So I changed that to simply “mame” yet still “no such file or directory” upon entering “cd ~/Library/Application Support/mame” (as indeed, I cannot find any mame folder in Application Support).

      After comprehending how to “cd to your mame folder in Applications” (by typing “cd /Applications/mame” in Terminal window) that worked when pressing Enter. Then running “./mame64 -createconfig” suddenly showed the mame.ini file in the mame folder in Applications, and before deleting it as you suggested, I tried to run mame64 first by now dragging it to the Terminal window and TADA upon Entering it fully opened up (so even without deleting mame.ini).

      Another round of trial and error to found out how to get the right keyboard settings for game play, and off it went for this Outrun and Racing Hero xD (pressing Tab key by accident gave me direct access to the setting menu, just for those absolute noobs like me I’m giving this full review of what I did… I was going to call myself ‘nerd’ but that’s your tag already as a full expert, so… still I had to smile, because “One Nerd’s Journey” pretty much sums it up for me here xD

      Next on my adventures is to install the M64 app for easy start-up… hey, it’s the little things in life, right!
      Thanks again, so much, just what I wanted to be able to play on my mac, it’s now a dream come true .)

      Take care!

      Liked by 1 person

    1. Thanks for pointing me in the right direction. On version 0222 the createconfig command puts the files in your home folder. After editing OSD video to opengl (line 251 in mame.ini), all working fine for me now.

      Like

  6. Does someone know why I get the error “use a different machine”
    The roms worked great in a previous emulator, but now the most don’t.

    Please advice!

    Like

    1. I haven’t seen that error, and would need a little more information to try and help. And when you say you’ve used ROMs with a previous emulator, do you mean a different version of MAME on the Mac, or something like FB Alpha?

      Like

  7. Mate you’re a star!
    2012 Mac and this has got me playing arcade original versions of ridge racer and the best shmups ever! Your instructions were perfect and I got PS4 controller linked via Bluetooth easy no cables, just set up controller in general options input as you said, it crashed afew times initially but seems ok now, it says it’s saved controller settings but I seem to have to repeat it each time I start anew session is that normal? I’m on cantalina, couldn’t see how to get OpenEmu working so happy I found your post!

    Like

    1. You’re welcome, glad this page helped! I don’t use Catalina, but it sounds like perhaps for some reason MAME isn’t saving a .cfg for your PS4 controller. Have a look in Applications/mame/ctrlr/ and see if there’s anything there that looks like it references the PS4. Otherwise it may be possible to create one if you know what the inputs map to. You’re definitely choosing to map your controls in the general inputs, not per game?

      Also, OpenEmu 2.1 should work on Catalina, but this is in their release notes: “IMPORTANT: Due to new security rules in macOS 10.15 Catalina, in order for keyboard input to work you MUST grant OpenEmu “Input Monitoring” access in the Privacy pane of Security & Privacy preferences.” – You’d also still need to download the ‘experimental’ version to get MAME support.

      Like

  8. Thnx yes granted open emu access
    It just finds a fault with every mame file I try and add to library
    And it doesn’t list mame with all the other consoles so not sure if u manually have to add the core? I have the experimental version
    Re.ps4 saves it keeps them per session, so on every game I play, but then forgets must of the selections next session, not all, just some, weird lol but there’s so few inputs on arcade machine it’s not an issue
    So cool to be able to add as many credits as u want, I love having the exact arcade code!!

    Like

    1. You need to read up on merged and non-merged romsets for MAME. Go with non-merged for the best chance of getting them running. OpenEmu also lists MAME games in the ‘Arcade’ system at the top of the list of consoles.

      Like

  9. Hi there. I’m having trouble transferring SDL into my Frameworks file. It won’t allow it and I’ve tried to change the privileges but to no avail. It says I don’t have permission yet it is my computer and I am the only user. Any advice would be very welcome. Thanks.

    Like

      1. I was trying to install it into the Frameworks folder in the system library. I have tried using my user folder library, and although I can see SDL in there, I cannot run Mame when I follow the steps in terminal, so I am completely stuck.

        Like

    1. Having just googled it I’m not sure it’s worth the risk just to play Metal Slug. Thanks for you help though.

      Like

      1. Thanks but for some reason I can’t play most arcade games on Openemu either. i have the bios downloaded but only a few retro arcade games work (For example: Sunset Riders and Robocop 2 work, but not Neo Geo games, or Bad Dudes or Robocop 1). Don’t suppose you know where I going wrong there do you? I appreciate you’ve already given me plenty of your time.

        Like

  10. hello, I have a issue, when I running “./mame64 -createconfig” in the Terminal window, it shows
    “dyld: Library not loaded: @rpath/SDL2.framework/Versions/A/SDL2
    Referenced from: /Applications/mame/./mame64
    Reason: image not found
    Abort trap: 6”
    then nothing happen…
    I already copy SDL Frameworks into /Library/Frameworks, and put ROMS into roms folder, is the roms have wrong? I put files(299-p1.bin&299-p2.bin & 299-s1.bin) in /Applications/mame/roms/mslug3b6
    PS: I also try download M64.app into mame folder and run, no work….
    pls help, thanks.

    Like

  11. Hello, since the latest Big Sur MacOS 11 update my sdlmame doesn’t work anymore! It works only if I write on the terminal ./mame64 -video metal but I see some video glitches at the start of every game roms (when it tells the specs of the rom) and the res seems a little more pixellated this way.
    If I try ./mame64 -video opengl instead I could see just a portion zoomed of the screen in my display (the bottom left part of MAME).
    If I try to run normally instead there are those error messages and just black screen (and yes BGFX folder is in same folder, and I reset the .ini with -createconfig

    2020-11-22 12:45:41.804 mame64[2201:72651] ApplePersistenceIgnoreState: Existing state will not be touched. New state will be written to /var/folders/hw/cnzxghsx76xcr45y2gcg8l4r0000gn/T/org.mamedev.mame.savedState

    In the Mac privacy setting I’ve inserted mame64 in each of them (keyboard, folders, accessibility)

    Thank you in advance!!

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s