- Shell 68.6%
- Jinja 21.3%
- Makefile 10.1%
- Deployed all 437 udev autoconfig profiles from libretro/retroarch-joypad-autoconfig - Also deployed hid/linuxraw/sdl2/dinput/xinput profiles - Uses shared /opt/retroarch/autoconfig/ with per-user symlinks - Updated retroarch.cfg to point to shared autoconfig dir in shared mode |
||
|---|---|---|
| .opencode | ||
| docs | ||
| inventory | ||
| playbooks | ||
| scripts | ||
| .gitignore | ||
| AGENTS.md | ||
| ansible.cfg | ||
| LICENSE | ||
| Makefile | ||
| README.md | ||
RetroArch — Linux Install & Configuration
Automated installation of RetroArch on Debian 13+ and Arch Linux using Ansible. Provides a fully configured multi-system emulation environment for all users.
Target host: 10.32.55.31 — Arch Linux
Users: Fredrick, Elin, Alicia, Vanessa, Alexander
Hardware: Intel i7-4710HQ, 15GB RAM, Intel HD 4600 + NVIDIA GTX 860M
Quick Start
# Install dependencies + RetroArch + cores
sudo make deps # System packages
make config # Deploy retroarch.cfg + assets
make launcher # Desktop entry + launcher script
# Or using Ansible directly:
ansible-playbook -i inventory/hosts.ini playbooks/install.yml --tags deps
Multi-User Shared Install
# Remote install on archbox
make deps-shared HOST=archbox
make config-shared HOST=archbox
make launcher-shared HOST=archbox
Each user runs retroarch from their session. Saves and configs are per-user
under ~/.config/retroarch/. Roms go in /opt/retroarch/roms/ with shared
read access.
Requirements
- Debian 13+ or Arch Linux (x86_64)
- Network access to Garage S3 mirror (
http://10.32.70.16:3900) - Vulkan-capable GPU (use Intel HD 4600 IGP via
DRI_PRIME=0for best FOSS performance) - ~2 GB free disk space (base), + roms as needed
Systems We Play
| System | Core | Notes |
|---|---|---|
| NES | nestopia / mesen |
USB NES controllers from AliExpress |
| SNES | snes9x / bsnes |
Colorful USB SNES controllers (Swedish palette) |
| Nintendo 64 | parallel-n64 / mupen64plus-next |
|
| GameCube / Wii | dolphin |
Needs Vulkan for best performance |
| Game Boy / Color | gambatte / sameboy |
|
| Game Boy Advance | mgba |
|
| PlayStation | beetle-psx (mednafen) |
|
| PlayStation 2 | play |
⚠️ Experimental — FF12, SingStar |
| PlayStation Portable | ppsspp |
|
| Sega Mega Drive | genesis-plus-gx / picodrive |
|
| Sega Dreamcast | flycast |
|
Additional cores for arcade (mame), DOS (dosbox-core), Saturn (yabause), |
||
| and many more are also installed. |
Project Structure
├── ansible.cfg
├── inventory/hosts.ini
├── playbooks/
│ ├── install.yml # Main playbook
│ ├── vars/{Debian,Archlinux}.yml
│ └── templates/
│ ├── retroarch.cfg.j2
│ └── retroarch.desktop.j2
├── scripts/
│ ├── fetch-assets.sh # Download assets/cores from S3
│ └── install-remote.sh # Standalone remote installer
├── Makefile
├── AGENTS.md # Full developer/agent docs
├── LICENSE # GPL v2 only
└── README.md
OS Support
| Feature | Debian 13+ | Arch Linux |
|---|---|---|
| Package manager | apt |
pacman |
| RetroArch package | retroarch |
retroarch |
| Core packages | libretro-* |
libretro-* |
| Assets package | retroarch-assets |
retroarch-assets |
The playbook auto-detects OS via ansible_os_family and loads the correct
package list from playbooks/vars/{Debian,Archlinux}.yml.
Deploy Modes
| Mode | Variable | Description |
|---|---|---|
| Single-user | deploy_mode=single (default) |
Per-user config, local roms |
| Shared (multi-user) | deploy_mode=shared |
Shared roms at /opt/retroarch/roms/, system launcher |
Shared Mode Architecture
/opt/retroarch/
├── roms/ # Shared ROM directory (read-only for users)
│ ├── snes/
│ ├── nes/
│ ├── genesis/
│ ├── psx/
│ ├── ps2/
│ ├── n64/
│ ├── gamecube/
│ ├── dreamcast/
│ ├── gb/
│ ├── gba/
│ ├── gbc/
│ ├── psp/
│ └── ...
├── bios/ # Shared BIOS directory
└── assets/ # Shared assets (system-wide)
Special Game Notes
Final Fantasy XII (PS2)
Runs under play (Play! emulator) via libretro. Performance varies —
Play! is experimental but improving. May need per-game config tweaks.
SingStar (PS2)
Requires USB microphones — standard USB audio devices. Play! has limited SingStar support; audio lag can be an issue. Standalone Play! may work better.
Controllers
| Controller | Connection | Notes |
|---|---|---|
| NES USB (AliExpress) | USB HID | Standard gamepad, needs manual auto-config |
| SNES USB (AliExpress) | USB HID | Colorful Swedish palette, needs manual auto-config |
| PS3 DualShock 3 | Bluetooth / USB | Built-in RetroArch auto-config, up to 4 over BT |
PS3 DualShock 3 pairing:
- Ensure Bluetooth is running:
systemctl start bluetooth - Plug controller via USB (auto-pairs via SixAxis plugin)
- Unplug USB, press PS button
- Repeat for up to 4 controllers
If auto-pair fails, use bluetoothctl for manual pairing — see AGENTS.md for details.
S3 Mirror (Garage)
| Bucket | Endpoint | Region |
|---|---|---|
la-commerce-storage/retroarch/ |
http://10.32.70.16:3900 | eu-north-1 |
Installation Steps
1. System Dependencies
| Debian | Arch Linux |
|---|---|
sudo make deps |
make deps-shared HOST=archbox |
Installs retroarch, all libretro cores, and FOSS Vulkan drivers (vulkan-intel, vulkan-nouveau).
2. Configuration
Deploys retroarch.cfg with per-system core defaults, Swedish locale, Vulkan renderer, ALSA/PulseAudio, and Ozone menu.
3. Launcher
Deploys desktop entry and launcher script (system-wide for shared mode).
Known Issues
- NVIDIA drivers — GTX 860M runs on
nouveau(FOSS). Vulkan performance is lower than proprietary; use Intel HD 4600 IGP viaDRI_PRIME=0for demanding cores. - SDDM disabled — system doesn't auto-boot to desktop. Run
retroarch --menufrom TTY or enable SDDM. - Audio latency — default increased to 128ms in config to prevent crackling.
- BIOS files — not distributable; users must provide their own.
- Generic USB controllers — no auto-config profiles exist; manual setup needed.
- PS2 emulation — Play! is experimental; many games have issues.