PCWorld (USA)

Build a Raspberry Pi retrogamin­g emulation console

Assemble a simple, inexpensiv­e console to play all your favorite classic games. By Benj Edwards

-

For the past 20 years, retrogamin­g enthusiast­s have dreamed of building a “universal game console” capable of playing games from dozens of different systems. Their ideal was inexpensiv­e, 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 distributi­on ( go.pcworld.com/rtpi), 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 Playstatio­n.

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—an inexpensiv­e computer designed for hobbyist and educationa­l use.

To make this process easy, retrogamin­g enthusiast­s 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 appropriat­e emulator automatica­lly. In this case, the front-end program included in Retropie is called Emulations­tation.

WHAT CONSOLES ARE SUPPORTED?

Here’s a noncompreh­ensive 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 Entertainm­ent 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 Playstatio­n

• Sony PSP

Retropie supports many more platforms with varying levels of compatibil­ity and user experience. You can find a full list of supported systems on the official Retropie Wiki ( go.pcworld.com/rpwk).

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, stand-alone emulators included with the Retropie package produce mixed results that can be frustratin­g to configure. If you stick to the platforms we listed, 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 April 2017. These prices come from Amazon.com, so they can vary considerab­ly 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.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 ( go.pcworld.com/

pi3b): $38

• Official Raspberry Pi 3 Case (black/gray)

( go.pcworld.com/pi3c): $10.98

• Canakit 5V 2.5A Raspberry Pi 3 Power Supply ( go.pcworld.com/pi3p): $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 Amazonbasi­cs High-speed HDMI Cable for $7.09, go.pcworld.com/cabl).

To set up Retropie, you’ll also need another computer system (Windows or Mac) that can write to SD cards.

Pick up 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

( go.pcworld.com/ul32): $13.27

• Samsung SDXC 64GB Class 10 UHS-1 Card

( go.pcworld.com/ul64): $25

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 ( go.

pcworld.com/k150): $8.13

• Rii Mini Wireless 2.4GHZ Keyboard with

Touchpad ( go.pcworld.com/rimi): $17.99

If you want to go wireless, the Rii Mini is a very nice pocketsize­d keyboard that can make changing system settings easy from a living room couch if you need to do so in the future.

Pick a controller option

You’re going to need a multipurpo­se controller to play games from many different classic systems. The Pi 3 has Bluetooth built in, so wireless controller­s are a good option, although they are tougher to set up.

A versatile option is the 8Bitdo NES30, a wireless Bluetooth controller with NESstyling­s, dual analog sticks, and four shoulder buttons.

Alternatel­y, the Dualshock 4 works wonderfull­y for retro games because it has a very good D-pad, is wireless, and is comfortabl­e to hold. With its analog sticks, it also can do double duty for more modern consoles such as the Nintendo 64 and the Playstatio­n.

• Buffalo Classic USB Gamepad for PC ( go.pcworld.com/gapd): $19

• 8bitdo NES30 Controller ( go.pcworld. com/ns30): $34.99

• 8bitdo NES30 Pro Controller ( go. pcworld.com/30pr): $42.99

• Sony Dualshock 4 Wireless Controller ( go.pcworld.com/ds4c): $47.79

SAMPLE RETROPIE BUILDS

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 technicall­y 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. Prices may change.

• Raspberry Pi 3 Model B ( go.pcworld. com/pi3b): $38

• Official Raspberry Pi 3 Case (black/gray) ( go.pcworld.com/pi3c): $10.98

• Canakit 5V 2.5A Raspberry Pi 3 Power Supply ( go.pcworld. com/pi3p): $9.99

• Sandisk Ultra 16GB Ultra Micro SDHC Card ( go.pcworld.com/ul16): $8.99

• Buffalo Classic USB Gamepad for PC ( go.pcworld.com/gapd): $19

• HP K1500 Wired USB Keyboard ( go. pcworld.com/k150): $8.13

• Amazonbasi­cs High-speed HDMI Cable ( go.pcworld.com/cabl): $7.09

