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 sta VMAIN
ldx #VRAM_CHARS ldx #VRAM_CHARS
stx VMADDL stx VMADDL
@charset_loop:
lda charset,x ; Set DMA source flags
sta VMDATAL lda #%00000001
inx sta DMAP0
lda charset,x
sta VMDATAH ; DMA destination VMDATAL register
inx lda #<VMDATAL
cpx #(charset_end - charset) sta BBAD0
bne @charset_loop
; 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 ; Manually clear screen
ldx #(VRAM_BG1) ldx #(VRAM_BG1)