From e12c78f6ba8625a614c9bc28d4b8043166082116 Mon Sep 17 00:00:00 2001 From: Ian C Date: Wed, 12 Sep 2018 05:16:35 +0000 Subject: Added graphics files and done 4-colour tiles. --- macros.inc | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 macros.inc (limited to 'macros.inc') diff --git a/macros.inc b/macros.inc new file mode 100644 index 0000000..78bbfad --- /dev/null +++ b/macros.inc @@ -0,0 +1,24 @@ +DMA: macro mode,source,dest,len + + pha + + lda #@mode + sta DMAP0 + lda #@dest + sta BBAD0 + lda #@source & $ff + sta A1T0L + lda #{@source >> 8} & $ff + sta A1T0H + lda #{@source >> 16} & $ff + sta A1B0 + lda #@len & $ff + sta DAS0L + lda #{@len >> 8} & $ff + sta DAS0H + lda #1 + sta MDMAEN + + pla + + endm -- cgit v1.2.3