1 // FB Alpha Williams Games driver module
2 // Based on MAME driver by Aaron Giles
3
4 // Works:
5 // Defender
6 // Stargate
7 // Joust
8 // Robotron 2084
9 // Bubbles
10 // Colony 7
11 // Mayday
12 // Jin
13 // Splat
14 // Alien Area - no sound (there is none)
15 // Sinistar
16 // Playball!
17 // Blaster
18 // Speed Ball
19 // Lottofun
20
21 // Not added yet:
22 // mysticm, mysticmp
23 // tshoot
24 // inferno
25 // joust2, joust2r1
26
27 #include "tiles_generic.h"
28 #include "m6809_intf.h"
29 #include "m6800_intf.h"
30 #include "dac.h"
31 #include "hc55516.h"
32 #include "watchdog.h"
33 #include "6821pia.h"
34
35 static UINT8 *AllMem;
36 static UINT8 *MemEnd;
37 static UINT8 *AllRam;
38 static UINT8 *RamEnd;
39 static UINT8 *DrvM6809ROM0;
40 static UINT8 *DrvM6800ROM0;
41 static UINT8 *DrvM6800ROM1;
42 static UINT8 *DrvGfxROM;
43 static UINT8 *DrvColPROM;
44 static UINT8 *DrvNVRAM;
45 static UINT8 *DrvM6809RAM0;
46 static UINT8 *DrvM6800RAM0;
47 static UINT8 *DrvM6800RAM1;
48 static UINT8 *DrvVidRAM;
49 static UINT8 *DrvPalRAM;
50
51 static UINT8 *DrvBlitRAM; // 8 bytes
52 static UINT8 *blitter_remap; // 256*256
53
54 static UINT32 *Palette;
55 static UINT32 *DrvPalette;
56 static UINT8 DrvRecalc;
57
58 static INT32 nExtraCycles[3];
59
60 static UINT8 blitter_xor = 0;
61 static INT32 blitter_window_enable = 0;
62 static INT32 blitter_clip_address = ~0;
63 static INT32 blitter_remap_index = 0;
64
65 static UINT8 blaster_video_control = 0;
66 static INT32 blaster_color0 = 0;
67
68 static UINT8 cocktail = 0;
69 static UINT8 bankselect = 0;
70 static UINT8 vram_select = 0;
71 static UINT8 port_select = 0;
72 static UINT8 rom_bank = 0;
73
74 static INT32 screen_x_adjust;
75 static INT32 scanline;
76
77 static UINT8 DrvJoy1[8];
78 static UINT8 DrvJoy2[8];
79 static UINT8 DrvJoy3[8];
80 static UINT8 DrvJoy4[8];
81 static UINT8 DrvJoy5[8];
82 static UINT8 DrvJoy6[8];
83 static UINT8 DrvJoy7[8];
84 static UINT8 DrvInputs[7];
85 static UINT8 DrvDips[3] = { 0, 0, 0 };
86 static UINT8 DrvReset;
87 static INT16 DrvAnalogPort0 = 0;
88 static INT16 DrvAnalogPort1 = 0;
89 static INT16 DrvAnalogPort2 = 0;
90 static INT16 DrvAnalogPort3 = 0;
91
92 static INT32 TrackX[2] = { 0, 0 };
93 static INT32 TrackY[2] = { 0, 0 };
94
95 static ButtonToggle MemoryProtect; // lottofun
96
97 static INT32 defender_control_hack = 0;
98 static INT32 defender = 0;
99 static INT32 mayday = 0;
100 static INT32 splat = 0;
101 static INT32 blaster = 0;
102 static INT32 playball = 0;
103 static INT32 spdball = 0;
104 static INT32 lottofun = 0;
105
106 static INT32 uses_hc55516 = 0;
107 static INT32 uses_colprom = 0;
108
109 // raster update helpers
110 static INT32 lastline;
111 static void (*pStartDraw)() = NULL;
112 static void (*pDrawScanline)() = NULL;
113
114 static struct BurnInputInfo DefenderInputList[] = {
115 {"P1 Coin", BIT_DIGITAL, DrvJoy3 + 4, "p1 coin" },
116 {"P1 Start", BIT_DIGITAL, DrvJoy1 + 5, "p1 start" },
117 {"P1 Up", BIT_DIGITAL, DrvJoy2 + 0, "p1 up" },
118 {"P1 Down", BIT_DIGITAL, DrvJoy1 + 7, "p1 down" },
119 {"P1 Left", BIT_DIGITAL, DrvJoy7 + 6, "p1 left" },
120 {"P1 Right", BIT_DIGITAL, DrvJoy7 + 1, "p1 right" },
121 {"Fire", BIT_DIGITAL, DrvJoy1 + 0, "p1 fire 1" },
122 {"Smart Bomb", BIT_DIGITAL, DrvJoy1 + 2, "p1 fire 2" },
123 {"Hyperspace", BIT_DIGITAL, DrvJoy1 + 3, "p1 fire 3" },
124 {"Thrust", BIT_DIGITAL, DrvJoy1 + 1, "p1 fire 4" },
125 {"Reverse", BIT_DIGITAL, DrvJoy1 + 6, "p1 fire 5" },
126
127 {"P2 Coin", BIT_DIGITAL, DrvJoy3 + 2, "p2 coin" },
128 {"P2 Start", BIT_DIGITAL, DrvJoy1 + 4, "p2 start" },
129
130 {"Reset", BIT_DIGITAL, &DrvReset, "reset" },
131 {"Auto Up / Manual Down", BIT_DIGITAL, DrvJoy3 + 0, "service" },
132 {"Advance", BIT_DIGITAL, DrvJoy3 + 1, "diag" },
133 {"High Score Reset", BIT_DIGITAL, DrvJoy3 + 3, "service3" },
134 {"Tilt", BIT_DIGITAL, DrvJoy3 + 6, "tilt" },
135 };
136
137 STDINPUTINFO(Defender)
138
139 static struct BurnInputInfo MaydayInputList[] = {
140 {"P1 Coin", BIT_DIGITAL, DrvJoy3 + 4, "p1 coin" },
141 {"P1 Start", BIT_DIGITAL, DrvJoy1 + 5, "p1 start" },
142 {"P1 Up", BIT_DIGITAL, DrvJoy2 + 0, "p1 up" },
143 {"P1 Down", BIT_DIGITAL, DrvJoy1 + 7, "p1 down" },
144 {"P1 Right", BIT_DIGITAL, DrvJoy1 + 1, "p1 right" },
145 {"Fire", BIT_DIGITAL, DrvJoy1 + 0, "p1 fire 1" },
146 {"Mayday", BIT_DIGITAL, DrvJoy1 + 2, "p1 fire 2" },
147 {"Back Fire", BIT_DIGITAL, DrvJoy1 + 3, "p1 fire 3" },
148
149 {"P2 Coin", BIT_DIGITAL, DrvJoy3 + 5, "p2 coin" },
150 {"P2 Start", BIT_DIGITAL, DrvJoy1 + 4, "p2 start" },
151
152 {"Reset", BIT_DIGITAL, &DrvReset, "reset" },
153 {"Test Credit", BIT_DIGITAL, DrvJoy3 + 2, "service" },
154 {"Advance", BIT_DIGITAL, DrvJoy3 + 1, "diag" },
155 {"Auto Up / Manual Down", BIT_DIGITAL, DrvJoy3 + 0, "service3" },
156 };
157
158 STDINPUTINFO(Mayday)
159
160 static struct BurnInputInfo Colony7InputList[] = {
161 {"P1 Coin", BIT_DIGITAL, DrvJoy3 + 4, "p1 coin" },
162 {"P1 Start", BIT_DIGITAL, DrvJoy1 + 5, "p1 start" },
163 {"P1 Up", BIT_DIGITAL, DrvJoy1 + 3, "p1 up" },
164 {"P1 Down", BIT_DIGITAL, DrvJoy1 + 0, "p1 down" },
165 {"P1 Left", BIT_DIGITAL, DrvJoy1 + 2, "p1 left" },
166 {"P1 Right", BIT_DIGITAL, DrvJoy1 + 1, "p1 right" },
167 {"P1 Button 1", BIT_DIGITAL, DrvJoy1 + 6, "p1 fire 1" },
168 {"P1 Button 2", BIT_DIGITAL, DrvJoy1 + 7, "p1 fire 2" },
169 {"P1 Button 3", BIT_DIGITAL, DrvJoy2 + 0, "p1 fire 3" },
170
171 {"P2 Start", BIT_DIGITAL, DrvJoy1 + 4, "p2 start" },
172
173 {"Reset", BIT_DIGITAL, &DrvReset, "reset" },
174 {"Tilt", BIT_DIGITAL, DrvJoy3 + 5, "tilt" },
175 {"Dip A", BIT_DIPSWITCH, DrvDips + 0, "dip" }, // b
176 {"Dip B", BIT_DIPSWITCH, DrvDips + 1, "dip" },
177 {"Dip C", BIT_DIPSWITCH, DrvDips + 2, "dip" },
178 };
179
180 STDINPUTINFO(Colony7)
181
182 static struct BurnInputInfo JinInputList[] = {
183 {"P1 Coin", BIT_DIGITAL, DrvJoy3 + 2, "p1 coin" },
184 {"P1 Start", BIT_DIGITAL, DrvJoy1 + 5, "p1 start" },
185 {"P1 Up", BIT_DIGITAL, DrvJoy1 + 0, "p1 up" },
186 {"P1 Down", BIT_DIGITAL, DrvJoy1 + 1, "p1 down" },
187 {"P1 Left", BIT_DIGITAL, DrvJoy1 + 2, "p1 left" },
188 {"P1 Right", BIT_DIGITAL, DrvJoy1 + 3, "p1 right" },
189 {"P1 Button 1", BIT_DIGITAL, DrvJoy1 + 6, "p1 fire 1" },
190 {"P1 Button 2", BIT_DIGITAL, DrvJoy1 + 7, "p1 fire 2" },
191
192 {"P2 Coin", BIT_DIGITAL, DrvJoy3 + 4, "p2 coin" },
193 {"P2 Start", BIT_DIGITAL, DrvJoy1 + 4, "p2 start" },
194
195 {"Reset", BIT_DIGITAL, &DrvReset, "reset" },
196 {"Dip A", BIT_DIPSWITCH, DrvDips + 0, "dip" }, // 9
197 {"Dip B", BIT_DIPSWITCH, DrvDips + 1, "dip" },
198 {"Dip C", BIT_DIPSWITCH, DrvDips + 2, "dip" },
199 };
200
201 STDINPUTINFO(Jin)
202
203 static struct BurnInputInfo StargateInputList[] = {
204 {"P1 Coin", BIT_DIGITAL, DrvJoy3 + 4, "p1 coin" },
205 {"P1 Start", BIT_DIGITAL, DrvJoy1 + 5, "p1 start" },
206 {"P1 Up", BIT_DIGITAL, DrvJoy2 + 0, "p1 up" },
207 {"P1 Down", BIT_DIGITAL, DrvJoy1 + 7, "p1 down" },
208 {"P1 Left", BIT_DIGITAL, DrvJoy7 + 6, "p1 left" },
209 {"P1 Right", BIT_DIGITAL, DrvJoy7 + 1, "p1 right" },
210 {"Fire", BIT_DIGITAL, DrvJoy1 + 0, "p1 fire 1" },
211 {"Smart Bomb", BIT_DIGITAL, DrvJoy1 + 2, "p1 fire 2" },
212 {"Inviso", BIT_DIGITAL, DrvJoy2 + 1, "p1 fire 3" },
213 {"Hyperspace", BIT_DIGITAL, DrvJoy1 + 3, "p1 fire 4" },
214 {"Thrust", BIT_DIGITAL, DrvJoy1 + 1, "p1 fire 5" },
215 {"Reverse", BIT_DIGITAL, DrvJoy1 + 6, "p1 fire 6" },
216
217 {"P2 Coin", BIT_DIGITAL, DrvJoy3 + 2, "p2 coin" },
218 {"P2 Start", BIT_DIGITAL, DrvJoy1 + 4, "p2 start" },
219
220 {"Reset", BIT_DIGITAL, &DrvReset, "reset" },
221 {"Auto Up / Manual Down", BIT_DIGITAL, DrvJoy3 + 0, "service" },
222 {"Advance", BIT_DIGITAL, DrvJoy3 + 1, "diag" },
223 {"High Score reset", BIT_DIGITAL, DrvJoy3 + 3, "diag" },
224 {"Tilt", BIT_DIGITAL, DrvJoy3 + 6, "tilt" },
225 };
226
227 STDINPUTINFO(Stargate)
228
229 static struct BurnInputInfo RobotronInputList[] = {
230 {"P1 Coin", BIT_DIGITAL, DrvJoy3 + 4, "p1 coin" },
231 {"P1 Start", BIT_DIGITAL, DrvJoy1 + 4, "p1 start" },
232 {"Move Up", BIT_DIGITAL, DrvJoy1 + 0, "p1 up" },
233 {"Move Down", BIT_DIGITAL, DrvJoy1 + 1, "p1 down" },
234 {"Move Left", BIT_DIGITAL, DrvJoy1 + 2, "p1 left" },
235 {"Move Right", BIT_DIGITAL, DrvJoy1 + 3, "p1 right" },
236 {"Fire Up", BIT_DIGITAL, DrvJoy1 + 6, "p2 up" },
237 {"Fire Down", BIT_DIGITAL, DrvJoy1 + 7, "p2 down" },
238 {"Fire Left", BIT_DIGITAL, DrvJoy2 + 0, "p2 left" },
239 {"Fire Right", BIT_DIGITAL, DrvJoy2 + 1, "p2 right" },
240
241 {"P2 Coin", BIT_DIGITAL, DrvJoy3 + 2, "p2 coin" },
242 {"P2 Start", BIT_DIGITAL, DrvJoy1 + 5, "p2 start" },
243
244 {"Reset", BIT_DIGITAL, &DrvReset, "reset" },
245 {"Auto Up / Manual Down", BIT_DIGITAL, DrvJoy3 + 0, "service" },
246 {"Advance", BIT_DIGITAL, DrvJoy3 + 1, "diag" },
247 {"High Score Reset", BIT_DIGITAL, DrvJoy3 + 3, "service3" },
248 {"Tilt", BIT_DIGITAL, DrvJoy3 + 6, "tilt" },
249 };
250
251 STDINPUTINFO(Robotron)
252
253 static struct BurnInputInfo BubblesInputList[] = {
254 {"P1 Coin", BIT_DIGITAL, DrvJoy3 + 4, "p1 coin" },
255 {"P1 Start", BIT_DIGITAL, DrvJoy1 + 5, "p1 start" },
256 {"Up", BIT_DIGITAL, DrvJoy1 + 0, "p1 up" },
257 {"Down", BIT_DIGITAL, DrvJoy1 + 1, "p1 down" },
258 {"Left", BIT_DIGITAL, DrvJoy1 + 2, "p1 left" },
259 {"Right", BIT_DIGITAL, DrvJoy1 + 3, "p1 right" },
260
261 {"P2 Coin", BIT_DIGITAL, DrvJoy3 + 2, "p2 coin" },
262 {"P2 Start", BIT_DIGITAL, DrvJoy1 + 4, "p2 start" },
263
264 {"Reset", BIT_DIGITAL, &DrvReset, "reset" },
265 {"Auto Up / Manual Down", BIT_DIGITAL, DrvJoy3 + 0, "service" },
266 {"Advance", BIT_DIGITAL, DrvJoy3 + 1, "diag" },
267 {"High Score Reset", BIT_DIGITAL, DrvJoy3 + 3, "service3" },
268 {"Tilt", BIT_DIGITAL, DrvJoy3 + 6, "tilt" },
269 };
270
271 STDINPUTINFO(Bubbles)
272
273 static struct BurnInputInfo PlayballInputList[] = {
274 {"P1 Coin", BIT_DIGITAL, DrvJoy3 + 4, "p1 coin" },
275 {"P1 Start", BIT_DIGITAL, DrvJoy1 + 0, "p1 start" },
276 {"P1 Left", BIT_DIGITAL, DrvJoy1 + 1, "p1 left" },
277 {"P1 Right", BIT_DIGITAL, DrvJoy1 + 2, "p1 right" },
278
279 {"P2 Coin", BIT_DIGITAL, DrvJoy3 + 2, "p2 coin" },
280 {"P2 Start", BIT_DIGITAL, DrvJoy1 + 4, "p2 start" },
281
282 {"Reset", BIT_DIGITAL, &DrvReset, "reset" },
283 {"Auto Up / Manual Down", BIT_DIGITAL, DrvJoy3 + 0, "service" },
284 {"Advance", BIT_DIGITAL, DrvJoy3 + 1, "diag" },
285 {"High Score Reset", BIT_DIGITAL, DrvJoy3 + 3, "service3" },
286 {"Tilt", BIT_DIGITAL, DrvJoy3 + 6, "tilt" },
287 };
288
289 STDINPUTINFO(Playball)
290
291 static struct BurnInputInfo SplatInputList[] = {
292 {"P1 Coin", BIT_DIGITAL, DrvJoy3 + 4, "p1 coin" },
293 {"P1 Start", BIT_DIGITAL, DrvJoy1 + 4, "p1 start" },
294
295 {"P1 Left Stick Up", BIT_DIGITAL, DrvJoy5 + 0, "p1 up" },
296 {"P1 Left Stick Down", BIT_DIGITAL, DrvJoy5 + 1, "p1 down" },
297 {"P1 Left Stick Left", BIT_DIGITAL, DrvJoy5 + 2, "p1 left" },
298 {"P1 Left Stick Right", BIT_DIGITAL, DrvJoy5 + 3, "p1 right" },
299 {"P1 Right Stick Up", BIT_DIGITAL, DrvJoy5 + 6, "p3 up" },
300 {"P1 Right Stick Down", BIT_DIGITAL, DrvJoy5 + 7, "p3 down" },
301 {"P1 Right Stick Left", BIT_DIGITAL, DrvJoy7 + 0, "p3 left" },
302 {"P1 Right Stick Right", BIT_DIGITAL, DrvJoy7 + 1, "p3 right" },
303
304 {"P2 Coin", BIT_DIGITAL, DrvJoy3 + 2, "p2 coin" },
305 {"P2 Start", BIT_DIGITAL, DrvJoy1 + 5, "p2 start" },
306 {"P2 Left Stick Up", BIT_DIGITAL, DrvJoy4 + 0, "p2 up" },
307 {"P2 Left Stick Down", BIT_DIGITAL, DrvJoy4 + 1, "p2 down" },
308 {"P2 Left Stick Left", BIT_DIGITAL, DrvJoy4 + 2, "p2 left" },
309 {"P2 Left Stick Right", BIT_DIGITAL, DrvJoy4 + 3, "p2 right" },
310 {"P2 Right Stick Up", BIT_DIGITAL, DrvJoy4 + 6, "p4 up" },
311 {"P2 Right Stick Down", BIT_DIGITAL, DrvJoy4 + 7, "p4 down" },
312 {"P2 Right Stick Left", BIT_DIGITAL, DrvJoy6 + 0, "p4 left" },
313 {"P2 Right Stick Right", BIT_DIGITAL, DrvJoy6 + 1, "p4 right" },
314
315 {"Reset", BIT_DIGITAL, &DrvReset, "reset" },
316 {"Auto Up / Manual Down", BIT_DIGITAL, DrvJoy3 + 0, "service" },
317 {"Advance", BIT_DIGITAL, DrvJoy3 + 1, "diag" },
318 {"High Score Reset", BIT_DIGITAL, DrvJoy3 + 3, "service3" },
319 {"Tilt", BIT_DIGITAL, DrvJoy3 + 6, "tilt" },
320 };
321
322 STDINPUTINFO(Splat)
323
324 static struct BurnInputInfo JoustInputList[] = {
325 {"P1 Coin", BIT_DIGITAL, DrvJoy3 + 4, "p1 coin" },
326 {"P1 Start", BIT_DIGITAL, DrvJoy1 + 5, "p1 start" },
327 {"P1 Left", BIT_DIGITAL, DrvJoy5 + 0, "p1 left" },
328 {"P1 Right", BIT_DIGITAL, DrvJoy5 + 1, "p1 right" },
329 {"P1 Button 1", BIT_DIGITAL, DrvJoy5 + 2, "p1 fire 1" },
330
331 {"P2 Coin", BIT_DIGITAL, DrvJoy3 + 2, "p2 coin" },
332 {"P2 Start", BIT_DIGITAL, DrvJoy1 + 4, "p2 start" },
333 {"P2 Left", BIT_DIGITAL, DrvJoy4 + 0, "p2 left" },
334 {"P2 Right", BIT_DIGITAL, DrvJoy4 + 1, "p2 right" },
335 {"P2 Button 1", BIT_DIGITAL, DrvJoy4 + 2, "p2 fire 1" },
336
337 {"Reset", BIT_DIGITAL, &DrvReset, "reset" },
338 {"Auto Up / Manual Down", BIT_DIGITAL, DrvJoy3 + 0, "service" },
339 {"Advance", BIT_DIGITAL, DrvJoy3 + 1, "diag" },
340 {"High Score Reset", BIT_DIGITAL, DrvJoy3 + 3, "service3" },
341 {"Tilt", BIT_DIGITAL, DrvJoy3 + 6, "tilt" },
342 };
343
344 STDINPUTINFO(Joust)
345
346 #define A(a, b, c, d) {a, b, (UINT8*)(c), d}
347 static struct BurnInputInfo SpdballInputList[] = {
348 {"P1 Coin", BIT_DIGITAL, DrvJoy3 + 4, "p1 coin" },
349 {"P1 Start", BIT_DIGITAL, DrvJoy5 + 6, "p1 start" },
350 {"P1 Up", BIT_DIGITAL, DrvJoy4 + 0, "p1 up" },
351 {"P1 Down", BIT_DIGITAL, DrvJoy4 + 1, "p1 down" },
352 {"P1 Left", BIT_DIGITAL, DrvJoy5 + 0, "p1 left" },
353 {"P1 Right", BIT_DIGITAL, DrvJoy5 + 1, "p1 right" },
354 {"P1 Button 1", BIT_DIGITAL, DrvJoy4 + 4, "p1 fire 1" },
355
356 A("P1 Stick X", BIT_ANALOG_REL, &DrvAnalogPort0,"p1 x-axis"),
357 A("P1 Stick Y", BIT_ANALOG_REL, &DrvAnalogPort1,"p1 y-axis"),
358
359 {"P2 Coin", BIT_DIGITAL, DrvJoy3 + 2, "p2 coin" },
360 {"P2 Start", BIT_DIGITAL, DrvJoy5 + 7, "p2 start" },
361 {"P2 Up", BIT_DIGITAL, DrvJoy4 + 2, "p2 up" },
362 {"P2 Down", BIT_DIGITAL, DrvJoy4 + 3, "p2 down" },
363 {"P2 Left", BIT_DIGITAL, DrvJoy5 + 2, "p2 left" },
364 {"P2 Right", BIT_DIGITAL, DrvJoy5 + 3, "p2 right" },
365 {"P2 Button 1", BIT_DIGITAL, DrvJoy4 + 6, "p2 fire 1" },
366
367 A("P2 Stick X", BIT_ANALOG_REL, &DrvAnalogPort2,"p2 x-axis"),
368 A("P2 Stick Y", BIT_ANALOG_REL, &DrvAnalogPort3,"p2 y-axis"),
369
370 {"Reset", BIT_DIGITAL, &DrvReset, "reset" },
371 {"Auto Up / Manual Down", BIT_DIGITAL, DrvJoy3 + 0, "service" },
372 {"Advance", BIT_DIGITAL, DrvJoy3 + 1, "diag" },
373 {"High Score Reset", BIT_DIGITAL, DrvJoy3 + 3, "service3" },
374 {"Tilt", BIT_DIGITAL, DrvJoy3 + 6, "tilt" },
375 };
376 #undef A
377 STDINPUTINFO(Spdball)
378
379 static struct BurnInputInfo AlienarInputList[] = {
380 {"P1 Coin", BIT_DIGITAL, DrvJoy3 + 4, "p1 coin" },
381 {"P1 Start", BIT_DIGITAL, DrvJoy1 + 4, "p1 start" },
382 {"P1 Up", BIT_DIGITAL, DrvJoy5 + 0, "p1 up" },
383 {"P1 Down", BIT_DIGITAL, DrvJoy5 + 1, "p1 down" },
384 {"P1 Left", BIT_DIGITAL, DrvJoy5 + 2, "p1 left" },
385 {"P1 Right", BIT_DIGITAL, DrvJoy5 + 3, "p1 right" },
386 {"P1 Button 1", BIT_DIGITAL, DrvJoy5 + 6, "p1 fire 1" },
387 {"P1 Button 2", BIT_DIGITAL, DrvJoy5 + 7, "p1 fire 2" },
388
389 {"P2 Coin", BIT_DIGITAL, DrvJoy3 + 5, "p2 coin" },
390 {"P2 Start", BIT_DIGITAL, DrvJoy1 + 5, "p2 start" },
391 {"P2 Up", BIT_DIGITAL, DrvJoy4 + 0, "p2 up" },
392 {"P2 Down", BIT_DIGITAL, DrvJoy4 + 1, "p2 down" },
393 {"P2 Left", BIT_DIGITAL, DrvJoy4 + 2, "p2 left" },
394 {"P2 Right", BIT_DIGITAL, DrvJoy4 + 3, "p2 right" },
395 {"P2 Button 1", BIT_DIGITAL, DrvJoy4 + 6, "p2 fire 1" },
396 {"P2 Button 2", BIT_DIGITAL, DrvJoy4 + 7, "p2 fire 2" },
397
398 {"Reset", BIT_DIGITAL, &DrvReset, "reset" },
399 {"Auto Up / Manual Down", BIT_DIGITAL, DrvJoy3 + 0, "service" },
400 {"Advance", BIT_DIGITAL, DrvJoy3 + 1, "diag" },
401 {"High Score Reset", BIT_DIGITAL, DrvJoy3 + 3, "service3" },
402 {"Tilt", BIT_DIGITAL, DrvJoy3 + 6, "tilt" },
403 };
404
405 STDINPUTINFO(Alienar)
406
407 #define A(a, b, c, d) {a, b, (UINT8*)(c), d}
408 static struct BurnInputInfo SinistarInputList[] = {
409 {"P1 Coin", BIT_DIGITAL, DrvJoy3 + 4, "p1 coin" },
410 {"P1 Start", BIT_DIGITAL, DrvJoy2 + 4, "p1 start" },
411 {"P1 Button 1", BIT_DIGITAL, DrvJoy2 + 0, "p1 fire 1" },
412 {"P1 Button 2", BIT_DIGITAL, DrvJoy2 + 1, "p1 fire 2" },
413
414 A("P1 Stick X", BIT_ANALOG_REL, &DrvAnalogPort0,"p1 x-axis"),
415 A("P1 Stick Y", BIT_ANALOG_REL, &DrvAnalogPort1,"p1 y-axis"),
416
417 {"P2 Coin", BIT_DIGITAL, DrvJoy3 + 2, "p2 coin" },
418 {"P2 Start", BIT_DIGITAL, DrvJoy2 + 5, "p2 start" },
419
420 {"Reset", BIT_DIGITAL, &DrvReset, "reset" },
421 {"Auto Up / Manual Down", BIT_DIGITAL, DrvJoy3 + 0, "service" },
422 {"Advance", BIT_DIGITAL, DrvJoy3 + 1, "diag" },
423 {"High Score Reset", BIT_DIGITAL, DrvJoy3 + 3, "service3" },
424 {"Tilt", BIT_DIGITAL, DrvJoy3 + 6, "tilt" },
425 };
426 #undef A
427
428 STDINPUTINFO(Sinistar)
429
430 #define A(a, b, c, d) {a, b, (UINT8*)(c), d}
431 static struct BurnInputInfo BlasterInputList[] = {
432 {"P1 Coin", BIT_DIGITAL, DrvJoy3 + 4, "p1 coin" },
433 {"P1 Start", BIT_DIGITAL, DrvJoy2 + 4, "p1 start" },
434 {"P1 Button 1", BIT_DIGITAL, DrvJoy2 + 1, "p1 fire 1" },
435 {"P1 Button 2", BIT_DIGITAL, DrvJoy2 + 0, "p1 fire 2" },
436 {"P1 Button 3", BIT_DIGITAL, DrvJoy2 + 2, "p1 fire 3" },
437
438 A("P1 Stick X", BIT_ANALOG_REL, &DrvAnalogPort0,"p1 x-axis"),
439 A("P1 Stick Y", BIT_ANALOG_REL, &DrvAnalogPort1,"p1 y-axis"),
440
441 {"P2 Coin", BIT_DIGITAL, DrvJoy3 + 2, "p2 coin" },
442 {"P2 Start", BIT_DIGITAL, DrvJoy2 + 5, "p2 start" },
443
444 {"Reset", BIT_DIGITAL, &DrvReset, "reset" },
445 {"Auto Up / Manual Down", BIT_DIGITAL, DrvJoy3 + 0, "service" },
446 {"Advance", BIT_DIGITAL, DrvJoy3 + 1, "diag" },
447 {"High Score Reset", BIT_DIGITAL, DrvJoy3 + 3, "service3" },
448 {"Tilt", BIT_DIGITAL, DrvJoy3 + 6, "tilt" },
449 };
450 #undef A
451
452 STDINPUTINFO(Blaster)
453
454 static struct BurnInputInfo LottofunInputList[] = {
455 {"P1 Coin", BIT_DIGITAL, DrvJoy3 + 4, "p1 coin" },
456 {"P1 Start", BIT_DIGITAL, DrvJoy1 + 4, "p1 start" },
457 {"Up", BIT_DIGITAL, DrvJoy1 + 0, "p1 up" },
458 {"Down", BIT_DIGITAL, DrvJoy1 + 1, "p1 down" },
459 {"Left", BIT_DIGITAL, DrvJoy1 + 2, "p1 left" },
460 {"Right", BIT_DIGITAL, DrvJoy1 + 3, "p1 right" },
461
462 {"P2 Coin", BIT_DIGITAL, DrvJoy3 + 2, "p2 coin" },
463
464 {"Reset", BIT_DIGITAL, &DrvReset, "reset" },
465 {"Memory Protect", BIT_DIGITAL, DrvJoy3 + 0, "service" },
466 {"Advance", BIT_DIGITAL, DrvJoy3 + 1, "diag" },
467 {"High Score Reset", BIT_DIGITAL, DrvJoy3 + 3, "service3" },
468 {"Tilt", BIT_DIGITAL, DrvJoy3 + 6, "tilt" },
469 };
470
471 STDINPUTINFO(Lottofun)
472
473 static struct BurnDIPInfo Colony7DIPList[]=
474 {
475 {0x0b, 0xff, 0xff, 0x00, NULL },
476 {0x0c, 0xff, 0xff, 0x00, NULL },
477 {0x0d, 0xff, 0xff, 0x01, NULL },
478
479 {0 , 0xfe, 0 , 2, "Lives" },
480 {0x0d, 0x01, 0x01, 0x00, "2" },
481 {0x0d, 0x01, 0x01, 0x01, "3" },
482
483 {0 , 0xfe, 0 , 4, "Bonus At" },
484 {0x0d, 0x01, 0x02, 0x00, "20k/40k" },
485 {0x0d, 0x01, 0x02, 0x02, "30k/50k" },
486 {0x0d, 0x01, 0x02, 0x00, "30k/50k" },
487 {0x0d, 0x01, 0x02, 0x02, "40k/70k" },
488 };
489
490 STDDIPINFO(Colony7)
491
492 static struct BurnDIPInfo JinDIPList[]=
493 {
494 {0x09, 0xff, 0xff, 0x00, NULL },
495 {0x0a, 0xff, 0xff, 0x60, NULL },
496 {0x0b, 0xff, 0xff, 0x00, NULL },
497
498 {0 , 0xfe, 0 , 8, "Coinage" },
499 {0x0a, 0x01, 0x07, 0x07, "A 2C/1C B 1C/3C" },
500 {0x0a, 0x01, 0x07, 0x06, "A 2C/1C B 1C/1C" },
501 {0x0a, 0x01, 0x07, 0x05, "A 1C/3C B 1C/3C" },
502 {0x0a, 0x01, 0x07, 0x04, "A 1C/3C B 1C/1C" },
503 {0x0a, 0x01, 0x07, 0x03, "A 1C/2C B 1C/3C" },
504 {0x0a, 0x01, 0x07, 0x02, "A 1C/2C B 1C/1C" },
505 {0x0a, 0x01, 0x07, 0x01, "A 1C/1C B 1C/3C" },
506 {0x0a, 0x01, 0x07, 0x00, "A 1C/1C B 1C/1C" },
507
508 {0 , 0xfe, 0 , 2, "Lives" },
509 {0x0a, 0x01, 0x08, 0x08, "4" },
510 {0x0a, 0x01, 0x08, 0x00, "3" },
511
512 {0 , 0xfe, 0 , 4, "Level completed" },
513 {0x0a, 0x01, 0x60, 0x60, "85%" },
514 {0x0a, 0x01, 0x60, 0x40, "75%" },
515 {0x0a, 0x01, 0x60, 0x20, "65%" },
516 {0x0a, 0x01, 0x60, 0x00, "55%" },
517 };
518
519 STDDIPINFO(Jin)
520
521 enum
522 {
523 //controlbyte (0xCA00) bit definitions
524 WMS_BLITTER_CONTROLBYTE_NO_EVEN = 0x80,
525 WMS_BLITTER_CONTROLBYTE_NO_ODD = 0x40,
526 WMS_BLITTER_CONTROLBYTE_SHIFT = 0x20,
527 WMS_BLITTER_CONTROLBYTE_SOLID = 0x10,
528 WMS_BLITTER_CONTROLBYTE_FOREGROUND_ONLY = 0x08,
529 WMS_BLITTER_CONTROLBYTE_SLOW = 0x04, //2us blits instead of 1us
530 WMS_BLITTER_CONTROLBYTE_DST_STRIDE_256 = 0x02,
531 WMS_BLITTER_CONTROLBYTE_SRC_STRIDE_256 = 0x01
532 };
533
blit_pixel(INT32 dstaddr,INT32 srcdata,INT32 controlbyte)534 static void blit_pixel(INT32 dstaddr, INT32 srcdata, INT32 controlbyte)
535 {
536 INT32 curpix = (dstaddr < 0xc000) ? DrvVidRAM[dstaddr] : M6809ReadByte(dstaddr); //current pixel values at dest
537
538 INT32 solid = DrvBlitRAM[1];
539 UINT8 keepmask = 0xff;
540
541 if((controlbyte & WMS_BLITTER_CONTROLBYTE_FOREGROUND_ONLY) && !(srcdata & 0xf0))
542 {
543 if(controlbyte & WMS_BLITTER_CONTROLBYTE_NO_EVEN)
544 keepmask &= 0x0f;
545 }
546 else
547 {
548 if(!(controlbyte & WMS_BLITTER_CONTROLBYTE_NO_EVEN))
549 keepmask &= 0x0f;
550 }
551
552 if((controlbyte & WMS_BLITTER_CONTROLBYTE_FOREGROUND_ONLY) && !(srcdata & 0x0f))
553 {
554 if(controlbyte & WMS_BLITTER_CONTROLBYTE_NO_ODD)
555 keepmask &= 0xf0;
556 }
557 else
558 {
559 if(!(controlbyte & WMS_BLITTER_CONTROLBYTE_NO_ODD))
560 keepmask &= 0xf0;
561 }
562
563 curpix &= keepmask;
564 if(controlbyte & WMS_BLITTER_CONTROLBYTE_SOLID)
565 curpix |= (solid & ~keepmask);
566 else
567 curpix |= (srcdata & ~keepmask);
568
569 if (!blitter_window_enable || dstaddr < blitter_clip_address || dstaddr >= 0xc000)
570 {
571 M6809WriteByte(dstaddr, curpix);
572 }
573 }
574
blitter_core(UINT16 sstart,UINT16 dstart,UINT8 w,UINT8 h,UINT8 controlbyte)575 static INT32 blitter_core(UINT16 sstart, UINT16 dstart, UINT8 w, UINT8 h, UINT8 controlbyte)
576 {
577 INT32 source, sxadv, syadv;
578 INT32 dest, dxadv, dyadv;
579 INT32 x, y;
580 INT32 accesses = 0;
581 UINT8 *remap_ptr = blitter_remap + blitter_remap_index * 256;
582
583 sxadv = (controlbyte & WMS_BLITTER_CONTROLBYTE_SRC_STRIDE_256) ? 0x100 : 1;
584 syadv = (controlbyte & WMS_BLITTER_CONTROLBYTE_SRC_STRIDE_256) ? 1 : w;
585 dxadv = (controlbyte & WMS_BLITTER_CONTROLBYTE_DST_STRIDE_256) ? 0x100 : 1;
586 dyadv = (controlbyte & WMS_BLITTER_CONTROLBYTE_DST_STRIDE_256) ? 1 : w;
587
588 INT32 pixdata=0;
589
590 for (y = 0; y < h; y++)
591 {
592 source = sstart & 0xffff;
593 dest = dstart & 0xffff;
594
595 for (x = 0; x < w; x++)
596 {
597 if (!(controlbyte & WMS_BLITTER_CONTROLBYTE_SHIFT)) //no shift
598 {
599 blit_pixel(dest, remap_ptr[M6809ReadByte(source)], controlbyte);
600 }
601 else
602 { //shift one pixel right
603 pixdata = (pixdata << 8) | remap_ptr[M6809ReadByte(source)];
604 blit_pixel(dest, (pixdata >> 4) & 0xff, controlbyte);
605 }
606 accesses += 2;
607
608 source = (source + sxadv) & 0xffff;
609 dest = (dest + dxadv) & 0xffff;
610 }
611
612 if (controlbyte & WMS_BLITTER_CONTROLBYTE_DST_STRIDE_256)
613 dstart = (dstart & 0xff00) | ((dstart + dyadv) & 0xff);
614 else
615 dstart += dyadv;
616
617 if (controlbyte & WMS_BLITTER_CONTROLBYTE_SRC_STRIDE_256)
618 sstart = (sstart & 0xff00) | ((sstart + syadv) & 0xff);
619 else
620 sstart += syadv;
621 }
622 return accesses;
623 }
624
williams_blitter_write(INT32 offset,UINT8 data)625 static void williams_blitter_write(INT32 offset, UINT8 data)
626 {
627 offset &= 7;
628
629 INT32 sstart, dstart, w, h, accesses;
630 INT32 estimated_clocks_at_4MHz;
631
632 DrvBlitRAM[offset] = data;
633
634 if (offset != 0)
635 return;
636
637 sstart = (DrvBlitRAM[2] << 8) + DrvBlitRAM[3];
638 dstart = (DrvBlitRAM[4] << 8) + DrvBlitRAM[5];
639
640 w = DrvBlitRAM[6] ^ blitter_xor;
641 h = DrvBlitRAM[7] ^ blitter_xor;
642
643 if (w == 0) w = 1;
644 if (h == 0) h = 1;
645
646 //bprintf(0, _T("blit: sstart %X dstart %X w %X h %X data %X.\n"), sstart, dstart, w, h, data);
647 accesses = blitter_core(sstart, dstart, w, h, data);
648
649 if(data & WMS_BLITTER_CONTROLBYTE_SLOW)
650 {
651 estimated_clocks_at_4MHz = 4 + 4 * (accesses + 2);
652 }
653 else
654 {
655 estimated_clocks_at_4MHz = 4 + 2 * (accesses + 3);
656 }
657
658 // m6809_eat_cycles(-((estimated_clocks_at_4MHz + 3) / 4));
659 }
660
defender_bank_write(UINT16 address,UINT8 data)661 static void defender_bank_write(UINT16 address, UINT8 data)
662 {
663 //bprintf (0, _T("BW: %4.4x %2.2x\n"), address, data);
664
665 if (address == 0x03ff) {
666 if (data == 0x39) {
667 BurnWatchdogWrite();
668 bprintf(0, _T("Watchdog Write. **\n"));
669 }
670 return;
671 }
672
673 if ((address & 0xfc10) == 0x0000) {
674 DrvPalRAM[address & 0x0f] = data;
675 return;
676 }
677
678 if ((address & 0xfc10) == 0x0010) {
679 cocktail = data & 0x01;
680 return;
681 }
682
683 if ((address & 0xfc00) == 0x0400) {
684 DrvNVRAM[address & 0xff] = data | 0xf0;
685 return;
686 }
687
688 if ((address & 0xfc1c) == 0x0c00) {
689 pia_write(1, address & 0x3, data);
690 return;
691 }
692
693 if ((address & 0xfc1c) == 0x0c04) {
694 pia_write(0, address & 0x3, data);
695 return;
696 }
697
698 bprintf (0, _T("BW: %4.4x %2.2x\n"), address, data);
699
700 if (address >= 0xa000) return; // nop
701 }
702
defender_bank_read(UINT16 address)703 static UINT8 defender_bank_read(UINT16 address)
704 {
705 // bprintf (0, _T("BR: %4.4x\n"), address);
706
707 if ((address & 0xfc00) == 0x0400) {
708 return DrvNVRAM[address & 0xff];
709 }
710
711 if ((address & 0xfc00) == 0x0800) {
712 return (scanline < 0x100) ? (scanline & 0xfc) : 0xfc;
713 }
714
715 if ((address & 0xfc1c) == 0x0c00) {
716 return pia_read(1, address & 3);
717 }
718
719 if ((address & 0xfc1c) == 0x0c04) {
720 return pia_read(0, address & 3);
721 }
722
723 if (address >= 0x1000 && address <= 0x9fff) {
724 return DrvM6809ROM0[0x10000 + address];
725 }
726
727 if (address >= 0xa000) {
728 return 0;
729 }
730
731 bprintf (0, _T("BR: %4.4x\n"), address);
732
733 return 0;
734 }
735
bankswitch()736 static void bankswitch()
737 {
738 if (bankselect >= 1 && bankselect <= 9) {
739 M6809MapMemory(DrvM6809ROM0 + 0x10000 + (bankselect - 1) * 0x1000, 0xc000, 0xcfff, MAP_ROM);
740 } else {
741 M6809UnmapMemory(0xc000, 0xcfff, MAP_RAM);
742 }
743 }
744
defender_main_write(UINT16 address,UINT8 data)745 static void defender_main_write(UINT16 address, UINT8 data)
746 {
747 if ((address & 0xf000) == 0xc000) {
748 defender_bank_write((address & 0xfff) + (bankselect * 0x1000), data);
749 return;
750 }
751
752 if ((address & 0xf000) == 0xd000) {
753 bankselect = data & 0xf;
754 bankswitch();
755
756 // mayday
757 if (DrvM6809ROM0[0xf7b5] == 0xff && DrvM6809ROM0[0xf7b6] == 0xff) {
758 // bprintf (0, _T("Mayday prot: %3.3x, %2.2x\n"), address & 0xfff, data);
759 //if (data == 0x01) {
760 // memset (DrvM6809ROM0 + 0xf7ad, 0, 6);
761 //}
762 // else {
763 // static const UINT8 test_data[8] = {
764 // 0x31, 0x62, 0xE2, 0xA1, 0x91, 0x09, 0xC0, 0x00
765 // };
766 // memcpy (DrvM6809ROM0 + 0xf7ad, test_data, 2);
767 //}
768 }
769 return;
770 }
771 }
772
defender_main_read(UINT16 address)773 static UINT8 defender_main_read(UINT16 address)
774 {
775 if (address >= 0x0000 && address <= 0xbfff) { // Mayday prot
776 if (mayday && address >= 0xa190 && address <= 0xa191) { // Mayday prot
777 bprintf(0, _T("read mayday prot: %X.\n"), address);
778 return DrvVidRAM[address + 3];
779 }
780 return DrvVidRAM[address];
781 }
782
783 if ((address & 0xf000) == 0xc000) {
784 return defender_bank_read((address & 0xfff) + (bankselect * 0x1000));
785 }
786
787 return 0;
788 }
789
williams_bank()790 static void williams_bank()
791 {
792 if (vram_select == 0)
793 {
794 M6809MapMemory(DrvVidRAM, 0x0000, 0x8fff, MAP_RAM);
795 }
796 else
797 {
798 M6809MapMemory(DrvM6809ROM0 + 0x10000, 0x0000, 0x8fff, MAP_ROM);
799 }
800 }
801
williams_main_write(UINT16 address,UINT8 data)802 static void williams_main_write(UINT16 address, UINT8 data)
803 {
804 if ((address & 0xfc00) == 0xc000) {
805 DrvPalRAM[address & 0xf] = data;
806 return;
807 }
808
809 if ((address & 0xfc00) == 0xcc00) {
810 DrvNVRAM[address & 0x3ff] = data | 0xf0;
811 return;
812 }
813
814 if ((address & 0xff00) == 0xc900) {
815 vram_select = data & 1;
816 cocktail = data & 2;
817 if (blitter_clip_address == 0x7400) blitter_window_enable = data & 4; // sinistar
818 williams_bank();
819 return;
820 }
821
822 if ((address & 0xff0c) == 0xc804) {
823 pia_write(0, address & 0x3, data);
824 return;
825 }
826
827 if ((address & 0xff0c) == 0xc808) { // spdball
828 pia_write(3, address & 0x3, data);
829 return;
830 }
831
832 if ((address & 0xff0c) == 0xc80c) {
833 pia_write(1, address & 0x3, data);
834 return;
835 }
836
837 if ((address & 0xff00) == 0xca00) {
838 williams_blitter_write(address, data);
839 return;
840 }
841
842 switch (address)
843 {
844 case 0xcbff:
845 if (data == 0x39) {
846 BurnWatchdogWrite();
847 }
848 return;
849 }
850
851 // sinistar debug derp spew writes @ 0xe000 - 0xffff
852 if ((address & 0xe000) != 0xe000) bprintf (0, _T("MW: %4.4x, %2.2x\n"), address, data);
853 }
854
williams_main_read(UINT16 address)855 static UINT8 williams_main_read(UINT16 address)
856 {
857 if ((address & 0xfffc) == 0xc800) {
858 switch (address & 0x03) {
859 case 0: return TrackY[0]&0xff;
860 case 1: return TrackX[0]&0xff;
861 case 2: return TrackY[1]&0xff;
862 case 3: return TrackX[1]&0xff;
863 }
864
865 return 0; // spdball analog input read
866 }
867
868 if ((address & 0xff0c) == 0xc804) {
869 return pia_read(0, address & 3);
870 }
871
872 if ((address & 0xff0c) == 0xc808) { // spdball
873 return pia_read(3, address & 3);
874 }
875
876 if ((address & 0xff0c) == 0xc80c) {
877 return pia_read(1, address & 3);
878 }
879
880 if ((address & 0xff00) == 0xca00) {
881 return DrvBlitRAM[address & 7];
882 }
883
884 if ((address & 0xff00) == 0xcb00) {
885 return (scanline < 0x100) ? (scanline & 0xfc) : 0xfc;
886 }
887
888 if ((address & 0xfc00) == 0xc000) { // palette read, maybe? (sinistar)
889 return DrvPalRAM[address & 0xf];
890 }
891
892 if ((address & 0xff00) == 0xc900) return 0; // NOP
893
894 bprintf (0, _T("MR: %4.4x\n"), address);
895
896 return 0;
897 }
898
blaster_bankswitch()899 static void blaster_bankswitch()
900 {
901 if (vram_select == 0)
902 {
903 M6809MapMemory(DrvVidRAM, 0x0000, 0x8fff, MAP_RAM);
904 }
905 else
906 {
907 M6809MapMemory(DrvM6809ROM0 + 0x18000 + rom_bank * 0x4000, 0x0000, 0x3fff, MAP_ROM);
908 M6809MapMemory(DrvM6809ROM0 + 0x10000, 0x4000, 0x8fff, MAP_ROM);
909 }
910 }
911
blaster_main_write(UINT16 address,UINT8 data)912 static void blaster_main_write(UINT16 address, UINT8 data)
913 {
914 if ((address & 0xffc0) == 0xc900) {
915 vram_select = data & 0x01;
916 cocktail = data & 0x02;
917 blitter_window_enable = data & 0x04;
918 blaster_bankswitch();
919 return;
920 }
921
922 if ((address & 0xffc0) == 0xc940) {
923 blitter_remap_index = data;
924 return;
925 }
926
927 if ((address & 0xffc0) == 0xc980) {
928 rom_bank = data & 0x0f;
929 blaster_bankswitch();
930 return;
931 }
932
933 if ((address & 0xffc0) == 0xc9c0) {
934 blaster_video_control = data;
935 return;
936 }
937
938 williams_main_write(address, data);
939 }
940
defender_sound_write(UINT16 address,UINT8 data)941 static void defender_sound_write(UINT16 address, UINT8 data)
942 {
943 if ((address & 0x7ffc) == 0x0400) {
944 pia_write(2, address & 0x3, data);
945 return;
946 }
947 }
948
defender_sound_read(UINT16 address)949 static UINT8 defender_sound_read(UINT16 address)
950 {
951 if ((address & 0x7ffc) == 0x0400) {
952 return pia_read(2, address & 3);
953 }
954
955 return 0;
956 }
957
blaster_sound_write(UINT16 address,UINT8 data)958 static void blaster_sound_write(UINT16 address, UINT8 data)
959 {
960 if ((address & 0x7ffc) == 0x0400) {
961 pia_write(4, address & 0x3, data);
962 return;
963 }
964 }
965
blaster_sound_read(UINT16 address)966 static UINT8 blaster_sound_read(UINT16 address)
967 {
968 if ((address & 0x7ffc) == 0x0400) {
969 return pia_read(4, address & 3);
970 }
971
972 return 0;
973 }
974
pia0_in_a(UINT16)975 static UINT8 pia0_in_a(UINT16 )
976 {
977 return DrvInputs[0];
978 }
979
pia0_in_b(UINT16)980 static UINT8 pia0_in_b(UINT16 )
981 {
982 return DrvInputs[1];
983 }
984
pia1_in_a(UINT16)985 static UINT8 pia1_in_a(UINT16 )
986 {
987 return DrvInputs[2];
988 }
989
pia0_muxed_out_b2(UINT16,UINT8 data)990 static void pia0_muxed_out_b2(UINT16 , UINT8 data)
991 {
992 port_select = data;
993 }
994
pia0_muxed_joust_in_a(UINT16)995 static UINT8 pia0_muxed_joust_in_a(UINT16 )
996 {
997 return (DrvInputs[0] & 0x30) | ((port_select == 0) ? (DrvInputs[3] & ~0x30) : (DrvInputs[4] & ~0x30));
998 }
999
pia0_muxed_joust_in_b(UINT16)1000 static UINT8 pia0_muxed_joust_in_b(UINT16 )
1001 {
1002 return (DrvInputs[1] & 0xfc) | ((port_select == 0) ? (DrvInputs[5] & 0x3) : (DrvInputs[6] & 0x3));
1003 }
1004
pia0_49way_in_a(UINT16)1005 static UINT8 pia0_49way_in_a(UINT16 )
1006 {
1007 static const UINT8 translate49[7] = { 0x0, 0x4, 0x6, 0x7, 0xb, 0x9, 0x8 };
1008 INT16 x = ProcessAnalog(DrvAnalogPort0, 0, 1, 0x00, 0x6f);
1009 INT16 y = ProcessAnalog(DrvAnalogPort1, 1, 1, 0x00, 0x6f);
1010 return (translate49[x >> 4] << 4) | translate49[y >> 4];
1011 }
1012
sync_sound(INT32 num)1013 static void sync_sound(INT32 num)
1014 {
1015 INT32 cyc = (INT32)(((double)((double)M6809TotalCycles() * 894886) / 1000000)+0.5);
1016 INT32 todo = cyc - M6800TotalCycles();
1017 //bprintf(0, _T("m6809 cyc: %d m6800 cyc: %d. cyc: %d todo %d.\n"), M6809TotalCycles(), M6800TotalCycles(), cyc, todo);
1018 // Adding in a couple cycles to prevent lost soundcommands. CPU_RUN_SYNCINT in DrvFrame() will compensate.
1019 if (todo < 1) todo = 15;
1020 M6800Run(todo + 10);
1021 }
1022
pia1_out_b(UINT16,UINT8 data)1023 static void pia1_out_b(UINT16 , UINT8 data)
1024 {
1025 if (!blaster) { // defender, williams HW
1026 M6800Open(0);
1027 sync_sound(0);
1028 if (!playball) data |= 0xc0;
1029 pia_set_input_b(2, data);
1030 pia_set_input_cb1(2, (data == 0xff) ? 0 : 1);
1031 M6800Close();
1032 } else { // Blaster HW
1033 UINT8 l_data = data | 0x80;
1034 UINT8 r_data = (data >> 1 & 0x40) | (data & 0x3f) | 0x80;
1035
1036 M6800Open(0);
1037 sync_sound(0);
1038 pia_set_input_b(2, l_data);
1039 pia_set_input_cb1(2, (l_data == 0xff) ? 0 : 1);
1040 M6800Close();
1041
1042 M6800Open(1);
1043 sync_sound(1);
1044 pia_set_input_b(4, r_data);
1045 pia_set_input_cb1(4, (r_data == 0xff) ? 0 : 1);
1046 M6800Close();
1047 }
1048 }
1049
pia2_out_b(UINT16,UINT8 data)1050 static void pia2_out_b(UINT16 , UINT8 data)
1051 {
1052 DACWrite(0, data);
1053 }
1054
pia2_out_b2(UINT16,UINT8 data)1055 static void pia2_out_b2(UINT16 , UINT8 data)
1056 {
1057 DACWrite(1, data);
1058 }
1059
hc55516_digit_out(UINT16,UINT8 data)1060 static void hc55516_digit_out(UINT16 , UINT8 data)
1061 {
1062 hc55516_digit_w(data);
1063 }
1064
hc55516_clock_out(UINT16,UINT8 data)1065 static void hc55516_clock_out(UINT16 , UINT8 data)
1066 {
1067 hc55516_clock_w(data);
1068 }
1069
pia1_main_irq(INT32 state)1070 static void pia1_main_irq(INT32 state)
1071 {
1072 M6809SetIRQLine(M6809_IRQ_LINE, state ? CPU_IRQSTATUS_ACK : CPU_IRQSTATUS_NONE);
1073 }
1074
pia2_sound_irq(INT32 state)1075 static void pia2_sound_irq(INT32 state)
1076 {
1077 M6800SetIRQLine(M6800_IRQ_LINE, state ? CPU_IRQSTATUS_ACK : CPU_IRQSTATUS_NONE);
1078 }
1079
pia4_sound_irq(INT32 state)1080 static void pia4_sound_irq(INT32 state)
1081 {
1082 M6800SetIRQLine(M6800_IRQ_LINE, state ? CPU_IRQSTATUS_ACK : CPU_IRQSTATUS_NONE);
1083 }
1084
1085 static pia6821_interface pia_0 = {
1086 pia0_in_a, pia0_in_b,
1087 NULL, NULL, NULL, NULL,
1088 NULL, NULL, NULL, NULL,
1089 NULL, NULL
1090 };
1091
1092 static pia6821_interface pia_muxed_joust_0 = {
1093 pia0_muxed_joust_in_a, pia0_muxed_joust_in_b,
1094 NULL, NULL, NULL, NULL,
1095 NULL, NULL, NULL, pia0_muxed_out_b2,
1096 NULL, NULL
1097 };
1098
1099 static pia6821_interface pia_49way_0 = {
1100 pia0_49way_in_a, pia0_in_b,
1101 NULL, NULL, NULL, NULL,
1102 NULL, NULL, NULL, NULL,
1103 NULL, NULL
1104 };
1105
1106 static pia6821_interface pia_1 = {
1107 pia1_in_a, NULL,
1108 NULL, NULL, NULL, NULL,
1109 NULL, pia1_out_b, NULL, NULL,
1110 pia1_main_irq, pia1_main_irq
1111 };
1112
1113 static pia6821_interface pia_2 = {
1114 NULL, NULL,
1115 NULL, NULL, NULL, NULL,
1116 pia2_out_b, NULL, NULL, NULL,
1117 pia2_sound_irq, pia2_sound_irq
1118 };
1119
1120 static pia6821_interface pia_4 = { // blaster 2nd soundchip
1121 NULL, NULL,
1122 NULL, NULL, NULL, NULL,
1123 pia2_out_b2, NULL, NULL, NULL,
1124 pia4_sound_irq, pia4_sound_irq
1125 };
1126
1127 static pia6821_interface pia_2_sinistar = {
1128 NULL, NULL,
1129 NULL, NULL, NULL, NULL,
1130 pia2_out_b, NULL, hc55516_digit_out, hc55516_clock_out,
1131 pia2_sound_irq, pia2_sound_irq
1132 };
1133
pia3_in_a(UINT16)1134 static UINT8 pia3_in_a(UINT16 )
1135 {
1136 return DrvInputs[3];
1137 }
1138
pia3_in_b(UINT16)1139 static UINT8 pia3_in_b(UINT16 )
1140 {
1141 return DrvInputs[4];
1142 }
1143
1144 static pia6821_interface pia_3 = {
1145 pia3_in_a, pia3_in_b,
1146 NULL, NULL, NULL, NULL,
1147 NULL, NULL, NULL, NULL,
1148 NULL, NULL
1149 };
1150
DrvDoReset(INT32 clear_mem)1151 static INT32 DrvDoReset(INT32 clear_mem)
1152 {
1153 if (clear_mem) {
1154 memset (AllRam, 0, RamEnd - AllRam);
1155 }
1156
1157 M6809Open(0);
1158 M6809Reset();
1159 M6809Close();
1160
1161 M6800Open(0);
1162 M6800Reset();
1163 M6800Close();
1164
1165 if (blaster) {
1166 M6800Open(1);
1167 M6800Reset();
1168 M6800Close();
1169 }
1170
1171 pia_reset();
1172
1173 BurnWatchdogReset();
1174
1175 DACReset();
1176
1177 if (uses_hc55516)
1178 hc55516_reset();
1179
1180 cocktail = 0;
1181 bankselect = 0;
1182 vram_select = 0;
1183 port_select = 0;
1184 rom_bank = 0;
1185 blaster_video_control = 0;
1186 blaster_color0 = 0;
1187
1188 TrackX[0] = TrackX[1] = 0;
1189 TrackY[0] = TrackY[1] = 0;
1190
1191 nExtraCycles[0] = nExtraCycles[1] = nExtraCycles[2] = 0;
1192
1193 return 0;
1194 }
1195
MemIndex()1196 static INT32 MemIndex()
1197 {
1198 UINT8 *Next; Next = AllMem;
1199
1200 DrvM6809ROM0 = Next; Next += 0x050000;
1201 DrvM6800ROM0 = Next; Next += 0x010000;
1202 DrvM6800ROM1 = Next; Next += 0x010000;
1203
1204 DrvGfxROM = Next; Next += 0x018000;
1205
1206 DrvColPROM = Next; Next += 0x001000;
1207
1208 Palette = (UINT32*)Next; Next += 0x0100 * sizeof(UINT32);
1209 DrvPalette = (UINT32*)Next; Next += (0x0010 + 0x0100) * sizeof(UINT32);
1210
1211 DrvNVRAM = Next; Next += 0x000400;
1212
1213 blitter_remap = Next; Next += 0x010000;
1214
1215 AllRam = Next;
1216
1217 DrvM6809RAM0 = Next; Next += 0x004000;
1218 DrvM6800RAM0 = Next; Next += 0x000100;
1219 DrvM6800RAM1 = Next; Next += 0x000100;
1220 DrvVidRAM = Next; Next += 0x00c000;
1221 DrvPalRAM = Next; Next += 0x000010;
1222 DrvBlitRAM = Next; Next += 0x000008;
1223
1224 RamEnd = Next;
1225
1226 MemEnd = Next;
1227
1228 return 0;
1229 }
1230
DrvRomLoad(INT32 type)1231 static INT32 DrvRomLoad(INT32 type) // 1-defender, 2-mysticm, 3-tshoot, 4-sinistar, 0-blaster
1232 {
1233 char* pRomName;
1234 struct BurnRomInfo ri;
1235 UINT8 *mLoad = DrvM6809ROM0 + 0xd000;
1236 UINT8 *cLoad = DrvColPROM;
1237 UINT8 *gLoad = DrvGfxROM;
1238
1239 if (type == 4) mLoad += 0x1000;
1240
1241 for (INT32 i = 0; !BurnDrvGetRomName(&pRomName, i, 0); i++)
1242 {
1243 BurnDrvGetRomInfo(&ri, i);
1244
1245 if ((ri.nType & 7) == 1) {
1246 INT32 offset = mLoad - DrvM6809ROM0;
1247
1248 // blaster
1249 if (ri.nLen == 0x4000 && offset == 0x15000) mLoad += 0x3000; // gap
1250 if (type == 2) {
1251 if (offset == 0x18000) mLoad += 0x8000;
1252 if (offset == 0x24000) mLoad += 0xc000;
1253 if (offset == 0x38000) mLoad += 0x8000;
1254 }
1255 if (type == 3) {
1256 if (offset == 0x18000) mLoad += 0x8000;
1257 if (offset == 0x26000) mLoad += 0xa000;
1258 if (offset == 0x38000) mLoad += 0x8000;
1259 }
1260 //bprintf(0, _T("loading main ROM @ %04X (%X bytes)\n"), offset, ri.nLen);
1261 if (BurnLoadRom(mLoad, i, 1)) return 1;
1262 mLoad += ri.nLen;
1263
1264 // defender
1265 if (type == 1 && (offset + ri.nLen) == 0x13000) mLoad += 0x3000; // gap
1266 continue;
1267 }
1268
1269 if ((ri.nType & 7) == 2) {
1270 memmove (DrvM6800ROM0, DrvM6800ROM0 + ri.nLen, 0x10000 - ri.nLen); // move back
1271 if (BurnLoadRom(DrvM6800ROM0 + 0x10000 - ri.nLen, i, 1)) return 1;
1272 continue;
1273 }
1274
1275 if ((ri.nType & 7) == 3) {
1276 memmove (DrvM6800ROM1, DrvM6800ROM1 + ri.nLen, 0x10000 - ri.nLen); // move back
1277 if (BurnLoadRom(DrvM6800ROM1 + 0x10000 - ri.nLen, i, 1)) return 1;
1278 continue;
1279 }
1280
1281 if ((ri.nType & 7) == 4) {
1282 if (BurnLoadRom(cLoad, i, 1)) return 1;
1283 cLoad += ri.nLen;
1284 uses_colprom = 1;
1285 continue;
1286 }
1287
1288 if ((ri.nType & 7) == 5) {
1289 if (BurnLoadRom(gLoad, i, 1)) return 1;
1290 gLoad += ri.nLen;
1291 continue;
1292 }
1293 }
1294
1295 // colony
1296 if ((mLoad - DrvM6809ROM0) == 0x12800) memcpy (DrvM6809ROM0 + 0x12800, DrvM6809ROM0 + 0x12000, 0x0800);
1297
1298 return 0;
1299 }
1300
blitter_init(INT32 blitter_config,UINT8 * prom)1301 static void blitter_init(INT32 blitter_config, UINT8 *prom)
1302 {
1303 static UINT8 dummy_table[16] = { STEP16(0,1) };
1304
1305 if (prom) bprintf(0, _T(" ** Using DrvColPROM.\n"));
1306
1307 blitter_window_enable = 0;
1308 blitter_xor = (blitter_config == 1) ? 4 : 0;
1309 blitter_remap_index = 0;
1310
1311 for (INT32 i = 0; i < 256; i++)
1312 {
1313 UINT8 *table = prom ? (prom + (i & 0x7f) * 16) : dummy_table;
1314
1315 for (INT32 j = 0; j < 256; j++)
1316 blitter_remap[i * 256 + j] = (table[j >> 4] << 4) | table[j & 0x0f];
1317 }
1318 }
1319
DrvInit(INT32 maptype,INT32 loadtype,INT32 x_adjust,INT32 blitter_config,INT32 blitter_clip_addr)1320 static INT32 DrvInit(INT32 maptype, INT32 loadtype, INT32 x_adjust, INT32 blitter_config, INT32 blitter_clip_addr)
1321 {
1322 BurnAllocMemIndex();
1323
1324 {
1325 if (DrvRomLoad(loadtype)) return 1;
1326 }
1327
1328 // sound HW
1329 M6800Init(0);
1330 M6800Open(0);
1331 M6800MapMemory(DrvM6800RAM0, 0x0000, 0x00ff, MAP_RAM);
1332 M6800MapMemory(DrvM6800ROM0 + 0xb000, 0xb000, 0xffff, MAP_ROM);
1333 M6800SetWriteHandler(defender_sound_write);
1334 M6800SetReadHandler(defender_sound_read);
1335 M6800Close();
1336
1337 if (maptype == 2) // blaster
1338 {
1339 M6809Init(0);
1340 M6809Open(0);
1341 M6809MapMemory(DrvVidRAM, 0x0000, 0xbfff, MAP_RAM); // banked
1342 M6809MapMemory(DrvNVRAM, 0xcc00, 0xcfff, MAP_ROM);
1343 M6809MapMemory(DrvM6809ROM0 + 0xd000, 0xd000, 0xffff, MAP_ROM);
1344 M6809SetWriteHandler(blaster_main_write);
1345 M6809SetReadHandler(williams_main_read);
1346 M6809Close();
1347
1348 M6800Init(1);
1349 M6800Open(1);
1350 M6800MapMemory(DrvM6800RAM1, 0x0000, 0x00ff, MAP_RAM);
1351 M6800MapMemory(DrvM6800ROM1 + 0xb000, 0xb000, 0xffff, MAP_ROM);
1352 M6800SetWriteHandler(blaster_sound_write);
1353 M6800SetReadHandler(blaster_sound_read);
1354 M6800Close();
1355 }
1356 else if (maptype == 1) // williams
1357 {
1358 M6809Init(0);
1359 M6809Open(0);
1360 M6809MapMemory(DrvVidRAM, 0x0000, 0xbfff, MAP_RAM); // banked
1361 M6809MapMemory(DrvNVRAM, 0xcc00, 0xcfff, MAP_ROM); // handler
1362 M6809MapMemory(DrvM6809ROM0 + 0xd000, 0xd000, 0xffff, MAP_ROM);
1363 M6809SetWriteHandler(williams_main_write);
1364 M6809SetReadHandler(williams_main_read);
1365 M6809Close();
1366 }
1367 else if (maptype == 0) // defender
1368 {
1369 defender = 1;
1370 M6809Init(0);
1371 M6809Open(0);
1372 if (mayday) {
1373 M6809MapMemory(DrvVidRAM, 0x0000, 0xbfff, MAP_WRITE); // read -> handler
1374 } else {
1375 M6809MapMemory(DrvVidRAM, 0x0000, 0xbfff, MAP_RAM);
1376 }
1377 M6809MapMemory(DrvM6809ROM0 + 0xd000, 0xd000, 0xffff, MAP_ROM);
1378 M6809SetWriteHandler(defender_main_write);
1379 M6809SetReadHandler(defender_main_read);
1380 M6809Close();
1381 }
1382
1383 pia_init();
1384 pia_config(0, 0, &pia_0);
1385 pia_config(1, 0, &pia_1);
1386 pia_config(2, 0, &pia_2);
1387 pia_config(3, 0, &pia_3);
1388
1389 BurnWatchdogInit(DrvDoReset, 180);
1390
1391 DACInit(0, 0, 0, M6800TotalCycles, 894886);
1392 DACSetRoute(0, 0.35, BURN_SND_ROUTE_BOTH);
1393 DACDCBlock(1);
1394
1395 if (maptype == 2) // blaster, pia config & l+r dac
1396 {
1397 pia_init();
1398 pia_config(0, 0, &pia_49way_0);
1399 pia_config(1, 0, &pia_1);
1400 pia_config(2, 0, &pia_2);
1401 pia_config(3, 0, &pia_3);
1402 pia_config(4, 0, &pia_4); // 2nd soundboard
1403
1404 DACSetRoute(0, 0.35, BURN_SND_ROUTE_LEFT);
1405
1406 DACInit(1, 0, 0, M6800TotalCycles, 894886);
1407 DACSetRoute(1, 0.35, BURN_SND_ROUTE_RIGHT);
1408 }
1409
1410 blitter_clip_address = blitter_clip_addr;
1411 blitter_init(blitter_config, (uses_colprom) ? DrvColPROM : NULL);
1412
1413 GenericTilesInit();
1414
1415 screen_x_adjust = x_adjust;
1416
1417 DrvDoReset(1);
1418
1419 return 0;
1420 }
1421
DrvExit()1422 static INT32 DrvExit()
1423 {
1424 GenericTilesExit();
1425
1426 M6809Exit();
1427 M6800Exit();
1428 pia_exit();
1429
1430 DACExit();
1431
1432 if (uses_hc55516)
1433 hc55516_exit();
1434
1435 BurnFreeMemIndex();
1436
1437 memset (DrvDips, 0, 3);
1438
1439 mayday = 0;
1440 splat = 0;
1441 blaster = 0;
1442 defender_control_hack = 0;
1443 defender = 0;
1444 spdball = 0;
1445 playball = 0;
1446 lottofun = 0;
1447
1448 uses_hc55516 = 0;
1449 uses_colprom = 0;
1450
1451 pStartDraw = NULL;
1452 pDrawScanline = NULL;
1453
1454 return 0;
1455 }
1456
DrvPaletteInit()1457 static void DrvPaletteInit()
1458 {
1459 for (INT32 i = 0; i < 0x100; i++)
1460 {
1461 INT32 bit0 = (i & 0x01) >> 0;
1462 INT32 bit1 = (i & 0x02) >> 1;
1463 INT32 bit2 = (i & 0x04) >> 2;
1464
1465 UINT8 r = ((bit2 * 1200 + bit1 * 560 + bit0 * 330) * 255) / 2090;
1466
1467 bit0 = (i & 0x08) >> 3;
1468 bit1 = (i & 0x10) >> 4;
1469 bit2 = (i & 0x20) >> 5;
1470
1471 UINT8 g = ((bit2 * 1200 + bit1 * 560 + bit0 * 330) * 255) / 2090;
1472
1473 bit0 = (i & 0x40) >> 6;
1474 bit1 = (i & 0x80) >> 7;
1475
1476 UINT8 b = ((bit1 * 560 + bit0 * 330) * 255) / 890;
1477
1478 Palette[i] = BurnHighCol(r,g,b,0);
1479 DrvPalette[i + 0x10] = Palette[i];
1480 }
1481 }
1482
DrvPaletteUpdate()1483 static void DrvPaletteUpdate()
1484 {
1485 for (INT32 i = 0; i < 16; i++) {
1486 DrvPalette[i] = Palette[DrvPalRAM[i]];
1487 }
1488 }
1489
draw_bitmap(INT32 starty,INT32 endy)1490 static void draw_bitmap(INT32 starty, INT32 endy)
1491 {
1492 for (INT32 y = starty; y < endy; y++)
1493 {
1494 UINT16 *dst = pTransDraw + (y * nScreenWidth);
1495 UINT8 *src = DrvVidRAM + y + 7;
1496
1497 if (y >= 240) return;
1498
1499 for (INT32 x = 0; x < nScreenWidth; x += 2)
1500 {
1501 UINT8 pix = src[((x + screen_x_adjust) / 2) * 256];
1502
1503 dst[x + 0] = pix >> 4;
1504 dst[x + 1] = pix & 0x0f;
1505 }
1506 }
1507 }
1508
blaster_draw_bitmap(INT32 starty,INT32 endy)1509 static void blaster_draw_bitmap(INT32 starty, INT32 endy)
1510 {
1511 const UINT8 YOFFS = 7;
1512 UINT8 *palette_control = DrvVidRAM + 0xbb00 + YOFFS;
1513 UINT8 *scanline_control = DrvVidRAM + 0xbc00 + YOFFS;
1514
1515 if (starty == 0 || !(blaster_video_control & 1))
1516 blaster_color0 = 0x10 + (palette_control[0 - YOFFS] ^ 0xff);
1517
1518 for (INT32 y = starty; y < endy; y++)
1519 {
1520 INT32 erase_behind = blaster_video_control & scanline_control[y] & 2;
1521 UINT8 *source = DrvVidRAM + y + YOFFS;
1522 UINT16 *dest = pTransDraw + (y * nScreenWidth);
1523
1524 if (y >= 240) return;
1525
1526 if (blaster_video_control & scanline_control[y] & 1)
1527 blaster_color0 = 0x10 + (palette_control[y] ^ 0xff);
1528
1529 for (INT32 x = 0; x < nScreenWidth; x += 2)
1530 {
1531 INT32 pix = source[(x/2) * 256];
1532
1533 if (erase_behind)
1534 source[(x/2) * 256] = 0;
1535
1536 dest[x+0] = (pix & 0xf0) ? (pix >> 4) : blaster_color0;
1537 dest[x+1] = (pix & 0x0f) ? (pix & 0x0f) : blaster_color0;
1538 }
1539 }
1540 }
1541
DrvDrawBegin()1542 static void DrvDrawBegin()
1543 {
1544 if (DrvRecalc) {
1545 DrvPaletteInit();
1546 DrvRecalc = 0;
1547 }
1548
1549 lastline = 0;
1550
1551 DrvPaletteUpdate();
1552 }
1553
DrvDrawLine()1554 static void DrvDrawLine()
1555 {
1556 if (scanline > nScreenHeight || !pBurnDraw) return;
1557
1558 DrvPaletteUpdate();
1559
1560 draw_bitmap(lastline, scanline);
1561
1562 lastline = scanline;
1563 }
1564
BlasterDrawLine()1565 static void BlasterDrawLine()
1566 {
1567 if (scanline > nScreenHeight || !pBurnDraw) return;
1568
1569 DrvPaletteUpdate();
1570
1571 blaster_draw_bitmap(lastline, scanline);
1572
1573 lastline = scanline;
1574 }
1575
DrvDrawEnd()1576 static void DrvDrawEnd()
1577 {
1578 if (!pBurnDraw) return;
1579 BurnTransferCopy(DrvPalette);
1580 }
1581
DrvDraw()1582 static INT32 DrvDraw()
1583 {
1584 if (DrvRecalc) {
1585 DrvPaletteInit();
1586 DrvRecalc = 0;
1587 }
1588
1589 DrvPaletteUpdate();
1590
1591 draw_bitmap(0, nScreenHeight);
1592
1593 BurnTransferCopy(DrvPalette);
1594
1595 return 0;
1596 }
1597
BlasterDraw()1598 static INT32 BlasterDraw()
1599 {
1600 if (DrvRecalc) {
1601 DrvPaletteInit();
1602 DrvRecalc = 0;
1603 }
1604
1605 DrvPaletteUpdate();
1606
1607 blaster_draw_bitmap(0, nScreenHeight);
1608
1609 BurnTransferCopy(DrvPalette);
1610
1611 return 0;
1612 }
1613
DrvFrame()1614 static INT32 DrvFrame()
1615 {
1616 BurnWatchdogUpdate();
1617
1618 if (DrvReset) {
1619 DrvDoReset(1);
1620 }
1621
1622 M6809NewFrame();
1623 M6800NewFrame();
1624
1625 {
1626 DrvInputs[0] = DrvDips[0];
1627 DrvInputs[1] = DrvDips[1];
1628 DrvInputs[2] = DrvDips[2];
1629
1630 memset (DrvInputs + 3, 0, 7-3);
1631
1632 if (lottofun) {
1633 DrvInputs[2] |= 1; // Memory Protect ON by default (for clean boot)
1634 MemoryProtect.Toggle(DrvJoy3[0]);
1635 }
1636
1637 for (INT32 i = 0; i < 8; i++) {
1638 DrvInputs[0] ^= (DrvJoy1[i] & 1) << i;
1639 DrvInputs[1] ^= (DrvJoy2[i] & 1) << i;
1640 DrvInputs[2] ^= (DrvJoy3[i] & 1) << i;
1641 DrvInputs[3] ^= (DrvJoy4[i] & 1) << i;
1642 DrvInputs[4] ^= (DrvJoy5[i] & 1) << i;
1643 DrvInputs[5] ^= (DrvJoy6[i] & 1) << i;
1644 DrvInputs[6] ^= (DrvJoy7[i] & 1) << i;
1645 }
1646
1647 if ( defender_control_hack && (DrvInputs[6] & 0x42) ) {
1648 // This kludge gives Defender and Stargate proper L/R joystick ability
1649 DrvInputs[0] |= DrvInputs[6] & 0x42;
1650
1651 M6809Open(0);
1652 if (defender_control_hack && M6809ReadByte(defender_control_hack) == 0xfd) {
1653 if (DrvInputs[0] & 0x02)
1654 DrvInputs[0] = (DrvInputs[0] & 0xfd) | 0x40;
1655 else if (DrvInputs[0] & 0x40)
1656 DrvInputs[0] = (DrvInputs[0] & 0xbf) | 0x02;
1657 }
1658 M6809Close();
1659 }
1660
1661 if (spdball) {
1662 UINT8 xy = 0;
1663
1664 xy = ProcessAnalog(DrvAnalogPort1, 1, 1, 0x00, 0xff);
1665 if (xy > (0x80+0x10)) TrackY[0]+=12;
1666 if (xy < (0x80-0x10)) TrackY[0]-=12;
1667 xy = ProcessAnalog(DrvAnalogPort0, 0, 1, 0x00, 0xff);
1668 if (xy > (0x80+0x10)) TrackX[0]+=12;
1669 if (xy < (0x80-0x10)) TrackX[0]-=12;
1670
1671 xy = ProcessAnalog(DrvAnalogPort3, 1, 1, 0x00, 0xff);
1672 if (xy > (0x80+0x10)) TrackY[1]+=12;
1673 if (xy < (0x80-0x10)) TrackY[1]-=12;
1674 xy = ProcessAnalog(DrvAnalogPort2, 0, 1, 0x00, 0xff);
1675 if (xy > (0x80+0x10)) TrackX[1]+=12;
1676 if (xy < (0x80-0x10)) TrackX[1]-=12;
1677
1678 }
1679 }
1680
1681 INT32 nInterleave = 256;
1682 INT32 nCyclesTotal[3] = { 1000000 / 60, 894886 / 60, 894886 / 60 };
1683 INT32 nCyclesDone[3] = { nExtraCycles[0], nExtraCycles[1], nExtraCycles[2] };
1684
1685 M6809Open(0);
1686
1687 if (pStartDraw) pStartDraw();
1688
1689 for (INT32 i = 0; i < nInterleave; i++)
1690 {
1691 scanline = i;
1692
1693 CPU_RUN(0, M6809);
1694
1695 if (scanline % 8 == 0) {
1696 pia_set_input_cb1(1, scanline & 0x20);
1697 if (pDrawScanline) pDrawScanline();
1698 }
1699
1700 if (scanline == 0 || scanline == 240)
1701 pia_set_input_ca1(1, scanline >= 240 ? 1 : 0);
1702
1703 M6800Open(0);
1704 CPU_RUN_SYNCINT(1, M6800);
1705 M6800Close();
1706
1707 if (blaster) {
1708 M6800Open(1);
1709 CPU_RUN_SYNCINT(2, M6800);
1710 M6800Close();
1711 }
1712 }
1713
1714 if (pBurnSoundOut) {
1715 M6800Open(0);
1716 DACUpdate(pBurnSoundOut, nBurnSoundLen);
1717 if (uses_hc55516)
1718 hc55516_update(pBurnSoundOut, nBurnSoundLen);
1719 M6800Close();
1720 }
1721
1722 M6809Close();
1723
1724 nExtraCycles[0] = nCyclesDone[0] - nCyclesTotal[0];
1725 M6800Open(0);
1726 nExtraCycles[1] = M6800TotalCycles() - nCyclesTotal[1];
1727 M6800Close();
1728 if (blaster) {
1729 M6800Open(1);
1730 nExtraCycles[2] = M6800TotalCycles() - nCyclesTotal[2];
1731 M6800Close();
1732 }
1733
1734 if (pBurnDraw) {
1735 if (pStartDraw)
1736 DrvDrawEnd();
1737 else
1738 BurnDrvRedraw();
1739 }
1740
1741 return 0;
1742 }
1743
DrvScan(INT32 nAction,INT32 * pnMin)1744 static INT32 DrvScan(INT32 nAction, INT32 *pnMin)
1745 {
1746 struct BurnArea ba;
1747
1748 if (pnMin) {
1749 *pnMin = 0x029702;
1750 }
1751
1752 if (nAction & ACB_VOLATILE) {
1753 memset(&ba, 0, sizeof(ba));
1754
1755 ba.Data = AllRam;
1756 ba.nLen = RamEnd - AllRam;
1757 ba.szName = "All Ram";
1758 BurnAcb(&ba);
1759
1760 M6809Scan(nAction);
1761 M6800Scan(nAction);
1762
1763 pia_scan(nAction, pnMin);
1764
1765 DACScan(nAction, pnMin);
1766 if (uses_hc55516)
1767 hc55516_scan(nAction, pnMin);
1768
1769 SCAN_VAR(cocktail);
1770 SCAN_VAR(bankselect);
1771 SCAN_VAR(vram_select);
1772 SCAN_VAR(rom_bank);
1773 SCAN_VAR(blaster_video_control);
1774 SCAN_VAR(blaster_color0);
1775
1776 SCAN_VAR(nExtraCycles);
1777
1778 if (spdball) {
1779 SCAN_VAR(TrackX);
1780 SCAN_VAR(TrackY);
1781 }
1782 }
1783
1784 if (nAction & ACB_NVRAM) {
1785 ba.Data = DrvNVRAM;
1786 ba.nLen = 0x00400;
1787 ba.nAddress = 0;
1788 ba.szName = "NVRAM";
1789 BurnAcb(&ba);
1790 }
1791
1792 if (nAction & ACB_WRITE) {
1793 M6809Open(0);
1794 if (blaster) {
1795 blaster_bankswitch();
1796 }
1797 else if (defender) {
1798 bankswitch();
1799 } else {
1800 williams_bank();
1801 }
1802 M6809Close();
1803 }
1804
1805 return 0;
1806 }
1807
1808
1809 // Defender (Red label)
1810
1811 static struct BurnRomInfo defenderRomDesc[] = {
1812 { "defend.1", 0x0800, 0xc3e52d7e, 1 | BRF_PRG | BRF_ESS }, // 0 M6809 Code
1813 { "defend.4", 0x0800, 0x9a72348b, 1 | BRF_PRG | BRF_ESS }, // 1
1814 { "defend.2", 0x1000, 0x89b75984, 1 | BRF_PRG | BRF_ESS }, // 2
1815 { "defend.3", 0x1000, 0x94f51e9b, 1 | BRF_PRG | BRF_ESS }, // 3
1816 { "defend.9", 0x0800, 0x6870e8a5, 1 | BRF_PRG | BRF_ESS }, // 4
1817 { "defend.12", 0x0800, 0xf1f88938, 1 | BRF_PRG | BRF_ESS }, // 5
1818 { "defend.8", 0x0800, 0xb649e306, 1 | BRF_PRG | BRF_ESS }, // 6
1819 { "defend.11", 0x0800, 0x9deaf6d9, 1 | BRF_PRG | BRF_ESS }, // 7
1820 { "defend.7", 0x0800, 0x339e092e, 1 | BRF_PRG | BRF_ESS }, // 8
1821 { "defend.10", 0x0800, 0xa543b167, 1 | BRF_PRG | BRF_ESS }, // 9
1822 { "defend.6", 0x0800, 0x65f4efd1, 1 | BRF_PRG | BRF_ESS }, // 10
1823
1824 { "video_sound_rom_1.ic12", 0x0800, 0xfefd5b48, 2 | BRF_PRG | BRF_ESS }, // 11 M6808 Code
1825
1826 { "decoder.2", 0x0200, 0x8dd98da5, 0 | BRF_OPT }, // 12 Address Decoder
1827 { "decoder.3", 0x0200, 0xc3f45f70, 0 | BRF_OPT }, // 13
1828 };
1829
1830 STD_ROM_PICK(defender)
STD_ROM_FN(defender)1831 STD_ROM_FN(defender)
1832
1833 static INT32 DefenderCommInit()
1834 {
1835 return DrvInit(0, 1, 12, -1, 0);
1836 }
1837
DefenderInit()1838 static INT32 DefenderInit()
1839 {
1840 defender_control_hack = 0xa0bb;
1841
1842 return DefenderCommInit();
1843 }
1844
DefenderBGInit()1845 static INT32 DefenderBGInit()
1846 {
1847 defender_control_hack = 0xa096;
1848
1849 return DefenderCommInit();
1850 }
1851
DefenderWhiteInit()1852 static INT32 DefenderWhiteInit()
1853 {
1854 defender_control_hack = 0xa093;
1855
1856 return DefenderCommInit();
1857 }
1858
DefenceInit()1859 static INT32 DefenceInit()
1860 {
1861 defender_control_hack = 0xa0d0;
1862
1863 return DefenderCommInit();
1864 }
1865
1866 struct BurnDriver BurnDrvDefender = {
1867 "defender", NULL, NULL, NULL, "1980",
1868 "Defender (Red label)\0", NULL, "Williams", "6809 System",
1869 NULL, NULL, NULL, NULL,
1870 BDF_GAME_WORKING, 2, HARDWARE_MISC_PRE90S, GBF_HORSHOOT, 0,
1871 NULL, defenderRomInfo, defenderRomName, NULL, NULL, NULL, NULL, DefenderInputInfo, NULL,
1872 DefenderInit, DrvExit, DrvFrame, DrvDraw, DrvScan, &DrvRecalc, 0x10,
1873 292, 240, 4, 3
1874 };
1875
1876
1877 // Defender (Green label)
1878
1879 static struct BurnRomInfo defendergRomDesc[] = {
1880 { "defeng01.bin", 0x0800, 0x6111d74d, 1 | BRF_PRG | BRF_ESS }, // 0 M6809 Code
1881 { "defeng04.bin", 0x0800, 0x3cfc04ce, 1 | BRF_PRG | BRF_ESS }, // 1
1882 { "defeng02.bin", 0x1000, 0xd184ab6b, 1 | BRF_PRG | BRF_ESS }, // 2
1883 { "defeng03.bin", 0x1000, 0x788b76d7, 1 | BRF_PRG | BRF_ESS }, // 3
1884 { "defeng09.bin", 0x0800, 0xf57caa62, 1 | BRF_PRG | BRF_ESS }, // 4
1885 { "defeng12.bin", 0x0800, 0x33db686f, 1 | BRF_PRG | BRF_ESS }, // 5
1886 { "defeng08.bin", 0x0800, 0x9a9eb3d2, 1 | BRF_PRG | BRF_ESS }, // 6
1887 { "defeng11.bin", 0x0800, 0x5ca4e860, 1 | BRF_PRG | BRF_ESS }, // 7
1888 { "defeng07.bin", 0x0800, 0x545c3326, 1 | BRF_PRG | BRF_ESS }, // 8
1889 { "defeng10.bin", 0x0800, 0x941cf34e, 1 | BRF_PRG | BRF_ESS }, // 9
1890 { "defeng06.bin", 0x0800, 0x3af34c05, 1 | BRF_PRG | BRF_ESS }, // 10
1891
1892 { "video_sound_rom_1.ic12", 0x0800, 0xfefd5b48, 2 | BRF_PRG | BRF_ESS }, // 11 M6808 Code
1893
1894 { "decoder.1", 0x0200, 0x8dd98da5, 0 | BRF_OPT }, // 12 Address Decoder
1895 };
1896
1897 STD_ROM_PICK(defenderg)
1898 STD_ROM_FN(defenderg)
1899
1900 struct BurnDriver BurnDrvDefenderg = {
1901 "defenderg", "defender", NULL, NULL, "1980",
1902 "Defender (Green label)\0", NULL, "Williams", "6809 System",
1903 NULL, NULL, NULL, NULL,
1904 BDF_GAME_WORKING | BDF_CLONE, 2, HARDWARE_MISC_PRE90S, GBF_HORSHOOT, 0,
1905 NULL, defendergRomInfo, defendergRomName, NULL, NULL, NULL, NULL, DefenderInputInfo, NULL,
1906 DefenderBGInit, DrvExit, DrvFrame, DrvDraw, DrvScan, &DrvRecalc, 0x10,
1907 292, 240, 4, 3
1908 };
1909
1910
1911 // Defender (Blue label)
1912
1913 static struct BurnRomInfo defenderbRomDesc[] = {
1914 { "wb01.bin", 0x1000, 0x0ee1019d, 1 | BRF_PRG | BRF_ESS }, // 0 M6809 Code
1915 { "defeng02.bin", 0x1000, 0xd184ab6b, 1 | BRF_PRG | BRF_ESS }, // 1
1916 { "wb03.bin", 0x1000, 0xa732d649, 1 | BRF_PRG | BRF_ESS }, // 2
1917 { "defeng09.bin", 0x0800, 0xf57caa62, 1 | BRF_PRG | BRF_ESS }, // 3
1918 { "defeng12.bin", 0x0800, 0x33db686f, 1 | BRF_PRG | BRF_ESS }, // 4
1919 { "defeng08.bin", 0x0800, 0x9a9eb3d2, 1 | BRF_PRG | BRF_ESS }, // 5
1920 { "defeng11.bin", 0x0800, 0x5ca4e860, 1 | BRF_PRG | BRF_ESS }, // 6
1921 { "defeng07.bin", 0x0800, 0x545c3326, 1 | BRF_PRG | BRF_ESS }, // 7
1922 { "defeng10.bin", 0x0800, 0x941cf34e, 1 | BRF_PRG | BRF_ESS }, // 8
1923 { "defeng06.bin", 0x0800, 0x3af34c05, 1 | BRF_PRG | BRF_ESS }, // 9
1924
1925 { "video_sound_rom_1.ic12", 0x0800, 0xfefd5b48, 2 | BRF_PRG | BRF_ESS }, // 10 M6808 Code
1926
1927 { "decoder.1", 0x0200, 0x8dd98da5, 0 | BRF_OPT }, // 11 Address Decoder
1928 };
1929
1930 STD_ROM_PICK(defenderb)
1931 STD_ROM_FN(defenderb)
1932
1933 struct BurnDriver BurnDrvDefenderb = {
1934 "defenderb", "defender", NULL, NULL, "1980",
1935 "Defender (Blue label)\0", NULL, "Williams", "6809 System",
1936 NULL, NULL, NULL, NULL,
1937 BDF_GAME_WORKING | BDF_CLONE, 2, HARDWARE_MISC_PRE90S, GBF_HORSHOOT, 0,
1938 NULL, defenderbRomInfo, defenderbRomName, NULL, NULL, NULL, NULL, DefenderInputInfo, NULL,
1939 DefenderBGInit, DrvExit, DrvFrame, DrvDraw, DrvScan, &DrvRecalc, 0x10,
1940 292, 240, 4, 3
1941 };
1942
1943
1944 // Defender (White label)
1945
1946 static struct BurnRomInfo defenderwRomDesc[] = {
1947 { "rom1.bin", 0x1000, 0x5af871e3, 1 | BRF_PRG | BRF_ESS }, // 0 M6809 Code
1948 { "rom2.bin", 0x1000, 0x1126adc9, 1 | BRF_PRG | BRF_ESS }, // 1
1949 { "rom3.bin", 0x1000, 0x4097b46b, 1 | BRF_PRG | BRF_ESS }, // 2
1950 { "rom9.bin", 0x0800, 0x93012991, 1 | BRF_PRG | BRF_ESS }, // 3
1951 { "rom12.bin", 0x0800, 0x4bdd8dc4, 1 | BRF_PRG | BRF_ESS }, // 4
1952 { "rom8.bin", 0x0800, 0x5227fc0b, 1 | BRF_PRG | BRF_ESS }, // 5
1953 { "rom11.bin", 0x0800, 0xd068f0c5, 1 | BRF_PRG | BRF_ESS }, // 6
1954 { "rom7.bin", 0x0800, 0xfef4cb77, 1 | BRF_PRG | BRF_ESS }, // 7
1955 { "rom10.bin", 0x0800, 0x49b50b40, 1 | BRF_PRG | BRF_ESS }, // 8
1956 { "rom6.bin", 0x0800, 0x43d42a1b, 1 | BRF_PRG | BRF_ESS }, // 9
1957
1958 { "video_sound_rom_1.ic12", 0x0800, 0xfefd5b48, 2 | BRF_PRG | BRF_ESS }, // 10 M6808 Code
1959
1960 { "decoder.1", 0x0200, 0x8dd98da5, 0 | BRF_OPT }, // 11 Address Decoder
1961 };
1962
1963 STD_ROM_PICK(defenderw)
1964 STD_ROM_FN(defenderw)
1965
1966 struct BurnDriver BurnDrvDefenderw = {
1967 "defenderw", "defender", NULL, NULL, "1980",
1968 "Defender (White label)\0", NULL, "Williams", "6809 System",
1969 NULL, NULL, NULL, NULL,
1970 BDF_GAME_WORKING | BDF_CLONE, 2, HARDWARE_MISC_PRE90S, GBF_HORSHOOT, 0,
1971 NULL, defenderwRomInfo, defenderwRomName, NULL, NULL, NULL, NULL, DefenderInputInfo, NULL,
1972 DefenderWhiteInit, DrvExit, DrvFrame, DrvDraw, DrvScan, &DrvRecalc, 0x10,
1973 292, 240, 4, 3
1974 };
1975
1976
1977 // T.T Defender
1978
1979 static struct BurnRomInfo defenderjRomDesc[] = {
1980 { "df1-1.e3", 0x1000, 0x8c04602b, 1 | BRF_PRG | BRF_ESS }, // 0 M6809 Code
1981 { "df2-1.e2", 0x1000, 0x89b75984, 1 | BRF_PRG | BRF_ESS }, // 1
1982 { "df3-1.e1", 0x1000, 0x94f51e9b, 1 | BRF_PRG | BRF_ESS }, // 2
1983 { "df10-1.a1", 0x0800, 0x12e2bd1c, 1 | BRF_PRG | BRF_ESS }, // 3
1984 { "df7-1.b1", 0x0800, 0xf1f88938, 1 | BRF_PRG | BRF_ESS }, // 4
1985 { "df9-1.a2", 0x0800, 0xb649e306, 1 | BRF_PRG | BRF_ESS }, // 5
1986 { "df6-1.b2", 0x0800, 0x9deaf6d9, 1 | BRF_PRG | BRF_ESS }, // 6
1987 { "df8-1.a3", 0x0800, 0x339e092e, 1 | BRF_PRG | BRF_ESS }, // 7
1988 { "df5-1.b3", 0x0800, 0xa543b167, 1 | BRF_PRG | BRF_ESS }, // 8
1989 { "df4-1.c1", 0x0800, 0x65f4efd1, 1 | BRF_PRG | BRF_ESS }, // 9
1990
1991 { "df12.i3", 0x0800, 0xf122d9c9, 2 | BRF_PRG | BRF_ESS }, // 10 M6808 Code
1992 };
1993
1994 STD_ROM_PICK(defenderj)
1995 STD_ROM_FN(defenderj)
1996
1997 struct BurnDriver BurnDrvDefenderj = {
1998 "defenderj", "defender", NULL, NULL, "1980",
1999 "T.T Defender\0", NULL, "Williams (Taito Corporation license)", "6809 System",
2000 NULL, NULL, NULL, NULL,
2001 BDF_GAME_WORKING | BDF_CLONE, 2, HARDWARE_MISC_PRE90S, GBF_HORSHOOT, 0,
2002 NULL, defenderjRomInfo, defenderjRomName, NULL, NULL, NULL, NULL, DefenderInputInfo, NULL,
2003 DefenderInit, DrvExit, DrvFrame, DrvDraw, DrvScan, &DrvRecalc, 0x10,
2004 292, 240, 4, 3
2005 };
2006
2007
2008 // Defender (bootleg)
2009
2010 static struct BurnRomInfo defndjeuRomDesc[] = {
2011 { "15", 0x1000, 0x706a24bd, 1 | BRF_PRG | BRF_ESS }, // 0 M6809 Code
2012 { "16", 0x1000, 0x03201532, 1 | BRF_PRG | BRF_ESS }, // 1
2013 { "17", 0x1000, 0x25287eca, 1 | BRF_PRG | BRF_ESS }, // 2
2014 { "21", 0x1000, 0xbddb71a3, 1 | BRF_PRG | BRF_ESS }, // 3
2015 { "20", 0x1000, 0x12fa0788, 1 | BRF_PRG | BRF_ESS }, // 4
2016 { "19", 0x1000, 0x769f5984, 1 | BRF_PRG | BRF_ESS }, // 5
2017 { "18", 0x1000, 0xe99d5679, 1 | BRF_PRG | BRF_ESS }, // 6
2018
2019 { "s", 0x0800, 0xcb79ae42, 2 | BRF_PRG | BRF_ESS }, // 7 M6808 Code
2020 };
2021
2022 STD_ROM_PICK(defndjeu)
2023 STD_ROM_FN(defndjeu)
2024
2025 struct BurnDriverD BurnDrvDefndjeu = {
2026 "defndjeu", "defender", NULL, NULL, "1980",
2027 "Defender (bootleg)\0", NULL, "bootleg (Jeutel)", "6809 System",
2028 NULL, NULL, NULL, NULL,
2029 BDF_CLONE | BDF_BOOTLEG, 2, HARDWARE_MISC_PRE90S, GBF_HORSHOOT, 0,
2030 NULL, defndjeuRomInfo, defndjeuRomName, NULL, NULL, NULL, NULL, DefenderInputInfo, NULL,
2031 DefenderInit, DrvExit, DrvFrame, DrvDraw, DrvScan, &DrvRecalc, 0x10,
2032 292, 240, 4, 3
2033 };
2034
2035
2036 // Tornado (set 1, Defender bootleg)
2037
2038 static struct BurnRomInfo tornado1RomDesc[] = {
2039 { "torna1.bin", 0x1000, 0x706a24bd, 1 | BRF_PRG | BRF_ESS }, // 0 M6809 Code
2040 { "torna3.bin", 0x1000, 0xa79213b2, 1 | BRF_PRG | BRF_ESS }, // 1
2041 { "torna4.bin", 0x1000, 0xf96d3d26, 1 | BRF_PRG | BRF_ESS }, // 2
2042 { "tornc4.bin", 0x1000, 0xe30f4c00, 1 | BRF_PRG | BRF_ESS }, // 3
2043 { "tornb3.bin", 0x1000, 0x0e3fef55, 1 | BRF_PRG | BRF_ESS }, // 4
2044 { "tornb1.bin", 0x1000, 0xf2bef850, 1 | BRF_PRG | BRF_ESS }, // 5
2045 { "tornb4.bin", 0x1000, 0xe99d5679, 1 | BRF_PRG | BRF_ESS }, // 6
2046
2047 { "tornb6.bin", 0x1000, 0x3685e033, 2 | BRF_PRG | BRF_ESS }, // 7 M6808 Code
2048 };
2049
2050 STD_ROM_PICK(tornado1)
2051 STD_ROM_FN(tornado1)
2052
2053 struct BurnDriver BurnDrvTornado1 = {
2054 "tornado1", "defender", NULL, NULL, "1980",
2055 "Tornado (set 1, Defender bootleg)\0", NULL, "bootleg (Jeutel)", "6809 System",
2056 NULL, NULL, NULL, NULL,
2057 BDF_GAME_NOT_WORKING | BDF_CLONE | BDF_BOOTLEG, 2, HARDWARE_MISC_PRE90S, GBF_HORSHOOT, 0,
2058 NULL, tornado1RomInfo, tornado1RomName, NULL, NULL, NULL, NULL, DefenderInputInfo, NULL,
2059 DefenderWhiteInit, DrvExit, DrvFrame, DrvDraw, DrvScan, &DrvRecalc, 0x10,
2060 292, 240, 4, 3
2061 };
2062
2063
2064 // Tornado (set 2, Defender bootleg)
2065
2066 static struct BurnRomInfo tornado2RomDesc[] = {
2067 { "tto15.bin", 0x1000, 0x910ac603, 1 | BRF_PRG | BRF_ESS }, // 0 M6809 Code
2068 { "to16.bin", 0x1000, 0x46ccd582, 1 | BRF_PRG | BRF_ESS }, // 1
2069 { "tto17.bin", 0x1000, 0xfaa3613c, 1 | BRF_PRG | BRF_ESS }, // 2
2070 { "to21.bin", 0x1000, 0xe30f4c00, 1 | BRF_PRG | BRF_ESS }, // 3
2071 { "to20.bin", 0x1000, 0xe90bdcb2, 1 | BRF_PRG | BRF_ESS }, // 4
2072 { "to19.bin", 0x1000, 0x42885b4f, 1 | BRF_PRG | BRF_ESS }, // 5
2073 { "to18.bin", 0x1000, 0xc15ffc03, 1 | BRF_PRG | BRF_ESS }, // 6
2074
2075 { "to_s.bin", 0x0800, 0xcb79ae42, 2 | BRF_PRG | BRF_ESS }, // 7 M6808 Code
2076 };
2077
2078 STD_ROM_PICK(tornado2)
2079 STD_ROM_FN(tornado2)
2080
2081 struct BurnDriverD BurnDrvTornado2 = {
2082 "tornado2", "defender", NULL, NULL, "1980",
2083 "Tornado (set 2, Defender bootleg)\0", NULL, "bootleg (Jeutel)", "6809 System",
2084 NULL, NULL, NULL, NULL,
2085 BDF_CLONE | BDF_BOOTLEG, 2, HARDWARE_MISC_PRE90S, GBF_HORSHOOT, 0,
2086 NULL, tornado2RomInfo, tornado2RomName, NULL, NULL, NULL, NULL, DefenderInputInfo, NULL,
2087 DefenderWhiteInit, DrvExit, DrvFrame, DrvDraw, DrvScan, &DrvRecalc, 0x10,
2088 292, 240, 4, 3
2089 };
2090
2091
2092 // Zero (set 1, Defender bootleg)
2093
2094 static struct BurnRomInfo zeroRomDesc[] = {
2095 { "zero-15", 0x1000, 0x706a24bd, 1 | BRF_PRG | BRF_ESS }, // 0 M6809 Code
2096 { "zero-16", 0x1000, 0xa79213b2, 1 | BRF_PRG | BRF_ESS }, // 1
2097 { "zero-17", 0x1000, 0x25287eca, 1 | BRF_PRG | BRF_ESS }, // 2
2098 { "zero-21", 0x1000, 0x7ca35cfd, 1 | BRF_PRG | BRF_ESS }, // 3
2099 { "zero-20", 0x1000, 0x0757967f, 1 | BRF_PRG | BRF_ESS }, // 4
2100 { "zero-19", 0x1000, 0xf2bef850, 1 | BRF_PRG | BRF_ESS }, // 5
2101 { "zero-18", 0x1000, 0xe99d5679, 1 | BRF_PRG | BRF_ESS }, // 6
2102
2103 { "video_sound_rom_1.ic12", 0x0800, 0xfefd5b48, 2 | BRF_PRG | BRF_ESS }, // 7 M6808 Code
2104 };
2105
2106 STD_ROM_PICK(zero)
2107 STD_ROM_FN(zero)
2108
2109 struct BurnDriver BurnDrvZero = {
2110 "zero", "defender", NULL, NULL, "1980",
2111 "Zero (set 1, Defender bootleg)\0", NULL, "bootleg (Jeutel)", "6809 System",
2112 NULL, NULL, NULL, NULL,
2113 BDF_GAME_NOT_WORKING | BDF_CLONE | BDF_BOOTLEG, 2, HARDWARE_MISC_PRE90S, GBF_HORSHOOT, 0,
2114 NULL, zeroRomInfo, zeroRomName, NULL, NULL, NULL, NULL, DefenderInputInfo, NULL,
2115 DefenderWhiteInit, DrvExit, DrvFrame, DrvDraw, DrvScan, &DrvRecalc, 0x10,
2116 292, 240, 4, 3
2117 };
2118
2119
2120 // Zero (set 2, Defender bootleg)
2121
2122 static struct BurnRomInfo zero2RomDesc[] = {
2123 { "15me.1a", 0x1000, 0x9323eee5, 1 | BRF_PRG | BRF_ESS }, // 0 M6809 Code
2124 { "to16.3a", 0x1000, 0xa79213b2, 1 | BRF_PRG | BRF_ESS }, // 1
2125 { "17m5.4a", 0x1000, 0x16a3c0dd, 1 | BRF_PRG | BRF_ESS }, // 2
2126 { "21.4c", 0x1000, 0x7ca35cfd, 1 | BRF_PRG | BRF_ESS }, // 3
2127 { "20m5.3b", 0x1000, 0x7473955b, 1 | BRF_PRG | BRF_ESS }, // 4
2128 { "to19.1b", 0x1000, 0xf2bef850, 1 | BRF_PRG | BRF_ESS }, // 5
2129 { "18m5.4b", 0x1000, 0x7e4afe43, 1 | BRF_PRG | BRF_ESS }, // 6
2130
2131 { "to4.6b", 0x0800, 0xcb79ae42, 2 | BRF_PRG | BRF_ESS }, // 7 M6808 Code
2132 };
2133
2134 STD_ROM_PICK(zero2)
2135 STD_ROM_FN(zero2)
2136
2137 struct BurnDriver BurnDrvZero2 = {
2138 "zero2", "defender", NULL, NULL, "1980",
2139 "Zero (set 2, Defender bootleg)\0", NULL, "bootleg (Amtec)", "6809 System",
2140 NULL, NULL, NULL, NULL,
2141 BDF_GAME_NOT_WORKING | BDF_CLONE | BDF_BOOTLEG, 2, HARDWARE_MISC_PRE90S, GBF_HORSHOOT, 0,
2142 NULL, zero2RomInfo, zero2RomName, NULL, NULL, NULL, NULL, DefenderInputInfo, NULL,
2143 DefenderWhiteInit, DrvExit, DrvFrame, DrvDraw, DrvScan, &DrvRecalc, 0x10,
2144 292, 240, 4, 3
2145 };
2146
2147
2148 // Defense Command (Defender bootleg)
2149
2150 static struct BurnRomInfo defcmndRomDesc[] = {
2151 { "defcmnda.1", 0x1000, 0x68effc1d, 1 | BRF_PRG | BRF_ESS }, // 0 M6809 Code
2152 { "defcmnda.2", 0x1000, 0x1126adc9, 1 | BRF_PRG | BRF_ESS }, // 1
2153 { "defcmnda.3", 0x1000, 0x7340209d, 1 | BRF_PRG | BRF_ESS }, // 2
2154 { "defcmnda.10", 0x0800, 0x3dddae75, 1 | BRF_PRG | BRF_ESS }, // 3
2155 { "defcmnda.7", 0x0800, 0x3f1e7cf8, 1 | BRF_PRG | BRF_ESS }, // 4
2156 { "defcmnda.9", 0x0800, 0x8882e1ff, 1 | BRF_PRG | BRF_ESS }, // 5
2157 { "defcmnda.6", 0x0800, 0xd068f0c5, 1 | BRF_PRG | BRF_ESS }, // 6
2158 { "defcmnda.8", 0x0800, 0xfef4cb77, 1 | BRF_PRG | BRF_ESS }, // 7
2159 { "defcmnda.5", 0x0800, 0x49b50b40, 1 | BRF_PRG | BRF_ESS }, // 8
2160 { "defcmnda.4", 0x0800, 0x43d42a1b, 1 | BRF_PRG | BRF_ESS }, // 9
2161
2162 { "defcmnda.snd", 0x0800, 0xf122d9c9, 2 | BRF_PRG | BRF_ESS }, // 10 M6808 Code
2163 };
2164
2165 STD_ROM_PICK(defcmnd)
2166 STD_ROM_FN(defcmnd)
2167
2168 struct BurnDriver BurnDrvDefcmnd = {
2169 "defcmnd", "defender", NULL, NULL, "1980",
2170 "Defense Command (Defender bootleg)\0", NULL, "bootleg", "6809 System",
2171 NULL, NULL, NULL, NULL,
2172 BDF_GAME_WORKING | BDF_CLONE | BDF_BOOTLEG, 2, HARDWARE_MISC_PRE90S, GBF_HORSHOOT, 0,
2173 NULL, defcmndRomInfo, defcmndRomName, NULL, NULL, NULL, NULL, DefenderInputInfo, NULL,
2174 DefenderWhiteInit, DrvExit, DrvFrame, DrvDraw, DrvScan, &DrvRecalc, 0x10,
2175 292, 240, 4, 3
2176 };
2177
2178
2179 // Star Trek (Defender bootleg)
2180
2181 static struct BurnRomInfo startrkdRomDesc[] = {
2182 { "st_rom8.bin", 0x1000, 0x5af871e3, 1 | BRF_PRG | BRF_ESS }, // 0 M6809 Code
2183 { "st_rom9.bin", 0x1000, 0x1126adc9, 1 | BRF_PRG | BRF_ESS }, // 1
2184 { "st_rom10.bin", 0x1000, 0x4097b46b, 1 | BRF_PRG | BRF_ESS }, // 2
2185 { "st_rom6.bin", 0x0800, 0x93012991, 1 | BRF_PRG | BRF_ESS }, // 3
2186 { "st_rom5.bin", 0x0800, 0xc6f0c004, 1 | BRF_PRG | BRF_ESS }, // 4
2187 { "st_rom4.bin", 0x0800, 0xb48430bf, 1 | BRF_PRG | BRF_ESS }, // 5
2188 { "st_rom3.bin", 0x0800, 0xd068f0c5, 1 | BRF_PRG | BRF_ESS }, // 6
2189 { "st_rom2.bin", 0x0800, 0xfef4cb77, 1 | BRF_PRG | BRF_ESS }, // 7
2190 { "st_rom1.bin", 0x0800, 0xd23d6cdb, 1 | BRF_PRG | BRF_ESS }, // 8
2191 { "st_rom7.bin", 0x0800, 0x43d42a1b, 1 | BRF_PRG | BRF_ESS }, // 9
2192
2193 { "video_sound_rom_1.ic12", 0x0800, 0xfefd5b48, 2 | BRF_PRG | BRF_ESS }, // 10 M6808 Code
2194 };
2195
2196 STD_ROM_PICK(startrkd)
2197 STD_ROM_FN(startrkd)
2198
2199 struct BurnDriver BurnDrvStartrkd = {
2200 "startrkd", "defender", NULL, NULL, "1981",
2201 "Star Trek (Defender bootleg)\0", NULL, "bootleg", "6809 System",
2202 NULL, NULL, NULL, NULL,
2203 BDF_GAME_WORKING | BDF_CLONE | BDF_BOOTLEG, 2, HARDWARE_MISC_PRE90S, GBF_HORSHOOT, 0,
2204 NULL, startrkdRomInfo, startrkdRomName, NULL, NULL, NULL, NULL, DefenderInputInfo, NULL,
2205 DefenderWhiteInit, DrvExit, DrvFrame, DrvDraw, DrvScan, &DrvRecalc, 0x10,
2206 292, 240, 4, 3
2207 };
2208
2209
2210 // Defence Command (Defender bootleg)
2211
2212 static struct BurnRomInfo defenceRomDesc[] = {
2213 { "1", 0x1000, 0xebc93622, 1 | BRF_PRG | BRF_ESS }, // 0 M6809 Code
2214 { "2", 0x1000, 0x2a4f4f44, 1 | BRF_PRG | BRF_ESS }, // 1
2215 { "3", 0x1000, 0xa4112f91, 1 | BRF_PRG | BRF_ESS }, // 2
2216 { "0", 0x0800, 0x7a1e5998, 1 | BRF_PRG | BRF_ESS }, // 3
2217 { "7", 0x0800, 0x4c2616a3, 1 | BRF_PRG | BRF_ESS }, // 4
2218 { "9", 0x0800, 0x7b146003, 1 | BRF_PRG | BRF_ESS }, // 5
2219 { "6", 0x0800, 0x6d748030, 1 | BRF_PRG | BRF_ESS }, // 6
2220 { "8", 0x0800, 0x52d5438b, 1 | BRF_PRG | BRF_ESS }, // 7
2221 { "5", 0x0800, 0x4a270340, 1 | BRF_PRG | BRF_ESS }, // 8
2222 { "4", 0x0800, 0xe13f457c, 1 | BRF_PRG | BRF_ESS }, // 9
2223
2224 { "defcmnda.snd", 0x0800, 0xf122d9c9, 2 | BRF_PRG | BRF_ESS }, // 10 M6808 Code
2225 };
2226
2227 STD_ROM_PICK(defence)
2228 STD_ROM_FN(defence)
2229
2230 struct BurnDriver BurnDrvDefence = {
2231 "defence", "defender", NULL, NULL, "1981",
2232 "Defence Command (Defender bootleg)\0", NULL, "bootleg (Outer Limits)", "6809 System",
2233 NULL, NULL, NULL, NULL,
2234 BDF_GAME_WORKING | BDF_CLONE | BDF_BOOTLEG, 2, HARDWARE_MISC_PRE90S, GBF_HORSHOOT, 0,
2235 NULL, defenceRomInfo, defenceRomName, NULL, NULL, NULL, NULL, DefenderInputInfo, NULL,
2236 DefenceInit, DrvExit, DrvFrame, DrvDraw, DrvScan, &DrvRecalc, 0x10,
2237 292, 240, 4, 3
2238 };
2239
2240
2241 // Attack (Defender bootleg)
2242
2243 static struct BurnRomInfo attackfRomDesc[] = {
2244 { "002-1.ic1", 0x1000, 0x0ee1019d, 1 | BRF_PRG | BRF_ESS }, // 0 M6809 Code
2245 { "002-2.ic2", 0x1000, 0xd184ab6b, 1 | BRF_PRG | BRF_ESS }, // 1
2246 { "002-3.ic3", 0x1000, 0xa732d649, 1 | BRF_PRG | BRF_ESS }, // 2
2247 { "002-9.ic12", 0x0800, 0xf57caa62, 1 | BRF_PRG | BRF_ESS }, // 3
2248 { "002-12.ic9", 0x0800, 0xeb73d8a1, 1 | BRF_PRG | BRF_ESS }, // 4
2249 { "002-8.ic11", 0x0800, 0x17f7abde, 1 | BRF_PRG | BRF_ESS }, // 5
2250 { "002-11.ic8", 0x0800, 0x5ca4e860, 1 | BRF_PRG | BRF_ESS }, // 6
2251 { "002-7.ic10", 0x0800, 0x545c3326, 1 | BRF_PRG | BRF_ESS }, // 7
2252 { "002-10.ic7", 0x0800, 0x3940d731, 1 | BRF_PRG | BRF_ESS }, // 8
2253 { "002-6.ic6", 0x0800, 0x3af34c05, 1 | BRF_PRG | BRF_ESS }, // 9
2254
2255 { "003-13.ic12", 0x0800, 0xfefd5b48, 2 | BRF_PRG | BRF_ESS }, // 10 M6808 Code
2256
2257 { "001-14.g1", 0x0200, 0x8dd98da5, 0 | BRF_OPT }, // 11 Address Decoder
2258 };
2259
2260 STD_ROM_PICK(attackf)
2261 STD_ROM_FN(attackf)
2262
2263 struct BurnDriver BurnDrvAttackf = {
2264 "attackf", "defender", NULL, NULL, "1980",
2265 "Attack (Defender bootleg)\0", NULL, "bootleg (Famare SA)", "6809 System",
2266 NULL, NULL, NULL, NULL,
2267 BDF_GAME_NOT_WORKING | BDF_CLONE | BDF_BOOTLEG, 2, HARDWARE_MISC_PRE90S, GBF_HORSHOOT, 0,
2268 NULL, attackfRomInfo, attackfRomName, NULL, NULL, NULL, NULL, DefenderInputInfo, NULL,
2269 DefenderInit, DrvExit, DrvFrame, DrvDraw, DrvScan, &DrvRecalc, 0x10,
2270 292, 240, 4, 3
2271 };
2272
2273
2274 // Galaxy Wars II (Defender bootleg)
2275
2276 static struct BurnRomInfo galwars2RomDesc[] = {
2277 { "9d-1-2532.bin", 0x1000, 0xebc93622, 1 | BRF_PRG | BRF_ESS }, // 0 M6809 Code
2278 { "9c-2-2532.bin", 0x1000, 0x2a4f4f44, 1 | BRF_PRG | BRF_ESS }, // 1
2279 { "8d-3-2532.bin", 0x1000, 0xa4112f91, 1 | BRF_PRG | BRF_ESS }, // 2
2280 { "4c-10-2716.bin", 0x0800, 0x7a1e5998, 1 | BRF_PRG | BRF_ESS }, // 3
2281 { "5d-7-2716.bin", 0x0800, 0xa9bdacdc, 1 | BRF_PRG | BRF_ESS }, // 4
2282 { "4d-9-2716.bin", 0x0800, 0x906dca8f, 1 | BRF_PRG | BRF_ESS }, // 5
2283 { "6c-6-2716.bin", 0x0800, 0x6d748030, 1 | BRF_PRG | BRF_ESS }, // 6
2284 { "5c-8-2716.bin", 0x0800, 0x52d5438b, 1 | BRF_PRG | BRF_ESS }, // 7
2285 { "6d-5-2716.bin", 0x0800, 0x4a270340, 1 | BRF_PRG | BRF_ESS }, // 8
2286 { "7c-4-2716.bin", 0x0800, 0xe13f457c, 1 | BRF_PRG | BRF_ESS }, // 9
2287
2288 { "3f-11-2716.bin", 0x0800, 0xf122d9c9, 2 | BRF_PRG | BRF_ESS }, // 10 M6808 Code
2289
2290 { "1l-13-8516.bin", 0x0800, 0x7e113979, 0 | BRF_OPT }, // 11 Unknown
2291 { "1a-12-8516.bin", 0x0800, 0xa562c506, 0 | BRF_OPT }, // 12
2292 };
2293
2294 STD_ROM_PICK(galwars2)
2295 STD_ROM_FN(galwars2)
2296
2297 struct BurnDriver BurnDrvGalwars2 = {
2298 "galwars2", "defender", NULL, NULL, "1981",
2299 "Galaxy Wars II (Defender bootleg)\0", NULL, "bootleg (Sonic)", "6809 System",
2300 NULL, NULL, NULL, NULL,
2301 BDF_GAME_WORKING | BDF_CLONE | BDF_BOOTLEG, 2, HARDWARE_MISC_PRE90S, GBF_HORSHOOT, 0,
2302 NULL, galwars2RomInfo, galwars2RomName, NULL, NULL, NULL, NULL, DefenderInputInfo, NULL,
2303 DefenceInit, DrvExit, DrvFrame, DrvDraw, DrvScan, &DrvRecalc, 0x10,
2304 292, 240, 4, 3
2305 };
2306
2307
2308 // Mayday (set 1)
2309
2310 static struct BurnRomInfo maydayRomDesc[] = {
2311 { "ic03-3.bin", 0x1000, 0xa1ff6e62, 1 | BRF_PRG | BRF_ESS }, // 0 M6809 Code
2312 { "ic02-2.bin", 0x1000, 0x62183aea, 1 | BRF_PRG | BRF_ESS }, // 1
2313 { "ic01-1.bin", 0x1000, 0x5dcb113f, 1 | BRF_PRG | BRF_ESS }, // 2
2314 { "ic04-4.bin", 0x1000, 0xea6a4ec8, 1 | BRF_PRG | BRF_ESS }, // 3
2315 { "ic05-5.bin", 0x1000, 0x0d797a3e, 1 | BRF_PRG | BRF_ESS }, // 4
2316 { "ic06-6.bin", 0x1000, 0xee8bfcd6, 1 | BRF_PRG | BRF_ESS }, // 5
2317 { "ic07-7d.bin", 0x1000, 0xd9c065e7, 1 | BRF_PRG | BRF_ESS }, // 6
2318
2319 { "ic28-8.bin", 0x0800, 0xfefd5b48, 2 | BRF_PRG | BRF_ESS }, // 7 M6808 Code
2320 };
2321
2322 STD_ROM_PICK(mayday)
STD_ROM_FN(mayday)2323 STD_ROM_FN(mayday)
2324
2325 static INT32 MaydayInit()
2326 {
2327 mayday = 1;
2328
2329 return DrvInit(0, 1, 12, -1, 0);
2330 }
2331
2332 struct BurnDriver BurnDrvMayday = {
2333 "mayday", NULL, NULL, NULL, "1980",
2334 "Mayday (set 1)\0", NULL, "Hoei", "6809 System",
2335 NULL, NULL, NULL, NULL,
2336 BDF_GAME_WORKING, 2, HARDWARE_MISC_PRE90S, GBF_HORSHOOT, 0,
2337 NULL, maydayRomInfo, maydayRomName, NULL, NULL, NULL, NULL, MaydayInputInfo, NULL,
2338 MaydayInit, DrvExit, DrvFrame, DrvDraw, DrvScan, &DrvRecalc, 0x10,
2339 292, 240, 4, 3
2340 };
2341
2342
2343 // Mayday (set 2)
2344
2345 static struct BurnRomInfo maydayaRomDesc[] = {
2346 { "mayday.c", 0x1000, 0x872a2f2d, 1 | BRF_PRG | BRF_ESS }, // 0 M6809 Code
2347 { "mayday.b", 0x1000, 0xc4ab5e22, 1 | BRF_PRG | BRF_ESS }, // 1
2348 { "mayday.a", 0x1000, 0x329a1318, 1 | BRF_PRG | BRF_ESS }, // 2
2349 { "mayday.d", 0x1000, 0xc2ae4716, 1 | BRF_PRG | BRF_ESS }, // 3
2350 { "mayday.e", 0x1000, 0x41225666, 1 | BRF_PRG | BRF_ESS }, // 4
2351 { "mayday.f", 0x1000, 0xc39be3c0, 1 | BRF_PRG | BRF_ESS }, // 5
2352 { "mayday.g", 0x1000, 0x2bd0f106, 1 | BRF_PRG | BRF_ESS }, // 6
2353
2354 { "ic28-8.bin", 0x0800, 0xfefd5b48, 2 | BRF_PRG | BRF_ESS }, // 7 M6808 Code
2355 };
2356
2357 STD_ROM_PICK(maydaya)
2358 STD_ROM_FN(maydaya)
2359
2360 struct BurnDriver BurnDrvMaydaya = {
2361 "maydaya", "mayday", NULL, NULL, "1980",
2362 "Mayday (set 2)\0", NULL, "Hoei", "6809 System",
2363 NULL, NULL, NULL, NULL,
2364 BDF_GAME_WORKING | BDF_CLONE, 2, HARDWARE_MISC_PRE90S, GBF_HORSHOOT, 0,
2365 NULL, maydayaRomInfo, maydayaRomName, NULL, NULL, NULL, NULL, MaydayInputInfo, NULL,
2366 MaydayInit, DrvExit, DrvFrame, DrvDraw, DrvScan, &DrvRecalc, 0x10,
2367 292, 240, 4, 3
2368 };
2369
2370
2371 // Mayday (set 3)
2372
2373 static struct BurnRomInfo maydaybRomDesc[] = {
2374 { "ic03-3.bin", 0x1000, 0xa1ff6e62, 1 | BRF_PRG | BRF_ESS }, // 0 M6809 Code
2375 { "ic02-2.bin", 0x1000, 0x62183aea, 1 | BRF_PRG | BRF_ESS }, // 1
2376 { "ic01-1.bin", 0x1000, 0x5dcb113f, 1 | BRF_PRG | BRF_ESS }, // 2
2377 { "rom7.bin", 0x1000, 0x0c3ca687, 1 | BRF_PRG | BRF_ESS }, // 3
2378 { "ic05-5.bin", 0x1000, 0x0d797a3e, 1 | BRF_PRG | BRF_ESS }, // 4
2379 { "ic06-6.bin", 0x1000, 0xee8bfcd6, 1 | BRF_PRG | BRF_ESS }, // 5
2380 { "ic07-7d.bin", 0x1000, 0xd9c065e7, 1 | BRF_PRG | BRF_ESS }, // 6
2381
2382 { "ic28-8.bin", 0x0800, 0xfefd5b48, 2 | BRF_PRG | BRF_ESS }, // 7 M6808 Code
2383
2384 { "rom11.bin", 0x0800, 0x7e113979, 0 | BRF_OPT }, // 8 user1
2385 { "rom12.bin", 0x0800, 0xa562c506, 0 | BRF_OPT }, // 9
2386 { "rom6a.bin", 0x0800, 0x8e4e981f, 0 | BRF_OPT }, // 10
2387 { "rom8-sos.bin", 0x0800, 0x6a9b383f, 0 | BRF_OPT }, // 11
2388 };
2389
2390 STD_ROM_PICK(maydayb)
2391 STD_ROM_FN(maydayb)
2392
2393 struct BurnDriver BurnDrvMaydayb = {
2394 "maydayb", "mayday", NULL, NULL, "1980",
2395 "Mayday (set 3)\0", NULL, "Hoei", "6809 System",
2396 NULL, NULL, NULL, NULL,
2397 BDF_GAME_WORKING | BDF_CLONE, 2, HARDWARE_MISC_PRE90S, GBF_HORSHOOT, 0,
2398 NULL, maydaybRomInfo, maydaybRomName, NULL, NULL, NULL, NULL, MaydayInputInfo, NULL,
2399 MaydayInit, DrvExit, DrvFrame, DrvDraw, DrvScan, &DrvRecalc, 0x10,
2400 292, 240, 4, 3
2401 };
2402
2403
2404 // Battle Zone (bootleg of Mayday)
2405
2406 static struct BurnRomInfo batlzoneRomDesc[] = {
2407 { "43-2732.rom.bin", 0x1000, 0x244334f8, 1 | BRF_PRG | BRF_ESS }, // 0 M6809 Code
2408 { "42-2732.rom.bin", 0x1000, 0x62183aea, 1 | BRF_PRG | BRF_ESS }, // 1
2409 { "41-2732.rom.bin", 0x1000, 0xa7e9093e, 1 | BRF_PRG | BRF_ESS }, // 2
2410 { "44-8532.rom.bin", 0x1000, 0xbba3e626, 1 | BRF_PRG | BRF_ESS }, // 3
2411 { "45-8532.rom.bin", 0x1000, 0x43b3a0de, 1 | BRF_PRG | BRF_ESS }, // 4
2412 { "46-8532.rom.bin", 0x1000, 0x3df9b901, 1 | BRF_PRG | BRF_ESS }, // 5
2413 { "47-8532.rom.bin", 0x1000, 0x55a27e02, 1 | BRF_PRG | BRF_ESS }, // 6
2414
2415 { "48-2716.rom.bin", 0x0800, 0xfefd5b48, 2 | BRF_PRG | BRF_ESS }, // 7 M6808 Code
2416 };
2417
2418 STD_ROM_PICK(batlzone)
2419 STD_ROM_FN(batlzone)
2420
2421 struct BurnDriver BurnDrvBatlzone = {
2422 "batlzone", "mayday", NULL, NULL, "1980",
2423 "Battle Zone (bootleg of Mayday)\0", NULL, "bootleg (Video Game)", "6809 System",
2424 NULL, NULL, NULL, NULL,
2425 BDF_GAME_WORKING | BDF_CLONE | BDF_BOOTLEG, 2, HARDWARE_MISC_PRE90S, GBF_HORSHOOT, 0,
2426 NULL, batlzoneRomInfo, batlzoneRomName, NULL, NULL, NULL, NULL, MaydayInputInfo, NULL,
2427 MaydayInit, DrvExit, DrvFrame, DrvDraw, DrvScan, &DrvRecalc, 0x10,
2428 292, 240, 4, 3
2429 };
2430
2431
2432 // Colony 7 (set 1)
2433
2434 static struct BurnRomInfo colony7RomDesc[] = {
2435 { "cs03.bin", 0x1000, 0x7ee75ae5, 1 | BRF_PRG | BRF_ESS }, // 0 M6809 Code
2436 { "cs02.bin", 0x1000, 0xc60b08cb, 1 | BRF_PRG | BRF_ESS }, // 1
2437 { "cs01.bin", 0x1000, 0x1bc97436, 1 | BRF_PRG | BRF_ESS }, // 2
2438 { "cs06.bin", 0x0800, 0x318b95af, 1 | BRF_PRG | BRF_ESS }, // 3
2439 { "cs04.bin", 0x0800, 0xd740faee, 1 | BRF_PRG | BRF_ESS }, // 4
2440 { "cs07.bin", 0x0800, 0x0b23638b, 1 | BRF_PRG | BRF_ESS }, // 5
2441 { "cs05.bin", 0x0800, 0x59e406a8, 1 | BRF_PRG | BRF_ESS }, // 6
2442 { "cs08.bin", 0x0800, 0x3bfde87a, 1 | BRF_PRG | BRF_ESS }, // 7
2443
2444 { "cs11.bin", 0x0800, 0x6032293c, 2 | BRF_PRG | BRF_ESS }, // 8 M6808 Code
2445
2446 { "cs10.bin", 0x0200, 0x25de5d85, 0 | BRF_OPT }, // 9 Address Decoder?
2447 { "decoder.3", 0x0200, 0xc3f45f70, 0 | BRF_OPT }, // 10
2448 };
2449
2450 STD_ROM_PICK(colony7)
STD_ROM_FN(colony7)2451 STD_ROM_FN(colony7)
2452
2453 static INT32 Colony7Init()
2454 {
2455 return DrvInit(0, 0, 14, -1, 0);
2456 }
2457
2458 struct BurnDriver BurnDrvColony7 = {
2459 "colony7", NULL, NULL, NULL, "1981",
2460 "Colony 7 (set 1)\0", NULL, "Taito", "6809 System",
2461 NULL, NULL, NULL, NULL,
2462 BDF_GAME_WORKING | BDF_ORIENTATION_VERTICAL, 2, HARDWARE_MISC_PRE90S, GBF_SHOOT, 0,
2463 NULL, colony7RomInfo, colony7RomName, NULL, NULL, NULL, NULL, Colony7InputInfo, Colony7DIPInfo,
2464 Colony7Init, DrvExit, DrvFrame, DrvDraw, DrvScan, &DrvRecalc, 0x10,
2465 240, 292, 3, 4
2466 };
2467
2468
2469 // Colony 7 (set 2)
2470
2471 static struct BurnRomInfo colony7aRomDesc[] = {
2472 { "cs03a.bin", 0x1000, 0xe0b0d23b, 1 | BRF_PRG | BRF_ESS }, // 0 M6809 Code
2473 { "cs02a.bin", 0x1000, 0x370c6f41, 1 | BRF_PRG | BRF_ESS }, // 1
2474 { "cs01a.bin", 0x1000, 0xba299946, 1 | BRF_PRG | BRF_ESS }, // 2
2475 { "cs06.bin", 0x0800, 0x318b95af, 1 | BRF_PRG | BRF_ESS }, // 3
2476 { "cs04.bin", 0x0800, 0xd740faee, 1 | BRF_PRG | BRF_ESS }, // 4
2477 { "cs07.bin", 0x0800, 0x0b23638b, 1 | BRF_PRG | BRF_ESS }, // 5
2478 { "cs05.bin", 0x0800, 0x59e406a8, 1 | BRF_PRG | BRF_ESS }, // 6
2479 { "cs08.bin", 0x0800, 0x3bfde87a, 1 | BRF_PRG | BRF_ESS }, // 7
2480
2481 { "cs11.bin", 0x0800, 0x6032293c, 2 | BRF_PRG | BRF_ESS }, // 8 M6808 Code
2482
2483 { "cs10.bin", 0x0200, 0x25de5d85, 0 | BRF_OPT }, // 9 Address Decoder?
2484 { "decoder.3", 0x0200, 0xc3f45f70, 0 | BRF_OPT }, // 10
2485 };
2486
2487 STD_ROM_PICK(colony7a)
2488 STD_ROM_FN(colony7a)
2489
2490 struct BurnDriver BurnDrvColony7a = {
2491 "colony7a", "colony7", NULL, NULL, "1981",
2492 "Colony 7 (set 2)\0", NULL, "Taito", "6809 System",
2493 NULL, NULL, NULL, NULL,
2494 BDF_GAME_WORKING | BDF_CLONE | BDF_ORIENTATION_VERTICAL, 2, HARDWARE_MISC_PRE90S, GBF_SHOOT, 0,
2495 NULL, colony7aRomInfo, colony7aRomName, NULL, NULL, NULL, NULL, Colony7InputInfo, Colony7DIPInfo,
2496 Colony7Init, DrvExit, DrvFrame, DrvDraw, DrvScan, &DrvRecalc, 0x10,
2497 240, 292, 3, 4
2498 };
2499
2500
2501 // Jin
2502
2503 static struct BurnRomInfo jinRomDesc[] = {
2504 { "jin11.6c", 0x1000, 0xc4b9e93f, 1 | BRF_PRG | BRF_ESS }, // 0 M6809 Code
2505 { "jin12.7c", 0x1000, 0xa8bc9fdd, 1 | BRF_PRG | BRF_ESS }, // 1
2506 { "jin13.6d", 0x1000, 0x79779b85, 1 | BRF_PRG | BRF_ESS }, // 2
2507 { "jin14.4c", 0x1000, 0x6a4df97e, 1 | BRF_PRG | BRF_ESS }, // 3
2508
2509 { "jin15.3f", 0x0800, 0xfefd5b48, 2 | BRF_PRG | BRF_ESS }, // 4 M6808 Code
2510
2511 { "jin.1a", 0x0200, 0x8dd98da5, 0 | BRF_OPT }, // 5 Address Decoder?
2512 { "jin.1l", 0x0200, 0xc3f45f70, 0 | BRF_OPT }, // 6
2513 };
2514
2515 STD_ROM_PICK(jin)
STD_ROM_FN(jin)2516 STD_ROM_FN(jin)
2517
2518 static INT32 JinInit()
2519 {
2520 return DrvInit(0, 0, 0, -1, 0);
2521 }
2522
2523 struct BurnDriver BurnDrvJin = {
2524 "jin", NULL, NULL, NULL, "1982",
2525 "Jin\0", NULL, "Falcon", "6809 System",
2526 NULL, NULL, NULL, NULL,
2527 BDF_GAME_WORKING | BDF_ORIENTATION_VERTICAL | BDF_ORIENTATION_FLIPPED, 2, HARDWARE_MISC_PRE90S, GBF_PUZZLE, 0,
2528 NULL, jinRomInfo, jinRomName, NULL, NULL, NULL, NULL, JinInputInfo, JinDIPInfo,
2529 JinInit, DrvExit, DrvFrame, DrvDraw, DrvScan, &DrvRecalc, 0x10,
2530 240, 316, 3, 4
2531 };
2532
2533
2534 // Stargate
2535 /* "B" ROMs labeled 3002-13 through 3002-24, identical data */
2536
2537 static struct BurnRomInfo stargateRomDesc[] = {
2538 { "stargate_rom_10-a_3002-10.a7", 0x1000, 0x60b07ff7, 1 | BRF_PRG | BRF_ESS }, // 0 M6809 Code
2539 { "stargate_rom_11-a_3002-11.c7", 0x1000, 0x7d2c5daf, 1 | BRF_PRG | BRF_ESS }, // 1
2540 { "stargate_rom_12-a_3002-12.e7", 0x1000, 0xa0396670, 1 | BRF_PRG | BRF_ESS }, // 2
2541 { "stargate_rom_1-a_3002-1.e4", 0x1000, 0x88824d18, 1 | BRF_PRG | BRF_ESS }, // 3
2542 { "stargate_rom_2-a_3002-2.c4", 0x1000, 0xafc614c5, 1 | BRF_PRG | BRF_ESS }, // 4
2543 { "stargate_rom_3-a_3002-3.a4", 0x1000, 0x15077a9d, 1 | BRF_PRG | BRF_ESS }, // 5
2544 { "stargate_rom_4-a_3002-4.e5", 0x1000, 0xa8b4bf0f, 1 | BRF_PRG | BRF_ESS }, // 6
2545 { "stargate_rom_5-a_3002-5.c5", 0x1000, 0x2d306074, 1 | BRF_PRG | BRF_ESS }, // 7
2546 { "stargate_rom_6-a_3002-6.a5", 0x1000, 0x53598dde, 1 | BRF_PRG | BRF_ESS }, // 8
2547 { "stargate_rom_7-a_3002-7.e6", 0x1000, 0x23606060, 1 | BRF_PRG | BRF_ESS }, // 9
2548 { "stargate_rom_8-a_3002-8.c6", 0x1000, 0x4ec490c7, 1 | BRF_PRG | BRF_ESS }, // 10
2549 { "stargate_rom_9-a_3002-9.a6", 0x1000, 0x88187b64, 1 | BRF_PRG | BRF_ESS }, // 11
2550
2551 { "video_sound_rom_2_std_744.ic12", 0x0800, 0x2fcf6c4d, 2 | BRF_PRG | BRF_ESS }, // 12 M6800 Code
2552
2553 { "decoder_rom_4.3g", 0x0200, 0xe6631c23, 0 | BRF_OPT }, // 13 Address Decoder
2554 { "decoder_rom_5.3c", 0x0200, 0xf921c5fe, 0 | BRF_OPT }, // 14
2555 };
2556
2557 STD_ROM_PICK(stargate)
STD_ROM_FN(stargate)2558 STD_ROM_FN(stargate)
2559
2560 static INT32 StargateInit()
2561 {
2562 defender_control_hack = 0x9c92;
2563
2564 return DrvInit(1, 0, 6, -1, 0);
2565 }
2566
2567 struct BurnDriver BurnDrvStargate = {
2568 "stargate", NULL, NULL, NULL, "1981",
2569 "Stargate\0", NULL, "Williams / Vid Kidz", "6809 System",
2570 NULL, NULL, NULL, NULL,
2571 BDF_GAME_WORKING, 2, HARDWARE_MISC_PRE90S, GBF_HORSHOOT, 0,
2572 NULL, stargateRomInfo, stargateRomName, NULL, NULL, NULL, NULL, StargateInputInfo, NULL,
2573 StargateInit, DrvExit, DrvFrame, DrvDraw, DrvScan, &DrvRecalc, 0x10,
2574 292, 240, 4, 3
2575 };
2576
2577
2578 // Robotron: 2084 (Solid Blue label)
2579 /* Solid Blue labels, "B" type ROMs labeled 3005-13 through 3005-24 */
2580
2581 static struct BurnRomInfo robotronRomDesc[] = {
2582 { "2084_rom_10b_3005-22.a7", 0x1000, 0x13797024, 1 | BRF_PRG | BRF_ESS }, // 0 M6809 Code
2583 { "2084_rom_11b_3005-23.c7", 0x1000, 0x7e3c1b87, 1 | BRF_PRG | BRF_ESS }, // 1
2584 { "2084_rom_12b_3005-24.e7", 0x1000, 0x645d543e, 1 | BRF_PRG | BRF_ESS }, // 2
2585 { "2084_rom_1b_3005-13.e4", 0x1000, 0x66c7d3ef, 1 | BRF_PRG | BRF_ESS }, // 3
2586 { "2084_rom_2b_3005-14.c4", 0x1000, 0x5bc6c614, 1 | BRF_PRG | BRF_ESS }, // 4
2587 { "2084_rom_3b_3005-15.a4", 0x1000, 0xe99a82be, 1 | BRF_PRG | BRF_ESS }, // 5
2588 { "2084_rom_4b_3005-16.e5", 0x1000, 0xafb1c561, 1 | BRF_PRG | BRF_ESS }, // 6
2589 { "2084_rom_5b_3005-17.c5", 0x1000, 0x62691e77, 1 | BRF_PRG | BRF_ESS }, // 7
2590 { "2084_rom_6b_3005-18.a5", 0x1000, 0xbd2c853d, 1 | BRF_PRG | BRF_ESS }, // 8
2591 { "2084_rom_7b_3005-19.e6", 0x1000, 0x49ac400c, 1 | BRF_PRG | BRF_ESS }, // 9
2592 { "2084_rom_8b_3005-20.c6", 0x1000, 0x3a96e88c, 1 | BRF_PRG | BRF_ESS }, // 10
2593 { "2084_rom_9b_3005-21.a6", 0x1000, 0xb124367b, 1 | BRF_PRG | BRF_ESS }, // 11
2594
2595 { "video_sound_rom_3_std_767.ic12", 0x1000, 0xc56c1d28, 2 | BRF_PRG | BRF_ESS }, // 12 M6800 Code
2596
2597 { "decoder_rom_4.3g", 0x0200, 0xe6631c23, 0 | BRF_OPT }, // 13 Address Decoder
2598 { "decoder_rom_6.3c", 0x0200, 0x83faf25e, 0 | BRF_OPT }, // 14
2599 };
2600
2601 STD_ROM_PICK(robotron)
STD_ROM_FN(robotron)2602 STD_ROM_FN(robotron)
2603
2604 static INT32 RobotronInit()
2605 {
2606 return DrvInit(1, 0, 6, 1, 0xc000);
2607 }
2608
2609 struct BurnDriver BurnDrvRobotron = {
2610 "robotron", NULL, NULL, NULL, "1982",
2611 "Robotron: 2084 (Solid Blue label)\0", NULL, "Williams / Vid Kidz", "6809 System",
2612 NULL, NULL, NULL, NULL,
2613 BDF_GAME_WORKING, 2, HARDWARE_MISC_PRE90S, GBF_SHOOT, 0,
2614 NULL, robotronRomInfo, robotronRomName, NULL, NULL, NULL, NULL, RobotronInputInfo, NULL,
2615 RobotronInit, DrvExit, DrvFrame, DrvDraw, DrvScan, &DrvRecalc, 0x10,
2616 292, 240, 4, 3
2617 };
2618
2619
2620 // Robotron: 2084 (Yellow/Orange label)
2621 /* Yellow label / Red stripe & Black print or Yellow label / Red stripe & Green print "B" type ROMs numbered 3005-13 through 3005-24 */
2622
2623 static struct BurnRomInfo robotronyoRomDesc[] = {
2624 { "2084_rom_10b_3005-10.a7", 0x1000, 0x4a9d5f52, 1 | BRF_PRG | BRF_ESS }, // 0 M6809 Code
2625 { "2084_rom_11b_3005-11.c7", 0x1000, 0x2afc5e7f, 1 | BRF_PRG | BRF_ESS }, // 1
2626 { "2084_rom_12b_3005-12.e7", 0x1000, 0x45da9202, 1 | BRF_PRG | BRF_ESS }, // 2
2627 { "2084_rom_1b_3005-1.e4", 0x1000, 0x66c7d3ef, 1 | BRF_PRG | BRF_ESS }, // 3
2628 { "2084_rom_2b_3005-2.c4", 0x1000, 0x5bc6c614, 1 | BRF_PRG | BRF_ESS }, // 4
2629 { "2084_rom_3b_3005-3.a4", 0x1000, 0x67a369bc, 1 | BRF_PRG | BRF_ESS }, // 5
2630 { "2084_rom_4b_3005-4.e5", 0x1000, 0xb0de677a, 1 | BRF_PRG | BRF_ESS }, // 6
2631 { "2084_rom_5b_3005-5.c5", 0x1000, 0x24726007, 1 | BRF_PRG | BRF_ESS }, // 7
2632 { "2084_rom_6b_3005-6.a5", 0x1000, 0x028181a6, 1 | BRF_PRG | BRF_ESS }, // 8
2633 { "2084_rom_7b_3005-7.e6", 0x1000, 0x4dfcceae, 1 | BRF_PRG | BRF_ESS }, // 9
2634 { "2084_rom_8b_3005-8.c6", 0x1000, 0x3a96e88c, 1 | BRF_PRG | BRF_ESS }, // 10
2635 { "2084_rom_9b_3005-9.a6", 0x1000, 0xb124367b, 1 | BRF_PRG | BRF_ESS }, // 11
2636
2637 { "video_sound_rom_3_std_767.ic12", 0x1000, 0xc56c1d28, 2 | BRF_PRG | BRF_ESS }, // 12 M6800 Code
2638
2639 { "decoder_rom_4.3g", 0x0200, 0xe6631c23, 0 | BRF_OPT }, // 13 Address Decoder
2640 { "decoder_rom_6.3c", 0x0200, 0x83faf25e, 0 | BRF_OPT }, // 14
2641 };
2642
2643 STD_ROM_PICK(robotronyo)
2644 STD_ROM_FN(robotronyo)
2645
2646 struct BurnDriver BurnDrvRobotronyo = {
2647 "robotronyo", "robotron", NULL, NULL, "1982",
2648 "Robotron: 2084 (Yellow/Orange label)\0", NULL, "Williams / Vid Kidz", "6809 System",
2649 NULL, NULL, NULL, NULL,
2650 BDF_GAME_WORKING | BDF_CLONE, 2, HARDWARE_MISC_PRE90S, GBF_SHOOT, 0,
2651 NULL, robotronyoRomInfo, robotronyoRomName, NULL, NULL, NULL, NULL, RobotronInputInfo, NULL,
2652 RobotronInit, DrvExit, DrvFrame, DrvDraw, DrvScan, &DrvRecalc, 0x10,
2653 292, 240, 4, 3
2654 };
2655
2656
2657 // Robotron: 2084 (Unidesa license)
2658
2659 static struct BurnRomInfo robotronunRomDesc[] = {
2660 { "roboun11.10b", 0x1000, 0x13797024, 1 | BRF_PRG | BRF_ESS }, // 0 M6809 Code
2661 { "roboun11.11b", 0x1000, 0x7e3c1b87, 1 | BRF_PRG | BRF_ESS }, // 1
2662 { "roboun11.12b", 0x1000, 0x645d543e, 1 | BRF_PRG | BRF_ESS }, // 2
2663 { "roboun11.1b", 0x1000, 0x66c7d3ef, 1 | BRF_PRG | BRF_ESS }, // 3
2664 { "roboun11.2b", 0x1000, 0x5bc6c614, 1 | BRF_PRG | BRF_ESS }, // 4
2665 { "roboun11.3b", 0x1000, 0xe99a82be, 1 | BRF_PRG | BRF_ESS }, // 5
2666 { "roboun11.4b", 0x1000, 0xafb1c561, 1 | BRF_PRG | BRF_ESS }, // 6
2667 { "roboun11.5b", 0x1000, 0x62691e77, 1 | BRF_PRG | BRF_ESS }, // 7
2668 { "roboun11.6b", 0x1000, 0xbd2c853d, 1 | BRF_PRG | BRF_ESS }, // 8
2669 { "roboun11.7b", 0x1000, 0x8981a43b, 1 | BRF_PRG | BRF_ESS }, // 9
2670 { "roboun11.8b", 0x1000, 0x3a96e88c, 1 | BRF_PRG | BRF_ESS }, // 10
2671 { "roboun11.9b", 0x1000, 0xb124367b, 1 | BRF_PRG | BRF_ESS }, // 11
2672
2673 { "video_sound_rom_3_std_767.ic12", 0x1000, 0xc56c1d28, 2 | BRF_PRG | BRF_ESS }, // 12 M6800 Code
2674
2675 { "decoder_rom_4.3g", 0x0200, 0xe6631c23, 0 | BRF_OPT }, // 13 Address Decoder
2676 { "decoder_rom_6.3c", 0x0200, 0x83faf25e, 0 | BRF_OPT }, // 14
2677 };
2678
2679 STD_ROM_PICK(robotronun)
2680 STD_ROM_FN(robotronun)
2681
2682 struct BurnDriver BurnDrvRobotronun = {
2683 "robotronun", "robotron", NULL, NULL, "1987",
2684 "Robotron: 2084 (Unidesa license)\0", NULL, "Williams / Vid Kidz (Unidesa license)", "6809 System",
2685 NULL, NULL, NULL, NULL,
2686 BDF_GAME_WORKING | BDF_CLONE, 2, HARDWARE_MISC_PRE90S, GBF_SHOOT, 0,
2687 NULL, robotronunRomInfo, robotronunRomName, NULL, NULL, NULL, NULL, RobotronInputInfo, NULL,
2688 RobotronInit, DrvExit, DrvFrame, DrvDraw, DrvScan, &DrvRecalc, 0x10,
2689 292, 240, 4, 3
2690 };
2691
2692
2693 // Robotron: 2084 (1987 'shot-in-the-corner' bugfix)
2694 /* Patch by Christian Gingras in 1987 fixing 7 bugs, AKA "Shot in the corner" bug fix */
2695
2696 static struct BurnRomInfo robotron87RomDesc[] = {
2697 { "2084_rom_10b_3005-22.a7", 0x1000, 0x13797024, 1 | BRF_PRG | BRF_ESS }, // 0 M6809 Code
2698 { "fixrobo_rom_11b.c7", 0x1000, 0xe83a2eda, 1 | BRF_PRG | BRF_ESS }, // 1
2699 { "2084_rom_12b_3005-24.e7", 0x1000, 0x645d543e, 1 | BRF_PRG | BRF_ESS }, // 2
2700 { "2084_rom_1b_3005-13.e4", 0x1000, 0x66c7d3ef, 1 | BRF_PRG | BRF_ESS }, // 3
2701 { "2084_rom_2b_3005-14.c4", 0x1000, 0x5bc6c614, 1 | BRF_PRG | BRF_ESS }, // 4
2702 { "2084_rom_3b_3005-15.a4", 0x1000, 0xe99a82be, 1 | BRF_PRG | BRF_ESS }, // 5
2703 { "2084_rom_4b_3005-16.e5", 0x1000, 0xafb1c561, 1 | BRF_PRG | BRF_ESS }, // 6
2704 { "fixrobo_rom_5b.c5", 0x1000, 0x827cb5c9, 1 | BRF_PRG | BRF_ESS }, // 7
2705 { "2084_rom_6b_3005-18.a5", 0x1000, 0xbd2c853d, 1 | BRF_PRG | BRF_ESS }, // 8
2706 { "2084_rom_7b_3005-19.e6", 0x1000, 0x49ac400c, 1 | BRF_PRG | BRF_ESS }, // 9
2707 { "2084_rom_8b_3005-20.c6", 0x1000, 0x3a96e88c, 1 | BRF_PRG | BRF_ESS }, // 10
2708 { "2084_rom_9b_3005-21.a6", 0x1000, 0xb124367b, 1 | BRF_PRG | BRF_ESS }, // 11
2709
2710 { "video_sound_rom_3_std_767.ic12", 0x1000, 0xc56c1d28, 2 | BRF_PRG | BRF_ESS }, // 12 M6800 Code
2711
2712 { "decoder_rom_4.3g", 0x0200, 0xe6631c23, 0 | BRF_OPT }, // 13 Address Decoder
2713 { "decoder_rom_6.3c", 0x0200, 0x83faf25e, 0 | BRF_OPT }, // 14
2714 };
2715
2716 STD_ROM_PICK(robotron87)
2717 STD_ROM_FN(robotron87)
2718
2719 struct BurnDriver BurnDrvRobotron87 = {
2720 "robotron87", "robotron", NULL, NULL, "1987",
2721 "Robotron: 2084 (1987 'shot-in-the-corner' bugfix)\0", NULL, "hack", "6809 System",
2722 NULL, NULL, NULL, NULL,
2723 BDF_GAME_WORKING | BDF_CLONE, 2, HARDWARE_MISC_PRE90S, GBF_SHOOT, 0,
2724 NULL, robotron87RomInfo, robotron87RomName, NULL, NULL, NULL, NULL, RobotronInputInfo, NULL,
2725 RobotronInit, DrvExit, DrvFrame, DrvDraw, DrvScan, &DrvRecalc, 0x10,
2726 292, 240, 4, 3
2727 };
2728
2729
2730 // Robotron: 2084 (2012 'wave 201 start' hack)
2731
2732 static struct BurnRomInfo robotron12RomDesc[] = {
2733 { "2084_rom_10b_3005-22.a7", 0x1000, 0x13797024, 1 | BRF_PRG | BRF_ESS }, // 0 M6809 Code
2734 { "fixrobo_rom_11b.c7", 0x1000, 0xe83a2eda, 1 | BRF_PRG | BRF_ESS }, // 1
2735 { "2084_rom_12b_3005-24.e7", 0x1000, 0x645d543e, 1 | BRF_PRG | BRF_ESS }, // 2
2736 { "2084_rom_1b_3005-13.e4", 0x1000, 0x66c7d3ef, 1 | BRF_PRG | BRF_ESS }, // 3
2737 { "2084_rom_2b_3005-14.c4", 0x1000, 0x5bc6c614, 1 | BRF_PRG | BRF_ESS }, // 4
2738 { "wave201.a4", 0x1000, 0x85eb583e, 1 | BRF_PRG | BRF_ESS }, // 5
2739 { "2084_rom_4b_3005-16.e5", 0x1000, 0xafb1c561, 1 | BRF_PRG | BRF_ESS }, // 6
2740 { "fixrobo_rom_5b.c5", 0x1000, 0x827cb5c9, 1 | BRF_PRG | BRF_ESS }, // 7
2741 { "2084_rom_6b_3005-18.a5", 0x1000, 0xbd2c853d, 1 | BRF_PRG | BRF_ESS }, // 8
2742 { "2084_rom_7b_3005-19.e6", 0x1000, 0x49ac400c, 1 | BRF_PRG | BRF_ESS }, // 9
2743 { "2084_rom_8b_3005-20.c6", 0x1000, 0x3a96e88c, 1 | BRF_PRG | BRF_ESS }, // 10
2744 { "2084_rom_9b_3005-21.a6", 0x1000, 0xb124367b, 1 | BRF_PRG | BRF_ESS }, // 11
2745
2746 { "video_sound_rom_3_std_767.ic12", 0x1000, 0xc56c1d28, 2 | BRF_PRG | BRF_ESS }, // 12 M6800 Code
2747
2748 { "decoder_rom_4.3g", 0x0200, 0xe6631c23, 0 | BRF_OPT }, // 13 Address Decoder
2749 { "decoder_rom_6.3c", 0x0200, 0x83faf25e, 0 | BRF_OPT }, // 14
2750 };
2751
2752 STD_ROM_PICK(robotron12)
2753 STD_ROM_FN(robotron12)
2754
2755 struct BurnDriver BurnDrvRobotron12 = {
2756 "robotron12", "robotron", NULL, NULL, "2012",
2757 "Robotron: 2084 (2012 'wave 201 start' hack)\0", NULL, "hack", "6809 System",
2758 NULL, NULL, NULL, NULL,
2759 BDF_GAME_WORKING | BDF_CLONE, 2, HARDWARE_MISC_POST90S, GBF_SHOOT, 0,
2760 NULL, robotron12RomInfo, robotron12RomName, NULL, NULL, NULL, NULL, RobotronInputInfo, NULL,
2761 RobotronInit, DrvExit, DrvFrame, DrvDraw, DrvScan, &DrvRecalc, 0x10,
2762 292, 240, 4, 3
2763 };
2764
2765
2766 // Robotron: 2084 (2015 'tie-die V2' hack)
2767 /* Tie-Die version starts with a "Solid Blue label" set */
2768
2769 static struct BurnRomInfo robotrontdRomDesc[] = {
2770 { "tiedie_rom_10b.a7", 0x1000, 0x952bea55, 1 | BRF_PRG | BRF_ESS }, // 0 M6809 Code
2771 { "tiedie_rom_11b.c7", 0x1000, 0x4c05fd3c, 1 | BRF_PRG | BRF_ESS }, // 1
2772 { "2084_rom_12b_3005-24.e7", 0x1000, 0x645d543e, 1 | BRF_PRG | BRF_ESS }, // 2
2773 { "2084_rom_1b_3005-13.e4", 0x1000, 0x66c7d3ef, 1 | BRF_PRG | BRF_ESS }, // 3
2774 { "2084_rom_2b_3005-14.c4", 0x1000, 0x5bc6c614, 1 | BRF_PRG | BRF_ESS }, // 4
2775 { "2084_rom_3b_3005-15.a4", 0x1000, 0xe99a82be, 1 | BRF_PRG | BRF_ESS }, // 5
2776 { "tiedie_rom_4b.e5", 0x1000, 0xe8238019, 1 | BRF_PRG | BRF_ESS }, // 6
2777 { "fixrobo_rom_5b.c5", 0x1000, 0x827cb5c9, 1 | BRF_PRG | BRF_ESS }, // 7
2778 { "2084_rom_6b_3005-18.a5", 0x1000, 0xbd2c853d, 1 | BRF_PRG | BRF_ESS }, // 8
2779 { "tiedie_rom_7b.e6", 0x1000, 0x3ecf4620, 1 | BRF_PRG | BRF_ESS }, // 9
2780 { "tiedie_rom_8b.c6", 0x1000, 0x752d7a46, 1 | BRF_PRG | BRF_ESS }, // 10
2781 { "2084_rom_9b_3005-21.a6", 0x1000, 0xb124367b, 1 | BRF_PRG | BRF_ESS }, // 11
2782
2783 { "video_sound_rom_3_std_767.ic12", 0x1000, 0xc56c1d28, 2 | BRF_PRG | BRF_ESS }, // 12 M6800 Code
2784
2785 { "decoder_rom_4.3g", 0x0200, 0xe6631c23, 0 | BRF_OPT }, // 13 Address Decoder
2786 { "decoder_rom_6.3c", 0x0200, 0x83faf25e, 0 | BRF_OPT }, // 14
2787 };
2788
2789 STD_ROM_PICK(robotrontd)
2790 STD_ROM_FN(robotrontd)
2791
2792 struct BurnDriver BurnDrvRobotrontd = {
2793 "robotrontd", "robotron", NULL, NULL, "2015",
2794 "Robotron: 2084 (2015 'tie-die V2' hack)\0", NULL, "hack", "6809 System",
2795 NULL, NULL, NULL, NULL,
2796 BDF_GAME_WORKING | BDF_CLONE, 2, HARDWARE_MISC_POST90S, GBF_SHOOT, 0,
2797 NULL, robotrontdRomInfo, robotrontdRomName, NULL, NULL, NULL, NULL, RobotronInputInfo, NULL,
2798 RobotronInit, DrvExit, DrvFrame, DrvDraw, DrvScan, &DrvRecalc, 0x10,
2799 292, 240, 4, 3
2800 };
2801
2802
2803 // Joust (White/Green label)
2804 /* Solid green labels - contains the same data as the white label with green stripe 3006-52 through 3006-63 set */
2805
2806 static struct BurnRomInfo joustRomDesc[] = {
2807 { "joust_rom_10b_3006-22.a7", 0x1000, 0x3f1c4f89, 1 | BRF_PRG | BRF_ESS }, // 0 M6809 Code
2808 { "joust_rom_11b_3006-23.c7", 0x1000, 0xea48b359, 1 | BRF_PRG | BRF_ESS }, // 1
2809 { "joust_rom_12b_3006-24.e7", 0x1000, 0xc710717b, 1 | BRF_PRG | BRF_ESS }, // 2
2810 { "joust_rom_1b_3006-13.e4", 0x1000, 0xfe41b2af, 1 | BRF_PRG | BRF_ESS }, // 3
2811 { "joust_rom_2b_3006-14.c4", 0x1000, 0x501c143c, 1 | BRF_PRG | BRF_ESS }, // 4
2812 { "joust_rom_3b_3006-15.a4", 0x1000, 0x43f7161d, 1 | BRF_PRG | BRF_ESS }, // 5
2813 { "joust_rom_4b_3006-16.e5", 0x1000, 0xdb5571b6, 1 | BRF_PRG | BRF_ESS }, // 6
2814 { "joust_rom_5b_3006-17.c5", 0x1000, 0xc686bb6b, 1 | BRF_PRG | BRF_ESS }, // 7
2815 { "joust_rom_6b_3006-18.a5", 0x1000, 0xfac5f2cf, 1 | BRF_PRG | BRF_ESS }, // 8
2816 { "joust_rom_7b_3006-19.e6", 0x1000, 0x81418240, 1 | BRF_PRG | BRF_ESS }, // 9
2817 { "joust_rom_8b_3006-20.c6", 0x1000, 0xba5359ba, 1 | BRF_PRG | BRF_ESS }, // 10
2818 { "joust_rom_9b_3006-21.a6", 0x1000, 0x39643147, 1 | BRF_PRG | BRF_ESS }, // 11
2819
2820 { "video_sound_rom_4_std_780.ic12", 0x1000, 0xf1835bdd, 2 | BRF_PRG | BRF_ESS }, // 12 M6800 Code
2821
2822 { "decoder_rom_4.3g", 0x0200, 0xe6631c23, 0 | BRF_OPT }, // 13 Address Decoder
2823 { "decoder_rom_6.3c", 0x0200, 0x83faf25e, 0 | BRF_OPT }, // 14
2824 };
2825
2826 STD_ROM_PICK(joust)
STD_ROM_FN(joust)2827 STD_ROM_FN(joust)
2828
2829 static INT32 JoustInit()
2830 {
2831 INT32 nRet = DrvInit(1, 0, 6, 1, 0xc000);
2832
2833 if (nRet == 0)
2834 {
2835 pia_config(0, 0, &pia_muxed_joust_0);
2836 pStartDraw = DrvDrawBegin;
2837 pDrawScanline = DrvDrawLine;
2838 }
2839
2840 return nRet;
2841 }
2842
2843 struct BurnDriver BurnDrvJoust = {
2844 "joust", NULL, NULL, NULL, "1982",
2845 "Joust (White/Green label)\0", NULL, "Williams", "6809 System",
2846 NULL, NULL, NULL, NULL,
2847 BDF_GAME_WORKING, 2, HARDWARE_MISC_PRE90S, GBF_PLATFORM, 0,
2848 NULL, joustRomInfo, joustRomName, NULL, NULL, NULL, NULL, JoustInputInfo, NULL,
2849 JoustInit, DrvExit, DrvFrame, DrvDraw, DrvScan, &DrvRecalc, 0x10,
2850 292, 240, 4, 3
2851 };
2852
2853
2854 // Joust (Yellow label)
2855 /* Solid yellow labels */
2856
2857 static struct BurnRomInfo joustyRomDesc[] = {
2858 { "joust_rom_10a_3006-10.a7", 0x1000, 0x2039014a, 1 | BRF_PRG | BRF_ESS }, // 0 M6809 Code
2859 { "joust_rom_11a_3006-11.c7", 0x1000, 0xea48b359, 1 | BRF_PRG | BRF_ESS }, // 1
2860 { "joust_rom_12a_3006-12.e7", 0x1000, 0xc710717b, 1 | BRF_PRG | BRF_ESS }, // 2
2861 { "joust_rom_1a_3006-1.e4", 0x1000, 0xfe41b2af, 1 | BRF_PRG | BRF_ESS }, // 3
2862 { "joust_rom_2a_3006-2.c4", 0x1000, 0x501c143c, 1 | BRF_PRG | BRF_ESS }, // 4
2863 { "joust_rom_3a_3006-3.a4", 0x1000, 0x43f7161d, 1 | BRF_PRG | BRF_ESS }, // 5
2864 { "joust_rom_4a_3006-4.e5", 0x1000, 0xdb5571b6, 1 | BRF_PRG | BRF_ESS }, // 6
2865 { "joust_rom_5a_3006-5.c5", 0x1000, 0xc686bb6b, 1 | BRF_PRG | BRF_ESS }, // 7
2866 { "joust_rom_6a_3006-6.a5", 0x1000, 0xfac5f2cf, 1 | BRF_PRG | BRF_ESS }, // 8
2867 { "joust_rom_7a_3006-7.e6", 0x1000, 0xe6f439c4, 1 | BRF_PRG | BRF_ESS }, // 9
2868 { "joust_rom_8a_3006-8.c6", 0x1000, 0xba5359ba, 1 | BRF_PRG | BRF_ESS }, // 10
2869 { "joust_rom_9a_3006-9.a6", 0x1000, 0x39643147, 1 | BRF_PRG | BRF_ESS }, // 11
2870
2871 { "video_sound_rom_4_std_780.ic12", 0x1000, 0xf1835bdd, 2 | BRF_PRG | BRF_ESS }, // 12 M6800 Code
2872
2873 { "decoder_rom_4.3g", 0x0200, 0xe6631c23, 0 | BRF_OPT }, // 13 Address Decoder
2874 { "decoder_rom_6.3c", 0x0200, 0x83faf25e, 0 | BRF_OPT }, // 14
2875 };
2876
2877 STD_ROM_PICK(jousty)
2878 STD_ROM_FN(jousty)
2879
2880 struct BurnDriver BurnDrvJousty = {
2881 "jousty", "joust", NULL, NULL, "1982",
2882 "Joust (Yellow label)\0", NULL, "Williams", "6809 System",
2883 NULL, NULL, NULL, NULL,
2884 BDF_GAME_WORKING | BDF_CLONE, 2, HARDWARE_MISC_PRE90S, GBF_PLATFORM, 0,
2885 NULL, joustyRomInfo, joustyRomName, NULL, NULL, NULL, NULL, JoustInputInfo, NULL,
2886 JoustInit, DrvExit, DrvFrame, DrvDraw, DrvScan, &DrvRecalc, 0x10,
2887 292, 240, 4, 3
2888 };
2889
2890
2891 // Joust (Solid Red label)
2892 /* Solid red labels */
2893
2894 static struct BurnRomInfo joustrRomDesc[] = {
2895 { "joust_rom_10a_3006-37.a7", 0x1000, 0xc0c6e52a, 1 | BRF_PRG | BRF_ESS }, // 0 M6809 Code
2896 { "joust_rom_11a_3006-38.c7", 0x1000, 0xab11bcf9, 1 | BRF_PRG | BRF_ESS }, // 1
2897 { "joust_rom_12a_3006-39.e7", 0x1000, 0xea14574b, 1 | BRF_PRG | BRF_ESS }, // 2
2898 { "joust_rom_1a_3006-28.e4", 0x1000, 0xfe41b2af, 1 | BRF_PRG | BRF_ESS }, // 3
2899 { "joust_rom_2a_3006-29.c4", 0x1000, 0x501c143c, 1 | BRF_PRG | BRF_ESS }, // 4
2900 { "joust_rom_3a_3006-30.a4", 0x1000, 0x43f7161d, 1 | BRF_PRG | BRF_ESS }, // 5
2901 { "joust_rom_4a_3006-31.e5", 0x1000, 0xab347170, 1 | BRF_PRG | BRF_ESS }, // 6
2902 { "joust_rom_5a_3006-32.c5", 0x1000, 0xc686bb6b, 1 | BRF_PRG | BRF_ESS }, // 7
2903 { "joust_rom_6a_3006-33.a5", 0x1000, 0x3d9a6fac, 1 | BRF_PRG | BRF_ESS }, // 8
2904 { "joust_rom_7a_3006-34.e6", 0x1000, 0x0a70b3d1, 1 | BRF_PRG | BRF_ESS }, // 9
2905 { "joust_rom_8a_3006-35.c6", 0x1000, 0xa7f01504, 1 | BRF_PRG | BRF_ESS }, // 10
2906 { "joust_rom_9a_3006-36.a6", 0x1000, 0x978687ad, 1 | BRF_PRG | BRF_ESS }, // 11
2907
2908 { "video_sound_rom_4_std_780.ic12", 0x1000, 0xf1835bdd, 2 | BRF_PRG | BRF_ESS }, // 12 M6800 Code
2909
2910 { "decoder_rom_4.3g", 0x0200, 0xe6631c23, 0 | BRF_OPT }, // 13 Address Decoder
2911 { "decoder_rom_6.3c", 0x0200, 0x83faf25e, 0 | BRF_OPT }, // 14
2912 };
2913
2914 STD_ROM_PICK(joustr)
2915 STD_ROM_FN(joustr)
2916
2917 struct BurnDriver BurnDrvJoustr = {
2918 "joustr", "joust", NULL, NULL, "1982",
2919 "Joust (Solid Red label)\0", NULL, "Williams", "6809 System",
2920 NULL, NULL, NULL, NULL,
2921 BDF_GAME_WORKING | BDF_CLONE, 2, HARDWARE_MISC_PRE90S, GBF_PLATFORM, 0,
2922 NULL, joustrRomInfo, joustrRomName, NULL, NULL, NULL, NULL, JoustInputInfo, NULL,
2923 JoustInit, DrvExit, DrvFrame, DrvDraw, DrvScan, &DrvRecalc, 0x10,
2924 292, 240, 4, 3
2925 };
2926
2927
2928 // Bubbles
2929
2930 static struct BurnRomInfo bubblesRomDesc[] = {
2931 { "bubbles.10b", 0x1000, 0x26e7869b, 1 | BRF_PRG | BRF_ESS }, // 0 M6809 Code
2932 { "bubbles.11b", 0x1000, 0x5a5b572f, 1 | BRF_PRG | BRF_ESS }, // 1
2933 { "bubbles.12b", 0x1000, 0xce22d2e2, 1 | BRF_PRG | BRF_ESS }, // 2
2934 { "bubbles.1b", 0x1000, 0x8234f55c, 1 | BRF_PRG | BRF_ESS }, // 3
2935 { "bubbles.2b", 0x1000, 0x4a188d6a, 1 | BRF_PRG | BRF_ESS }, // 4
2936 { "bubbles.3b", 0x1000, 0x7728f07f, 1 | BRF_PRG | BRF_ESS }, // 5
2937 { "bubbles.4b", 0x1000, 0x040be7f9, 1 | BRF_PRG | BRF_ESS }, // 6
2938 { "bubbles.5b", 0x1000, 0x0b5f29e0, 1 | BRF_PRG | BRF_ESS }, // 7
2939 { "bubbles.6b", 0x1000, 0x4dd0450d, 1 | BRF_PRG | BRF_ESS }, // 8
2940 { "bubbles.7b", 0x1000, 0xe0a26ec0, 1 | BRF_PRG | BRF_ESS }, // 9
2941 { "bubbles.8b", 0x1000, 0x4fd23d8d, 1 | BRF_PRG | BRF_ESS }, // 10
2942 { "bubbles.9b", 0x1000, 0xb48559fb, 1 | BRF_PRG | BRF_ESS }, // 11
2943
2944 { "bubbles.snd", 0x1000, 0x689ce2aa, 2 | BRF_PRG | BRF_ESS }, // 12 M6800 Code
2945
2946 { "decoder_rom_4.3g", 0x0200, 0xe6631c23, 0 | BRF_OPT }, // 13 Address Decoder
2947 { "decoder_rom_6.3c", 0x0200, 0x83faf25e, 0 | BRF_OPT }, // 14
2948 };
2949
2950 STD_ROM_PICK(bubbles)
STD_ROM_FN(bubbles)2951 STD_ROM_FN(bubbles)
2952
2953 static INT32 BubblesInit()
2954 {
2955 INT32 nRet = DrvInit(1, 0, 6, 1, 0xc000);
2956
2957 if (nRet == 0) {
2958 M6809Open(0);
2959 M6809MapMemory(DrvNVRAM, 0xcc00, 0xcfff, MAP_RAM); // 8 bit
2960 M6809Close();
2961 }
2962
2963 return nRet;
2964 }
2965
2966 struct BurnDriver BurnDrvBubbles = {
2967 "bubbles", NULL, NULL, NULL, "1982",
2968 "Bubbles\0", NULL, "Williams", "6809 System",
2969 NULL, NULL, NULL, NULL,
2970 BDF_GAME_WORKING, 2, HARDWARE_MISC_PRE90S, GBF_MAZE, 0,
2971 NULL, bubblesRomInfo, bubblesRomName, NULL, NULL, NULL, NULL, BubblesInputInfo, NULL,
2972 BubblesInit, DrvExit, DrvFrame, DrvDraw, DrvScan, &DrvRecalc, 0x10,
2973 292, 240, 4, 3
2974 };
2975
2976
2977 // Bubbles (Solid Red label)
2978
2979 static struct BurnRomInfo bubblesrRomDesc[] = {
2980 { "bubblesr.10b", 0x1000, 0x8b396db0, 1 | BRF_PRG | BRF_ESS }, // 0 M6809 Code
2981 { "bubblesr.11b", 0x1000, 0x096af43e, 1 | BRF_PRG | BRF_ESS }, // 1
2982 { "bubblesr.12b", 0x1000, 0x5c1244ef, 1 | BRF_PRG | BRF_ESS }, // 2
2983 { "bubblesr.1b", 0x1000, 0xdda4e782, 1 | BRF_PRG | BRF_ESS }, // 3
2984 { "bubblesr.2b", 0x1000, 0x3c8fa7f5, 1 | BRF_PRG | BRF_ESS }, // 4
2985 { "bubblesr.3b", 0x1000, 0xf869bb9c, 1 | BRF_PRG | BRF_ESS }, // 5
2986 { "bubblesr.4b", 0x1000, 0x0c65eaab, 1 | BRF_PRG | BRF_ESS }, // 6
2987 { "bubblesr.5b", 0x1000, 0x7ece4e13, 1 | BRF_PRG | BRF_ESS }, // 7
2988 { "bubbles.6b", 0x1000, 0x4dd0450d, 1 | BRF_PRG | BRF_ESS }, // 8
2989 { "bubbles.7b", 0x1000, 0xe0a26ec0, 1 | BRF_PRG | BRF_ESS }, // 9
2990 { "bubblesr.8b", 0x1000, 0x598b9bd6, 1 | BRF_PRG | BRF_ESS }, // 10
2991 { "bubbles.9b", 0x1000, 0xb48559fb, 1 | BRF_PRG | BRF_ESS }, // 11
2992
2993 { "video_sound_rom_5_std_771.ic12", 0x1000, 0x689ce2aa, 2 | BRF_PRG | BRF_ESS }, // 12 M6800 Code
2994
2995 { "decoder_rom_4.3g", 0x0200, 0xe6631c23, 0 | BRF_OPT }, // 13 Address Decoder
2996 { "decoder_rom_6.3c", 0x0200, 0x83faf25e, 0 | BRF_OPT }, // 14
2997 };
2998
2999 STD_ROM_PICK(bubblesr)
3000 STD_ROM_FN(bubblesr)
3001
3002 struct BurnDriver BurnDrvBubblesr = {
3003 "bubblesr", "bubbles", NULL, NULL, "1982",
3004 "Bubbles (Solid Red label)\0", NULL, "Williams", "6809 System",
3005 NULL, NULL, NULL, NULL,
3006 BDF_GAME_WORKING | BDF_CLONE, 2, HARDWARE_MISC_PRE90S, GBF_MAZE, 0,
3007 NULL, bubblesrRomInfo, bubblesrRomName, NULL, NULL, NULL, NULL, BubblesInputInfo, NULL,
3008 BubblesInit, DrvExit, DrvFrame, DrvDraw, DrvScan, &DrvRecalc, 0x10,
3009 292, 240, 4, 3
3010 };
3011
3012
3013 // Bubbles (prototype version)
3014
3015 static struct BurnRomInfo bubblespRomDesc[] = {
3016 { "bub_prot.10b", 0x1000, 0x89a565df, 1 | BRF_PRG | BRF_ESS }, // 0 M6809 Code
3017 { "bub_prot.11b", 0x1000, 0x5a0c36a7, 1 | BRF_PRG | BRF_ESS }, // 1
3018 { "bub_prot.12b", 0x1000, 0x2bfd3438, 1 | BRF_PRG | BRF_ESS }, // 2
3019 { "bub_prot.1b", 0x1000, 0x6466a746, 1 | BRF_PRG | BRF_ESS }, // 3
3020 { "bub_prot.2b", 0x1000, 0xcca04357, 1 | BRF_PRG | BRF_ESS }, // 4
3021 { "bub_prot.3b", 0x1000, 0x7aaff9e5, 1 | BRF_PRG | BRF_ESS }, // 5
3022 { "bub_prot.4b", 0x1000, 0x4e264f01, 1 | BRF_PRG | BRF_ESS }, // 6
3023 { "bub_prot.5b", 0x1000, 0x121b0be6, 1 | BRF_PRG | BRF_ESS }, // 7
3024 { "bub_prot.6b", 0x1000, 0x80e90b25, 1 | BRF_PRG | BRF_ESS }, // 8
3025 { "bub_prot.7b", 0x1000, 0xe0a26ec0, 1 | BRF_PRG | BRF_ESS }, // 9
3026 { "bub_prot.8b", 0x1000, 0x96fb19c8, 1 | BRF_PRG | BRF_ESS }, // 10
3027 { "bub_prot.9b", 0x1000, 0xbe7e1028, 1 | BRF_PRG | BRF_ESS }, // 11
3028
3029 { "video_sound_rom_5_std_771.ic12", 0x1000, 0x689ce2aa, 2 | BRF_PRG | BRF_ESS }, // 12 M6800 Code
3030
3031 { "decoder_rom_4.3g", 0x0200, 0xe6631c23, 0 | BRF_OPT }, // 13 Address Decoder
3032 { "decoder_rom_6.3c", 0x0200, 0x83faf25e, 0 | BRF_OPT }, // 14
3033 };
3034
3035 STD_ROM_PICK(bubblesp)
3036 STD_ROM_FN(bubblesp)
3037
3038 struct BurnDriver BurnDrvBubblesp = {
3039 "bubblesp", "bubbles", NULL, NULL, "1982",
3040 "Bubbles (prototype version)\0", NULL, "Williams", "6809 System",
3041 NULL, NULL, NULL, NULL,
3042 BDF_GAME_WORKING | BDF_CLONE | BDF_PROTOTYPE, 2, HARDWARE_MISC_PRE90S, GBF_MAZE, 0,
3043 NULL, bubblespRomInfo, bubblespRomName, NULL, NULL, NULL, NULL, BubblesInputInfo, NULL,
3044 BubblesInit, DrvExit, DrvFrame, DrvDraw, DrvScan, &DrvRecalc, 0x10,
3045 292, 240, 4, 3
3046 };
3047
3048
3049 // Splat!
3050
3051 static struct BurnRomInfo splatRomDesc[] = {
3052 /* Solid Brown labels */
3053 { "splat_rom_10b_16-3011-10.a7", 0x1000, 0xd1a1f632, 1 | BRF_PRG | BRF_ESS }, // 0 M6809 Code
3054 { "splat_rom_11b_16-3011-11.c7", 0x1000, 0xca8cde95, 1 | BRF_PRG | BRF_ESS }, // 1
3055 { "splat_rom_12b_16-3011-12.e7", 0x1000, 0x5bee3e60, 1 | BRF_PRG | BRF_ESS }, // 2
3056 { "splat_rom_1b_16-3011-1.e4", 0x1000, 0x1cf26e48, 1 | BRF_PRG | BRF_ESS }, // 3
3057 { "splat_rom_2b_16-3011-2.c4", 0x1000, 0xac0d4276, 1 | BRF_PRG | BRF_ESS }, // 4
3058 { "splat_rom_3b_16-3011-3.a4", 0x1000, 0x74873e59, 1 | BRF_PRG | BRF_ESS }, // 5
3059 { "splat_rom_4b_16-3011-4.e5", 0x1000, 0x70a7064e, 1 | BRF_PRG | BRF_ESS }, // 6
3060 { "splat_rom_5b_16-3011-5.c5", 0x1000, 0xc6895221, 1 | BRF_PRG | BRF_ESS }, // 7
3061 { "splat_rom_6b_16-3011-6.a5", 0x1000, 0xea4ab7fd, 1 | BRF_PRG | BRF_ESS }, // 8
3062 { "splat_rom_7b_16-3011-7.e6", 0x1000, 0x82fd8713, 1 | BRF_PRG | BRF_ESS }, // 9
3063 { "splat_rom_8b_16-3011-8.c6", 0x1000, 0x7dded1b4, 1 | BRF_PRG | BRF_ESS }, // 10
3064 { "splat_rom_9b_16-3011-9.a6", 0x1000, 0x71cbfe5a, 1 | BRF_PRG | BRF_ESS }, // 11
3065
3066 { "video_sound_rom_13_std.ic12", 0x1000, 0xa878d5f3, 2 | BRF_PRG | BRF_ESS }, // 12 M6800 Code
3067
3068 { "decoder_rom_4.3g", 0x0200, 0xe6631c23, 0 | BRF_OPT }, // 13 Address Decoder
3069 { "decoder_rom_6.3c", 0x0200, 0x83faf25e, 0 | BRF_OPT }, // 14
3070 };
3071
3072 STD_ROM_PICK(splat)
STD_ROM_FN(splat)3073 STD_ROM_FN(splat)
3074
3075 static INT32 SplatInit()
3076 {
3077 splat = 1;
3078
3079 INT32 nRet = DrvInit(1, 0, 6, 2, 0xc000);
3080
3081 if (nRet == 0)
3082 {
3083 pia_config(0, 0, &pia_muxed_joust_0);
3084 pStartDraw = DrvDrawBegin;
3085 pDrawScanline = DrvDrawLine;
3086 }
3087
3088 return nRet;
3089 }
3090
3091 struct BurnDriver BurnDrvSplat = {
3092 "splat", NULL, NULL, NULL, "1982",
3093 "Splat!\0", NULL, "Williams", "6809 System",
3094 NULL, NULL, NULL, NULL,
3095 BDF_GAME_WORKING, 2, HARDWARE_MISC_PRE90S, GBF_SHOOT, 0,
3096 NULL, splatRomInfo, splatRomName, NULL, NULL, NULL, NULL, SplatInputInfo, NULL,
3097 SplatInit, DrvExit, DrvFrame, DrvDraw, DrvScan, &DrvRecalc, 0x10,
3098 292, 240, 4, 3
3099 };
3100
3101
3102 // Speed Ball - Contest at Neonworld (prototype)
3103
3104 static struct BurnRomInfo spdballRomDesc[] = {
3105 { "speedbal.10", 0x1000, 0x4a3add93, 1 | BRF_PRG | BRF_ESS }, // 0 M6809 Code
3106 { "speedbal.11", 0x1000, 0x1fbcfaa5, 1 | BRF_PRG | BRF_ESS }, // 1
3107 { "speedbal.12", 0x1000, 0xf3458f41, 1 | BRF_PRG | BRF_ESS }, // 2
3108 { "speedbal.01", 0x1000, 0x7f4801bb, 1 | BRF_PRG | BRF_ESS }, // 3
3109 { "speedbal.02", 0x1000, 0x5cd5e489, 1 | BRF_PRG | BRF_ESS }, // 4
3110 { "speedbal.03", 0x1000, 0x280e11a4, 1 | BRF_PRG | BRF_ESS }, // 5
3111 { "speedbal.04", 0x1000, 0x3469cbbf, 1 | BRF_PRG | BRF_ESS }, // 6
3112 { "speedbal.05", 0x1000, 0x87373c89, 1 | BRF_PRG | BRF_ESS }, // 7
3113 { "speedbal.06", 0x1000, 0x48779a0d, 1 | BRF_PRG | BRF_ESS }, // 8
3114 { "speedbal.07", 0x1000, 0x2e5d8db6, 1 | BRF_PRG | BRF_ESS }, // 9
3115 { "speedbal.08", 0x1000, 0xc173cedf, 1 | BRF_PRG | BRF_ESS }, // 10
3116 { "speedbal.09", 0x1000, 0x415f424b, 1 | BRF_PRG | BRF_ESS }, // 11
3117
3118 { "speedbal.snd", 0x1000, 0x78de20e2, 2 | BRF_PRG | BRF_ESS }, // 12 M6800 Code
3119
3120 { "mystery.rom", 0x1000, 0xdcb6a070, 0 | BRF_OPT }, // 13 ??
3121 };
3122
3123 STD_ROM_PICK(spdball)
STD_ROM_FN(spdball)3124 STD_ROM_FN(spdball)
3125
3126 static INT32 SpdballInit()
3127 {
3128 INT32 nRet = DrvInit(1, 0, 6, 1, 0xc000);
3129
3130 if (nRet == 0) // raster draw
3131 {
3132 spdball = 1;
3133 pStartDraw = DrvDrawBegin;
3134 pDrawScanline = DrvDrawLine;
3135 }
3136
3137 return nRet;
3138 }
3139
3140 struct BurnDriver BurnDrvSpdball = {
3141 "spdball", NULL, NULL, NULL, "1985",
3142 "Speed Ball - Contest at Neonworld (prototype)\0", NULL, "Williams", "6809 System",
3143 NULL, NULL, NULL, NULL,
3144 BDF_GAME_WORKING | BDF_PROTOTYPE, 2, HARDWARE_MISC_PRE90S, GBF_SPORTSMISC, 0,
3145 NULL, spdballRomInfo, spdballRomName, NULL, NULL, NULL, NULL, SpdballInputInfo, NULL,
3146 SpdballInit, DrvExit, DrvFrame, DrvDraw, DrvScan, &DrvRecalc, 0x10,
3147 292, 240, 4, 3
3148 };
3149
3150
3151 // Alien Arena
3152
3153 static struct BurnRomInfo alienarRomDesc[] = {
3154 { "aarom10", 0x1000, 0x6feb0314, 1 | BRF_PRG | BRF_ESS }, // 0 M6809 Code
3155 { "aarom11", 0x1000, 0xae3a270e, 1 | BRF_PRG | BRF_ESS }, // 1
3156 { "aarom12", 0x1000, 0x6be9f09e, 1 | BRF_PRG | BRF_ESS }, // 2
3157 { "aarom01", 0x1000, 0xbb0c21be, 1 | BRF_PRG | BRF_ESS }, // 3
3158 { "aarom02", 0x1000, 0x165acd37, 1 | BRF_PRG | BRF_ESS }, // 4
3159 { "aarom03", 0x1000, 0xe5d51d92, 1 | BRF_PRG | BRF_ESS }, // 5
3160 { "aarom04", 0x1000, 0x24f6feb8, 1 | BRF_PRG | BRF_ESS }, // 6
3161 { "aarom05", 0x1000, 0x5b1ac59b, 1 | BRF_PRG | BRF_ESS }, // 7
3162 { "aarom06", 0x1000, 0xda7195a2, 1 | BRF_PRG | BRF_ESS }, // 8
3163 { "aarom07", 0x1000, 0xf9812be4, 1 | BRF_PRG | BRF_ESS }, // 9
3164 { "aarom08", 0x1000, 0xcd7f3a87, 1 | BRF_PRG | BRF_ESS }, // 10
3165 { "aarom09", 0x1000, 0xe6ce77b4, 1 | BRF_PRG | BRF_ESS }, // 11
3166 };
3167
3168 STD_ROM_PICK(alienar)
STD_ROM_FN(alienar)3169 STD_ROM_FN(alienar)
3170
3171 static INT32 AlienarInit()
3172 {
3173 INT32 nRet = DrvInit(1, 0, 6, 2, 0xc000);
3174
3175 if (nRet == 0)
3176 {
3177 pia_config(0, 0, &pia_muxed_joust_0);
3178 }
3179
3180 return nRet;
3181 }
3182
3183 struct BurnDriver BurnDrvAlienar = {
3184 "alienar", NULL, NULL, NULL, "1985",
3185 "Alien Arena\0", "Game has no sound", "Duncan Brown", "6809 System",
3186 NULL, NULL, NULL, NULL,
3187 BDF_GAME_WORKING, 2, HARDWARE_MISC_PRE90S, GBF_MAZE, 0,
3188 NULL, alienarRomInfo, alienarRomName, NULL, NULL, NULL, NULL, AlienarInputInfo, NULL,
3189 AlienarInit, DrvExit, DrvFrame, DrvDraw, DrvScan, &DrvRecalc, 0x10,
3190 292, 240, 4, 3
3191 };
3192
3193
3194 // Alien Arena (Stargate upgrade)
3195
3196 static struct BurnRomInfo alienaruRomDesc[] = {
3197 { "aarom10", 0x1000, 0x6feb0314, 1 | BRF_PRG | BRF_ESS }, // 0 M6809 Code
3198 { "aarom11", 0x1000, 0xae3a270e, 1 | BRF_PRG | BRF_ESS }, // 1
3199 { "aarom12", 0x1000, 0x6be9f09e, 1 | BRF_PRG | BRF_ESS }, // 2
3200 { "aarom01", 0x1000, 0xbb0c21be, 1 | BRF_PRG | BRF_ESS }, // 3
3201 { "aarom02", 0x1000, 0x165acd37, 1 | BRF_PRG | BRF_ESS }, // 4
3202 { "aarom03", 0x1000, 0xe5d51d92, 1 | BRF_PRG | BRF_ESS }, // 5
3203 { "aarom04", 0x1000, 0x24f6feb8, 1 | BRF_PRG | BRF_ESS }, // 6
3204 { "aarom05", 0x1000, 0x5b1ac59b, 1 | BRF_PRG | BRF_ESS }, // 7
3205 { "aarom06", 0x1000, 0xda7195a2, 1 | BRF_PRG | BRF_ESS }, // 8
3206 { "aarom07", 0x1000, 0xf9812be4, 1 | BRF_PRG | BRF_ESS }, // 9
3207 { "aarom08", 0x1000, 0xcd7f3a87, 1 | BRF_PRG | BRF_ESS }, // 10
3208 { "aarom09", 0x1000, 0xe6ce77b4, 1 | BRF_PRG | BRF_ESS }, // 11
3209
3210 { "sg.snd", 0x0800, 0x2fcf6c4d, 2 | BRF_PRG | BRF_ESS }, // 12 M6800 Code
3211
3212 { "decoder.4", 0x0200, 0xe6631c23, 0 | BRF_OPT }, // 13 Address Decoder
3213 { "decoder.6", 0x0200, 0x83faf25e, 0 | BRF_OPT }, // 14
3214 };
3215
3216 STD_ROM_PICK(alienaru)
3217 STD_ROM_FN(alienaru)
3218
3219 struct BurnDriver BurnDrvAlienaru = {
3220 "alienaru", "alienar", NULL, NULL, "1985",
3221 "Alien Arena (Stargate upgrade)\0", NULL, "Duncan Brown", "6809 System",
3222 NULL, NULL, NULL, NULL,
3223 BDF_GAME_WORKING | BDF_CLONE, 2, HARDWARE_MISC_PRE90S, GBF_MAZE, 0,
3224 NULL, alienaruRomInfo, alienaruRomName, NULL, NULL, NULL, NULL, AlienarInputInfo, NULL,
3225 AlienarInit, DrvExit, DrvFrame, DrvDraw, DrvScan, &DrvRecalc, 0x10,
3226 292, 240, 4, 3
3227 };
3228
3229
3230 // Sinistar (revision 3)
3231 // solid RED labels with final production part numbers
3232
3233 static struct BurnRomInfo sinistarRomDesc[] = {
3234 { "sinistar_rom_10-b_16-3004-62.4c", 0x1000, 0x3d670417, 1 | BRF_PRG | BRF_ESS }, // 0 M6809 Code
3235 { "sinistar_rom_11-b_16-3004-63.4a", 0x1000, 0x3162bc50, 1 | BRF_PRG | BRF_ESS }, // 1
3236 { "sinistar_rom_1-b_16-3004-53.1d", 0x1000, 0xf6f3a22c, 1 | BRF_PRG | BRF_ESS }, // 2
3237 { "sinistar_rom_2-b_16-3004-54.1c", 0x1000, 0xcab3185c, 1 | BRF_PRG | BRF_ESS }, // 3
3238 { "sinistar_rom_3-b_16-3004-55.1a", 0x1000, 0x1ce1b3cc, 1 | BRF_PRG | BRF_ESS }, // 4
3239 { "sinistar_rom_4-b_16-3004-56.2d", 0x1000, 0x6da632ba, 1 | BRF_PRG | BRF_ESS }, // 5
3240 { "sinistar_rom_5-b_16-3004-57.2c", 0x1000, 0xb662e8fc, 1 | BRF_PRG | BRF_ESS }, // 6
3241 { "sinistar_rom_6-b_16-3004-58.2a", 0x1000, 0x2306183d, 1 | BRF_PRG | BRF_ESS }, // 7
3242 { "sinistar_rom_7-b_16-3004-59.3d", 0x1000, 0xe5dd918e, 1 | BRF_PRG | BRF_ESS }, // 8
3243 { "sinistar_rom_8-b_16-3004-60.3c", 0x1000, 0x4785a787, 1 | BRF_PRG | BRF_ESS }, // 9
3244 { "sinistar_rom_9-b_16-3004-61.3a", 0x1000, 0x50cb63ad, 1 | BRF_PRG | BRF_ESS }, // 10
3245
3246 { "3004_speech_ic7_r1_16-3004-52.ic7", 0x1000, 0xe1019568, 2 | BRF_PRG | BRF_ESS }, // 11 M6800 Code
3247 { "3004_speech_ic5_r1_16-3004-50.ic5", 0x1000, 0xcf3b5ffd, 2 | BRF_PRG | BRF_ESS }, // 12
3248 { "3004_speech_ic6_r1_16-3004-51.ic6", 0x1000, 0xff8d2645, 2 | BRF_PRG | BRF_ESS }, // 13
3249 { "3004_speech_ic4_r1_16-3004-49.ic4", 0x1000, 0x4b56a626, 2 | BRF_PRG | BRF_ESS }, // 14
3250 { "video_sound_rom_9_std.808.ic12", 0x1000, 0xb82f4ddb, 2 | BRF_PRG | BRF_ESS }, // 15
3251
3252 { "decoder_rom_4.3g", 0x0200, 0xe6631c23, 0 | BRF_OPT }, // 16 Address Decoder
3253 { "decoder_rom_6.3c", 0x0200, 0x83faf25e, 0 | BRF_OPT }, // 17
3254 };
3255
3256 STD_ROM_PICK(sinistar)
STD_ROM_FN(sinistar)3257 STD_ROM_FN(sinistar)
3258
3259 static INT32 SinistarInit()
3260 {
3261 INT32 nRet = DrvInit(1, 4, 6, 1, 0x7400);
3262
3263 if (nRet == 0)
3264 {
3265 hc55516_init(M6800TotalCycles, 894886);
3266 uses_hc55516 = 1;
3267
3268 pStartDraw = DrvDrawBegin;
3269 pDrawScanline = DrvDrawLine;
3270
3271 pia_init();
3272 pia_config(0, 0, &pia_49way_0);
3273 pia_config(1, 0, &pia_1);
3274 pia_config(2, 0, &pia_2_sinistar);
3275 pia_config(3, 0, &pia_3);
3276
3277 M6809Open(0);
3278 M6809MapMemory(DrvM6809RAM0, 0xd000, 0xdfff, MAP_RAM);
3279 M6809Close();
3280 }
3281
3282 return nRet;
3283 }
3284
3285 struct BurnDriver BurnDrvSinistar = {
3286 "sinistar", NULL, NULL, NULL, "1982",
3287 "Sinistar (revision 3)\0", NULL, "Williams", "6809 System",
3288 NULL, NULL, NULL, NULL,
3289 BDF_GAME_WORKING | BDF_ORIENTATION_VERTICAL, 2, HARDWARE_MISC_PRE90S, GBF_SHOOT, 0,
3290 NULL, sinistarRomInfo, sinistarRomName, NULL, NULL, NULL, NULL, SinistarInputInfo, NULL,
3291 SinistarInit, DrvExit, DrvFrame, DrvDraw, DrvScan, &DrvRecalc, 0x10,
3292 240, 292, 3, 4
3293 };
3294
3295
3296 // Sinistar (revision 2)
3297 // solid RED labels with final production part numbers
3298
3299 static struct BurnRomInfo sinistar2RomDesc[] = {
3300 { "sinistar_rom_10-b_16-3004-47.4c", 0x1000, 0x3d670417, 1 | BRF_PRG | BRF_ESS }, // 0 M6809 Code
3301 { "sinistar_rom_11-b_16-3004-48.4a", 0x1000, 0x792c8b00, 1 | BRF_PRG | BRF_ESS }, // 1
3302 { "sinistar_rom_1-b_16-3004-38.1d", 0x1000, 0xf6f3a22c, 1 | BRF_PRG | BRF_ESS }, // 2
3303 { "sinistar_rom_2-b_16-3004-39.1c", 0x1000, 0xcab3185c, 1 | BRF_PRG | BRF_ESS }, // 3
3304 { "sinistar_rom_3-b_16-3004-40.1a", 0x1000, 0x1ce1b3cc, 1 | BRF_PRG | BRF_ESS }, // 4
3305 { "sinistar_rom_4-b_16-3004-41.2d", 0x1000, 0x6da632ba, 1 | BRF_PRG | BRF_ESS }, // 5
3306 { "sinistar_rom_5-b_16-3004-42.2c", 0x1000, 0xb662e8fc, 1 | BRF_PRG | BRF_ESS }, // 6
3307 { "sinistar_rom_6-b_16-3004-43.2a", 0x1000, 0x2306183d, 1 | BRF_PRG | BRF_ESS }, // 7
3308 { "sinistar_rom_7-b_16-3004-44.3d", 0x1000, 0xe5dd918e, 1 | BRF_PRG | BRF_ESS }, // 8
3309 { "sinistar_rom_8-b_16-3004-45.3c", 0x1000, 0xd7ecee45, 1 | BRF_PRG | BRF_ESS }, // 9
3310 { "sinistar_rom_9-b_16-3004-46.3a", 0x1000, 0x50cb63ad, 1 | BRF_PRG | BRF_ESS }, // 10
3311
3312 { "3004_speech_ic7_r1_16-3004-52.ic7", 0x1000, 0xe1019568, 2 | BRF_PRG | BRF_ESS }, // 11 M6800 Code
3313 { "3004_speech_ic5_r1_16-3004-50.ic5", 0x1000, 0xcf3b5ffd, 2 | BRF_PRG | BRF_ESS }, // 12
3314 { "3004_speech_ic6_r1_16-3004-51.ic6", 0x1000, 0xff8d2645, 2 | BRF_PRG | BRF_ESS }, // 13
3315 { "3004_speech_ic4_r1_16-3004-49.ic4", 0x1000, 0x4b56a626, 2 | BRF_PRG | BRF_ESS }, // 14
3316 { "video_sound_rom_9_std.808.ic12", 0x1000, 0xb82f4ddb, 2 | BRF_PRG | BRF_ESS }, // 15
3317
3318 { "decoder_rom_4.3g", 0x0200, 0xe6631c23, 0 | BRF_OPT }, // 16 Address Decoder
3319 { "decoder_rom_6.3c", 0x0200, 0x83faf25e, 0 | BRF_OPT }, // 17
3320 };
3321
3322 STD_ROM_PICK(sinistar2)
3323 STD_ROM_FN(sinistar2)
3324
3325 struct BurnDriver BurnDrvSinistar2 = {
3326 "sinistar2", "sinistar", NULL, NULL, "1982",
3327 "Sinistar (revision 2)\0", NULL, "Williams", "6809 System",
3328 NULL, NULL, NULL, NULL,
3329 BDF_GAME_WORKING | BDF_CLONE | BDF_ORIENTATION_VERTICAL, 2, HARDWARE_MISC_PRE90S, GBF_SHOOT, 0,
3330 NULL, sinistar2RomInfo, sinistar2RomName, NULL, NULL, NULL, NULL, SinistarInputInfo, NULL,
3331 SinistarInit, DrvExit, DrvFrame, DrvDraw, DrvScan, &DrvRecalc, 0x10,
3332 240, 292, 3, 4
3333 };
3334
3335
3336 // Sinistar (AMOA-82 prototype)
3337 // solid pink labels - 1982 AMOA prototype
3338
3339 static struct BurnRomInfo sinistarpRomDesc[] = {
3340 { "sinistar_rom_10-b_16-3004-21.4c", 0x1000, 0xea87a53f, 1 | BRF_PRG | BRF_ESS }, // 0 M6809 Code
3341 { "sinistar_rom_11-b_16-3004-22.4a", 0x1000, 0x88d36e80, 1 | BRF_PRG | BRF_ESS }, // 1
3342 { "sinistar_rom_1-b_16-3004-12.1d", 0x1000, 0x3810d7b8, 1 | BRF_PRG | BRF_ESS }, // 2
3343 { "sinistar_rom_2-b_16-3004-13.1c", 0x1000, 0xcab3185c, 1 | BRF_PRG | BRF_ESS }, // 3
3344 { "sinistar_rom_3-b_16-3004-14.1a", 0x1000, 0x7c984ca9, 1 | BRF_PRG | BRF_ESS }, // 4
3345 { "sinistar_rom_4-b_16-3004-15.2d", 0x1000, 0xcc6c4f24, 1 | BRF_PRG | BRF_ESS }, // 5
3346 { "sinistar_rom_5-b_16-3004-16.2c", 0x1000, 0x12285bfe, 1 | BRF_PRG | BRF_ESS }, // 6
3347 { "sinistar_rom_6-b_16-3004-17.2a", 0x1000, 0x7a675f35, 1 | BRF_PRG | BRF_ESS }, // 7
3348 { "sinistar_rom_7-b_16-3004-18.3d", 0x1000, 0xb0463243, 1 | BRF_PRG | BRF_ESS }, // 8
3349 { "sinistar_rom_8-b_16-3004-19.3c", 0x1000, 0x909040d4, 1 | BRF_PRG | BRF_ESS }, // 9
3350 { "sinistar_rom_9-b_16-3004-20.3a", 0x1000, 0xcc949810, 1 | BRF_PRG | BRF_ESS }, // 10
3351
3352 { "3004_speech_ic7_r1.ic7", 0x1000, 0xe1019568, 2 | BRF_PRG | BRF_ESS }, // 11 M6800 Code
3353 { "3004_speech_ic5_r1.ic5", 0x1000, 0xcf3b5ffd, 2 | BRF_PRG | BRF_ESS }, // 12
3354 { "3004_speech_ic6_r1.ic6", 0x1000, 0xff8d2645, 2 | BRF_PRG | BRF_ESS }, // 13
3355 { "3004_speech_ic4_r1.ic4", 0x1000, 0x4b56a626, 2 | BRF_PRG | BRF_ESS }, // 14
3356 { "video_sound_rom_9_std.808", 0x1000, 0xb82f4ddb, 2 | BRF_PRG | BRF_ESS }, // 15
3357
3358 { "decoder_rom_4.3g", 0x0200, 0xe6631c23, 0 | BRF_OPT }, // 16 Address Decoder
3359 { "decoder_rom_6.3c", 0x0200, 0x83faf25e, 0 | BRF_OPT }, // 17
3360 };
3361
3362 STD_ROM_PICK(sinistarp)
3363 STD_ROM_FN(sinistarp)
3364
3365 struct BurnDriver BurnDrvSinistarp = {
3366 "sinistarp", "sinistar", NULL, NULL, "1982",
3367 "Sinistar (AMOA-82 prototype)\0", NULL, "Williams", "6809 System",
3368 NULL, NULL, NULL, NULL,
3369 BDF_GAME_WORKING | BDF_CLONE | BDF_ORIENTATION_VERTICAL, 2, HARDWARE_MISC_PRE90S, GBF_SHOOT, 0,
3370 NULL, sinistarpRomInfo, sinistarpRomName, NULL, NULL, NULL, NULL, SinistarInputInfo, NULL,
3371 SinistarInit, DrvExit, DrvFrame, DrvDraw, DrvScan, &DrvRecalc, 0x10,
3372 240, 292, 3, 4
3373 };
3374
3375
3376 // PlayBall! (prototype)
3377
3378 static struct BurnRomInfo playballRomDesc[] = {
3379 { "playball.10", 0x1000, 0x18787b52, 1 | BRF_PRG | BRF_ESS }, // 0 maincpu
3380 { "playball.11", 0x1000, 0x1dd5c8f2, 1 | BRF_PRG | BRF_ESS }, // 1
3381 { "playball.12", 0x1000, 0xa700597b, 1 | BRF_PRG | BRF_ESS }, // 2
3382 { "playball.01", 0x1000, 0x7ba8fd71, 1 | BRF_PRG | BRF_ESS }, // 3
3383 { "playball.02", 0x1000, 0x2387c3d4, 1 | BRF_PRG | BRF_ESS }, // 4
3384 { "playball.03", 0x1000, 0xd34cc5fd, 1 | BRF_PRG | BRF_ESS }, // 5
3385 { "playball.04", 0x1000, 0xf68c3a8e, 1 | BRF_PRG | BRF_ESS }, // 6
3386 { "playball.05", 0x1000, 0xa3f20810, 1 | BRF_PRG | BRF_ESS }, // 7
3387 { "playball.06", 0x1000, 0xf213e48e, 1 | BRF_PRG | BRF_ESS }, // 8
3388 { "playball.07", 0x1000, 0x9b5574e9, 1 | BRF_PRG | BRF_ESS }, // 9
3389 { "playball.08", 0x1000, 0xb2d2074a, 1 | BRF_PRG | BRF_ESS }, // 10
3390 { "playball.09", 0x1000, 0xc4566d0f, 1 | BRF_PRG | BRF_ESS }, // 11
3391
3392 { "speech.ic4", 0x1000, 0x7e4fc798, 2 | BRF_PRG | BRF_ESS }, // 12 soundcpu
3393 { "speech.ic5", 0x1000, 0xddfe860c, 2 | BRF_PRG | BRF_ESS }, // 13
3394 { "speech.ic6", 0x1000, 0x8bfebf87, 2 | BRF_PRG | BRF_ESS }, // 14
3395 { "speech.ic7", 0x1000, 0xdb351db6, 2 | BRF_PRG | BRF_ESS }, // 15
3396 { "playball.snd", 0x1000, 0xf3076f9f, 2 | BRF_PRG | BRF_ESS }, // 16
3397 };
3398
3399 STD_ROM_PICK(playball)
STD_ROM_FN(playball)3400 STD_ROM_FN(playball)
3401
3402 static INT32 PlayballInit()
3403 {
3404 playball = 1;
3405
3406 INT32 nRet = DrvInit(1, 5, 6, 1, 0xc000);
3407
3408 if (nRet == 0)
3409 {
3410 hc55516_init(M6800TotalCycles, 894886);
3411 uses_hc55516 = 1;
3412
3413 pStartDraw = DrvDrawBegin;
3414 pDrawScanline = DrvDrawLine;
3415
3416 pia_init();
3417 pia_config(0, 0, &pia_0);
3418 pia_config(1, 0, &pia_1);
3419 pia_config(2, 0, &pia_2_sinistar);
3420 pia_config(3, 0, &pia_3);
3421 }
3422
3423 return nRet;
3424 }
3425
3426 struct BurnDriver BurnDrvPlayball = {
3427 "playball", NULL, NULL, NULL, "1983",
3428 "PlayBall! (prototype)\0", NULL, "Williams", "6809 System",
3429 NULL, NULL, NULL, NULL,
3430 BDF_GAME_WORKING | BDF_ORIENTATION_VERTICAL, 2, HARDWARE_MISC_PRE90S, GBF_BREAKOUT, 0,
3431 NULL, playballRomInfo, playballRomName, NULL, NULL, NULL, NULL, PlayballInputInfo, NULL,
3432 PlayballInit, DrvExit, DrvFrame, DrvDraw, DrvScan, &DrvRecalc, 0x10,
3433 240, 292, 3, 4
3434 };
3435
3436
3437 // Lotto Fun
3438
3439 static struct BurnRomInfo lottofunRomDesc[] = {
3440 { "vl7a.dat", 0x1000, 0xfb2aec2c, 1 | BRF_PRG | BRF_ESS }, // 0 M6809 Code
3441 { "vl7c.dat", 0x1000, 0x9a496519, 1 | BRF_PRG | BRF_ESS }, // 1
3442 { "vl7e.dat", 0x1000, 0x032cab4b, 1 | BRF_PRG | BRF_ESS }, // 2
3443 { "vl4e.dat", 0x1000, 0x5e9af236, 1 | BRF_PRG | BRF_ESS }, // 3
3444 { "vl4c.dat", 0x1000, 0x4b134ae2, 1 | BRF_PRG | BRF_ESS }, // 4
3445 { "vl4a.dat", 0x1000, 0xb2f1f95a, 1 | BRF_PRG | BRF_ESS }, // 5
3446 { "vl5e.dat", 0x1000, 0xc8681c55, 1 | BRF_PRG | BRF_ESS }, // 6
3447 { "vl5c.dat", 0x1000, 0xeb9351e0, 1 | BRF_PRG | BRF_ESS }, // 7
3448 { "vl5a.dat", 0x1000, 0x534f2fa1, 1 | BRF_PRG | BRF_ESS }, // 8
3449 { "vl6e.dat", 0x1000, 0xbefac592, 1 | BRF_PRG | BRF_ESS }, // 9
3450 { "vl6c.dat", 0x1000, 0xa73d7f13, 1 | BRF_PRG | BRF_ESS }, // 10
3451 { "vl6a.dat", 0x1000, 0x5730a43d, 1 | BRF_PRG | BRF_ESS }, // 11
3452
3453 { "vl2532.snd", 0x1000, 0x214b8a04, 2 | BRF_PRG | BRF_ESS }, // 12 M6800 Code
3454 };
3455
3456 STD_ROM_PICK(lottofun)
STD_ROM_FN(lottofun)3457 STD_ROM_FN(lottofun)
3458
3459 static INT32 LottofunInit()
3460 {
3461 lottofun = 1;
3462
3463 INT32 rc = DrvInit(1, 0, 6, 1, 0xc000);
3464 if (!rc) {
3465 pStartDraw = DrvDrawBegin;
3466 pDrawScanline = DrvDrawLine;
3467 }
3468 return rc;
3469 }
3470
3471 struct BurnDriver BurnDrvLottofun = {
3472 "lottofun", NULL, NULL, NULL, "1987",
3473 "Lotto Fun\0", NULL, "H.A.R. Management", "6809 System",
3474 NULL, NULL, NULL, NULL,
3475 BDF_GAME_WORKING, 2, HARDWARE_MISC_PRE90S, GBF_MISC, 0,
3476 NULL, lottofunRomInfo, lottofunRomName, NULL, NULL, NULL, NULL, LottofunInputInfo, NULL,
3477 LottofunInit, DrvExit, DrvFrame, DrvDraw, DrvScan, &DrvRecalc, 0x10,
3478 286, 240, 4, 3
3479 };
3480
3481
3482 // Blaster
3483
3484 static struct BurnRomInfo blasterRomDesc[] = {
3485 { "16.ic39", 0x1000, 0x54a40b21, 1 | BRF_PRG | BRF_ESS }, // 0 M6809 Code
3486 { "13.ic27", 0x2000, 0xf4dae4c8, 1 | BRF_PRG | BRF_ESS }, // 1
3487 { "11.ic25", 0x2000, 0x6371e62f, 1 | BRF_PRG | BRF_ESS }, // 2
3488 { "12.ic26", 0x2000, 0x9804faac, 1 | BRF_PRG | BRF_ESS }, // 3
3489 { "17.ic41", 0x1000, 0xbf96182f, 1 | BRF_PRG | BRF_ESS }, // 4
3490 { "15.ic38", 0x4000, 0x1ad146a4, 1 | BRF_PRG | BRF_ESS }, // 5
3491 { "8.ic20", 0x4000, 0xf110bbb0, 1 | BRF_PRG | BRF_ESS }, // 6
3492 { "9.ic22", 0x4000, 0x5c5b0f8a, 1 | BRF_PRG | BRF_ESS }, // 7
3493 { "10.ic24", 0x4000, 0xd47eb67f, 1 | BRF_PRG | BRF_ESS }, // 8
3494 { "6.ic13", 0x4000, 0x47fc007e, 1 | BRF_PRG | BRF_ESS }, // 9
3495 { "5.ic11", 0x4000, 0x15c1b94d, 1 | BRF_PRG | BRF_ESS }, // 10
3496 { "14.ic35", 0x4000, 0xaea6b846, 1 | BRF_PRG | BRF_ESS }, // 11
3497 { "7.ic15", 0x4000, 0x7a101181, 1 | BRF_PRG | BRF_ESS }, // 12
3498 { "1.ic1", 0x4000, 0x8d0ea9e7, 1 | BRF_PRG | BRF_ESS }, // 13
3499 { "2.ic3", 0x4000, 0x03c4012c, 1 | BRF_PRG | BRF_ESS }, // 14
3500 { "4.ic7", 0x4000, 0xfc9d39fb, 1 | BRF_PRG | BRF_ESS }, // 15
3501 { "3.ic6", 0x4000, 0x253690fb, 1 | BRF_PRG | BRF_ESS }, // 16
3502
3503 { "18.sb13", 0x1000, 0xc33a3145, 2 | BRF_PRG | BRF_ESS }, // 17 M6800 #0 Code
3504
3505 { "18.sb10", 0x1000, 0xc33a3145, 3 | BRF_PRG | BRF_ESS }, // 18 M6800 #1 Code
3506
3507 { "4.u42", 0x0200, 0xe6631c23, 0 | BRF_OPT }, // 19 proms
3508 { "6.u23", 0x0200, 0x83faf25e, 0 | BRF_OPT }, // 20
3509 { "blaster.col", 0x0800, 0xbac50bc4, 4 | BRF_GRA }, // 21
3510 };
3511
3512 STD_ROM_PICK(blaster)
STD_ROM_FN(blaster)3513 STD_ROM_FN(blaster)
3514
3515 static INT32 BlasterInit()
3516 {
3517 blaster = 1;
3518
3519 INT32 nRet = DrvInit(2, 0, 6, 2, 0x9700);
3520
3521 if (nRet == 0)
3522 {
3523 pStartDraw = DrvDrawBegin;
3524 pDrawScanline = BlasterDrawLine;
3525 }
3526
3527 return nRet;
3528 }
3529
3530 struct BurnDriver BurnDrvBlaster = {
3531 "blaster", NULL, NULL, NULL, "1983",
3532 "Blaster\0", NULL, "Williams / Vid Kidz", "6809 System",
3533 NULL, NULL, NULL, NULL,
3534 BDF_GAME_WORKING, 2, HARDWARE_MISC_PRE90S, GBF_MISC, 0,
3535 NULL, blasterRomInfo, blasterRomName, NULL, NULL, NULL, NULL, BlasterInputInfo, NULL,
3536 BlasterInit, DrvExit, DrvFrame, BlasterDraw, DrvScan, &DrvRecalc, 0x110,
3537 292, 240, 4, 3
3538 };
3539
3540
3541 // Blaster (location test)
3542
3543 static struct BurnRomInfo blasteroRomDesc[] = {
3544 { "16.ic39", 0x1000, 0x2db032d2, 1 | BRF_PRG | BRF_ESS }, // 0 M6809 Code
3545 { "13.ic27", 0x2000, 0xc99213c7, 1 | BRF_PRG | BRF_ESS }, // 1
3546 { "11.ic25", 0x2000, 0xbc2d7eda, 1 | BRF_PRG | BRF_ESS }, // 2
3547 { "12.ic26", 0x2000, 0x8a215017, 1 | BRF_PRG | BRF_ESS }, // 3
3548 { "17.ic41", 0x1000, 0xb308f0e5, 1 | BRF_PRG | BRF_ESS }, // 4
3549 { "15.ic38", 0x4000, 0x1ad146a4, 1 | BRF_PRG | BRF_ESS }, // 5
3550 { "8.ic20", 0x4000, 0xf110bbb0, 1 | BRF_PRG | BRF_ESS }, // 6
3551 { "9.ic22", 0x4000, 0x5c5b0f8a, 1 | BRF_PRG | BRF_ESS }, // 7
3552 { "10.ic24", 0x4000, 0xd47eb67f, 1 | BRF_PRG | BRF_ESS }, // 8
3553 { "6.ic13", 0x4000, 0x47fc007e, 1 | BRF_PRG | BRF_ESS }, // 9
3554 { "5.ic11", 0x4000, 0x15c1b94d, 1 | BRF_PRG | BRF_ESS }, // 10
3555 { "14.ic35", 0x4000, 0xaea6b846, 1 | BRF_PRG | BRF_ESS }, // 11
3556 { "7.ic15", 0x4000, 0xa1c4db77, 1 | BRF_PRG | BRF_ESS }, // 12
3557 { "1.ic1", 0x4000, 0x8d0ea9e7, 1 | BRF_PRG | BRF_ESS }, // 13
3558 { "2.ic3", 0x4000, 0x03c4012c, 1 | BRF_PRG | BRF_ESS }, // 14
3559 { "4.ic7", 0x4000, 0x39d2a32c, 1 | BRF_PRG | BRF_ESS }, // 15
3560 { "3.ic6", 0x4000, 0x054c9f1c, 1 | BRF_PRG | BRF_ESS }, // 16
3561
3562 { "18.sb13", 0x1000, 0xc33a3145, 2 | BRF_PRG | BRF_ESS }, // 17 M6800 #0 Code
3563
3564 { "18.sb10", 0x1000, 0xc33a3145, 3 | BRF_PRG | BRF_ESS }, // 18 M6800 #1 Code
3565
3566 { "4.u42", 0x0200, 0xe6631c23, 0 | BRF_OPT }, // 19 proms
3567 { "6.u23", 0x0200, 0x83faf25e, 0 | BRF_OPT }, // 20
3568 { "blaster.col", 0x0800, 0xbac50bc4, 4 | BRF_GRA }, // 21
3569 };
3570
3571 STD_ROM_PICK(blastero)
3572 STD_ROM_FN(blastero)
3573
3574 struct BurnDriver BurnDrvBlastero = {
3575 "blastero", "blaster", NULL, NULL, "1983",
3576 "Blaster (location test)\0", NULL, "Williams / Vid Kidz", "6809 System",
3577 NULL, NULL, NULL, NULL,
3578 BDF_GAME_WORKING | BDF_CLONE, 2, HARDWARE_MISC_PRE90S, GBF_MISC, 0,
3579 NULL, blasteroRomInfo, blasteroRomName, NULL, NULL, NULL, NULL, BlasterInputInfo, NULL,
3580 BlasterInit, DrvExit, DrvFrame, BlasterDraw, DrvScan, &DrvRecalc, 0x110,
3581 292, 240, 4, 3
3582 };
3583
3584