I'm having trouble getting my (very rough) PPU implementation to pass some of blargg's PPU tests. I'm certain my implementation is to blame, but I'm not sure how to track down the problem.
When I run 01-vbl_basics.nes, it does some stuff for awhile and then gets stuck in an infinite loop:
Presumably this loop is polling for v-blank somehow, but: I can't figure out how it could ever exit -- if the accumulator is $00, how could BPL ever do anything but loop back, regardless of the v-blank state...
I've tried to look into the source, but my understanding of 6502 assembly is rudimentary at best. Anyone have any ideas where I might be screwing things up?
When I run 01-vbl_basics.nes, it does some stuff for awhile and then gets stuck in an infinite loop:
Code:
E868 2C 02 20 BIT $2002 = 00 A:00 X:00 Y:00 P:26 SP:FB
^^
alternates between 00 and 80 depending on vblank
E86B 10 FB BPL $E868 A:00 X:00 Y:00 P:26 SP:FB
^^
alternates between 00 and 80 depending on vblank
E86B 10 FB BPL $E868 A:00 X:00 Y:00 P:26 SP:FB
Presumably this loop is polling for v-blank somehow, but: I can't figure out how it could ever exit -- if the accumulator is $00, how could BPL ever do anything but loop back, regardless of the v-blank state...
I've tried to look into the source, but my understanding of 6502 assembly is rudimentary at best. Anyone have any ideas where I might be screwing things up?