Skip to content

fix: verify the POPS runtime by content, not just by presence - #64

Merged
casmith merged 1 commit into
mainfrom
fix/verify-pops-runtime
Sep 5, 2026
Merged

fix: verify the POPS runtime by content, not just by presence#64
casmith merged 1 commit into
mainfrom
fix/verify-pops-runtime

Conversation

@casmith

@casmith casmith commented Sep 5, 2026

Copy link
Copy Markdown
Owner

A drive whose POPS.ELF was a completely different file reported PS1 READY, and every PS1 title black-screened and returned to the console browser.

Nothing in the symptom pointed at the emulator. Ruled out first, in order: the VCDs (byte-identical to cue2pops output), the launchers (byte-identical copies of POPSTARTER.ELF), OPL's launch path (it opens the ELF and only launches on success), the disc grouping, and the naming — stripping a title's name to SPYRO changed nothing.

The runtime check only listed the directory:

file real on the drive
POPS.ELF 3,166,988 137,045
IOPRP252.IMG 265,233 1,306,134

23× too small and 5× too big. Not corrupt copies — different files. Both reported OK.

Change

CheckRuntime now hashes what it finds. POPS.ELF, IOPRP252.IMG, POPS.PAK and POPS_IOX.PAK each have one published release that does not vary between POPStarter revisions, so they can be checked exactly. POPSTARTER.ELF changes with every revision and is deliberately left unhashed rather than guessed at — TestCheckRuntimeDoesNotHashThePOPStarterLauncher pins that.

A file that is present but wrong is reported as wrong — not as missing, which would send someone hunting for a file that is already there, and not as OK:

PS1 support
  __.POPS         OK
  __common        OK
  POPS.ELF        WRONG FILE
  IOPRP252.IMG    WRONG FILE
  POPSTARTER.ELF  OK
  POPS.PAK        MISSING
  POPS_IOX.PAK    MISSING

Status: NOT READY
  - POPS.ELF (the POPS PlayStation emulator) is present but is not the right file. Every PS1
    title fails identically with the wrong one, and nothing else in the setup will show why.
    Replace it and re-import with `ps2hdd setup ps1 --import <dir>`; the expected SHA-256 is
    59df3389c4df88a572daa720b05507c52c34eddfa0031a6fbeec55e0c2d0fcb1.

POPS.PAK and POPS_IOX.PAK join the manifest so they are imported and reported. They are not marked required — a setup without them is not necessarily broken, and calling a working drive NOT READY would be worse than saying nothing.

Provenance of the hashes

ps2hdd carries no Sony code, only the means to tell whether yours is the real thing. The MD5s corroborate across three independent sources, and the SHA-256s come from the same published table:

file AnimMouse README POPStarter Docs PS2-HOME
POPS.ELF 355a892a… 355a892a… 355a892a…
IOPRP252.IMG 1db9c602… 1db9c602… 1db9c602…
POPS_IOX.PAK a625d0b3… a625d0b3…

POPS.PAK is single-source, which is why it is not required.

Tests

  • TestReadinessRejectsAWrongRuntimeFile — a drive with one wrong file is NOT READY, names that file, does not call it missing, and explains the consequence.
  • TestCheckRuntimeRejectsWrongContents — wrong is distinguished from missing at the check level.
  • TestCheckRuntimeDoesNotHashThePOPStarterLauncher — the one file that legitimately varies is never called wrong.
  • scripts/demo-smoke.sh previously asserted that importing placeholder files makes PS1 support READY. It now asserts the opposite, through the real CLI — that was the assertion encoding the bug.

No test can hold Sony's binaries, so the manifest is pointed at a placeholder's hash where the ready path needs exercising; that swap is a helper with the reason written down.

Full suite, go vet, gofmt and the smoke test pass.

https://claude.ai/code/session_018eBAB3V9GRxNwgpQcpGje4

A drive whose POPS.ELF was a completely different file reported
"PS1 READY", and every PS1 title black-screened and returned to the
console browser. Nothing in the symptom pointed at the emulator: the
VCDs verified byte-perfect against cue2pops, the launchers were
byte-identical copies of POPSTARTER.ELF, OPL found and executed them,
and stripping a title's name to something trivial changed nothing.

The runtime check only listed the directory. POPS.ELF was 137,045 bytes
where the real one is 3,166,988, and IOPRP252.IMG was 1,306,134 where
the real one is 265,233 -- not corrupt copies, different files -- and
"OK" was reported for both.

CheckRuntime now hashes what it finds. POPS.ELF, IOPRP252.IMG and the
two packages have one published release each that does not vary between
POPStarter revisions, so they can be checked exactly. POPSTARTER.ELF
changes with every revision and is deliberately left unhashed rather
than guessed at.

A file that is present but wrong is reported as wrong -- not as missing,
which would send someone looking for a file that is already there, and
not as OK. It reads WRONG FILE in the table, it makes the status NOT
READY, and the explanation says what it means: every PS1 title fails
identically with the wrong one, and nothing else in the setup will show
why.

POPS.PAK and POPS_IOX.PAK join the manifest so they are imported and
reported. They are not marked required, because a setup without them is
not necessarily broken and calling a working drive NOT READY would be
worse than saying nothing.

The hashes are the published ones, corroborated independently by the
POPStarter documentation site and by PS2-HOME; ps2hdd carries no Sony
code, only the means to tell whether yours is the real thing.

Claude-Session: https://claude.ai/code/session_018eBAB3V9GRxNwgpQcpGje4
@casmith
casmith merged commit bffdb3e into main Sep 5, 2026
5 checks passed
@casmith
casmith deleted the fix/verify-pops-runtime branch September 5, 2026 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant