Sunday, September 29, 2013

Compiling Snes9x on Ubuntu

After looking into the various SNES emulators available for Linux it looks like Snes9x is the only one that is of high quality and currently maintained. ZSNES seems to work pretty well, but it won't compile on 64-bit, giving you a very old emulator running as a 32-bit binary for the foreseeable future.

I used these instructions on a 64-bit Ubuntu 12.04 machine and a 32-bit Ubuntu 13.10 machine. There are two sets of instructions here. One is for compiling the Unix version of Snes9x and the other is for install the GTK3 version. Theses instructions worked perfectly on 12.04 but on 13.10 the GTK3 version segfaults. I don't know if the issue is with 13.10 or perhaps an incompatibility with my laptop's hardware and Snes9x GTK.

The currently maintained codebase of Snes9x is hosted up on github so we will need to install git. We'll get all the tools required to build the source code while we are at it.

sudo apt-get install git build-essential

Now we can check out the codebase.

git clone https://github.com/snes9xgit/snes9x.gitcd snes9x

Part 1 - Building the Unix version of Snes9x
The Unix version does not contain any sort of interface save for the running game itself. It supports a number of command-line switches. Unfortunately it does not seem to provide any way of running in fullscreen mode.

As of Ubuntu 15.10, instead of libportaudio-dev you need to install portaudio19-dev.
If you want a GTK2 build then install libgtk2.0-dev and you can leave out libgtk-3-dev.
Now we can generate the install scripts and compile.

License

All content on this blog is licensed under the Creative Commons Attribution Share Alike license, unless cited from an external source or noted otherwise. Please click here for full licensing information.

All software code published on this blog is public domain, and may be used at will as one sees fit.