-
Notifications
You must be signed in to change notification settings - Fork 3
/
vdma.asm
69 lines (56 loc) · 1.77 KB
/
vdma.asm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
SETUP_VDMA_FOR_TESTING_1D
setas
LDA #$01 ; Start Transfer
STA @lVDMA_CONTROL_REG
LDA #$FE
STA @lVDMA_SIZE_L
LDA #$9F
STA @lVDMA_SIZE_M
LDA #$00
STA @lVDMA_SIZE_H
LDA #$64
STA @lVDMA_DST_ADDY_L
LDA #$84
STA @lVDMA_DST_ADDY_M
LDA #$03
STA @lVDMA_DST_ADDY_H
LDA #$55
STA @lVDMA_BYTE_2_WRITE
LDA #$85 ; Start Transfer
STA @lVDMA_CONTROL_REG
LDA @lVDMA_STATUS_REG
RTS
SETUP_VDMA_FOR_TESTING_2D
setas
VDMA_WAIT_TF
; Wait for the Previous Transfer to be Finished
LDA @lVDMA_STATUS_REG
AND #VDMA_STAT_VDMA_IPS
CMP #VDMA_STAT_VDMA_IPS
BEQ VDMA_WAIT_TF
LDA #$01 ; Start Transfer
STA @lVDMA_CONTROL_REG
LDA #200
STA @lVDMA_X_SIZE_L
LDA #00
STA @lVDMA_X_SIZE_H
LDA #64
STA @lVDMA_Y_SIZE_L
LDA #00
STA @lVDMA_Y_SIZE_H
LDA #$60
STA @lVDMA_DST_ADDY_L
LDA #$90
STA @lVDMA_DST_ADDY_M
LDA #$01
STA @lVDMA_DST_ADDY_H
LDA #$80
STA @lVDMA_DST_STRIDE_L
LDA #$02
STA @lVDMA_DST_STRIDE_H
LDA #$F9
STA @lVDMA_BYTE_2_WRITE
LDA #$87 ; Start Transfer
STA @lVDMA_CONTROL_REG
LDA @lVDMA_STATUS_REG
RTS