Well, I'm back with another problem. When I add more code to my reset part of game loop (were I thought actual game logic went), I get screen garbage.
So I'll tell you how I thought the game loop was supposed to go.
- init everything
1. Wait for the begining and end of the NMI
2. Do game logic.
3. Loop to 1
Everything works great until I add more clock cycles to step 2. Then I get screen garbage.
I do the normal wait for vblank in step one. Then I have a flag tell me when the NMI routine is over.
Obviously, I'm doing something wrong and I don't understand why this is happening. I thought the kind of screen garbage I was getting only happened if the NMI was to long and I started screwing with $2006 outside of the vblank period.
So I'll tell you how I thought the game loop was supposed to go.
- init everything
1. Wait for the begining and end of the NMI
2. Do game logic.
3. Loop to 1
Everything works great until I add more clock cycles to step 2. Then I get screen garbage.
I do the normal wait for vblank in step one. Then I have a flag tell me when the NMI routine is over.
Obviously, I'm doing something wrong and I don't understand why this is happening. I thought the kind of screen garbage I was getting only happened if the NMI was to long and I started screwing with $2006 outside of the vblank period.