RetroArch: Difference between revisions

imported>Zaechus
m fix line number for github link and remove erroneous line about directly running games
Jasi (talk | contribs)
m Installation: Move link to introduction and change wording.
 
(6 intermediate revisions by 6 users not shown)
Line 1: Line 1:
You can install retroarch with some cores (actual emulators) by putting something like this in your <code>/etc/nixos/configuration.nix</code>:
[https://www.retroarch.com/ RetroArch] is a all-in-one front-end for emulators, game engines and media players. Nix allows for installing RetroArch cores in a declarative and customizable way.  


<syntaxhighlight lang="nix">
== Installation ==
environment.systemPackages = with pkgs; [
A RetroArch installation can be customized via different packages:
  (retroarch.override {
 
    cores = with libretro; [
* <code>retroarch-full</code>, contains all libretro cores.
* <code>retroarch-free</code>, excludes unfree cores.
* <code>retroarch.withCores</code>, a helper function for generating a retroarch package with a custom list of cores.
 
=== Installing only certain cores ===
 
Using <code>retroarch.withCores</code>:
{{File|3={
  environment.systemPackages = with pkgs; [
    (retroarch.withCores (cores: with cores; [
       genesis-plus-gx
       genesis-plus-gx
       snes9x
       snes9x
       beetle-psx-hw
       beetle-psx-hw
     ];
     ]))
   })
   ];
];
}|name=/etc/nixos/configuration.nix|lang=nix}}
</syntaxhighlight>


The cores are defined here:
One can browse the available cores [https://github.com/NixOS/nixpkgs/tree/master/pkgs/applications/emulators/libretro here]


https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/emulators/retroarch/cores.nix#L61
== Troubleshooting ==


== Gotchas ==
=== Graphics ===
Not all the graphics settings are in the same place. You'll want to look under the top-level Settings (in the left column under Main Menu) and also under <code>Main Menu -> Quick Menu -> Options</code>


Not all the graphics settings are in the same place. You'll want to look under the top-level Settings (in the left column under Main Menu) and also under <code>Main Menu -> Quick Menu -> Options</code>
=== Mapping ===
The following way to remap a controller or map a new controller is convoluted, but works and allows you to upstream your changes.


== Bugs ==
# Fork the [https://github.com/libretro/retroarch-joypad-autoconfig retroarch-joypad-autoconfig] project and clone it in a folder of your choosing.
# With Retroarch open, go to Settings > Directory and change Controller Profiles to point to the same folder. Note: Do not attempt to modify the directory in <code>retroarch.cfg</code> directly because it will be overwritten on startup.
# Now, saving the mapping will work but this will be ignored on next startup of Retroarch.
# After you are happy with the mapping, commit the changes in the folder where you cloned the retroarch-joypad-autoconfig project and push them to your fork.
# To use what you just pushed in your configuration right away, add the following overlay to your nix config by replacing the various fields with those corresponding to your fork:<syntaxhighlight lang="nix">
(final: prev: {
  retroarch-joypad-autoconfig = prev.retroarch-joypad-autoconfig.overrideAttrs {
    src = prev.fetchFromGitHub {
      owner = "ibizaman";
      repo = "retroarch-joypad-autoconfig";
      rev = "420a8fa4dc7b12f7c176fa0e704e9f987f6ceabd";
      hash = "sha256-yIvW9UTgc+/hhwx+93FgzrDBEBD35xFdBiVdJCKUYBc=";
    };
  };
})
</syntaxhighlight>
# After switching over to the new configuration and restarting Retroarch, you will see the mappings got updated.
# Now you can create a pull request from your fork to the retroarch-joypad-autoconfig project to upstream your changes.


=== Input Reset ===
=== Input Reset ===
Line 30: Line 57:


No icons show in the GUI, including the mouse cursor. You need to go to <code>Online Updater > Update Assets</code> to download the icons. You can navigate the GUI with only the keyboard. Press enter to open sections/pages, backspace to go back out, arrow keys to choose between options (left/right change some values).
No icons show in the GUI, including the mouse cursor. You need to go to <code>Online Updater > Update Assets</code> to download the icons. You can navigate the GUI with only the keyboard. Press enter to open sections/pages, backspace to go back out, arrow keys to choose between options (left/right change some values).
=== Error save controller profile ===
This is because the location of the controller profile is in the nix store, making it read-only. To actually remap a controller, see the [[RetroArch#Mapping|Mapping]] section.
[[Category:Applications]]
[[Category:Gaming]]