How to build a Raspberry Pi retrogaming emulation console

This RetroPie really happened: Watch (above) as our own Adam Patrick Murray and Alaina Yee build a RetroPie system after they weren’t able to buy an SNES Classic. Go ahead, laugh at (and learn from) our mistakes.

For the past 20 years, retrogaming 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, that dream is finally possible. For under $110, 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.

The plan

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 Model B+—a $40 computer designed for hobbyist and educational use. 

To make this process easy, retrogaming enthusiasts have combined all the software programs we need into a free software package called RetroPie. RetroPie 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 EmulationStation.

You don’t need one of these classic game consoles to enjoy their best games.

What consoles are supported?

Here’s a noncomprehensive list of some of the most popular classic game consoles that RetroPie can emulate very well:

  • Atari 2600
  • Atari 7800
  • Atari Lynx
  • GCE Vectrex
  • NEC TurboGrafx-16
  • Nintendo 64
  • Nintendo Entertainment System
  • Nintendo Super NES
  • Nintendo Game Boy
  • Nintendo Game Boy Color
  • Nintendo Game Boy Advance
  • Nintendo Virtual Boy
  • Sega 32X
  • Sega CD
  • Sega Master System
  • Sega Genesis
  • Sega Game Gear
  • Sega Saturn
  • SNK Neo Geo
  • SNK Neo Geo Pocket Color
  • Sony PlayStation
  • Sony 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.

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

These are the hardware ingredients for a RetroPi computer.

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 April 2017. These prices come from, so they can vary considerably 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. But if you want to branch out, see our roundup of the best Raspberry Pi cases.

Regarding power, even though the Raspberry Pi 3 is powered through a micro USB port, it requires a 2.5 amp power supply. That much current is not supplied by most computer USB ports or adapters, so I consider it necessary to buy a special adapter for this purpose, and Amazon sells a good one from CanaKit.

  • Raspberry Pi 3 Model B+ – $39.99 
  • Official Raspberry Pi 3 Case (black/gray) – $8.05 
  • CanaKit 5V 2.5A Raspberry Pi 3 Power Supply $9.99 

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 (such as this 6-foot AmazonBasics High-Speed HDMI Cable for $6.99).

To set up RetroPie, you’ll also need another computer system (Windows or Mac) 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 16GB Ultra Micro SDHC Card – $6.40
  • SanDisk Ultra 32GB microSDHC UHS-I Card – $8.35 
  • Samsung SDXC 64GB Class 10 UHS-1 Card – $21.96

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 Mini 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 Wired USB Keyboard – $14.99
  • Rii Mini Wireless 2.4GHz Keyboard with Touchpad- $15.95

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 N30, a wireless Bluetooth controller with NES-stylings, dual analog sticks, and four shoulder buttons. (See our reviews of both the N30 and N30 Pro models to learn more.)

Alternately, 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 analog 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 – $18.99
  • 8bitdo N30 Controller – $24.99
  • 8bitdo N30 Pro Controller – $39.99
  • Sony DualShock 4 Wireless Controller – $49.99 

Sample RetroPie builds

My recommended build (see parts list below).

With those options in mind, let’s build out two sample systems.

Bare-minimum build

This is the least expensive 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 April 2017.

  • Raspberry Pi 3 Model B+ – $39.99 
  • Official Raspberry Pi 3 Case (black/gray) – $8.05 
  • CanaKit 5V 2.5A Raspberry Pi 3 Power Supply $9.99 
  • SanDisk Ultra 16GB Ultra Micro SDHC Card – $6.40
  • Buffalo Classic USB Gamepad for PC – $18.99
  • HP K1500 Wired USB Keyboard – $14.99
  • AmazonBasics High-Speed HDMI Cable – $6.99

Total: $105.40

If you have a little more money to spend, try this build that I use for a more comfortable setup:

Benj’s recommended build:

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+ – $39.99 
  • Official Raspberry Pi 3 Case (black/gray) – $8.05 
  • CanaKit 5V 2.5A Raspberry Pi 3 Power Supply $9.99 
  • Samsung SDXC 64GB Class 10 UHS-1 Card – $21.96
  • Sony DualShock 4 Wireless Controller – $49.99 
  • AmazonBasics High-Speed HDMI Cable – $6.99
  • Rii Mini Wireless 2.4GHz Keyboard with Touchpad- $15.95

Total: $152.92

Not too shabby. If you had told me a decade ago that I’d be able to build something like this for under $200, I would have been flabbergasted.

RetroPie is a free download.

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 or Mac

Download RetroPie

