Port registry + per-call shadow in core/port (from the prototype) #5
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Move
others/proto/shadowintocore/port/using the LakeSnes instruction hook (no copied frame loop): registry (version, address, name, mode off/shadow/on, bridge, don't-care set, counters), clone, run C on the clone, run the original to its return, compare CPU/WRAM (minus dead stack below S)/VRAM/CGRAM/OAM/PPU regs/APU ports, skip interrupted calls, bridge fallback to the interpreter for unsupported entry states.First port: battle
Rand($C2:4B5A), validated on US and JP. Prototype result: 13/13 on US, deliberately wrong N/Z caught (9/13).Done in PR #12 (
955f4c0), merged.core/port/port.c: registry + deferred shadow on the LakeSnes instruction hook (no copied frame loop), mode on, bridge fallback.battle/Randvalidated: shadow 13/13 US, 16/16 JP overtests/inputs/newgame_first_battle.txt(9500 frames), 0 fallback.ctestrelease: 5/5 (unit, determinism US/JP, ports US/JP).Not done here, tracked separately: cheaper clone than a full savestate per call (fine at this call rate), IRQ inside a shadowed call is not detected yet (only frame boundaries), liveness analysis for don't-care declarations.