Build a retro games em­u­la­tor

BENJ EDWARDS shows how to as­sem­ble a sim­ple, in­ex­pen­sive con­sole to play your favourite clas­sic games us­ing a Rasp­berry Pi 3

Windows Advisor - - Contents -

For the past 20 years, retro gam­ing en­thu­si­asts have dreamed of build­ing a ‘uni­ver­sal game con­sole’ ca­pa­ble of play­ing games from dozens of dif­fer­ent sys­tems. Their ideal was in­ex­pen­sive, easy to con­trol with a gamepad, and ca­pa­ble of hook­ing into a TV set.

Thanks to the Rasp­berry Pi 3 hob­by­ist plat­form and the Retropie soft­ware dis­tri­bu­tion (, that dream is fi­nally pos­si­ble. For un­der £100, you can build a very nice emu­la­tion sys­tem that can play tens of thou­sands of retro games for sys­tems such as the NES, Atari 2600, Sega Ge­n­e­sis, Su­per NES, Game

Boy, and even the PLAYS­TA­TION.

All you need to do is buy a hand­ful of com­po­nents, put them to­gether, and con­fig­ure some soft­ware.

You’ll also have to pro­vide the games, but we’ll talk about that later.

The plan

To make our ‘ul­ti­mate con­sole’, we’re go­ing to run soft­ware em­u­la­tors and video game ROM files on a sin­gle-board com­puter: the Rasp­berry Pi 3 – an in­ex­pen­sive com­puter de­signed for hob­by­ist and ed­u­ca­tional use.

To make this process easy, retro gam­ing en­thu­si­asts have com­bined all the soft­ware pro­grams we need into a free soft­ware pack­age called RETROPIE. It in­cludes (among other pro­grams) a Linux op­er­at­ing sys­tem, a large suite of game sys­tem em­u­la­tors, and an in­ter­face that makes it easy to use.

For peo­ple who aren’t fa­mil­iar with emu­la­tion, here’s a brief run­down: an em­u­la­tor, for our pur­poses, is soft­ware that’s been pro­grammed to be­have in al­most the ex­act same man­ner as the hard­ware of an older video game sys­tem. It sim­u­lates the orig­i­nal con­sole cir­cuitry in soft­ware.

Since most com­put­ers lack a slot to read data from old video game car­tridges, hob­by­ists have copied video

game data into soft­ware files called ROM images. (In the case of home PC em­u­la­tors, such as the Ap­ple II, you may also en­counter disk images, which are copies of an en­tire floppy disk’s con­tents com­bined into a sin­gle com­puter file.)

A front-end in­ter­face is a pro­gram that dis­plays a graph­i­cal menu that lists avail­able games on the sys­tem, lets the user select the game of their choos­ing with a game con­troller, and then run the game on the ap­pro­pri­ate em­u­la­tor au­to­mat­i­cally. In this case, the front-end pro­gram in­cluded in RETROPIE is called Emu­la­tion Sta­tion.

Sup­ported con­soles

Here’s a list of some of the most pop­u­lar clas­sic game con­soles that RETROPIE can em­u­late very well:

Atari 2600, 7800, Lynx

GCE Vec­trex

Nin­tendo 64,NES, Su­per NES, Game Boy, Game Boy Color, Game Boy Ad­vance, Vir­tual Boy

Sega 32X, CD, Mas­ter Sys­tem, Ge­n­e­sis, Game Gear, Saturn

SNK Neo Geo, Neo Geo Pocket Color


RETROPIE sup­ports many more plat­forms with vary­ing lev­els of com­pat­i­bil­ity and user experience. You can find a full list of sup­ported sys­tems on the of­fi­cial RETROPIE Wiki (­jl9j).

The eas­i­est-to-use em­u­la­tors are part of an emu­la­tion sys­tem called RetroArch, which com­bines many

emu­la­tion en­gines (called ‘cores’) into one pro­gram with a uni­fied in­ter­face.

The other, stand­alone em­u­la­tors in­cluded with the RETROPIE pack­age pro­duce mixed re­sults that can be frus­trat­ing to con­fig­ure. If you stick to the plat­forms above, you’re sure to have a good time.

Step 1: Buy the hard­ware

Now that you know what we’re go­ing to do, it’s time to buy the nec­es­sary hard­ware. Be­low is a rough break­down of the cost of a RETROPIE sys­tem as of June 2017. These prices come from, so they can

vary over time. The ac­tual cost of this sys­tem de­pends on how much gear you bring with you.

Ba­sic re­quired com­po­nents

You need the com­puter it­self, a case so it doesn’t get dam­aged, and a power sup­ply. The ba­sic of­fi­cial Rasp­berry Pi case does the job very nicely for a low cost.

Re­gard­ing power, even though the Rasp­berry Pi 3 is pow­ered through a Mi­cro-USB port, it re­quires a 2.5A power sup­ply. That much cur­rent is not sup­plied by most com­puter USB ports or adap­tors, so we con­sider it nec­es­sary to buy a spe­cial adap­tor for this.

Rasp­berry Pi 3 Model B Quad Core CPU 1.2GHz 1GB RAM (£30 from­vga78)

Of­fi­cial Rasp­berry Pi 3 Case (£5.50 from­s­g­mLbz)

Rasp­berry Pi 3 Power adap­tor UK/EU 5V 2.5A (£7.75 from­fq­by2r)

Ob­vi­ously, you also need a TV to dis­play 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 com­puter sys­tem that can write to SD cards.

Pick a stor­age op­tion

This SD card will hold the op­er­at­ing sys­tem, em­u­la­tors, and game files. A big­ger card means more room for games. If you al­ready have a spare 8GB or larger MICROSD card, you’ll save your­self some money. If not, here are some good can­di­dates:

SANDISK Ul­tra 32GB MICROSDHC UHS-I Card (£11 from

Sam­sung 64 GB MICROSDXC Evo+ Class 10 Mem­ory Card (£19 from

Pick a key­board op­tion

You’re go­ing to need a ba­sic USB key­board dur­ing the ini­tial setup. Af­ter that, if you stick to con­sole games, you won’t need it any­more – un­less you want to change some ad­vanced op­tions in the fu­ture.

If you want to go wire­less, the Rii is a very nice pocket-sized key­board that can make chang­ing sys­tem set­tings easy from a liv­ing room couch if you need to do so in the fu­ture.

HP K1500 Key­board (£14 from­h5u2x) Rii i8 2.4GHz Key­board with Touch­pad (£7.99 from­b­m8ys)

Pick a con­troller op­tion

You’re go­ing to need a mul­ti­pur­pose con­troller to play games from many dif­fer­ent clas­sic sys­tems. The Pi 3 has Blue­tooth built in, so wire­less con­trollers are a good op­tion, although they are tougher to set up.

A ver­sa­tile op­tion is the 8bitdo NES30, a wire­less Blue­tooth con­troller with NES-stylings, dual ana­log sticks, and four shoul­der but­tons.

Al­ter­na­tively, the DUALSHOCK 4 works won­der­fully for retro games be­cause it has a very good D-pad, is wire­less, and is com­fort­able to hold. With its ana­logue sticks, it also can do dou­ble duty for more mod­ern con­soles such as the Nin­tendo 64 and the PLAYS­TA­TION.

Buf­falo Clas­sic USB Gamepad for PC (£21 from­s7s­bbu)

8bitdo NES30 Con­troller (£26 from

Sony DUALSHOCK 4 Wire­less Con­troller (£41 from

Sam­ple RETROPIE builds Bare-min­i­mum build

This is the cheap­est com­plete op­tion, with just 16GB of SD card stor­age, a cheap USB key­board (which you will tech­ni­cally only need dur­ing setup), and a lower-cost, but still good, wired USB game con­troller. Again, prices are based on Amazon listings as of June 2017.

Rasp­berry Pi 3 Model B (£30)

Of­fi­cial Rasp­berry Pi 3 Case (£5.50)

Rasp­berry Pi 3 Power adap­tor UK/EU 5V 2.5A (£7.75) SANDISK Ul­tra 32GB MICROSDHC UHS-I Card (£11) Buf­falo Clas­sic USB Gamepad for PC (£21)

HP K1500 Key­board (£14)

AMAZONBASICS High-Speed HDMI Cable (£4.99 from­nazy)

To­tal: £94.24

Rec­om­mended build:

With a 64GB SD card (32GB is fine as well), you have room for many more game ROMs (es­pe­cially newer games that take up much more space), and with a wire­less DUALSHOCK 4 and a minia­ture wire­less key­board, you have a com­plete wire­less liv­ing room experience.

Rasp­berry Pi 3 Model B (£30)

Of­fi­cial Rasp­berry Pi 3 Case (£5.50)

Rasp­berry Pi 3 Power adap­tor UK/EU 5V 2.5A (£7.75) Sam­sung 64 GB MICROSDXC Evo+ Class 10

Mem­ory Card (£19)

Sony DUALSHOCK 4 Wire­less Con­troller (£41) AMAZONBASICS High-Speed HDMI Cable (£4.99)

Rii i8 2.4GHz Key­board with Touch­pad (£7.99 from­b­m8ys)

To­tal: £116.23

Not too shabby. If you had told us a decade ago that we’d be able to build some­thing like this for un­der £200, we would have been flab­ber­gasted.

Step 2: Down­load the soft­ware

Of course, the fact that all of the soft­ware we’ll be us­ing is avail­able to down­load for free, also helps keep this build so af­ford­able.

Soft­ware you will need

The RETROPIE dis­tri­bu­tion disk im­age

An SD card im­age writ­ing tool for Win­dows

Down­load RETROPIE

To get RETROPIE, visit the of­fi­cial RETROPIE down­load page at Click the red down­load but­ton for ‘Rasp­berry Pi 2/3’, and you’ll save a file named some­thing like ‘retropiex.xr­pi2_rpi3.img.gz’, where x.x is the cur­rent ver­sion num­ber of RETROPIE. Put this file some­where you can eas­ily find it. This file is a disk im­age

that con­tains all the soft­ware (in­clud­ing OS, em­u­la­tors, and so on) you need to run our RETROPIE setup on a Rasp­berry Pi 3. In a mo­ment, we will be writ­ing it to a MICROSD card us­ing a spe­cial tool.

Down­load an SD card im­age writ­ing tool

Next we need to down­load a soft­ware tool that will write the RETROPIE soft­ware disk im­age to an SD card. We need this be­cause the file sys­tem used by RETROPIE is not the

same as the ones used by Win­dows ma­chines, so it’s not as easy as copy­ing the files di­rectly to the SD card. What we’re do­ing is writ­ing an al­ready con­fig­ured Linux OS in­stal­la­tion di­rectly to the SD card.

Win­dows: Down­load Win32 Disk Im­ager from­nmf.

Step 3: Write the soft­ware to the SD card

The RETROPIE disk im­age we just down­loaded is com­pressed. If you’re on a Mac, chances are that OS X al­ready un­com­pressed the im­age into a ‘.img’ file au­to­mat­i­cally af­ter it down­loaded.

If you’re on Win­dows and you can’t ex­tract a ‘.gz’ file, down­load 7-Zip, a ver­sa­tile and free com­pres­sion tool that will let you ex­tract it. Next, you need to run the in­stal­la­tion pro­gram for the SD card im­age writer tool you down­loaded. In­stall it. Run the tool – ei­ther Win3 2Disk Im­ager or APPLEPI Baker.

For Win32 Disk Im­ager: Un­der the De­vice sec­tion of the pro­gram, select the drive let­ter for your SD card. Make ab­so­lutely sure it’s the right one, be­cause if you pick the wrong drive, this pro­gram could erase all of its data. Click on the folder icon next to the Im­age File box in the pro­gram. Select the ‘retropie-x.x-rpi2_rpi3.img’ file we down­loaded and de­com­pressed ear­lier.

As­sum­ing you’re ab­so­lutely sure you have the cor­rect drive se­lected, click the Write but­ton and wait. It will be done in a few min­utes.

Now you have the soft­ware on the card and you’re ready for the next step.

Step 4: As­sem­ble the hard­ware As­sem­ble the case with the Rasp­berry Pi in it

If you hap­pen to have alu­minium heat sinks (op­tional) as part of a kit you pur­chased, now is the time to af­fix those to the tops of the two main black chips on the Pi board.

Then open up the Rasp­berry Pi Of­fi­cial Case bag and lay its plas­tic pieces on a ta­ble. Care­fully in­sert the Pi into the case and close it. Then at­tach the self-ad­he­sive rub­ber feet to the bot­tom of the case.

Re­move the MICROSD card from the com­puter you used to write the images.

In­sert the MICROSD card care­fully into the SD card slot on the bot­tom of the Pi. The Pi 3 has a fric­tion-fit SD card

slot (pre­vi­ous mod­els had a click-in-place slot), so push it in slowly. The SD card la­bel should be fac­ing out­ward, away from Rasp­berry Pi board.

Plug ev­ery­thing in

Be­fore start­ing up the sys­tem by plug­ging 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 mon­i­tor.

Also, plug in your USB key­board or USB key­board wire­less don­gle. Then plug in a USB gamepad, if you

have one. If you’re us­ing a wire­less pad, you don’t have to do any­thing with it yet. If you’re us­ing a wired in­ter­net con­nec­tion in­stead of Wi-Fi, plug a prop­erly wired eth­er­net cable into the side of the Pi.

Now’s the time to un­wrap your handy 2.5A power adap­tor and plug it into an AC out­let. Care­fully plug the Mi­cro-USB con­nec­tor into the side of the Rasp­berry Pi. The unit will power up.

Step 5: Con­fig­ure the soft­ware

If ev­ery­thing went as planned when writ­ing the

RETROPIE soft­ware to the SD card, upon first plug­ging in your Rasp­berry Pi, you will see a colour­ful ‘RETROPIE’ splash screen and a long crawl of text mes­sages whizzing by. These are Linux boot mes­sages use­ful for trou­bleshoot­ing if some­thing goes wrong. In gen­eral, you can ig­nore them.

Af­ter a few mo­ments, the Emu­la­tion Sta­tion front end will start up. You will see a white/gray screen that says: “WEL­COME. No gamepads de­tected. Hold a but­ton on your de­vice to con­fig­ure it. Press F4 to quit at any time.”

What you do next de­pends on whether you have a wired or wire­less game con­troller.

If you’re us­ing a wired USB gamepad

Hold down a but­ton on the con­troller un­til Emu­la­tion Sta­tion de­tects it. Then it will ask you a long list of ques­tions that let you as­sign which but­ton goes to which con­trol (in other words Up, Down, A,B, X but­tons, and so on). Don’t mess this up, or you’ll have to un­plug the Pi and start over.

Once that’s work­ing, you will see a menu that called RETROPIE. It con­tains a list of short­cuts to set var­i­ous set­tings. It’s a con­ve­nient way to con­fig­ure the sys­tem with­out hav­ing to drop to a Linux com­mand prompt.

Us­ing your con­troller, select RASPI-CONFIG from the list and hit the pri­mary se­lec­tion but­ton on the con­troller. Then skip to the ‘Con­fig­ure sys­tem-wide set­tings’ sec­tion on page 92.

If you’re us­ing a wire­less gamepad

If you would like to use a Blue­tooth gamepad like the DUALSHOCK 4 or the NES30 Pro, you have a lot more work ahead of you.

First, hit F4 on the USB key­board, and Emu­la­tion Sta­tion will quit. You will see a black screen with text in the up­per-left cor­ner. You are now at a Linux

com­mand prompt. Don’t panic. Type this ex­actly, case sen­si­tive: sudo ~/RETROPIE-S etup/

Then hit En­ter. This is the RETROPIE setup pro­gram, a blue menu with lots of text op­tions. Us­ing the key­board, find the Blue­tooth op­tion and select it.

You’ll have to switch the con­troller into dis­cov­ery mode – for the DUALSHOCK 4, hold down the Share and the PLAYS­TA­TION but­ton at the same time un­til its light blinks. For the NES30, hold down the power but­ton on the front-left of the con­troller un­til it turns on. Then you can search for it us­ing the Blue­tooth util­ity and sync with it (hit the sec­ond op­tion for the DUALSHOCK 4 af­ter it syncs).

Af­ter that, restart your Rasp­berry Pi. To do this, exit the config pro­gram and type this into the com­mand prompt: sudo shut­down -r now

The sys­tem will re­boot. Af­ter a few mo­ments, Emu­la­tion Sta­tion will start up again. You will see the screen that says: “WEL­COME. No gamepads de­tected, etc.”

This time, in­stead of hit­ting F4, tap a but­ton on your Blue­tooth gamepad un­til it syncs up with the Pi.

Then hold down a but­ton on the gamepad un­til Emu­la­tion Sta­tion de­tects it. It will ask you a long list of ques­tions that let you as­sign which but­ton goes to which con­trol (Up, Down, A, B,X but­tons, and so on). Don’t mess this up, or you may have to un­plug the Pi and start the but­ton as­sign­ments over again.

Once that’s work­ing, you will see a menu called RETROPIE. It con­tains a list of short­cuts to set var­i­ous set­tings. It’s a con­ve­nient way to con­fig­ure the sys­tem with­out hav­ing to drop to a Linux com­mand prompt.

Us­ing your con­troller, select RASPI-CONFIG and hit the pri­mary se­lec­tion but­ton on the con­troller.

Con­fig­ure sys­tem-wide set­tings

If you did what we wrote above, ei­ther wired or wire­less, you should now be in the Rasp­berry Pi sys­tem set­tings pro­gram. It’s a blue screen with text-based menus (see be­low).

Un­der Ad­vanced Op­tions and then Over­scan. When it asks you if you would like to en­able com­pen­sa­tion for dis­plays with over­scan, select No if you’re hooked up to an HDMI TV or mon­i­tor. Over­scan com­pen­sa­tion makes the im­age smaller so you don’t lose in­for­ma­tion off the sides of the screen if you’re us­ing an old-style TV set. The only time you’d want to hit Yes here is if you are us­ing a com­pos­ite TV set with a spe­cial cable.

Af­ter you’re done set­ting that up, back out of those menus and select Fin­ish. Then restart your Rasp­berry

Pi. If you have a USB con­troller, hit the start but­ton and choose Restart. If you’re at a text prompt, type: sudo shut­down -r now and the sys­tem will re­boot.

Con­fig­ure Wi-Fi

If you’ve got a wired eth­er­net con­nec­tion, you can skip this step. If not, it’s time to use your gamepad to nav­i­gate to the RETROPIE menu in Emu­la­tion Sta­tion, then select the Wi-Fi op­tion at the bot­tom.

This will bring up a text-based Wi-Fi con­fig­u­ra­tion pro­gram. Do what it says – search for your ac­cess point, and en­ter your pass­word. Then you should be up and run­ning with an in­ter­net con­nec­tion.

Step 6: Copy game files to the Rasp­berry Pi

So you’ve set up the hard­ware and the soft­ware, but you still need game files to have fun with this tiny beast. So let’s copy some over.

There are sev­eral ways to do it, but we think the eas­i­est method is to use Win­dows file shar­ing – called ‘Samba’ in the Linux world.

On Win­dows: Open up a new Ex­plorer win­dow and type \\retropie into the lo­ca­tion bar at the top.

If for some rea­son you changed the sys­tem’s host­name in the set­tings, you’ll need to type that above in place of ‘retropie’.

Now that you’ve con­nected to the Pi via file shar­ing, you can click on the roms shared folder. You will see a big list of fold­ers named af­ter var­i­ous game plat­forms like ‘atari2600’ and ‘ge­n­e­sis’. Drag-and-drop what­ever ROM files or disk images you have into the proper plat­form-named di­rec­to­ries on the Pi. For ex­am­ple, .NES ROM files should go in the nes di­rec­tory on the

Pi, and .SMC Su­per NES ROM files should go in the

snes di­rec­tory. Af­ter you’ve copied ev­ery­thing, restart your Rasp­berry Pi through the Emu­la­tion Sta­tion ‘start’ but­ton menu, and all the games will be rec­og­nized au­to­mat­i­cally. Then you can select which­ever one you want and have a blast.

Step 7: Play and en­joy

Now is the time to sit back, re­lax, and en­joy the fruits of your labour. Play what­ever you want, when­ever you want, with ease. If you’re a 30-some­thing, or older like me, you’ll be amazed at how lit­tle time you have to play these games com­pared to when you were a child. Just re­mem­ber to take breaks every once and a while to sleep, eat, and feed your chil­dren.

You don’t need one of these clas­sic con­soles to en­joy their best games

Rasp­berry Pi 3

Sony DualShock 4 Wire­less Con­troller

RetroPie is a free down­load

The Rasp­berry Pi board and case

Con­fig­ure your set­tings

Sys­tem set­tings

Newspapers in English

Newspapers from UK

© PressReader. All rights reserved.