There's a bug in the Legend of Zelda where scrolling vertically when DPCM audio is playing (used for boss roars) can cause the PPU address to be wrong after the HUD split. An example of this can be seen here: https://youtu.be/T4JtnUvhaHo?t=1671. I've been trying to find the mechanism behind this, but I haven't seen any information on NESdev about DPCM interfering with PPU writes. I'd debug the issue in an emulator, but I also haven't been able to reproduce this in any emulator I've tried.
Vertical scrolling in Zelda works by waiting for a sprite 0 hit at Bank5_8521 and then doing two writes at Bank5_8560 to PPU_ADDRESS ($2006) and two reads from PPU_DATA ($2007). When the bug occurs, the screen split still happens at the correct place, but the address seems to become either $2000 or $2100, at least in the examples I've examined. I've not been able to find any bugs in the game that would result in incorrect values being written (address high in $58 and low in $E2), and I would expect such a bug to occur in emulators, as well, so I'm at a bit of a loss.
Is anyone here familiar with what might be going on?
Vertical scrolling in Zelda works by waiting for a sprite 0 hit at Bank5_8521 and then doing two writes at Bank5_8560 to PPU_ADDRESS ($2006) and two reads from PPU_DATA ($2007). When the bug occurs, the screen split still happens at the correct place, but the address seems to become either $2000 or $2100, at least in the examples I've examined. I've not been able to find any bugs in the game that would result in incorrect values being written (address high in $58 and low in $E2), and I would expect such a bug to occur in emulators, as well, so I'm at a bit of a loss.
Is anyone here familiar with what might be going on?