From 8f947ae232360817dbe274cdc5aef57a7b2db88f Mon Sep 17 00:00:00 2001 From: Greg Shuflin Date: Wed, 15 Jun 2022 11:14:37 -0700 Subject: [PATCH] Draw another tile --- homebrew-tutorial/charset.asm | 21 +++++++++++++++++++++ homebrew-tutorial/main.asm | 9 +++++++++ 2 files changed, 30 insertions(+) diff --git a/homebrew-tutorial/charset.asm b/homebrew-tutorial/charset.asm index 42f49f8..c60aa7b 100644 --- a/homebrew-tutorial/charset.asm +++ b/homebrew-tutorial/charset.asm @@ -35,4 +35,25 @@ charset: .byte %11111111 ; row 7, color 0 .byte %00000000 ; row 7, color 1 + ; tile 0x02 + .byte %00000000 + .byte %11111111 + .byte %00000000 + .byte %11111111 + .byte %00000000 + .byte %11111111 + .byte %00000000 + .byte %11111111 + + .byte %00000000 + .byte %11111111 + .byte %00000000 + .byte %11111111 + .byte %00000000 + .byte %11111111 + .byte %00000000 + .byte %11111111 + + + charset_end: diff --git a/homebrew-tutorial/main.asm b/homebrew-tutorial/main.asm index 257d3ee..6e78625 100644 --- a/homebrew-tutorial/main.asm +++ b/homebrew-tutorial/main.asm @@ -85,6 +85,15 @@ start: sta VMDATAL stz VMDATAH + ; write tile 2 to position (4, 8) + TILE_X2= 4 + TILE_Y2= 8 + ldx #(VRAM_BG1 + (TILE_Y2* 32) + TILE_X2) + stx VMADDL + lda #$02 + sta VMDATAL + stz VMDATAH + ; Show bg1 lda #%00000001 sta TM