31 December 2020

Setup MAME 0.227 from scratch on Macs (Update December 2020/January 2021)

Another update on how to configure MAME from scratch in the very preferable way, which is
via its internal interface MEWUI (default MAME UI since 0.171) and a text editor.
  
If you are willing to work with your Terminal and a Text Editor, it is by far the best way to set up and maintain MAME, irrespective of which frontend you wanna use later on.

So let's go step by step from scratch. 
MEWUI - click to enlarge
Step 1 - Basic Homework 

Download and install SDL 2 as explained here. Download a good text editor - I now use Atom - https://atom.io, which needs a bit of a learning curve, but it's a very decent Open Source editor.

Change Finder Settings in order to display hidden folders and files, e.g. with Deeper (you need access to your User Library folder, which is by default a hidden folder). Another very smart way to display hidden folders and files is this key combo in the finder: SHIFT-CMD-. 

Shift - CMD - . and you see the hidden files greyed out, but fully accessible, very neat!

Of course, download MAME from here and unzip it into the place of your choice. Obviously this is the SDL version of MAME complied for Macs.

Recommendation: I currently keep my running MAME version in the folder 'mame' and keep only older versions in a version-related directory. This definitely helps you further on to stay consistent and carry on your work from version to version.

Step 2 - Create .ini files in the Terminal and manually configure ini paths

After a lot of testing, my recommendation is to create your first .ini files from the Terminal. This should save you from a lot of headache by multiple .ini files that just cause confusion.

  • Start Terminal and cd into your directory of MAME (recommendation: name your main directory mame, see above)
  • Now in the Terminal and in the right directory, the command ./mame64 -cc generates the three default config files in your mame directory:
mame.ini - your overall configuration file for MAME
plugin.ini - your configuration file for activating and deactivating MAME Plugins
ui.ini - your configuration file for the MEWUI interface
  • By default, mame.ini contains the following multiple ini paths:
inipath  "$HOME/Library/Application Support/mame;$HOME/.mame;.;ini"
Recommendation: In my own experience, this is rather unfortunate, because you may end up with multiple .ini files at multiple places rather easily. Since MAME then considers all these .ini files in a certain order, you may be lost in chaos. Right now, I actually prefer having all .ini files in the MAME sub-directory called ini, thus I reduce this line as follows:
inipath                   ini
This means of course that you have to move the three .ini files created in the first step into the ini subdirectory. As long as you do not forget about the ini directory when moving to a new MAME version, this is probably easiest to handle, and the /Library/Application Support directory stays clean of MAME config files
 Step 3 - Start MEWUI (the right way)

Open Terminal and switch to your MAME working directory (easiest way: type 'cd' and then drag the mame directory from the Finder into the Terminal -> press Return in the Terminal window)

Warning: starting mame64 with double-click does not work in the right way -> so start via Terminal as explained here. So you must be in the MAME working directory!

27 December 2020

MAME and MacOS Catalina (Update December 2020)

Update 28 December 2020: I finally updated my iMac Late 2013 to Catalina - and everything works in MAME as expected. 

Interestingly, nothing of the concernes raised in the community back in January actually turned out to affect the Open Source community. Homebrew has now been in Catalina development for more than a year, and this update took quite a while, some hickups included, which I however could resolve with Google.

19 December 2020

Intel UHD (bad for MAME) and macOS Big Sur 11.1 first impressions

As already anticipated in this post, probably any Intel Macs with Intel UHD Graphics are a quite bad choice for MAME. Here is new proof with the probably very latest Intel Mac mini, a machine that I otherwise very much like. 

But as also barefeats.com explain here, these Mac minis 'scream for an eGPU' when it comes to gaming and other GPU-intensive tasks.


This Mac mini has it all - except for the GPU.

For all Mac Users out there that are struggling with MAME performance - just check your GPU and forget about the rest. If you have some Intel UHD Graphics installed, you already know the culprit. Shaders will then not perform nicely, and also Bezel Artwork. So here is some numbers with identical MAME versions and identical ROM files.

21 May 2020

ARCADE - the better MAME for most of us (R0ni build link included)

Update May 2020: R0ni now provides official Mac builds for MAME Arcade in the directory of his site listed below.


