.WaitForVBlank LDA PPU_STATUS ; Wait for the next VBlank to pass BPL WaitForVBlank RTS ; Return from the subroutineName: WaitForVBlank [Show more] Type: Subroutine Category: Utility routines Summary: Wait for the next VBlank to passContext: See this subroutine in context in the source code References: This subroutine is called as follows: * MakeSoundsAtVBlank calls WaitForVBlank
[X]
Configuration variable PPU_STATUS = $2002
The PPU status register, which can be checked to see whether VBlank has started, and whether sprite 0 has been hit (so we can detect when the icon bar is being drawn)
[X]
Subroutine WaitForVBlank (category: Utility routines)
Wait for the next VBlank to pass