Difference between revisions of "RetroArch"

From Linux Gaming
Jump to navigation Jump to search
(Created page with "[https://www.retroarch.com RetroArch] is a unified graphical front-end for multiple emulators. == Installation == It can be installed from your package manager, Steam, Flathub and even Snapcraft<ref>https://www.retroarch.com/index.php?page=linux-instructions</ref>. == 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 onl...")
 
(Add games import and Neko Project II Kai section)
Line 8: Line 8:
=== Core installation ===
=== 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 <ref>https://www.retroarch.com/?page=cores</ref>. You can do it manually by downloading the core you want from [https://buildbot.libretro.com/nightly/linux/x86_64/latest/ buildbot.libretro.com] and extracting it to <code>~/.config/retroarch/cores/</code>.
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 <ref>https://www.retroarch.com/?page=cores</ref>. You can do it manually by downloading the core you want from [https://buildbot.libretro.com/nightly/linux/x86_64/latest/ buildbot.libretro.com] and extracting it to <code>~/.config/retroarch/cores/</code>.
=== Adding games ===
The easiest way is to scan a directory where games from the same system are located<ref>https://docs.libretro.com/guides/import-content/#step-2-scan-and-import</ref>. 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 [https://buildbot.libretro.com/nightly/linux/x86_64/latest/np2kai_libretro.so.zip np2kai core] manually or from the online updater. Put the font named “font.rom”, “FONT.ROM” or “font.bmp” inside <code>~/.config/retroarch/system/np2kai/</code><ref>https://docs.libretro.com/library/neko_project_ii_kai/#bios</ref>. Then, run RetroArch, add your games and change the core settings<ref>https://gang-fight.com/projects/98faq/</ref>:
* '''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 <code>~/.config/retroarch/system/np2kai/np2kai.cfg</code> will have to be edited<ref>https://github.com/AZO234/NP2kai/blob/da219658c24c610ba82d5a07ea9897e8e0eef670/README.md?plain=1#L569</ref>. For example, if you want to bind the "Up" arrow key to "D-UP", you will have to find its code<ref>https://github.com/AZO234/NP2kai/blob/master/sdl/libretro/libretro-common/include/libretro.h#L312</ref>, which is <code>273</code>, convert it to little-endian hexadecimal, <code>1101</code>, and put a space between the 2 bytes: <code>11 01</code>. Then, repeat the process for each button. At the end, the line should look like something like this: <code>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</code>


== Troubleshooting ==
== Troubleshooting ==

Revision as of 12:10, 12 May 2025

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].

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 [2]. 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[3]. 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/[4]. Then, run RetroArch, add your games and change the core settings[5]:

  • 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[6]. For example, if you want to bind the "Up" arrow key to "D-UP", you will have to find its code[7], 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[8].
  • RetroArch didn't enter in proper fullscreen under old versions of GNOME X11[9] and workarounds included devilspie2 scripts[10], running RetroArch with Gamescope[11] and forcing borderless fullscreen windowed mode.
  • To reset all RetroArch settings, go to ~/.config/retroarch/ and delete retroarch.cfg[12].
  • If you're using GNOME with an Nvidia GPU, game frames may flicker[13] 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[14][15][16][17], Nvidia G-Sync [18] or unredirection being broken[19][20]).
  1. https://www.retroarch.com/index.php?page=linux-instructions
  2. https://www.retroarch.com/?page=cores
  3. https://docs.libretro.com/guides/import-content/#step-2-scan-and-import
  4. https://docs.libretro.com/library/neko_project_ii_kai/#bios
  5. https://gang-fight.com/projects/98faq/
  6. https://github.com/AZO234/NP2kai/blob/da219658c24c610ba82d5a07ea9897e8e0eef670/README.md?plain=1#L569
  7. https://github.com/AZO234/NP2kai/blob/master/sdl/libretro/libretro-common/include/libretro.h#L312
  8. https://www.libretro.com/index.php/changing-behavior-of-gl-and-glcore-video-drivers/
  9. https://github.com/libretro/RetroArch/issues/15259
  10. https://github.com/libretro/RetroArch/issues/15259#issuecomment-1575693902
  11. https://github.com/libretro/RetroArch/issues/15259#issuecomment-1743577443
  12. https://forums.libretro.com/t/how-to-restore-retro-arch-default-settings/2524/3
  13. https://github.com/libretro/RetroArch/issues/8976
  14. https://forums.libretro.com/t/vsync-not-working-with-windows-10-1809-newest-update/18443/15
  15. https://www.reddit.com/r/linux_gaming/comments/1ai2kel/nvidia_flipping_only_working_on_selected/
  16. https://forums.developer.nvidia.com/t/flipping-not-working-in-fullscreen-apps/279865
  17. 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-/
  18. https://www.reddit.com/r/RetroArch/comments/10i9l6f/screen_flickering_on_linux_with_nvidia_gsync_on/
  19. https://gitlab.gnome.org/GNOME/mutter/-/issues/2794
  20. https://gitlab.gnome.org/GNOME/mutter/-/issues/3134