aboutsummaryrefslogtreecommitdiff
path: root/basics/sprite.s
diff options
context:
space:
mode:
Diffstat (limited to 'basics/sprite.s')
-rw-r--r--basics/sprite.s5
1 files changed, 4 insertions, 1 deletions
diff --git a/basics/sprite.s b/basics/sprite.s
index b9e183b..27beb91 100644
--- a/basics/sprite.s
+++ b/basics/sprite.s
@@ -174,7 +174,10 @@
;; will see how we can take advantage of this when we use the PPU properly
;; down the road.
- ;; First of the two waits.
+ ;; First of the two waits. The `bit` outside of the loop is not a typo, but
+ ;; since the VBlank flag is in an unknown state after reset, we clear it now
+ ;; so the next loop does not exit immediately by mistake.
+ bit $2002 ; PPUSTATUS
@vblankwait1:
bit $2002 ; PPUSTATUS
bpl @vblankwait1