summaryrefslogtreecommitdiff
path: root/macros.inc
blob: 78bbfad49bbc49394eade0e846ee70b101e978de (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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