Talk:Init code
From NESdev Wiki
Jump to navigationJump to search
Prophylactic read of $2002
Is this bit of code necessary? I'm having trouble finding any original NES game that does it. Are there any known examples of a startup problem caused by this?
; Clear the vblank flag, so we know that we are waiting for the ; start of a vertical blank and not powering on with the ; vblank flag spuriously set bit $2002
If it isn't a problem, does anyone have an explanation as to why it isn't? If it is, can anyone point to an example of the problem? (Maybe I'll write a test if I have time later...) - Rainwarrior (talk) 12:09, 28 May 2015 (MDT)
- Yes, it's necessary, and a problem, see PPU power up state. There's a thread on the forum of at least one homebrew that failed to boot sometimes because it would fall through the first wait and not wait long enough before it started trying to write to PPU registers. —Lidnariq (talk) 12:49, 28 May 2015 (MDT)