HBlank isn't VBlank; the clock still ticks without an interrupt
authorAlyssa Rosenzweig <alyssa@backtick.town>
Thu, 30 Jun 2016 17:33:59 +0000 (10:33 -0700)
committerAlyssa Rosenzweig <alyssa@backtick.town>
Thu, 30 Jun 2016 17:33:59 +0000 (10:33 -0700)
src/PPU/PPU.tosh

index 0d18c04..622d23d 100644 (file)
@@ -57,17 +57,17 @@ repeat 224
                 end
                 set cycles to 0
        end
-       set PPU vblank? to 1
-       if PPU generate NMI = 1 then
-               interrupt: vector "0xFFFA"
-                repeat until cycles > 2380
-                    step CPU
-                end
-                set cycles to 0
-       end
-       change y by -1
+               change y by -1
 end
 pen up
+set PPU vblank? to 1
+if PPU generate NMI = 1 then
+        interrupt: vector "0xFFFA"
+end
+repeat until cycles > 2380
+    step CPU
+end
+set cycles to 0
 
 define initialize PPU
 pen up
This page took 0.028319 seconds and 4 git commands to generate.