Last updated: 2026-03-06
- Entry point:
src/main.cpp. - Boots EE runtime, initializes RPC/services, loads core IOP modules, initializes graphics/input/audio, then executes Lua boot.
runScript("boot.lua")is called in a retry loop; script errors show an on-screen recovery prompt.
- Lua VM setup:
src/luaplayer.cpp. - Script loader is embedded-only:
- embedded searcher is installed (
boot.lua,system.lua,ui.lua,images.lua,pops_profiles.lua). - filesystem script loaders (
dofile,loadfile,package.path,package.cpath) are disabled.
- embedded searcher is installed (
- This makes startup deterministic and independent of external Lua files.
etc/boot.luainitializes fonts and requiressystem.bin/POPSLDR/system.luaowns:- settings load/save,
- backend detection/classification,
- game list construction,
- launch policy and POPStarter handoff,
- BDMA apply/copy logic.
bin/POPSLDR/ui.luaowns scenes, input, notifications, settings UI, overlays, and modals.bin/POPSLDR/images.lualazy-loads embedded PNG assets.
src/luasystem.cppprovidesSystem.*bindings:- file operations,
- directory listing,
- ELF loading,
- embedded asset access,
- BDM backend refresh/query,
- mount-driver lookup (
System.getMassMountDriver), - backend initializers (
ensureUsbMass,initMX4SIO, etc.).
src/luaHDD.cppprovidesHDD.*bindings for partition mount/status and HDD IRX init.
Makefileembeds runtime assets and IRX payloads into the final ELF viabin2c.- CI:
.github/workflows/compilation.ymlruns build + packaging and verifies exact ZIP contents. - Release package policy is currently:
PS1_POPSLOADER/*launcher setPOPS/PATCH_5.BIN- no legacy
POPS/*.tm2entries
main.cppinitializes EE/IOP and callsrunScript("boot.lua").boot.luainitializes fonts and requiressystem.lua.system.lualoads settings (PLDR.LoadSettingsNonFatal()), initializes backend readiness, and enters UI loop.
- Settings/Profile edits are staged in UI draft state.
- On confirm/leave, UI calls
PLDR.CommitSettingsChanges(...). - Commit path persists
.pldrsand (if needed) applies BDMA assets. - Failure path re-syncs runtime/UI state and shows notification.
- Mounted
mass:/..mass9:/roots are enumerated. - For mounted roots, mount-driver identity is queried (
System.getMassMountDriver). - Driver names containing
mx4orsdcclassify as MX4SIO; others as USB. - Game lists are built from backend-specific root sets.
- UI selection calls
PLDR.RunPOPStarterGame(...). - Launch policy is resolved from scene + path (USB/MMCE/MX4SIO/HDD).
- POPStarter path is resolved (including
mc?:/expansion when configured). - Launch goes through
LaunchEngine -> System.loadELFwith guarded failure handling.
- Retry/probe paths are bounded (no unbounded backend polling loops).
- Launch is blocked with explicit user feedback when key files are missing.
- Device-family lock prevents unsafe mid-session switching between already-loaded driver families.
- Main menu option
HDD (exFAT)is present but returnsNot Implemented Yet(ui.lua). - Main menu option
SMB (v1)is present but returnsNot Implemented Yet(ui.lua). - ART system is not implemented in current runtime Lua paths.