Difference between revisions of "RetroArch"

From ArchWiki
Jump to: navigation, search
m (Install)
m (No cores found: added wiki formatting)
 
(45 intermediate revisions by 13 users not shown)
Line 1: Line 1:
 
[[Category:Gaming]]
 
[[Category:Gaming]]
 
[[Category:Emulators]]
 
[[Category:Emulators]]
[http://themaister.net/retroarch.html RetroArch] is a modular, command-line driven, multi-system emulator that is designed to be fast, lightweight, and portable. It has features few other emulators frontends have, such as real-time rewinding and game-aware shading based on the [http://github.com/libretro/libretro.github.com/wiki/Documentation-devs libretro API].
+
[[ja:RetroArch]]
 +
{{Note|RetroArch is not affiliated with [[Arch Linux]].}}
 +
 
 +
[http://www.libretro.com/ 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 ==
 
== Installation ==
 +
Install the {{Pkg|retroarch}} package or alternatively {{AUR|retroarch-git}} for the development version.
  
Install {{aur|retroarch-git}} from the [[AUR]].
+
== Usage ==
 +
RetroArch uses separate libraries, called ''emulator cores'' or ''emulator implementations'', available from both [https://www.archlinux.org/packages/?q=libretro Community] and the [https://github.com/libretro Libretro GitHub repository].
  
A GTK/QT frontend, {{aur|retroarch-phoenix-git}}, is also available.
+
Each libretro core package will install a library to {{ic|/usr/lib/libretro}}. The syntax to choose one when executing ''retroarch'' is:
 +
$ retroarch -L /usr/lib/libretro/libretro-(emulation core).so ~/path/to/foo
  
== Usage ==
+
A default emulation core can be defined in {{ic|retroarch.cfg}}, obviating the need to specify it on every run.
  
'''RetroArch''' employs the use of separate ''emulator cores'' (or ''implementations'') available from both the [[AUR]] and the [http://github.com/libretro libretro] github.
+
Example:
 +
{{hc|/etc/retroarch.cfg or ~/.retroarch.cfg|2=
 +
libretro_path = "/usr/lib/libretro/libretro-foo.so"}}
  
Each package from the [[AUR]] will install an emulator core to {{ic|/usr/lib/libretro/[system].so}}, thus to use
+
== Configuration ==
{{ic|retroarch}} with your preferred system simply launch it with the {{ic|-L}} parameter. ''E.g.''
+
RetroArch provides a very well commented skeleton configuration file located at {{ic|/etc/retroarch.cfg}}.
  
retroarch -L /usr/lib/libretro/libretro-snes9x-next.so ~/path/to/game
+
It supports split configuration files using the {{ic|#include "foo.cfg"}} directive within the main configuration file, {{ic|retroarch.cfg}}. This can be overridden using the {{ic|--appendconfig /path/to/config}} parameter and is beneficial if different keybinds, video configurations or audio settings are required for the various implementations.
  
{{Tip|It is possible to run directly from {{ic|.zip}} files using the {{ic|retroarch-zip}} shell wrapper, however, keep in mind that this is not supported within the implementation.}}
+
{{Tip|RetroArch is capable of loading ''[https://gitorious.org/bsnes/xml-shaders bsnes xml filters]'' and ''[https://github.com/libretro/common-shaders cg shaders]'' that can be defined in {{ic|retroarch.cfg}} as {{ic|video_bsnes_shader}} and {{ic|video_cg_shader}} respectively.}}
 +
{{Note|{{AUR|retroarch-git}} requires {{pkg|nvidia-cg-toolkit}} in order to use the ''cg shaders''.}}
 +
{{Warning|When using ''[[ALSA]]'' it is necessary for the {{ic|audio_out_rate}} to be equal to the system's default output rate, usually 48000.}}
  
This emulation core can also be defined in the {{ic|retroarch.cfg}}, thus obviating the need to specify it on the command line.
+
== Online updater ==
  
{{hc|/etc/retroarch.cfg|2=
+
Recent versions of RetroArch have introduced a built-in menu for updating core files and various assets from the [https://buildbot.libretro.com/ RetroArch Buildbot]. It can be accessed from the main menu at "Online Updater"
libretro_path = "/usr/lib/libretro/libretro-snes9x-next.so"}}
+
  
There are currently several emulation cores available including ''snes9x'', ''bsnes'', ''visual boy advance'' and ''final burn alpha''. See this [http://aur.archlinux.org/packages.php?K=libretro AUR search] for more.
+
{{hc|1=Online Updater|2=
 +
Core Updater
 +
Update Core Info Files
 +
Update Assets
 +
Update Autoconfig Profiles
 +
Update Cheats
 +
Update Databases
 +
Update Overlays
 +
Update GLSL Shaders
 +
}}
  
== Configuration ==
+
These cores and assets are kept up to date and can be pulled from the updater at any time.
RetroArch provides a skeleton configuration file located at {{ic|/etc/retroarch.cfg}} and is very well commented.  
+
 
 +
== 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 {{ic|/etc/udev/rules.d/99-evdev.rules}}, with {{ic|<nowiki>KERNEL=="event*", NAME="input/%k", MODE="666"</nowiki>}} 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*
 +
 
 +
Alternatively, add your user to the "input" group, e.g.
 +
 
 +
  # usermod -a -G input user
 +
 
 +
=== Poor video performance ===
 +
If poor video performance is met, RetroArch may be run on a separate thread by setting {{ic|<nowiki>video_threaded = true</nowiki>}} in {{ic|~/.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.
  
It is capable of supporting split configuration files using the {{ic|#include "foo.cfg"}} directive within the main {{ic|retroarch.cfg}} file. Alternatively, extra configuration files can be appended on the command line which override the default settings in {{ic|retroarch.cfg}}. This can be achieved by using {{ic|--appendconfig /path/to/config}} and is beneficial if different keybinds, video configurations or audio settings are required for the various implementations.
+
=== No cores found ===
 +
By default RetroArch will attempt to find cores in {{ic|~/.config/retroarch/cores}}. The packages in the official repositories install the cores in {{ic|/usr/lib/libretro/}} and the core info files in {{ic|/usr/share/libretro/info}}. The settings can be changed to look in these directories.
  
{{Tip|{{ic|retroarch}} is capable of loading ''bsnes xml filters'' [https://gitorious.org/bsnes/xml-shaders] and ''cg shaders'' [https://github.com/libretro/common-shaders]. They can be defined in {{ic|retroarch.cfg}} as {{ic|video_bsnes_shader}} and {{ic|video_cg_shader}} respectively.
+
== See also ==
{{Note|{{aur|retroarch-git}} requires {{pkg|nvidia-cg-toolkit}} in order to use the ''cg shaders''.}}}}
+
* [https://github.com/libretro/RetroArch/wiki RetroArch wiki on GitHub]
{{Warning|When using the '''alsa''' driver make sure {{ic|audio_out_rate}} is ''equal'' to your system's default output rate. This is usually 48000.}}
+
* [http://github.com/libretro/libretro.github.com/wiki/Documentation-devs Documentation for developers]

Latest revision as of 06:26, 23 May 2016

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

Install the retroarch package or alternatively retroarch-gitAUR for the development version.

Usage

RetroArch uses separate libraries, called emulator cores or emulator implementations, available from both Community and the Libretro GitHub repository.

Each libretro core package 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

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.

Online updater

Recent versions of RetroArch have introduced a built-in menu for updating core files and various assets from the RetroArch Buildbot. It can be accessed from the main menu at "Online Updater"

Online Updater
Core Updater
Update Core Info Files
Update Assets
Update Autoconfig Profiles
Update Cheats
Update Databases
Update Overlays
Update GLSL Shaders

These cores and assets are kept up to date and can be pulled from the updater at any time.

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*

Alternatively, add your user to the "input" group, e.g.

 # usermod -a -G input user

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.

No cores found

By default RetroArch will attempt to find cores in ~/.config/retroarch/cores. The packages in the official repositories install the cores in /usr/lib/libretro/ and the core info files in /usr/share/libretro/info. The settings can be changed to look in these directories.

See also