29 April 2017

MAME 0.185

Also this update from Wednesday brought no surprises. 

The binary bottle in Homebrew has also been updated. And the BGFX Metal bug is still with us.

I am currently quite occupied with MAME on my Raspberry Pi, which is sometimes a completely different ballpark due to its performance limitations. Still it is incredible fun, and there might be some learnings for low-performing Macs as well. 

29 March 2017

MAME 0.184, Xcode 8.3 and 10.250 pageviews :-)

Today brings version 0.184 of MAME, which I compiled under brand new MacOS 10.12.4 and Xcode 8.3. I am also very happy to report 10.250 pageviews of this blog, which is very encouraging.

Compile was flawless as always. Performance seems in line with previous versions, BGFX Metal bug is still here. So it seems fine for us MAME users to upgrade.

Page statistics show the clear need for shader documentation, in particular BGFX, as well as Artworks. Quite as I anticipated, and I will try to keep focus here. Thanks for your interest.

22 February 2017

MAME 0.183 - Solid 20th Anniversary Release

Today brings us a special MAME release, and changes are many. The Mac binary compiles nicely as always from source and some performance tests indicate that this is rock stable. Also the Homebrew version of MAME made a jump to this version and is now up to date. All in all everything works as expected - and also does not work. Thus no news on the BGFX-METAL bug, but that was not to be expected anyways.

13 February 2017

Porting Retropie/Retroarch Artwork in 16:9 (John Merrit) to official MAME

Short Update October 2019: Mr. Do provides a very nice simple MAME .lay file generator here:

http://mrdo.mameworld.info/mame_lay.php


There is incredibly realistic MAME Artwork for Retropie/Retroarch systems out, and I started re-writing them to run for the official MAME build. Work is mainly based on John Merrit's great work and Mr. Do's Layout Files, and the effect is amazing. This also shows the power of the yet simple MAME artwork system. Creativity is your only limit.
Update: I modified the layout file in a way that you can now switch on/off the scratches and reflections on the screen
Update 2: I started a Github repository (see below link).

Within the Video Mode options, you can now choose between:
  • Clear Screen - the screen is shown without any reflections and scratches
Clear Screen - Click to Enlarge


  • Scratch Screen - the screen shows all the reflections and scratches. On top, you can manipulate the Screen Alpha Channel separately from the cabinet. - thereby you manipulate the intensity of the scratches on screen only!
Scratch Screen - Click to Enlarge

27 January 2017

Attract Mode for OSX MAME - Setup Part 2

Mini-update January 2024: In current versions of RetroArch, the cores are placed under "Application Support" of your user. This path must also be set in "....", otherwise RetroArch does not start. Corrected below and marked in red.

After successful completion of Part 1, there are many further opportunitites to tweak Attract Mode for MAME for your own needs.
Here is a collection of useful hints for further fine tuning of the Attract Mode setup:
  • Configure the Attract Mode Intro Video
  • Configure history.dat to display within Attract Mode
  • Assign game-specific configurations for Attract Mode only
  • Other Emulators (WIP)
  • Including RetroArch Cores (WIP - huge!)
Here are the details:

26 January 2017

MAME 0.182, and BGFX-metal Bug registered

I compiled yesterday's MAME 0.182 and today's QMC2 0.71 without issues - and the BGFX_metal bug still persists. 

But I finally made it into mametesters.org and managed to file a bug report here. As it turns out today, it was the MacOS Password Manager and Safari that kicked me out from mametesters.org at previous attempts. A manual login via Firefox after password reset did the trick. So if you want to login to Mametesters as a Mac user, I strongly recommend you to avoid Safari and Mac Password Manager if you run into strange problems like me, being blocked from the site. If you are at Mametesters.org and are able to confirm the bug, please leave a note there - thanks!

Update: While the Mametesters Bug Report has been closed, a Bug has been opened with the BGFX Github repository: https://github.com/bkaradzic/bgfx/issues/1032 - let's see.

