This commit is contained in:
Greg Shuflin 2022-06-17 14:37:10 -07:00
parent 1c6fdd3468
commit 63f37f69af

View File

@ -60,15 +60,40 @@ start:
sta VMAIN
ldx #VRAM_CHARS
stx VMADDL
@charset_loop:
lda charset,x
sta VMDATAL
inx
lda charset,x
sta VMDATAH
inx
cpx #(charset_end - charset)
bne @charset_loop
; Set DMA source flags
lda #%00000001
sta DMAP0
; DMA destination VMDATAL register
lda #<VMDATAL
sta BBAD0
; Set starting address to charset
ldx #.loword(charset)
stx A1T0L
lda #^charset
sta A1B0
; Write to charset_end bytes
ldx #(charset_end - charset)
stx DAS0L
; actually kick off the DMA
lda #1
sta MDMAEN
; @charset_loop:
; lda charset,x
; sta VMDATAL
; inx
; lda charset,x
; sta VMDATAH
; inx
; cpx #(charset_end - charset)
; bne @charset_loop
; Manually clear screen
ldx #(VRAM_BG1)