forked from visrealm/hbc-56
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtms9918mctest.asm
87 lines (66 loc) · 1.19 KB
/
tms9918mctest.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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
; Troy's HBC-56 - TMS9918 Multicolor mode test
;
; Copyright (c) 2021 Troy Schrapel
;
; This code is licensed under the MIT license
;
; https://github.com/visrealm/hbc-56
;
!src "hbc56kernel.inc"
hbc56Meta:
+setHbcMetaTitle "TMS MULTICOLOR"
+setHbcMetaNES
rts
hbc56Main:
sei
jsr tmsModeMulticolor
+tmsColorFgBg TMS_WHITE, TMS_BLACK
jsr tmsSetBackground
+tmsSetAddrNameTable
+tmsSendData TMS_NAME_DATA, $300
+tmsEnableOutput
+tmsEnableInterrupts
loop:
sei
+tmsSetAddrPattTable
+tmsSendData TMS_BIRD_DATA, $800
cli
jsr medDelay
jsr medDelay
jsr medDelay
jsr medDelay
sei
+tmsSetAddrPattTable
+tmsSendData TMS_PATTERN_DATA, $800
cli
jsr medDelay
jsr medDelay
jsr medDelay
jsr medDelay
jmp loop
medDelay:
jsr delay
jsr delay
jsr delay
jsr delay
delay:
ldy #0
customDelay:
ldx #0
-
dex
bne -
ldx #0
dey
bne -
rts
TMS_NAME_DATA:
!for .y, 0, 23 {
!for .x, 0, 31 {
!byte .x + ((.y & $fc) << 3)
}
}
TMS_BIRD_DATA:
!bin "bird.bin"
TMS_PATTERN_DATA:
!bin "mcmode.bin"