Build a retro games emulator
BENJ EDWARDS shows how to assemble a simple, inexpensive console to play your favourite classic games using a Raspberry Pi 3
For the past 20 years, retro gaming enthusiasts have dreamed of building a ‘universal game console’ capable of playing games from dozens of different systems. Their ideal was inexpensive, easy to control with a gamepad, and capable of hooking into a TV set.
Thanks to the Raspberry Pi 3 hobbyist platform and the Retropie software distribution (retropie.org.uk), that dream is finally possible. For under £100, you can build a very nice emulation system that can play tens of thousands of retro games for systems such as the NES, Atari 2600, Sega Genesis, Super NES, Game
Boy, and even the PLAYSTATION.
All you need to do is buy a handful of components, put them together, and configure some software.
You’ll also have to provide the games, but we’ll talk about that later.
To make our ‘ultimate console’, we’re going to run software emulators and video game ROM files on a single-board computer: the Raspberry Pi 3 – an inexpensive computer designed for hobbyist and educational use.
To make this process easy, retro gaming enthusiasts have combined all the software programs we need into a free software package called RETROPIE. It includes (among other programs) a Linux operating system, a large suite of game system emulators, and an interface that makes it easy to use.
For people who aren’t familiar with emulation, here’s a brief rundown: an emulator, for our purposes, is software that’s been programmed to behave in almost the exact same manner as the hardware of an older video game system. It simulates the original console circuitry in software.
Since most computers lack a slot to read data from old video game cartridges, hobbyists have copied video
game data into software files called ROM images. (In the case of home PC emulators, such as the Apple II, you may also encounter disk images, which are copies of an entire floppy disk’s contents combined into a single computer file.)
A front-end interface is a program that displays a graphical menu that lists available games on the system, lets the user select the game of their choosing with a game controller, and then run the game on the appropriate emulator automatically. In this case, the front-end program included in RETROPIE is called Emulation Station.
Here’s a list of some of the most popular classic game consoles that RETROPIE can emulate very well:
Atari 2600, 7800, Lynx
Nintendo 64,NES, Super NES, Game Boy, Game Boy Color, Game Boy Advance, Virtual Boy
Sega 32X, CD, Master System, Genesis, Game Gear, Saturn
SNK Neo Geo, Neo Geo Pocket Color
Sony PLAYSTATION, PSP
RETROPIE supports many more platforms with varying levels of compatibility and user experience. You can find a full list of supported systems on the official RETROPIE Wiki (tinyurl.com/joojl9j).
The easiest-to-use emulators are part of an emulation system called RetroArch, which combines many
emulation engines (called ‘cores’) into one program with a unified interface.
The other, standalone emulators included with the RETROPIE package produce mixed results that can be frustrating to configure. If you stick to the platforms above, you’re sure to have a good time.
Step 1: Buy the hardware
Now that you know what we’re going to do, it’s time to buy the necessary hardware. Below is a rough breakdown of the cost of a RETROPIE system as of June 2017. These prices come from Amazon.co.uk, so they can
vary over time. The actual cost of this system depends on how much gear you bring with you.
Basic required components
You need the computer itself, a case so it doesn’t get damaged, and a power supply. The basic official Raspberry Pi case does the job very nicely for a low cost.
Regarding power, even though the Raspberry Pi 3 is powered through a Micro-USB port, it requires a 2.5A power supply. That much current is not supplied by most computer USB ports or adaptors, so we consider it necessary to buy a special adaptor for this.
Raspberry Pi 3 Model B Quad Core CPU 1.2GHz 1GB RAM (£30 from tinyurl.com/ycbvga78)
Official Raspberry Pi 3 Case (£5.50 from tinyurl.com/ybsgmLbz)
Raspberry Pi 3 Power adaptor UK/EU 5V 2.5A (£7.75 from tinyurl.com/ydfqby2r)
Obviously, you also need a TV to display the games and an HDMI cable to hook the Pi 3 to the TV set. If you don’t have a spare HDMI cable, buy one.
To set up RETROPIE, you’ll also need another computer system that can write to SD cards.
Pick a storage option
This SD card will hold the operating system, emulators, and game files. A bigger card means more room for games. If you already have a spare 8GB or larger MICROSD card, you’ll save yourself some money. If not, here are some good candidates:
SANDISK Ultra 32GB MICROSDHC UHS-I Card (£11 from tinyurl.com/y7vr55rp)
Samsung 64 GB MICROSDXC Evo+ Class 10 Memory Card (£19 from tinyurl.com/ycubq547)
Pick a keyboard option
You’re going to need a basic USB keyboard during the initial setup. After that, if you stick to console games, you won’t need it anymore – unless you want to change some advanced options in the future.
If you want to go wireless, the Rii is a very nice pocket-sized keyboard that can make changing system settings easy from a living room couch if you need to do so in the future.
HP K1500 Keyboard (£14 from tinyurl.com/y9xh5u2x) Rii i8 2.4GHz Keyboard with Touchpad (£7.99 from tinyurl.com/yafbm8ys)
Pick a controller option
You’re going to need a multipurpose controller to play games from many different classic systems. The Pi 3 has Bluetooth built in, so wireless controllers are a good option, although they are tougher to set up.
A versatile option is the 8bitdo NES30, a wireless Bluetooth controller with NES-stylings, dual analog sticks, and four shoulder buttons.
Alternatively, the DUALSHOCK 4 works wonderfully for retro games because it has a very good D-pad, is wireless, and is comfortable to hold. With its analogue sticks, it also can do double duty for more modern consoles such as the Nintendo 64 and the PLAYSTATION.
Buffalo Classic USB Gamepad for PC (£21 from tinyurl.com/ycs7sbbu)
8bitdo NES30 Controller (£26 from tinyurl.com/y76uxy5e)
Sony DUALSHOCK 4 Wireless Controller (£41 from tinyurl.com/y9n4q4n6)
Sample RETROPIE builds Bare-minimum build
This is the cheapest complete option, with just 16GB of SD card storage, a cheap USB keyboard (which you will technically only need during setup), and a lower-cost, but still good, wired USB game controller. Again, prices are based on Amazon listings as of June 2017.
Raspberry Pi 3 Model B (£30)
Official Raspberry Pi 3 Case (£5.50)
Raspberry Pi 3 Power adaptor UK/EU 5V 2.5A (£7.75) SANDISK Ultra 32GB MICROSDHC UHS-I Card (£11) Buffalo Classic USB Gamepad for PC (£21)
HP K1500 Keyboard (£14)
AMAZONBASICS High-Speed HDMI Cable (£4.99 from tinyurl.com/y9t5nazy)
With a 64GB SD card (32GB is fine as well), you have room for many more game ROMs (especially newer games that take up much more space), and with a wireless DUALSHOCK 4 and a miniature wireless keyboard, you have a complete wireless living room experience.
Raspberry Pi 3 Model B (£30)
Official Raspberry Pi 3 Case (£5.50)
Raspberry Pi 3 Power adaptor UK/EU 5V 2.5A (£7.75) Samsung 64 GB MICROSDXC Evo+ Class 10
Memory Card (£19)
Sony DUALSHOCK 4 Wireless Controller (£41) AMAZONBASICS High-Speed HDMI Cable (£4.99)
Rii i8 2.4GHz Keyboard with Touchpad (£7.99 from tinyurl.com/yafbm8ys)
Not too shabby. If you had told us a decade ago that we’d be able to build something like this for under £200, we would have been flabbergasted.
Step 2: Download the software
Of course, the fact that all of the software we’ll be using is available to download for free, also helps keep this build so affordable.
Software you will need
The RETROPIE distribution disk image
An SD card image writing tool for Windows
To get RETROPIE, visit the official RETROPIE download page at tinyurl.com/zdax3mr. Click the red download button for ‘Raspberry Pi 2/3’, and you’ll save a file named something like ‘retropiex.xrpi2_rpi3.img.gz’, where x.x is the current version number of RETROPIE. Put this file somewhere you can easily find it. This file is a disk image
that contains all the software (including OS, emulators, and so on) you need to run our RETROPIE setup on a Raspberry Pi 3. In a moment, we will be writing it to a MICROSD card using a special tool.
Download an SD card image writing tool
Next we need to download a software tool that will write the RETROPIE software disk image to an SD card. We need this because the file system used by RETROPIE is not the
same as the ones used by Windows machines, so it’s not as easy as copying the files directly to the SD card. What we’re doing is writing an already configured Linux OS installation directly to the SD card.
Windows: Download Win32 Disk Imager from tinyurl.com/odxlnmf.
Step 3: Write the software to the SD card
The RETROPIE disk image we just downloaded is compressed. If you’re on a Mac, chances are that OS X already uncompressed the image into a ‘.img’ file automatically after it downloaded.
If you’re on Windows and you can’t extract a ‘.gz’ file, download 7-Zip, a versatile and free compression tool that will let you extract it. Next, you need to run the installation program for the SD card image writer tool you downloaded. Install it. Run the tool – either Win3 2Disk Imager or APPLEPI Baker.
For Win32 Disk Imager: Under the Device section of the program, select the drive letter for your SD card. Make absolutely sure it’s the right one, because if you pick the wrong drive, this program could erase all of its data. Click on the folder icon next to the Image File box in the program. Select the ‘retropie-x.x-rpi2_rpi3.img’ file we downloaded and decompressed earlier.
Assuming you’re absolutely sure you have the correct drive selected, click the Write button and wait. It will be done in a few minutes.
Now you have the software on the card and you’re ready for the next step.
Step 4: Assemble the hardware Assemble the case with the Raspberry Pi in it
If you happen to have aluminium heat sinks (optional) as part of a kit you purchased, now is the time to affix those to the tops of the two main black chips on the Pi board.
Then open up the Raspberry Pi Official Case bag and lay its plastic pieces on a table. Carefully insert the Pi into the case and close it. Then attach the self-adhesive rubber feet to the bottom of the case.
Remove the MICROSD card from the computer you used to write the images.
Insert the MICROSD card carefully into the SD card slot on the bottom of the Pi. The Pi 3 has a friction-fit SD card
slot (previous models had a click-in-place slot), so push it in slowly. The SD card label should be facing outward, away from Raspberry Pi board.
Plug everything in
Before starting up the system by plugging it in (the Pi has no on/off switch, so it will be on as long as it is plugged in), hook the HDMI cable to the Pi and to a TV set or monitor.
Also, plug in your USB keyboard or USB keyboard wireless dongle. Then plug in a USB gamepad, if you
have one. If you’re using a wireless pad, you don’t have to do anything with it yet. If you’re using a wired internet connection instead of Wi-Fi, plug a properly wired ethernet cable into the side of the Pi.
Now’s the time to unwrap your handy 2.5A power adaptor and plug it into an AC outlet. Carefully plug the Micro-USB connector into the side of the Raspberry Pi. The unit will power up.
Step 5: Configure the software
If everything went as planned when writing the
RETROPIE software to the SD card, upon first plugging in your Raspberry Pi, you will see a colourful ‘RETROPIE’ splash screen and a long crawl of text messages whizzing by. These are Linux boot messages useful for troubleshooting if something goes wrong. In general, you can ignore them.
After a few moments, the Emulation Station front end will start up. You will see a white/gray screen that says: “WELCOME. No gamepads detected. Hold a button on your device to configure it. Press F4 to quit at any time.”
What you do next depends on whether you have a wired or wireless game controller.
If you’re using a wired USB gamepad
Hold down a button on the controller until Emulation Station detects it. Then it will ask you a long list of questions that let you assign which button goes to which control (in other words Up, Down, A,B, X buttons, and so on). Don’t mess this up, or you’ll have to unplug the Pi and start over.
Once that’s working, you will see a menu that called RETROPIE. It contains a list of shortcuts to set various settings. It’s a convenient way to configure the system without having to drop to a Linux command prompt.
Using your controller, select RASPI-CONFIG from the list and hit the primary selection button on the controller. Then skip to the ‘Configure system-wide settings’ section on page 92.
If you’re using a wireless gamepad
If you would like to use a Bluetooth gamepad like the DUALSHOCK 4 or the NES30 Pro, you have a lot more work ahead of you.
First, hit F4 on the USB keyboard, and Emulation Station will quit. You will see a black screen with text in the upper-left corner. You are now at a Linux
command prompt. Don’t panic. Type this exactly, case sensitive: sudo ~/RETROPIE-S etup/retropie-setup.sh
Then hit Enter. This is the RETROPIE setup program, a blue menu with lots of text options. Using the keyboard, find the Bluetooth option and select it.
You’ll have to switch the controller into discovery mode – for the DUALSHOCK 4, hold down the Share and the PLAYSTATION button at the same time until its light blinks. For the NES30, hold down the power button on the front-left of the controller until it turns on. Then you can search for it using the Bluetooth utility and sync with it (hit the second option for the DUALSHOCK 4 after it syncs).
After that, restart your Raspberry Pi. To do this, exit the config program and type this into the command prompt: sudo shutdown -r now
The system will reboot. After a few moments, Emulation Station will start up again. You will see the screen that says: “WELCOME. No gamepads detected, etc.”
This time, instead of hitting F4, tap a button on your Bluetooth gamepad until it syncs up with the Pi.
Then hold down a button on the gamepad until Emulation Station detects it. It will ask you a long list of questions that let you assign which button goes to which control (Up, Down, A, B,X buttons, and so on). Don’t mess this up, or you may have to unplug the Pi and start the button assignments over again.
Once that’s working, you will see a menu called RETROPIE. It contains a list of shortcuts to set various settings. It’s a convenient way to configure the system without having to drop to a Linux command prompt.
Using your controller, select RASPI-CONFIG and hit the primary selection button on the controller.
Configure system-wide settings
If you did what we wrote above, either wired or wireless, you should now be in the Raspberry Pi system settings program. It’s a blue screen with text-based menus (see below).
Under Advanced Options and then Overscan. When it asks you if you would like to enable compensation for displays with overscan, select No if you’re hooked up to an HDMI TV or monitor. Overscan compensation makes the image smaller so you don’t lose information off the sides of the screen if you’re using an old-style TV set. The only time you’d want to hit Yes here is if you are using a composite TV set with a special cable.
After you’re done setting that up, back out of those menus and select Finish. Then restart your Raspberry
Pi. If you have a USB controller, hit the start button and choose Restart. If you’re at a text prompt, type: sudo shutdown -r now and the system will reboot.
If you’ve got a wired ethernet connection, you can skip this step. If not, it’s time to use your gamepad to navigate to the RETROPIE menu in Emulation Station, then select the Wi-Fi option at the bottom.
This will bring up a text-based Wi-Fi configuration program. Do what it says – search for your access point, and enter your password. Then you should be up and running with an internet connection.
Step 6: Copy game files to the Raspberry Pi
So you’ve set up the hardware and the software, but you still need game files to have fun with this tiny beast. So let’s copy some over.
There are several ways to do it, but we think the easiest method is to use Windows file sharing – called ‘Samba’ in the Linux world.
On Windows: Open up a new Explorer window and type \\retropie into the location bar at the top.
If for some reason you changed the system’s hostname in the settings, you’ll need to type that above in place of ‘retropie’.
Now that you’ve connected to the Pi via file sharing, you can click on the roms shared folder. You will see a big list of folders named after various game platforms like ‘atari2600’ and ‘genesis’. Drag-and-drop whatever ROM files or disk images you have into the proper platform-named directories on the Pi. For example, .NES ROM files should go in the nes directory on the
Pi, and .SMC Super NES ROM files should go in the
snes directory. After you’ve copied everything, restart your Raspberry Pi through the Emulation Station ‘start’ button menu, and all the games will be recognized automatically. Then you can select whichever one you want and have a blast.
Step 7: Play and enjoy
Now is the time to sit back, relax, and enjoy the fruits of your labour. Play whatever you want, whenever you want, with ease. If you’re a 30-something, or older like me, you’ll be amazed at how little time you have to play these games compared to when you were a child. Just remember to take breaks every once and a while to sleep, eat, and feed your children.
Configure your settings
The Raspberry Pi board and case
RetroPie is a free download
Sony DualShock 4 Wireless Controller
Raspberry Pi 3
You don’t need one of these classic consoles to enjoy their best games