Retro Gaming with Raspberry Pi Created by Phillip Burgess
Total Page:16
File Type:pdf, Size:1020Kb
Retro Gaming with Raspberry Pi Created by Phillip Burgess Last updated on 2018-08-22 03:35:52 PM UTC Guide Contents Guide Contents 2 Overview 4 Picking a Game Emulator 5 Which emulator is for me? 5 Help - this emulator doesn't work! 5 RetroPie 5 PiPlay 6 Recalbox 7 Lakka 7 Adding Controls: Hardware 9 Console-Style Controls with USB 9 Arcade and Handheld Gaming Controls 9 Connecting to the Raspberry Pi 11 Do I need Pull-up or Pull-down resistors? 12 Example: Connecting an Arcade Joystick & 2 Buttons 13 Adding More Buttons 15 Example: A Mini Portable Gaming Handheld 16 Installing Retrogame 19 Download and Install 19 Configuring Retrogame 21 New retrogame: Settings File 21 Configuring Older Retrogame 23 Classic retrogame: Edit Source Code 23 Arcade Cabinet Pack Assembly 25 Raspberry Pi Arcade Cabinet Pack 25 RetroPie: Improving Emulator Performance 34 Overclocking 34 Choosing an Alternate Emulator 35 Installing Additional Emulators 37 Updating Emulators to Latest Versions 38 Troubleshooting RetroPie and retrogame 40 retrogame Related Troubleshooting 40 Some of my buttons/controls aren’t working! 40 NONE of my buttons/controls are working! 40 My controls only work if there’s also a USB keyboard plugged in! 40 Retrogame doesn’t work with my optical buttons! 40 I ran Adafruit’s retrogame installer script and rebooted, and now the keyboard and network are unresponsive! 40 RetroPie Related Troubleshooting 41 My controls work in the EmulationStation UI, but not in one or more specific emulators! 41 The ROM files I have worked in a different emulator before, but aren’t working in RetroPie! 41 Installing RetroPie Packages 41 Accessing Alternate Emulators 43 © Adafruit Industries https://learn.adafruit.com/retro-gaming-with-raspberry-pi Page 2 of 44 More RetroPie Help 44 © Adafruit Industries https://learn.adafruit.com/retro-gaming-with-raspberry-pi Page 3 of 44 Overview I’m a child of the 1980s. Miami Vice! Skinny ties! Big hair! Honest, I had hair then…and every town had at least one good video game arcade. Thanks to the super affordable Raspberry Pi and some clever software, anyone can re-create the classic arcade experience at home. Adafruit brings the genuine “clicky” arcade controls, you bring the game files and a little crafting skill to build it. Classic game emulation used to require a well-spec’d PC and specialized adapters for the controls, so it’s exciting to see this trickle down to a $40 computer. © Adafruit Industries https://learn.adafruit.com/retro-gaming-with-raspberry-pi Page 4 of 44 Picking a Game Emulator Before you begin with adding an arcade control you'll need some games to play! In particular we're going to be talking about Retro Gaming here Retro gaming is one of the most popular uses for the Raspberry Pi, and there are now a multitude of ready-to-go SD card images packed with emulator software (though most require sourcing your own ROM files). The days of installing emulators onesy-twosey are behind us; and the Pi Store (an online app store for Raspberry Pi, recommended in earlier versions of this guide) was shuttered in 2015. Which emulator is for me? Before committing to a big arcade project build, we recommend testing one or more of these packages with a keyboard connected and confirm you can set up and run all the games you’re most interested in…then move ahead with more interesting controls. These are all free downloads, so there’s no harm in downloading them all and seeing what fits your tastes. Also, as you work with each one and tweak and tune, it’s not uncommon to have to wipe and start over. Keep careful notes of your setup process and any configuration changes you make! Once you've downloaded an emulator image, burn it onto your SD card using these instructions (https://adafru.it/pHe) Help - this emulator doesn't work! If you encounter difficulty with these packages or just need tips on setting them up, please visit the FAQ and/or support forum on the corresponding project’s web site, not the Adafruit Forums. They’ll be better equipped to answer questions about their own software. (We can only help out if you have questions specifically about our arcade controls or the retrogame software we’ll introduce on the last page. Please ask for such help in the Adafruit Customer Support Forums (https://adafru.it/jIf)…do not submit support questions as bug reports on GitHub, they’ll be ignored there…and be as specific as possible in describing both the variant of Raspberry Pi hardware you’re using and which software package and release, exact version number or date, etc. Thanks!) So! Here are a few gaming OSes we’re currently aware of… Once you've picked it out and installed it on your Raspberry Pi, you can continue to the next step RetroPie This is our recommended emulator package! From the RetroPie web site (https://adafru.it/qoa): © Adafruit Industries https://learn.adafruit.com/retro-gaming-with-raspberry-pi Page 5 of 44 “RetroPie allows you to turn your Raspberry Pi or PC into a retro-gaming machine. It builds upon Raspbian, EmulationStation, RetroArch and many other projects to enable you to play your favourite Arcade, home-console, and classic PC games with the minimum set-up. For power users it also provides a large variety of configuration tools to customise the system as you want. “RetroPie sits on top of a full OS, you can install it on an existing Raspbian, or start with the RetroPie image and add additional software later. It's up to you.” From the site’s Download page (https://adafru.it/rA3), there are separate versions of RetroPie optimized for single- and multi-core Raspberry Pi boards (i.e. Pi Zero, original Model A or B, A+ or B+ versus the multi-core Pi 2 and Pi 3); these are not cross-compatible; be sure to start with the right version for your model of Pi! In particular, we like the 3.8.1 release, as it includes some ready-to-run games such as Doom (see all releases here (https://adafru.it/sNB)) Click here to download the v3.8.1 release for Raspberry Pi 2 and 3 (https://adafru.it/sNC) Click here to download the v3.8.1 release for Raspberry Pi Zero and 1 (https://adafru.it/sND) Breaking down some of the jargon above… Raspbian is the standard and most popular Linux operating system distribution for the Raspberry Pi; it’s what most people start with when setting up a Raspberry Pi for “normal computer stuff.” EmulationStation is a graphical front-end that lets you select among different emulators or games installed on the system, as well as configure gaming controls and other options. RetroArch is among the broadest and most popular multi-platform emulators…this is the code that runs the actual games. But it’s not the only one…RetroPie (and most other gaming OSes) collect several others for different situations. PiPlay From the PiPlay web site (https://adafru.it/rA4): © Adafruit Industries https://learn.adafruit.com/retro-gaming-with-raspberry-pi Page 6 of 44 “PiPlay, formerly called PiMAME, [is a] pre built Raspberry Pi OS made for gaming and emulation. “Also included is a suite of software designed to reduce the complexity and time needed to setup a fully working system. An updater is included with the distribution.” PiPlay lacks the breadth and active development of RetroPie; it’s not currently Pi 3 or Zero compatible, hasn’t been updated since 2015 and the forums are falling victim to spambots. Still, some users report an easier time configuring things here than other distributions…as long as you’re running on the right hardware. Recalbox From the Recalbox web site (https://adafru.it/rA5): “Recalbox offers a wide selection of consoles and game systems. From the very first arcade systems to the NES, the MEGADRIVE and even 32-bit platforms, such as the Playstation. “With Kodi already included, Recalbox also serves as a Media Center. By connecting it to your home network, you will be able to stream videos from any compatible devices (NAS, PC, External HDD, etc.).” A relative newcomer with an impressive variety of emulated systems. One SD card image (from their “DIY recalbox” link (https://adafru.it/rA6)) is compatible with all current Raspberry Pi boards (no separate single- or multi-core downloads). It appears that recalbox has its own support for interfacing arcade buttons and joysticks to the Pi’s GPIO header, obviating the need for our own software explained on the last page. Have not experimented with this yet! Lakka © Adafruit Industries https://learn.adafruit.com/retro-gaming-with-raspberry-pi Page 7 of 44 From the Lakka web site (https://adafru.it/rA7): “Lakka is a lightweight Linux distribution that transforms a small computer into a full blown game console. “Lakka is the official Linux distribution of RetroArch and the libretro ecosystem. “Each game system is implemented as a libretro core, while the frontend RetroArch takes care of inputs and display. This clear separation ensures modularity and centralized configuration.” Lakka is not as all-inclusive as other packages, but as a result it’s extremely compact. There are separate downloads for single- and multi-core Raspberry Pi boards. © Adafruit Industries https://learn.adafruit.com/retro-gaming-with-raspberry-pi Page 8 of 44 Adding Controls: Hardware At this point you should have one (or more) games playable from the keyboard. The next step is adding nifty controls… Console-Style Controls with USB If you’re aiming for a home TV gaming console feel, things are super easy: a variety of USB-compatible gaming controllers exist that’ll plug straight into the Pi and you’re done! If aiming to simulate a particularly nostalgic console, chances are you can find an equivalent controller in USB format.