There is a subproject of MAME, fully on par with the official project, but which can be easily overlooked. If you are willing to compile and build your own romset, this is the best MAME for most of us.

Website: https://arcade.mameworld.info
GitHub repo: https://github.com/Robbbert/store1
Official binaries: sorry, there are no longer official builds available, and it was not R0ni's decision 😑. So I will look into that once again and may build unofficial Arcade builds - but please look into the easy build instructions below.


The Arcade internal MAMEUI has a customized colour palette, which I much prefer over the standard palette. Otherwise standard MAME functions, which is good.
What is it?

- Working Arcade games only (so skeleton drivers or games booting into a black screen)
- No mechanical games (pinball games etc)
- No casino or gambling games
- No computers, consoles, terminals, etc.
- No games that display a black screen

26 April 2020

Standalone Spinner for MAME - The one and only How-To!

Arkanoid ... finally!

Arkanoid was very popular amongst us youngsters. I was one those that managed all 100 levels, but certainly not with just one coin. I also think that this was just manageable in the cocktail table version due to the stamina and focus required for this difficult game. We typically used to take the challenge by two, so that after dying, you could relax a bit while the other guy plays, and that worked out quite well.

A spinner for MAME has always been in my plans simply because of Arkanoid. But I always hesitated because I wanted a standalone spinner (for reasons stated below), while basically all online instructions relate to integrating a spinner into your overall arcade control panel.

Now, finally, it is there and works just perfectly.

My prototype with cardboard. As you can see, very decent styling.
I might even stick with the cardboard version because it works so well.

02 April 2020

Funding for OSX MAME Website during Covid19 time - please do consider!

This is a post during the Covid19 Lockdown:

Jay, the maintainer of https://sdlmame.lngn.net/, is directly affected by the Covid19 lockdown, and he kindly asks for assistance to keep his site up and running:

https://www.gofundme.com/f/save-lngnnet-services?d=tueAWZxgx3lwv%2B67DwkexMpwQQV7JY7L7yRHDj9Qc5g%3D

I did my part, and please consider to do the same. Thanks indeed.

12 January 2020

Update MAME 0.217 - Low Latency (WIP) and 60.000 views :-)

Update 15 Jan 2020: Performance tests with nine of my reference games indicate no performance losses when activating Low Latency

In the terminal, cd into the mame folder and run:

./mame64 -video bgfx -str 60 -noafs -bgfx_screen_chains crt-geom -bgfx_backend metal -noreadconfig -nosleep -nothrottle -lowlatency [game]

./mame64 -video bgfx -str 60 -noafs -bgfx_screen_chains crt-geom -bgfx_backend metal -noreadconfig -nosleep -nothrottle -lowlatency [game]

The test results are either identical or even in favor of low latency. MAME 0.217 is also a hot performer, so the BGFX shaders now really perform flawlessly. I could not be happier with current MAME performance-wise.

Update: With MAME 0.217, you can configure Low Latency within MAMEUI! I explained here how to properly access MAMEUI.




Thanks to a visitor of this blog (hi, Borsuk 😊), I became aware of a new MAME option that introduces a mode with lower input latency. 

As so often with MAME, info is rather scarce, both the Github commit and the MAME documentation explain the minimum:
https://github.com/mamedev/mame/commit/eab5bcac0029e4e298e1f194133c21580098508d
https://docs.mamedev.org/commandline/commandline-all.html (search for "lowlatency")

Things to consider:
  • In running systems, you need to add the option to your existing mame.ini (and of course also in any game-specific inis).
  • Currently the default is 'off' because of the potential side effects in some systems.
  • First check whether your mame version is capable. Then you can look into your current configuration. In the terminal, within the mame directory, execute: 
    • ./mame64 -showusage - under the header "CORE PERFOMRMANCE OPTIONS" you should find the following entry: 
      -lowlatency          draws new frame before throttling to reduce input latency
    • then ./mame64 -showconfig - under the header "CORE PERFORMANCE OPTIONS" you should find: 
      lowlatency                1
    • 1 for on or 0 for off. If not, you have to add it in your mame.ini
So is it worth the hassle? I am undecided right now. Further testing is needed.

And this blog reached 60.000 views since I started back in 2016. Thank you for all of you that are still into reading old-fashioned Blog entries. While I see the advantages of YouTube instructions in some cases, I still prefer sharing know-how as text - particularly because I try to update my posts if it makes sense and put them to a later date in this blog.

