Universal Emulator Frontend in Ubuntu 12.04

I wanted to set up a system hooked up to my TV that let me play NES or SNES games from the comfort of my couch. It was an interesting project, and I wanted to share my findings.


I have a spare laptop with an NVIDIA card running Ubuntu 12.04. If you also have an NVIDIA card, I highly recommend using the latest experimental NVIDIA drivers. They really increased the performance of and reduced the heat from my laptop.


I ordered two Logitech wireless F710 gamepads. They have a tiny USB dongle that they talk to wirelessly. They work great out of the box, but note that they must be on different USB socket groups. I first tried plugging them into USB sockets right next to each other and one of the gamepads didn’t work. When I put the USB dongles on different sides of the laptop, both gamepads worked again. ::shrug::

I recommend putting a sticker on gamepad 1 so you know which one it is.


I installed XBMC then used it to download an add-on for its Programs section called “ROM Collection Browser”.

Using the ROM add-on, you can scan your ROM collections for each emulator. Be prepared for it to take a long time to download screenshots and covers if you have a lot of ROMs. The best feature is the ability to mark ROMs as “favorites” so if you have a huge collection, you don’t have to browse through all the crap each time.

XBMC lets you change the navigation bindings so you can use your gamepad.

NES Emulator

I’m used to the fceu family of emulators (gfceu, fceux, etc). But they did not support binding the direction buttons on my F710 gamepad. Those buttons send “hat” presses instead of simply button presses.

Looking further, I found an NES emulator I had never heard of. Mednafen not only can handle the “hat” presses on my gamepad but can also emulate GameBoy and a few other systems.

Note that the man page shipped with it is not helpful. You’ll need to browse the online documentation.

Press “ALT+SHIFT+1” to set up bindings for gamepad 1 and “ALT+SHIFT+2” to set up bindings for gamepad 2.

Press “F2” to set up a binding to exit the emulator. This is an important theme! Once XBMC launches an emulator, you need a way to quit it with just the gamepad. When it closes, XBMC comes back. But since you don’t want to use an easy-to-accidentally-hit key or a key that a game is likely to use, you have to be careful. Thankfully, the F710 gamepad has a middle button that normally just turns it on. But once the gamepad is on, the button also sends a normal key press. And no game would need to use this special middle button. So make sure to bind the middle power button to the exit command of mednafen.

Also pass “-fs 1” at least once to turn on fullscreen mode. The option is saved, so you only need to give it once.

When you add your NES collection in XBMC, note that the path to the mednafen command is “/usr/games/mednafen“.

SNES Emulator

I prefer the zsnes emulator for SNES games.

It doesn’t have any weird gotchas. Press “Esc” to bring up its main menu. Use the “Input” menu to set up the gamepads. Use the “Misc” menu to assign the exit button.

And don’t forget to enable full screen.

When you add your SNES collection in XBMC, the path to the zsnes command is the expected “/usr/bin/zsnes”.

Arcade Emulator

I found that the mame emulator works great for arcade games.

Press “Tab” to bring up its main menu. Under “Input (general)”, you can find the close command that is currently bound to “Esc” and replace it with your middle gamepad button. I found that most games needed me to individually set up “Input (this game)” bindings.

When you add your arcade collection in XBMC, note that the path to the mame command is “/usr/games/mame“.

Using the TV

I did hit one weird problem using the TV. Both mednafen and zsnes, if fullscreen, would switch which monitor was turned on. To stop them from doing that, I had to manually set each emulator’s fullscreen resolution to the size of TV.


Anyway, that’s “all” it takes. Now you have an awesome emulator station. You can also use the “Advanced Launcher” XBMC add-on to add launchers for Ubuntu games that work well with gamepads, like Jamestown.

To avoid using the mouse or keyboard at all, you can set your user to automatically log in and add XBMC to your startup applications.

One thought on “Universal Emulator Frontend in Ubuntu 12.04”

Leave a Reply


Your email address will not be published.


Your email address will not be published.