Skip to content
mikeyd edited this page Mar 17, 2016 · 18 revisions

Table of Contents generated with DocToc

About

Retroarch is the reference frontend for the libretro API. Popular examples of implementations for this API includes videogame system emulators and game engines, but also more generalized 3D programs. These programs are instantiated as dynamic libraries. We refer to these as "libretro cores".

"libretro" is an API that exposes generic audio/video/input callbacks. A frontend for libretro (such as RetroArch) handles video output, audio output, input and application lifecycle. A libretro core written in portable C or C++ can run seamlessly on many platforms with very little/no porting effort.

While RetroArch is the reference frontend for libretro, several other projects have used the libretro interface to include support for emulators and/or game engines. libretro is completely open and free for anyone to use.

Note:
You can also find great information about Retroarch, the emulators themselves, and more, at the RetroPie wiki.

Warning

Please ensure you have the Debian and Libregeek repositories added. You can reference the main README.md file for complete details.

Installation


Installation via hosted Debian packages

./desktop-software.sh install retroarch

This will install all retroroch packages, all the libretro cores, and install samba for public shares access. It will also perform post-configuration actions such as:

  • Set directories for ease of use when handling ROMs, save files, and more.
  • Setup a public samba share for network access

If you do not want to install all cores, you can skip the routine above and install them separately. Instead of [CORENAME], you can use an asterisk ("*") to install all cores.

sudo apt-get install retroarch retroarch-joypad-autoconfig
sudo apt-get install libretro-[CORENAME]

sudo apt-get install

Building from source code:

Building Retroarch and Libretro cores from source is called from the main desktop-software script.

./desktop-software.sh install retroarch-src

However, if you wish to built a specific core, you can specify the core name as so:

./desktop-software.sh install retroarch-src mame

For a list of cores, please reference this libretro-super file.

General


Post-install

After running the retroarch-src or retroarch install type, currently you must still perform the following:

  • Add "Retroarch-Src" or "Retroarch" (depending on what you used) as a "non-Steam" game using the "+" icon on the Libary section of SteamOS
  • Transfer any ROMs you had on your system, into appropriate folder structures under /home/desktop/ROMs. See the optional SSH ROM transfer script.
  • Due to auto-detection now being used for all gamepads, when you start Retroarch, it is suggested to set the following in Settings > Input Hokey Binds:
  • Save State
  • Load State
  • Quit Retroarch
  • Menu Toggle

Please note:
The /home/steam/ROMs directory is a symlink of the source directory, /home/desktop/ROMs If you did not use the desktop-software.sh installation method, this symlink will not exist.

Using the online updater

RetroArch contains an online updater that currently pulls in he latest assests, cores, and shaders. If you wish to have these available as soon as they are built by the Libretro buildbot, you must change the applicable directory within the RetroArch settings menu to a directory that is writable by your user.

Source build information


Below you can find related information pertaining to building Retroarch/Libretro from source. This will only include items outside the automatic build script invoked by desktop-software.sh.

Demonstration video

This video comes courtesy of Ryochan7, Thanks! ScreenShot (Click to Play)

#Testing

##Testing machine specifications

SteamOS-Test

  • CPU: Intel Core 2 Quad Q9550
  • RAM: 6 GB DDR2
  • HDD: Seagate 7400 RPM
  • GPU: Nvidia GT 640

SteamOS Primary

  • CPU: Intel Core i5 2500k
  • RAM: 8 GB DDR3
  • HDD: Seagate SSHD
  • GPU: Nvidia GTX 770 SC

SteamOS Secondary

  • CPU: Intel Core i5 2500k
  • RAM: 16 GB DDR3
  • HDD: Intel SSD
  • GPU: Nvidia GTX 550 Ti

#General


Since the "system" directory of Retroarch is pre-configured to /home/<user>/ROMs, you'll want to also dump your BIOS files in this location as well.

##PSX/PS1 BIOS Files

Mednafen is very picky about which BIOS to use. The ones that you might need are:

  • scph5500.bin
  • scph5501.bin
  • scph5502.bin

