From 63f37f69af120177e376817313d30859522a7b8b Mon Sep 17 00:00:00 2001 From: Greg Shuflin Date: Fri, 17 Jun 2022 14:37:10 -0700 Subject: [PATCH] Use DMA --- homebrew-tutorial/main.asm | 43 ++++++++++++++++++++++++++++++-------- 1 file changed, 34 insertions(+), 9 deletions(-) diff --git a/homebrew-tutorial/main.asm b/homebrew-tutorial/main.asm index ff2af30..810504e 100644 --- a/homebrew-tutorial/main.asm +++ b/homebrew-tutorial/main.asm @@ -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 #