# RetroArch

Note: RetroArch is not affiliated with Arch Linux.

RetroArch is a modular, command-line driven, multi-system emulator that is designed to be fast, lightweight, and portable. Some of its features can be found on few other emulators, such as real-time rewinding and game-aware shading based on the libretro API.

## Installation

RetroArch — Stable version.

  http://www.libretro.com/ || retroarchAUR

RetroArch (git) — Development version.

  http://www.libretro.com/ || retroarch-gitAUR

RetroArch-Phoenix (git) — GTK+ front-end, development version.

  https://github.com/Themaister/RetroArch-Phoenix || retroarch-phoenix-gitAUR, or retroarch-phoenix-qt-gitAUR (qt build)

## Usage

RetroArch uses separate libraries, called emulator cores or emulator implementations, available from both the AUR and the libretro github repository.

Each package from the AUR will install a library to `/usr/lib/libretro/`. The syntax to choose one when executing retroarch is:

    $ retroarch -L /usr/lib/libretro/libretro-(emulation core).so ~/path/to/foo

Tip: RetroArch can work with `*.zip` files using the retroarch-zip shell wrapper, although this method is not properly implemented and can be unstable.

A default emulation core can be defined in `retroarch.cfg`, obviating the need to specify it on every run.

Example:

    /etc/retroarch.cfg or ~/.retroarch.cfg

    libretro_path = "/usr/lib/libretro/libretro-foo.so"

## Configuration

RetroArch provides a very well commented skeleton configuration file located at `/etc/retroarch.cfg`.

It supports split configuration files using the `#include "foo.cfg"` directive within the main configuration file, `retroarch.cfg`. This can be overridden using the `--appendconfig /path/to/config` parameter and is beneficial if different keybinds, video configurations or audio settings are required for the various implementations.

Tip: RetroArch is capable of loading bsnes xml filters and cg shaders that can be defined in `retroarch.cfg` as `video_bsnes_shader` and `video_cg_shader` respectively.
Note: retroarch-gitAUR requires nvidia-cg-toolkit in order to use the cg shaders.
Warning: When using ALSA it is necessary for the `audio_out_rate` to be equal to the system's default output rate, usually 48000.

## Troubleshooting

### Input devices do not operate

It is likely to encounter problems if running on a CLI or a display server other than Xorg, because /dev/input nodes are limited to root-only access. This is solved by manually adding a rule in `/etc/udev/rules.d/99-evdev.rules`, with `KERNEL=="event*", NAME="input/%k", MODE="666"` as its contents. Reload udev rules by running:

    # udevadm control --reload-rules

If rebooting the system or replugging the devices are not options, permissions may be forced using:

    # chmod 666 /dev/input/event*

### Poor video performance

If poor video performance is met, RetroArch may be run on a separate thread by setting `video_threaded = true` in `~/.config/retroarch/retroarch.cfg`.

This is, however, a solution that should be not be used if tweaking RetroArch's video resolution/refresh rate fixes the problem, as it makes perfect V-Sync impossible, and slightly increases latency.

## See also

- RetroArch wiki on Github
- Documentation for developers

Categories:

- Gaming
- Emulators