With my media centre and HTPC project coming together, I decided I wanted to add another dimension to the vision. The system already supports streaming full HD video and high quality music throughout the house, all served from a central point. The next step was to add a classic gaming system.
There’s more to follow on my media server and (temporary) HTPC set up but as a quick summary:
All media, including centrally controlled libraries for movies, music and games are served by my custom media server.
Due to budget limitations, my media centre project is on-hold but due to the amazing work of the people at Raspberry Pi, it’s possible to build a media centre device that is capable of playing all your music formats and full HD video. I decided to use XBian, which is a lightweight Linux distribution desdeveloped to host XBMC.
The Raspberry Pi is a remarkably versatile device for it’s cost. That being said, the hardware does have it’s limitations with a basic CPU and relatively small amount of memory. However, the hardware accelerated graphics, which support OpenGL ES should be able to provide more than enough power to provide a stable and smooth classic gaming experience.
Or, at least that’s the theory.
The Emulation Platform
The various games consoles produced over the years have all used different hardware and operating systems which means that normally the games we used to play, can’t be played on current systems.
That’s where the emulator comes in. Emulators interpret the instructions known by these old systems and convert them into the logic, graphics and sounds of the games we know and love. The difficulty comes with the fact that each manufacturer requires a different emulator (eg – a Nintendo emulator won’t play Sega games) and even some platforms may require different emulators (NES, SNES and N64 games would each probably need their own emulator!)
RetroArch is a multi-system emulator that runs on pretty much anything (including Android, iOS and Raspberry Pi!) The hard work done by the developers at RetroArch makes this whole process much easier.
My final goal of a play all, seamless media centre would require an easy to use, graphical front end. Again there are various projects available that simplify this approach.
EmulationStation is a themeable front end that can be used to browse your games collection and launch the required emulator provided by RetroArch (or it’s Raspberry Pi adaptation – RetroPie). This will hopefully integrate into XBMC nicely but for now and the ease of testing, I’ll be manually running EmulationStation from a command prompt.
Installing RetroPie & EmulationStation in XBian
There’s lots of information available online to help when installing RetroPie but I found little information when it came to installing under XBian. Since XBian is a watered down version of Raspbian and people have reported various success with Raspbian, I thought it was worth a try.
The installation and setup process was simplified and almost automated by RetroPie-Setup which will download, install and configure both RetroPie and EmulationStation.
So, installing the set up script couldn’t be easier. First, you need to ensure that the software repositories are up to date. From an SSH prompt or command prompt enter:
|sudo apt-get update
sudo apt-get upgrade -y
Confirm git and dialog are installed and up to date:
|sudo apt-get install -y git dialog|
Download the latest version of the RetroPie-Setup script to the user’s home directory:
git clone –depth=0 git://github.com/petrockblog/RetroPie-Setup.git
Note – the users home directory for XBian defaults to /home/xbian/. This is also where the emulators will be installed.
To run the script, first make sure the script is executable and run it as a superuser:
chmod +x retropie_setup.sh
The GUI will now take you through the rest of the process.
You now have the option of installing the emulators from pre-compiled binaries or from the source code. Installing from binaries is considerably faster but not guaranteed to work as expected and may not provide the most recent versions of each emulator.
I opted for installing and compiling from source code. The script warns this may take several hours, some users reported about five hours. In my case, the full process of downloading and compiling the source code took in excess of nine hours. This may be due to the fact that I was installing from an SSH prompt and not a direct command prompt.
IMPORTANT NOTE: Leaving the option set to “Install latest Raspberry Pi firmware” may break your XBian installation. I deselected this option and both EmulationStation and RetroPie run correctly. For now, I recommend turning this option off.
After a reboot and all being well, you should now have a working installation. All that remains is to copy your game roms to your memory card or create a link to the location if they’re stored elsewhere. I opted for the latter option and will post a separate tutorial on how to do this.
If you’re using XBian and the default installation options (as shown above), the location for your game roms should be /home/xbian/RetroPie/roms/ with a sub-folder for each gaming platform.
Running EmulationStation and Launching Games
To launch EmulationStation, navigate to the installation folder (again if installed with default options, this should be /home/xbian/RetroPie/supplementary/EmulationStation/ and enter:
Note – this must be done from a direct command prompt. This stumped me for a while initially when trying to launch EmulationStation for the first time. Trying to launch from an SSH prompt will result in failure and an unhelpful error message.
Once in the interface, pressing the keys you have assigned to left/right will scroll through the different game platforms. These are only visible when you have game roms in the corresponding folders. The up/down keys should scroll through the various games you have available for that platform.
General Note: All of the commands above are case sensitive and due to the ongoing development of all of the components used in the project, the steps listed are subject to change at any time.
So, now we have a set up that can play almost any classic game on any console platform that we wish.
But… it’s not very user friendly. The interface needs to be manually launched from the command prompt and requires the use of an attached keyboard.
So what’s next?
Seamless XBMC Integration
My final goal is to launch games from the XBMC interface, with games browsable similar to the Movies and Music sections. An intermediate would be to launch EmulationStation from XBMC and depending on the amount of games you have, this may be the preferable option.
Wireless Joypad Control
Using a wireless joypad is certainly possible with XBMC and EmulationStation/RetroPie and is the final piece of the puzzle for my all-in-one, seamless media centre.
Well, that’s it. Feel free to leave any comments/questions below, or even share your experiences.