Copy this file to the $HOME/ROMs directory of the user you are working with. Most commonly this is /home/steam/ROMs. If you can't find one of these, just rename the respective scph100x.bin BIOS (such as scph1001.bin) to scph550x.bin (such as scph5501.bin) and it will take it.

#Disc Images


Mednafen requires you to load games through CUE sheets. Ensure that the CUE sheet is properly set up in order for the game to run. See the Cue sheet (.cue) for more.

#Input (General)


Please take note of the following general modifications:

  • Save state: Left-thumbstick click (L3)
  • Load state: Right-thumbstick click (R3)
  • Show Retroarch menue: back/select
  • Exit Game: Enter menu, choose "Quit Retroarch"

Please note: The center button of either the Sony or Microsoft controllers is not ideal for opening the Retroarch menu or quitting Retroarch. Steam Big Picture Mode / SteamOS uses this button by default to bring up the Steam overlay. Save states are not supported on all consoles/cores.

Each controller preset, if chosen during the Retroarch post-install sequence, is preset for 4 players maxiumum. If you wish to configure more, please use the input settings section of Retroarch.

#Input


Update:

Please take note that very recently, joypad autoconfigs were added to the source build version, retroarch-src, and the below will soon no longer apply.

Below is all available known information for gamepad input and control. Please submit suggestions as an issues ticket.

##Input (Xbox 360 Controllers) The Xbox controllers are mapped exactly has Retroarch has requested each button to be. See the below diagram.

alt text

##Input (Sony PS3 Controllers)

The Sony Dualshock 3 controller is setup in the same fashion as the above Xbox 360 controller. The main things to keep in mind are

  • X is "A"
  • Circle is "B"
  • Square is "X"
  • Triange is "Y"

#Shaders (source build only)


Shaders are assessed at build time for Retroarch. The pre-requisite pacakge nvidia-cg-toolkit is pre-installed before the build kicks off.

Cores


How to obtain cores

Cores are available via two methods:

  1. Debian packages (e.g. libretro-desmume)
  2. The online updater within Retroarch

You have one choice of how you wish to proceed here. The Debian packages install to a standard, but protected, area of /usr/lib/libretro/. This is not typically writable by a user. If you wish to have cores available as soon as they are built by the Libretro buildbot, you must change your "Core Directory" within the RetroArch settings menu to a directory that is writable by your user.

##Tested / known working cores


You can find a list of cores tested with games already here

#Troubleshoting


Log files

Log files are not typically enabled automatically. Achieving logging (if needed) can be achieved in a few short steps. For a description of log levels, please see the default upstream config file

First, modify this line under /home/steam/.config/retroarch/retroarch.cfg to include your desired log level (DEBUG = 0, INFO = 1, WARN = 2, ERROR = 3):

libretro_log_level = "0"

Second, copy the debug launcher and desktop files:

sudo cp SteamOS-Tools/launchers/retroarch-debug /usr/bin
sudo cp SteamOS-Tools/cfgs/desktop-files/retroarch-debug.desktop /usr/share/applications

Next, add this shortcut via Steam (Settings > Add Library Shortcut). The log will be located in the home directory of the steam user:

desktop@steamos:~$ ls /home/steam/retroarch/
log.txt  saves

You can attach these logs to pastebin service (like Slexy or GitHub Gist). If you wish to upload to a paste services via the command line, see Attaching and Submitting log files.

##I Can't find my shader core! (source build only) Some shaders, such as eagle, are of a .cg not .cgp file extension/type. Loading shader presets only works with a .cgp file.

To load cg files, load a cgp shader (i.e. one that you can see), increment the passes by 1 and then go to where it says N/A and navigate to the .cg file. Alternatively, you can change the first pass, but I suggest adding another pass to add this cg file.

##My game won't launch from detect core! (source build only) As it was today, 20150607, there are times when building from and active Git source can be a disadvantageous. For all the benefits it brings, there will be times when things break. In this example a bad commit broke core detection mechanisms for content loaded. However, you can still load the core, then the content just fine.

Clone this wiki locally