Mercurial > repos > blastem
annotate tmss.s68 @ 2457:9da3de58410d
Fix libretro build
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Wed, 21 Feb 2024 20:25:06 -0800 |
parents | f500831f7fb4 |
children |
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 " |
2331
f500831f7fb4
Fix missing init in fake TMSS
Michael Pavone <pavone@retrodev.com>
parents:
2038
diff
changeset
|
98 |
2035
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 |
2331
f500831f7fb4
Fix missing init in fake TMSS
Michael Pavone <pavone@retrodev.com>
parents:
2038
diff
changeset
|
121 |
f500831f7fb4
Fix missing init in fake TMSS
Michael Pavone <pavone@retrodev.com>
parents:
2038
diff
changeset
|
122 moveq.l #0, d0 |
f500831f7fb4
Fix missing init in fake TMSS
Michael Pavone <pavone@retrodev.com>
parents:
2038
diff
changeset
|
123 ;init palette |
2035
33f454232aee
Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
124 move.l #$C0000000, (a1) |
2331
f500831f7fb4
Fix missing init in fake TMSS
Michael Pavone <pavone@retrodev.com>
parents:
2038
diff
changeset
|
125 move.w d0, (a0) |
2035
33f454232aee
Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
126 move.w #$EEE, (a0) |
33f454232aee
Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
127 |
33f454232aee
Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
128 ;clear scroll table |
33f454232aee
Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
129 move.l #$40000000, (a1) |
2331
f500831f7fb4
Fix missing init in fake TMSS
Michael Pavone <pavone@retrodev.com>
parents:
2038
diff
changeset
|
130 move.l d0, (a0) |
f500831f7fb4
Fix missing init in fake TMSS
Michael Pavone <pavone@retrodev.com>
parents:
2038
diff
changeset
|
131 |
f500831f7fb4
Fix missing init in fake TMSS
Michael Pavone <pavone@retrodev.com>
parents:
2038
diff
changeset
|
132 ;clear vsram |
f500831f7fb4
Fix missing init in fake TMSS
Michael Pavone <pavone@retrodev.com>
parents:
2038
diff
changeset
|
133 move.l #$40000010, (a1) |
f500831f7fb4
Fix missing init in fake TMSS
Michael Pavone <pavone@retrodev.com>
parents:
2038
diff
changeset
|
134 move.l d0, (a0) |
f500831f7fb4
Fix missing init in fake TMSS
Michael Pavone <pavone@retrodev.com>
parents:
2038
diff
changeset
|
135 |
f500831f7fb4
Fix missing init in fake TMSS
Michael Pavone <pavone@retrodev.com>
parents:
2038
diff
changeset
|
136 ;clear SAT |
f500831f7fb4
Fix missing init in fake TMSS
Michael Pavone <pavone@retrodev.com>
parents:
2038
diff
changeset
|
137 move.l #$40000003, (a1) |
f500831f7fb4
Fix missing init in fake TMSS
Michael Pavone <pavone@retrodev.com>
parents:
2038
diff
changeset
|
138 move.l d0, (a0) |
f500831f7fb4
Fix missing init in fake TMSS
Michael Pavone <pavone@retrodev.com>
parents:
2038
diff
changeset
|
139 move.l d0, (a0) |
2035
33f454232aee
Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
140 |
33f454232aee
Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
141 ;load tiles |
33f454232aee
Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
142 move.l #$44000000, (a1) |
33f454232aee
Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
143 lea font, a2 |
33f454232aee
Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
144 move.w #((fontend-font)/4 - 1), d0 |
33f454232aee
Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
145 tloop: |
33f454232aee
Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
146 move.l (a2)+, (a0) |
33f454232aee
Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
147 dbra d0, tloop |
33f454232aee
Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
148 |
33f454232aee
Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
149 ;clear name table |
33f454232aee
Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
150 move.l #$40000002, (a1) |
33f454232aee
Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
151 moveq #32, d0 |
33f454232aee
Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
152 move.w #(64*64-1), d1 |
33f454232aee
Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
153 ploop: |
33f454232aee
Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
154 move.w d0, (a0) |
33f454232aee
Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
155 dbra d1, ploop |
33f454232aee
Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
156 move.l #$45960002, d7 |
33f454232aee
Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
157 move.l d7, (a1) |
33f454232aee
Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
158 move.l #$800000, d6 |
2331
f500831f7fb4
Fix missing init in fake TMSS
Michael Pavone <pavone@retrodev.com>
parents:
2038
diff
changeset
|
159 |
2035
33f454232aee
Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
160 lea ram_code_src(pc), a6 |
33f454232aee
Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
161 lea ram_code.w, a5 |
33f454232aee
Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
162 moveq #(font-ram_code_src)/2-1, d0 |
33f454232aee
Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
163 copy: |
33f454232aee
Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
164 move.w (a6)+, (a5)+ |
33f454232aee
Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
165 dbra d0, copy |
33f454232aee
Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
166 lea $101(a3), a4 |
33f454232aee
Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
167 lea $100.w, a5 |
33f454232aee
Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
168 move.l #'SEGA', d5 |
33f454232aee
Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
169 move.l #' SEG', d4 |
33f454232aee
Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
170 moveq #0, d0 |
33f454232aee
Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
171 moveq #1, d2 |
33f454232aee
Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
172 move.w #180, d3 |
33f454232aee
Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
173 btst #6, $A10001 |
33f454232aee
Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
174 beq .not_pal |
33f454232aee
Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
175 move.w #150, d3 |
33f454232aee
Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
176 .not_pal: |
33f454232aee
Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
177 jmp ram_code.w |
33f454232aee
Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
178 |
33f454232aee
Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
179 ram_code_src: |
33f454232aee
Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
180 move.b d2, (a4) |
33f454232aee
Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
181 cmp.l (a5), d5 |
33f454232aee
Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
182 beq.s is_good |
33f454232aee
Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
183 cmp.l (a5), d4 |
33f454232aee
Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
184 bne.s is_bad |
33f454232aee
Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
185 is_good: |
33f454232aee
Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
186 move.b d0, (a4) |
33f454232aee
Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
187 lea good(pc), a6 |
33f454232aee
Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
188 bsr.s print_string |
2331
f500831f7fb4
Fix missing init in fake TMSS
Michael Pavone <pavone@retrodev.com>
parents:
2038
diff
changeset
|
189 |
2035
33f454232aee
Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
190 add.l d6, d7 |
33f454232aee
Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
191 move.l d7, (a1) |
33f454232aee
Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
192 bsr.s print_string |
33f454232aee
Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
193 |
2331
f500831f7fb4
Fix missing init in fake TMSS
Michael Pavone <pavone@retrodev.com>
parents:
2038
diff
changeset
|
194 add.l d6, d7 |
f500831f7fb4
Fix missing init in fake TMSS
Michael Pavone <pavone@retrodev.com>
parents:
2038
diff
changeset
|
195 move.l d7, (a1) |
f500831f7fb4
Fix missing init in fake TMSS
Michael Pavone <pavone@retrodev.com>
parents:
2038
diff
changeset
|
196 bsr.s print_string |
f500831f7fb4
Fix missing init in fake TMSS
Michael Pavone <pavone@retrodev.com>
parents:
2038
diff
changeset
|
197 |
f500831f7fb4
Fix missing init in fake TMSS
Michael Pavone <pavone@retrodev.com>
parents:
2038
diff
changeset
|
198 move.w #0, frame_counter.w |
2035
33f454232aee
Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
199 move.w #$8164, (a1) |
33f454232aee
Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
200 move #$2500, SR |
33f454232aee
Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
201 wait: |
33f454232aee
Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
202 cmp.w frame_counter.w, d3 |
33f454232aee
Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
203 bne.s wait |
33f454232aee
Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
204 move #$2700, SR |
33f454232aee
Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
205 move.b d2, (a4) |
33f454232aee
Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
206 move.l $0.w, a7 |
33f454232aee
Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
207 move.l $4.w, a6 |
33f454232aee
Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
208 move.w #$8104, (a1) |
33f454232aee
Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
209 move.l d0, (a3) |
33f454232aee
Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
210 jmp (a6) |
2331
f500831f7fb4
Fix missing init in fake TMSS
Michael Pavone <pavone@retrodev.com>
parents:
2038
diff
changeset
|
211 |
2035
33f454232aee
Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
212 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
|
213 move.b d0, (a4) |
2035
33f454232aee
Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
214 lea bad(pc), a6 |
33f454232aee
Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
215 bsr.s print_string |
2331
f500831f7fb4
Fix missing init in fake TMSS
Michael Pavone <pavone@retrodev.com>
parents:
2038
diff
changeset
|
216 |
2035
33f454232aee
Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
217 add.l d6, d7 |
33f454232aee
Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
218 move.l d7, (a1) |
33f454232aee
Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
219 bsr.s print_string |
2331
f500831f7fb4
Fix missing init in fake TMSS
Michael Pavone <pavone@retrodev.com>
parents:
2038
diff
changeset
|
220 |
2035
33f454232aee
Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
221 add.l d6, d7 |
33f454232aee
Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
222 move.l d7, (a1) |
33f454232aee
Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
223 bsr.s print_string |
2331
f500831f7fb4
Fix missing init in fake TMSS
Michael Pavone <pavone@retrodev.com>
parents:
2038
diff
changeset
|
224 |
2035
33f454232aee
Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
225 move.w #$8144, (a1) |
33f454232aee
Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
226 forever: |
33f454232aee
Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
227 bra.s forever |
33f454232aee
Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
228 |
33f454232aee
Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
229 |
33f454232aee
Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
230 int_6: |
33f454232aee
Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
231 addq.w #1, frame_counter.w |
33f454232aee
Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
232 rte |
33f454232aee
Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
233 |
33f454232aee
Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
234 ;Prints a null terminated string |
33f454232aee
Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
235 ;a6 - pointer to string |
33f454232aee
Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
236 ;a0 - VDP data port |
33f454232aee
Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
237 ;d0 - base tile attribute |
33f454232aee
Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
238 ; |
33f454232aee
Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
239 ;Clobbers: d1.w |
33f454232aee
Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
240 print_string: |
33f454232aee
Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
241 .loop |
33f454232aee
Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
242 moveq #0, d1 |
33f454232aee
Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
243 move.b (a6)+, d1 |
33f454232aee
Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
244 beq .end |
33f454232aee
Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
245 add.w d0, d1 |
33f454232aee
Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
246 move.w d1, (a0) |
33f454232aee
Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
247 bra .loop |
33f454232aee
Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
248 .end |
33f454232aee
Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
249 rts |
2331
f500831f7fb4
Fix missing init in fake TMSS
Michael Pavone <pavone@retrodev.com>
parents:
2038
diff
changeset
|
250 |
2035
33f454232aee
Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
251 good: |
33f454232aee
Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
252 dc.b " BLASTEM THINKS", 0 |
33f454232aee
Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
253 dc.b " THAT THIS CART", 0 |
33f454232aee
Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
254 dc.b " TASTES DELICIOUS!", 0 |
2331
f500831f7fb4
Fix missing init in fake TMSS
Michael Pavone <pavone@retrodev.com>
parents:
2038
diff
changeset
|
255 |
2035
33f454232aee
Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
256 bad: |
33f454232aee
Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
257 dc.b " *sniff* *sniff*", 0 |
33f454232aee
Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
258 dc.b " something doesn't", 0 |
33f454232aee
Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
259 dc.b " smell right...", 0 |
33f454232aee
Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
260 |
33f454232aee
Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
261 align 1 |
33f454232aee
Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
262 font: |
33f454232aee
Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
263 incbin font.tiles |
33f454232aee
Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
264 fontend |
33f454232aee
Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
265 |
33f454232aee
Added open source TMSS replacement
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
266 romend |