I’ve had a Raspberry Pi lying around for a while. I ve done a few thing with it, but nothing worth any interest to me or are better served by something else, e.g. my xbmc on the Pivos Xios DS. I thought I should really get some use out of it, so I started looking around as to what interesting projects are out there. One that really caught my eye was making it into a retro gaming system. Now who doesn’t want to play classic games, especially if you are adult of my age who got bought up on 8 bit and 16 bit gaming.
The idea is to house it in a retro gaming case, hopefully with Bluetooth controllers. But first things first, let’s see if I can get the system up and running.
After some quick research, I found this simple guide. It seems like the guys at petRockBlog have created an all-encompassing, simple to install boot image that has all the emulators that you could possibly need. For me, the main ones are SNES, Megadrive, Neo-Geo and Mame, but it’s nice to have the option of the other emulators if need be.
The basic requirements were my Raspberry Pi, SD card (already had a 32gb one, which should be plenty space for the roms), an usb keyboard, HDMI cable and a controller. I have an usb Xbox 360 controller for my PC, which goes unused. It is the not what I ultimately want to use for the system, but for the purpose of testing and getting things working, it will do. Oh, and a USB power connection. As I will be doing most of the work on my desk, with the Pi viewed on my monitor, I was able to plug the USB power into my PC, which provided enough power.
I downloaded the premade image, plugged in my SD card and used win32diskimager to create the SD Boot disk. That was very straight forward. I plugged the card into the Pi and powered up.
Now, according to the guide, I would be presented with an initial screen, with prompts, to map the basic functions of my controllers, up, down, left, right, start and a few buttons. These controls are to navigate the emulation station, which the Raspberry Pi gui that sits on top of the emulators, so you can select devices and games. It does not map controls to the emulators themselves, that has to be done through a separate process.
I was presented with this screen, but with a message at the bottom that no controller detected. The central light on my xbox controller was lit up, which suggested it was powered. Maybe, I thought, it was not enough power from my PC to the controller. So, F4 to exit, powered down and tried again, this time with the Pi plugged into a power socket. I again was greeted with the same message. I could get into the front end without a controller, and navigate around with the keyboard, so at least I knew the disk image was working. So could this have be a problem with the controller itself, it has always been temperamental when using it on the PC. It needed a bit of reading…………
The Xbox 360 controller requires a driver to be installed as the pre packed image does not contain it. Now, I could just buy another cheap snes type controller, but for the purpose of testing and didn’t want to go spending anything neither controller is what I want for my end product.
So, powered up the Pi, pressed F4 to exit emulation station to get to the command line and entered the following –
sudo apt-get install xboxdrv
this downloads and automatically installs the drivers required. Obviously the Pi needs an internet connection to download it in the first place (which I obviously didn’t acknowledge when I first did it, stupidly) so I plugged it into my router. Once installed, it’s pretty quick, we have to let the RPi detect the controller, which is done by editing rc.local.
so in the command line type
sudo nano /etc/rc.local
this opens up rc.local which I can now edit.
xboxdrv --trigger-as-button --id 0 --led 2 --deadzone 4000 --silent & sleep 1
just before exit 0 line
Then press left ctrl+X to exit
It asks if you want to make changes to the file
Press 'y' (yes)
Then press Enter