rainwarrior wrote:
Another way to do it is keep track of the internal register writes with a Lua script, and have the Lua script call debugger.hitbreakpoint() when it sees the write you want.
This might be the best option. For now I only want to know when the game swaps PRG banks if at all. CHR bank swaps are usually easier to figure out since they appear on PPU Viewer.
And just to confirm: PRG swapping works as follow:
-first write a value to
$8000 that has either 6 or 7 written on the bits 0-2
-write the bank number to
$8001-7 will always swap the bank at
$A000-$BFFF-6 will swap the bank at
$8000-$9FFF if the value written to
$8000 has the 6th bit cleared. If it's set, the swap is done at
$C000-$DFFF