Our retrogame utility is the software glue that links our GPIO-connected controls to “virtual” keyboard input.
Some of our projects (eg PiGRRL Zero) provide a ready-made SD card image…if you’re building with the same hardware combo, it’s good to go with no changes, retrogame is already installed. Otherwise…
Download and Install
We have a script to help set this up. You’ll need access to the Pi’s command line…either log in over the network using ssh, or the emulation package you’re using should have some option to access a command line (e.g. with RetroPie, press “F4”).
Then type (or copy & paste, if using ssh):
cd curl https://raw.githubusercontent.com/adafruit/Raspberry-Pi-Installer-Scripts/master/retrogame.sh >retrogame.sh sudo bash retrogame.sh
When run, you’ll be asked to pick one of several control configurations. For example, if using the simple joystick-and-two-buttons arrangement from the prior page, pick #2. If you’re planning on making your own custom setup, just pick any of these, and we’ll explain on the next page how to customize this.
If you’ve installed retrogame previously, you’ll be warned that its configuration file will be rewritten. Press “y” if that’s okay. Otherwise, exit and make a backup of that file, so you can restore it later.
The script then downloads and installs the retrogame executable (/usr/local/bin/retrogame) and configuration file (/boot/retrogame.cfg), then performs some administration tasks…/etc/rc.local is amended to make retrogame launch on startup, and a “udev rule” file (/etc/udev/rules.d/10-retrogame.rules) is generated to help it simulate a keyboard.
Once finished (should only take a moment), you’ll be prompted to reboot.
If you have other setup tasks to perform (installing other packages, or changing overscan settings using raspi-config), you don’t need to reboot just yet…answer “n” in that case.
Page last edited March 08, 2024
Text editor powered by tinymce.