From c83f5104d25ce58695a249b57f73a125ac80844e Mon Sep 17 00:00:00 2001 From: ReaperOfVeriod Date: Sun, 11 Oct 2026 20:59:19 +0200 Subject: [PATCH] Document the PCSX2 test setup PCSX2 was set up and working but existed only in this machine's filesystem and in people's heads, so every comparison looked like a one-off observation rather than something re-runnable. The setup section in docs/plan/pcsx2-verification.md now records where the emulator, the BIOS, the disc, the savestates and the PINE socket are, how a state is captured, and which command the disc integration tests need -- and AGENTS.md and README.md point at it from their orientation sections. One operational detail worth spelling out: the emulator's directory is lowercase (pcsx2), which is not what people type. --- AGENTS.md | 1 + README.md | 6 ++++++ docs/plan/pcsx2-verification.md | 27 +++++++++++++++++++++++++++ 3 files changed, 34 insertions(+) diff --git a/AGENTS.md b/AGENTS.md index 8b71d67..2390ebb 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -132,6 +132,7 @@ Read these before working in an unfamiliar area: | `docs/plan/` | One file per subsystem, written **as work proceeds** | | `docs/formats/` | Format specs, written **as formats are reversed** | | `PROVENANCE.md` | Upstream projects we build on, and their licences | +| `docs/plan/pcsx2-verification.md` | PCSX2 is set up on this machine, and how to run the comparison loop | | `vendor/reRAC/` | Pinned reference checkout (not tracked) | ## Crates diff --git a/README.md b/README.md index 6f19fe8..8aec514 100644 --- a/README.md +++ b/README.md @@ -88,6 +88,12 @@ Visual and behavioural comparison against PCSX2, replaying recorded input and comparing frames, level by level. The PS2 float model is reproduced rather than approximated — see [`AGENTS.md`](AGENTS.md#2-reproduce-the-ps2-float-model). +PCSX2 is installed and working on this machine; the comparison loop that reads +the game's own memory over its debug protocol is up, and level 0's and level +1's tfrag lighting are verified byte-exact against it. See +[`docs/plan/pcsx2-verification.md`](docs/plan/pcsx2-verification.md) for the +setup and how to run it. + ## Credits and licensing This project learns from and is built on the work of others. Licences are diff --git a/docs/plan/pcsx2-verification.md b/docs/plan/pcsx2-verification.md index 333405c..0517849 100644 --- a/docs/plan/pcsx2-verification.md +++ b/docs/plan/pcsx2-verification.md @@ -121,6 +121,33 @@ invisible. `tools/trace/tests/` and test against that; no test may read a savestate, a dump or a live emulator. +## The test setup + +PCSX2 is installed and working on this machine, so every comparison above can +be re-run rather than being a one-off observation. + +| What | Where | +|---|---| +| Emulator | `~/Desktop/pcsx2/pcsx2-v2.8.2-linux-appimage-x64-Qt.AppImage` — the directory name is **lowercase** on disk | +| Game disc | `~/Desktop/pcsx2/games/Ratchet & Clank - Going Commando.iso`; verified target `SCUS_972.68` v1.01 NTSC ([`docs/disc-identification.md`](../disc-identification.md)) | +| Emulator config | `~/.config/PCSX2/` (`sstates`, `bios`, `memcards`, `inis`, `logs`) | +| BIOS | extracted into `~/.config/PCSX2/bios/` | +| Savestates | `~/.config/PCSX2/sstates/SCUS-97268 (38996035).NN.p2s`, `NN` = slot | +| Unpacked disc | `~/Documents/gc-extracted/`, all 27 levels | +| PINE socket | `$XDG_RUNTIME_DIR/pcsx2.sock` (`/run/user/1000/pcsx2.sock`), slot 28011 | + +The emulator boots the disc with `-fastboot`; a level takes about a minute +from a cold start to reach. To capture a state manually, press F1 in-game (it +lands in the slot's `.p2s`); to capture from a script, `gc-trace +pine-savestate SLOT` asks the emulator to write one. + +The disc integration tests need the image, not the emulator: + +```sh +GC_DISC="$HOME/Desktop/pcsx2/games/Ratchet & Clank - Going Commando.iso" \ + cargo test --workspace +``` + ## Running it ```sh