RetroArch

From Gentoo Wiki
Jump to:navigation Jump to:search

RetroArch (RA) is a frontend to the LibRetro API. In laymen's terms, it's a one-stop-shop for video game emulation.

Installation

GURU

RA is not part of the Gentoo repository. Before installing it, the GURU repository must be enabled.

Emerge

root #emerge --ask games-emulation/RetroArch

Assets

Sometimes, when RA is installed, the Assets are missing. This can result in issues like broken fonts and missing icons. If this is the case, then the Assets must be installed. To do so, firstly download the Assets' source from https://github.com/libretro/retroarch-assets/releases . Then extract the sources:

user $tar xf v*.tar.gz

Next, go into the source directory:

user $cd retroarch-assets-*/

And open the makefile in the desired text editor.

user $nano Makefile

There will be a line near the beginning of the file that looks like this:

FILE Makefile
INSTALLDIR := $(PREFIX)/share/libretro/assets

INSTALLDIR is the directory where the Assets will be put—henceforth called the Assets directory. Like all other RA Resource directories, it can (in theory) be any directory in the filesystem with the proper permissions. In practice, however, the Assets directory is usually set to either ~/.config/retroarch/assets for user-wide access or /usr/share/libretro/assets for system-wide access. Whatever the case may be, INSTALLDIR should be set to the desired location of the Assets directory.

FILE Makefile
INSTALLDIR := /path/to/Assets/directory/

Once INSTALLDIR is set, save and quit the file and run make to install the Assets to the Assets directory:

user $make install

Configuration

retroarch.cfg (by default located at ~/.config/retroarch/retroarch.cfg) should have assets_directory set to match the path to the Assets directory. If this is not done, RA will not be able to find the assets. (This applies also to every RA Resource type—whether they be Cores, Thumbnails, Cheats, etc.).

FILE retroarch.cfg
assets_directory = "/path/to/Assets/directory/"

Cores

Sometimes, when RA is installed, the Core Info and Cores are missing. The main issue caused by this is not being able to play Content. If this is the case, then the Core Info and Cores must be installed.

  1. Core Info
    1. Contains Core information used by RA. The information includes things such which platforms the cores are compatible with. Their file extension is .info
  2. Cores
    1. Used to emulate systems. Their file extension is .so.

Installing the Cores

The Cores are found in a 7zip archive located on the LibRetro BuildBot. Navigate to / > <nightly/stable> > <version> > linux > x86_64 and download RetroArch_cores.7z. The archive has to be extracted before the Cores can be used, however.

Before extracting a 7zip archive, 7-Zip must be installed on the system if it isn't already:

root #emerge --ask app-arch/7zip

The files can be then extracted with:

user $7zz x RetroArch_cores.7z

A directory named RetroArch-Linux-x86_64 will appear in the working directory. The Cores are found in this directory, but not in the root—they're in RetroArch-Linux-x86_64/RetroArch-Linux-x86_64.AppImage.home/.config/retroarch/cores/. Copy the files to the Cores directory:

user $cp RetroArch-Linux-x86_64/RetroArch-Linux-x86_64.AppImage.home/.config/retroarch/cores/* /path/to/Cores/directory/

The Cores directory is usually set to be either ~/.config/retroarch/cores for user-wide access or /usr/share/libretro/cores for system-wide access—similar to the Assets directory.

Just as with the Assets directory, retroarch.cfg must be edited to reflect the location of the Cores directory. The variable determining where RA searches for Cores is libretro_directory.

FILE retroarch.cfg
libretro_directory = "/path/to/Cores/directory/"

Installing the Core Info

The Core Info is found in a tarball at https://github.com/libretro/libretro-core-info/releases. Download a release, and extract it:

user $tar xf v*.tar.gz

And copy the contents of the newly created libretro-core-info-<version> directory to the Core Info directory.

user $cp libretro-core-info-*/* /path/to/CoreInfo/directory/

The Core Info directory is usually the same directory as the Cores directory.

Once again, edit retroarch.cfg to reflect the location of the core directory. The variable to be changed is libretro_directory.

FILE retroarch.cfg
libretro_directory = "/path/to/CoreInfo/directory/"

External links

ArchWiki page on RetroArch, worth reading: https://wiki.archlinux.org/title/Retroarch