SC3 reference records
What SC3 on BozoEngine is compared with: runs of SC3's PS2Recomp build (main da8a761, a checkout of its own), recorded with BozoEngine's
formats, PS2XREF1 (docs/specs/harness.md, 80 bytes per game frame) and PS2XCLG1 (docs/specs/calllog.md). records/
holds hashes and counts only. The call logs hold game memory: they stay local, at ~/recomp/sc3/bozo-b1/runs/ on the
recording machine, and are identified below by SHA-256.
Recorded 2026-11-06, each from a fresh user folder with blank memory cards.
| Record | Env (scripts/) |
Frames | Route | Log records | Calls | Log bytes | Log SHA-256 |
|---|---|---|---|---|---|---|---|
boot.ref |
ref_boot.env |
3000 | No input: boot and title | 20,239,184 | 18,235,708 | 856,287,407 | 2a1b2df038a1bc00b84b973a16440ca23064345fed23f16de1f9bdc62399f365 |
menus.ref |
ref_menus.env |
7740 | route_frames.txt up to the fight's start |
60,955,107 | 52,675,792 | 2,488,938,677 | 585c7af293a684df79e8bbcc127eea383a598acc9d9c1be50e68b74deef701d5 |
fight.ref |
ref_fight.env |
11700 | The route: title, Mode Select, Single Player, Practice, Free Training, 60 s of attacks, pause | 107,871,653 | 93,940,652 | 5,121,637,383 | 8799bcb60e3ff55142747e060f080bf62ea922436fdb1d088ca0169037e5fa72 |
The ELF's XXH64 in every record is 60984b458cf23f17. route_frames.txt is main's scripts/regress.sh route with each of its
waits taken as 60 game frames.
The build
- SC3: main da8a761's
runtime/,CMakeLists.txtandrecomp/sc3.toml(plusPS2X_DETERMINISTICandSC3_CALL_NAMESinruntime/sc3_overrides.cpp, both inert without their variables). - PS2Recomp: main's pin 27ebdbc4 plus branch
sc3/harness(bc47c970, local to the recording machine so far): the fork'sharness/calllogcommits picked onto the pin, and Linux write tracking for the capture. - Generated code:
ps2_recompof that branch onsc3.tomlwithcapture_hooks = trueadded to[general]; VU code fromps2_vu_aotandvu1_lift.py(identical to main's);generated/iopas main's. - Clang 23.1.3,
RelWithDebInfoflags-O2 -DNDEBUG -g0 -msse4.2. - Packs:
sc3_textures.packandsc3_2d.packas main builds them. No mesh pack. SC3_CALL_NAMES:scripts/sc3_call_names.py. The recorder's named calls are the addresses main answers as stubs, with the names of our ownrecomp/sc3_symbols.txt(sub_<address>where the map has none).sc3.toml's names are not used.
Determinism
Main's default run is not deterministic. These settings make it so, and each one is a difference from what a player runs:
| Setting | What it replaces |
|---|---|
PS2X_DETERMINISTIC=1 |
Host clock in the frame step, EE, IOP (PS2X_IOP_WALLCLOCK) and SPU2 (PS2X_SPU2_WALLCLOCK); host dates; host pads |
PS2X_GS_SYNC=1 |
The GS worker thread, whose timing placed the GS interrupt at a different record from run to run |
PS2X_VIF1_THREAD=0 |
VIF1 and VU1 on their own thread, whose timing changed the path through the frame kick 0x10F098 |
PS2X_SC3_NO_MOVIES=1 |
One-shot movies, which SfdPlayer plays on a decoder thread and the audio device's clock |
Checked: boot and fight were each recorded twice, under load and at the same time as other runs. Both pairs are identical on
every field for every frame, and their logs differ only in the run name. menus.ref equals the first 7740 records of
fight.ref. boot and fight first differ at frame 1560, the route's first press. calllog_read.py check on boot.clg:
0 errors.
What these records do not cover:
- Pictures. With
PS2X_GS_SYNC=1the window stays blank, sodrawBatchesanddrawVerticesare 0 on every frame anddrawssays nothing about the picture. The route was checked by eye in a separate run withoutPS2X_GS_SYNC(routecheck.env), which reached Free Training and the attacks. Its record is not kept: that run is not deterministic. - Timing against a player's run. EE cycles and the order of GS handshakes are this mode's, not those of a default run.
- One-shot movies. Compare those with pictures and sound. Menu preview movies still start here (
mwPlyStartfiles 8-13); bothfightrecordings agree across them, but their decoder thread still runs on host time, so a mismatch at a preview is the first place to look. - Native audio.
PS2X_NATIVE_AUDIO=1is not used. Thesoundfield is the emulated SPU2's mix on the IOP clock. - The fork's self-checks.
calllog.mdsection 9's strict, substitution and replay checks were not run on these logs. - Other builds. The hashes assume this build: another fork commit or changed overrides in main's
runtime/can change them.
Recording
python3 scripts/sc3_call_names.py <main checkout>/recomp/sc3.toml recomp/sc3_symbols.txt <names.txt>
SC3_REF_RUNNER=<ps2EntryRunner> SC3_ELF=<SLUS_212.16> SC3_REF_PACKS=<packs> SC3_REF_OUT=<out> SC3_REF_CALL_NAMES=<names.txt> \
reference/scripts/run.sh boot 2400 ref_boot.env
Compare with BozoEngine's tools/capture/ref_compare.py and calllog_read.py <log> compare <other>.
Stills at one frame (ab/)
A fight compared with main needs one game state on both builds. route_frames.txt already fixes the stage (Lost Cathedral: the Right at 5220) and the characters (Zasalamel, Tira), and a pad script keyed on game frames puts both builds in the same fight within a frame or so; ab/route_ab.txt is that route, cut after 8640 and paused at 8700.
- Reference:
ab/reference_hold_frames.patchon the reference runner'sEeScheduler.cpp:PS2X_HOLD_FRAMES=n,n,..stands the game at those frames' ends and saves the window asheld_<n>.png(withPS2X_CAPTURE_WINDOW_DIR).routecheck.env's settings, noPS2X_GS_SYNC. - Port:
sc3 --no-sound --pad-script ab/route_ab.txt --capture-dir d --capture-frames n,n,..withSC3_HOLD_FRAMES=n,n,..andSC3_NO_MOVIES=1: the game runs faster than the window presents, the hold gives the capture that frame's picture. - Both window sizes must match (the compositor tiles: one game window at a time);
ab/cmp.py a b prefixcrops each to its 4:3 picture, resizes to 640x448 and gives the PSNR.ab/curve.pygives the tone curve between two stills. - Main's picture is older than the port's at one frame number: compare main's still at n with the port's at n - 2 (the best match is n - 1 or n - 2 by the still). Hold the port at n - 2 and capture that frame. Runs go to the hidden workspace 9: fix the window with a floating 952x1046 so both sizes match.
ab/gsdump.py x.gs: a PCSX2 GS dump as text, one line per run of equal state, with the display registers, each run's bounding box and vertex alphas. Reference analysis only (the port reads no packet): this is how the display copy and the two contexts' TEST and ZBUF were found. PCSX2 runs on a private-datapathholdingPCSX2/inis,PCSX2/bios.- Floors: two reference runs against each other.
SC3_HIDE_EE=0x172e90,0x163650hides the object glow and the sun flare on both builds (0x1f6c48, the shadows' darkening, on the port).