From 14b496ae1c98fb8ce6b125b369e964b3dd62a991 Mon Sep 17 00:00:00 2001 From: Greg Shuflin Date: Mon, 13 Jun 2022 18:06:18 -0700 Subject: [PATCH] Manually clear screen If I don't do this I get gibberish in most emulators (apparently not SNES9x) --- homebrew-tutorial/main.asm | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/homebrew-tutorial/main.asm b/homebrew-tutorial/main.asm index fcd4862..ddcc2ad 100644 --- a/homebrew-tutorial/main.asm +++ b/homebrew-tutorial/main.asm @@ -65,6 +65,16 @@ start: cpx #(charset_end - charset) bne @charset_loop +; Manually clear screen + ldx #(VRAM_BG1) +@loop: + stx VMADDL + stz VMDATAL + stz VMDATAH + inx + cpx #(VRAM_BG1 + 32 * 29) + bne @loop + ; write tile to position (1, 1) TILE_X = 1 TILE_Y = 1