19 January 2017

QMC Alternative: Attract Mode for OSX MAME - Setup, Part 1

Updated September 2018
This is huge, but needs work during setup. If you are willing to spend the time, it's probably the best MAME frontend around. 


If you are ready for manual text edits, this is what you get:
- best layouts in town with video previews that are compatible with the Retropie Attract Mode layouts
- game settings at ROM level
- very flexible and rather intuitive joypad control
- leave your current MAME/QMC2 installation unchanged and play with identical versions in this frontend
- fast at startup
- very accessible text configuration files

Since all of the following has been trial & error, I start with setup instructions from scratch.

1. Download and install Attract Mode for OSXhttp://attractmode.org/download.html - now at version 2.4.1 it is rock solid under OSX and in par with other Operating Systems

2. Start Attract Mode -> Attract Mode directory is created here:
[$HOME -> this is the home directory of your user in Attract Mode terms]/.attract





Note: You will only see this directory if you have enabled 'Show Hidden Files' (with a tool such as Deeper, otherwise you will not see this directory in your Finder!) 
Remember for all further configuration: $HOME stands for your Mac User home directory, this saves you a lot of time and remains portable to other users 
This is the directory where most of your customization happens! Do not touch the directories of your Attract Mode Program (via 'Show Package Contents'), since this will be overwritten with a program update.
3. Enter Attract Mode Configuration: TAB

29 December 2016

MAME 0.181 and 6100 Views in one year :-)

2016 ends with MAME 0.181, which according to its whatsnew.txt contains a row of nice updates. On the Macintosh side, all remains the same: no Metal plugin and the same issues in BGFX as described in detail before. More to come here.

This year ends with 6100 views, for which I am grateful, considering the rather narrow content published here. The interest in this Blog is quite as expected:
One thing: Please feel free to write any comments you may have, they are more than welcome. 

More to post here.

19 December 2016

BootCamp for Mac Retrogaming - Is it Worth The Hassle?

This post will be about running BootCamp for Retrogaming. As regards MAME, I am interested in a direct comparison between MAME running on macOS Sierra and Windows. 
Eventually the question is whether it's worth the hassle with BootCamp, or whether you can easily stick with your Mac system.



Bottom Line: MAME on Windows is by far faster than on Macs. However, with some tweaking, you get similar results on Macs, but Windows remains the performance king. Probably it makes more sense to tweak your Mac settings, e.g. faster shaders, than installing BootCamp and keeping a Windows system up-to-date all the time.

Here are the details:

30 November 2016

MAME 0.180 is my first MacOS Sierra Compile

Both MAME and QMC2 compiled flawlessly. Another huge ChangeLog in this version.

  • Unfortunately the Metal backend is still broken, so I can stay only with OpenGL. This does not make me very optimistic about the future of Metal as far as MAME is concerned.
  • Otherwise everything works as it should be. Also QMC2 is another rock solid release.

Let's see further what's inside of this for me...

14 November 2016

Off Topic: Preparing Retropie from a Mac (with November 2017 update)

This is not much Mac-related, but I am currently spending all of my 'computer time' with preparing two Raspberry Pi 3Bs with Retropie as Christmas presents. I will collect my insights, and again like it was for MAME, my conclusion is that Macs and Raspberry Pis/Retropie are a good combination.


It is mostly a MAME 2003 romset. But Final Burn Alpha (then with different ROMs) seems to be a very good choice in case of performance problems on the Pi.

After having gone through some learning curve, I cannot give enough kudos to the Retropie project! What an impressive achievement - including some really good online documentation that is up to speed with the development. One thing is clear: You can hardly beat this system in the living room when it comes to a smooth retrogaming experience.

I will summarize my recommendations in the following:

09 October 2016

MAME 0.178 - Not Much To Report

