dreampeppers99 wrote:
From itself... (vblank)?
Yes. Reading PPUSTATUS ($2002) acknowledges the NMI request, which turns off bit 7 of PPUSTATUS. If you read PPUSTATUS twice in a row like this:
Code:
lda PPUSTATUS
and PPUSTATUS
you'll virtually always end up with bit 7 of A (and the N flag) set to 0. There are four possibilities, three of which can happen:
- false, false: most of the time
- true, false: first read after vblank acknowledges the NMI; second reads that it has been acknowledged
- false, true: vblank started while the CPU was fetching the second instruction
- true, true: no possible way that I can think of, except an interrupt handler executing between the instructions, taking tens of thousands of cycles (longer than one frame) to execute, and not acknowledging NMI