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.
  • BigOnYa @ BigOnYa:
    Did you pay your power bill? Or give all yo money to my wife, again.
  • K3Nv2 @ K3Nv2:
    Oh good the estimated time is the same exact time they just said
    +1
  • BigOnYa @ BigOnYa:
    Load up your pc and monitor, and head to a McDonalds dining room, they have free WiFi
  • K3Nv2 @ K3Nv2:
    Sir please watch your porn in the bathroom
    +2
  • BigOnYa @ BigOnYa:
    No sir we can not sell you anymore apple pies, after what you did with the last one.
  • K3Nv2 @ K3Nv2:
    We ran out
  • HiradeGirl @ HiradeGirl:
    for your life
    +1
  • K3Nv2 @ K3Nv2:
    My life has no value my fat ass is staying right here
  • K3Nv2 @ K3Nv2:
    Nearly 4 hours without power :(
  • Veho @ Veho:
    SO POWERLESS
  • K3Nv2 @ K3Nv2:
    Tell Kanye I need power
  • DinohScene @ DinohScene:
    Better start running in your hamster wheel
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    Meth addicts on a treadmill connected to a generator "Unlimited POWER!!!'
  • Veho @ Veho:
    Before or after a hit?
  • Veho @ Veho:
    Do you dangle a baggie in front of them, like a carrot?
  • The Real Jdbye @ The Real Jdbye:
    they're the same thing
  • The Real Jdbye @ The Real Jdbye:
    i like that idea
  • Veho @ Veho:
    What's the same thing?
  • The Real Jdbye @ The Real Jdbye:
    before or after a hit
  • Veho @ Veho:
    Nah, a hit gives them mad meth powers, but makes them more difficult to control.
  • Veho @ Veho:
    Before a hit they're like zombies, persistent but slow.
  • Veho @ Veho:
    It's a tradeoff.
    Veho @ Veho: It's a tradeoff.