RetroArch Megathread

I’ll keep this thread up-to-date with RetroArch news and changes.

For now, I’ll start with a guide to build an up-to-date RetroArch
I assume you can SSH into your GS already.

Setup

First let’s setup the build environment

sudo apt-get install git build-essential
sudo apt-get build-dep retroarch

Then let’s clone the repo

git clone https://github.com/libretro/RetroArch.git retroarch

Enter the directory and run the following commands

cd retroarch
./configure --disable-vulkan --disable-ffmpeg --enable-xmb --disable-materialui --disable-flac --disable-parport --disable-vulkan_display --disable-videocore --disable-videoprocessor --disable-v4l2 --enable-x11 --disable-wayland --disable-vg --disable-jack --enable-kms --disable-discord
make -j4
sudo make install

It should take a while, the CPI is not a powerhouse but you should end up with a fully functional RetroArch stripped of some superfluous things that will not work (at least yet) on the GS

Configuration

First thing you should do is configure input, the config shipped in the GS is wrong.

By default RetroArch navigation controls are defined independently for keyboards and gamepads, but the GameShell gamepad is… well, a keyboard (they call it a keypad), So you need to make some changes:

For this guide I’ll assume you installed your buttons in SNES layout (YX/BA) as opposed to the default XBOX 360 layout (XY/AB), why? because it makes a lot more sense for RetroArch, and retro games, that’s all. If you didn’t then you’ll have to consider the differences in mapping for your own use case

The default RetroArch keyboard controls for navigation are:

Keyboard_Black_Arrow_Up ===> navigate up
Keyboard_Black_Arrow_Down ===> navigate down
Keyboard_Black_Arrow_Left ===> navigate left
Keyboard_Black_Arrow_Right ===> navigate right
Keyboard_Black_Enter ===> select
Keyboard_Black_Backspace ===> back

And by default these correspond to the following buttons on the GameShell dpad:

Keyboard_Black_Arrow_Up ===> WiiU_Dpad_Up
Keyboard_Black_Arrow_Down ===> WiiU_Dpad_Down
Keyboard_Black_Arrow_Left ===> WiiU_Dpad_Left
Keyboard_Black_Arrow_Right ===> WiiU_Dpad_Right
Keyboard_Black_Enter ===> 360_Start_Alt

Problem is this is not too intuitive, so we’ll change inputs to match RetroArch gamepad defaults which are:

WiiU_Dpad_Up ===> navigate up
WiiU_Dpad_Down ===> navigate down
WiiU_Dpad_Left ===> navigate left
WiiU_Dpad_Right ===> navigate right
WiiU_B ===> back
WiiU_A ===> select
WiiU_Y ===> clear setting
WiiU_X ===> search
360_Start_Alt ===> reset setting
360_Back_Alt ===> help

So navigate to Settings -> Input

image

I recommend the following changes:

  • Bind Timeout: 5
  • Max Users: anything other than zero
  • Unified Controls: On (important)

Next step, configure input bindings, navigate to User 1 Input binds and configure them as follows:

image

You may just use the User 1 Bind All option, it should work if you made the changes I recommended before.
Finally regarding input, I recommend you to clear the Input Hotkey Binds, they are tailored for a full keyboard and you’ll get nothing but problems with them

So, navigate to Input Hotkey Binds and clear them by pressing WiiU_Y

image

I recommend setting the last one at least, so you can return to the main menu. I used my menu key.

image

Next step: configure directories, you can do so by navigating to: Settings -> Directories

image

I recommend settings System, Savefile, Savestate, File Browser at the very least.
Just remember this is a linux filesystem, your user is cpi so you’ll find your dirs at /home/cpi/

Personally my folder layout is as follows:

/home/cpi
  |
  |---retroarch
  |-------|-------games
  |-------|-------saves
  |-------|-------states
  |-------|-------system

I usually setup all the folders in a similar layout but for explanation purposes this should suffice.
The config file is always at /home/cpi/.config/retroarch/retroarch.cfg

With these changes (remember to exit cleanly to save the configuration) you should be able to have a functioning RetroArch.

Tweaking

I’ve found the following tweaks to help performance and improve the experience:

Drivers

Configure drivers as follows:

image

Video

Make sure Threaded Video is enabled, Vertical Sync is on and Vertical Sync Swap Interval is at 1. Don’t enable Hard GPU Sync (btw, seems VSYNC is still kinda off with these drivers, hopefully that can be improved with time)

