Saturday, November 19, 2011

Getting Started with RetroArch

Update (4/23/2012): SSNES has changed its name to reflect its versatility beyond SNES emulation. The new name is RetroArch and this article has been updated to reflect the change.

RetroArch is a multi-platform multi-emulator with support for some really cool, unique features, including extensive shader and filter support, real-time rewind, lossless video dumping, advanced "lagless" netplay, and more. Unlike many other emulators, RetroArch is under rapid and active development and receives new features on a regular basis. However, all of these esoteric options and capabilities can be daunting to new users, so this guide will cover the basics. The instructions are primarily geared toward Windows users, but the configuration information is essentially the same on any platform.

So, first off: RetroArch is all about modularity, so we need to download a couple of initial modules, namely the RetroArch executable and its helper libraries. To get started, go to the RetroArch homepage and download the RetroArch full package that suits your system (the 'x86' build will work on all machines, while the x64 build will only work in 64-bit versions of Windows; get the x86 version if you don't know which is appropriate for you). The slim package contains the absolute minimum required for bare, no-frills emulation, while the full package is prepared to utilize RetroArch's many advanced features.

Once your download finishes, extract the zip file, navigate to the extracted RetroArch folder and look for retroarch-phoenix.exe. This is the graphical user interface (GUI) module that will help us get RetroArch set up and configured. Double-click it and you should see a window that looks like this:
Along the upper edge of the window, open the RetroArch menu and select Update RetroArch:
It should open a window that looks like this:
You can use this tool to automatically download updates for RetroArch, its helper libraries and any/all of the various emulation cores. First off, you'll need to select which flavor of RetroArch you're using--x86 or x64 (aka x86_64)--by clicking on the appropriate bubble next to CPU.
Then, click on the button labeled Check version. This will search for updates to RetroArch and/or its helper libraries and populate the list of available emulation cores:
After that, click on the bubble labeled Redist and then the button that says Download RetroArch. This will fetch any updated RetroArch executables, as well as fresh copies of all of the helper libraries (you can update RetroArch without the helper libraries by using the Full button instead of Redist).

At this point, you can also automatically download any of the cores in the list by double-clicking on its entry. After the download finishes, it will ask if you want to use the core. Whether you do or not is okay, as we'll be specifying our desired core in just a few seconds anyway.

Once you're done downloading cores (you can come back to this menu and download more cores at any time), close the Updater window and return to the main window, where we'll need to configure some options.

Starting from the top, the Normal ROM path is where you select the ROM you want to play. It will not hide inappropriate files, so make sure you pick the right one for the system you wish to emulate ;)

Next, we need to tell RetroArch where to store and load its settings, via the RetroArch config file path. Click Open, and then navigate to your RetroArch folder and choose the file named retroarch.cfg. Likewise, for RetroArch path, click Open, navigate to the same folder and select retroarch.exe.
Finally, the Emulator core path lets us select which emulation core we wish to use. So, click Open, navigate to the RetroArch folder and look for your desired core that you downloaded from the Updater, such as gambatte-0.5wip1-x86_64.dll in my case. RetroArch can be paired with any emulator core that conforms to the libretro API specification, including but not limited to the original libretro (previously known as libsnes) derived from byuu's bsnes.

At this point, simple emulation should be functional, so go ahead and try it by clicking on the big button labeled Start RetroArch. If it works, congratulations! You're ready to play. Check out the advanced configuration options to learn about filters/shaders, netplay, rewind support and more.

If it doesn't work, click on the File menu at the top of the window and select Show log. This will give you some information on why it failed. If you seek help at the RetroArch forums or in the RetroArch IRC channel, be sure to have this information handy, as it will help others solve your problem.

If you would like to explore some of RetroArch's more advanced features, check out this guide.

For Linux Users

If you're using a Debian-based distro, such as Ubuntu or Mint, you can use my PPA repo, where I package a number of emulators, including RetroArch and all flavors of libretro. To install RetroArch, open Synaptic Package Manager and add ppa:hunter-kaller/ppa to your software sources. You can then install any of the packages through your normal installation procedure of choice.

Otherwise, configuration is just like in Windows, except your retroarch.cfg file is initially installed to /etc/retroarch.cfg (but can then be copied to and overridden by any retroarch.cfg file located in ~/.config/retroarch/) and the emulation cores install to /usr/lib/.


Erik said...

Hello Hunter.

I'm trying to get ssnes, ssnes-phoenix, and libsnes-9xnext up and running on my ubuntu maverick rig. I've installed the packages from your ppa, but when I try to run ssnes-phoenix, I get "error while loading shared libraries: cannot open shared object file: No such file or directory".

Now I know this means I need qt installed, but I wasn't sure what version.

Also, when i try ssnes or ssnes-zip, I get "error while loading shared libraries: cannot open shared object file: no such file or directory"

Likewise I know this means i need python3 installed, which I do have installed, so I'm not quite sure why I'm getting this error.

Any help is much appreciated.


Hunter K. said...

Hi Erik,
Yeah, the runtime dependencies are kind of a mess at the moment. I apologize for that.

I just pushed some new packages (0.9.2) where I have hopefully squashed some of the problems. If you don't mind, try updating to them and see if it fixes you up.

For reference, I think the packages you need are libqtgui4 and python3.1 (python3.2 on natty and oneiric)

It looks like the launchpad build farm is backed up, so the i386 packages won't be ready until this evening... If you want/need to try before it finishes, you can manually install the aforementioned packages and give it a shot.

Erik said...

Tried the new ones and at first it didn't work. Note that I had to install libpython3.1 along with python 3.1 in order to get the library.

Thanks for your help.

Hunter K. said...

Ah, glad you got it working! I'll add libpython3.1 to the runtime dependencies from here on out.

Thanks for letting me know!

Aaron said...

Hi.. Is it possible to change the controls for a specific emulator and save them? So far if I change the controls for say a Genesis game, then when I go and run a SNES game, i have to change them again. Can I use the SSNES.EXE to load a specific core/config/rom automatically? In this case, I can create a shortcut on my desktop for some of my favorites.

Hunter K. said...

Hi Aaron,
I believe so. Pretty much everything you do in SSNES-Phoenix is just writing to ssnes.cfg. If you want, you could have a different ssnes.cfg for each system, which you could select before you start playing. Conversely, you could skip SSNES-Phoenix entirely and write yourself a .bat launcher script that loads all of your desired settings, libsnes flavor and favorite ROM. To see all of ssnes.exe's CLI switches, just run it from the command prompt with no arguments and it should print them.

Analytics Tracking Footer