2002h read and NMIs

Discuss emulation of the Nintendo Entertainment System and Famicom.

Moderator: Moderators

Post Reply
User avatar
Zepper
Formerly Fx3
Posts: 3264
Joined: Fri Nov 12, 2004 4:59 pm
Location: Brazil
Contact:

2002h read and NMIs

Post by Zepper »

- We know that reading 2002h clears the VBlank flag. Well, if NMIs are enabled, "reading 2002h near the VBL time suppress the NMI". If I change this thing to "reading 2002h suppress the NMI" still passes through the (old) test ROMs. Is this correct?

- I ask because the new test ROM fails on nmi_on_timing (5 N) and I don't know why.
User avatar
hap
Posts: 355
Joined: Thu Mar 24, 2005 3:17 pm
Contact:

Post by hap »

nmi_on_timing tests NMI timing near the end of vblank by writing with bit 7 ($80) set to $2000. if 5=N, it means your edge timing is 1 PPU cycle off.
User avatar
Zepper
Formerly Fx3
Posts: 3264
Joined: Fri Nov 12, 2004 4:59 pm
Location: Brazil
Contact:

Post by Zepper »

Still stuck. By the way, what's the meaning of those numbers anyway?
User avatar
hap
Posts: 355
Joined: Thu Mar 24, 2005 3:17 pm
Contact:

Post by hap »

Code: Select all

; Correct output:
; 01 N
; 02 N
; 03 N
; 04 N
; 05 -
; 06 -
; 07 -
; 08 -
; 09 -
The numbers don't mean anything :P it's just an ordered list. Each next in the list is the result timed at 1 PPU cycle after the previous one.
User avatar
Zepper
Formerly Fx3
Posts: 3264
Joined: Fri Nov 12, 2004 4:59 pm
Location: Brazil
Contact:

Post by Zepper »

- I'm still getting an error with nmi_on_timing test, 1 cycle off. Is the NMI (always) cancelled when reading 2002h?

Code: Select all

; 01 N
; 02 N
; 03 N
; 04 N
; 05 N
; 06 -
; 07 -
; 08 -
; 09 -
raidtab
Posts: 7
Joined: Wed Oct 18, 2006 1:01 pm

Post by raidtab »

I have this exact problem, how did you fix yours?
Post Reply