How do you find bugs in your emulator?
Moderator: Moderators
- cpow
- NESICIDE developer
- Posts: 1097
- Joined: Mon Oct 13, 2008 7:55 pm
- Location: Minneapolis, MN
- Contact:
You'd have to capture only 4300 logged instructions in order to tell if you're spinning on such a loop and never getting past it in a frame.oRBIT2002 wrote:The entire log would be filled with lda $2002 if I started to save them in my log. A pretty much useless log unless i logged an entire frame (=lots of code).
29780ish cycles per frame. 4 cycles per lda $2002, 3 cycles per taken branch (assuming not page crossing). Multiplying and dividing gives me 4255 chances of that loop executing in a frame. If you see 4256 "lda/bpl" or equivalent looping combinations, you know you're stuck. The loop should exit before the end of the frame...
Here's the log of an entire frame. There's LOTS of lda $2002... So I guess the maincode is placed in the NMI...
http://dl.dropbox.com/u/2590713/ProWrestlingDump2.txt
http://dl.dropbox.com/u/2590713/ProWrestlingDump2.txt