Installing Retrogame

If using a USB game controller, there’s nothing to see here…you’re done, go ahead and play! These directions apply if you’re using custom controls as covered on the prior page.

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 -O https://raw.githubusercontent.com/adafruit/Raspberry-Pi-Installer-Scripts/master/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.

Last updated on 2016-12-02 at 10.56.49 PM Published on 2013-06-03 at 10.01.49 PM