image

Audio

Just make sure Audio Sync is enabled, also try adjusting the Audio Resampler Quality to low. If you have crackling in some cores, try increasing the Audio Latency to 96 or 128.

image.

Cores

You can install cores from the online updater, I forced a refresh build of them today. I’m trying to add a more optimized core tree on the buildbot.

Until that happens there are a few here that should be faster than the buildbot counterparts:
https://files.andressm.org/d/439d852b9ed243f9b296/

Results

Snes9x 2005+ running fullspeed

image

gPSP running fullspeed

image

PCSX-ReARMed running fullspeed

image

Video Filters

I was messing with shaders but with the current drivers they are not usable at all so I tested the CPU based video filters, and surprisingly they work well!

So from the RetroArch repo do:

cd gfx/video_filters
make
mkdir -p ~/.config/retroarch/filters/
cp *.filt *.so ~/.config/retroarch/filters/video

Now edit your config and change the video_filter_dir too
video_filter_dir = “~/.config/retroarch/filters/video/”

It’s hard to tell with such a small framebuffer, but there is a difference:

No filter
image

Scale2x
image

Image is sharper and there are less scaling artifacts at least, performance may take a hit, and filters are pixel format specific so your mileage may vary

48 Likes

Common Problems

I messed up input and I can’t press anything.

If you really did mess up input the easiest solution is to start over.

Close RetroArch
SSH into your GS and then do

cd ~/.config/retroarch
rm retroarch.cfg
wget https://raw.githubusercontent.com/clockworkpi/GameShellDocs/master/retroarch.cfg

I removed my config and now when I start RetroArch it looks weid

If you are working without a config you’re using RetroArch global defaults, which means 3x window size and XMB theme. The easiest solution is to do what I mentioned for the previous issue.

Alternatively you may use a text editor to open ~/.config/retroarch/retroarch.cfg and change menu_driver to rgui and video_fullscreen to true

I recommend to use nano as a text editor

https://wiki.gentoo.org/wiki/Nano/Basics_Guide

7 Likes

FBA is fine too :slight_smile:

image

Also tested Cannonball, nxengine and TyrQuake, all of them are working fine

XMB works although it’s rather slow due the lack of proper HW acceleration
That said, XMB + pixel theme + achievement badges looks pretty damn cool on the tiny GS

image

6 Likes

Ok last thing tonight :slight_smile:

5 Likes

Omg dude, thank you for this! :metal:t2:

2 Likes

Do I need to newly enter the command written in the setup into RetrosoArch’s .config in GS?

where i can find XMB set?

.config???
No, you enter those commands in the linux shell.

Thanks for that quality post :slight_smile:

1 Like

Awesome! Great job! Thanks a lot for comprehensive guide

1 Like

I must learn about Linux first.:disappointed_relieved:
There are too many things I do not know too much since I got GameShell.:sob:

Hi mate. Thanks for the message. But I have serveral issues here:

When running “apt-get install git build-essential
apt-get build-dep retroarch” the terminal said: “E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?”

The github one runs ok. However, “cpi@clockworkpi:~/retroarch$ make -j4
Makefile:10: config.mk: No such file or directory
config.mk is outdated or non-existing. Run ./configure again.
Makefile:182: recipe for target ‘config.mk’ failed
make: *** [config.mk] Error 1
cpi@clockworkpi:~/retroarch$ sudo make install
Makefile:10: config.mk: No such file or directory
config.mk is outdated or non-existing. Run ./configure again.
Makefile:182: recipe for target ‘config.mk’ failed
make: *** [config.mk] Error 1”

Is there anything I am missing? Cheers

@Valssu
Run the apt-get commands as root.
Also sounds like you didn’t run ./configure.

1 Like

I think I ran it. “cpi@clockworkpi:~/retroarch$ apt-get install git build-essential
E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?” got something like this.

The ./configure actually runs ok

You’re not running it as root like you’re supposed to. :upside_down_face:
Add sudo to the start of each apt-get command before running them.

That works! Thanks! Finger crossed for the later on things.

1 Like

BTW, when I am setting the button configuration in retroarch. I accidentally assigned the confirm button (b) to something else. So I can click yes any more (so cant get it back). What shoud I do?

I must learn about Linux first.:disappointed_relieved:
There are too many things I do not know too much since I got GameShell.:sob:

That’s the fun part

2 Likes

@fr500 You are truly amazing. Thank you so much writing this up!!