I have played around with MAME 0.178 for some time, and there is not much I can report for this release:
  • The METAL shader of BGFX still seems to be broken on my machine under El Capitan. I am wondering whether anybody at the MAME team is aware of this fact.
  • BGFX still runs much faster if you deactivate Artwork (-nobezel option on the command line) - I am still wondering whether this means that these games also perform so much worse when you throttle them to real time. Or it just doesn't matter - I never reached a value below 100% when activating bezels.
  • In my performance testing, I experience significant performance losses in this release of some 20% with some of my games I use for testing (including R-Type, 1942, Gyruss - but notably not Elevator Action).
  • New working games are shown here: https://www.youtube.com/watch?v=QHWFphs99Mc

17 September 2016

Performance Tests BGFX vs. GLSL (Update September 2016)

Standardized performance testing from the command line explained (so you keep your MAME configuration fully intact - again many thanks for Headrush69 for this insight):

Open Terminal and change into your MAME directory, then execute (example for BGFX/CRT-GEOM-DELUXE testing):
./mame64 -video bgfx -str 60 -noafs -bgfx_screen_chains crt-geom-deluxe -bgfx_backend opengl -artcrop -noreadconfig -nosleep -nothrottle rtype

What this example does: It launches R-Type for 60 seconds with the BGFX/CRT-GEOM-DELUXE shader and the OpenGL backend on full speed. Other configuration options of mame.ini left out. After exiting MAME, the Terminal window provides you with the performance result:
Average speed: 634.69% (60 seconds)

If you want to test the GLSL shaders that you have installed manually, be sure that you provide the full path. Example with bezels disabled:
./mame64 -video opengl -nofilter -gl_glsl -glsl_shader_mame0 /Users/xxxxxxxxxxxx/Documents/mame/CRT-GEOM-DELUXE/CRT-geom-halation -str 60 -noafs -artcrop -noreadconfig -nosleep -nothrottle -nobezel elevator

Conclusions from my performance tests: 
  • CRT-GEOM rules both in OpenGL/GLSL and BGFX performance-wise - but take the new OpenGL/GLSL-Halation shaders (discussed here), since they perform much better! You can use Glow both in OpenGL and BGFX without risking a performance hit. 
  • If your machine can handle BGFX, the main advantages are that (i) you can fine-tune with sliders in the game and immediately see the result and (ii) you can even switch shaders in the game in real-time, which is extremely cool. Details are here.
  • The BGFX/HLSL shaders crawl on weaker machines, while the BGFX/CRT-GEOM shader performs decently on weaker machines as well (in my case it works very well on a MacBook Pro 13'' Mid 2012, whereas HLSL crawls with 40%)
  • As for BGFX, I would really like to see a slimmed down version of the default MAME HLSL shader that does not take away that much performance.
  • GLSL in MAME 0.163 vs 0.177: Elevator Action: 730% vs 840%, Gyruss 287.15% vs 429.85% -> very nice performance increases also under OpenGL! (However it seems that the 0.178 release predominantly looses these gains again) 
Here are some details

10 September 2016

Getting a Video Retro Effect on LCD - BGFX, GLSL or Artwork Effect (Update September 2016)

Consider tweaking your screen output as soon as possible 

Since MAME focuses on exact emulation, the unmodified output is unsuitable for flatscreens. This means that the tube screen feeling must be emulated on top.

Raw MAME Output without tweaking:
Let's face it: This is ugly.





















Understand the meaning of these Buzz Words:
  • Shader: program parts in MAME that can be activated for tweaking the Raw MAME output
  • Backends: sub-sections of a shader that chosen once a shader is activated 
  • OpenGL Shader - GLSL: for a long time the most important shader for Mac systems, still the performance king, but not part of the standard package
  • BGFX Shader: the new kid on the block, designed for cross-platform experience, official part of MAME
  • HLSL Shader: the shader in the Windows environment - don't mix this up with HLSL Backends within GLSL or BGFX - which apparently try to emulate the HLSL Shader in Mac systems