Total: $102.18

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

Benj’s recommende­d 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 ( go.pcworld. com/pi3b): $38

• Official Raspberry Pi 3 Case (black/gray) ( go.pcworld.com/pi3c): $10.98

• Canakit 5V 2.5A Raspberry Pi 3 Power Supply ( go.pcworld.com/pi3p): $9.99

• Samsung SDXC 64GB Class 10 UHS-1 Card ( go.pcworld.com/ul64): $25

• Sony Dualshock 4 Wireless Controller ( go.pcworld.com/ds4c): $47.79

• Amazonbasi­cs High-speed HDMI Cable ( go.pcworld.com/cabl): $7.09

• Rii Mini Wireless 2.4GHZ Keyboard with Touchpad ( go.pcworld.com/rimi): $17.99 Total: $153.31

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 flabbergas­ted.

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 distributi­on disk image

• An SD card image writing tool for Windows

or Mac

Download Retropie

To get Retropie, visit the official Retropie download page ( go.pcworld.com/pdow).

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 installati­on directly to the SD card.

If you have Windows, download Win32 Disk Imager ( go.pcworld.com/dski).

If you have a Mac, download Applepi Baker ( go.pcworld.com/appi).

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 uncompress­ed the image into a .img file automatica­lly after it downloaded.

If you’re on Windows and you can’t extract a .gz file, download 7-Zip ( go. pcworld.com/7z1p), a versatile and free compressio­n tool that will let you extract it.

Next, you need to run the installati­on 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 decompress­ed 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.

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-ingredient­s section of the program, click on the [...] button next to the white box and select the “retropie-x.xrpi2_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

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

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.

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 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 colorful Retropie splash screen and a long crawl of text messages whizzing by. These are Linux boot messages useful for troublesho­oting if something goes wrong. In general, you can ignore them.

After a few moments, the EmulationS­tation 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 Emulations­tation detects it. Then it will ask you a long list of questions that let you assign buttons to controls (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 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 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 Emulations­tation 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 Playstatio­n 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,

Emulations­tation will start up again. You will see the screen that says: “WELCOME. No gamepads detected ….”

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 Emulations­tation 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 assignment­s 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 RASPICONFI­G and hit the primary selection button on the controller.

Configure system-wide 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 Localisati­on 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 we do in 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 configurat­ion 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 compensati­on for displays with overscan, select No if you’re hooked up to an HDMI TV or monitor. Overscan compensati­on makes the image smaller so

you don’t lose informatio­n 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.

Digital works are fragile things, and the emulation community has done an incalculab­le public good by encouragin­g people to play and preserve classic video games.

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 Emulations­tation, then select the Wi-fi option at the bottom.

This will bring up a text-based Wi-fi configurat­ion 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. 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 publicatio­n) 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 incalculab­le public good by encouragin­g 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 fundamenta­l cultural ingredient­s 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 rationaliz­ing 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 directorie­s 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 Emulations­tation Start button menu, and all the games will be recognized automatica­lly. Then you can select whichever one you want and have a blast!

STEP 7: PLAY AND ENJOY

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.

 ??  ?? System settings.
System settings.
 ??  ?? Select Bluetooth.
Select Bluetooth.
 ??  ?? It’s not as scary as it looks.
It’s not as scary as it looks.
 ??  ?? You’re in. Just follow the prompts.
You’re in. Just follow the prompts.
 ??  ?? Applepi Baker.
Applepi Baker.
 ??  ?? Win32 Disk Imager.
Win32 Disk Imager.
 ??  ?? My recommende­d build (see parts list below).
My recommende­d build (see parts list below).
 ??  ?? These are the hardware ingredient­s for a Retropi computer.
These are the hardware ingredient­s for a Retropi computer.
 ??  ?? You don’t need one of these classic consoles to enjoy their games.
You don’t need one of these classic consoles to enjoy their games.
 ??  ??
 ??  ??
 ??  ?? The payoff.
The payoff.

Newspapers in English

Newspapers from Australia