Tutorial  Updated

Build and run RetroArch for Arch Linux (multi-consoles emulator)

This is a partial rewrite of the guide I wrote for r/SwitchHacks

Here is a short guide to quickly explain how to run RetroArch on Arch Linux on your Switch. RetroArch is a multi-platform multi-consoles emulator. It's basically like an empty shell in which you put your emulator ; they are called "cores". RetroArch loads a core for the desired console, which then loads and boots the game you feed it.

This is not a guide for using RetroArch, there are plenty out there. This is rather a guide to explain how to make it run on the Switch. You should build it yourself rather than using pre-compiled binaries because each binary is suited for the system it's been compiled on, in terms of features and drivers. For instance, if you don't have freetype or opengl installed you won't be able to use a RetroArch binary with XMB support enabled.

Anyway - I will assume that you already have a working copy of Arch Linux on your Switch, with sudo and GPU acceleration enabled. If you don't, go check my other guide (it's in this category). I will also assume that you know how to open and use a terminal (warning : gnome-terminal doesn't work yet).

To make the best out of RetroArch, I personnally recommend the KDE image that Gigaa made. I also recommend that you open a SSH terminal on your Switch, because you know, the onscreen keyboard is not very practical. Be aware that Wi-Fi and Bluetooth won't work at the same time, it will crash your console. Fixed with GNOME and KDE images.

List of known working cores :
  • vba-next
  • snes9x2010
  • beetle-psx (runs at approx. 50fps with "normal" power setting, however this causes power failures)
  • dosbox
List of known not working cores :
Building RetroArch

Code:
$ sudo pacman -S freetype2
$ sudo pacman -S base-devel
$ sudo pacman -S git
$ git clone --depth 1 https://github.com/libretro/RetroArch
$ cd RetroArch
$ ./configure
$ make

You can then run RetroArch with "./retroarch". It should start with the XMB menu working out of the box. To remove the black squares and add a nice font, go to the Online updater and download the assets. You can use RetroArch with the onscreen keyboard, although this is not very convenient.

You can improve performances of the XMB menu by going into Settings > User interface > Appearance and then disabling text shadows and using the simplified ribbon as a background.
Use backspace to go back in the menus. Escape will quit RetroArch. Don't thank me.

Building cores

As the buildbot doesn't contain the linux-aarch64 cores yet, you will have to build them yourself. Be careful as some cores need a JIT compiler to run at full performances (like parallel-n64) : they will need a "ARM64" JIT (simply "ARM" compilers will not work). If a core needs a JIT but don't offer a ARM64 / AARCH64 JIT, don't bother compiling it.

This being said - identify the core you want to build. I do this by going to the libretro organization on GitHub and typing in the name of the console I want the core of. Some consoles have a shitload of cores, just take the best one based on the date / description /last commit / README. Be careful as some cores have specific build instructions (typically written on the README).

For this example I will take vba-next, the libretro port of the VBA emulator (GBA). Just clone the corresponding repository and make the core :

Code:
$ git clone --depth 1 https://github.com/libretro/vba-next.git
$ cd vba-next
$ make

This will give you a file called "vba-next.so" : this is your core. To have it recognized by RetroArch, copy it in the right directory (run RA at least once so it creates it) :

Code:
$ cp vba-next.so ~/.config/retroarch/cores

You can then run RetroArch and load the core, then your game ! Enjoy <3
Feel free to report any core you tried, I'll add them to the list at the beginning of this post !
 
Last edited by natinusala,

Miqote

Well-Known Member
Member
Joined
May 2, 2018
Messages
259
Trophies
0
XP
822
Country
Macedonia, The Former Yugoslav Republic of
[alarm@alarm RetroArch]$ ./RetroArch.sh

-bash: ./RetroArch.sh: No such file or directory

[alarm@alarm RetroArch]$ ./retroarch

failed to set tiling parameters: No such file or directory

failed to set tiling parameters: No such file or directory

Segmentation fault (core dumped)

[alarm@alarm RetroArch]$ sudo ./retroarch

error: XDG_RUNTIME_DIR not set in the environment.

The instructions don't mention a RetroArch.sh?

Code:
$ sudo pacman -S freetype2
$ sudo pacman -S base-devel
$ sudo pacman -S git
$ git clone --depth 1 https://github.com/libretro/RetroArch
$ cd RetroArch
$ ./configure
$ make
 
D

Deleted User

Guest
The instructions don't mention a RetroArch.sh?

Code:
$ sudo pacman -S freetype2
$ sudo pacman -S base-devel
$ sudo pacman -S git
$ git clone --depth 1 https://github.com/libretro/RetroArch
$ cd RetroArch
$ ./configure
$ make

You can then run RetroArch with "./retroarch". It should start with the XMB menu working out of the box. To remove the black squares and add a nice font, go to the Online updater and download the assets. You can use RetroArch with the onscreen keyboard, although this is not very convenient.
 

Miqote

Well-Known Member
Member
Joined
May 2, 2018
Messages
259
Trophies
0
XP
822
Country
Macedonia, The Former Yugoslav Republic of
You can then run RetroArch with "./retroarch". It should start with the XMB menu working out of the box. To remove the black squares and add a nice font, go to the Online updater and download the assets. You can use RetroArch with the onscreen keyboard, although this is not very convenient.
Did you do the configure and make? What files are present in the directory?
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
  • realtimesave @ realtimesave:
    I tried to get a slim on a black friday once, but they ran out of stock for the $100 one
  • realtimesave @ realtimesave:
    many ages ago
  • BigOnYa @ BigOnYa:
    You can find them $50-75 nowdays if catch a deal
  • K3Nv2 @ K3Nv2:
    Still remember grabbing this ps4 slim on black Friday for $200 when the msrp was still around 300
    +1
  • BigOnYa @ BigOnYa:
    I went to auction at a mom/pops video game store few months ago that was closing, and bought 11 slims for $200, 1 was DOA but 10 work fine. so hella deal. Already rgh3'ed 8 of them. But most younger kids don't even want anymore, unless it plays stupid "fortnight", or newer shit.
  • K3Nv2 @ K3Nv2:
    Think I'm gonna use my giftcard balance on a nice pair of headphones but $100 is still limited
  • K3Nv2 @ K3Nv2:
    Soundcore q30s are nice but they leak so much sound it sounds like speakers
  • Psionic Roshambo @ Psionic Roshambo:
    Ken spend the 100 on a gun and skii mask, wait for a jogger at the park jewelry money and headphones!
    +1
  • K3Nv2 @ K3Nv2:
    If only Amazon sold guns
  • K3Nv2 @ K3Nv2:
    Fucking dick heads think it's a bad idea to get a gun 2 days later
  • BigOnYa @ BigOnYa:
    Wait, I thought you were the dickhe...nvm
  • K3Nv2 @ K3Nv2:
    I got balls on my chin and two dicks on my forehead sir
    +1
  • BigOnYa @ BigOnYa:
    Sorry, no offense there double dickhead chinballs.
  • K3Nv2 @ K3Nv2:
    Chicks still love it
    +1
  • BigOnYa @ BigOnYa:
    "Mommy, look, what is that?". "That's your soon to be daddy."
    +1
  • K3Nv2 @ K3Nv2:
    That you'll only see once
    +2
  • Veho @ Veho:
    Double dickhead chinballs is still better than double dickhead eyeballs.
  • Veho @ Veho:
    As in, the balls will grow in your eye sockets.
  • K3Nv2 @ K3Nv2:
    I paid 5 grand to get them moved to my chin
    +1
  • Veho @ Veho:
    This you?
  • K3Nv2 @ K3Nv2:
    My hair can't be that cool
    Sonic Angel Knight @ Sonic Angel Knight: JOE! :P