The tests
Phosphoneo is mostly an oracle: its tests are its raison d’être. Here is what they prove, and how to rerun them.
Four kinds of proof
| Proof | Command | What it establishes |
|---|---|---|
| Processor oracle | make test-oracle | 2,540,000 cases, 100% required |
| Reference screenshots | make test-golden | each case’s image and console keep the same fingerprint |
| Differential | make test-diff | images pixel-identical to the official emulator (shared cases) |
| Co-simulation | make test-cosim | the real ARM firmware gives the same result |
Around them, about thirty integration scripts check each option: test-break, test-symbols, test-pokes, test-savestate, test-record, test-loadat, test-gdb, test-tui, test-sdl, test-wasm… make test chains them.
The reference screenshots
Each case (tests/golden/cases/*.case) says which program to run, at which cycle to photograph, and possibly which keys to type. tools/golden.sh run replays everything and compares with the manifest’s SHA-256 fingerprints. Rule: a screenshot is never re-baselined to make a test pass, only after being looked at (golden.sh show NAME converts it to PNG).
Version lines (the firmware banner, NeoDOS version …, the reply to VER) are masked in the fingerprints: changing the firmware version does not break every case, only real changes show.
Reusing the script in another project
tools/golden.sh is written to serve any repository: you give it a folder of cases and a manifest. This is what the collective’s ports (AsteroNeo, Wolfenstein 3D) do for their own tests.