Last updated: 2026-05-13
- Entry point:
src/main.cpp. - Responsibilities:
- initialize EE runtime services,
- load core IOP modules,
- initialize graphics/input/audio,
- execute embedded Lua boot.
- Boot script execution is retried through an on-screen recovery flow if Lua startup fails.
- Lua VM setup:
src/luaplayer.cpp. - Required runtime Lua is embedded:
boot.luasystem.luaui.luaimages.luapops_profiles.lua
- Filesystem Lua loaders are disabled, so startup does not depend on loose Lua files beside the ELF.
etc/boot.luainitializes fonts and requiressystem.bin/POPSLDR/system.luaowns:- settings load/save/apply,
- backend detection/classification,
- startup backend auto-init,
- HDD mount tracking,
- game-list construction,
- POPStarter launch policy,
- external ELF teardown prep.
bin/POPSLDR/ui.luaowns:- scenes and transitions,
- notifications/modals,
- settings UI,
- path editor / keyboard,
- busy overlays,
- cover preview behavior,
- exit modal behavior.
src/luasystem.cppprovidesSystem.*bindings for:- file and directory I/O,
- current working directory,
- ELF loading,
- browser exit,
- embedded asset access,
- BDM/USB/MMCE/MX4SIO helpers,
- mount-driver queries.
src/luaHDD.cppprovidesHDD.*bindings for HDD status and partition mount APIs.src/elf_loader/src/elf.cowns the low-level ELF handoff backends:LoadExecPS2ExecPS2ExecPS2with IOP reboot
Makefileembeds assets and buildsbin/POPSLOADER.ELF..github/workflows/compilation.ymlcompiles in aps2dev/ps2devcontainer and packages:PS1_POPSLOADER/*POPS/PATCH_5.BIN
.github/workflows/opencode.ymlruns comment-triggered AI assistance for issue and pull-request review comments.- It is outside the runtime boot/launch path and does not define build/package validation gates.
src/main.cppinitializes runtime services and callsrunScript("boot.lua").etc/boot.luainitializes fonts and requiressystem.lua.system.lualoads settings, runsPLDR.AutoInitStartupBackends(), then enters the UI flow.
- Boot path inputs are collected from:
BOOT_ARGV0_RAWBOOT_PATH_RAWAPP_DIR_LOCAL- configured
POPSTARTER_PATH - configured
DKWDRV_PATH - selected profile
ELF
- Mass roots are normalized and classified by mount-driver identity.
- Required backends are initialized before the user first opens those pages.
- UI edits stay in draft fields.
- Leaving/confirming Settings calls
PLDR.CommitSettingsChanges(...). - Save/apply writes
.pldrs, applies any BDMA changes, and re-syncs runtime/UI state. - Save/apply failures remain visible to the user.
- HDD partition discovery walks the configured POPS partition set.
- Each partition is mounted temporarily into a tracked
pfsX:/slot. - Game entries are encoded as
partition|file.vcd. - Cover lookup uses:
- sidecar PNG beside the selected
.VCD, - or
hdd0:__common/POPS/ART/<title>.pngfor HDD entries.
- UI or launch logic prepares the target path and arguments.
PrepareForExternalELFLaunch(...)computes the PFS keep-mask and unmounts tracked slots not needed for the next handoff.- Control transfers through
System.loadELF(...)orSystem.exitToBrowser().
- Runtime device locks are not enforced anymore:
canEnterDevice()always returnstrue,setDeviceLock()is a no-op.
- USB vs MX4SIO identity must remain driver-based, not path-name based.
- Probe/retry behavior must stay bounded.
- Launch failures must stay explicit to the user.
HDD (exFAT)is still a stub menu entry.SMB (v1)is still a stub menu entry.- HDD-backed
POPSTARTER.ELFexec handoff is still unresolved on reported hardware (D-10,D-14). BOOT.ELFafter HDD runtime initialization is still a connected concern on the current line (U-10).- PAL UI aspect compensation exists in code, but final display correctness still needs hardware confirmation.