According to http://wiki.nesdev.com/w/index.php/CPU_ ... _execution, it takes 7 cycles to perform the NMI. The NMI gets triggered when the PPU is on dot 1 (second dot) of scanline 241, according to http://wiki.nesdev.com/w/index.php/PPU_rendering.
Is it correct to believe that, by the time the CPU starts executing the NMI handler pointed to by FFFA/FFFB, the PPU will be dot 8 of scanline 241, OR should the PPU also stop while these 7 cycles are being performed?
Also -- How does the NMI work if it was in the middle of executing an instruction? For example, If the CPU had two cycles left until it completed its instruction that was a total of 4 cycles, when the NMI handler completes and returns back to that instruction, does it start it from the beginning (4 cycles) or where it left off (2 cycles)?
Is it correct to believe that, by the time the CPU starts executing the NMI handler pointed to by FFFA/FFFB, the PPU will be dot 8 of scanline 241, OR should the PPU also stop while these 7 cycles are being performed?
Also -- How does the NMI work if it was in the middle of executing an instruction? For example, If the CPU had two cycles left until it completed its instruction that was a total of 4 cycles, when the NMI handler completes and returns back to that instruction, does it start it from the beginning (4 cycles) or where it left off (2 cycles)?