Recommendations summarized:
  • MAME STANDARD: bilinear filtering - just comes out of the box and gets rid of the worst pixel effects
  • ALTERNATIVE 1: If your machine is powerful enough, go for BGFX with the CRT-GEOM Deluxe Backend (new instructions below)
  • ALTERNATIVE 2: If this does not work out, go for GLSL with the CRT-GEOM Deluxe Backend instead (new instructions below)
  • ALTERNATIVE 3: If this does not work out, just add an Artwork Effect or - better - head for a new Mac
Here are the details for all three options - complete re-write in September 2016.

08 September 2016

Off Topic: Finished Walter Isaacson's Book on Steve Jobs (Finally)

Yesterday night, after several retries, I was finally able to finish this impressive book on Steve Jobs:
https://en.wikipedia.org/wiki/Steve_Jobs_(book)
How does this relate to that Blog?

04 September 2016

MAME 0.177 - First Impressions

This became my first build from source because the official build was done in MacOSX 10.11. As described in today's update to this post, the build compiled smoothly. So here are my first impressions.

(A) BGFX Metal backend seems broken. I hope that this is not due to my own compile. When trying to launch a game from the command line, the Terminal application returns the following error:
/Library/Caches/com.apple.xbs/Sources/Metal/Metal-56.6.1/Framework/MTLRenderPipeline.mm:1006: failed assertion `Blending is enabled for render target 0; however, the pixelformat MTLPixelFormatInvalid for this render target is not blendable.'

Abort trap: 6
Doesn't seem to be a problem of my own build. OpenGL backend works without problems.

(B) Performance: Headrush69 (who posts a lot of good comments here) provided me with the perfect performance testing tool from the Terminal (from inside of the MAME directory), because you do not need to change anything in your settings for doing these tests. Many thanks Headrush69 for this! And here are some first performance results:

Compiling QMC2 and MAME under Mac OS El Capitan/Sierra (Update 02/2017)

Compiling an own QMC2 MacOSX build has been a longstanding target of mine: From time to time, official MacOS binaries have been missing or delayed. In particular installing QT in its legacy version 4.8.7 proved difficult. Homebrew changed this and now the QMC2 compiling process works very well.

Since MAME 0.177 I have also been compiling my own builds under El Captain and later on MacOS Sierra, and it just works.

Compiling QMC2 - the details

(A) The starting point is the QMC2 Wiki - which in the meantime is no longer outdated:

(B) For El Capitan and MacOS Sierra, QT 4.8.7 needs to be installed via Homebrew (as now documented under (A):

Step 1 - go to http://brew.sh

Step 2 - open your Terminal and install Homebrew by copy pasting the entire Terminal command from the window:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Step 3 - run the following commands from the Terminal:
brew install qt4
brew linkapps qt (links the qt4 commands to the Applications folder -> that has been a recommendation which I am no longer sure about, but it should be no issue to manually remove the symlinks later on)

Voila, I have a running QT 4.8.7 environment under El Capitan/Sierra :-).

(C) As soon as you have the proper QT environment in place, compiling of QMC2 as explained under (A) worked like a breeze - in short:
Switch to the tmp directory of your MacOSX system via Terminal, then download the source code of QT2 (tmp directory assures that these files are deleted):
svn co https://svn.code.sf.net/p/qmc2/code/trunk qmc2
Then switch into the qmc2 directory:
cd qmc2
Then make the executables (in my example with an alternative image set, otherwise just make):
make IMGSET=crazy
Then install, and make sure that an existing qmc2 directory in the Applications folder is renamed before executing this command:
make install
Means: Without 'sudo make' you cannot overwrite an existing qmc2 directory in Applications - rename it  to e.g 'qmc2.old' beforehand just in case.

But why compiling QMC2 in the first place? First of all, sometimes you have to wait for the Mac binaries for quite some time, and for some versions, they just don't appear online. Secondly, I like building QMC2 with customized icons and without the additional plugins. And finally, compiling from the svn repository is fun :-).

The result is a fairly nice black-themed QMC2, which I quite like. 
Screenshot with Black Theme, Click to enlarge
Compiling MAME - the (not so many) details:

Compiling MAME ever since El Captain is just as easy as it can get. Following the official instructions produces me builds that just work. This also means that these rather complicated build instructions are outdated.

It is just as easy as that:
  • Have XCode and SDL2 installed
  • Download and extract the MAME source code
  • Open Terminal and move to the MAME source code folder
  • make -j5 (if you have a quadcore machine) - drink coffee or tea during the build time
Only the cleanup seems a bit messy to me. Due to the lack of a 'make install' procedure, you must get rid of the source code chunks in your build manually.

Since MAME 0.177 until the current version all builds run without problems.

MAME in Homebrew: This is a very nice initiative. Here you also get all the dependencies installed automagically, and the MAME executable is in $PATH. My only major concern here is that these binaries are some four months behind the latest release, currently 0.179. So if you are not doing your own ROM sets, you can easily run into incompatible games. This is why I would not recommend this route right now (it would be interesting to understand why these builds are way behind).

27 July 2016

MAME 0.176 is out - and BGFX/CRT-GEOM shaders are in!

MAME 0.176 seems to be another great release when it comes to shaders. In the BGFX section the CRT-GEOM and the CRT-GEOM Deluxe shader (for Glow) made it into the default distribution, which really rocks.  Also some BGFX bug fixing. 

First performance tests with CRT-GEOM Deluxe are very promising - I see significant performance increases on my machine (performance numbers in brackets are from these tests here) with old games. Interestingly newer games seem to loose performance, but still perform in a very healthy area:

1942 (Revision B)
BGFX/Metal-CRT-GEOM-Glow, Window - 650,30% (vs 212,08%)

Defender (Red Label)
BGFX/Metal-CRT-GEOM-Deluxe, Window - 501,07% (vs 742,88%)

Elevator Action
BGFX/Metal-CRT-GEOM-Glow, Window - 449,59% (vs 200,70%)

Gyruss
BGFX/Metal-CRT-GEOM-Glow, Window - 336,37% (vs 191,21%)

Out Run (sitdown/upright, Rev A)
BGFX/Metal-CRT-GEOM-Glow, Window - 398,24% (vs 627,28%)

R-Type (World)
BGFX/Metal-CRT-GEOM-Glow, Window - 472,44% (vs 633,44%)

Configuration: MAME 0.176, QMC2 0.66, Throttle Off, run 60 seconds, for details, please see this post.
In the BGFX section of QMC2, you can now directly insert crt-geom deluxe for the chain, and you are ready to go.
I applied changes to the .json file as described here for GLSL in the same way. More details will follow.

Conclusion: BGFX in MAME gets better and better, and it also seems that the shader is gaining performance. So for everybody that had performance problems before, MAME 0.176 is definitely worth another try.

11 June 2016

GLSL Revisited: newer CRT-geom Shader

I finally found a version of the CRT-Geom Shader that incorporates the Bloom Effect, you can download the 2015 version here: https://sites.google.com/site/o0kinghanco0o/crt-geom-alternative-downloads

File: CGWG-CRT-geom-halation-20151123.zip

25 May 2016

BGFX Shaders - Finally Working :-) :-) :-)

Since MAME 0.172, the BGFX shaders are the new kids on the block, and they are very promising. In particular, they are cross-platform, so they produce identical results under Windows, Linux and Mac. Today I finally found out how I get them working.

In this later post, I show you how to tweak BGFX so that your individual settings are there every time.

And in this new post, you find instructions on how to tweak BGFX in mame.ini - which is actually the preferred choice (you stay independent of frontend - and even platforms).