24 December 2019

Christmas 2019 - Updating MAME Bezels - 4k Bezels by ArsInvictus

As a small Christmas present, I have started updating my Github repo consisting mainly of John Merrit's fabulous bezels:


Main priority is to smoothen down the corners, one of the bigger flaws of these bezels. Just have a look at all bezels until (including) frogger, they look significantly better.

Everything else is explained here:

Finally, do not miss out on these incredible new 4k bezels by ArsInvictus:

https://forums.libretro.com/t/new-4k-bezel-overlays/25247/73

On his Dropbox link, you will also find a dedicated MAME directory that already includes the .lay files. With his kind permission, I will include some of his bezels with those of John Merrit because they often match perfectly.

Enjoy and Merry Christmas!

17 November 2019

MAME in Retroarch 1.8.1 - Mac and iOS (WIP)

Work-In-Progress: collection of my experience in using Retroarch on Macs and on my iPad for quite some time, i.e. approx. 2 years; during that time it made tremendous improvements and added a lot of interesting cores

Disclaimer first: Retroarch (at least on Macs and iOS devices) is very fluid and sometimes experimental. Crashes occur. For a stable MAME experience, I still recommend official MAME as the main focus of this Blog.

Valid reasons for trying out MAME in Retroarch:
  • Retroarch GUI (RGUI): if you get used to this joypad-centric kind of configuration, it is very useful; during a running game, you switch to RGUI, change config and see results (this is a very disputed topic, and Retroarch opponents will call RGUI as the main problem, but for me, after quite some time, it is a very good way to test stuff) 
  • Abundance of configuration options: again, many hat this, but these various config options show how much innovation happens in Retroarch; and they are worth testing
  • Joypad support: great to fine tune - you will spend a lot of time here!
  • Shader options: you can configure a lot of shader options if you are really into it
  • Latency options: are quite interesting for the very competitive gamer
  • Cross-core UI: if you run other cores, e.g. for consoles, you gain experience and can use this for MAME as well
  • No bezel artwork: if you do not care about MAME artwork
  • Because it's fun testing: just for learning Retroarch, I just enjoy experimenting with all these possible configuration possibilities
Mac vs Retroarch iOS

31 October 2019

MAME 0.215 - clear BGFX Performance Improvements (WIP)

Yesterday MAME 0.215 came out, and the Changelog also refers to changes in the BGFX shader. While the main change, the implementation of a Vulcan shader, is entirely unrelated to MacOS, my initial performance tests with the usual candidates show massive performance improvements.

