23 December 2018

Using and configuring Joysticks with M.A.M.E./QMC2 - Update December 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:
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

High Sierra
1942 (Revision B)
743.95% / 761.62%
707.83% / 760.09%.
577.99% / 582.34%  
588.24% / 587.99% 
370.31% / 379.10%
584.24% / 570.71%  
605.41% / 610.59%
149.43% / 167.06%
676.01% / 631.30%

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. 

Setup MAME 0.204 from scratch on Macs (Update December 2018)

Another update on how to configure MAME from scratch 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 just 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 prefer TextWrangler from the Mac App Store (which is phased out now, so I have to look for a new one). 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). 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"
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 works, but you are not in the MAME working directory, so a lot just does not work -> start via Terminal as explained here. So you must be in the MAME working directory!