A modern, lightweight retro front-end built around the libretro core ecosystem (Hatari, MAME, Snes9x, Genesis Plus GX, Mupen64Plus, Beetle PSX HW, โฆ) with a Compose UI tuned for VR panel apps and classic 2D Android.
โ ๏ธ This is a work-in-progress. Most features below work โ some are fragile, a few are scaffolded only. Read the Status section before installing.
- ๐ฏ 107 systems / 200+ libretro cores catalogued (Atari ST, Amiga, MAME, C64, ZX Spectrum, NES, SNES, Mega Drive, PSX, N64, Saturn, Dreamcast, GBA, DS, PSP, 3DS, โฆ)
- ๐ 8 languages (FR, EN, ES, DE, IT, PT, JA, ZH)
- ๐ค User profiles (per-profile saves, mappings, library)
- ๐ผ๏ธ Cover scraper with cascade fallback (boxart โ title screen โ procedural placeholder), persistent miss cache
- ๐ Cross-system search + sort (alphabetical / recently played / favorites / most played / recently added)
- ๐ Pin systems to top of home grid, hide unused ones
- ๐ Battery + Wi-Fi widgets in the home top bar
- ๐ค Pixel-art mascot in the corner (taps cycle helpful tips)
- ๐ฅ In-app Core Manager (downloads
.sofrom libretro buildbot) - ๐ ROM scanner via Storage Access Framework with multi-disc auto-detection (PSX, Amiga, โฆ)
- ๐พ BIOS importer (file or folder picker) โ
files/system/ - ๐ Long-press game โ Rename / Favorite / Delete
- ๐๏ธ Per-game core override (persisted)
- ๐ธ Screenshots gallery with full-screen preview, share, delete
- ๐ Auto-resume: best-effort autosave on activity pause, prompt at relaunch
- ๐ก๏ธ Onboarding wizard (Cores โ Sources โ BIOS) on first run
- ๐น๏ธ Hardware controllers detected & classified (Quest Touch / Xbox / DualShock / DualSense / 8BitDo / Switch Pro)
- ๐ Hot-swap (plug/unplug live during play)
- โจ๏ธ Per-controller remapping (vendor-product keyed, persistable JSON)
- ๐ฑ Touch overlay (auto-shown when no physical controller)
- โธ๏ธ In-game menu: Resume / Screenshot / Reset / Save states (8 slots with thumbnails) /
Speed (ยผรโ4ร + frame advance) / Rewind (60-snap ring buffer) / Cheats (
.chtimport) / Disk control / Core options / Quit - ๐บ Aspect ratio: Fit / Fill / Stretch / 1ร / 2ร / 4:3 CRT (per-game, persisted)
- ๐จ Post-FX shaders (Compose-side): Off / Scanlines / Phosphor / Heavy CRT / Soft Glow
- ๐ผ๏ธ Bezel overlay: None / CRT / Arcade cabinet / Handheld
- โก Performance overlay (FPS / frame ms / audio underruns)
- ๐ Dedicated audio thread with ring buffer (no emu-loop stalls)
- ๐ฅฝ Auto-pause on activity pause / window focus loss
- โ
Niveau 1 โ App is declared MR-aware (
com.oculus.feature.PASSTHROUGH,environmentBlendMode=alpha_blend); Quest can render the 2D panel over your real space via the system passthrough. โ ๏ธ Niveau 2 โ Native OpenXR session withXR_FB_passthrough+ quad layer is integrated (animated test-pattern quad, real-room background). Whether Quest's compositor accepts the immersive transition depends on launch context (works best from Quest Library; Intent launch from a 2D activity may be paused). Seecpp/openxr_session.cpp.
- Kotlin + Jetpack Compose for UI
- Native C++17 via NDK 27 with a custom libretro bridge (
dlopenany.so, pixel-format conversion 0RGB1555 / RGB565 / XRGB8888, audio batch, input poll,retro_serializeโ ring buffer for rewind, save state thumbnails) - OpenGL ES 3 path for cores that request
XR_HW_RENDER(Beetle PSX HW, Mupen64Plus, PPSSPP, Flycast) - OpenXR via Khronos loader (Maven
org.khronos.openxr:openxr_loader_for_android) for the Niveau 2 immersive session - Room v4 DB (profiles, games, save states, cheats, controller mappings, cover misses)
- Coil for cover loading with custom URL cascade
- Enable Developer Mode in the Meta Horizon mobile app
- Connect your Quest via USB-C, accept the RSA prompt inside the headset
- Download the latest APK from the Releases page
- Install:
adb install -r RetroXR-vX.Y.Z.apk
- Launch from Library โ Unknown Sources โ RetroXR
Same APK. Sideload via adb install, or open the file in any file manager.
The app declares category.LAUNCHER + LEANBACK_LAUNCHER so it appears
in both the standard launcher grid and Android TV home rows.
Requirements:
- Android Studio Hedgehog (2023.1) or newer
- Android SDK 34
- NDK 27.2.12479018 (auto-installed by Gradle on first build)
- CMake 3.22.1 (auto-installed)
- JDK 17
git clone https://github.com/Oli97430/retroxr.git
cd retroxr
./gradlew assembleDebug
adb install -r app/build/outputs/apk/debug/app-debug.apkThe first build downloads ~1.5 GB (NDK + CMake + Gradle + AGP + Compose). Subsequent builds are seconds.
| Area | State |
|---|---|
| 2D galerie / library / search / sort / profiles | โ Stable |
| ROM scanner (SAF) + multi-disc M3U | โ Stable |
| Cover scraper + miss cache | โ Stable |
| Atari ST emulation (Hatari) | โ Verified end-to-end |
| In-game menu + save states + thumbnails + rewind + cheats + disk-control | โ Code complete |
| HW context (Beetle PSX HW, Mupen64, PPSSPP) | โ๏ธ Code in place, needs in-headset testing |
| Per-controller remap UI | โ Functional |
| Bezel / shaders / aspect ratio | โ Functional |
| Audio dedicated thread + ring buffer | โ Stable |
| Niveau 1 MR (passthrough panel) | โ Manifest declared, Quest does the rest |
| Niveau 2 MR (immersive OpenXR + quad) | ๐ก Integrated, fragile (Quest pauses occasionally โ depends on launch context) |
| AR Niveau 3 (3D arcade-cabinet scene) | โ Not started |
| Netplay | โ Not started |
| RetroAchievements | โ Not started (local trophy stub only) |
| Cloud save sync | โ Not started |
| CRT/HQ4x real GLSL shaders | โ Compose-side approximations only |
Short term:
- Connect HW core path (Beetle PSX HW) end-to-end with in-headset validation
- Real shader chain (HQ4x, xBR) via GLSurfaceView
- Save state import/export (SAF)
- Cloud sync via Google Drive / WebDAV
Medium term:
- RetroAchievements full integration
- Netplay LAN p2p
- Mixed-Reality Niveau 3 (3D cabinet over passthrough)
- Vulkan path for Citra / Dolphin / PPSSPP
Production:
- Tests (zero today)
- Release build with R8 + signing
- Crashlytics
- GitHub Actions CI
- F-Droid manifest
RetroXR is a front-end. It distributes no ROMs and no BIOS files.
Many systems require a BIOS that you must own and provide yourself
(Atari ST / TOS, Amiga / Kickstart, PSX / scph...bin, Saturn / saturn_bios.bin, Neo Geo / neogeo.zip, etc.).
The in-app "Where to find ROMs" section (globe ๐ icon on the home screen) links to 12 curated legal sources: Internet Archive Software Library, Itch.io free games, PICO-8 BBS, TIC-80 Surf, ZXArt (Spectrum PD), CPCwiki PD, Pouรซt, Atari Mania PD, Macintosh Garden, Aminet, libretro thumbnails, etc.
Dumping ROMs you don't own is illegal in most countries. RetroXR will not help you do that.
RETRO XR VR/
โโโ app/
โ โโโ src/main/
โ โ โโโ java/com/retroxr/
โ โ โ โโโ MainActivity.kt โ Compose host, Idle tracker
โ โ โ โโโ data/
โ โ โ โ โโโ catalog/ โ 107 systems + brand colors + thumbnails folders + HW hints
โ โ โ โ โโโ db/ โ Room v4 (entities, daos, AutoMigration 3โ4)
โ โ โ โ โโโ OnboardingPrefs.kt
โ โ โ โ โโโ SystemPrefs.kt โ Pinned / hidden systems
โ โ โ โ โโโ GameMetadata.kt โ Offline metadata catalog
โ โ โ โโโ emulator/
โ โ โ โ โโโ EmulatorActivity.kt โ run loop, lifecycle, HW/SW switching
โ โ โ โ โโโ LibretroCore.kt โ Kotlin facade over JNI
โ โ โ โ โโโ GLEmulatorView.kt โ HW path (GLSurfaceView)
โ โ โ โ โโโ InGameMenu.kt
โ โ โ โ โโโ BezelOverlay.kt
โ โ โ โ โโโ CrtOverlay.kt
โ โ โ โ โโโ AudioPump.kt โ dedicated thread + ring buffer
โ โ โ โ โโโ RewindBuffer.kt
โ โ โ โ โโโ AspectRatio.kt
โ โ โ โ โโโ โฆ
โ โ โ โโโ input/
โ โ โ โ โโโ ControllerManager.kt โ detect + classify
โ โ โ โ โโโ ControllerMapping.kt โ persistable JSON
โ โ โ โ โโโ LibretroButtons.kt
โ โ โ โโโ library/ โ RomScanner, BiosImporter, CheatParser
โ โ โ โโโ cores/CoreManager.kt โ libretro buildbot downloader
โ โ โ โโโ ui/ โ Compose screens, theme, components
โ โ โ โโโ โฆ
โ โ โโโ cpp/
โ โ โ โโโ libretro_bridge.cpp โ dlopen + JNI exports + frame conversion
โ โ โ โโโ libretro_callbacks.cpp โ env handler (~12 retro env opcodes)
โ โ โ โโโ libretro_gl.cpp โ HW context, FBO, blit shader
โ โ โ โโโ openxr_session.cpp โ Niveau 2 immersive session
โ โ โ โโโ include/libretro.h โ subset header
โ โ โโโ res/values{,-fr,-es,-de,-it,-pt,-ja,-zh}/strings.xml
โ โ โโโ AndroidManifest.xml
โ โโโ build.gradle.kts โ AGP 8.7, Kotlin 2.1, Compose BOM 2024.09
โ โโโ proguard-rules.pro
โโโ gradle/libs.versions.toml
โโโ settings.gradle.kts
โโโ README.md (this file)
The codebase is large (~12 k LOC Kotlin + ~2 k LOC C++) and evolving fast. If you find a bug or want a feature, open an issue. PRs welcome โ please keep the Compose-only style and avoid external network deps for core flows.
MIT โ do whatever you want, but don't bundle ROMs or BIOS files in any fork or distribution. Libretro cores are GPLv2/v3 (per core) and remain the property of their respective authors. RetroXR loads them at runtime, never relinks them.
- libretro / RetroArch โ the cores that do all the actual emulation
- libretro-thumbnails โ community-curated boxart database
- Khronos OpenXR โ open standard for AR/VR
- Bitmap Brothers, Core Design, Image Works, Activision-Irem, MichTron, Arcadia โ for the games used in dev fixtures
- The Quest hardware team for the most ergonomic VR HMD on the market
๐ฎ Built with way too much coffee for a project that started as a 2-line ask.