Build Your Own Arcade Game Player and Relive the '80s!
This is where the magic happens. If you're anything like me, you've already tried MAME on your computer and played the classic games with your keyboard. It's fun, but it's definitely not the same as the original. In this step, we connect the real arcade controls to the computer. First, if you weren't lucky enough to get used joysticks and buttons on the cabinet, you need to buy some. There are a few places to buy arcade controls, but one of the most popular is Happ Controls (www.happcontrols.com). If you check out the controls section of the Arcade Controls Web site mentioned previously, you'll find a plethora of vendors for such things.
Once you have the actual buttons and joysticks, you need to decide whether you want to buy a keyboard encoder or hack a keyboard yourself. The former option is easier and more reliable, but the latter offers a certain geeky charm. I chose the latter. There are very in-depth instructions on the Arcade Controls Web site regarding how to figure out button layouts properly, but see the Keyboard Hacking sidebar for a quick description, so you can decide for yourself which way to go. If you do choose to hack a keyboard, I encourage you to come up with a better way to connect the wires than I did. Figure 4 shows my horrible rat's nest of wires. It's ugly, but it works.
Whether you choose to create your own keyboard controller or purchase one from a place like Hagstrom Electronics, you still have to connect the wires to the arcade controls. Because I'm terrible at woodworking, you'd think there would be a certain balance in the universe that would suggest I could solder well. Let me assure you that balance does not exist. I thought it would be really great to avoid soldering to all the buttons. I bought some spade connectors that would slide right onto the terminals (Figure 5). Although the idea still sounds great, it turns out that the microswitches in the buttons and joysticks really need a solid connection. Unless you want to take apart your control panel to wiggle wires every so often (like me), I highly suggest you solder everything. Invite a friend, because I'm under the opinion that soldering takes three hands. Perhaps your two hands are better than mine, but at least the friend can hold a light.
So now, you should have a cabinet, mounted controls, some sort of keyboard interface and an empty shelf waiting for a computer. The last step is to put in a computer and install the software. The horsepower you'll need really depends on what games you want to play. If you are planning to play the classics, like Pac-Man and Asteroids, a Pentium II should suffice. If, however, you want to play Street Fighter II, or any newer games, you should get a Pentium III or 4. I have a middle-of-the-road Pentium 4. If you want my advice, I'd say to use what you've got. If you feel the need to invest more later, you always can do so.
To run MAME in an arcade cabinet, you must configure two separate programs: MAME itself and a front end. Because MAME is a command-line program, you need a front end to launch the games with the joysticks and buttons. This last step is really my favorite part. If you thought my indecisiveness regarding the button layout was excessive, you don't want to know how long I spent determining what software to run. Obviously, I chose to run Linux. Check out the Options sidebar for some comparisons on a few common choices regarding distros and front ends.
Software: AdvanceCD, custom Linux install.
Pros: creates a custom CD or bootable USB key that boots directly into the AdvanceMENU front end.
Cons: really tough to configure if you don't use the standard button layouts. If your hardware isn't detected properly, it's also hard to fix. Also it's kind of slow, especially if booting from USB 1.1.
Software: LinCade, based on Gentoo.
Pros: also uses the nice AdvanceMENU front end, and it's a little more configurable, with the option to add and modify games after the install.
Cons: still very difficult to configure if you don't use the standard MAME button layout.
Software: KnoppixMame, based on Knoppix.
Pros: great hardware detection.
Cons: really not designed for an arcade cabinet, but rather for someone with a keyboard and mouse.
Software: standard Ubuntu and WahCade front end.
Pros: very easy to configure. The Ubuntu install handles all the hardware detection. This is the option I chose.
Cons: not specifically designed for an arcade cabinet.
I chose to install a stock Ubuntu distribution. Really any distro would have worked, but I just happen to like Ubuntu's single CD install. Also, the WahCade front end has a really nice .deb installer, so Ubuntu's Debian roots really made sense. First, install Ubuntu like a normal desktop user. I chose to install Feisty Fawn, because it's the most recent release, and I happened to have a CD already burned. I'd highly suggest running the installation using the same monitor you plan to use in the arcade cabinet. It will save a lot of hassle later on.
After Ubuntu is installed, open up a terminal window, and install xMame (the X Window System version of MAME):
# sudo apt-get install xmame-x
Then, go to www.anti-particle.com and get the latest version of WahCade. You'll want to get the .deb file. To install it, type:
# sudo dpkg -i wahcade-xxx.deb
Now, you're ready to configure things. The installation instructions at the WahCade home page are pretty clear, but make sure to follow them carefully. You'll have to do a few command-line things and figure out where you want to store ROMs and such. There is a really nice GUI configuration tool, in which you can assign the proper keys (from your joysticks) to control the interface. Once you have the front end configured and ROMs in place, which admittedly will take a while, go ahead and fire up WahCade. Make sure to add the -fullscreen and -skip_disclaimer options for xmame, the latter because it's difficult to type OK with just a joystick. (MAME displays a disclaimer by default that forces you to type OK in order to continue.)
If everything is configured correctly, you should see the WahCade program and be able to select and launch games accordingly (Figure 6). I hate to admit this, but I spent hours trying to figure out how to configure the buttons for xmame. I tried to edit config files, but it was too complicated for me to figure out. In the end, it turns out MAME has a built-in method for reassigning keys. When I realized how simple it really was, I could have kicked myself. I still might. Simply press the Tab key once you're inside a game, and you get a nice configuration screen where you can configure either the default keys or the game-specific keys.
One of the beauties of MAME is that it's possible to assign a command to a combination keystroke. For example, I didn't want to install a button just to exit a game, so I mapped “exit game” to pressing Player 1 and Player 2 simultaneously. It really limits the amount of buttons needed. MAME also has an option to pause, which is something the original arcade never had, but it's very nice for home use. The yellow button on my control panel is mapped to pause.
Once MAME and WahCade are working, you need to automate the process. Set the GNOME login manager to log in the user account automatically, and create an .xsession file that avoids the GNOME environment and launches WahCade directly. Here's an example of how to create an .xsession file:
# cat > ~/.xsession # wahcade # ^D (actually press control-D) # # chmod +x ~/.xsession (this makes it executable)
So there you have it, an arcade system, complete with real controls and original games. You can customize your system to fit your needs. Perhaps you want a headphone jack, so you can play without disturbing others. Maybe you want to add music support and have your arcade machine double as a jukebox. Because the cabinet has a full computer with Linux under the hood, the possibilities are really endless. Have fun!
- September 2014 Issue of Linux Journal: HOW-TOs
- [<Megashare>] Watch Mrs Brown's Boys Movie Online Full Movie HD 2014
- Tech Tip: Really Simple HTTP Server with Python
- Considering Legacy UNIX/Linux Issues
- Memory Ordering in Modern Microprocessors, Part I
- RSS Feeds
- Cooking with Linux - Serious Cool, Sysadmin Style!
- Security Hardening with Ansible
- New Products
- Cluetrain at Fifteen