To get RetroPie, visit the official RetroPie download page.

Click the giant red download button for “Raspberry Pi 2/3,” and you’ll save a file named something like “retropie-x.x-rpi2_rpi3.img.gz,” where x.x is the current version number of RetroPie. Put this file somewhere you can easily find it, such as on your desktop.

This file is a disk image that contains all the software (including OS, emulators, etc.) 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 tool because the file system used by RetroPie is not the same as the ones used by Windows machines or Macs, 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.

If you have Windows, download Win32 Disk Imager.

If you have a Mac, download ApplePi Baker.

If you have Linux, I seriously doubt you need this tutorial!

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.

Win32 Disk Imager

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.

ApplePi Baker

For ApplePi Baker: First, under the Pi-Crust section of the program, select the SD card drive you want to write to. It will say something like “/dev/sda3”.

Then under the Pi-Ingredients section of the program, click on the [] button next to the white box and select the “retropie-x.x-rpi2_rpi3.img” file we downloaded earlier.

Finally, click the Restore Backup button, and the image will write to the SD card.

Now you have the software on the card and you’re ready for the next step.

Step 4: Assemble the hardware

The Raspberry Pi board and case.

Assemble the case with the Raspberry Pi in it

If you happen to have aluminum 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.5 amp power adapter 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 4: 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 colorful “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.

You’re in. Just follow the prompts.

After a few moments, the EmulationStation 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 EmulationStation detects it. Then it will ask you a long list of questions that let you assign which button goes to which control (i.e. Up, Down, A, B, X buttons, etc.). 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.

Configure your settings.

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 in this tutorial below.

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 EmulationStation will quit. You will see a black screen with text in the upper-left corner. You are now at a Linux command prompt.

It’s not as scary as it looks.

Don’t panic. Type this exactly, case sensitive: sudo ~/RetroPie-S etup/

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.

Select Bluetooth.

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, EmulationStation 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 EmulationStation detects it. It will ask you a long list of questions that let you assign which button goes to which control (i.e. Up, Down, A, B, X buttons, etc.). 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

System settings.

If you did what I 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.

You’ll probably want to change a few settings here. The first is Localisation Options (note UK spelling)—which you’ll want to configure if you don’t live in the UK. The Pi and RetroPie were developed in the UK, and they use a different keyboard layout there than the U.S. It is worth setting up an American keyboard layout and setting your time zone, because those will help if you need to make advanced configuration changes in the future.

The second thing to change is 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.

Configure Wi-Fi

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 EmulationStation, 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 5: Copy game files to the Raspberry Pi

Bring on the games.

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. First, I’d like to share a few thoughts on the ethical nature of what we’re doing.

Currently, it is not legal in the United States to possess and play copies of games you have not bought or have not licensed for play, but I personally believe (speaking on behalf of myself and not this publication) that playing older game ROMS with emulators is ethical when done in moderation. (It is also possible to run legally licensed or purchased ROM files, but that is beyond the scope of this article.)

Digital works are fragile things, and the emulation community has done an incalculable public good by encouraging people to play and preserve classic video games. Nothing less than our cultural legacy is at stake. So partake, my friends, in your shared cultural heritage. And don’t feel bad about it. We all have the right to enjoy the fundamental cultural ingredients that came together to make us who we are today. Don’t let anyone try to keep that from you.

Hopefully, this reality will some day become reflected properly in law, but until then, we’re left building awesome, tiny emulation boxes and rationalizing it however we can.

Copy ROM files via Samba network file sharing

With that disclaimer out of the way, here’s how you copy game files easily over to the Raspberry Pi. There are several ways to do it, but I think the easiest method is to use Windows file sharing—called “Samba” in the Linux world. You can do this whether you have a Mac or a Windows Machine.

On Windows: Open up a new Explorer window and type \\retropie into the location bar at the top.

On a Mac: Open Finder, select Go from the menu at the top of the window, then select Connect to Server. In that box, type smb://retropie and click on Connect.

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 EmulationStation “start” button menu, and all the games will be recognized automatically. Then you can select whichever one you want and have a blast!

Step 6: Play and enjoy

The payoff.

Wow, you’ve done quite a lot. Now is the time to sit back, relax, and enjoy the fruits of your labor. 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 kid. Just remember to take breaks every once and a while to sleep, eat, and feed your kids.

For more tinkering fun with the Raspberry Pi see our article on the best Raspberry Pi projects suitable for beginners and our compilation of insanely innovative Raspberry Pi projects. Or check out our roundup of the best Raspberry Pi kits with all the parts you need for a specific project. 

Source: Read Full Article