O'Reilly logo

Gaming Hacks by Simon Carless

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Learn Game-Specific MAME Controls

Stop scrabbling around to work out which key does what.

Have you ever loaded a MAME ROM for the first time and found yourself flailing around, trying to figure out which buttons it uses and what they do? Sometimes you’ll play for a while before you realize you have a smart bomb button that’ll wipe out the mass of enemies onscreen in one fell swoop. Other times you’ll completely miss the point of the entire game because you’re missing some vital details about keys or objectives scrawled on the cabinet itself, and, obviously, you don’t have access to the cabinet.

The Controls.dat project (http://fe.mamehost.com/controls/controls.php) attempts to catalog the exact controls of every MAME-compatible title ever, along with names and directions. There are even extra fields for information about what to do during the game, in case there are particularly nonobvious game mechanics.

If Controls.dat supplies controls information for each title in the MAME library in an abstract dataset (much like the Catlist game listing in [Hack #14] ), then frontends and emulators can take advantage of it by providing a listing of buttons and their effects. You’ll flail no more, at least in figuring out the controls. If you’re running a MAME cabinet with light-up buttons, it may eventually even light up the buttons used by that particular game!

A Work in Progress

However, at press time, the Controls.dat project is still in progress and is actually in a reasonably heavy state of flux. Right now, and hopefully for the future, the FAQ page for the project (http://fe.mamehost.com/controls/faq.php) provides plenty of useful information.

In particular, the site’s maintainers argue that “[there] are other sources for similar data, like MAME’s listinfo, or KLOV (http://www.klov.org), but these sources are either inaccurate or incomplete.”

Consult the FEDev message board (http://fe.mamehost.com/yabbse/index.php?board=10) for information on where to download the latest version of the file, where you can help classify or add items, and to learn about frontends that use the file. It’s also possible to browse any individual record for one particular game (for example, http://fe.mamehost.com/controls/report.php?theGame=19xx) and see the information in them from the web site. If you register, you can add to the knowledge base by entering game information yourself.

An Example Controls.dat Entry

Here’s the example entry from the Controls.dat file for the brawler Bad Dudes vs. Dragon Ninja:

gamename=Bad Dudes vs. Dragon Ninja (US)
P1Controls=8-way Joystick+joy8way

There’s extra information in the miscDetails= field, too, which can be invaluable for working out how to actually play the game. Here’s this game’s extra information:

Holding down attack while standing still will charge up a super punch. Pressing jump and attack at once will do a super kick at the expense of some of your energy.

Other files, such as MAME’s listinfo, already map out this information, but the notes in the Control.dat file tend to be more practical than a straightforward plot/background description.

Frontends That Integrate Controls.dat Correctly

As mentioned before, we’re still somewhat in the Wild West when it comes to Controls.dat integration into frontends. Here are three ways you can see it in action.

Johnny5 (http://www.oscarcontrols.com/lazarus/archives/000032.html)

This standalone application shows the layout of controls from Controls.dat files. However, it’s not a fully fledged frontend, just a building block.

Dragon King (http://www.oscarcontrols.com/lazarus/)

This frontend from the author of Johnny5 uses the latter for Controls.dat support. This is a complex but excellent frontend well worth exploring.

MAMEWAH (http://mamewah.mameworld.net/)

This larger frontend from the United Kingdom also integrates Johnny5 and has many similarities to the classic ArcadeOS frontend.

Controls.dat accounts for about 500 MAME titles right now, with thousands to go. The project continues to make swift progress; you’re likely to see it integrated more and more into the existing MAME framework, making for a better, more satisfying emulation experience for all. Hurrah for that!

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required