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!
Practical Task Scheduling Deployment
One of the best things about the UNIX environment (aside from being stable and efficient) is the vast array of software tools available to help you do your job. Traditionally, a UNIX tool does only one thing, but does that one thing very well. For example, grep is very easy to use and can search vast amounts of data quickly. The find tool can find a particular file or files based on all kinds of criteria. It's pretty easy to string these tools together to build even more powerful tools, such as a tool that finds all of the .log files in the /home directory and searches each one for a particular entry. This erector-set mentality allows UNIX system administrators to seem to always have the right tool for the job.
Cron traditionally has been considered another such a tool for job scheduling, but is it enough? This webinar considers that very question. The first part builds on a previous Geek Guide, Beyond Cron, and briefly describes how to know when it might be time to consider upgrading your job scheduling infrastructure. The second part presents an actual planning and implementation framework.
Join Linux Journal's Mike Diehl and Pat Cameron of Help Systems.
Free to Linux Journal readers.View Now!
|The Firebird Project's Firebird Relational Database||Jul 29, 2016|
|Stunnel Security for Oracle||Jul 28, 2016|
|SUSE LLC's SUSE Manager||Jul 21, 2016|
|My +1 Sword of Productivity||Jul 20, 2016|
|Non-Linux FOSS: Caffeine!||Jul 19, 2016|
|Murat Yener and Onur Dundar's Expert Android Studio (Wrox)||Jul 18, 2016|
- Stunnel Security for Oracle
- The Firebird Project's Firebird Relational Database
- Murat Yener and Onur Dundar's Expert Android Studio (Wrox)
- SUSE LLC's SUSE Manager
- Managing Linux Using Puppet
- My +1 Sword of Productivity
- Non-Linux FOSS: Caffeine!
- Google's SwiftShader Released
- SuperTuxKart 0.9.2 Released
- Doing for User Space What We Did for Kernel Space
With all the industry talk about the benefits of Linux on Power and all the performance advantages offered by its open architecture, you may be considering a move in that direction. If you are thinking about analytics, big data and cloud computing, you would be right to evaluate Power. The idea of using commodity x86 hardware and replacing it every three years is an outdated cost model. It doesn’t consider the total cost of ownership, and it doesn’t consider the advantage of real processing power, high-availability and multithreading like a demon.
This ebook takes a look at some of the practical applications of the Linux on Power platform and ways you might bring all the performance power of this open architecture to bear for your organization. There are no smoke and mirrors here—just hard, cold, empirical evidence provided by independent sources. I also consider some innovative ways Linux on Power will be used in the future.Get the Guide