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.
  • S @ salazarcosplay:
    hunter x hunter
  • S @ salazarcosplay:
    he has not allowed anyone to continue it for him for example
  • Xdqwerty @ Xdqwerty:
    @salazarcosplay, theres a dragon ball af mod for budokai 3
  • Xdqwerty @ Xdqwerty:
    updated ship of harkinian, gonna install some hd texture pack
  • Xdqwerty @ Xdqwerty:
    I might download rayman revolution for my ps3
  • BigOnYa @ BigOnYa:
    I may try the new ram site, and download more RAM to my Switch. Not sure if ddr3 is the right ram
    for it tho. Edit- no it uses floppy Ram, just like @AncientBoi
    +1
  • Xdqwerty @ Xdqwerty:
    aeiou
  • BigOnYa @ BigOnYa:
    And sometimes Z
  • SylverReZ @ SylverReZ:
    @K3Nv2, MAGA supporters be wearing tin foil hats lol.
    +1
  • Xdqwerty @ Xdqwerty:
    @SylverReZ, whats maga?
  • BigOnYa @ BigOnYa:
    It stands for Maniacs Against General Acceptance
    +1
  • Xdqwerty @ Xdqwerty:
    @BigOnYa, people rejecting general consensus about stuff?
    +1
  • BigOnYa @ BigOnYa:
    Yup, nuh its really just Trump followers
  • Xdqwerty @ Xdqwerty:
    @BigOnYa, im not american so i dont care about trump
    +1
  • Xdqwerty @ Xdqwerty:
    or us elections
  • BigOnYa @ BigOnYa:
    Me niether, us north Koreans don't care
  • Xdqwerty @ Xdqwerty:
    good night
  • BakerMan @ BakerMan:
    i don't care either, even if i'm american
  • BakerMan @ BakerMan:
    truth be told, i agree with psi, i dislike both candidates, but i'd probably vote trump simply because the economy was better during his presidency
  • AngryCinnabon @ AngryCinnabon:
    Just be careful, if trump ends up winning and using project 2025 America might really change...for the worse.
  • AngryCinnabon @ AngryCinnabon:
    I'm not american and even that sends shivers down my spine.
  • AngryCinnabon @ AngryCinnabon:
    anything that offers trump an opportunity to become an actual dictator
    is bad in my book, i could care less if it wasn't for that...
  • K3Nv2 @ K3Nv2:
    Canada: America's Russia
  • NinStar @ NinStar:
    people are so dramatic that I can't even tell if they are being serious
    NinStar @ NinStar: people are so dramatic that I can't even tell if they are being serious