MAME Arcade Cabinet

I LOVE japanese manic-shmups, bullet-hell, curtain shooters, whatever you may call them. So what better way is there, than to play it like real man, standing upright and swearing at an arcade machine? Of course, building a cabinet now is easy, plenty of plans and hardware around, but back in my days when I did this project ... etc

Using Spatial Augmented Reality as stencils (aka. over-engineering)

I wanted to paint the sides of the cabinet with the same pattern. Traditionally, you would use stencils for that. The problem with stencils is preparing them, preparing them in the right size, making two of them, and their one-time only use. I came up with the idea of using SAR for providing stencils. I would then just fill in where ever the program wanted me to paint white. Instead of using the full-blown SAR system, I wrote a small python program that just maps a plane on to another plane and used that to project two different textures on the cabinet hull.

It worked pretty well, but had the some problems. For one, especially with tall objects, the projector needs to be quite a distance away from the object. In my case it was pretty easy as I just opened the shed door, but this might not be possible in crowded spaces. Secondly, it was bright day-light and putting the projector farther away made the image even fainter. Thirdly, using the trackpad to calibrate the system ins not the best idea if you are painting and have probably paint-coated hands...

The computer used was an old Dell Optiplex with a 3Ghz P4. This was an excellent choice as MAME is single-threaded and this quite powerful CPU could be had for cheap. I installed some older flavour of Ubuntu and compiled the MAME sources directly on the box.

Building process


Although there is no lack of frontends for MAME, few look nice and are build for an arcade cabinet. And while I was building a cabinet anyway, I rolled up my sleeves a little more and wrote another MAME frontend as well. It’s quite simple (as it should be) and doesn’t support many roms, but hey -- who really needs more than 10-15 good games anyway?

menu for the arcade.

It’s written completely in python with pyglet as the rendering backend. And it worked sooo nicely. After writing my code in C++ for so long, python seems like the best ‘hobby’ language. It’s quick to write code in python and as long as you don’t do raytracing of physics simulations, it runs reasonably fast. Py2App proved to be a bit of a hassle, but it worked nicely in the end. It works with MAME controls, so P1 stick left/right selects and P1 fire 1-4 starts a game.


The computer and the cabinet got thrown out in one of the moves. I kept the control panel and was able to sell it to another homebuilder shortly before leaving Australia. In the end it was a fun project. If I would do it again (which I would love to), I'd investigate MAME on the Raspberry PI as this seems not the easiest but most interesting option right now. You can wire up the controls directly to the pi inputs without having to buy a keyboard encoder. Additionally the pi is small and cheap and actually quite powerful.