You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 318c070
Browse filesBrowse the repository at this point in the historyBrowse files
mk3: gate PAR-NMI BIOS window with in_par_nmi latch
v0.6.1-beta2 expanded the PAR-NMI BIOS window to the full handler
range $AE12-$B3F6 but left it open for all of Cheats Active mode.
That range sits inside the game's own LoROM $8000-$FFFF space in
every bank, so the BIOS shadowed 1509 bytes of game ROM during
normal execution -- the game froze right after the Nintendo logo.
Gate the window on a new in_par_nmi latch in mk3_nmi_hook:
SET on the NMI vector low-byte read ($00:FFEA) when armed
CLEAR on the read of $00:6180 -- the handler's final jmp ($6180)
at $B09D, which the disassembly confirms is the only access
to $6180 in the whole handler (and DP $80 is never used, so
no aliasing to $6180 via the $6100 direct page).
The BIOS is now swapped in only for the ~1 ms the handler actually
runs each frame; the rest of the time the game ROM is fully visible.
This keeps the full handler (incl. the LED 2 / trainer-count code at
$B043 and $B35F) mapped so the trainer works, without breaking game
boot. Control C is no longer used as a gate (it would close at $B08B,
before the handler's exit tail finishes).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
0 commit comments