Files
psxrecomp/tools
Alex Vanderveen 85bb9304db scale_within_frame: check the fade scale is constant across one frame
packet_writers named the guilty code. Six PCs write the additive quads'
colour words, all running the same idiom:

    lbu ,64() ; mult , ; mflo  ; sra ,,7 ; sb ...

$s6 is the fade level, one value per frame, so every vertex in a frame
must see the same $s6 and the 64 quads should carry a handful of
colours. psx-runtime carries ~153 where DuckStation carries 3. A $s6
that changes WITHIN a frame explains that exactly: same source colours,
same arithmetic, a different scale per vertex.

Unlike every other comparison here this needs no oracle and no phase
lock -- 'constant within a frame' is checkable against one emulator on
its own, which is why it is worth a tool of its own after so many runs
lost to synchronising two.

$s6 is callee-saved and stays live across the swc2/NCLIP at
0x800684C4..0x800684D8, which is where a recompiled routine could lose it.

Ruled out first, by reading the implementations: mult computes eagerly
into cpu->lo and mflo reads it (no deferred-evaluation hazard), sb and
lw both handle scratchpad byte-exactly, and the lwl/lwr/swl/swr tables
are correct for little-endian R3000A.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-24 12:55:58 -04:00
..
2026-08-12 16:49:03 -04:00
2026-08-14 02:41:50 -04:00
2026-08-21 21:38:56 -04:00
2026-07-29 03:18:10 -04:00
2026-07-29 03:18:10 -04:00
2026-08-19 23:35:17 -04:00
2026-08-19 23:35:17 -04:00
2026-07-29 03:18:10 -04:00
2026-08-19 22:50:13 -04:00
2026-07-29 03:18:10 -04:00
2026-08-14 02:41:50 -04:00