NESDev and Strangulation Records messageboards
Forum Index | FAQ | New User | Login | Search

Previous ThreadView All ThreadsNext ThreadShow in Flat Mode*


SubjectNMI Interrupts?????  
Posted byAnonymous
Posted on3/2/03 10:40 PM
From IP213.101.56.64  



I'm writing NES emulator (it's name is 'NEZ' for now) and I don´t have very much experience in this, so please be patient. I´ve got a couple of very simple demos to work perfectly (like: mmx, jumpy, zelda titlescreen, macos...) with correct colors and all (a bit slow though). But if the demo uses NMI interrupts (like: billworld01, blocks, sprite...) it crashes, because I don't know how to implement it in my CPU...

I believe it works like this: When the PPU generates a Vertical Blanking Impulse, the program counter jumps to the adresse 0xFFFA, and continues from there. I guess the code uses a RTI or RTS or something to get back to where it was before.

Now how am I supposed to implement that? Should I let the CPU make a NMI interrupt right after I've updated the screen? Only once? What does Non-Msakable Interrept mean? How many cycles should I add to the counter? Does the NMI clear D7 in $2002? Does NMI trigger after every screen refresh (60 times per second)? Am I supposed to push the program counter onto the stack? The questions goes on forever... It feels and sounds like a simple thing, but I just can't make it work. I have only found little information about this. I would appreciate if someone tells me or give me a link to an accurate document...

// Zansibal



-
Entire Thread
Subject  Posted byPosted On
.NMI Interrupts?????  Anonymous3/2/03 10:40 PM
.*Re: NMI Interrupts?????  Jsr3/2/03 11:08 PM
..*Re: NMI Interrupts?????  Anonymous3/3/03 8:23 PM
...*Re: NMI Interrupts?????  Jsr3/3/03 10:02 PM
....*Re: NMI Interrupts?????  zansibal3/4/03 6:57 PM
...*Re: NMI Interrupts?????  Anonymous3/3/03 8:27 PM
..*Re: NMI Interrupts?????  Anonymous3/3/03 07:30 AM
Jump to

Memblers' homepage             Contact Me

Forums powered by WWWThreads Demo