Playing retro games on the Raspberry Pi.

As easy as pie

I’ve been toying with the idea of using the Raspberry Pi as a retro console, mainly because a) it’s cool b) nice to play games on the TV from the couch c) one box to rule them all!

I will be focusing on playing ZX Spectrum games, since that’s how this blog rolls, but the principles apply to all systems.

IMG_20170409_125943

You need a few things to get the best (and easy) experience:

  1. Raspberry Pi 3. The Pi 2 will also do the job but the 3 is just a bit faster, has built-in Wi-Fi and doesn’t cost all that much more. Can’t argue with that!
  2. An HDMI cable to connect the Pi to your TV/monitor.
  3. A game controller like the XBox 360 controller. I used the Steam controller, which has been lying about for a while.
  4. A micro-USB cable or charger to connect the Pi to a power source. More on this later.
  5. A class 10 microSD card (16GB or 32GB) to store stuff on. They are quite cheap nowadays.
  6. A wireless keyboard and mouse combo. You could use a wired keyboard and mouse but then you not only use up 1 extra valuable USB port but also have wires all over the place. I actually use the Logitech K400 plus wireless keyboard+trackpad combo.
  7. A nice case to hold the Raspberry Pi. There are plenty of nice looking ones. I went for a simple black one keeping in theme with the speccy.

Once you have all the items from the above shopping list. It’s time to put it all together!

First things first

Putting together the hardware is super easy – just pop the Pi into it’s case and make sure the case is fitting snugly around the Pi. The software installation is easy too:

  1. Download the Retro-pie image from https://retropie.org.uk/download/.
  2. Use a SD formatter like Win32DiskFormatter to format the SD card (you may need a SD card adapter to put the microSD in) with the above image.
  3. Pop the microSD into the Pi.
  4. Hook up the Pi to the monitor/TV via the HDMI cable. Attach the game controller or its dongle (if it’s wireless) to the Pi. You will need keyboard and mouse too to set up things, so attach them to the USB slots.
  5. Lastly, attach the microUSB power cable to the Pi. There are a couple of ways to source the power actually. You could use a cellphone charger that come with microUSB. Or you could use a powered USB Hub. Or you could use the TV/monitor itself to power the Pi if the TV/monitor has a USB port. This is what I do. This allows the Pi to power up automatically when the TV turns on. Note that the Pi 3 officially requires a 2.5VA power source to work faultlessly. So far, I’ve used my TV to power the Pi 3 without issues so maybe that power rating is for when you’re pushing the Pi 3 to drive a lot more stuff via it’s USB ports or external devices. I just have the Steam controller dongle and the wireless keyboard dongle on the USB ports. Seem to work fine!

The Setup

If all is well, the Retro-pie setup will automatically install the OS and itself on the Pi. It will also install something called the EmulationStation (ES), which is a front-end to the emulation goodness. You will see it come up once the installation is over and the Pi boots up. I suggest you follow the steps outlined here to complete the setup and then come back once those are out of the way.

If you’ve completed the steps from that link, your Pi should be on the wifi network and your controller should be ready to go. In my case, the Steam controller wasn’t detected and so I had to perform a couple of additional steps, which I will outline here in case you have a Steam controller too:

  1. Go the Retro-pie setup page. This can be found by selecting RetroPie in the EmulationStation window, and then selecting RetroPie Setup.
  2. This will drop you to a basic GUI setup page from which you can install all sorts of additional goodies for your Pi. Choose the Manage Packages option.IMG_20170409_140022
  3. Choose Manage driver packages and select the steamcontroller package. It will ask you to choose between Xbox360 and keyboard/mouse controls – pick the former!
  4. Back out all the way back to EmulationStation. Your Steam Controller should work now.
  5. If the Steam controller isn’t working (i.e you aren’t able to navigate EmulationStation by using the D-pad), you can try restarting the Pi from the EmulationStation menu (Quit > Restart).IMG_20170409_141121
  6. If the controller still isn’t working, go to Configure Input in the EmulationStation menu. It will ask you if you wish to configure input – select Yes. In the next window it should say that a gamepad was detected and ask you to hold a button to configure it. Do so, and map the controls on the controller to whatever you want. That’s it!

