-
Notifications
You must be signed in to change notification settings - Fork 28
/
Copy pathtms9918txttest.asm
107 lines (87 loc) · 2.08 KB
/
tms9918txttest.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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
; Troy's HBC-56 - TMS9918 Text mode test
;
; Copyright (c) 2021 Troy Schrapel
;
; This code is licensed under the MIT license
;
; https://github.com/visrealm/hbc-56
;
!src "hbc56kernel.inc"
XPOS = $44
YPOS = $45
hbc56Meta:
+setHbcMetaTitle "TMS9918 TXT MODE"
rts
hbc56Main:
sei
+tmsUpdateFont TMS_TEXT_MODE_FONT
jsr tmsModeText
+tmsColorFgBg TMS_BLACK, TMS_CYAN
+tmsSetAddrNameTable
+tmsSendData TEXT, 40*24
+tmsEnableOutput
+tmsDisableInterrupts
lda #16
sta YPOS
cli
loop:
lda YPOS
clc
adc #16
adc #0
sta YPOS
ldx #7
jsr tmsSetRegister
jsr medDelay
jmp loop
medDelay:
jsr delay
jsr delay
jsr delay
jsr delay
delay:
ldx #255
ldy #255
-
dex
bne -
ldx #255
dey
bne -
rts
customDelay:
ldx #255
-
dex
bne -
ldx #255
dey
bne -
rts
TEXT:
!text "----- TROY'S HBC-56 TEXT MODE TEST -----"
!text " "
!text " "
!text " "
!text " **** "
!text " **** "
!text " ******.** "
!text " *******_///_*** "
!text " **** /_//_/ *** "
!text " * ** (__/ *** "
!text " ********* "
!text " **** "
!text " *** "
!text " "
!text " "
!text " "
!text " TEXAS INSTRUMENTS TMS9918A "
!text " "
!text " vrEmuTms9918 Emulator "
!text " "
!text " "
!text " "
!text " "
!text "https://github.com/visrealm/vrEmuTms9918"
TMS_TEXT_MODE_FONT:
!src "gfx/fonts/tms9918font2subset.asm"