Download & Burn RetroPie
Game emulation is handled by a package called RetroPie. Itâs a complete Linux distribution designed specifically for running classic games on Raspberry Pi.
Download the current version from the RetroPie web site, then write this to an SD card using Etcher or similar software.
Weâll then make some modifications to tune this for the PiGRRLâs buttons and small display.
Setup will require an HDMI monitor, USB keyboard and a network connection (either WiFi or Ethernet). This is best done before the Pi is enclosed in the PiGRRL case. If you have a spare Raspberry Pi board around, thatâs an ideal optionâŚyou could prepare the software on that system and then move the card over to the PiGRRL 2.
Setup RetroPie
Insert the RetroPie card to your Pi, attach monitor and keyboard (and Ethernet, if networking that way), then power the system from a USB power source (a USB phone charger or a powered USB hub can usually work). The system will automatically reboot once (it needs this to make use of the whole SD card), then on second boot it will ask to configure the game controlsâŚ
The PiGRRL buttons donât work yet; this is normal. For initial setup, use the USB keyboard to select the D-pad directions (arrow keys), Start, Select, A and B keys. For anything else, just hold down the space bar or other key to skip that item . Don't worry, we'll re-do the keymap later once we've finished assembly! When finished, youâll see a graphical interface called Emulation Station where youâll select games and other options.
Letâs get this Raspberry Pi on the network first. If using Ethernet, itâs a simple matter of plugging in. If WiFi, from the main EmulationStation screen, access the RetroPie settings using whatever key youâve assigned as the âAâ button. Youâll see WIFIÂ in this list:
Here you can select your WiFi network name and enter a password. Itâs not beautiful, but gets the job done.
Select âExitâ when done to return to the EmulationStation UIâŚ
With networking enabled, we can now access the remaining software needed for the PiGRRL 2 experience. There are a couple ways to do thisâŚ
-
BEST: Use an ssh terminal client to log into the Raspberry Pi at retropie.local
This is recommended, as you can just copy-and-paste the commands that follow. The default name and password are âpiâ and âraspberry,â respectively. - OR: Press âF4â to exit EmulationStation for a command-line prompt (works, but youâll need to type these commands exactly).
Install PiTFT (fbcp) Support
This first sequence configures the system for the PiTFT display:
cd sudo curl https://raw.githubusercontent.com/adafruit/Raspberry-Pi-Installer-Scripts/master/pitft-fbcp.sh >pitft-fbcp.sh sudo bash pitft-fbcp.sh
Select the âPiGRRL 2â option, which sets up various system parameters to match this project.
Answer âNOâ to the reboot questionâŚ
Installing Keypress (retrogame) support
letâs take care of this second script, which enables the PiGRRL buttons:
cd curl https://raw.githubusercontent.com/adafruit/Raspberry-Pi-Installer-Scripts/master/retrogame.sh >retrogame.sh sudo bash retrogame.sh
Again, select the âPiGRRL 2â option. When finished, now you can reboot when prompted.
After rebooting, the HDMI monitor may display a âno signalâ message. This is normal. Not all monitors can handle the resolution setting weâre using. Once the PiTFT is wired up, that will be the primary display.
Also, after the system is assembled with the PiTFT and controls, youâll need to re-do the controller setup. This might wait âtil all the parts are assembled in the case.
From the main EmulationStation screen, press whatever key was assigned to the âStartâ button to access the main menu. Youâll find an option here for âCONFIGURE INPUT.â
Go through the control setup process again using the PiGRRL buttons now instead of the keyboard; assign the D-pad directions, Start and Select buttons, A, B, X and Y. For anything else, hold down a key or button to skip it.
Exiting ROMs
Retropie has changed how to exit out of ROMs/Emulators. Hold down the Pause & Start buttons at the same time to exit.
Remapping Controls
The buttons are premapped to work with NES and SNES emulators. If you'd like to remap the controls, you'll need to modify the retrogame.cfg file in /boot.
Make sure the Raspberry Pi is configured for Wifi. Open up terminal and ssh into the Pi. (Default username: pi password:raspberry)
Then follow the retrogame tutorial to set it up the way you like!
Testing Controls
If you log in (via SSH or F4 shell) you can see exactly what keypresses are detected by running evtest then select 1 (or whatever retrogame is numbered):
Make sure each keypress works and matches the table below!
Default Controls
Below is a table of the controls set to the GPIO. Use this as a reference if you ever need to revert when changing something.
LEFT |
Pin 7 |
GPIO 4 |
UP |
Pin 36 |
GPIO 16 |
RIGHT |
Pin 35 |
GPIO 19 |
DOWN |
Pin 37 |
GPIO 26 |
SELECT |
Pin 29 |
GPIO 5 |
START |
Pin 31 |
GPIO 6 |
A |
Pin 8 |
GPIO 14 |
B |
Pin 10 |
GPIO 15 |
X |
Pin 38 |
GPIO 20 |
Y |
Pin 12 |
GPIO 18 |
L |
Pin 32 |
GPIO 12 |
R |
Pin 33 |
GPIO 13 |
Page last edited March 08, 2024
Text editor powered by tinymce.