ps1: bundle plain-ELF POPS loader + KEYS.BIN (iPoPS, MIT)

Fix 80020148 'game could not be started' on ARK-5: the base PBP's encrypted
~PSP loader fails to link on modern CFW. Use the bundled plain-ELF loader
(data/loader/DATA.PSP) as the DATA.PSP section instead, and write the 16-byte
NPDRM version key (data/loader/KEYS.BIN) alongside the EBOOT so CFW can
decrypt the STARTDAT PGD. Both assets are from iPoPS (MIT, attributed).

- load_data_psp: prefer the bundled ELF, fall back to the base ~PSP loader.
- load_keys_bin: return the bundled 16-byte key when present.
- convert: write KEYS.BIN next to the output EBOOT.
- README + data/loader/ATTRIBUTION.md: document the loader and its license.
This commit is contained in:
2026-09-07 17:44:54 -04:00
parent ea08f52d44
commit f61a77a31f
5 changed files with 89 additions and 19 deletions
+15 -12
View File
@@ -93,9 +93,10 @@ Discs are matched by hash first (most precise), then serial, then filename.
- `data/covers/` — checked-in assets: the UMD video/game cover templates,
`libretro-index.json` + `openvgdb-index.json` catalogs, `libretro-covers.zip` +
`openvgdb-covers.zip` offline cover bundles, and the legacy cover cache.
- `data/base.PBP` — a PSN PS1 classic EBOOT (any game) used as the encrypted
loader when converting PS1 discs to `EBOOT.PBP` (git-ignored, copyrighted).
Prefer a 6.60/6.61-era classic; 3.xx-era loaders can fail on modern CFW.
- `data/base.PBP` — a PSN PS1 classic EBOOT (any game) supplying `STARTDAT`
+ a base `PARAM.SFO`/icon for PS1 conversion (git-ignored, copyrighted).
- `data/loader/DATA.PSP` + `data/loader/KEYS.BIN` — bundled plain-ELF POPS
loader and NPDRM version key (from iPoPS, MIT).
- State dir (`~/.local/state/psp-preserve/` by default, or `$XDG_STATE_HOME/psp-preserve`):
- `library.sqlite` — the catalog + library database.
- `covers/` — downloaded cover cache.
@@ -189,16 +190,18 @@ PS1 discs (pending) and converted EBOOTs also show up in the **Library** tab
- **Serial detection** — reads `SYSTEM.CNF` to derive the game ID (e.g.
`SLUS-00001`) and writes it into `PARAM.SFO` + the PSAR header.
- **base.pbp** — conversion needs a PSN PS1 classic `EBOOT.PBP` (any game) to
supply Sony's encrypted `DATA.PSP` loader (POPS emulator) and `STARTDAT`.
supply the `STARTDAT` block (boot logo + PGD) and a base `PARAM.SFO`/icon.
Copy one to `data/base.PBP` and point **Settings → General → PS1 base.pbp**
at it. **Prefer a 6.60/6.61-era classic**: very old 3.xx-era classics ship a
POPS loader that fails to link on modern CFW (`80020148` "game could not be
started"). Any PS1 classic works structurally — the converter finds
`STARTDAT` at `PSAR + p1` regardless of PSAR alignment.
- **Output** — a folder `<out>/<Game ID>/` containing a single `EBOOT.PBP`
(the popstation way: raw-DEFLATE-compressed PSAR, no `KEYS.BIN`/`DOCUMENT.DAT`),
ready to copy to `<PSP>/PSP/GAME/<Game ID>/`. Compatible with CFW POPS
(ARK-4/ARK-5).
at it. Any PS1 classic works structurally — the converter finds `STARTDAT`
at `PSAR + p1` regardless of PSAR alignment.
- **POPS loader** — the `DATA.PSP` section uses a bundled plain-ELF loader
(`data/loader/DATA.PSP`, from iPoPS, MIT) so the EBOOT boots on modern CFW
without the base PBP's encrypted loader failing to link (`80020148`). The
base PBP's own loader is only used as a fallback when the bundle is missing.
- **Output** — a folder `<out>/<Game ID>/` containing `EBOOT.PBP` (raw-DEFLATE
compressed PSAR) plus a `KEYS.BIN` (NPDRM version key used to decrypt the
`STARTDAT` PGD), ready to copy to `<PSP>/PSP/GAME/<Game ID>/`. Compatible
with CFW POPS (ARK-4/ARK-5).
Configure the folders in **Settings → General** (or `PSP_PS1_ROOTS` /
`PSP_PS1_OUTPUT_DIR`). Current limits: single-disc games only (no multi-disc