System: MacOS Mojave 10.14.6
MAME: official build 0.215 (http://sdlmame.lngn.net/)
Terminal command: ./mame64 -window -video bgfx -str 60 -noafs -bgfx_screen_chains crt-geom-deluxe -bgfx_backend metal -noreadconfig -nosleep -nothrottle (ROMFILENAME

Example 1942 (Revision B): 765.06% in MAME 0.201, 907,94% in MAME 0.215

Details to follow, I hope.


17 October 2019

Attract Mode 2.6.0

Two days ago, Attract Mode 2.6.0 has been released, and you can currently grab the Mac dmg only here on the Github website:
https://github.com/mickelson/attract/releases
According to the changelog, this is an interim release that improves stability of the software. This is always welcome and worth a post. It's a great piece of software.

04 October 2019

The State of MAME in October 2019

No post for a very long time - because basically everything works on my Mac as it should be. Here is the current state of MAME in October 2019 (updated 10 October 2019 once again).

Core: MAME Mac Binary

First and foremost: MAME, currently v.214, is rock stable in MacOS Mojave. Everything that I wrote in this Blog still applies:

- MAME installation from scratch
- What I said about MAME in November 2018 and further links inside this post

The developers keep staying extremely busy and the system just further evolves. Enhancements in my favourite Arcade games stay moderate, but they are all nearly perfect anyway. Game & Watch enhancements deserve to be mentioned, they all become more and more real eye candies - it is nice to remember these first handheld times.

A fast photo of a Game&Watch game, please excuse the moire.
Frontend:Attract Mode

The same applies to Attract Mode, my favorite MAME frontend on Macs. Version 2.5.1 is nearly one year old, but still rocks. The more adventurous can compile a version with the latest minor tweaks - I explained in my Blog how this works:

- Attract Mode - how to compile
- Attract Mode HowTo, part 1
- Attract Mode HowTo, part 2

Another very stable software for your Mac.

Attract Mode/Cosmo Arcade Display on my Mac - you cannot ask for more
Shaders: BGFX/Metal/CRT-GEOM-DELUXE

01 February 2019

BGFX in MAME - Tweaking and In-Depth Look (plus a video) - Update January 2019

BGFX really rocks and after some MAME Updates, it became my standard shader.

Update January 2019: MAME 206 corrects the HLSL shader, so the purple screen is gone.
The 'Scale' values as described below are now in lines 186 and 191. Now I need to head for the new phosphor settings and update the below table for HLSL settings (I still do not like the default settings that much). Below you find the updated table of my current HLSL settings plus the Scale values for the lines 186 and 191.

Update December 2018: Since the October 2018 release, the HLSL shader has been updated by phosphor settings. As a result, BGFX/HLSL produces a purple picture, at least on my Mac in both MacOS and Linux - is this an SDL MAME problem? I am still investigating into that, and for the time being, I stay with BGFX/CRT-GEOM-Deluxe, which still provides very decent results.


HLSL under Windows (Bootcamp)
HLSL under MacOS and Ubuntu
Since both MacOS and Ubuntu is affected, this could point to an SLD problem.


23 December 2018

Using and configuring Joysticks with M.A.M.E./QMC2 - Update December 2018

Update November 2025: I updated my controller-ps4.cfg below, as the button assignments changed over time, maybe through an SDL update. Otherwise, everything should still be valid as back in 2018 :-).

Update December 2018:
 
First thing to do is to test whether your joystick is fully functional under MacOS. The easiest way to do is to use an online Gamepad Tester like this one:
http://html5gamepad.com/
This gives you a basic understanding of whether your gamepad works in your OS or not. In the case of the PS4 controller, for example, everything shows up under Safari (Google Chrome misses out on the PS Button as B12), which gives you a good first feeling that this joypad should work in MacOS software.

Second, if it works, you have two choices: 

1. Leave it as is: My first joypad, for example was a Logitech F310 Gamepad, a good choice. Switched on the backside to Direct Input, it runs out of the box in QMC2. No drivers under MacOSX required.

Update November 2016: Since the X Input mode emulates XBox controllers, I gave this XBox driver from Github a try - and it works! The immediate advantage is that all things are configurable in the MacOS System Settings, and RetroArch automatically assigns the joypad to XBox configuration, which is nice. Further insights will follow, but that's a good thing. It is fully compatible with MacOS Sierra.




As a second joypad, I went for a PS4 controller, and this thing rocks, both on USB and Bluetooth. No additional drivers required. Build quality is superb, this is a clear recommendation. It is still my favorite joypad for MAME.




Read further for MAME Joystick settings...

MAME in MacOS 14.14 Mojave, Thoughts on Significance of GPU

After the hickups around upgrading iMacs equipped with Fusion Drives have been sorted out, I upgraded to MacOS Mojave. Also for MAME, it was definitely worth it.

For all of you having Fusion Drives plus Bootcamp on your Mac - it is finally safe to upgrade, provided that you first backup your Windows data, delete your Bootcamp partition and do the upgrade to Mojave thereafter: https://support.apple.com/en-us/HT209057 (worked perfectly for me). My Fusion Drive is finally on APFS. Also the installation of Windows 10 via Bootcamp was entirely flawless.

Speaking of Mojave - I really love the new Dark Mode.

 

So what about MAME in Mojave - here I have really good news. From my first benchmark tests, Mojave seems to bring quite consistent performance increases to MAME running BGFX/Metal. This is the command from the Terminal:
./mame64 -window -video bgfx -str 60 -noafs -bgfx_screen_chains crt-geom-deluxe -bgfx_backend metal -noreadconfig -nosleep -nothrottle ROMFILENAME
In both instances the current MAME 0.204, with and without Artwork

Game
High Sierra
Mojave
1942 (Revision B)
743.95% / 761.62%
 771.05%/767.06%  
1943
707.83% / 760.09%.
704.09%/761.15%
3wonders
577.99% / 582.34%  
822.15%/604.72%
elevator
588.24% / 587.99% 
603.27%/604.03%
gyruss
370.31% / 379.10%
545.74%/590.24% 
Inthunt
584.24% / 570.71%  
615.52%/592.22%
mslug
605.41% / 610.59%
610.48%/619.22%
offroadc
149.43% / 167.06%
285.55%/284.72%
rtype
676.01% / 631.30%
696.62%/658.33%

I immediately noted the quite significant performance in Gyruss and Offroad Challenge. Which brought me to a long-standing question:

How important is the GPU of your Mac for MAME performance?

01 December 2018

41.000 page views later ... the state of MAME on MacOS

I remember January 2016, when I started this Blog. MAME on MacOS was working, but a somewhat limited venture with scarce information being available on the Internet. I started this blog based on my own trial and error attempts. Since then a lot has changed to the better. 44 posts and 41.000 page views later, it's time to have a look at the current state of MAME on Macs.  

The bright side of things:
The mixed picture:
  • With newer versions of MAME (still have to figure out since when), the CRT-GEOM OpenGL shaders tested here no longer work. So you need to rely on BGFX with similar performance in the CRT-GEOM shader, which is basically no problem.
  • Retroarch/MAME would be great, but only old versions work on Macs. The MAME/current core is outdated. MAME 2010 is decent for old school games, but from time to time buggy in my own testing. I am unsure about the stability of the Metal driver of Retroarch, it seems to crash from time to time. Retroarch/MAME under Ubuntu is a by far more stable experience (though it also has its limitations). I am particularly missing the brilliant Runahead feature in MAME/current cores (for Linux as well). So while I am constantly looking into this, current limitations are too many for a good MAME experience. 
  • What about OpenEmu? While I really appreciate their Mac approach on emulation, it simply comes with too many limitations in MAME - for a reason the MAME emulation is only experimental in OpenEmu. OpenEmu seems to use version 0.169 of MAME, and if I am not mistaken, this is also where Retroarch/MAME currently stands. Despite the higher learning curve, I would prefer Retroarch over OpenEmu.
What is still true for MAME in overall:
  • For best MAME experience, you should not shy away from text editors and config files. You will have a better system if you do your configuration in these files manually. Don't rely on frontends for configuring MAME - but go this way:  https://mameonmacs.blogspot.com/2017/05/mame-0185-from-scratch-via-mewui-update.html
  • Shaders and in-game artwork (bezels and backtrops) make a huge difference. Just have a look at the title picture of this Blog, and you'll understand.
  • Also have a look at the special realistic artwork bezels that I am building up in this repository. I am still blown away by their quality (mainly created by John Merrit and Orionsangel): https://github.com/estefan3112/MAME-Realistic-Bezel-Artwork
Since MAME lives from the community, may I repeat that any feedback form your side is much appreciated! Apologies for missing out on them from time to time, but I surely read them all. 

29 November 2018

41.000 page views later ... the state of MAME on MacOS

I remember January 2016, when I started this Blog. MAME on MacOS was working, but a somewhat limited venture with scarce information being available on the Internet. I started this blog based on my own trial and error attempts. Since a lot has changed to the better. 44 posts and 41.000 page views later, it's time to have a look at the current state of MAME on Macs.  

The bright side of things:
The mixed picture:
  • With newer versions of MAME (still have to figure out since when), the CRT-GEOM OpenGL shaders tested here no longer work. So you need to rely on BGFX with similar performance in the CRT-GEOM shader, which is basically no problem.
  • Retroarch/MAME would be great, but only old versions work. The MAME/current core is outdated. MAME 2010 is decent for old school games, but buggy in my own testing. I am unsure about the stability of the Metal driver of Retroarch, it seems to crash from time to time. Retroarch/MAME under Ubuntu is a by far more stable experience (though it also has its limitations). I am particularly missing the brilliant Runahead feature in MAME/current cores (for Linux as well). So while I am constantly looking into this, current limitations are too many for a good MAME experience. 
  • What about OpenEmu? While I really appreciate their Mac approach on emulation, it simply comes with too many limitations in MAME - for a reason the MAME emulation is only experimental in OpenEmu. OpenEmu seems to use version 0.169 of MAME, and if I am not mistaken, this is also where Retroarch/MAME currently stands. Despite the higher learning curve, I would prefer Retroarch over OpenEmu.
What is still true for MAME in overall:
  • For best MAME experience, you should not shy away from text editors and config files. You will have a better system if you do your configuration in these files manually. Don't rely on frontends for configuring MAME - but go this way:  https://mameonmacs.blogspot.com/2017/05/mame-0185-from-scratch-via-mewui-update.html
  • Shaders and in-game artwork (bezels and backtrops) make a huge difference. Just have a look at the title picture of this Blog, and you'll understand.
  • Also have a look at the special realistic artwork bezels that I am building up in this repository. I am still blown away by their quality (mainly created by John Merrit and Orionsangel): https://github.com/estefan3112/MAME-Realistic-Bezel-Artwork
Since MAME lives from the community, may I repeat that any feedback form your side is much appreciated! Apologies for missing out on them from time to time, but I surely read them all.

19 November 2018

Attract Mode 2.5.1 released and MAME Exit Freeze Resolved

While Atteact Mode undergoes further improvements with a release of v.2.5.1, the really big news of this weekend is that a forum user finally found the right settings under Windows 10, and this immediately resolved my problems in MacOS High Sierra as well:

The only thing I had to change was in the Emulator settings - specifically for MAME:
Non-blocking wait mode - change from 0 to 1

That's all. Now MAME correctly exits back to Attract Mode on my machine just as before. No hanging black screens and force-quit of AM any longer. Very good - kudos to user mrteeney!

Sources:
http://forum.attractmode.org/index.php?topic=2589.0
https://github.com/mickelson/attract/issues/374


28 October 2018

Brief Update on Attract Mode 2.5 official (Update 2 on 11 Nov)

Update 2 - a word of caution: Since I updated to Attract Mode 2.5, I am another victim of the infamous 'MAME loses focus' bug as described here:
http://forum.attractmode.org/index.php?topic=2589.0
This bug makes the Attract Mode - MAME combination unusable because I need to force quite Attract Mode every single time I exit a MAME game. So if you have an older running system, it might be a good idea to avoid it for the time being.

Update: Attract Mode 2.5 has been released - so grab the Mac binary and enjoy!


Attract Mode has again become better. Now there is really nothing to complain on Macs as well. I also include instructions how to compile Attract Mode by yourself.

A fast photo taken from my iMac running Attract Mode and Cosmo's Layout
My recommendations for running Attract Mode with MAME:

1. Compile your own binary, it just works and you have some very nice improvements implemented (most of all, very fast artwork loading). What you need is not that much:
(a) Homebrew: you should have it installed and be accustomed with it
(b) Homebrew recipies "pkg-config", "ffmpeg", "sfml" and "libarchive" 
(c) Get the Attract Mode source code from github: https://github.com/mickelson/attract
(d) Move the source code to /private/tmp/ - the source code will be deleted at reboot
(e) In the Terminal, switch to the following Attract Mode source code subdirectory:
       /private/tmp/attract/util/osx
(f) Execute the following script in the Terminal
       ./create-pkg.sh
This creates a MacOS package for installing Attract Mode via Drag&Drop in the attract directory.


2. Recommended Layout: Cosmo Arcade

3. For instructions on setting up Attract Mode and Layouts, just search for 'attract' in my blog or just jump to this post:


Should you still hesitate, believe me: It is really worth the time. Best gaming experience you can get on your Mac.

01 September 2018

MAME 0.201 - Major BGFX Performance Achievements!

We have been waiting for this for a long time: MAME 0.201 finally fixes the problem with BGFX when running Artwork Bezels 

As of MAME 0.201, you can run BGFX/Metal shaders along with Artwork bezels without taking a huge performance hit. This is really great news. BGFX/Metal is finally becoming stable on Macs.

Just to remind you why Artwork matters (click to enlarge):


My iMac running 1943
My iMac running 1943 with Artwork












Here is my testing of MAME 0.200 vs. 0,201 in BGFX/crt-geom-deluxe/Metal with Artwork/without Artwork - from the Terminal in the MAME main directory:
./mame64 -video bgfx -str 60 -noafs -bgfx_screen_chains crt-geom-deluxe -bgfx_backend metal -noreadconfig -nosleep -nothrottle (-nobezel) (romfilename)