RetroArch

Installation
You can install RetroArch from the Alpine repo:

Menu
RetroArch by default uses the desktop menu. If on mobile device you can use a mobile friendly menu driver called. You can set it in retroarch.cfg with:

Phosh terminal keyboard seems not working properly to navigate the menu, here are some buttons correspondence:

Touchscreen
To enable touchscreen on RetroArch menu the following settings must be set in retroarch.cfg:

In case you're on a scaled display, you have to specify the scale factor in retroarch.cfg:

As of writing,  is only available in postmarketOS edge.

Cores
These are the tested cores so far, if you manage to successfully test a core please add it to the list so everyone can have an idea of what can be potentially executed.

A list of installable cores can be found here: https://pkgs.alpinelinux.org/packages?name=libretro*&branch=edge

Overlay assets and configurations can be found here: https://github.com/libretro/common-overlays Shader assets can be found here: https://github.com/libretro/common-shaders

You can git clone them directly to your ~/.config/retroarch/overlay and ~/.config/retroarch/shaders folders directly.

Troubleshooting
RetroArch is highly configurable and allows some tweaks to increase performance. Please, if you find some share them here.

Buggy audio
By default RetroArch set audio driver to ALSA. This may result in buggy audio. I had to change it to pulse to have a smooth audio:

If this doesn't solve the audio issue it may be that the device is not powerful enought to emulate the game/platform under some conditions (overlays, shaders). Enabling video threading can be a possible solution:

Related

 * upstream patch to add input_touch_scale
 * aports!20315 backport of the patch to Alpine edge
 * discussion of this wiki page