-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathChaseHQ.ref
338 lines (292 loc) · 9.46 KB
/
ChaseHQ.ref
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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
;
; SkoolKit ref file for Chase H.Q. by Ocean.
;
[Config]
HtmlWriterClass=:ChaseHQ.ChaseHQHtmlWriter
GameDir=ChaseHQ
[Paths]
CodeFiles={address:04X}.html
[Game]
Game=Chase H.Q.
Release=The incomplete Chase H.Q. disassembly 20240307
Copyright=© 1988 Taito Corporation © 1989 Ocean Software Ltd. (Chase H.Q.) © 2023-2024 David Thomas (this disassembly)
[PageHeaders]
GameIndex=The incomplete<>disassembly
[Links]
CommonGraphics=[Common] (graphics common to all stages)
Map=[Road map] (the road map)
Stage1Graphics=[Stage 1] (graphics specific to stage 1)
Stage1Map=[Stage 1] (map data for stage 1)
[Titles]
CommonGraphics=Common Graphics
MapFormat=Map Data Format
Stage1Graphics=Stage 1 Graphics
Stage1Map=Stage 1 Map
[Index]
Game
MemoryMaps
Graphics
DataTables
Reference
[Index:Game:Game]
MapFormat
Stage1Map
[Index:Graphics:Graphics]
Stage1Graphics
CommonGraphics
[Page:MapFormat]
PageContent=#INCLUDE(PageContent:MapFormatX)
[PageContent:MapFormatX]
<p>Each stage's map is composed of six separate variable-length streams of data. They are:
<ul>
<li>Curvature</li>
<li>Height</li>
<li>Lanes</li>
<li>Right side objects</li>
<li>Left side objects</li>
<li>Hazards</li>
</ul>
<p><b>Curvature</b> controls the left-right turn of the road. It is stored as a sequence of bytes of the form $CT where $C is a count (1..15) and $T is a type. The valid types are:
<ul>
<li>0: Straight</li>
<li>1: Right</li>
<li>2: Right Hard</li>
<li>3: Right Very Hard</li>
<li>8: Straight (alternate)</li>
<li>9: Left</li>
<li>10: Left Hard</li>
<li>11: Left Very Hard</li>
<li>Other values are unused by the game.</li>
</ul>
<p>A zero byte in the stream is an escape which can be followed by one of:
<ul>
<li>0: Jump. The next two bytes are the address of the next byte in the stream.</li>
<li>1: Fork End. Used during road forks.</li>
<li>2: Split. Used to follow road forks. The next two bytes are the address of the left fork's data, and the next two bytes are the address of the right fork's data.</li>
<li>Other values are invalid.
</ul>
<p>This escape format is the same for all the other streams.
<p><b>Height</b> controls the up-down inclination of the road. It uses the same encoding as curvature but the type field instead defines the road's inclination. Its valid values are:
<ul>
<li>1: Going Up 7 (steep incline)</li>
<li>3: Going Up 5</li>
<li>5: Going Up 3</li>
<li>7: Going Up 1 (gentle incline)</li>
<li>8: Level Road</li>
<li>9: Going Down 1 (gentle)</li>
<li>11: Going Down 3</li>
<li>13: Going Down 5</li>
<li>15: Going Down 7 (steep)</li>
<li>Other values are unused by the game.</li>
</ul>
<p><b>Lanes</b> use a different scheme: pairs of bytes. The first byte is a count and the following byte is the data. The currently understood valid data values are:
<ul>
<li><code>$00: [ |||| ] </code>4 Lanes</li>
<li><code>$01: [ ||__ ] </code>2 Lanes, Left Aligned</li>
<li><code>$02: [ _||_ ] </code>2 Lanes, Centre Aligned</li>
<li><code>$03: [ __|| ] </code>2 Lanes, Right Aligned</li>
<li><code>$06: [ /||_ ] </code>3 Lanes to 2 Narrowing, Left Aligned</li>
<li><code>$0F: [ _/|| ] </code>3 Lanes to 2 Narrowing, Right Aligned</li>
<li><code>$1F: [ _\|| ] </code>2 Lanes to 3 Widening, Left Aligned</li>
<li><code>$2D: [ \||_ ] </code>2 Lanes to 3 Widening, Right Aligned</li>
<li><code>$45: [ ____ ] </code>Tunnel start</li>
<li><code>$59: [ ____ ] </code>Tunnel cont/end?</li>
<li><code>$81: [ |||_ ] </code>3 Lanes, Left Aligned</li>
<li><code>$82: [ _||| ] </code>3 Lanes, Right Aligned</li>
<li><code>$8E: [ /||| ] </code>4 Lanes to 3 Narrowing, Right Aligned</li>
<li><code>$9E: [ \||| ] </code>3 Lanes to 4 Widening, Right Aligned</li>
<li><code>$AD: [ |||/ ] </code>3 Lanes to 4 Widening, Left Aligned</li>
<li><code>$BD: [ |||\ ] </code>4 Lanes to 3 Narrowing, Left Aligned</li>
<li><code>$C1: [ |||| ] </code>4 Lanes, Dirt track </li>
<li><code>$C2: [ _||| ] </code>3 Lanes, Dirt track, Right Aligned</li>
<li><code>$C3: [ __|| ] </code>2 Lanes, Dirt track, Right Aligned</li>
</ul>
<p><b>Right and Left side objects</b> are encoded in nibbles as for curvature data.
The object types (for Stage 1) are:
<ul>
<li>0: Nothing
<li>1: Tunnel Light
<li>3: Short Pole
<li>4: Tree
<li>5: Bush
<li>6: Street Lamp
<li>7: Telegraph Pole
<li>8: Turn Sign, Pointing Left
<li>9: Turn Sign, Pointing Right
</ul>
<p><b>Hazards</b> are encoded only as byte counters and an extended form of the escapes with the following additional codes:
<ul>
<li>3: (TBD) Stop Spawning Barriers</li>
<li>6: (TBD) Stop Spawning Barriers</li>
<li>7: Start Spawning Barriers Left</li>
<li>8: Start Spawning Barriers Right</li>
<li>9: Start Spawning Two Barriers</li>
<li>10: Set Floating Arrow Off</li>
<li>11: Set Floating Arrow to Left</li>
<li>12: Set Floating Arrow to Right</li>
<li>13: Enable Car Spawning</li>
<li>14: Disable Car Spawning</li>
</ul>
[Page:Stage1Map]
PageContent=#INCLUDE(PageContent:Stage1Map) #INCLUDE(PageContent:EscapeMap)
[PageContent:Stage1Map]
<h3>Stage 1 Map</h3>
<ul>
<li>Curvature</li>
<li>Height</li>
<li>Lanes</li>
<li>Hazards</li>
<li>Left-side Objects</li>
<li>Right-side Objects</li>
</ul>
<h4>Stage 1, curvature</h4>
#CALL:map_curvature($5EC4)
<h4>Stage 1, height</h4>
#CALL:map_height($5EE4)
<h4>Stage 1, lanes</h4>
#CALL:map_lanes($5F0F)
<h4>Stage 1, hazards</h4>
#CALL:map_hazards($5F1D)
<h4>Stage 1, left objects</h4>
#CALL:map_left_objects($5F2A)
<h4>Stage 1, right objects</h4>
#CALL:map_right_objects($5F78)
[PageContent:EscapeMap]
<h3>Escape Scene Map</h3>
<h4>Escape Scene stretch, curvature</h4>
#CALL:map_curvature($E2AA)
<h4>Escape Scene stretch, height</h4>
#CALL:map_height($E2AF)
<h4>Escape Scene stretch, lanes</h4>
#CALL:map_lanes($E2B4)
<h4>Escape Scene stretch, hazards</h4>
#CALL:map_hazards($E2A4)
<h4>Escape Scene stretch, left objects</h4>
#CALL:map_left_objects($E2C0)
<h4>Escape Scene stretch, right objects</h4>
#CALL:map_right_objects($E2C0)
[Page:Stage1Graphics]
PageContent=#INCLUDE(PageContent:Stage1Graphics)
[Page:CommonGraphics]
PageContent=#INCLUDE(PageContent:CommonGraphics)
[PageContent:Stage1Graphics]
#CALL:graphic($5C00,80,24,0,1)
#CALL:face($638A)
#CALL:graphic($64BC,48,30,0,1)
#CALL:graphic($6570,40,22,0,1)
#CALL:graphic($65DE,24,15,0,1)
#CALL:graphic($660B,48,39,0,1)
#CALL:graphic($66F5,40,29,0,1)
#CALL:graphic($6786,24,20,0,1)
#CALL:graphic($67C2,48,31,0,1)
#CALL:graphic($687C,40,22,0,1)
#CALL:graphic($68EA,24,16,0,1)
#CALL:graphic($691A,24,8,1,1)
#CALL:graphic($694A,24,8,1,1)
#CALL:graphic($697A,16,12,1,1)
#CALL:graphic($69AA,16,12,1,1)
#CALL:graphic($69DA,24,9,1,1)
#CALL:graphic($6A10,24,9,1,1)
#CALL:graphic($6A9A,16,5,1,1)
#CALL:graphic($6AAE,16,4,1,1)
#CALL:graphic($6ABE,16,4,1,1)
#CALL:graphic($6ACE,16,3,1,1)
#CALL:graphic($6ADA,16,3,1,1)
#CALL:graphic($6AE6,8,2,1,1)
#CALL:graphic($6AEA,8,2,1,1)
#CALL:graphic($6AEE,8,1,1,1)
#CALL:graphic($6AF0,8,1,1,1)
#CALL:graphic($6AF2,8,1,1,1)
#CALL:graphic($6AF4,8,1,1,1)
#CALL:graphic($6B68,32,40,0,1)
#CALL:graphic($6C08,24,30,0,1)
#CALL:graphic($6C62,16,20,0,1)
#CALL:graphic($6C8A,16,16,1,1)
#CALL:graphic($6CCA,16,13,1,1)
#CALL:graphic($6CFE,16,13,1,1)
#CALL:graphic($6D32,16,10,1,1)
#CALL:graphic($6D5A,16,10,1,1)
#CALL:graphic($6DAC,16,16,0,1)
#CALL:graphic($6DCC,16,11,0,1)
#CALL:graphic($6DE2,8,9,0,1)
#CALL:graphic($6DEB,8,7,0,1)
#CALL:graphic($6E1C,32,17,0,1)
#CALL:graphic($6E60,24,13,0,1)
#CALL:graphic($6E87,16,9,0,1)
#CALL:graphic($6E99,16,7,1,1)
#CALL:graphic($6EB5,16,7,1,1)
#CALL:graphic($6F5D,32,8,0,1)
#CALL:graphic($6F7D,24,5,0,1)
#CALL:graphic($6F8C,24,4,0,1)
#CALL:graphic($6F98,24,4,0,1)
#CALL:graphic($6FA4,16,4,1,1)
#CALL:graphic($6FB4,16,4,1,1)
#CALL:graphic($6FC4,16,3,1,1)
#CALL:graphic($6FD0,16,3,1,1)
#CALL:graphic($703F,24,13,0,1)
#CALL:graphic($7066,24,10,0,1)
#CALL:graphic($7084,24,7,0,1)
#CALL:graphic($7099,24,7,0,1)
#CALL:graphic($70AE,16,5,1,1)
#CALL:graphic($70C2,16,5,1,1)
#CALL:graphic($70D6,16,4,1,1)
#CALL:graphic($70E6,16,4,1,1)
#CALL:graphic($722D,64,16,0,1)
#CALL:graphic($72AD,64,5,0,1)
#CALL:graphic($72D5,16,8,0,1)
#CALL:graphic($72E5,64,5,0,1)
#CALL:graphic($730D,48,12,0,1)
#CALL:graphic($7355,48,4,0,1)
#CALL:graphic($736D,48,4,0,1)
#CALL:graphic($7385,32,8,0,1)
#CALL:graphic($73A5,32,3,0,1)
#CALL:graphic($73B1,16,2,0,1)
#CALL:graphic($73B9,24,7,0,1)
#CALL:graphic($73CE,24,2,0,1)
#CALL:graphic($73D4,8,4,0,1)
#CALL:graphic($73D8,24,2,0,1)
#CALL:graphic($73DE,64,13,1,1)
#CALL:graphic($74AE,48,10,1,1)
#CALL:graphic($7526,32,5,1,1)
#CALL:graphic($754E,24,4,1,1)
#CALL:graphic($7566,24,3,1,1)
#CALL:graphic($7578,24,3,1,1)
#CALL:graphic($758A,16,6,1,1)
#CALL:graphic($75A2,16,4,1,1)
#CALL:graphic($75B2,24,5,1,1)
#CALL:graphic($75D0,24,2,1,1)
#CALL:graphic($75DC,24,3,1,1)
#CALL:graphic($75EE,24,1,1,1)
#CALL:graphic($75F4,24,5,1,1)
#CALL:graphic($7612,24,2,1,1)
#CALL:graphic($761E,24,3,1,1)
#CALL:graphic($7630,24,1,1,1)
[PageContent:CommonGraphics]
#CALL:anim($76F0,16,14,1,1,3)
#CALL:graphic($7A0F,16,13,1,1)
#CALL:graphic($7A43,16,11,1,1)
#CALL:graphic($7A6F,16,9,1,1)
#CALL:graphic($7A93,8,7,1,1)
#CALL:graphic($7AA1,8,5,1,1)
#CALL:graphic($7AAB,8,3,1,1)
#CALL:graphic($7AB1,32,16,0,1)
#CALL:graphic($7AF1,32,16,0,1)
#CALL:graphic($7B31,24,8,1,1)
#CALL:graphic($7B61,24,8,1,1)
#CALL:graphic($7B91,16,5,1,1)
#CALL:graphic($7BA5,16,5,1,1)
#CALL:graphic($7BB9,16,6,1,1)
#CALL:graphic($7BD1,16,6,1,1)
#CALL:face($7BE9)
#CALL:face($7C9D)
#CALL:face($7D51)
#CALL:graphic($A27A,8,41*7,0,0)
#CALL:graphic($D03F,24,21,1,1)
#CALL:graphic($D0BD,24,7,1,1)
#CALL:graphic($D0E7,8,7,1,1)
#CALL:graphic($D0F5,24,14,1,1)
#CALL:graphic($D149,24,20,1,1)
#CALL:graphic($D1D1,16,9,1,1)
#CALL:graphic($D1F5,8,12,1,1)
#CALL:anim($D20D,32,16,1,1,4)
#CALL:graphic($DFF8,8,31*6,0,0)