RetroArch

From Linux Gaming
Jump to navigation Jump to search

RetroArch is a unified graphical front-end for multiple emulators.

Installation

It can be installed from your package manager, Steam, Flathub and even Snapcraft[1][2].

Usage

Core installation

RetroArch doesn't come with emulators by default. Called "cores" in RetroArch, they're plugins implementing the Libretro API. To install them, you do it through the online updater, directly from RetroArch [3]. You can do it manually by downloading the core you want from buildbot.libretro.com and extracting it to ~/.config/retroarch/cores/.

Adding games

The easiest way is to scan a directory where games from the same system are located[4]. To do that, select "Manual Scan", then a content directory with "Content Directory", set "Default Core" and choose "Start Scan". A new entry should have been added to the RetroArch main menu.

Cores

Neko Project II Kai

Install np2kai core manually or from the online updater. Put the font named “font.rom”, “FONT.ROM” or “font.bmp” inside ~/.config/retroarch/system/np2kai/[5]. Then, run RetroArch, add your games and change the core settings[6]:

  • PC Model: "PC-9801VX"
  • CPU Clock Multiplier: "42" (or more)
  • RAM Size: "16"
  • CPU Feature: "80386"
  • Sound Board: "PC9801-86" (the recommended option, to play newer games) or "PC9801-26K" (to play older ones)
  • GDC: "uPD7220"
  • JastSound: "OFF"
  • Floppy Seek Sound: "OFF"
  • Volume Floppy Seek: "0"
  • Volume Beep: "0"
  • Use mouse or touchpanel to input mouse: "ON" (to play games that need a mouse)
  • Joypad D-pad to Mouse/Keyboard/Joypad Mapping: "Manual Keyboard"

These settings can be tweaked further if some games require a different configuration.

To remap joystick buttons, the “lrjoybtn” setting located in ~/.config/retroarch/system/np2kai/np2kai.cfg will have to be edited[7]. For example, if you want to bind the "Up" arrow key to "D-UP", you will have to find its code[8], which is 273, convert it to little-endian hexadecimal, 1101, and put a space between the 2 bytes: 11 01. Then, repeat the process for each button. At the end, the line should look like something like this: lrjoybtn = 11 01 12 01 14 01 13 01 78 00 7a 00 20 00 32 01 08 00 2f 01 1b 00 0d 00

Troubleshooting

  • If your graphics card is old, you might have to check if "Allow Cores to Switch the Video Driver" in "Core" settings is enabled and change the video driver used by RetroArch from glcore to gl in "Video" settings, under the "Output" menu[9].
  • RetroArch didn't enter in proper fullscreen under old versions of GNOME X11[10] and workarounds included devilspie2 scripts[11], running RetroArch with Gamescope[12] and forcing borderless fullscreen windowed mode.
  • To reset all RetroArch settings, go to ~/.config/retroarch/ and delete retroarch.cfg[13].
  • If you're using GNOME with an Nvidia GPU, game frames may flicker[14] and persist after exiting a game until the next reboot if you don't have "Show Window Decorations" enabled in "Video" settings, under the "Windowed Mode" menu (it might be related to buffer-flipping[15][16][17][18], Nvidia G-Sync [19] or unredirection being broken[20][21]).
  1. https://www.retroarch.com/index.php?page=linux-instructions
  2. https://emulation.gametechwiki.com/index.php/Using_RetroArch#Installing_RetroArch_on_Linux
  3. https://www.retroarch.com/?page=cores
  4. https://docs.libretro.com/guides/import-content/#step-2-scan-and-import
  5. https://docs.libretro.com/library/neko_project_ii_kai/#bios
  6. https://gang-fight.com/projects/98faq/
  7. https://github.com/AZO234/NP2kai/blob/da219658c24c610ba82d5a07ea9897e8e0eef670/README.md?plain=1#L569
  8. https://github.com/AZO234/NP2kai/blob/master/sdl/libretro/libretro-common/include/libretro.h#L312
  9. https://www.libretro.com/index.php/changing-behavior-of-gl-and-glcore-video-drivers/
  10. https://github.com/libretro/RetroArch/issues/15259
  11. https://github.com/libretro/RetroArch/issues/15259#issuecomment-1575693902
  12. https://github.com/libretro/RetroArch/issues/15259#issuecomment-1743577443
  13. https://forums.libretro.com/t/how-to-restore-retro-arch-default-settings/2524/3
  14. https://github.com/libretro/RetroArch/issues/8976
  15. https://forums.libretro.com/t/vsync-not-working-with-windows-10-1809-newest-update/18443/15
  16. https://www.reddit.com/r/linux_gaming/comments/1ai2kel/nvidia_flipping_only_working_on_selected/
  17. https://forums.developer.nvidia.com/t/flipping-not-working-in-fullscreen-apps/279865
  18. https://web.archive.org/web/20201223115540/https://www.nvidia.com/en-us/geforce/forums/discover/285622/when-will-there-be-a-driver-update-to-fix-retroarch-rsquo-s-flashing-flcickiering-black-lines-in-full-screen-mode-/
  19. https://www.reddit.com/r/RetroArch/comments/10i9l6f/screen_flickering_on_linux_with_nvidia_gsync_on/
  20. https://gitlab.gnome.org/GNOME/mutter/-/issues/2794
  21. https://gitlab.gnome.org/GNOME/mutter/-/issues/3134