Port registry, per-call shadow, first port battle/Rand #12
Loading…
Reference in a new issue
No description provided.
Delete branch "registry"
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?
Closes the first item of the Phase 1 milestone: the porting scaffold inside the core.
Content
core/port: registry (name, address per version, bridge, don't-care set), modes off/shadow/on, deferred per-call shadow on the LakeSnes instruction hook: copy the machine, run the C on the copy, compare when the original returns (CPU registers and flags, WRAM minus dead stack below S, VRAM, CGRAM, OAM). Calls crossing a frame boundary are skipped; bridges refuse unsupported entry states (fallback to the interpreter).battle/Rand(core/game/battle/battle_random.c), game terms only; RNG table throughcore/res(by id, not address), index through acore/stateaccessor.ff6_debug.h: ports, memories, PC, S.ff6cli --port <name|all>=<off|shadow|on>.rom.ports.*(labelslow): three cores in lockstep overtests/inputs/newgame_first_battle.txt.docs/validation.md.Validation
battle/Rand: US 13/13, JP 16/16 (9500 frames), 0 fallback; ctest release 5/5.$7E:131E) diverges at frame 8792 and audio from frame 8784: a port does not spend the original's cycles, and FF6 state depending on the CPU/SPC700 handshake timing takes another path. Shadow is therefore the exact criterion; on-mode divergence is reported, not required.Fixes #5. Refs #11.
🤖 Generated with Claude Code