Build Your Own Arcade Game Player and Relive the '80s!

 in
Save your quarters; you won't need them when you build your vintage arcade player.
Goodbye Keyboard, Hello Solder

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.

Figure 4. This photo pretty much speaks for itself. It's a great example of how not to organize wires.

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.

Figure 5. My goal was to avoid soldering. The spade plugs look great, but they honestly don't make a very good connection—another example of what not to do.

How Many GHz to Emulate 2.5MHz?

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.

It's Penguin Time!

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.

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.

Figure 6. Here's the main WahCade screen. This screenshot was provided by Andy Balcombe, the WahCade developer. Thanks Andy!

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!

______________________

Shawn Powers is an Associate Editor for Linux Journal. You might find him chatting on the IRC channel, or Twitter

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

awesome

wadel's picture

Looks like you got the same wiring skills as me. lol

do you know where??

p monkey's picture

i could get info on how to build a gunshooter mame arcade?? for like lethal enforcers, time crisis and point blank type games??

cool

zeke's picture

cool

MAME home page

Anonymous's picture

the mame page link doesn't seem to work?

arcade

marc's picture

You are Pacman and you get the dots. Once the bar is filled up you can do a super fire punch once you press spacebar. Wouch out the zombies can get dots too the make them faster.To move is the up,down,right, and left. You got to kill all 20 zombies you get past the level.

White Paper
Linux Management with Red Hat Satellite: Measuring Business Impact and ROI

Linux has become a key foundation for supporting today's rapidly growing IT environments. Linux is being used to deploy business applications and databases, trading on its reputation as a low-cost operating environment. For many IT organizations, Linux is a mainstay for deploying Web servers and has evolved from handling basic file, print, and utility workloads to running mission-critical applications and databases, physically, virtually, and in the cloud. As Linux grows in importance in terms of value to the business, managing Linux environments to high standards of service quality — availability, security, and performance — becomes an essential requirement for business success.

Learn More

Sponsored by Red Hat

White Paper
Private PaaS for the Agile Enterprise

If you already use virtualized infrastructure, you are well on your way to leveraging the power of the cloud. Virtualization offers the promise of limitless resources, but how do you manage that scalability when your DevOps team doesn’t scale? In today’s hypercompetitive markets, fast results can make a difference between leading the pack vs. obsolescence. Organizations need more benefits from cloud computing than just raw resources. They need agility, flexibility, convenience, ROI, and control.

Stackato private Platform-as-a-Service technology from ActiveState extends your private cloud infrastructure by creating a private PaaS to provide on-demand availability, flexibility, control, and ultimately, faster time-to-market for your enterprise.

Learn More

Sponsored by ActiveState