← Blog
0.7.0 · RETROPIE · LAUNCHER

RetroPie Launcher — Smart Folders + Live Emulator Launch (sigil-retropie cd41f53 + 5a4a286)

June 22, 2026 · sigil-retropie cd41f53 + 5a4a286 · Sigil-Docs
retropie launcher smart-folders emulator 0.7.0

Two sigil-retropie commits complete the RetroPie launcher loop. cd41f53 wires the EV_SELECT event to actually spawn emulators — pressing A now launches the game. sys_launch.sg maps all 73 system IDs to their /apps/<emu> paths, rom_path_write emits the absolute ROM path, and rp_launch hands both to the capability layer. Seed demo ROMs committed for 5 systems (NES/SNES/Genesis/GB/GBA) in per-system subdirectories. 5a4a286 adds Smart Folder navigation: 73 systems partitioned into 6 platform categories (Handheld 16 · Classic 15 · 3D/CD 11 · Modern 7 · Computer 19 · Arcade 5), browsable with L1/R1 at Level 0.


cd41f53 — EV_SELECT launch wiring

Before cd41f53, the launcher could browse systems and ROMs but pressing A did nothing — there was no path from selection to emulator spawn. cd41f53 closes that loop.

ui/sys_launch.sg
sys_app_path(sys, buf)
Maps all 73 system IDs to their emulator app path as a null-terminated byte string via poke8 into buf. NES → /apps/nes_app, SNES → /apps/snes_app, Genesis/MD → /apps/genesis_app, GB → /apps/gb_app, GBA → /apps/gba_app, etc. for all 73 systems. rp_app_buf() and rp_rom_buf() are fixed scratch addresses used by the launcher for these strings. No malloc, no VFS at this layer — pure poke8 byte writes.
ui/launcher_app.sg
EV_SELECT handler
On A-press at Level 1 (ROM selected): calls rom_path_write(rom_idx, rp_rom_buf()) to write the absolute ROM path, then sys_app_path(active_sys, rp_app_buf()) to write the emulator path, then rp_launch(rp_app_buf(), 0) to spawn the emulator. Before this commit, EV_SELECT only navigated; now it actually runs a game.
lib/rom_catalog_gen.sg
rom_path_write(i, buf)
Writes the absolute ROM path for catalog entry i as a null-terminated byte string into buf. Path format: /roms/<system>/<rom_filename>. Used by the launcher to pass a filesystem path pointer to cap_derive/fs_resolve.
Seed demo ROMs
roms/nes/demo_game.nes (16B), roms/snes/demo_snes.sfc (512B), roms/genesis/demo_md.md (256B), roms/gb/demo_gb.gb (32768B), roms/gba/demo_gba.gba (192B). Per-system subdirectory layout matches rom_path_write output — scanner picks these up from the catalog.
Per-system ROM path update
All 5 el0/<sys>_app.sg files updated from flat /roms/game.* to subdirectory paths (/roms/nes/demo_game.nes, /roms/gb/demo_gb.gb, etc.) matching the catalog layout from rom_catalog_gen.sg.

The launch path is now a straight line: A-press → rom_path_write fills the ROM buffer → sys_app_path fills the emulator buffer → rp_launch hands both pointers to the capability layer. No allocation, no string formatting at runtime — the buffers are fixed addresses known at compile time.


5a4a286 — Smart Folder column-browser

73 systems displayed flat was functional but hard to browse — pressing D-pad through all 73 to find a Game Boy game wasn't ideal. 5a4a286 partitions the library into 6 Smart Folder categories:

CategorySystemsExamples
Handheld (16)Game Boy, GBA, GBC, DS, PSP, Game Gear, Lynx, WonderSwan, Neo Geo Pocket...Portable gaming
Classic (15)NES, SNES, Atari 2600/5200/7800, Colecovision, Intellivision, Odyssey2...Pre-3D consoles
3D/CD (11)N64, PS1, Dreamcast, Saturn, 3DO, Jaguar, Neo Geo CD, TurboGrafx-CD...CD-era + 3D
Modern (7)PS2, GCN, Wii, Xbox, PS3, Wii U, SwitchSixth gen onward
Computer (19)DOS, Amiga, C64, MSX, ZX Spectrum, Apple II, TRS-80, BBC Micro...Home computers
Arcade (5)MAME, FBA, Naomi, CPS1/2, Neo Geo MVSCoin-op

New API

sf_count()
Returns 6 — the number of Smart Folder categories.
sf_name(cat)
Returns the display name for category cat (0=Handheld, 1=Classic, 2=3D/CD, 3=Modern, 4=Computer, 5=Arcade).
sf_sys_count(cat)
Returns the number of systems in category cat (16/15/11/7/19/5).
sf_sys(cat, n)
Returns the global system ID (0–72) for the nth system in category cat. Called by the launcher to resolve a category-local selection to the global system ID that sys_app_path and rp_launch understand.
sf_nav(cat, sel, ev)
Wraps rp_nav for per-category bounds — navigates within the systems of cat, clamping sel to [0, sf_sys_count(cat)-1].

launcher_app.sg + launcher_scene.sg changes

The two commits compose cleanly: 5a4a286 adds a category indirection step before the system ID is resolved, then the existing cd41f53 launch path takes over unchanged. Browsing is now L1/R1 to pick a category at Level 0, D-pad to pick a system within it, then A to enter the ROM list and A again to launch.


What this closes

LayerWhat shippedCommit
System catalog73 systems, ROM scanner, flat library viewprior
ROM browserLevel 0/1 navigation, D-pad within systemsprior
Launch wiringEV_SELECT → rp_launch, sys_app_path, rom_path_write, seed ROMscd41f53
Smart Folders6 categories, sf_* API, L1/R1 nav, filtered grid5a4a286

With these two commits the RetroPie launcher is a complete loop: browse by category, pick a system, pick a ROM, press A, game runs.