From b21e3d2588749568c777a84435905bef110f3479 Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Solà Date: Thu, 20 Mar 2025 18:01:34 +0100 Subject: Clear VBlank on reset on all examples MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This was an oversight from the very first example that has propagated into the other ones. Signed-off-by: Miquel Sabaté Solà --- basics/sprite.s | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'basics/sprite.s') 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 -- cgit v1.2.3