Play-time!

Well almost. You need to put some games on the Pi in order to play them. The cool thing about RetroPie is that it already comes with a dozen or so emulators pre-installed. They will show up in EmulationStation automatically if RetroPie finds games for them in a special folder called “roms”. I use Samba (via a Windows laptop) to transfer games, but you can use SSH or USB or SFTP to transfer files.

Sticking to Samba, if your Pi and your computer are on the same WiFi network, you should be able to see a folder called retropie under your Network in Windows Explorer. Under this is a folder called roms. You should see a folder called “zxspectrum” under this. If you don’t, create one and put all your speccy games in this folder. Zipped games are fine.

Now if you check in EmulationStation, you should see Sinclair ZX Spectrum listed. Selecting this will show you a list of speccy games that can be played. Choose any game to start playing.

The immediate thing you will notice is that your controller is useless. Most games usually expect you to select a control from a menu (1 for Keyboard, 2 for Kempston etc) before you can play the game. To do so, press the Select button on your controller (or whatever it was that you mapped for Select in the controller setup phase). This brings up the Fuse keyboard overlay. From here you can use your controller to select any speccy key. Press Select again to drop back into the game. If you start the game now expecting the controller to work like a Kempston, you will be in for a surprise – it doesn’t! That’s because you still need to tell the emulator how to treat the controller before it can pass on the same info to the game.

To do so, press Select + X. This will bring up the RetroArch GUI. RetroArch is the emulation gateway which interfaces between an emulator (known as a ‘core’ in RetroArch lingo) and the Pi. This is what allows you to actually use multiple emulators on the Pi. IMG_20170409_205613

Anyway, there are a lot of settings to play around with if you wish. But let’s just focus on getting the controller to work as a bog standard Kempston joystick for all speccy games, by default.

Go to the Quick Menu in RGUI – you may need to press Back or B on the controller to see the option. Select the Controls option. At the very top should be the “User 1 Device Type” field set to either “RetroPad” or “None”. Whatever it is set to, press Right or Left on the controller to scroll through the various joystick options. If you see Kempston, leave it at that. Scroll down to the Save Core Remap File option and choose it to create a default remap file. Press Back to go to previous menu and then select Save Core Override option. Finally select Resume. Your controller should work like a Kempston joystick now.

IMG_20170409_205551

Some games don’t support Kempston though. For these games, you will have to over-ride the default option that was configured above. To do so, first fire up the game. Then do the same steps above, except select a supported joystick in “User 1 Device Type” and then do a Save Game Remap file instead of a Save Core Remap file, and similarly do a Save Game Override.

That’s it! You can start playing your favourite speccy game from the comfort of your couch now.

Bonus stuff

Better display

If you’re playing on a HD like display you will notice that most games are quite pixelated. You can reduce the pixelation by enabling BiLinear Filtering from the RGUI > Settings > Video page.

 

Another emulator

Fuse isn’t the only emulator that can run speccy games on the Pi. You can also try FBZX, Zesarux and UnrealSpeccy. To do so, go to RetroArch Setup > Manage Packages > Manage Optional Packages and install the emulators you need. You can tell RetroPie which emulator to use by pressing a button when you see the config dialog box whenever you launch a game.

 

Interesting packages

You may also find these packages of interest (from Manage Optional Packages):

  • Kodi – A media library. That’s all I have to say about it. *cough*
  • ScummVM – Remember all those point-and-click Lucas Arts adventure games? You can play them on the Pi using this package.
  • Scraper – A nice package that allows you to scrape game info, art, et al so that your library looks pretty. EmulationStation has its own built in scraper that you can access via the ES menu, but this scraper does a better job than the built-in one. Instructions on using either of them can be found here.

 

ES Themes

EmulationStation supports themeing. The stock one isn’t bad but there are more to be found online. To access them, go to the ES Themes setting from the RetroPie page in ES. I would highly recommend the ‘zoid’ and ‘tronkyfran’ themes.

IMG_20170409_134202

And that’s all I have to say on this subject. Have fun!

Leave a Reply

Your email address will not be published. Required fields are marked *