annotate tmss.s68 @ 2231:8e6fb2c06024

Fix CDC transfer regression
author Michael Pavone <pavone@retrodev.com>
date Thu, 08 Sep 2022 18:56:34 -0700
parents 5b51f03b2227
children f500831f7fb4
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2035
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1 dc.l $0, start
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2 dc.l empty_handler
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3 dc.l empty_handler
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4 ;$10
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5 dc.l empty_handler
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6 dc.l empty_handler
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7 dc.l empty_handler
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8 dc.l empty_handler
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9 ;$20
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10 dc.l empty_handler
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11 dc.l empty_handler
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12 dc.l empty_handler
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13 dc.l empty_handler
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14 ;$30
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15 dc.l empty_handler
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16 dc.l empty_handler
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17 dc.l empty_handler
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18 dc.l empty_handler
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19 ;$40
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20 dc.l empty_handler
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21 dc.l empty_handler
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22 dc.l empty_handler
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23 dc.l empty_handler
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24 ;$50
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25 dc.l empty_handler
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26 dc.l empty_handler
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27 dc.l empty_handler
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28 dc.l empty_handler
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29 ;$60
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30 dc.l empty_handler
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31 dc.l empty_handler
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32 dc.l empty_handler
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33 dc.l empty_handler
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
34 ;$70
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
35 dc.l empty_handler
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
36 dc.l empty_handler
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
37 dc.l int_6
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
38 dc.l empty_handler
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
39 ;$80
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
40 dc.l empty_handler
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
41 dc.l empty_handler
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
42 dc.l empty_handler
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
43 dc.l empty_handler
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
44 ;$90
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
45 dc.l empty_handler
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
46 dc.l empty_handler
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
47 dc.l empty_handler
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
48 dc.l empty_handler
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
49 ;$A0
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
50 dc.l empty_handler
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
51 dc.l empty_handler
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
52 dc.l empty_handler
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
53 dc.l empty_handler
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
54 ;$B0
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
55 dc.l empty_handler
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
56 dc.l empty_handler
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
57 dc.l empty_handler
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
58 dc.l empty_handler
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
59 ;$C0
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
60 dc.l empty_handler
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
61 dc.l empty_handler
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
62 dc.l empty_handler
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
63 dc.l empty_handler
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
64 ;$D0
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
65 dc.l empty_handler
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
66 dc.l empty_handler
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
67 dc.l empty_handler
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
68 dc.l empty_handler
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
69 ;$E0
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
70 dc.l empty_handler
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
71 dc.l empty_handler
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
72 dc.l empty_handler
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
73 dc.l empty_handler
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
74 ;$F0
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
75 dc.l empty_handler
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
76 dc.l empty_handler
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
77 dc.l empty_handler
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
78 dc.l empty_handler
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
79 dc.b "SEGA IS COOL "
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
80 dc.b "(C)M.Pavone 2021"
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
81 dc.b "TRAIN MEMES STAN"
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
82 dc.b "D SILENTLY "
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
83 dc.b " "
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
84 dc.b "TRIUMPHANT MAMMA"
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
85 dc.b "LS SALUTE SOCIAL"
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
86 dc.b "ITES "
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
87 dc.b "MP 20210227-01",0,0
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
88 dc.b "J "
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
89 dc.l $0
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
90 dc.l romend-1
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
91 dc.l $FF0000
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
92 dc.l $FFFFFF
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
93 dc.b " "
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
94 dc.b " "
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
95 dc.b " "
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
96 dc.b " "
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
97 dc.b "JUE "
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
98
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
99 frame_counter equ $FFFF8000
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
100 ram_code equ $FFFF8002
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
101
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
102 empty_handler:
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
103 rte
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
104 start:
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
105 lea $A14000, a3
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
106 move.l #'SEGA', (a3)
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
107 lea $C00000, a0
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
108 lea $C00004, a1
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
109 move.w #$8104, (a1) ;Mode 5, everything turned off
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
110 move.w #$8004, (a1)
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
111 move.w #$8220, (a1) ;Scroll a table $8000
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
112 move.w #$8404, (a1) ;Scroll b table $8000
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
113 move.w #$8560, (a1) ;SAT table $C000
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
114 move.w #$8700, (a1) ;backdrop color 0
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
115 move.w #$8A01, (a1) ;Set HINT counter
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
116 move.w #$8B00, (a1) ;full screen scroll
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
117 move.w #$8C81, (a1) ;40 cell mode, no interlace
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
118 move.w #$8D00, (a1) ;hscroll table at 0
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
119 move.w #$8F02, (a1) ;autoinc 2
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
120 move.w #$9011, (a1) ;64x64 scroll size
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
121 move.l #$C0000000, (a1)
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
122 move.w #$000, (a0)
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
123 move.w #$EEE, (a0)
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
124
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
125 ;clear scroll table
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
126 move.l #$40000000, (a1)
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
127 move.l #0, (a0)
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
128
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
129 ;load tiles
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
130 move.l #$44000000, (a1)
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
131 lea font, a2
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
132 move.w #((fontend-font)/4 - 1), d0
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
133 tloop:
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
134 move.l (a2)+, (a0)
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
135 dbra d0, tloop
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
136
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
137 ;clear name table
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
138 move.l #$40000002, (a1)
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
139 moveq #32, d0
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
140 move.w #(64*64-1), d1
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
141 ploop:
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
142 move.w d0, (a0)
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
143 dbra d1, ploop
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
144 move.l #$45960002, d7
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
145 move.l d7, (a1)
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
146 move.l #$800000, d6
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
147
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
148 lea ram_code_src(pc), a6
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
149 lea ram_code.w, a5
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
150 moveq #(font-ram_code_src)/2-1, d0
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
151 copy:
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
152 move.w (a6)+, (a5)+
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
153 dbra d0, copy
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
154 lea $101(a3), a4
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
155 lea $100.w, a5
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
156 move.l #'SEGA', d5
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
157 move.l #' SEG', d4
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
158 moveq #0, d0
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
159 moveq #1, d2
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
160 move.w #180, d3
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
161 btst #6, $A10001
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
162 beq .not_pal
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
163 move.w #150, d3
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
164 .not_pal:
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
165 jmp ram_code.w
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
166
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
167 ram_code_src:
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
168 move.b d2, (a4)
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
169 cmp.l (a5), d5
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
170 beq.s is_good
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
171 cmp.l (a5), d4
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
172 bne.s is_bad
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
173 is_good:
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
174 move.b d0, (a4)
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
175 lea good(pc), a6
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
176 bsr.s print_string
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
177
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
178 add.l d6, d7
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
179 move.l d7, (a1)
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
180 bsr.s print_string
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
181
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
182 add.l d6, d7
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
183 move.l d7, (a1)
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
184 bsr.s print_string
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
185
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
186 move.w #$8164, (a1)
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
187 move #$2500, SR
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
188 wait:
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
189 cmp.w frame_counter.w, d3
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
190 bne.s wait
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
191 move #$2700, SR
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
192 move.b d2, (a4)
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
193 move.l $0.w, a7
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
194 move.l $4.w, a6
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
195 move.w #$8104, (a1)
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
196 move.l d0, (a3)
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
197 jmp (a6)
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
198
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
199 is_bad:
2038
5b51f03b2227 Don't init IO ports in TMSS ROM as it trips up the standard Sega init code
Michael Pavone <pavone@retrodev.com>
parents: 2035
diff changeset
200 move.b d0, (a4)
2035
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
201 lea bad(pc), a6
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
202 bsr.s print_string
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
203
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
204 add.l d6, d7
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
205 move.l d7, (a1)
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
206 bsr.s print_string
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
207
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
208 add.l d6, d7
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
209 move.l d7, (a1)
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
210 bsr.s print_string
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
211
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
212 move.w #$8144, (a1)
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
213 forever:
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
214 bra.s forever
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
215
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
216
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
217 int_6:
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
218 addq.w #1, frame_counter.w
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
219 rte
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
220
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
221 ;Prints a null terminated string
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
222 ;a6 - pointer to string
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
223 ;a0 - VDP data port
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
224 ;d0 - base tile attribute
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
225 ;
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
226 ;Clobbers: d1.w
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
227 print_string:
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
228 .loop
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
229 moveq #0, d1
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
230 move.b (a6)+, d1
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
231 beq .end
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
232 add.w d0, d1
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
233 move.w d1, (a0)
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
234 bra .loop
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
235 .end
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
236 rts
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
237
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
238 good:
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
239 dc.b " BLASTEM THINKS", 0
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
240 dc.b " THAT THIS CART", 0
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
241 dc.b " TASTES DELICIOUS!", 0
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
242
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
243 bad:
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
244 dc.b " *sniff* *sniff*", 0
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
245 dc.b " something doesn't", 0
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
246 dc.b " smell right...", 0
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
247
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
248 align 1
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
249 font:
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
250 incbin font.tiles
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
251 fontend
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
252
33f454232aee Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
253 romend