So, the emulation bug has bitten you harder than you imagined, and you’re not satisfied with merely running the arcade machine emulator MAME [Hack #22] or the Nintendo Entertainment System [Hack #40] ? Then read on to find out about emulators for many different retro consoles that will run on your Linux box, including the Super NES, Atari 2600, Sega Genesis, and more.
The venerable Super NES was one of the most popular console systems to ever hit the United States. But even the huge number of games that were available here pales in comparison to the number of games published in the motherland: Japan. With an emulator, and maybe a Japanese dictionary—or see “Play Japanese Games Without Speaking Japanese” in Gaming Hacks (O’Reilly), you may be able to explore a vast new sampling of SNES games! So let’s get down to it.
ZSNES (http://www.zsnes.com) is widely considered to be the best Super NES emulator available on the Linux platform. To install it, follow the steps listed next for your distribution.
Visit the ZSNES home page (http://www.zsnes.com) and click on the Files link in the menu at the top of the page. Save the Linux source file for the latest version to your /tmp directory. Then:
Once you have obtained some ROMs, starting ZSNES is as easy as typing
zsnes at the command line. ZSNES’s nifty little GUI will be displayed automatically when you start it. The first thing you will want to do is configure things for your particular setup. Start by clicking on the CONFIG menu and then INPUT #1. This will bring up the INPUT DEVICE configuration screen. In the DEVICE box, select KEYB/JOYSTICK, then click on the SET KEYS button. (You did read
, and maybe
as well, right?) ZSNES will now prompt you to hit the key or joystick button that will be used for each button on the SNES controller that is being emulated. Follow the steps as prompted, then click on the X in the title bar of the INPUT DEVICE window (shown in Figure 4-29) to close it.
You will probably also want to change the video settings, so click on the CONFIG menu again and select VIDEO. Take a look at all of the resolutions listed in the VIDEO MODES box. The left column, as you probably guessed, is the resolution. The middle column is the rendering engine (“R” means the default engine, “DR” is the direct rendering system, and “OGL” is OpenGL). The right column indicates whether ZSNES will run in a window or in full-screen mode. You will probably want to select the highest resolution that your video card can handle, and most people prefer fullscreen mode to get that sprawled-in-front-of-the-television-at-3-AM-trying-to-beat-that-damned-Bowser feel. To change video modes, click on the mode of your choosing, then click on the SET button. You will be prompted to press any key, the video mode will be switched, and then you will be prompted to press any key again to make the change permanent.
Don’t worry if your screen goes all crazy due to an unsupported resolution—just don’t touch the keyboard for ten seconds, and your previous resolution should be restored. Note that running the X Window System (i.e., XFree86 or X.org) at color depths greater than 16-bit forces ZSNES to scale back to 16-bit color in software, thus degrading performance. If you know that you are running at a higher color depth, and know how to change it, you should probably do so. When you are satisfied with the video mode, click on the “X” in the title bar of the VIDEO CONFIG window to close it.
Now, click on the CONFIG menu again and select SOUND. You will probably want to select both ENABLE SOUND and STEREO SOUND by clicking on the checkbox to the left of each option. When you are satisfied with the sound settings, click on the “X” in the title bar of the SOUND CONFIG window to close it.
Feel free to poke about in the CONFIG and MISC menus for a bit. When you are done, load a ROM and play it!
Click on the GAME menu, then the LOAD option. You will be presented with a file browser window. Use it to browse into your SNES ROMs directory, select the ROM that you want to play, and then click the LOAD button.
If you don’t want to log out of your current desktop, you could also start up a separate X11 instance at the desired color depth. Switch to another virtual console (for example, to switch to the first virtual console, use Ctrl-Alt-F1), log in if necessary, and use startx to launch a new X11 session):
startx -- :1 -depth 16
The -- option passes all the subsequent commands to the X server itself (:1 specifies the second display,
-depth 16 specifies 16-bit color depth. After you’ve started the second server, you will be able to switch back to your first X11 session with Ctrl-Alt-F7, and to your second one with Ctrl-Alt-F8.
(http://bard.sytes.net/goosnes/), a GTK+ front-end for Snes9X
- BoyCott Advance
(http://boycottadvance.emuunlim.com/), a Game Boy Advance emulator
- Virtual Game Boy Advance (VGBA)
(http://fms.komkon.org/VGBA/), a Game Boy Advance emulator
(http://gcube.exemu.net/), a Gamecube emulator
(http://mupen64.emulation64.com/), an N64 emulator
With all this talk of Nintendo emulation, did you think I had forgotten about the original Game Boy? Not bloody likely, as this old-school classic is also the best-selling video game system of all time! And it ain’t even close, people: the latest figures that I have seen (which are from March 2004) estimate that the Game Boy series has sold 160 million units (with the GBA only accounting for around of 20 million of those)!
So, without further ado, let’s build and install VisualBoyAdvance (http://vba.ngemu.com/), the most popular GBA emulator for the Unix platform.
If you’re using another distribution of Linux (or other Unix variant), check your installation media or online package repositories to see if there is a binary build of VisualBoyAdvance available. Otherwise, visit the VisualBoyAdvance project’s Sourceforge files page (http://sourceforge.net/project/showfiles.php?group_id=63889) and download the latest source tarball (VisualBoyAdvance-src-1.7.2.tar.gz, as of this writing).
Once VisualBoyAdvance is installed, open a terminal as a normal user, change to your Game Boy ROMs directory, and type (replace TETRIS.GBC with the name of a Game Boy or Game Boy advance ROM that you have):
Figure 4-30 shows VisualBoyAdvance in action.
Make sure to check out PD ROMS (http://pdroms.de/), as there are public domain, freeware, and/or open-source clones of most of the Game Boy classics that you grew up with!
Frontend for VisualBoyAdvance (http://www.apex.net.au/~twalker/qtvba/).
(http://m.peponas.free.fr/gngb/), a Game Boy Color emulator
(http://gnuboy.unix-fu.org/), a Game Boy Color emulator
(http://kigb.emuunlim.com/), a Game Boy / Game Boy Color emulator
(http://neopocott.emuunlim.com/), a Neo Geo Pocket emulator
(http://homepage.ntlworld.com/dystopia/), an Atari Lynx emulator
(http://www.smspower.org/meka/), an emulator for, amongst other things, Sega Game Gear (more on MEKA in the Sega Genesis section of this hack)
Ah, the Atari 2600. Whenever talk turns to classic consoles, this lovely beast is bound to come up. Luckily, there is a wonderful emulator for the Unix platform, called Stella, that will allow us all to relive our glory days. To install it, follow the steps listed for your distribution.
If you’re using another distribution of Linux (or other Unix variant), check your installation media or online package repositories to see if there is a binary build of Stella available. Otherwise, visit the Stella project’s home page (http://stella.sourceforge.net) and click on the “Stable Releases” link under the “Downloads” heading on the left side of the page. Then:
Save the source .tar.gz file for the latest version to your /tmp directory.
Extract and compile Stella:
tar xvzf stella-*-src.tar.gz$
(or, to build the OpenGL version: use
Next, become the root user with su (or prefix each command with sudo), and install Stella and its associated files:
cp stella /usr/bin/#
cp ../emucore/stella.pro /etc/#
mkdir -p /usr/share/docs/stella#
cp -r ../../docs/ ../../*.txt /usr/share/docs/stella/
After you have built and installed Stella, open a terminal as a normal user, change to your Atari 2600 ROMs directory [Hack #26] , and fire up the emulator:
stella -video soft -sound 1 -zoom 2 -grabmouse 0 seantsc.bin
Iam using the
-grabmouse 0 option to turn off mouse grabbing, because I use the keyboard to control Stella—it works about how you would expect: the arrow keys emulate the joystick, and the space bar emulates the fire button. The
-video soft option instructs Stella to use software video rendering. If you built Stella with OpenGL support, try
-video gl to use your graphics hardware to its utmost (which is very important when emulating that graphical powerhouse, the Atari 2600!). Figure 4-31 shows Stella in action.
If Stella cannot quench your thirst for Atari emulation, check out some of the following projects:
- Atari 800
(http://atari800.sourceforge.net/), an Atari 800, 800XL, 130XE, and 5200 emulator for Unix, Amiga, MS-DOS, Atari TT/Falcon, SDL, and WinCE
- Atari Running on Any Machine (ARAnyM)
(http://aranym.sourceforge.net/), a virtual machine for running Atari ST/ TT/Falcon operating systems and TOS/GEM applications
(http://emutos.sourceforge.net/en/index.htm), a singleuser singletasking operating system for 32-bit Atari computer emulators, like ARAnyM, STonX, or Hatari
(http://handy.sourceforge.net/), an Atari Lynx emulator
- Virtual Jaguar
(http://www.icculus.org/virtualjaguar/), an Atari Jaguar emulator