Turn your PC into a retro gaming console
30th Sep 2012 | 09:00
Do you long for the glory days of the Amiga? Fancy playing those old SNES games again?
Retro gaming: Commodore Amiga, Atari and Spectrum
Computers are brilliant at pretending to be other computers. Providing your CPU has enough oomph, and your RAM banks have enough space, you can turn your PC into almost any other computer or video game console released over the last few decades.
Of course, it's not exactly the same - you'll have to be creative if you want to recreate the look, feel and smell of the original machine. But a decent PC can run programs written for a vast range of platforms, all thanks to the abundance of open source emulators on offer.
Essentially, an emulator is a program which creates virtual hardware, into which you can load the original software. If you think of the Amiga, for instance, in its real form it's a Motorola 68000 CPU and a bunch of supporting chips. An emulator provides virtual versions of these chips, enabling you to load the original operating system and programs into it, and as far as the programs are aware, they're running on an original machine.
Writing emulators is tough work, as most classic hardware has undocumented peculiarities, but thanks to the industrious efforts of some hacking teams, we have plenty to play with.
And there are good reasons for emulating: You can run older programs of which there's no Linux version. You can use your old software if the original machine has given up the ghost. You can play classic games (with arguably more depth than today's bland FPSs). You can try classic computers without having to buy them. You can see how things used to be in the olden days, when Effy was still young.
In this feature, we're going to look at some of the most popular classic computers and consoles, and show you how to get them working in emulated form. We'll be using Ubuntu here, but all of the emulators are open source and may be available in your distro's package repositories.
Note, however, that to get many of these emulators working, you'll need original ROM images for the software built into the machines (eg the Amiga's operating system).
This is something of a legal grey area; many would argue that if you own the original machine, you shouldn't be stopped from making a file copy of the ROM data (or searching for it on the internet).
But while ROM images abound on the internet, they usually contain copyrighted code, so we're not going to tell you how to get them. We hope you'll understand!
Hugely popular in the late eighties and early nineties, the Amiga was a remarkable machine for its time, offering graphics and sound capabilities way beyond the PC. Its GUI operating system provided pre-emptive multitasking while most PC users were fiddling with the DOS prompt, and it was a great machine for gamers.
Unfortunately, Commodore was completely feckless when it came to marketing and strategy, and by the late nineties the Amiga line was effectively dead. Still, most LXF writers have fond memories of the machine, and in many ways this magazine is the spiritual successor to Amiga Format.
Due to the Amiga's extensive use of custom chips, writing an accurate emulator is a difficult job. The best-known is UAE, which began life as the 'Unusable Amiga Emulator' because it couldn't even boot. Today, the U stands for Unix, but UAE runs on a range of other platforms.
There are loads of forks doing the rounds on the internet, the most popular of which are E-UAE and PUAE. You can get the former from the Ubuntu (or Debian) package repos with:
sudo apt-get install e-uae
Once it's installed, run e-uae to pop up the interface. Most emulators make you fiddle around with command-line switches, so we're glad that E-UAE provides a nice pointy-clicky GTK alternative.
The first thing you'll need to do is find a ROM image for Kickstart, the firmware in the Amiga that's responsible for the bootloader and key OS functions. Under the Memory tab in the E-UAE GUI, select its location on your system; then get hold of a Workbench floppy disk image in ADF format, and select it under the Floppy Disks tab.
Once you're done, hit Start. After a few moments, the Workbench desktop will appear. Welcome back to the glory days! You can now return to the E-UAE interface and insert more floppy disk images.
If you power off the machine, you can change various hardware settings, such as the amount of memory and the type of CPU that the virtual Amiga has.
In use, you might find that the mouse behaves strangely - to fix that, switch to full-screen mode with F12+S (and press again to switch out).
E-UAE performs well with games, as well as 'serious' software, and by default you can use the numeric pad as a virtual joystick. Use 8 and 2 for up and down, 4 and 6 for left and right, and 5 to fire. To boot a game, select its ADF image file as the first drive and restart the virtual Amiga.
While not as powerful as the Amiga, Atari's effort was a popular alternative, and won fans in the music industry thanks to its inclusion of MIDI ports. It was based on the same CPU as the Amiga line (the Motorola 68K), so many games were ported between the two platforms, with the Amiga version usually having better graphics.
Unfortunately, Atari couldn't market its way out of a paper bag, and spent all its resources working on the ill-fated Jaguar console, so the ST line died off in the mid nineties. A few crazy German fans made some clones, but today the remaining ST scene is focused on emulation.
Hatari is an excellent ST emulator available in the Ubuntu package repositories. When you first run it, you'll see an error message that /usr/share/hatari/tos.img can't be found. TOS is the operating system built into the ST, so get a file version of it and copy it into that location (you'll need to be root for write access to the directory).
Run Hatari again and you'll see the classic green GEM desktop. Press F11 to switch between normal and full-screen modes, and F12 to bring up the graphical configuration panel. You can insert floppy disk images, change the type of ST being emulated and set up a virtual joystick.
One awesome feature of Hatari is the ability to record AVI videos from the action on the screen. Go to the Hatari Screen options in the settings, and click Record AVI. This will slow down the emulator considerably, but when you're done, click on Stop Record and you'll find hatari.avi in your home directory.
Another option is Aranym (http://aranym.sf.net). Instead of being a clone of an ST, this provides ST-like emulated hardware with a mixture of replacement TOS and GEM components on top. It's useful for running some later, more demanding ST and Falcon programs.
Sinclair ZX Spectrum
Booooo-bip, booooo-bidibipibibippy… everyone who was anyone in the 1980s remembers the Speccy tape loading sound. And the colour clash, the gritty, buzzy sound effects, and rubber keys on the 48k model. The Spectrum was hugely popular in the UK, but was somewhat trumped by the Commodore 64 in the rest of the world.
Never mind, though - we still got to play such classics as Elite, Manic Miner and Mercenary with the machine's limited horsepower. You can still pick up old Speccys on eBay and similar sites for a reasonable price, but the old machines are starting to break down.
Fortunately, there are plenty of emulators that do an accurate job. One such is Spectemu, which emulates the 48k model. Ubuntu and Debian users can install it via the package spectemu-x11. This pulls in the package spectrum-roms, which contains the mini operating system built into the 8-bit machine. This code is still under copyright from Amstrad, but as a nice gesture the company has given emulator developers permission to ship ROMs. So no hunting on the net is necessary - hurrah!
Run the emulator from a command prompt with xspect, and keep an eye on the terminal window, as this provides lots of output and help. Inside the emulator, for instance, press Ctrl+H and you'll see a list of key commands. To load programs, you hit the F3 or F4 keys in the emulator window, then switch focus to the terminal window and enter the filename.
But why two different commands? Well, Speccy programs are normally distributed in two different formats: memory snapshots and tape images. The first is just a chunk of data to fill the machine's RAM banks, and has the extension Z80 or SNA. To load these, use F3.
For tape images, which represent the original audio cassettes, and typically have a .tap ending, first you need to enter LOAD "" in the Spectrum window (hit J, and then press Shift+P twice). Hit Enter to get the virtual Spectrum ready, then press F4 and enter the tape filename in the terminal window. A tip if you have no sound in the emulator: install alsa-oss and run aoss xspect.
If you want a more advanced emulator, especially for software that requires the later machines, try Fuse (http://fuse-emulator.sf.net). It even emulates Russian Spectrum clones.
Retro gaming: C64, Sega Mega Drive and SNES
Stateside, it was the Commodore 64 that dominated the 8-bit era. As the best-selling standalone computer of all time (as opposed to a line of computers such as the Amiga), the C64 made its way into around 15 million homes and still has an army of loyal fans today.
This is especially due to the SID chip - the C64's sound generator, and musicians are still writing music for the few still-working SID chips today. The C64 was also used extensively as a 'serious' home computer, with even a GUI operating system in the form of GEOS.
VICE, the VersatIle Commodore Emulator, started life in 1993. It also emulates some of Commodore's other machines, such as the VIC-20 and PET. You can get it in Ubuntu via sudo apt-get install vice, and use x64 to start it up.
On first run, however, you'll see an error message that VICE can't find the file 'kernal'. This is the operating system built into the C64, so you'll have to find a copy and place it in the directory /usr/lib/vice/C64. You'll also need to find basic and chargen ROM files and drop them into the same directory.
VICE has a GTK menu-driven interface, so look in the Options and Settings menus to see which bits of the emulated C64 you can tweak. Most games are provided in TAP (tape) or D64 (disk) format, the latter requiring less work to set up, so once you've found the .tap file for the game you want to play, go to File > Smart- Attach Disk/Tape in the menu, select the file and hit Autostart.
The game will load at the same speed as a real machine, which is great for nostalgia but less exciting when you're short on time. Go to Options > Enable Warp Mode to speed things up a bit. When the game has loaded, disable Warp Mode for the normal speed setting.
Sega Mega Drive (Genesis)
Sonic the Hedgehog, Road Rash, Columns, Golden Axe, Streets of Rage… the list of classic games for Sega's 16-bit console goes on and on. Sega positioned the Mega Drive as a hip, attitude-loaded alternative to the family-friendly Super NES, and managed to shift around 40 million of the machines.
However, Sega tried to milk the console a little too much, we feel, with the Mega CD and 32X add-ons fragmenting the market and confusing customers about the company's strategy.
The Mega Drive lives on, though, in the form of cheapo TV games you can buy in Argos and similar shops, where the console hardware and game ROM chips are sealed up in a box.
Gens is a fantastic emulator, although it's not so easy to find in the Linux world, even in the bigger distros. At http://sf.net/projects/gens under the Files tab, you can find RPMs and Debian packages from 2008 (see the Gens for Linux section). Failing that, you can try to compile the source code or hunt around on the web for different binary packages.
Once it's installed, you can start the emulator from the command line with gens, optionally following it with a filename for a ROM image (Mega Drive games are usually SMD files).
By default, Gens doesn't do a particularly good job with the video settings, compressing the emulated TV into a tiny space. Go to the Graphic menu and enable the OpenGL checkbox to fix this. You can use the keyboard as a virtual joyad, with the cursor keys acting as the D-pad and the A, S and D keys doing the job of the three fire buttons. Hit Enter for Start.
One particularly useful feature of Gens is the ability to save snapshots with a single keypress: hit F5 and you'll see State saved in the bottom-left corner. Now go and do something else in the game - hit F8, and you'll be returned to the point when you pressed F5. This is useful when you want to play through a difficult game quickly, as you can save your position before a particularly tough level, jump or boss.
If you'd rather use a real USB joypad, go to Option > Joypads and redefine the keys.
And so we come to arguably the greatest console of the pre-3D era. Whether you call it the Super Nintendo, the Super NES or the SNES, there's no doubting that it was home to some of the finest 2D titles of all time: Mario World, Zelda III and Secret of Mana.
Thanks to some extra in-cartridge chip trickery with the DSP and Super FX, SNES fans also had a taste of the extra dimension in the form of Mario Kart, Pilotwings and Star Fox (aka Starwing). Many saw the console as somewhat childlike in comparison to Sega's offering, but we'd say that the level of creativity and fun in Nintendo's triple-A games is unsurpassed.
So it's fortunate, then, that such a great console has a brilliant emulator, too, in the form of ZSNES. This program has been around for 15 years, and due to it being written in x86 assembly language it could emulate a SNES perfectly on a 200MHz PC.
You might have heard of Snes9x as well, which is more popular on some platforms because it's not tied to one specific architecture, but for performance reasons we recommend ZSNES. Also, it's available in almost every popular distro.
Start the emulator and you'll see that it has a unique, retro-looking interface (or if you've loaded the emulator with a game, hit Esc to bring up the menu). Go to Game > Load to select a ROM of SMC file type, and Config > Input to redefine your keyboard controls or set up a USB joypad if you have one.
Hitting Alt+Enter takes you into full-screen mode, but we also recommend exploring some of the other video modes in Config > Video for the best performance.
One of our favourite ZSNES features is the ability to create your own Game Genie-like cheats. Go to Cheat > Search in the menu, and choose the Comparative Search option. With this, you can take a snapshot of RAM, play for a moment and come back to see which bytes in RAM have changed.
With a bit of time and creativity, you can work out which bytes control power-ups, lives etc, and hack around with the game's workings. Awesome fun.