1 // Q-Bert emu-layer for FB Alpha by dink, based on the MAME driver by Fabrice Frances & Nicola Salmoria.
2
3 #include "tiles_generic.h"
4 #include "driver.h"
5 #include "nec_intf.h"
6 #include "m6502_intf.h"
7 #include "burn_gun.h" // trackball
8 #include "bitswap.h"
9 #include "dac.h"
10 #include "samples.h"
11 #include "ay8910.h"
12 #include "sp0250.h"
13 #include "timer.h"
14
15 //#define QBERT_SOUND_DEBUG
16
17 static UINT8 *AllMem;
18 static UINT8 *MemEnd;
19 static UINT8 *AllRam;
20 static UINT8 *RamEnd;
21 static UINT8 *DrvV20ROM;
22 static UINT8 *Drv6502ROM;
23 static UINT8 *Drv6502ROM1;
24 static UINT8 *DrvV20RAM;
25 static UINT8 *Drv6502RAM;
26 static UINT8 *DrvVideoRAM;
27 static UINT8 *DrvCharRAM;
28 static UINT8 *DrvSpriteRAM;
29 static UINT8 *DrvPaletteRAM;
30 static UINT8 *DrvCharGFX;
31 static UINT8 *DrvSpriteGFX;
32 static UINT8 *DrvNVRAM;
33 static UINT8 *DrvDummyROM;
34 static UINT8 *DrvCharExp;
35
36 static UINT8 DummyRegion[2];
37
38 static UINT8 *riot_regs;
39 static UINT8 *riot_ram;
40
41 static UINT8 *background_prio;
42 static UINT8 *spritebank;
43 static UINT8 *soundlatch;
44 static UINT8 *soundcpu_do_nmi;
45
46 static UINT8 *vtqueue;
47 static UINT8 *vtqueuepos;
48 static UINT32 *vtqueuetime;
49 static UINT8 *knocker_prev;
50
51 static UINT8 flipscreenx;
52 static UINT8 flipscreeny;
53 static UINT8 joystick_select;
54
55 static INT32 speech_timer_counter = 0;
56 static UINT8 nmi_state = 0;
57 static UINT8 nmi_rate = 0;
58 static UINT8 psg_latch = 0;
59 static UINT8 sp0250_latch = 0;
60 static UINT8 soundlatch2 = 0;
61 static UINT8 speech_control = 0;
62 static UINT8 last_command = 0;
63 static UINT8 dac_data[2] = { 0xff, 0xff };
64
65 static INT32 qbert_random;
66 static INT32 reactor_score;
67
68 static UINT32 *DrvPalette;
69 static UINT8 DrvRecalc;
70
71 static UINT8 tilemap_bank[4] = { 0, 0, 0, 0 };
72
73 static UINT8 DrvJoy1[8];
74 static UINT8 DrvJoy2[8];
75 static UINT8 DrvJoy3[8];
76 static UINT8 DrvJoy4[8];
77 static UINT8 DrvJoy5[8];
78 static UINT8 DrvFakeInput[8]; // fake inputs for rotate buttons
79
80 static UINT8 DrvDip[2] = { 0, 0 };
81 static UINT8 DrvInput[5];
82 static UINT8 DrvReset;
83
84 static INT16 Analog[2];
85 static INT16 analog_last[2];
86
87 static UINT8 game_type = 0; // 0 = qbert, 6 = qbertcub, 4 = mplanets, 7 = curvebal, 8 = insector, 9 - argusg/krull, 10 - reactor
88 static INT32 type2_sound = 0;
89 static INT32 has_tball = 0; // wizwars, reactor, argusg
90
91 static UINT32 nRotateTime[2] = { 0, 0 };
92
93 #define A(a, b, c, d) {a, b, (UINT8*)(c), d}
94 static struct BurnInputInfo QbertInputList[] = {
95 {"P1 Coin", BIT_DIGITAL, DrvJoy1 + 2, "p1 coin" },
96 {"P1 Start", BIT_DIGITAL, DrvJoy1 + 0, "p1 start" },
97 {"P1 Up", BIT_DIGITAL, DrvJoy2 + 2, "p1 up" },
98 {"P1 Down", BIT_DIGITAL, DrvJoy2 + 3, "p1 down" },
99 {"P1 Left", BIT_DIGITAL, DrvJoy2 + 1, "p1 left" },
100 {"P1 Right", BIT_DIGITAL, DrvJoy2 + 0, "p1 right" },
101
102 {"P2 Coin", BIT_DIGITAL, DrvJoy1 + 3, "p2 coin" },
103 {"P2 Start", BIT_DIGITAL, DrvJoy1 + 1, "p2 start" },
104 {"P2 Up", BIT_DIGITAL, DrvJoy2 + 6, "p2 up" },
105 {"P2 Down", BIT_DIGITAL, DrvJoy2 + 7, "p2 down" },
106 {"P2 Left", BIT_DIGITAL, DrvJoy2 + 5, "p2 left" },
107 {"P2 Right", BIT_DIGITAL, DrvJoy2 + 4, "p2 right" },
108
109 {"Reset", BIT_DIGITAL, &DrvReset, "reset" },
110 {"Select", BIT_DIGITAL, DrvJoy1 + 7, "diag" },
111 {"Dip A", BIT_DIPSWITCH, DrvDip + 0, "dip" },
112 {"Dip B", BIT_DIPSWITCH, DrvDip + 1, "dip" },
113 };
114
115 STDINPUTINFO(Qbert)
116
117 static struct BurnInputInfo MplanetsInputList[] = {
118 {"P1 Coin", BIT_DIGITAL, DrvJoy1 + 0, "p1 coin" },
119 {"P1 Start", BIT_DIGITAL, DrvJoy2 + 5, "p1 start" },
120 {"P1 Up", BIT_DIGITAL, DrvJoy2 + 0, "p1 up" },
121 {"P1 Down", BIT_DIGITAL, DrvJoy2 + 2, "p1 down" },
122 {"P1 Left", BIT_DIGITAL, DrvJoy2 + 3, "p1 left" },
123 {"P1 Right", BIT_DIGITAL, DrvJoy2 + 1, "p1 right" },
124 {"P1 Button 1", BIT_DIGITAL, DrvJoy2 + 4, "p1 fire 1" },
125 {"P1 Button 2", BIT_DIGITAL, DrvJoy2 + 7, "p1 fire 2" },
126 {"Rotate Left", BIT_DIGITAL, DrvFakeInput + 0, "p1 rotate left" },
127 {"Rotate Right", BIT_DIGITAL, DrvFakeInput + 1, "p1 rotate right" },
128
129 {"Reset", BIT_DIGITAL, &DrvReset, "reset" },
130 {"Select", BIT_DIGITAL, DrvJoy1 + 6, "diag" },
131 {"Dip A", BIT_DIPSWITCH, DrvDip + 0, "dip" },
132 {"Dip B", BIT_DIPSWITCH, DrvDip + 1, "dip" },
133 };
134
135 STDINPUTINFO(Mplanets)
136
137 static struct BurnInputInfo QbertqubInputList[] = {
138 {"P1 Coin", BIT_DIGITAL, DrvJoy1 + 3, "p1 coin" },
139 {"P1 Start", BIT_DIGITAL, DrvJoy1 + 0, "p1 start" },
140 {"P1 Up", BIT_DIGITAL, DrvJoy2 + 2, "p1 up" },
141 {"P1 Down", BIT_DIGITAL, DrvJoy2 + 3, "p1 down" },
142 {"P1 Left", BIT_DIGITAL, DrvJoy2 + 1, "p1 left" },
143 {"P1 Right", BIT_DIGITAL, DrvJoy2 + 0, "p1 right" },
144
145 {"Reset", BIT_DIGITAL, &DrvReset, "reset" },
146 {"Select", BIT_DIGITAL, DrvJoy1 + 7, "diag" },
147 {"Dip A", BIT_DIPSWITCH, DrvDip + 0, "dip" },
148 {"Dip B", BIT_DIPSWITCH, DrvDip + 1, "dip" },
149 };
150
151 STDINPUTINFO(Qbertqub)
152
153 static struct BurnInputInfo InsectorInputList[] = {
154 {"P1 Coin", BIT_DIGITAL, DrvJoy1 + 2, "p1 coin" },
155 {"P1 Up", BIT_DIGITAL, DrvJoy2 + 0, "p1 up" },
156 {"P1 Down", BIT_DIGITAL, DrvJoy2 + 2, "p1 down" },
157 {"P1 Left", BIT_DIGITAL, DrvJoy2 + 3, "p1 left" },
158 {"P1 Right", BIT_DIGITAL, DrvJoy2 + 1, "p1 right" },
159 {"P1 Button 1", BIT_DIGITAL, DrvJoy1 + 0, "p1 fire 1" },
160 {"P1 Button 2", BIT_DIGITAL, DrvJoy1 + 1, "p1 fire 2" },
161
162 {"P2 Coin", BIT_DIGITAL, DrvJoy1 + 3, "p2 coin" },
163 {"P2 Up", BIT_DIGITAL, DrvJoy2 + 4, "p2 up" },
164 {"P2 Down", BIT_DIGITAL, DrvJoy2 + 6, "p2 down" },
165 {"P2 Left", BIT_DIGITAL, DrvJoy2 + 7, "p2 left" },
166 {"P2 Right", BIT_DIGITAL, DrvJoy2 + 5, "p2 right" },
167 {"P2 Button 1", BIT_DIGITAL, DrvJoy1 + 4, "p2 fire 1" },
168 {"P2 Button 2", BIT_DIGITAL, DrvJoy1 + 5, "p2 fire 2" },
169
170 {"Reset", BIT_DIGITAL, &DrvReset, "reset" },
171 {"Select", BIT_DIGITAL, DrvJoy1 + 7, "diag" },
172 {"Dip A", BIT_DIPSWITCH, DrvDip + 0, "dip" },
173 {"Dip B", BIT_DIPSWITCH, DrvDip + 1, "dip" },
174 };
175
176 STDINPUTINFO(Insector)
177
178 static struct BurnInputInfo ArgusgInputList[] = {
179 {"P1 Coin", BIT_DIGITAL, DrvJoy1 + 2, "p1 coin" },
180 {"P1 Button 1", BIT_DIGITAL, DrvJoy2 + 1, "p1 fire 1" },
181 {"P1 Button 2", BIT_DIGITAL, DrvJoy2 + 0, "p1 fire 2" },
182
183 A("P1 Trackball X", BIT_ANALOG_REL, &Analog[0], "p1 x-axis" ),
184 A("P1 Trackball Y", BIT_ANALOG_REL, &Analog[1], "p1 y-axis" ),
185
186 {"P2 Coin", BIT_DIGITAL, DrvJoy1 + 3, "p2 coin" },
187 {"P2 Button 1", BIT_DIGITAL, DrvJoy2 + 3, "p2 fire 1" },
188 {"P2 Button 2", BIT_DIGITAL, DrvJoy2 + 2, "p2 fire 2" },
189
190 {"Reset", BIT_DIGITAL, &DrvReset, "reset" },
191 {"Select", BIT_DIGITAL, DrvJoy1 + 1, "diag" },
192 {"Dip A", BIT_DIPSWITCH, DrvDip + 0, "dip" },
193 {"Dip B", BIT_DIPSWITCH, DrvDip + 1, "dip" },
194 };
195
196 STDINPUTINFO(Argusg)
197
198 static struct BurnInputInfo KrullInputList[] = {
199 {"Coin 1", BIT_DIGITAL, DrvJoy1 + 2, "p1 coin" },
200 {"Coin 2", BIT_DIGITAL, DrvJoy1 + 3, "p2 coin" },
201 {"Start 1", BIT_DIGITAL, DrvJoy1 + 6, "p1 start" },
202 {"Start 2", BIT_DIGITAL, DrvJoy1 + 7, "p2 start" },
203 {"Left Stick Up", BIT_DIGITAL, DrvJoy2 + 4, "p1 up" },
204 {"Left Stick Down", BIT_DIGITAL, DrvJoy2 + 6, "p1 down" },
205 {"Left Stick Left", BIT_DIGITAL, DrvJoy2 + 7, "p1 left" },
206 {"Left Stick Right",BIT_DIGITAL, DrvJoy2 + 5, "p1 right" },
207 {"Right Stick Up", BIT_DIGITAL, DrvJoy2 + 0, "p1 up 2" },
208 {"Right Stick Down",BIT_DIGITAL, DrvJoy2 + 2, "p1 down 2" },
209 {"Right Stick Left",BIT_DIGITAL, DrvJoy2 + 3, "p1 left 2" },
210 {"Right Stick Right",BIT_DIGITAL, DrvJoy2 + 1, "p1 right 2"},
211
212 {"Reset", BIT_DIGITAL, &DrvReset, "reset" },
213 {"Select", BIT_DIGITAL, DrvJoy1 + 1, "diag" },
214 {"Dip A", BIT_DIPSWITCH, DrvDip + 0, "dip" },
215 {"Dip B", BIT_DIPSWITCH, DrvDip + 1, "dip" },
216 };
217
218 STDINPUTINFO(Krull)
219
220 static struct BurnInputInfo CurvebalInputList[] = {
221 {"P1 Coin", BIT_DIGITAL, DrvJoy1 + 2, "p1 coin" },
222 {"P1 Button 1", BIT_DIGITAL, DrvJoy2 + 1, "p1 fire 1" },
223 {"P1 Button 2", BIT_DIGITAL, DrvJoy2 + 6, "p1 fire 2" },
224
225 {"P2 Coin", BIT_DIGITAL, DrvJoy1 + 3, "p2 coin" },
226 {"P2 Button 1", BIT_DIGITAL, DrvJoy2 + 2, "p2 fire 1" },
227 {"P2 Button 2", BIT_DIGITAL, DrvJoy2 + 4, "p2 fire 2" },
228
229 {"Reset", BIT_DIGITAL, &DrvReset, "reset" },
230 {"Select", BIT_DIGITAL, DrvJoy1 + 1, "diag" },
231 {"Dip A", BIT_DIPSWITCH, DrvDip + 0, "dip" },
232 {"Dip B", BIT_DIPSWITCH, DrvDip + 1, "dip" },
233 };
234
235 STDINPUTINFO(Curvebal)
236
237 static struct BurnInputInfo TylzInputList[] = {
238 {"P1 Coin", BIT_DIGITAL, DrvJoy1 + 3, "p1 coin" },
239 {"P1 Start", BIT_DIGITAL, DrvJoy2 + 5, "p1 start" },
240 {"P1 Up", BIT_DIGITAL, DrvJoy2 + 2, "p1 up" },
241 {"P1 Down", BIT_DIGITAL, DrvJoy2 + 0, "p1 down" },
242 {"P1 Left", BIT_DIGITAL, DrvJoy2 + 3, "p1 left" },
243 {"P1 Right", BIT_DIGITAL, DrvJoy2 + 1, "p1 right" },
244 {"P1 Button 1", BIT_DIGITAL, DrvJoy2 + 4, "p1 fire 1" },
245
246 {"Reset", BIT_DIGITAL, &DrvReset, "reset" },
247 {"Select", BIT_DIGITAL, DrvJoy1 + 1, "diag" },
248 {"Dip A", BIT_DIPSWITCH, DrvDip + 0, "dip" },
249 {"Dip B", BIT_DIPSWITCH, DrvDip + 1, "dip" },
250 };
251
252 STDINPUTINFO(Tylz)
253
254 static struct BurnInputInfo KngtmareInputList[] = {
255 {"Coin 1", BIT_DIGITAL, DrvJoy1 + 2, "p1 coin" },
256 {"Coin 2", BIT_DIGITAL, DrvJoy1 + 3, "p2 coin" },
257 {"Start 1", BIT_DIGITAL, DrvJoy2 + 6, "p1 start" },
258 {"Start 2", BIT_DIGITAL, DrvJoy2 + 7, "p2 start" },
259 {"Left Stick Left", BIT_DIGITAL, DrvJoy2 + 2, "p1 left" },
260 {"Left Stick Right",BIT_DIGITAL, DrvJoy2 + 0, "p1 right" },
261 {"Right Stick Left",BIT_DIGITAL, DrvJoy2 + 1, "p2 left" },
262 {"Right Stick Right",BIT_DIGITAL, DrvJoy2 + 3, "p2 right" },
263 {"Button 1", BIT_DIGITAL, DrvJoy2 + 4, "p1 fire 1" },
264 {"Button 2", BIT_DIGITAL, DrvJoy2 + 5, "p1 fire 2" },
265
266 {"Reset", BIT_DIGITAL, &DrvReset, "reset" },
267 {"Dip A", BIT_DIPSWITCH, DrvDip + 0, "dip" },
268 {"Dip B", BIT_DIPSWITCH, DrvDip + 1, "dip" },
269 };
270
271 STDINPUTINFO(Kngtmare)
272
273 static struct BurnInputInfo ScrewlooInputList[] = {
274 {"Coin 1", BIT_DIGITAL, DrvJoy1 + 2, "p1 coin" },
275 {"Coin 2", BIT_DIGITAL, DrvJoy1 + 3, "p2 coin" },
276 {"Left Stick Up", BIT_DIGITAL, DrvJoy1 + 7, "p1 up" },
277 {"Left Stick Down", BIT_DIGITAL, DrvJoy1 + 6, "p1 down" },
278 {"Left Stick Left", BIT_DIGITAL, DrvJoy1 + 5, "p1 left" },
279 {"Left Stick Right",BIT_DIGITAL, DrvJoy1 + 4, "p1 right" },
280 {"Right Stick Up", BIT_DIGITAL, DrvJoy2 + 3, "p1 up 2" },
281 {"Right Stick Down",BIT_DIGITAL, DrvJoy2 + 2, "p1 down 2" },
282 {"Right Stick Left",BIT_DIGITAL, DrvJoy2 + 1, "p1 left 2" },
283 {"Right Stick Right",BIT_DIGITAL, DrvJoy2 + 0, "p1 right 2"},
284 {"Button 1", BIT_DIGITAL, DrvJoy2 + 5, "p1 fire 1" },
285 {"Button 2", BIT_DIGITAL, DrvJoy2 + 4, "p1 fire 2" },
286
287 {"Reset", BIT_DIGITAL, &DrvReset, "reset" },
288 {"Select", BIT_DIGITAL, DrvJoy1 + 1, "diag" },
289 {"Dip A", BIT_DIPSWITCH, DrvDip + 0, "dip" },
290 {"Dip B", BIT_DIPSWITCH, DrvDip + 1, "dip" },
291 };
292
293 STDINPUTINFO(Screwloo)
294
295 static struct BurnInputInfo WizwarzInputList[] = {
296 {"P1 Coin", BIT_DIGITAL, DrvJoy1 + 2, "p1 coin" },
297 {"P1 Start", BIT_DIGITAL, DrvJoy2 + 6, "p1 start" },
298 {"P1 Up", BIT_DIGITAL, DrvJoy2 + 1, "p1 up" },
299 {"P1 Down", BIT_DIGITAL, DrvJoy2 + 3, "p1 down" },
300 {"P1 Left", BIT_DIGITAL, DrvJoy2 + 0, "p1 left" },
301 {"P1 Right", BIT_DIGITAL, DrvJoy2 + 2, "p1 right" },
302 {"P1 Button 1", BIT_DIGITAL, DrvJoy2 + 5, "p1 fire 1" },
303 A("P1 Trackball X", BIT_ANALOG_REL, &Analog[1], "p1 x-axis" ),
304
305 {"Reset", BIT_DIGITAL, &DrvReset, "reset" },
306 {"Select", BIT_DIGITAL, DrvJoy1 + 1, "diag" },
307 {"Dip A", BIT_DIPSWITCH, DrvDip + 0, "dip" },
308 {"Dip B", BIT_DIPSWITCH, DrvDip + 1, "dip" },
309 };
310
311 STDINPUTINFO(Wizwarz)
312
313 static struct BurnInputInfo VidvinceInputList[] = {
314 {"P1 Coin", BIT_DIGITAL, DrvJoy1 + 3, "p1 coin" },
315 {"P1 Up", BIT_DIGITAL, DrvJoy2 + 0, "p1 up" },
316 {"P1 Down", BIT_DIGITAL, DrvJoy2 + 1, "p1 down" },
317 {"P1 Left", BIT_DIGITAL, DrvJoy2 + 2, "p1 left" },
318 {"P1 Right", BIT_DIGITAL, DrvJoy2 + 3, "p1 right" },
319 {"P1 Button 1", BIT_DIGITAL, DrvJoy2 + 5, "p1 fire 1" },
320 {"P1 Button 2", BIT_DIGITAL, DrvJoy2 + 6, "p1 fire 2" },
321
322 {"Reset", BIT_DIGITAL, &DrvReset, "reset" },
323 {"Select", BIT_DIGITAL, DrvJoy1 + 1, "diag" },
324 {"Tilt", BIT_DIGITAL, DrvJoy1 + 4, "tilt" },
325 {"Dip A", BIT_DIPSWITCH, DrvDip + 0, "dip" },
326 {"Dip B", BIT_DIPSWITCH, DrvDip + 1, "dip" },
327 };
328
329 STDINPUTINFO(Vidvince)
330
331 static struct BurnInputInfo Stooges3InputList[] = {
332 {"P1 Coin", BIT_DIGITAL, DrvJoy1 + 3, "p1 coin" },
333 {"P1 Up", BIT_DIGITAL, DrvJoy5 + 0, "p1 up" },
334 {"P1 Down", BIT_DIGITAL, DrvJoy5 + 2, "p1 down" },
335 {"P1 Left", BIT_DIGITAL, DrvJoy5 + 3, "p1 left" },
336 {"P1 Right", BIT_DIGITAL, DrvJoy5 + 1, "p1 right" },
337 {"P1 Button 1", BIT_DIGITAL, DrvJoy2 + 5, "p1 fire 1" },
338
339 {"P2 Coin", BIT_DIGITAL, DrvJoy1 + 2, "p2 coin" },
340 {"P2 Up", BIT_DIGITAL, DrvJoy3 + 0, "p2 up" },
341 {"P2 Down", BIT_DIGITAL, DrvJoy3 + 2, "p2 down" },
342 {"P2 Left", BIT_DIGITAL, DrvJoy3 + 3, "p2 left" },
343 {"P2 Right", BIT_DIGITAL, DrvJoy3 + 1, "p2 right" },
344 {"P2 Button 1", BIT_DIGITAL, DrvJoy2 + 4, "p2 fire 1" },
345
346 {"P3 Up", BIT_DIGITAL, DrvJoy4 + 0, "p3 up" },
347 {"P3 Down", BIT_DIGITAL, DrvJoy4 + 2, "p3 down" },
348 {"P3 Left", BIT_DIGITAL, DrvJoy4 + 3, "p3 left" },
349 {"P3 Right", BIT_DIGITAL, DrvJoy4 + 1, "p3 right" },
350 {"P3 Button 1", BIT_DIGITAL, DrvJoy2 + 6, "p3 fire 1" },
351
352 {"Reset", BIT_DIGITAL, &DrvReset, "reset" },
353 {"Select", BIT_DIGITAL, DrvJoy1 + 1, "diag" },
354 {"Tilt", BIT_DIGITAL, DrvJoy1 + 4, "tilt" },
355 {"Dip A", BIT_DIPSWITCH, DrvDip + 0, "dip" },
356 {"Dip B", BIT_DIPSWITCH, DrvDip + 1, "dip" },
357 };
358
359 STDINPUTINFO(Stooges3)
360
361 static struct BurnInputInfo ReactorInputList[] = {
362 {"P1 Coin", BIT_DIGITAL, DrvJoy4 + 4, "p1 coin" },
363 {"P1 Start", BIT_DIGITAL, DrvJoy4 + 0, "p1 start" },
364 A("P1 Trackball X", BIT_ANALOG_REL, &Analog[0], "p1 x-axis" ),
365 A("P1 Trackball Y", BIT_ANALOG_REL, &Analog[1], "p1 y-axis" ),
366 {"P1 Button 1", BIT_DIGITAL, DrvJoy4 + 3, "p1 fire 1" },
367 {"P1 Button 2", BIT_DIGITAL, DrvJoy4 + 2, "p1 fire 2" },
368
369 {"Reset", BIT_DIGITAL, &DrvReset, "reset" },
370 {"Select", BIT_DIGITAL, DrvJoy1 + 0, "diag" },
371 {"Dip A", BIT_DIPSWITCH, DrvDip + 0, "dip" },
372 {"Dip B", BIT_DIPSWITCH, DrvDip + 1, "dip" },
373 };
374
375 STDINPUTINFO(Reactor)
376
377 static struct BurnDIPInfo QbertDIPList[]=
378 {
379 DIP_OFFSET(0x0e)
380 {0x00, 0xff, 0xff, 0x02, NULL },
381 {0x01, 0xff, 0xff, 0x40, NULL },
382
383 {0 , 0xfe, 0 , 2, "Demo Sounds" },
384 {0x00, 0x01, 0x01, 0x01, "Off" },
385 {0x00, 0x01, 0x01, 0x00, "On" },
386
387 {0 , 0xfe, 0 , 2, "Kicker" },
388 {0x00, 0x01, 0x02, 0x00, "Off" },
389 {0x00, 0x01, 0x02, 0x02, "On" },
390
391 {0 , 0xfe, 0 , 2, "Cabinet" },
392 {0x00, 0x01, 0x04, 0x00, "Upright" },
393 {0x00, 0x01, 0x04, 0x04, "Cocktail" },
394
395 {0 , 0xfe, 0 , 2, "Auto Round Advance (Cheat)" },
396 {0x00, 0x01, 0x08, 0x00, "Off" },
397 {0x00, 0x01, 0x08, 0x08, "On" },
398
399 {0 , 0xfe, 0 , 2, "Free Play" },
400 {0x00, 0x01, 0x10, 0x00, "Off" },
401 {0x00, 0x01, 0x10, 0x10, "On" },
402
403 {0 , 0xfe, 0 , 2, "SW5" },
404 {0x00, 0x01, 0x20, 0x00, "Off" },
405 {0x00, 0x01, 0x20, 0x20, "On" },
406
407 {0 , 0xfe, 0 , 2, "SW7" },
408 {0x00, 0x01, 0x40, 0x00, "Off" },
409 {0x00, 0x01, 0x40, 0x40, "On" },
410
411 {0 , 0xfe, 0 , 2, "SW8" },
412 {0x00, 0x01, 0x80, 0x00, "Off" },
413 {0x00, 0x01, 0x80, 0x80, "On" },
414
415 {0 , 0xfe, 0 , 2, "Service" },
416 {0x01, 0x01, 0x40, 0x40, "Off" },
417 {0x01, 0x01, 0x40, 0x00, "On" },
418 };
419
420 STDDIPINFO(Qbert)
421
422 static struct BurnDIPInfo MplanetsDIPList[]=
423 {
424 DIP_OFFSET(0x0c)
425 {0x00, 0xff, 0xff, 0x00, NULL },
426 {0x01, 0xff, 0xff, 0x80, NULL },
427
428 {0 , 0xfe, 0 , 2, "Demo Sounds" },
429 {0x00, 0x01, 0x01, 0x01, "Off" },
430 {0x00, 0x01, 0x01, 0x00, "On" },
431
432 {0 , 0xfe, 0 , 2, "Bonus Life" },
433 {0x00, 0x01, 0x02, 0x00, "10000" },
434 {0x00, 0x01, 0x02, 0x02, "12000" },
435
436 {0 , 0xfe, 0 , 2, "Allow Round Select" },
437 {0x00, 0x01, 0x08, 0x00, "No" },
438 {0x00, 0x01, 0x08, 0x08, "Yes" },
439
440 {0 , 0xfe, 0 , 4, "Coinage" },
441 {0x00, 0x01, 0x14, 0x04, "2 Coins 1 Credit" },
442 {0x00, 0x01, 0x14, 0x00, "1 Coin 1 Credit" },
443 {0x00, 0x01, 0x14, 0x10, "1 Coin 2 Credits" },
444 {0x00, 0x01, 0x14, 0x14, "Free Play" },
445
446 {0 , 0xfe, 0 , 2, "Lives" },
447 {0x00, 0x01, 0x20, 0x00, "3" },
448 {0x00, 0x01, 0x20, 0x20, "5" },
449
450 {0 , 0xfe, 0 , 4, "Difficulty" },
451 {0x00, 0x01, 0xc0, 0x40, "Easy" },
452 {0x00, 0x01, 0xc0, 0x00, "Medium" },
453 {0x00, 0x01, 0xc0, 0x80, "Hard" },
454 {0x00, 0x01, 0xc0, 0xc0, "Hardest" },
455
456 {0 , 0xfe, 0 , 2, "Service" },
457 {0x01, 0x01, 0x80, 0x80, "Off" },
458 {0x01, 0x01, 0x80, 0x00, "On" },
459 };
460
461 STDDIPINFO(Mplanets)
462
463 static struct BurnDIPInfo QbertqubDIPList[]=
464 {
465 DIP_OFFSET(0x08)
466 {0x00, 0xff, 0xff, 0x00, NULL },
467 {0x01, 0xff, 0xff, 0x40, NULL },
468
469 {0 , 0xfe, 0 , 2, "Demo Sounds" },
470 {0x00, 0x01, 0x08, 0x08, "Off" },
471 {0x00, 0x01, 0x08, 0x00, "On" },
472
473 {0 , 0xfe, 0 , 13, "Coinage" },
474 {0x00, 0x01, 0x35, 0x24, "A 2/1 B 2/1" },
475 {0x00, 0x01, 0x35, 0x14, "A 1/1 B 4/1" },
476 {0x00, 0x01, 0x35, 0x30, "A 1/1 B 3/1" },
477 {0x00, 0x01, 0x35, 0x10, "A 1/1 B 2/1" },
478 {0x00, 0x01, 0x35, 0x00, "A 1/1 B 1/1" },
479 {0x00, 0x01, 0x35, 0x11, "A 2/3 B 2/1" },
480 {0x00, 0x01, 0x35, 0x15, "A 1/2 B 3/1" },
481 {0x00, 0x01, 0x35, 0x20, "A 1/2 B 2/1" },
482 {0x00, 0x01, 0x35, 0x21, "A 1/2 B 1/1" },
483 {0x00, 0x01, 0x35, 0x31, "A 1/2 B 1/5" },
484 {0x00, 0x01, 0x35, 0x04, "A 1/3 B 2/1" },
485 {0x00, 0x01, 0x35, 0x05, "A 1/3 B 1/1" },
486 {0x00, 0x01, 0x35, 0x35, "Free Play" },
487
488 {0 , 0xfe, 0 , 2, "1st Bonus Life" },
489 {0x00, 0x01, 0x02, 0x00, "10000" },
490 {0x00, 0x01, 0x02, 0x02, "15000" },
491
492 {0 , 0xfe, 0 , 2, "Additional Bonus Life" },
493 {0x00, 0x01, 0x40, 0x00, "20000" },
494 {0x00, 0x01, 0x40, 0x40, "25000" },
495
496 {0 , 0xfe, 0 , 2, "Difficulty" },
497 {0x00, 0x01, 0x80, 0x00, "Normal" },
498 {0x00, 0x01, 0x80, 0x80, "Hard" },
499
500 {0 , 0xfe, 0 , 2, "Service" },
501 {0x01, 0x01, 0x40, 0x40, "Off" },
502 {0x01, 0x01, 0x40, 0x00, "On" },
503
504 };
505
506 STDDIPINFO(Qbertqub)
507
508 static struct BurnDIPInfo InsectorDIPList[]=
509 {
510 DIP_OFFSET(0x10)
511 {0x00, 0xff, 0xff, 0x08, NULL },
512 {0x01, 0xff, 0xff, 0x40, NULL },
513
514 {0 , 0xfe, 0 , 2, "Bonus Life" },
515 {0x00, 0x01, 0x01, 0x00, "25k 75k and every 50k" },
516 {0x00, 0x01, 0x01, 0x01, "30k 90k and every 60k" },
517
518 {0 , 0xfe, 0 , 2, "Demo Sounds" },
519 {0x00, 0x01, 0x02, 0x02, "Off" },
520 {0x00, 0x01, 0x02, 0x00, "On" },
521
522 {0 , 0xfe, 0 , 2, "Demo Mode (Unlim Lives, Start 2=Adv. (Cheat)" },
523 {0x00, 0x01, 0x04, 0x00, "Off" },
524 {0x00, 0x01, 0x04, 0x04, "On" },
525
526 {0 , 0xfe, 0 , 2, "Lives" },
527 {0x00, 0x01, 0x08, 0x08, "3" },
528 {0x00, 0x01, 0x08, 0x00, "5" },
529
530 {0 , 0xfe, 0 , 4, "Coinage" },
531 {0x00, 0x01, 0x50, 0x40, "2 Coins 1 Credits" },
532 {0x00, 0x01, 0x50, 0x50, "2 Coins 2 Credits" },
533 {0x00, 0x01, 0x50, 0x00, "1 Coin 1 Credits" },
534 {0x00, 0x01, 0x50, 0x10, "1 Coin 2 Credits" },
535
536 {0 , 0xfe, 0 , 2, "Free Play" },
537 {0x00, 0x01, 0x20, 0x00, "Off" },
538 {0x00, 0x01, 0x20, 0x20, "On" },
539
540 {0 , 0xfe, 0 , 2, "Cabinet" },
541 {0x00, 0x01, 0x80, 0x00, "Upright" },
542 {0x00, 0x01, 0x80, 0x80, "Cocktail" },
543
544 {0 , 0xfe, 0 , 2, "Service" },
545 {0x01, 0x01, 0x40, 0x40, "Off" },
546 {0x01, 0x01, 0x40, 0x00, "On" },
547 };
548
549 STDDIPINFO(Insector)
550
551 static struct BurnDIPInfo ArgusgDIPList[]=
552 {
553 DIP_OFFSET(0x0a)
554 {0x00, 0xff, 0xff, 0x12, NULL },
555 {0x01, 0xff, 0xff, 0x01, NULL },
556
557 {0 , 0xfe, 0 , 2, "Demo Sounds" },
558 {0x00, 0x01, 0x01, 0x01, "Off" },
559 {0x00, 0x01, 0x01, 0x00, "On" },
560
561 {0 , 0xfe, 0 , 4, "Bonus Human Every" },
562 {0x00, 0x01, 0x22, 0x00, "15000" },
563 {0x00, 0x01, 0x22, 0x02, "20000" },
564 {0x00, 0x01, 0x22, 0x20, "25000" },
565 {0x00, 0x01, 0x22, 0x22, "30000" },
566
567 {0 , 0xfe, 0 , 4, "Initial Humans" },
568 {0x00, 0x01, 0x14, 0x00, "4" },
569 {0x00, 0x01, 0x14, 0x10, "6" },
570 {0x00, 0x01, 0x14, 0x04, "8" },
571 {0x00, 0x01, 0x14, 0x14, "10" },
572
573 {0 , 0xfe, 0 , 2, "Free Play" },
574 {0x00, 0x01, 0x08, 0x00, "Off" },
575 {0x00, 0x01, 0x08, 0x08, "On" },
576
577 {0 , 0xfe, 0 , 2, "Difficulty" },
578 {0x00, 0x01, 0x40, 0x00, "Normal" },
579 {0x00, 0x01, 0x40, 0x40, "Hard" },
580
581 {0 , 0xfe, 0 , 2, "Service" },
582 {0x01, 0x01, 0x01, 0x01, "Off" },
583 {0x01, 0x01, 0x01, 0x00, "On" },
584 };
585
586 STDDIPINFO(Argusg)
587
588 static struct BurnDIPInfo KrullDIPList[]=
589 {
590 DIP_OFFSET(0x0e)
591 {0x00, 0xff, 0xff, 0x00, NULL },
592 {0x01, 0xff, 0xff, 0x01, NULL },
593
594 {0 , 0xfe, 0 , 2, "Demo Sounds" },
595 {0x00, 0x01, 0x01, 0x01, "Off" },
596 {0x00, 0x01, 0x01, 0x00, "On" },
597
598 {0 , 0xfe, 0 , 2, "Difficulty" },
599 {0x00, 0x01, 0x02, 0x00, "Normal" },
600 {0x00, 0x01, 0x02, 0x02, "Hard" },
601
602 {0 , 0xfe, 0 , 2, "Lives" },
603 {0x00, 0x01, 0x08, 0x00, "3" },
604 {0x00, 0x01, 0x08, 0x08, "5" },
605
606 {0 , 0xfe, 0 , 4, "Coinage" },
607 {0x00, 0x01, 0x14, 0x04, "2 Coins 1 Credits" },
608 {0x00, 0x01, 0x14, 0x00, "1 Coin 1 Credits" },
609 {0x00, 0x01, 0x14, 0x10, "1 Coin 2 Credits" },
610 {0x00, 0x01, 0x14, 0x14, "Free Play" },
611
612 {0 , 0xfe, 0 , 2, "Hexagon" },
613 {0x00, 0x01, 0x20, 0x00, "Roving" },
614 {0x00, 0x01, 0x20, 0x20, "Stationary" },
615
616 {0 , 0xfe, 0 , 4, "Bonus Life" },
617 {0x00, 0x01, 0xc0, 0x40, "30k 60k and every 30k" },
618 {0x00, 0x01, 0xc0, 0x00, "30k 80k and every 50k" },
619 {0x00, 0x01, 0xc0, 0x80, "40k 90k and every 50k" },
620 {0x00, 0x01, 0xc0, 0xc0, "50k 125k and every 75k" },
621
622 {0 , 0xfe, 0 , 2, "Service" },
623 {0x01, 0x01, 0x01, 0x01, "Off" },
624 {0x01, 0x01, 0x01, 0x00, "On" },
625 };
626
627 STDDIPINFO(Krull)
628
629 static struct BurnDIPInfo CurvebalDIPList[]=
630 {
631 DIP_OFFSET(0x08)
632 {0x00, 0xff, 0xff, 0x04, NULL },
633 {0x01, 0xff, 0xff, 0x01, NULL },
634
635 {0 , 0xfe, 0 , 2, "Demo Sounds" },
636 {0x00, 0x01, 0x04, 0x00, "Off" },
637 {0x00, 0x01, 0x04, 0x04, "On" },
638
639 {0 , 0xfe, 0 , 2, "2 Players Game" },
640 {0x00, 0x01, 0x08, 0x08, "1 Credit" },
641 {0x00, 0x01, 0x08, 0x00, "2 Credits" },
642
643 {0 , 0xfe, 0 , 4, "Difficulty" },
644 {0x00, 0x01, 0x11, 0x00, "Easy" },
645 {0x00, 0x01, 0x11, 0x10, "Medium" },
646 {0x00, 0x01, 0x11, 0x01, "Hard" },
647 {0x00, 0x01, 0x11, 0x11, "Very Hard" },
648
649 {0 , 0xfe, 0 , 2, "Coins" },
650 {0x00, 0x01, 0x20, 0x00, "Normal" },
651 {0x00, 0x01, 0x20, 0x20, "French" },
652
653 {0 , 0xfe, 0 , 13, "Coinage" },
654 {0x00, 0x01, 0xc2, 0x42, "A 3/1 B 1/2" },
655 {0x00, 0x01, 0xc2, 0x42, "A 4/1 B 1/1" },
656 {0x00, 0x01, 0xc2, 0x82, "A 1/5 B 1/2" },
657 {0x00, 0x01, 0xc2, 0x82, "A 3/1 B 1/1" },
658 {0x00, 0x01, 0xc2, 0x02, "A 2/1 B 2/3" },
659 {0x00, 0x01, 0xc2, 0x02, "A 2/1 B 1/1" },
660 {0x00, 0x01, 0xc2, 0xc0, "A 2/1 B 2/1" },
661 {0x00, 0x01, 0xc2, 0x80, "A 1/1 B 1/2" },
662 {0x00, 0x01, 0xc2, 0x80, "A 2/1 B 1/2" },
663 {0x00, 0x01, 0xc2, 0x40, "A 1/1 B 1/3" },
664 {0x00, 0x01, 0xc2, 0x40, "A 2/1 B 1/3" },
665 {0x00, 0x01, 0xc2, 0x00, "A 1/1 B 1/1" },
666 {0x00, 0x01, 0xc2, 0xc2, "Free Play" },
667
668 {0 , 0xfe, 0 , 2, "Service" },
669 {0x01, 0x01, 0x01, 0x01, "Off" },
670 {0x01, 0x01, 0x01, 0x00, "On" },
671 };
672
673 STDDIPINFO(Curvebal)
674
675 static struct BurnDIPInfo TylzDIPList[]=
676 {
677 DIP_OFFSET(0x09)
678 {0x00, 0xff, 0xff, 0x08, NULL },
679 {0x01, 0xff, 0xff, 0x01, NULL },
680
681 {0 , 0xfe, 0 , 2, "Lives" },
682 {0x00, 0x01, 0x04, 0x00, "3" },
683 {0x00, 0x01, 0x04, 0x04, "5" },
684
685 {0 , 0xfe, 0 , 2, "Demo Sounds" },
686 {0x00, 0x01, 0x08, 0x00, "Off" },
687 {0x00, 0x01, 0x08, 0x08, "On" },
688
689 {0 , 0xfe, 0 , 4, "Coinage" },
690 {0x00, 0x01, 0x11, 0x01, "2 Coins 1 Credits" },
691 {0x00, 0x01, 0x11, 0x00, "1 Coin 1 Credits" },
692 {0x00, 0x01, 0x11, 0x10, "1 Coin 2 Credits" },
693 {0x00, 0x01, 0x11, 0x11, "Free Play" },
694
695 {0 , 0xfe, 0 , 4, "Bonus Life" },
696 {0x00, 0x01, 0x22, 0x00, "15k 35k and every 20k" },
697 {0x00, 0x01, 0x22, 0x20, "15k 45k and every 30k" },
698 {0x00, 0x01, 0x22, 0x02, "20k 55k and every 35k" },
699 {0x00, 0x01, 0x22, 0x22, "20k 60k and every 40k" },
700
701 {0 , 0xfe, 0 , 4, "Difficulty" },
702 {0x00, 0x01, 0xc0, 0x00, "Easy" },
703 {0x00, 0x01, 0xc0, 0x40, "Normal Easy" },
704 {0x00, 0x01, 0xc0, 0x80, "Normal Hard" },
705 {0x00, 0x01, 0xc0, 0xc0, "Hard" },
706
707 {0 , 0xfe, 0 , 2, "Service" },
708 {0x01, 0x01, 0x01, 0x01, "Off" },
709 {0x01, 0x01, 0x01, 0x00, "On" },
710 };
711
712 STDDIPINFO(Tylz)
713
714 static struct BurnDIPInfo KngtmareDIPList[]=
715 {
716 DIP_OFFSET(0x0b)
717 {0x00, 0xff, 0xff, 0xff, NULL },
718 {0x01, 0xff, 0xff, 0x00, NULL },
719
720 {0 , 0xfe, 0 , 3, "Coinage" },
721 {0x00, 0x01, 0x11, 0x10, "2 Coins 1 Credits" },
722 {0x00, 0x01, 0x11, 0x11, "1 Coin 1 Credits" },
723 {0x00, 0x01, 0x11, 0x01, "1 Coin 2 Credits" },
724
725 {0 , 0xfe, 0 , 2, "Lives" },
726 {0x00, 0x01, 0x20, 0x00, "3" },
727 {0x00, 0x01, 0x20, 0x20, "5" },
728 };
729
730 STDDIPINFO(Kngtmare)
731
732 static struct BurnDIPInfo ScrewlooDIPList[]=
733 {
734 DIP_OFFSET(0x0e)
735 {0x00, 0xff, 0xff, 0x40, NULL },
736 {0x01, 0xff, 0xff, 0x01, NULL },
737
738 {0 , 0xfe, 0 , 2, "Demo Sounds" },
739 {0x00, 0x01, 0x01, 0x01, "Off" },
740 {0x00, 0x01, 0x01, 0x00, "On" },
741
742 {0 , 0xfe, 0 , 2, "Demo mode" },
743 {0x00, 0x01, 0x02, 0x00, "Off" },
744 {0x00, 0x01, 0x02, 0x02, "On" },
745
746 {0 , 0xfe, 0 , 2, "1st Bonus Atom at" },
747 {0x00, 0x01, 0x04, 0x00, "5000" },
748 {0x00, 0x01, 0x04, 0x04, "20000" },
749
750 {0 , 0xfe, 0 , 2, "Free Play" },
751 {0x00, 0x01, 0x08, 0x00, "Off" },
752 {0x00, 0x01, 0x08, 0x08, "On" },
753
754 {0 , 0xfe, 0 , 4, "Coinage" },
755 {0x00, 0x01, 0x50, 0x00, "2 Coins 1 Credits" },
756 {0x00, 0x01, 0x50, 0x10, "2 Coins 2 Credits" },
757 {0x00, 0x01, 0x50, 0x40, "1 Coin 1 Credits" },
758 {0x00, 0x01, 0x50, 0x50, "1 Coin 2 Credits" },
759
760 {0 , 0xfe, 0 , 2, "1st Bonus Hand at" },
761 {0x00, 0x01, 0x20, 0x00, "25000" },
762 {0x00, 0x01, 0x20, 0x20, "50000" },
763
764 {0 , 0xfe, 0 , 2, "Hands" },
765 {0x00, 0x01, 0x80, 0x00, "3" },
766 {0x00, 0x01, 0x80, 0x80, "5" },
767
768 {0 , 0xfe, 0 , 2, "Service Mode" },
769 {0x01, 0x01, 0x01, 0x01, "Off" },
770 {0x01, 0x01, 0x01, 0x00, "On" },
771 };
772
773 STDDIPINFO(Screwloo)
774
775 static struct BurnDIPInfo WizwarzDIPList[]=
776 {
777 DIP_OFFSET(0x0a)
778 {0x00, 0xff, 0xff, 0x00, NULL },
779 {0x01, 0xff, 0xff, 0x01, NULL },
780
781 {0 , 0xfe, 0 , 4, "Bonuses" },
782 {0x00, 0x01, 0x09, 0x00, "Life 20k,50k every 30k / Mine 10k,25k every 15k" },
783 {0x00, 0x01, 0x09, 0x08, "Life 20k,55k every 35k / Mine 10k,30k every 20k" },
784 {0x00, 0x01, 0x09, 0x01, "Life 25k,60k every 35k / Mine 15k,35k every 20k" },
785 {0x00, 0x01, 0x09, 0x09, "Life 30k,40k every 40k / Mine 15k,40k every 25k" },
786
787 {0 , 0xfe, 0 , 2, "Demo Sounds" },
788 {0x00, 0x01, 0x02, 0x02, "Off" },
789 {0x00, 0x01, 0x02, 0x00, "On" },
790
791 {0 , 0xfe, 0 , 2, "Difficulty" },
792 {0x00, 0x01, 0x04, 0x00, "Normal" },
793 {0x00, 0x01, 0x04, 0x04, "Hard" },
794
795 {0 , 0xfe, 0 , 0, "Lives" },
796 {0x00, 0x01, 0x20, 0x00, "3" },
797 {0x00, 0x01, 0x20, 0x20, "5" },
798
799 {0 , 0xfe, 0 , 2, "Coinage" },
800 {0x00, 0x01, 0xc0, 0x80, "2 Coins 1 Credits" },
801 {0x00, 0x01, 0xc0, 0x00, "1 Coin 1 Credits" },
802 {0x00, 0x01, 0xc0, 0x40, "1 Coin 2 Credits" },
803 {0x00, 0x01, 0xc0, 0xc0, "Free Play" },
804
805 {0 , 0xfe, 0 , 2, "Service Mode" },
806 {0x01, 0x01, 0x01, 0x01, "Off" },
807 {0x01, 0x01, 0x01, 0x00, "On" },
808 };
809
810 STDDIPINFO(Wizwarz)
811
812 static struct BurnDIPInfo VidvinceDIPList[]=
813 {
814 DIP_OFFSET(0x0a)
815 {0x00, 0xff, 0xff, 0x45, NULL },
816 {0x01, 0xff, 0xff, 0x00, NULL },
817
818 {0 , 0xfe, 0 , 4, "Coinage" },
819 {0x00, 0x01, 0x09, 0x09, "3 Coins 1 Credits" },
820 {0x00, 0x01, 0x09, 0x08, "2 Coins 1 Credits" },
821 {0x00, 0x01, 0x09, 0x01, "1 Coin 1 Credits" },
822 {0x00, 0x01, 0x09, 0x00, "Free Play" },
823
824 {0 , 0xfe, 0 , 2, "Lives" },
825 {0x00, 0x01, 0x02, 0x00, "3" },
826 {0x00, 0x01, 0x02, 0x02, "5" },
827
828 {0 , 0xfe, 0 , 4, "Bonus Life" },
829 {0x00, 0x01, 0x14, 0x00, "10000" },
830 {0x00, 0x01, 0x14, 0x04, "20000" },
831 {0x00, 0x01, 0x14, 0x10, "30000" },
832 {0x00, 0x01, 0x14, 0x14, "40000" },
833
834 {0 , 0xfe, 0 , 2, "Difficulty" },
835 {0x00, 0x01, 0x20, 0x20, "Hard" },
836 {0x00, 0x01, 0x20, 0x00, "Normal" },
837
838 {0 , 0xfe, 0 , 2, "Demo Sounds" },
839 {0x00, 0x01, 0x40, 0x00, "Off" },
840 {0x00, 0x01, 0x40, 0x40, "On" },
841
842 {0 , 0xfe, 0 , 2, "Service Mode" },
843 {0x01, 0x01, 0x01, 0x00, "Off" },
844 {0x01, 0x01, 0x91, 0x01, "On" },
845 };
846
847 STDDIPINFO(Vidvince)
848
849 static struct BurnDIPInfo Stooges3DIPList[]=
850 {
851 DIP_OFFSET(0x14)
852 {0x00, 0xff, 0xff, 0xc0, NULL },
853 {0x01, 0xff, 0xff, 0x11, NULL },
854
855 {0 , 0xfe, 0 , 2, "Demo Sounds" },
856 {0x00, 0x01, 0x01, 0x01, "Off" },
857 {0x00, 0x01, 0x01, 0x00, "On" },
858
859 {0 , 0xfe, 0 , 2, "Difficulty" },
860 {0x00, 0x01, 0x02, 0x00, "Normal" },
861 {0x00, 0x01, 0x02, 0x02, "Hard" },
862
863 {0 , 0xfe, 0 , 2, "Lives" },
864 {0x00, 0x01, 0x08, 0x00, "3" },
865 {0x00, 0x01, 0x08, 0x08, "5" },
866
867 {0 , 0xfe, 0 , 4, "Coinage" },
868 {0x00, 0x01, 0x14, 0x04, "2 Coins 1 Credits" },
869 {0x00, 0x01, 0x14, 0x00, "1 Coin 1 Credits" },
870 {0x00, 0x01, 0x14, 0x10, "1 Coin 2 Credits" },
871 {0x00, 0x01, 0x14, 0x14, "Free Play" },
872
873 {0 , 0xfe, 0 , 0, "1st Bonus Life at" },
874 {0x00, 0x01, 0xc0, 0xc0, "10k 20k and every 10k" },
875 {0x00, 0x01, 0xc0, 0x00, "20k 40k and every 20k" },
876 {0x00, 0x01, 0xc0, 0x40, "10k 30k and every 20k" },
877 {0x00, 0x01, 0xc0, 0x80, "20k 30k and every 10k" },
878
879 {0 , 0xfe, 0 , 2, "Service Mode" },
880 {0x01, 0x01, 0x01, 0x01, "Off" },
881 {0x01, 0x01, 0x01, 0x00, "On" },
882
883 };
884
885 STDDIPINFO(Stooges3)
886
887 static struct BurnDIPInfo ReactorDIPList[]=
888 {
889 DIP_OFFSET(0x08)
890 {0x00, 0xff, 0xff, 0xff, NULL },
891 {0x01, 0xff, 0xff, 0x02, NULL },
892
893 {0 , 0xfe, 0 , 2, "Demo Sounds" },
894 {0x00, 0x01, 0x01, 0x00, "Off" },
895 {0x00, 0x01, 0x01, 0x01, "On" },
896
897 {0 , 0xfe, 0 , 2, "Bounce Chambers Points" },
898 {0x00, 0x01, 0x02, 0x00, "10" },
899 {0x00, 0x01, 0x02, 0x02, "15" },
900
901 {0 , 0xfe, 0 , 2, "Free Play" },
902 {0x00, 0x01, 0x04, 0x04, "Off" },
903 {0x00, 0x01, 0x04, 0x00, "On" },
904
905 {0 , 0xfe, 0 , 2, "Sound with Instructions" },
906 {0x00, 0x01, 0x08, 0x00, "Off" },
907 {0x00, 0x01, 0x08, 0x08, "On" },
908
909 {0 , 0xfe, 0 , 2, "Cabinet" },
910 {0x00, 0x01, 0x10, 0x10, "Upright" },
911 {0x00, 0x01, 0x10, 0x00, "Cocktail" },
912
913 {0 , 0xfe, 0 , 2, "Coinage" },
914 {0x00, 0x01, 0x20, 0x00, "2 Coins 1 Credits" },
915 {0x00, 0x01, 0x20, 0x20, "1 Coin 1 Credits" },
916
917 {0 , 0xfe, 0 , 4, "Bonus Life" },
918 {0x00, 0x01, 0xc0, 0x00, "10000" },
919 {0x00, 0x01, 0xc0, 0x40, "12000" },
920 {0x00, 0x01, 0xc0, 0xc0, "15000" },
921 {0x00, 0x01, 0xc0, 0x80, "20000" },
922
923 {0 , 0xfe, 0 , 2, "Service Mode" },
924 {0x01, 0x01, 0x02, 0x02, "Off" },
925 {0x01, 0x01, 0x02, 0x00, "On" },
926 };
927
STDDIPINFO(Reactor)928 STDDIPINFO(Reactor)
929
930
931 static UINT8 dialRotation(int addy) // mplanets
932 {
933 if (nRotateTime[addy] > nCurrentFrame) nRotateTime[addy] = 0; // Bugfix: no rotate after savestate
934
935 if (DrvFakeInput[0] && (nCurrentFrame > nRotateTime[addy]+2)) {
936 nRotateTime[addy] = nCurrentFrame;
937 return 0xfe;
938 }
939
940 if (DrvFakeInput[1] && (nCurrentFrame > nRotateTime[addy]+2)) {
941 nRotateTime[addy] = nCurrentFrame;
942 return 2;
943 }
944
945 return 0;
946 }
947
palette_write(UINT16 offset,UINT8 data)948 static void palette_write(UINT16 offset, UINT8 data)
949 {
950 INT32 bit0, bit1, bit2, bit3;
951 INT32 r, g, b, val;
952
953 DrvPaletteRAM[offset] = data;
954
955 val = DrvPaletteRAM[offset | 1];
956
957 bit0 = (val >> 0) & 0x01;
958 bit1 = (val >> 1) & 0x01;
959 bit2 = (val >> 2) & 0x01;
960 bit3 = (val >> 3) & 0x01;
961
962 r = 0x10 * bit0 + 0x21 * bit1 + 0x46 * bit2 + 0x88 * bit3;
963
964 val = DrvPaletteRAM[offset & ~1];
965
966 bit0 = (val >> 4) & 0x01;
967 bit1 = (val >> 5) & 0x01;
968 bit2 = (val >> 6) & 0x01;
969 bit3 = (val >> 7) & 0x01;
970
971 g = 0x10 * bit0 + 0x21 * bit1 + 0x46 * bit2 + 0x88 * bit3;
972
973 val = DrvPaletteRAM[offset & ~1];
974
975 bit0 = (val >> 0) & 0x01;
976 bit1 = (val >> 1) & 0x01;
977 bit2 = (val >> 2) & 0x01;
978 bit3 = (val >> 3) & 0x01;
979
980 b = 0x10 * bit0 + 0x21 * bit1 + 0x46 * bit2 + 0x88 * bit3;
981
982 DrvPalette[offset / 2] = BurnHighCol(r, g, b, 0);
983 }
984
qbert_knocker(UINT8 knock)985 static void qbert_knocker(UINT8 knock)
986 {
987 if (knock & ~*knocker_prev && game_type == 0)
988 BurnSamplePlay(44);
989
990 *knocker_prev = knock;
991 }
992
soundlatch_r1(UINT16,UINT8 data)993 static void soundlatch_r1(UINT16 /*offset*/, UINT8 data)
994 {
995 data &= 0x3f;
996
997 if ((data & 0x0f) != 0xf) {
998 #ifdef QBERT_SOUND_DEBUG
999 bprintf(0, _T("data %X.."), data ^ 0x3f);
1000 #endif
1001 switch (game_type) {
1002 case 0: { // qbert
1003 switch (data ^ 0x3f) { // qbert sample player
1004 case 17:
1005 case 18:
1006 case 19:
1007 case 20:
1008 case 21:
1009 BurnSamplePlay(((data ^ 0x3f) - 17) * 8 + qbert_random);
1010 qbert_random = (qbert_random + 1) & 7;
1011 break;
1012 case 22:
1013 BurnSamplePlay(40);
1014 break;
1015 case 23:
1016 BurnSamplePlay(41);
1017 break;
1018 case 28:
1019 BurnSamplePlay(42); // Hello, I'm turned on.
1020 break;
1021 case 36:
1022 BurnSamplePlay(43); // Bye-Bye
1023 break;
1024 }
1025 }
1026 break;
1027
1028 case 10: { // reactor
1029 switch (data ^ 0x3f) {
1030 case 31:
1031 BurnSamplePlay(7);
1032 reactor_score = 0;
1033 break;
1034 case 39:
1035 if (++reactor_score < 13)
1036 BurnSamplePlay(reactor_score + 7);
1037 break;
1038 case 53:
1039 case 54:
1040 case 55:
1041 case 56:
1042 case 57:
1043 case 58:
1044 case 59:
1045 BurnSamplePlay((data ^ 0x3f) - 53);
1046 break;
1047 }
1048 }
1049 break;
1050 }
1051
1052 *soundlatch = data;
1053
1054 M6502SetIRQLine(0, CPU_IRQSTATUS_HOLD);
1055 }
1056 }
1057
soundlatch_r2(UINT8 data)1058 static void soundlatch_r2(UINT8 data)
1059 {
1060 if (data != 0xff)
1061 {
1062 *soundlatch = data;
1063 soundlatch2 = data;
1064
1065 if (last_command == 0xff)
1066 {
1067 M6502SetIRQLine(0, 0, CPU_IRQSTATUS_ACK);
1068 M6502SetIRQLine(1, 0, CPU_IRQSTATUS_ACK);
1069 }
1070 }
1071
1072 last_command = data;
1073 }
1074
1075
expand_chars(UINT16 offset)1076 static inline void expand_chars(UINT16 offset)
1077 {
1078 offset &= 0xfff;
1079
1080 DrvCharExp[offset * 2 + 1] = DrvCharRAM[offset] & 0xf;
1081 DrvCharExp[offset * 2 + 0] = DrvCharRAM[offset] >> 4;
1082 }
1083
main_write(UINT32 address,UINT8 data)1084 static void __fastcall main_write(UINT32 address, UINT8 data)
1085 {
1086 if (address >= 0x10000) {
1087 cpu_writemem20(address & 0xffff, data);
1088 return;
1089 }
1090
1091 if ((address & 0xf800) == 0x3000) {
1092 DrvSpriteRAM[address & 0xff] = data;
1093 return;
1094 }
1095
1096 if ((address & 0xf000) == 0x4000) {
1097 DrvCharRAM[address & 0xfff] = data;
1098 expand_chars(address);
1099 return;
1100 }
1101
1102 if ((address & 0xf800) == 0x5000) { // mirrored here
1103 palette_write(address & 0x1f, data);
1104 return;
1105 }
1106
1107 switch (address & ~0x7f8)
1108 {
1109 case 0x5800:
1110 // watchdog
1111 return;
1112
1113 case 0x5801:
1114 // analog reset
1115 if (has_tball) {
1116 analog_last[0] = BurnTrackballRead(0, 0);
1117 analog_last[1] = BurnTrackballRead(0, 1);
1118 }
1119 return;
1120
1121 case 0x5802:
1122 if (type2_sound) {
1123 soundlatch_r2(data);
1124 } else {
1125 soundlatch_r1(address, data);
1126 }
1127 return;
1128
1129 case 0x5803: {
1130 *background_prio = data & 0x01;
1131 if (type2_sound == 0) qbert_knocker(data >> 5 & 1);
1132 if (game_type == 6) // qbertqub only
1133 *spritebank = (data & 0x10) >> 4;
1134 flipscreenx = data & 0x02;
1135 flipscreeny = data & 0x04;
1136 joystick_select = (data >> 5) & 0x03; // 3stooges
1137 }
1138 return;
1139 }
1140
1141 // bprintf (0, _T("MW: %4.4x %2.2x\n"), address, data);
1142 }
1143
main_read(UINT32 address)1144 static UINT8 __fastcall main_read(UINT32 address)
1145 {
1146 if (address >= 0x10000) {
1147 return cpu_readmem20(address & 0xffff);
1148 }
1149
1150 if ((address & 0xf800) == 0x3000) {
1151 return DrvSpriteRAM[address & 0xff];
1152 }
1153
1154 if ((address & 0xf800) == 0x5000) { // mirrored here
1155 return DrvPaletteRAM[address & 0x1f];
1156 }
1157
1158 switch (address & ~0x7f8)
1159 {
1160 case 0x5800: return DrvDip[0];
1161 case 0x5801: return DrvInput[0]; // DrvDip[1] (fake-dip) for service mode.
1162 case 0x5802: return (has_tball) ? (BurnTrackballRead(0, 0) - analog_last[0]) : 0xff;
1163 case 0x5803: return (has_tball) ? (BurnTrackballRead(0, 1) - analog_last[1]) : dialRotation(0);
1164 case 0x5804: {
1165 if (game_type == 14) {
1166 return (DrvInput[1] & 0xf0) | (DrvInput[(joystick_select & 3) + 2] & 0xf);
1167 } else {
1168 return DrvInput[1];
1169 }
1170 }
1171 }
1172
1173 bprintf (0, _T("MR: %4.4x\n"), address);
1174
1175 return 0;
1176 }
1177
1178
reactor_write(UINT32 address,UINT8 data)1179 static void __fastcall reactor_write(UINT32 address, UINT8 data)
1180 {
1181 if ((address & 0xf000) == 0x2000) {
1182 DrvSpriteRAM[address & 0xff] = data;
1183 return;
1184 }
1185
1186 if ((address & 0xf000) == 0x4000) {
1187 DrvCharRAM[address & 0xfff] = data;
1188 expand_chars(address);
1189 return;
1190 }
1191
1192 if ((address & 0xf000) == 0x6000) { // mirrored here
1193 palette_write(address & 0x1f, data);
1194 return;
1195 }
1196
1197 switch (address & ~0xff8)
1198 {
1199 case 0x7000:
1200 // watchdog
1201 return;
1202
1203 case 0x7001:
1204 // analog reset
1205 analog_last[0] = BurnTrackballRead(0, 0);
1206 analog_last[1] = BurnTrackballRead(0, 1);
1207 return;
1208
1209 case 0x7002:
1210 soundlatch_r1(address, data);
1211 return;
1212
1213 case 0x7003: {
1214 *background_prio = data & 0x01;
1215 flipscreenx = data & 0x02;
1216 flipscreeny = data & 0x04;
1217 return;
1218 }
1219 }
1220
1221 if (address >= 0x10000) {
1222 cpu_writemem20(address & 0xffff, data);
1223 return;
1224 }
1225 }
1226
reactor_read(UINT32 address)1227 static UINT8 __fastcall reactor_read(UINT32 address)
1228 {
1229 if ((address & 0xf000) == 0x6000) { // mirrored here
1230 return DrvPaletteRAM[address & 0x1f];
1231 }
1232
1233 switch (address & ~0xff8)
1234 {
1235 case 0x7000: return DrvDip[0];
1236 case 0x7001: return DrvInput[0]; // DrvDip[1] (fake-dip) for service mode.
1237 case 0x7002: return BurnTrackballRead(0, 0) - analog_last[0];
1238 case 0x7003: return BurnTrackballRead(0, 1) - analog_last[1];
1239 case 0x7004: return DrvInput[3];
1240 }
1241
1242 if (address >= 0x10000) {
1243 return cpu_readmem20(address & 0xffff);
1244 }
1245
1246 return 0;
1247 }
1248
gottlieb_riot_r(UINT16 offset)1249 static UINT8 gottlieb_riot_r(UINT16 offset)
1250 {
1251 switch (offset & 0x1f)
1252 {
1253 case 0: /* port A */
1254 return *soundlatch ^ 0xff; /* invert command */
1255
1256 case 2: /* port B */
1257 return 0x40; /* say that PB6 is 1 (test SW1 not pressed) */
1258
1259 case 5: /* interrupt register */
1260 return 0x40; /* say that edge detected on PA7 */
1261
1262 default:
1263 return riot_regs[offset & 0x1f];
1264 }
1265 }
1266
blank_queue()1267 static void blank_queue()
1268 {
1269 #ifdef QBERT_SOUND_DEBUG
1270 bprintf(0, _T("BLANK!{%X}.."), *vtqueuetime);
1271 #endif
1272 *vtqueuepos = 0;
1273 memset(vtqueue, 0, 0x20);
1274 *vtqueuetime = GetCurrentFrame();
1275 }
1276
add_to_queue(UINT8 data)1277 static void add_to_queue(UINT8 data)
1278 {
1279 if (*vtqueuepos > 0x20-1 || (UINT32)GetCurrentFrame() > *vtqueuetime+2)
1280 blank_queue();
1281 vtqueue[(*vtqueuepos)++] = data;
1282 }
1283
check_queue()1284 static UINT8 check_queue()
1285 {
1286 if (*vtqueuepos == 24 && !strncmp("\xC1\xE4\xFF\xE7\xE8\xD2\xFC\xFC\xFC\xFC\xFC\xEA\xFF\xF6\xD6\xF3\xD5\xC5\xF5\xF2\xE1\xDB\xF2\xC0", (char *)vtqueue, 24)) {
1287 blank_queue(); // "Hello, I'm turned on."
1288 return 1;
1289 }
1290 if (*vtqueuepos == 26 && !strncmp("\x00\xFF\xD5\xFE\xD5\xC0\xD2\xCB\xD4\xF2\xD6\xEB\xC1\xE6\xCB\xD4\xC1\xCD\xF2\xE0\xFB\xDF\xF1\xCD\xE7\xC0", (char *)vtqueue, 26)) {
1291 blank_queue(); // "Warning, Core Unstable." (reactor)
1292 return 11;
1293 }
1294
1295
1296 return 0;
1297 }
1298
audio_write(UINT16 address,UINT8 data)1299 static void audio_write(UINT16 address, UINT8 data)
1300 {
1301 address &= 0x7fff; // 15bit addressing
1302
1303 if (address >= 0x7000 && address <= 0x7fff) {
1304 bprintf(0, _T("write to audio ROM @ %X."), address);
1305 Drv6502ROM[address - 0x7000] = data;
1306 }
1307
1308 if (/*address >= 0x0000 &&*/ address <= 0x01ff) {
1309 riot_ram[address & 0x7f] = data;
1310 }
1311
1312 if (address >= 0x0200 && address <= 0x03ff) {
1313 riot_regs[address & 0x1f] = data;
1314 }
1315
1316 switch (address)
1317 {
1318 case 0x1fff:
1319 case 0x1000: {
1320 DACWrite(0, data);
1321 return;
1322 }
1323 case 0x2000: {
1324 add_to_queue(data);
1325 #ifdef QBERT_SOUND_DEBUG
1326 bprintf(0, _T("\\x%02X"), data); //save
1327 #endif
1328 switch (check_queue()) {
1329 case 1: BurnSamplePlay(42); break; // Say Hello
1330 case 11: BurnSamplePlay(5); break; // Warning Core Unstable
1331 }
1332 *soundcpu_do_nmi = 1;
1333 M6502RunEnd();
1334 return;
1335 }
1336 }
1337 }
1338
audio_read(UINT16 address)1339 static UINT8 audio_read(UINT16 address)
1340 {
1341 address &= 0x7fff; // 15bit addressing
1342
1343 if (/*address >= 0x0000 &&*/ address <= 0x01ff) {
1344 return riot_ram[address&0x7f];
1345 }
1346
1347 if (address >= 0x0200 && address <= 0x03ff) {
1348 return gottlieb_riot_r(address - 0x200);
1349 }
1350
1351 return 0;
1352 }
1353
sound_r2_write(UINT16 address,UINT8 data)1354 static void sound_r2_write(UINT16 address, UINT8 data)
1355 {
1356 switch (address & ~0x3ffe)
1357 {
1358 case 0x4000:
1359 case 0x4001:
1360 dac_data[address & 1] = data;
1361 DACWrite16(0, dac_data[0] * dac_data[1]);
1362 return;
1363 }
1364 }
1365
sound_r2_read(UINT16 address)1366 static UINT8 sound_r2_read(UINT16 address)
1367 {
1368 switch (address & ~0x3fff)
1369 {
1370 case 0x8000:
1371 M6502SetIRQLine(0, CPU_IRQSTATUS_NONE);
1372 return *soundlatch;
1373 }
1374
1375 return 0;
1376 }
1377
speech_control_write(UINT8 data)1378 static void speech_control_write(UINT8 data)
1379 {
1380 UINT8 previous = speech_control;
1381 speech_control = data;
1382
1383 if ((previous & 0x04) && (~data & 0x04))
1384 {
1385 AY8910Write((data & 8) >> 3, (~data & 0x10) >> 4, psg_latch);
1386 }
1387
1388 if ((~previous & 0x40) && (data & 0x40)) {
1389 sp0250_write(sp0250_latch);
1390 }
1391
1392 if ((previous ^ data) & 0x80) {
1393 sp0250_reset();
1394 }
1395 }
1396
sound_r2_speech_write(UINT16 address,UINT8 data)1397 static void sound_r2_speech_write(UINT16 address, UINT8 data)
1398 {
1399 if (address < 0xa000) address &= ~0x1fff;
1400 if (address > 0xa000) address &= ~0x07ff;
1401
1402 switch (address)
1403 {
1404 case 0x2000:
1405 sp0250_latch = data;
1406 return;
1407
1408 case 0x4000: {
1409 double period = 0.0;
1410
1411 if (data & 1) {
1412 period = ((1.0 / 1000000) * (250000.0/256/(256-nmi_rate)));
1413 }
1414
1415 BurnTimerSetRetrig(0, period);
1416 //bprintf (0, _T("nmi rate: %d period %g\n"), nmi_rate, period);
1417
1418 speech_control_write(data);
1419 }
1420 return;
1421
1422 case 0x8000:
1423 psg_latch = data;
1424 return;
1425
1426 case 0xa000: {
1427 nmi_rate = data;
1428 }
1429 return;
1430
1431 case 0xb000:
1432 M6502SetIRQLine(0, 0x20/*nmi*/, CPU_IRQSTATUS_AUTO);
1433 return;
1434 }
1435 }
1436
sound_r2_speech_read(UINT16 address)1437 static UINT8 sound_r2_speech_read(UINT16 address)
1438 {
1439 if (address < 0xa000) address &= ~0x1fff;
1440 if (address > 0xa000) address &= ~0x07ff;
1441
1442 switch (address)
1443 {
1444 case 0x6000:
1445 return 0x7f | (sp0250_drq_read() ? 0x80 : 0); // sp status
1446
1447 case 0xa800:
1448 M6502SetIRQLine(0, CPU_IRQSTATUS_NONE);
1449 return soundlatch2;
1450 }
1451
1452 return 0;
1453 }
1454
tilemap_callback(bg)1455 static tilemap_callback( bg )
1456 {
1457 INT32 code = DrvVideoRAM[offs];
1458
1459 TILE_SET_INFO(tilemap_bank[code >> 6], code, 0, 0);
1460 }
1461
DrvDoReset()1462 static INT32 DrvDoReset()
1463 {
1464 memset (AllRam, 0, RamEnd - AllRam);
1465
1466 VezOpen(0);
1467 VezReset();
1468 VezClose();
1469
1470 M6502Open(0);
1471 M6502Reset();
1472 M6502Close();
1473
1474 if (type2_sound)
1475 {
1476 M6502Open(1);
1477 M6502Reset();
1478 M6502Close();
1479
1480 AY8910Reset(0);
1481 AY8910Reset(1);
1482 AY8910Reset(2);
1483
1484 sp0250_reset();
1485
1486 speech_timer_counter = 0;
1487 nmi_state = 0;
1488 nmi_rate = 0;
1489 psg_latch = 0;
1490 sp0250_latch = 0;
1491 soundlatch2 = 0;
1492 speech_control = 0;
1493 last_command = 0;
1494 dac_data[0] = 0xff;
1495 dac_data[1] = 0xff;
1496
1497 BurnTimerReset();
1498 }
1499 else
1500 {
1501 BurnSampleReset();
1502 qbert_random = BurnRandom() & 7;
1503 reactor_score = 0;
1504 }
1505
1506 DACReset();
1507
1508 nRotateTime[0] = 0;
1509 nRotateTime[1] = 0;
1510 flipscreenx = 0;
1511 flipscreeny = 0;
1512 joystick_select = 0;
1513
1514 return 0;
1515 }
1516
MemIndex()1517 static INT32 MemIndex()
1518 {
1519 UINT8 *Next; Next = AllMem;
1520
1521 DrvV20ROM = Next; Next += 0x10000;
1522 Drv6502ROM = Next; Next += 0x02000;
1523 Drv6502ROM1 = Next; Next += 0x04000;
1524
1525 DrvPalette = (UINT32*)Next; Next += 0x10 * sizeof(UINT32);
1526 DrvCharGFX = Next; Next += 0x04000;
1527 DrvSpriteGFX = Next; Next += 0x20000;
1528
1529 DrvCharExp = Next; Next += 0x02000;
1530
1531 DrvNVRAM = Next; Next += 0x01000; // Keep in ROM section.
1532 DrvDummyROM = Next; Next += 0x02000; // RAM or ROM depending on conf.
1533
1534 AllRam = Next;
1535
1536 DrvSpriteRAM = Next; Next += 0x00100;
1537 DrvV20RAM = Next; Next += 0x01000;
1538 Drv6502RAM = Next; Next += 0x01000;
1539
1540 DrvVideoRAM = Next; Next += 0x00400;
1541 DrvCharRAM = Next; Next += 0x01000;
1542 DrvPaletteRAM = Next; Next += 0x00020;
1543
1544 riot_regs = Next; Next += 0x00020;
1545 riot_ram = Next; Next += 0x00200;
1546
1547 vtqueuepos = Next; Next += 0x00001;
1548 vtqueuetime = (UINT32 *)Next; Next += 0x00004;
1549 vtqueue = (UINT8 *)Next; Next += 0x00020;
1550 knocker_prev = Next; Next += 0x00001;
1551
1552 background_prio = Next; Next += 0x00001;
1553 spritebank = Next; Next += 0x00001;
1554 soundlatch = Next; Next += 0x00001;
1555 soundcpu_do_nmi = Next; Next += 0x00001;
1556
1557 RamEnd = Next;
1558
1559 MemEnd = Next;
1560
1561 return 0;
1562 }
1563
DrvGfxDecode(INT32 len0,INT32 len1)1564 static void DrvGfxDecode(INT32 len0, INT32 len1)
1565 {
1566 INT32 c8PlaneOffsets[4] = { STEP4(0,1) };
1567 INT32 c8XOffsets[8] = { STEP8(0,4) };
1568 INT32 c8YOffsets[8] = { STEP8(0,32) };
1569 INT32 c16PlaneOffsets[4] = { RGN_FRAC(len1, 0, 4), RGN_FRAC(len1, 1, 4), RGN_FRAC(len1, 2, 4), RGN_FRAC(len1, 3, 4) };
1570 INT32 c16XOffsets[16] = { STEP16(0,1) };
1571 INT32 c16YOffsets[16] = { STEP16(0,16) };
1572
1573 UINT8 *tmp = (UINT8*)BurnMalloc(0x10000);
1574 if (tmp == NULL) return;
1575
1576 if (len0)
1577 {
1578 memcpy (tmp, DrvCharGFX, len0);
1579
1580 GfxDecode((len0 * 2) / (8 * 8), 4, 8, 8, c8PlaneOffsets, c8XOffsets, c8YOffsets, 0x100, tmp, DrvCharGFX);
1581 }
1582
1583 memcpy (tmp, DrvSpriteGFX, 0x10000);
1584
1585 GfxDecode((len1 * 2) / (16 * 16), 4, 16, 16, c16PlaneOffsets, c16XOffsets, c16YOffsets, 0x100, tmp, DrvSpriteGFX);
1586
1587 BurnFree (tmp);
1588 }
1589
RomLoad()1590 static INT32 RomLoad()
1591 {
1592 char* pRomName;
1593 struct BurnRomInfo ri;
1594
1595 UINT8 *pLoad = DrvV20ROM;
1596 UINT8 *sLoad = Drv6502ROM;
1597 UINT8 *mLoad = Drv6502ROM1;
1598 UINT8 *gLoad = DrvCharGFX;
1599 UINT8 *rLoad = DrvSpriteGFX;
1600 UINT8 *dLoad = DrvDummyROM;
1601
1602 // calculate load offsets for program roms
1603 for (INT32 i = 0; !BurnDrvGetRomName(&pRomName, i, 0); i++) {
1604 BurnDrvGetRomInfo(&ri, i);
1605
1606 if ((ri.nType & 0xf) == 1) {
1607 pLoad += ri.nLen;
1608 continue;
1609 }
1610
1611 if ((ri.nType & 0xf) == 2) {
1612 sLoad += ri.nLen;
1613 continue;
1614 }
1615
1616 if ((ri.nType & 0xf) == 6) {
1617 mLoad += ri.nLen;
1618 continue;
1619 }
1620 }
1621
1622 pLoad = DrvV20ROM + (0x10000 - (pLoad - DrvV20ROM));
1623 sLoad = Drv6502ROM + (0x2000 - (sLoad - Drv6502ROM));
1624 mLoad = Drv6502ROM1 + (0x4000 - (mLoad - Drv6502ROM1));
1625
1626 for (INT32 i = 0; !BurnDrvGetRomName(&pRomName, i, 0); i++) {
1627
1628 BurnDrvGetRomInfo(&ri, i);
1629
1630 if ((ri.nType & 0xf) == 1) { // i8088
1631 if (BurnLoadRom(pLoad, i, 1)) return 1;
1632 pLoad += ri.nLen;
1633 continue;
1634 }
1635
1636 if ((ri.nType & 0xf) == 2) { // m6502
1637 if (BurnLoadRom(sLoad, i, 1)) return 1;
1638 sLoad += ri.nLen;
1639 continue;
1640 }
1641
1642 if ((ri.nType & 0xf) == 6) { // m6502 (speech)
1643 type2_sound = 1;
1644 if (BurnLoadRom(mLoad, i, 1)) return 1;
1645 mLoad += ri.nLen;
1646 continue;
1647 }
1648
1649 if ((ri.nType & 0xf) == 3) { // background tiles
1650 if (BurnLoadRom(gLoad, i, 1)) return 1;
1651 gLoad += ri.nLen;
1652 continue;
1653 }
1654
1655 if ((ri.nType & 0xf) == 4) { // sprites
1656 if (game_type == 10) rLoad += 0x1000;
1657 if (BurnLoadRom(rLoad, i, 1)) return 1;
1658 rLoad += ri.nLen;
1659 continue;
1660 }
1661
1662 if ((ri.nType & 0xf) == 9) { // extra i8088 roms
1663 if (BurnLoadRom(dLoad, i, 1)) return 1;
1664 dLoad += ri.nLen;
1665 switch (dLoad - DrvDummyROM) {
1666 case 0x1000: DummyRegion[1] = MAP_ROM; break;
1667 case 0x2000: DummyRegion[0] = MAP_ROM; break;
1668 }
1669 continue;
1670 }
1671 }
1672
1673 INT32 tilelen = gLoad - DrvCharGFX;
1674 if (tilelen == 0) memset (tilemap_bank, 1, 4);
1675
1676 bprintf (0, _T("tiles: %x, sprite: %x\n"), tilelen, rLoad - DrvSpriteGFX);
1677
1678 bprintf(0, _T("DummyRegion[0] = "));
1679 switch (DummyRegion[0]) {
1680 case MAP_ROM: bprintf(0, _T("MAP_ROM\n")); break;
1681 case MAP_RAM: bprintf(0, _T("MAP_RAM\n")); break;
1682 }
1683 bprintf(0, _T("DummyRegion[1] = "));
1684 switch (DummyRegion[1]) {
1685 case MAP_ROM: bprintf(0, _T("MAP_ROM\n")); break;
1686 case MAP_RAM: bprintf(0, _T("MAP_RAM\n")); break;
1687 }
1688
1689 DrvGfxDecode(tilelen, rLoad - DrvSpriteGFX);
1690
1691 if ((dLoad - DrvDummyROM) == 0x1000) { // single-rom loads @ 0x2000
1692 memcpy (DrvDummyROM + 0x1000, DrvDummyROM, 0x1000);
1693 memset (DrvDummyROM + 0x0000, 0x00, 0x1000);
1694 }
1695
1696 return 0;
1697 }
1698
1699
t2_timer_cb(INT32 n,INT32 c)1700 INT32 t2_timer_cb(INT32 n, INT32 c)
1701 {
1702 if (nmi_state)
1703 {
1704 nmi_state = 0;
1705 M6502SetIRQLine(0x20/*nmi*/, CPU_IRQSTATUS_NONE);
1706 }
1707
1708 if (speech_timer_counter == 0xff)
1709 {
1710 nmi_state = 1;
1711 M6502SetIRQLine(0x20/*nmi*/, (speech_control & 1) ? CPU_IRQSTATUS_ACK : CPU_IRQSTATUS_NONE);
1712 }
1713
1714 speech_timer_counter = (speech_timer_counter + 1) & 0xff;
1715
1716 return 0;
1717 }
1718
type2_sound_init()1719 static void type2_sound_init()
1720 {
1721 M6502Init(0, TYPE_M6502);
1722 M6502Open(0);
1723 for (INT32 i = 0; i < 0x4000; i+= 0x400) {
1724 M6502MapMemory(Drv6502RAM, 0x0000 + i, 0x03ff + i, MAP_RAM);
1725 }
1726
1727 M6502MapMemory(Drv6502ROM, 0xe000, 0xffff, MAP_ROM);
1728 M6502MapMemory(Drv6502ROM, 0xe000, 0xffff, MAP_ROM);
1729 M6502SetWriteHandler(sound_r2_write);
1730 M6502SetReadHandler(sound_r2_read);
1731 M6502Close();
1732
1733 M6502Init(1, TYPE_M6502);
1734 M6502Open(1);
1735 for (INT32 i = 0; i < 0x2000; i+= 0x400) {
1736 M6502MapMemory(Drv6502RAM + 0x400, 0x0000 + i, 0x03ff + i, MAP_RAM);
1737 }
1738
1739 M6502MapMemory(Drv6502ROM1, 0xc000, 0xffff, MAP_ROM);
1740 M6502SetWriteHandler(sound_r2_speech_write);
1741 M6502SetReadHandler(sound_r2_speech_read);
1742 M6502Close();
1743
1744 BurnTimerInit(&t2_timer_cb, NULL); // for high-freq dac&speech timer
1745 BurnTimerAttachM6502(1000000);
1746
1747 AY8910Init(0, 2000000, 0);
1748 AY8910Init(1, 2000000, 0);
1749 AY8910Init(2, 2000000, 0);
1750 AY8910SetAllRoutes(0, 0.15, BURN_SND_ROUTE_BOTH);
1751 AY8910SetAllRoutes(1, 0.15, BURN_SND_ROUTE_BOTH);
1752 AY8910SetAllRoutes(2, 0.15, BURN_SND_ROUTE_BOTH);
1753
1754 DACInit(0, 0, 1, M6502TotalCycles, 1000000);
1755 DACSetRoute(0, 0.50, BURN_SND_ROUTE_BOTH);
1756 DACDCBlock(1);
1757
1758 sp0250_init(3120000, NULL, M6502TotalCycles, 1000000);
1759 sp0250_volume(1.00);
1760 }
1761
type1_sound_init()1762 static void type1_sound_init()
1763 {
1764 M6502Init(0, TYPE_M6502);
1765 M6502Open(0);
1766 M6502MapMemory(Drv6502ROM, 0x6000, 0x7fff, MAP_ROM);
1767 M6502MapMemory(Drv6502ROM, 0xe000, 0xffff, MAP_ROM);
1768 M6502SetWriteHandler(audio_write);
1769 M6502SetReadHandler(audio_read);
1770 M6502SetReadOpArgHandler(audio_read);
1771 M6502SetReadOpHandler(audio_read);
1772 M6502Close();
1773
1774 BurnSampleInit(0);
1775 BurnSampleSetAllRoutesAllSamples(0.30, BURN_SND_ROUTE_BOTH);
1776
1777 DACInit(0, 0, 1, M6502TotalCycles, 3579545 / 4);
1778 DACSetRoute(0, 0.35, BURN_SND_ROUTE_BOTH);
1779 DACDCBlock(1);
1780 }
1781
DrvInit()1782 static INT32 DrvInit()
1783 {
1784 BurnAllocMemIndex();
1785
1786 { // Load ROMS parse GFX
1787 DummyRegion[0] = DummyRegion[1] = MAP_RAM; // start out as RAM. change to ROM if they load in region(s)
1788
1789 if (RomLoad()) return 1;
1790 }
1791
1792 if (game_type == 10) // reactor
1793 {
1794 VezInit(0, i86_TYPE); // really i8088, but v20 is compatible
1795 VezOpen(0);
1796 VezMapMemory(DrvDummyROM, 0x0000, 0x1fff, MAP_RAM); // RAM (reactor)
1797 VezMapMemory(DrvVideoRAM, 0x3000, 0x33ff, MAP_RAM);
1798 VezMapMemory(DrvVideoRAM, 0x3400, 0x37ff, MAP_RAM); // mirror
1799 VezMapMemory(DrvVideoRAM, 0x3800, 0x3bff, MAP_RAM); // mirror
1800 VezMapMemory(DrvVideoRAM, 0x3c00, 0x3fff, MAP_RAM); // mirror
1801 VezMapMemory(DrvCharRAM, 0x4000, 0x4fff, MAP_ROM); // write through handler
1802 VezMapMemory(DrvV20ROM + 0x8000, 0x8000, 0xffff, MAP_ROM);
1803 VezSetReadHandler(reactor_read);
1804 VezSetWriteHandler(reactor_write);
1805 VezClose();
1806 }
1807 else // standard
1808 {
1809 VezInit(0, i86_TYPE); // really i8088, but v20 is compatible
1810 VezOpen(0);
1811 VezMapMemory(DrvNVRAM, 0x0000, 0x0fff, MAP_RAM);
1812 VezMapMemory(DrvDummyROM + 0x0000, 0x1000, 0x1fff, DummyRegion[0]); // ROM for argus, krull, vidvince & 3stooges, RAM for all others
1813 VezMapMemory(DrvDummyROM + 0x1000, 0x2000, 0x2fff, DummyRegion[1]);
1814 VezMapMemory(DrvVideoRAM, 0x3800, 0x3bff, MAP_RAM);
1815 VezMapMemory(DrvVideoRAM, 0x3c00, 0x3fff, MAP_RAM); // mirror
1816 VezMapMemory(DrvCharRAM, 0x4000, 0x4fff, MAP_ROM); // write through handler
1817 VezMapMemory(DrvV20ROM + 0x6000, 0x6000, 0xffff, MAP_ROM);
1818 VezSetReadHandler(main_read);
1819 VezSetWriteHandler(main_write);
1820 VezClose();
1821 }
1822
1823 if (has_tball) {
1824 BurnTrackballInit(2);
1825 }
1826
1827 if (type2_sound) {
1828 type2_sound_init();
1829 } else {
1830 type1_sound_init();
1831 }
1832
1833 GenericTilesInit();
1834 GenericTilemapInit(0, TILEMAP_SCAN_ROWS, bg_map_callback, 8, 8, 32, 32);
1835 GenericTilemapSetGfx(0, DrvCharGFX, 4, 8, 8, 0x4000, 0, 0);
1836 GenericTilemapSetGfx(1, DrvCharExp, 4, 8, 8, 0x2000, 0, 0);
1837 GenericTilemapSetTransparent(0, 0);
1838
1839 memset(DrvNVRAM, 0xff, 0x1000); // Init NVRAM
1840
1841 DrvDoReset();
1842
1843 return 0;
1844 }
1845
DrvExit()1846 static INT32 DrvExit()
1847 {
1848 GenericTilesExit();
1849
1850 VezExit();
1851 M6502Exit();
1852 DACExit();
1853
1854 if (type2_sound == 0)
1855 {
1856 BurnSampleExit();
1857 }
1858 else
1859 {
1860 AY8910Exit(0);
1861 AY8910Exit(1);
1862 AY8910Exit(2);
1863
1864 sp0250_exit();
1865
1866 BurnTimerExit();
1867 }
1868
1869 if (has_tball) { // reactor, argusg, wizwarz
1870 BurnTrackballExit();
1871 has_tball = 0;
1872 }
1873
1874 BurnFreeMemIndex();
1875
1876 game_type = 0;
1877 type2_sound = 0;
1878
1879 tilemap_bank[0] = 0;
1880 tilemap_bank[1] = 0;
1881 tilemap_bank[2] = 0;
1882 tilemap_bank[3] = 0;
1883
1884 return 0;
1885 }
1886
draw_sprites()1887 static void draw_sprites()
1888 {
1889 GenericTilesSetClip(8, -1, -1, -1);
1890
1891 for (INT32 offs = 0; offs < 0x100 - 8; offs += 4)
1892 {
1893 INT32 sx = ((DrvSpriteRAM[offs + 1]) - 4) + ((game_type == 4) ? 16 : 0); // mplanets has weird sx/sy offsets
1894 INT32 sy = ((DrvSpriteRAM[offs]) - 13) - ((game_type == 4) ? -4 : 0); // apparent in the hiscore table.
1895 INT32 code = (255 ^ DrvSpriteRAM[offs + 2]) + (256 * *spritebank);
1896
1897 INT32 flipy = 0;
1898 INT32 flipx = 0;
1899
1900 if (flipscreenx) {
1901 sx = (256 - 8) - sx;
1902 flipx = 1;
1903 }
1904
1905 if (flipscreeny) {
1906 sy = (240 - 8) - sy;
1907 flipy = 1;
1908 }
1909
1910 Draw16x16MaskTile(pTransDraw, code, sx, sy, flipx, flipy, 0, 4, 0, 0, DrvSpriteGFX);
1911 }
1912
1913 GenericTilesClearClip();
1914 }
1915
DrvDraw()1916 static INT32 DrvDraw()
1917 {
1918 if (DrvRecalc) {
1919 for (INT32 i = 0; i < 0x20; i++) {
1920 palette_write(i, DrvPaletteRAM[i]);
1921 }
1922 DrvRecalc = 0;
1923 }
1924
1925 GenericTilemapSetFlip(TMAP_GLOBAL, (flipscreeny ? TMAP_FLIPY : 0) | (flipscreenx ? TMAP_FLIPX : 0));
1926
1927 if (nBurnLayer & 1 && !*background_prio) {
1928 GenericTilemapDraw(0, pTransDraw, TMAP_FORCEOPAQUE);
1929 } else {
1930 BurnTransferClear();
1931 }
1932
1933 if (nBurnLayer & 4) draw_sprites();
1934
1935 if (nBurnLayer & 2 && *background_prio) GenericTilemapDraw(0, pTransDraw, 0);
1936
1937 BurnTransferCopy(DrvPalette);
1938
1939 return 0;
1940 }
1941
DrvMakeInputs()1942 static void DrvMakeInputs()
1943 {
1944 // Reset Inputs (all active HIGH)
1945 DrvInput[0] = DrvDip[1]; // service mode DIP
1946 DrvInput[1] = 0;
1947
1948 DrvInput[2] = 0; // 3stooges
1949 DrvInput[3] = 0; // & reactor
1950 DrvInput[4] = 0;
1951
1952 // Compile Digital Inputs
1953 for (INT32 i = 0; i < 8; i++) {
1954 DrvInput[0] ^= (DrvJoy1[i] & 1) << i;
1955 DrvInput[1] ^= (DrvJoy2[i] & 1) << i;
1956 DrvInput[2] ^= (DrvJoy3[i] & 1) << i;
1957 DrvInput[3] ^= (DrvJoy4[i] & 1) << i;
1958 DrvInput[4] ^= (DrvJoy5[i] & 1) << i;
1959 }
1960
1961 if (has_tball) { // reactor, argusg, wizwarz
1962 BurnTrackballConfig(0, AXIS_NORMAL, AXIS_NORMAL);
1963 BurnTrackballFrame(0, Analog[0], Analog[1], 0x01, 0x04);
1964 BurnTrackballUpdate(0);
1965 }
1966
1967 }
1968
DrvFrame()1969 static INT32 DrvFrame()
1970 {
1971 if (DrvReset) {
1972 DrvDoReset();
1973 }
1974
1975 DrvMakeInputs();
1976 M6502NewFrame();
1977
1978 INT32 nInterleave = 256;
1979 INT32 nCyclesTotal[2] = { 5000000 / 60, (3579545 / 4) / 60 };
1980 INT32 nCyclesDone[2] = { 0, 0 };
1981
1982 VezOpen(0);
1983 M6502Open(0);
1984
1985 for (INT32 i = 0; i < nInterleave; i++)
1986 {
1987 CPU_RUN(0, Vez);
1988 if (i == (nInterleave - 1))
1989 VezSetIRQLineAndVector(0x20, 0xff, CPU_IRQSTATUS_AUTO);
1990
1991 CPU_RUN_SYNCINT(1, M6502);
1992 if (*soundcpu_do_nmi) {
1993 M6502Run(44); // 50usec later..
1994 M6502SetIRQLine(M6502_INPUT_LINE_NMI, CPU_IRQSTATUS_AUTO);
1995 *soundcpu_do_nmi = 0;
1996 }
1997
1998 if ((i%64) == 63 && has_tball && game_type != 9) { // reactor, wizwarz, not argus
1999 BurnTrackballUpdate(0);
2000 }
2001 }
2002
2003 VezClose();
2004 M6502Close();
2005
2006 if (pBurnSoundOut) {
2007 BurnSampleRender(pBurnSoundOut, nBurnSoundLen);
2008 DACUpdate(pBurnSoundOut, nBurnSoundLen);
2009 }
2010
2011 if (pBurnDraw) {
2012 DrvDraw();
2013 }
2014
2015 return 0;
2016 }
2017
Drv2Frame()2018 static INT32 Drv2Frame()
2019 {
2020 if (DrvReset) {
2021 DrvDoReset();
2022 }
2023
2024 DrvMakeInputs();
2025 M6502NewFrame();
2026
2027 INT32 nInterleave = 256;
2028 INT32 nCyclesTotal[3] = { 5000000 / 60, 1000000 / 60, 1000000 / 60 };
2029 INT32 nCyclesDone[3] = { 0, 0 };
2030
2031 VezOpen(0);
2032
2033 for (INT32 i = 0; i < nInterleave; i++)
2034 {
2035 CPU_RUN(0, Vez);
2036 if (i == (nInterleave - 1))
2037 VezSetIRQLineAndVector(0x20, 0xff, CPU_IRQSTATUS_AUTO);
2038
2039 M6502Open(1);
2040 BurnTimerUpdate((i + 1) * (nCyclesTotal[1] / nInterleave));
2041 if (i == nInterleave - 1) BurnTimerEndFrame(nCyclesTotal[1]);
2042 sp0250_tick();
2043 M6502Close();
2044
2045 M6502Open(0);
2046 CPU_RUN(2, M6502);
2047 M6502Close();
2048 }
2049
2050 VezClose();
2051
2052 M6502Open(0);
2053 if (pBurnSoundOut) {
2054 AY8910Render(pBurnSoundOut, nBurnSoundLen);
2055 DACUpdate(pBurnSoundOut, nBurnSoundLen);
2056 sp0250_update(pBurnSoundOut, nBurnSoundLen);
2057 }
2058 M6502Close();
2059
2060 if (pBurnDraw) {
2061 DrvDraw();
2062 }
2063
2064 return 0;
2065 }
2066
DrvScan(INT32 nAction,INT32 * pnMin)2067 static INT32 DrvScan(INT32 nAction, INT32 *pnMin)
2068 {
2069 struct BurnArea ba;
2070
2071 if (pnMin) {
2072 *pnMin = 0x029735;
2073 }
2074
2075 if (nAction & ACB_VOLATILE) {
2076 memset(&ba, 0, sizeof(ba));
2077 ba.Data = AllRam;
2078 ba.nLen = RamEnd - AllRam;
2079 ba.szName = "All Ram";
2080 BurnAcb(&ba);
2081
2082 memset(&ba, 0, sizeof(ba)); // savestates get f*cked up, because NVRAM is also used
2083 ba.Data = DrvNVRAM; // as regular memory, to fix that we will scan it both here
2084 ba.nLen = 0x1000; // and in the NVRAM section.
2085 ba.szName = "SSNVRAM"; // note: this is separate from "All Ram" so it doesn't get trashed in DrvDoReset();
2086 BurnAcb(&ba);
2087
2088 if (DummyRegion[0] == MAP_RAM) {
2089 ScanVar(DrvDummyROM + 0x0000, 0x1000, "DummyRAM0");
2090 }
2091 if (DummyRegion[1] == MAP_RAM) {
2092 ScanVar(DrvDummyROM + 0x1000, 0x1000, "DummyRAM1");
2093 }
2094
2095 VezScan(nAction);
2096 M6502Scan(nAction);
2097
2098 if (type2_sound) {
2099 AY8910Scan(nAction, pnMin);
2100 sp0250_scan(nAction, pnMin);
2101 BurnTimerScan(nAction, pnMin);
2102 } else {
2103 BurnSampleScan(nAction, pnMin);
2104 }
2105
2106 DACScan(nAction, pnMin);
2107
2108 if (has_tball) {
2109 BurnTrackballScan(); // reactor
2110 }
2111
2112 SCAN_VAR(flipscreenx);
2113 SCAN_VAR(flipscreeny);
2114 SCAN_VAR(joystick_select);
2115
2116 SCAN_VAR(speech_timer_counter);
2117 SCAN_VAR(nmi_state);
2118 SCAN_VAR(nmi_rate);
2119 SCAN_VAR(psg_latch);
2120 SCAN_VAR(sp0250_latch);
2121 SCAN_VAR(soundlatch2);
2122 SCAN_VAR(speech_control);
2123 SCAN_VAR(last_command);
2124 SCAN_VAR(dac_data);
2125 SCAN_VAR(analog_last);
2126 }
2127
2128 if (nAction & ACB_NVRAM) {
2129 memset(&ba, 0, sizeof(ba));
2130 ba.Data = DrvNVRAM;
2131 ba.nLen = 0x1000;
2132 ba.szName = "NV RAM";
2133 BurnAcb(&ba);
2134 }
2135
2136 if (nAction & ACB_WRITE) {
2137 for (INT32 i = 0; i < 0x1000; i++) {
2138 expand_chars(i);
2139 }
2140 }
2141
2142 return 0;
2143 }
2144
2145 static struct BurnSampleInfo qbertSampleDesc[] = {
2146 {"fx_17a", SAMPLE_NOLOOP },
2147 {"fx_17b", SAMPLE_NOLOOP },
2148 {"fx_17c", SAMPLE_NOLOOP },
2149 {"fx_17d", SAMPLE_NOLOOP },
2150 {"fx_17e", SAMPLE_NOLOOP },
2151 {"fx_17f", SAMPLE_NOLOOP },
2152 {"fx_17g", SAMPLE_NOLOOP },
2153 {"fx_17h", SAMPLE_NOLOOP },
2154 {"fx_18a", SAMPLE_NOLOOP },
2155 {"fx_18b", SAMPLE_NOLOOP },
2156 {"fx_18c", SAMPLE_NOLOOP },
2157 {"fx_18d", SAMPLE_NOLOOP },
2158 {"fx_18e", SAMPLE_NOLOOP },
2159 {"fx_18f", SAMPLE_NOLOOP },
2160 {"fx_18g", SAMPLE_NOLOOP },
2161 {"fx_18h", SAMPLE_NOLOOP },
2162 {"fx_19a", SAMPLE_NOLOOP },
2163 {"fx_19b", SAMPLE_NOLOOP },
2164 {"fx_19c", SAMPLE_NOLOOP },
2165 {"fx_19d", SAMPLE_NOLOOP },
2166 {"fx_19e", SAMPLE_NOLOOP },
2167 {"fx_19f", SAMPLE_NOLOOP },
2168 {"fx_19g", SAMPLE_NOLOOP },
2169 {"fx_19h", SAMPLE_NOLOOP },
2170 {"fx_20a", SAMPLE_NOLOOP },
2171 {"fx_20b", SAMPLE_NOLOOP },
2172 {"fx_20c", SAMPLE_NOLOOP },
2173 {"fx_20d", SAMPLE_NOLOOP },
2174 {"fx_20e", SAMPLE_NOLOOP },
2175 {"fx_20f", SAMPLE_NOLOOP },
2176 {"fx_20g", SAMPLE_NOLOOP },
2177 {"fx_20h", SAMPLE_NOLOOP },
2178 {"fx_21a", SAMPLE_NOLOOP },
2179 {"fx_21b", SAMPLE_NOLOOP },
2180 {"fx_21c", SAMPLE_NOLOOP },
2181 {"fx_21d", SAMPLE_NOLOOP },
2182 {"fx_21e", SAMPLE_NOLOOP },
2183 {"fx_21f", SAMPLE_NOLOOP },
2184 {"fx_21g", SAMPLE_NOLOOP },
2185 {"fx_21h", SAMPLE_NOLOOP },
2186 {"fx_22", SAMPLE_NOLOOP },
2187 {"fx_23", SAMPLE_NOLOOP },
2188 {"fx_28", SAMPLE_NOLOOP },
2189 {"fx_36", SAMPLE_NOLOOP },
2190 {"knocker", SAMPLE_NOLOOP },
2191 {"", 0 }
2192 };
2193
2194 STD_SAMPLE_PICK(qbert)
2195 STD_SAMPLE_FN(qbert)
2196
2197 static struct BurnSampleInfo reactorSampleDesc[] = {
2198 {"fx_53", SAMPLE_NOLOOP },
2199 {"fx_54", SAMPLE_NOLOOP },
2200 {"fx_55", SAMPLE_NOLOOP },
2201 {"fx_56", SAMPLE_NOLOOP },
2202 {"fx_57", SAMPLE_NOLOOP },
2203 {"fx_58", SAMPLE_NOLOOP },
2204 {"fx_59", SAMPLE_NOLOOP },
2205 {"fx_31", SAMPLE_NOLOOP },
2206 {"fx_39a", SAMPLE_NOLOOP },
2207 {"fx_39b", SAMPLE_NOLOOP },
2208 {"fx_39c", SAMPLE_NOLOOP },
2209 {"fx_39d", SAMPLE_NOLOOP },
2210 {"fx_39e", SAMPLE_NOLOOP },
2211 {"fx_39f", SAMPLE_NOLOOP },
2212 {"fx_39g", SAMPLE_NOLOOP },
2213 {"fx_39h", SAMPLE_NOLOOP },
2214 {"fx_39i", SAMPLE_NOLOOP },
2215 {"fx_39j", SAMPLE_NOLOOP },
2216 {"fx_39k", SAMPLE_NOLOOP },
2217 {"fx_39l", SAMPLE_NOLOOP },
2218 {"", 0 }
2219 };
2220
2221 STD_SAMPLE_PICK(reactor)
2222 STD_SAMPLE_FN(reactor)
2223
2224
2225 // Q*bert (US set 1)
2226
2227 static struct BurnRomInfo qbertRomDesc[] = {
2228 { "qb-rom2.bin", 0x2000, 0xfe434526, 1 | BRF_PRG | BRF_ESS }, // 0 i8088 Code
2229 { "qb-rom1.bin", 0x2000, 0x55635447, 1 | BRF_PRG | BRF_ESS }, // 1
2230 { "qb-rom0.bin", 0x2000, 0x8e318641, 1 | BRF_PRG | BRF_ESS }, // 2
2231
2232 { "qb-snd1.bin", 0x0800, 0x15787c07, 2 | BRF_PRG | BRF_ESS }, // 3 m6502 Code
2233 { "qb-snd2.bin", 0x0800, 0x58437508, 2 | BRF_PRG | BRF_ESS }, // 4
2234
2235 { "qb-bg0.bin", 0x1000, 0x7a9ba824, 3 | BRF_GRA }, // 5 Background Tiles
2236 { "qb-bg1.bin", 0x1000, 0x22e5b891, 3 | BRF_GRA }, // 6
2237
2238 { "qb-fg3.bin", 0x2000, 0xdd436d3a, 4 | BRF_GRA }, // 7 Sprites
2239 { "qb-fg2.bin", 0x2000, 0xf69b9483, 4 | BRF_GRA }, // 8
2240 { "qb-fg1.bin", 0x2000, 0x224e8356, 4 | BRF_GRA }, // 9
2241 { "qb-fg0.bin", 0x2000, 0x2f695b85, 4 | BRF_GRA }, // 10
2242 };
2243
2244 STD_ROM_PICK(qbert)
2245 STD_ROM_FN(qbert)
2246
2247 struct BurnDriver BurnDrvQbert = {
2248 "qbert", NULL, NULL, "qbert", "1982",
2249 "Q*bert (US set 1)\0", NULL, "Gottlieb", "Miscellaneous",
2250 NULL, NULL, NULL, NULL,
2251 BDF_GAME_WORKING | BDF_ORIENTATION_VERTICAL, 2, HARDWARE_MISC_PRE90S, GBF_PLATFORM, 0,
2252 NULL, qbertRomInfo, qbertRomName, NULL, NULL, qbertSampleInfo, qbertSampleName, QbertInputInfo, QbertDIPInfo,
2253 DrvInit, DrvExit, DrvFrame, DrvDraw, DrvScan, &DrvRecalc, 0x10,
2254 240, 256, 3, 4
2255 };
2256
2257
2258 // Q*bert (US set 2)
2259
2260 static struct BurnRomInfo qbertaRomDesc[] = {
2261 { "qrom_2.bin", 0x2000, 0xb54a8ffc, 1 | BRF_PRG | BRF_ESS }, // 0 i8088 Code
2262 { "qrom_1.bin", 0x2000, 0x19d924e3, 1 | BRF_PRG | BRF_ESS }, // 1
2263 { "qrom_0.bin", 0x2000, 0x2e7fad1b, 1 | BRF_PRG | BRF_ESS }, // 2
2264
2265 { "qb-snd1.bin", 0x0800, 0x15787c07, 2 | BRF_PRG | BRF_ESS }, // 3 m6502 Code
2266 { "qb-snd2.bin", 0x0800, 0x58437508, 2 | BRF_PRG | BRF_ESS }, // 4
2267
2268 { "qb-bg0.bin", 0x1000, 0x7a9ba824, 3 | BRF_GRA }, // 5 Background Tiles
2269 { "qb-bg1.bin", 0x1000, 0x22e5b891, 3 | BRF_GRA }, // 6
2270
2271 { "qb-fg3.bin", 0x2000, 0xdd436d3a, 4 | BRF_GRA }, // 7 Sprites
2272 { "qb-fg2.bin", 0x2000, 0xf69b9483, 4 | BRF_GRA }, // 8
2273 { "qb-fg1.bin", 0x2000, 0x224e8356, 4 | BRF_GRA }, // 9
2274 { "qb-fg0.bin", 0x2000, 0x2f695b85, 4 | BRF_GRA }, // 10
2275 };
2276
2277 STD_ROM_PICK(qberta)
2278 STD_ROM_FN(qberta)
2279
2280 struct BurnDriver BurnDrvQberta = {
2281 "qberta", "qbert", NULL, "qbert", "1982",
2282 "Q*bert (US set 2)\0", NULL, "Gottlieb", "Miscellaneous",
2283 NULL, NULL, NULL, NULL,
2284 BDF_GAME_WORKING | BDF_CLONE | BDF_ORIENTATION_VERTICAL, 2, HARDWARE_MISC_PRE90S, GBF_PLATFORM, 0,
2285 NULL, qbertaRomInfo, qbertaRomName, NULL, NULL, qbertSampleInfo, qbertSampleName, QbertInputInfo, QbertDIPInfo,
2286 DrvInit, DrvExit, DrvFrame, DrvDraw, DrvScan, &DrvRecalc, 0x10,
2287 240, 256, 3, 4
2288 };
2289
2290
2291 // Q*bert (Japan)
2292
2293 static struct BurnRomInfo qbertjRomDesc[] = {
2294 { "qbj-rom2.bin", 0x2000, 0x67bb1cb2, 1 | BRF_PRG | BRF_ESS }, // 0 i8088 Code
2295 { "qbj-rom1.bin", 0x2000, 0xc61216e7, 1 | BRF_PRG | BRF_ESS }, // 1
2296 { "qbj-rom0.bin", 0x2000, 0x69679d5c, 1 | BRF_PRG | BRF_ESS }, // 2
2297
2298 { "qb-snd1.bin", 0x0800, 0x15787c07, 2 | BRF_PRG | BRF_ESS }, // 3 m6502 Code
2299 { "qb-snd2.bin", 0x0800, 0x58437508, 2 | BRF_PRG | BRF_ESS }, // 4
2300
2301 { "qb-bg0.bin", 0x1000, 0x7a9ba824, 3 | BRF_GRA }, // 5 Background Tiles
2302 { "qb-bg1.bin", 0x1000, 0x22e5b891, 3 | BRF_GRA }, // 6
2303
2304 { "qb-fg3.bin", 0x2000, 0xdd436d3a, 4 | BRF_GRA }, // 7 Sprites
2305 { "qb-fg2.bin", 0x2000, 0xf69b9483, 4 | BRF_GRA }, // 8
2306 { "qb-fg1.bin", 0x2000, 0x224e8356, 4 | BRF_GRA }, // 9
2307 { "qb-fg0.bin", 0x2000, 0x2f695b85, 4 | BRF_GRA }, // 10
2308 };
2309
2310 STD_ROM_PICK(qbertj)
2311 STD_ROM_FN(qbertj)
2312
2313 struct BurnDriver BurnDrvQbertj = {
2314 "qbertj", "qbert", NULL, "qbert", "1982",
2315 "Q*bert (Japan)\0", NULL, "Gottlieb (Konami license)", "Miscellaneous",
2316 NULL, NULL, NULL, NULL,
2317 BDF_GAME_WORKING | BDF_CLONE | BDF_ORIENTATION_VERTICAL, 2, HARDWARE_MISC_PRE90S, GBF_PLATFORM, 0,
2318 NULL, qbertjRomInfo, qbertjRomName, NULL, NULL, qbertSampleInfo, qbertSampleName, QbertInputInfo, QbertDIPInfo,
2319 DrvInit, DrvExit, DrvFrame, DrvDraw, DrvScan, &DrvRecalc, 0x10,
2320 240, 256, 3, 4
2321 };
2322
2323
2324 // Q*bert (early test version)
2325
2326 static struct BurnRomInfo qberttstRomDesc[] = {
2327 { "qbtst2.bin", 0x2000, 0x55307b02, 1 | BRF_PRG | BRF_ESS }, // 0 i8088 Code
2328 { "qbtst1.bin", 0x2000, 0xe97fdd78, 1 | BRF_PRG | BRF_ESS }, // 1
2329 { "qbtst0.bin", 0x2000, 0x94c9f588, 1 | BRF_PRG | BRF_ESS }, // 2
2330
2331 { "qb-snd1.bin", 0x0800, 0x15787c07, 2 | BRF_PRG | BRF_ESS }, // 3 m6502 Code
2332 { "qb-snd2.bin", 0x0800, 0x58437508, 2 | BRF_PRG | BRF_ESS }, // 4
2333
2334 { "qb-bg0.bin", 0x1000, 0x7a9ba824, 3 | BRF_GRA }, // 5 Background Tiles
2335 { "qb-bg1.bin", 0x1000, 0x22e5b891, 3 | BRF_GRA }, // 6
2336
2337 { "qb-fg3.bin", 0x2000, 0xdd436d3a, 4 | BRF_GRA }, // 7 Sprites
2338 { "qb-fg2.bin", 0x2000, 0xf69b9483, 4 | BRF_GRA }, // 8
2339 { "qb-fg1.bin", 0x2000, 0x224e8356, 4 | BRF_GRA }, // 9
2340 { "qb-fg0.bin", 0x2000, 0x2f695b85, 4 | BRF_GRA }, // 10
2341 };
2342
2343 STD_ROM_PICK(qberttst)
2344 STD_ROM_FN(qberttst)
2345
2346 struct BurnDriver BurnDrvQberttst = {
2347 "qberttst", "qbert", NULL, NULL, "1982",
2348 "Q*bert (early test version)\0", NULL, "Gottlieb", "Miscellaneous",
2349 NULL, NULL, NULL, NULL,
2350 BDF_GAME_WORKING | BDF_CLONE | BDF_ORIENTATION_VERTICAL, 2, HARDWARE_MISC_PRE90S, GBF_PLATFORM, 0,
2351 NULL, qberttstRomInfo, qberttstRomName, NULL, NULL, NULL, NULL, QbertInputInfo, QbertDIPInfo,
2352 DrvInit, DrvExit, DrvFrame, DrvDraw, DrvScan, &DrvRecalc, 0x10,
2353 240, 256, 3, 4
2354 };
2355
2356
2357 // Q*bert Board Input Test Rom
2358
2359 static struct BurnRomInfo qbtrktstRomDesc[] = {
2360 { "qb-rom2.bin", 0x2000, 0xfe434526, 1 | BRF_PRG | BRF_ESS }, // 0 i8088 Code
2361 { "qb-rom1.bin", 0x2000, 0x55635447, 1 | BRF_PRG | BRF_ESS }, // 1
2362 { "gv103_t-ball-test_rom0_2764.c11c12", 0x2000, 0x5d390cd2, 1 | BRF_PRG | BRF_ESS }, // 2 - longest rom name ever!
2363
2364 { "qb-snd1.bin", 0x0800, 0x15787c07, 2 | BRF_PRG | BRF_ESS }, // 3 m6502 Code
2365 { "qb-snd2.bin", 0x0800, 0x58437508, 2 | BRF_PRG | BRF_ESS }, // 4
2366
2367 { "qb-bg0.bin", 0x1000, 0x7a9ba824, 3 | BRF_GRA }, // 5 Background Tiles
2368 { "qb-bg1.bin", 0x1000, 0x22e5b891, 3 | BRF_GRA }, // 6
2369
2370 { "qb-fg3.bin", 0x2000, 0xdd436d3a, 4 | BRF_GRA }, // 7 Sprites
2371 { "qb-fg2.bin", 0x2000, 0xf69b9483, 4 | BRF_GRA }, // 8
2372 { "qb-fg1.bin", 0x2000, 0x224e8356, 4 | BRF_GRA }, // 9
2373 { "qb-fg0.bin", 0x2000, 0x2f695b85, 4 | BRF_GRA }, // 10
2374 };
2375
2376 STD_ROM_PICK(qbtrktst)
2377 STD_ROM_FN(qbtrktst)
2378
2379 // mark as debug only to avoid confusion
2380 struct BurnDriverD BurnDrvQbtrktst = {
2381 "qbtrktst", "qbert", NULL, NULL, "1982",
2382 "Q*bert Board Input Test Rom\0", NULL, "Gottlieb", "Miscellaneous",
2383 NULL, NULL, NULL, NULL,
2384 BDF_GAME_WORKING | BDF_CLONE | BDF_ORIENTATION_VERTICAL, 2, HARDWARE_MISC_PRE90S, GBF_PLATFORM, 0,
2385 NULL, qbtrktstRomInfo, qbtrktstRomName, NULL, NULL, NULL, NULL, QbertInputInfo, QbertDIPInfo,
2386 DrvInit, DrvExit, DrvFrame, DrvDraw, DrvScan, &DrvRecalc, 0x10,
2387 240, 256, 3, 4
2388 };
2389
2390
2391 // Mello Yello Q*bert
2392
2393 static struct BurnRomInfo myqbertRomDesc[] = {
2394 { "mqb-rom2.bin", 0x2000, 0x6860f957, 1 | BRF_PRG | BRF_ESS }, // 0 i8088 Code
2395 { "mqb-rom1.bin", 0x2000, 0x11f0a4e4, 1 | BRF_PRG | BRF_ESS }, // 1
2396 { "mqb-rom0.bin", 0x2000, 0x12a90cb2, 1 | BRF_PRG | BRF_ESS }, // 2
2397
2398 { "mqb-snd1.bin", 0x0800, 0x495ffcd2, 2 | BRF_PRG | BRF_ESS }, // 3 m6502 Code
2399 { "mqb-snd2.bin", 0x0800, 0x9bbaa945, 2 | BRF_PRG | BRF_ESS }, // 4
2400
2401 { "qb-bg0.bin", 0x1000, 0x7a9ba824, 3 | BRF_GRA }, // 5 Background Tiles
2402 { "qb-bg1.bin", 0x1000, 0x22e5b891, 3 | BRF_GRA }, // 6
2403
2404 { "mqb-fg3.bin", 0x2000, 0x8b5d0852, 4 | BRF_GRA }, // 7 Sprites
2405 { "mqb-fg2.bin", 0x2000, 0x823f1e57, 4 | BRF_GRA }, // 8
2406 { "mqb-fg1.bin", 0x2000, 0x05343ae6, 4 | BRF_GRA }, // 9
2407 { "mqb-fg0.bin", 0x2000, 0xabc71bdd, 4 | BRF_GRA }, // 10
2408 };
2409
2410 STD_ROM_PICK(myqbert)
2411 STD_ROM_FN(myqbert)
2412
2413 struct BurnDriver BurnDrvMyqbert = {
2414 "myqbert", "qbert", NULL, "qbert", "1982",
2415 "Mello Yello Q*bert\0", NULL, "Gottlieb", "Miscellaneous",
2416 NULL, NULL, NULL, NULL,
2417 BDF_GAME_WORKING | BDF_CLONE | BDF_ORIENTATION_VERTICAL, 2, HARDWARE_MISC_PRE90S, GBF_PLATFORM, 0,
2418 NULL, myqbertRomInfo, myqbertRomName, NULL, NULL, qbertSampleInfo, qbertSampleName, QbertInputInfo, QbertDIPInfo,
2419 DrvInit, DrvExit, DrvFrame, DrvDraw, DrvScan, &DrvRecalc, 0x10,
2420 240, 256, 3, 4
2421 };
2422
2423
2424 // Faster, Harder, More Challenging Q*bert (prototype)
2425
2426 static struct BurnRomInfo sqbertRomDesc[] = {
2427 { "qb-rom2.bin", 0x2000, 0x1e3d4038, 1 | BRF_PRG | BRF_ESS }, // 0 i8088 Code
2428 { "qb-rom1.bin", 0x2000, 0xeaf3076c, 1 | BRF_PRG | BRF_ESS }, // 1
2429 { "qb-rom0.bin", 0x2000, 0x61260a7e, 1 | BRF_PRG | BRF_ESS }, // 2
2430
2431 { "qb-snd1.bin", 0x0800, 0x15787c07, 2 | BRF_PRG | BRF_ESS }, // 3 m6502 Code
2432 { "qb-snd2.bin", 0x0800, 0x58437508, 2 | BRF_PRG | BRF_ESS }, // 4
2433
2434 { "qb-bg0.bin", 0x1000, 0xc3118eef, 3 | BRF_GRA }, // 5 Background Tiles
2435 { "qb-bg1.bin", 0x1000, 0x4f6d8075, 3 | BRF_GRA }, // 6
2436
2437 { "qb-fg3.bin", 0x2000, 0xee595eda, 4 | BRF_GRA }, // 7 Sprites
2438 { "qb-fg2.bin", 0x2000, 0x59884c78, 4 | BRF_GRA }, // 8
2439 { "qb-fg1.bin", 0x2000, 0x2a60e3ad, 4 | BRF_GRA }, // 9
2440 { "qb-fg0.bin", 0x2000, 0xb11ad9d8, 4 | BRF_GRA }, // 10
2441 };
2442
2443 STD_ROM_PICK(sqbert)
STD_ROM_FN(sqbert)2444 STD_ROM_FN(sqbert)
2445
2446 static INT32 DrvInitMplanets()
2447 {
2448 game_type = 4;
2449
2450 return DrvInit();
2451 }
2452
2453 struct BurnDriver BurnDrvSqbert = {
2454 "sqbert", NULL, NULL, "qbert", "1983",
2455 "Faster, Harder, More Challenging Q*bert (prototype)\0", NULL, "Mylstar", "Miscellaneous",
2456 NULL, NULL, NULL, NULL,
2457 BDF_GAME_WORKING | BDF_ORIENTATION_VERTICAL, 2, HARDWARE_MISC_PRE90S, GBF_PLATFORM, 0,
2458 NULL, sqbertRomInfo, sqbertRomName, NULL, NULL, qbertSampleInfo, qbertSampleName, QbertInputInfo, QbertDIPInfo,
2459 DrvInit, DrvExit, DrvFrame, DrvDraw, DrvScan, &DrvRecalc, 0x10,
2460 240, 256, 3, 4
2461 };
2462
2463 // Mad Planets
2464
2465 static struct BurnRomInfo mplanetsRomDesc[] = {
2466 { "rom4.c16", 0x2000, 0x5402077f, 1 | BRF_PRG | BRF_ESS }, // 0 i8088 Code
2467 { "rom3.c14-15", 0x2000, 0x5d18d740, 1 | BRF_PRG | BRF_ESS }, // 1
2468 { "rom2.c13-14", 0x2000, 0x960c3bb1, 1 | BRF_PRG | BRF_ESS }, // 2
2469 { "rom1.c12-13", 0x2000, 0xeb515f10, 1 | BRF_PRG | BRF_ESS }, // 3
2470 { "rom0.c11-12", 0x2000, 0x74de78aa, 1 | BRF_PRG | BRF_ESS }, // 4
2471
2472 { "snd1", 0x0800, 0x453193a1, 2 | BRF_PRG | BRF_ESS }, // 5 m6502 Code
2473 { "snd2", 0x0800, 0xf5ffc98f, 2 | BRF_PRG | BRF_ESS }, // 6
2474
2475 { "bg0.e11-12", 0x1000, 0x709aa24c, 3 | BRF_GRA }, // 7 Background Tiles
2476 { "bg1.e13", 0x1000, 0x4921e345, 3 | BRF_GRA }, // 8
2477
2478 { "fg3.k7-8", 0x2000, 0xc990b39f, 4 | BRF_GRA }, // 9 Sprites
2479 { "fg2.k6", 0x2000, 0x735e2522, 4 | BRF_GRA }, // 10
2480 { "fg1.k5", 0x2000, 0x6456cc1c, 4 | BRF_GRA }, // 11
2481 { "fg0.k4", 0x2000, 0xa920e325, 4 | BRF_GRA }, // 12
2482 };
2483
2484 STD_ROM_PICK(mplanets)
2485 STD_ROM_FN(mplanets)
2486
2487 struct BurnDriver BurnDrvMplanets = {
2488 "mplanets", NULL, NULL, NULL, "1983",
2489 "Mad Planets\0", NULL, "Gottlieb", "Miscellaneous",
2490 NULL, NULL, NULL, NULL,
2491 BDF_GAME_WORKING | BDF_ORIENTATION_VERTICAL, 2, HARDWARE_MISC_PRE90S, GBF_MISC, 0,
2492 NULL, mplanetsRomInfo, mplanetsRomName, NULL, NULL, NULL, NULL, MplanetsInputInfo, MplanetsDIPInfo,
2493 DrvInitMplanets, DrvExit, DrvFrame, DrvDraw, DrvScan, &DrvRecalc, 0x10,
2494 240, 256, 3, 4
2495 };
2496
2497
2498 // Mad Planets (UK)
2499
2500 static struct BurnRomInfo mplanetsukRomDesc[] = {
2501 { "mpt_rom4.bin", 0x2000, 0xcd88e23c, 1 | BRF_PRG | BRF_ESS }, // 0 i8088 Code
2502 { "mpt_rom3.bin", 0x2000, 0xdc355b2d, 1 | BRF_PRG | BRF_ESS }, // 1
2503 { "mpt_rom2.bin", 0x2000, 0x846ddc23, 1 | BRF_PRG | BRF_ESS }, // 2
2504 { "mpt_rom1.bin", 0x2000, 0x94d67b87, 1 | BRF_PRG | BRF_ESS }, // 3
2505 { "mpt_rom0.bin", 0x2000, 0xa9e30ad2, 1 | BRF_PRG | BRF_ESS }, // 4
2506
2507 { "mpt_snd1.bin", 0x0800, 0x453193a1, 2 | BRF_PRG | BRF_ESS }, // 5 m6502 Code
2508 { "mpt_snd2.bin", 0x0800, 0xf5ffc98f, 2 | BRF_PRG | BRF_ESS }, // 6
2509
2510 { "mpt_bg0.bin", 0x1000, 0x709aa24c, 3 | BRF_GRA }, // 7 Background Tiles
2511 { "mpt_bg1.bin", 0x1000, 0x4921e345, 3 | BRF_GRA }, // 8
2512
2513 { "mpt_fg3.bin", 0x2000, 0xc990b39f, 4 | BRF_GRA }, // 9 Sprites
2514 { "mpt_fg2.bin", 0x2000, 0x735e2522, 4 | BRF_GRA }, // 10
2515 { "mpt_fg1.bin", 0x2000, 0x6456cc1c, 4 | BRF_GRA }, // 11
2516 { "mpt_fg0.bin", 0x2000, 0xa920e325, 4 | BRF_GRA }, // 12
2517 };
2518
2519 STD_ROM_PICK(mplanetsuk)
2520 STD_ROM_FN(mplanetsuk)
2521
2522 struct BurnDriver BurnDrvMplanetsuk = {
2523 "mplanetsuk", "mplanets", NULL, NULL, "1983",
2524 "Mad Planets (UK)\0", NULL, "Gottlieb (Taitel license)", "Miscellaneous",
2525 NULL, NULL, NULL, NULL,
2526 BDF_GAME_WORKING | BDF_CLONE | BDF_ORIENTATION_VERTICAL, 2, HARDWARE_MISC_PRE90S, GBF_MISC, 0,
2527 NULL, mplanetsukRomInfo, mplanetsukRomName, NULL, NULL, NULL, NULL, MplanetsInputInfo, MplanetsDIPInfo,
2528 DrvInitMplanets, DrvExit, DrvFrame, DrvDraw, DrvScan, &DrvRecalc, 0x10,
2529 240, 256, 3, 4
2530 };
2531
2532
2533 // Q*bert's Qubes
2534
2535 static struct BurnRomInfo qbertqubRomDesc[] = {
2536 { "qq-rom3.bin", 0x2000, 0xc4dbdcd7, 1 | BRF_PRG | BRF_ESS }, // 0 i8088 Code
2537 { "qq-rom2.bin", 0x2000, 0x21a6c6cc, 1 | BRF_PRG | BRF_ESS }, // 1
2538 { "qq-rom1.bin", 0x2000, 0x63e6c43d, 1 | BRF_PRG | BRF_ESS }, // 2
2539 { "qq-rom0.bin", 0x2000, 0x8ddbe438, 1 | BRF_PRG | BRF_ESS }, // 3
2540
2541 { "qq-snd1.bin", 0x0800, 0xe704b450, 2 | BRF_PRG | BRF_ESS }, // 4 m6502 Code
2542 { "qq-snd2.bin", 0x0800, 0xc6a98bf8, 2 | BRF_PRG | BRF_ESS }, // 5
2543
2544 { "qq-bg0.bin", 0x1000, 0x050badde, 3 | BRF_GRA }, // 6 Background Tiles
2545 { "qq-bg1.bin", 0x1000, 0x8875902f, 3 | BRF_GRA }, // 7
2546
2547 { "qq-fg3.bin", 0x4000, 0x91a949cc, 4 | BRF_GRA }, // 8 Sprites
2548 { "qq-fg2.bin", 0x4000, 0x782d9431, 4 | BRF_GRA }, // 9
2549 { "qq-fg1.bin", 0x4000, 0x71c3ac4c, 4 | BRF_GRA }, // 10
2550 { "qq-fg0.bin", 0x4000, 0x6192853f, 4 | BRF_GRA }, // 11
2551 };
2552
2553 STD_ROM_PICK(qbertqub)
STD_ROM_FN(qbertqub)2554 STD_ROM_FN(qbertqub)
2555
2556 static INT32 DrvInitCube()
2557 {
2558 game_type = 6;
2559
2560 return DrvInit();
2561 }
2562
2563 struct BurnDriver BurnDrvQbertqub = {
2564 "qbertqub", NULL, NULL, "qbert", "1983",
2565 "Q*bert's Qubes\0", NULL, "Mylstar", "Miscellaneous",
2566 NULL, NULL, NULL, NULL,
2567 BDF_GAME_WORKING | BDF_ORIENTATION_VERTICAL, 2, HARDWARE_MISC_PRE90S, GBF_MISC, 0,
2568 NULL, qbertqubRomInfo, qbertqubRomName, NULL, NULL, qbertSampleInfo, qbertSampleName, QbertqubInputInfo, QbertqubDIPInfo,
2569 DrvInitCube, DrvExit, DrvFrame, DrvDraw, DrvScan, &DrvRecalc, 0x10,
2570 240, 256, 3, 4
2571 };
2572
2573
2574 // Insector (prototype)
2575
2576 static struct BurnRomInfo insectorRomDesc[] = {
2577 { "rom3", 0x2000, 0x640881fd, 1 | BRF_PRG | BRF_ESS }, // 0 i8088 Code
2578 { "rom2", 0x2000, 0x456bc3f4, 1 | BRF_PRG | BRF_ESS }, // 1
2579 { "rom1", 0x2000, 0x706962af, 1 | BRF_PRG | BRF_ESS }, // 2
2580 { "rom0", 0x2000, 0x31cee24b, 1 | BRF_PRG | BRF_ESS }, // 3
2581
2582 { "gv106s.bin", 0x1000, 0x25bcc8bc, 2 | BRF_PRG | BRF_ESS }, // 4 m6502 Code
2583
2584 { "bg0", 0x1000, 0x0dc2037e, 3 | BRF_GRA }, // 5 Background Tiles
2585 { "bg1", 0x1000, 0x3dd73b94, 3 | BRF_GRA }, // 6
2586
2587 { "fg3", 0x2000, 0x9bbf5b6b, 4 | BRF_GRA }, // 7 Sprites
2588 { "fg2", 0x2000, 0x5adf9986, 4 | BRF_GRA }, // 8
2589 { "fg1", 0x2000, 0x4bb16111, 4 | BRF_GRA }, // 9
2590 { "fg0", 0x2000, 0x965f6b76, 4 | BRF_GRA }, // 10
2591 };
2592
2593 STD_ROM_PICK(insector)
STD_ROM_FN(insector)2594 STD_ROM_FN(insector)
2595
2596 static INT32 DrvInitInsector()
2597 {
2598 game_type = 8;
2599
2600 return DrvInit();
2601 }
2602
2603 struct BurnDriver BurnDrvInsector = {
2604 "insector", NULL, NULL, NULL, "1982",
2605 "Insector (prototype)\0", NULL, "Gottlieb", "Miscellaneous",
2606 NULL, NULL, NULL, NULL,
2607 BDF_GAME_WORKING | BDF_PROTOTYPE, 2, HARDWARE_MISC_PRE90S, GBF_SHOOT, 0,
2608 NULL, insectorRomInfo, insectorRomName, NULL, NULL, NULL, NULL, InsectorInputInfo, InsectorDIPInfo,
2609 DrvInitInsector, DrvExit, DrvFrame, DrvDraw, DrvScan, &DrvRecalc, 0x10,
2610 256, 240, 4, 3
2611 };
2612
2613
2614 // Argus (Gottlieb, prototype)
2615
2616 static struct BurnRomInfo argusgRomDesc[] = {
2617 { "arg_ram2_2732.c7", 0x1000, 0x5d35b83e, 9 | BRF_PRG | BRF_ESS }, // 0 i8088 Code
2618 { "arg_ram4_2732.c9c10", 0x1000, 0x7180e823, 9 | BRF_PRG | BRF_ESS }, // 1
2619
2620 { "arg_rom4_2764.c16", 0x2000, 0x2f48bd78, 1 | BRF_PRG | BRF_ESS }, // 2
2621 { "arg_rom3_2764.c14c15", 0x2000, 0x4dc2914c, 1 | BRF_PRG | BRF_ESS }, // 3
2622 { "arg_rom2_2764.c13c14", 0x2000, 0xb5e9ee77, 1 | BRF_PRG | BRF_ESS }, // 4
2623 { "arg_rom1_2764.c12c13", 0x2000, 0x733d3d44, 1 | BRF_PRG | BRF_ESS }, // 5
2624 { "arg_rom0_2764.c11c12", 0x2000, 0xe1906355, 1 | BRF_PRG | BRF_ESS }, // 6
2625
2626 { "arg_snd1_2716.u5", 0x0800, 0x3a6cf455, 2 | BRF_PRG | BRF_ESS }, // 7 m6502 Code
2627 { "arg_snd2_2716.u6", 0x0800, 0xddf32040, 2 | BRF_PRG | BRF_ESS }, // 8
2628
2629 // ram-based background tiles
2630
2631 { "arg_fg3_2764.k7k8", 0x2000, 0xcdb6e25c, 4 | BRF_GRA }, // 9 Sprites
2632 { "arg_fg2_2764.k6", 0x2000, 0xf10af1be, 4 | BRF_GRA }, // 10
2633 { "arg_fg1_2764.k5", 0x2000, 0x5add96e5, 4 | BRF_GRA }, // 11
2634 { "arg_fg0_2764.k4", 0x2000, 0x5b7bd588, 4 | BRF_GRA }, // 12
2635 };
2636
2637 STD_ROM_PICK(argusg)
STD_ROM_FN(argusg)2638 STD_ROM_FN(argusg)
2639
2640 static INT32 DrvInitArgusg()
2641 {
2642 game_type = 9;
2643 has_tball = 1;
2644
2645 return DrvInit();
2646 }
2647
2648 struct BurnDriver BurnDrvArgusg = {
2649 "argusg", NULL, NULL, NULL, "1984",
2650 "Argus (Gottlieb, prototype)\0", NULL, "Gottlieb", "Miscellaneous",
2651 NULL, NULL, NULL, NULL,
2652 BDF_GAME_WORKING, 2, HARDWARE_MISC_PRE90S, GBF_MISC, 0,
2653 NULL, argusgRomInfo, argusgRomName, NULL, NULL, NULL, NULL, ArgusgInputInfo, ArgusgDIPInfo,
2654 DrvInitArgusg, DrvExit, DrvFrame, DrvDraw, DrvScan, &DrvRecalc, 0x10,
2655 256, 240, 4, 3
2656 };
2657
2658
2659 // Krull
2660
2661 static struct BurnRomInfo krullRomDesc[] = {
2662 { "gv-105_ram_2.c7", 0x1000, 0x302feadf, 9 | BRF_PRG | BRF_ESS }, // 0 i8088 Code
2663 { "gv-105_ram_4.c9-10", 0x1000, 0x79355a60, 9 | BRF_PRG | BRF_ESS }, // 1
2664 { "gv-105_rom_4.c16", 0x2000, 0x2b696394, 1 | BRF_PRG | BRF_ESS }, // 2
2665 { "gv-105_rom_3.c14-15", 0x2000, 0x14b0ee42, 1 | BRF_PRG | BRF_ESS }, // 3
2666 { "gv-105_rom_2.c13-14", 0x2000, 0xb5fad94a, 1 | BRF_PRG | BRF_ESS }, // 4
2667 { "gv-105_rom_1.c12-13", 0x2000, 0x1ad956a3, 1 | BRF_PRG | BRF_ESS }, // 5
2668 { "gv-105_rom_0.c11-12", 0x2000, 0xa466afae, 1 | BRF_PRG | BRF_ESS }, // 6
2669
2670 { "snd1.bin", 0x1000, 0xdd2b30b4, 2 | BRF_PRG | BRF_ESS }, // 7 m6502 Code
2671 { "snd2.bin", 0x1000, 0x8cab901b, 2 | BRF_PRG | BRF_ESS }, // 8
2672
2673 // ram-based background tiles
2674
2675 { "gv-105_fg_3.k7-8", 0x2000, 0x82d77a45, 4 | BRF_GRA }, // 9 Sprites
2676 { "gv-105_fg_2.k6", 0x2000, 0x25a24317, 4 | BRF_GRA }, // 10
2677 { "gv-105_fg_1.k5", 0x2000, 0x7e3ad7b0, 4 | BRF_GRA }, // 11
2678 { "gv-105_fg_0.k4", 0x2000, 0x7402dc19, 4 | BRF_GRA }, // 12
2679 };
2680
2681 STD_ROM_PICK(krull)
2682 STD_ROM_FN(krull)
2683
2684 struct BurnDriver BurnDrvKrull = {
2685 "krull", NULL, NULL, NULL, "1983",
2686 "Krull\0", NULL, "Gottlieb", "Miscellaneous",
2687 NULL, NULL, NULL, NULL,
2688 BDF_GAME_WORKING | BDF_ORIENTATION_VERTICAL, 2, HARDWARE_MISC_PRE90S, GBF_MISC, 0,
2689 NULL, krullRomInfo, krullRomName, NULL, NULL, NULL, NULL, KrullInputInfo, KrullDIPInfo,
2690 DrvInit, DrvExit, DrvFrame, DrvDraw, DrvScan, &DrvRecalc, 0x10,
2691 240, 256, 3, 4
2692 };
2693
2694
2695 // Curve Ball
2696
2697 static struct BurnRomInfo curvebalRomDesc[] = {
2698 { "gv-134_rom_3.rom3_c14-15", 0x2000, 0x72ad4d45, 1 | BRF_PRG | BRF_ESS }, // 0 i8088 Code
2699 { "gv-134_rom_2.rom2_c13-14", 0x2000, 0xd46c3db5, 1 | BRF_PRG | BRF_ESS }, // 1
2700 { "gv-134_rom_1.rom1_c12-13", 0x2000, 0xeb1e08bd, 1 | BRF_PRG | BRF_ESS }, // 2
2701 { "gv-134_rom_0.rom0_c11-12", 0x2000, 0x401fc7e3, 1 | BRF_PRG | BRF_ESS }, // 3
2702
2703 { "yrom.sbd", 0x1000, 0x4c313d9b, 2 | BRF_PRG | BRF_ESS }, // 4 m6502 Code
2704 { "drom.sbd", 0x1000, 0xcecece88, 2 | BRF_PRG | BRF_ESS }, // 5
2705
2706 { "gv-134_bg_0.bg0_e11-12", 0x1000, 0xd666a179, 3 | BRF_GRA }, // 6 Background Tiles
2707 { "gv-134_bg_1.bg1_e13", 0x1000, 0x5e34ff4e, 3 | BRF_GRA }, // 7
2708
2709 { "gv-134_fg_3.fg3_k7-8", 0x2000, 0x9c9452fe, 4 | BRF_GRA }, // 8 Sprites
2710 { "gv-134_fg_2.fg2_k6", 0x2000, 0x065131af, 4 | BRF_GRA }, // 9
2711 { "gv-134_fg_1.fg1_k5", 0x2000, 0x1b7b7f94, 4 | BRF_GRA }, // 10
2712 { "gv-134_fg_0.fg0_k4", 0x2000, 0xe3a8230e, 4 | BRF_GRA }, // 11
2713 };
2714
2715 STD_ROM_PICK(curvebal)
STD_ROM_FN(curvebal)2716 STD_ROM_FN(curvebal)
2717
2718 static INT32 DrvInitCurvebal()
2719 {
2720 game_type = 7;
2721
2722 return DrvInit();
2723 }
2724
2725 struct BurnDriver BurnDrvCurvebal = {
2726 "curvebal", NULL, NULL, NULL, "1984",
2727 "Curve Ball\0", NULL, "Mylstar", "Miscellaneous",
2728 NULL, NULL, NULL, NULL,
2729 BDF_GAME_WORKING | BDF_ORIENTATION_VERTICAL, 2, HARDWARE_MISC_PRE90S, GBF_MISC, 0,
2730 NULL, curvebalRomInfo, curvebalRomName, NULL, NULL, NULL, NULL, CurvebalInputInfo, CurvebalDIPInfo,
2731 DrvInitCurvebal, DrvExit, DrvFrame, DrvDraw, DrvScan, &DrvRecalc, 0x10,
2732 240, 256, 3, 4
2733 };
2734
2735
2736 // Tylz (prototype)
2737
2738 static struct BurnRomInfo tylzRomDesc[] = {
2739 { "tylz.s4t", 0x2000, 0x28ed146d, 1 | BRF_PRG | BRF_ESS }, // 0 i8080 Code
2740 { "tylz.s4b", 0x2000, 0x18ee09f9, 1 | BRF_PRG | BRF_ESS }, // 1
2741 { "tylz.r4", 0x2000, 0x657c3d2e, 1 | BRF_PRG | BRF_ESS }, // 2
2742 { "tylz.n4", 0x2000, 0xb2a15510, 1 | BRF_PRG | BRF_ESS }, // 3
2743
2744 { "tylz.f2", 0x1000, 0xebcedba9, 2 | BRF_PRG | BRF_ESS }, // 4 m6502 Code
2745
2746 { "tylz.m6", 0x1000, 0x5e300b9b, 3 | BRF_GRA }, // 5 Background Tiles
2747 { "tylz.n6", 0x1000, 0xaf56292e, 3 | BRF_GRA }, // 6
2748
2749 { "tylz.f12", 0x2000, 0x6d2c5ad8, 4 | BRF_GRA }, // 7 Sprites
2750 { "tylz.g12", 0x2000, 0x1eb26e6f, 4 | BRF_GRA }, // 8
2751 { "tylz.j12", 0x2000, 0xbc319067, 4 | BRF_GRA }, // 9
2752 { "tylz.k12", 0x2000, 0xff62bc4b, 4 | BRF_GRA }, // 10
2753 };
2754
2755 STD_ROM_PICK(tylz)
STD_ROM_FN(tylz)2756 STD_ROM_FN(tylz)
2757
2758 static INT32 DrvInitTylz()
2759 {
2760 game_type = 5;
2761
2762 return DrvInit();
2763 }
2764
2765 struct BurnDriver BurnDrvTylz = {
2766 "tylz", NULL, NULL, NULL, "1982",
2767 "Tylz (prototype)\0", NULL, "Mylstar", "Miscellaneous",
2768 NULL, NULL, NULL, NULL,
2769 BDF_GAME_WORKING, 2, HARDWARE_MISC_PRE90S, GBF_MISC, 0,
2770 NULL, tylzRomInfo, tylzRomName, NULL, NULL, NULL, NULL, TylzInputInfo, TylzDIPInfo,
2771 DrvInitTylz, DrvExit, DrvFrame, DrvDraw, DrvScan, &DrvRecalc, 0x10,
2772 256, 240, 4, 3
2773 };
2774
2775
2776 // Knightmare (prototype)
2777
2778 static struct BurnRomInfo kngtmareRomDesc[] = {
2779 { "gv112_rom3_2764.c14c15", 0x2000, 0x47351270, 1 | BRF_PRG | BRF_ESS }, // 0 i8088 Code
2780 { "gv112_rom2_2764.c13c14", 0x2000, 0x53e01f97, 1 | BRF_PRG | BRF_ESS }, // 1
2781 { "gv112_rom1_2764.c12c13", 0x2000, 0x5b340640, 1 | BRF_PRG | BRF_ESS }, // 2
2782 { "gv112_rom0_2764.c11c12", 0x2000, 0x620dc629, 1 | BRF_PRG | BRF_ESS }, // 3
2783
2784 { "gv112_snd", 0x1000, 0, 0 | BRF_NODUMP }, // 4 m6502 Code
2785
2786 { "gv112_bg0_2732.e11e12", 0x1000, 0xa74591fd, 3 | BRF_GRA }, // 5 Background Tiles
2787 { "gv112_bg1_2732.e13", 0x1000, 0x5a226e6a, 3 | BRF_GRA }, // 6
2788
2789 { "gv112_fg3_2764.k7k8", 0x2000, 0xd1886658, 4 | BRF_GRA }, // 7 Sprites
2790 { "gv112_fg2_2764.k6", 0x2000, 0xe1c73f0c, 4 | BRF_GRA }, // 8
2791 { "gv112_fg1_2764.k5", 0x2000, 0x724bc3ea, 4 | BRF_GRA }, // 9
2792 { "gv112_fg0_2764.k4", 0x2000, 0x0311bbd9, 4 | BRF_GRA }, // 10
2793 };
2794
2795 STD_ROM_PICK(kngtmare)
2796 STD_ROM_FN(kngtmare)
2797
2798 struct BurnDriver BurnDrvKngtmare = {
2799 "kngtmare", NULL, NULL, NULL, "1983",
2800 "Knightmare (prototype)\0", "Game has NO sound", "Gottlieb", "Miscellaneous",
2801 NULL, NULL, NULL, NULL,
2802 BDF_GAME_WORKING, 2, HARDWARE_MISC_PRE90S, GBF_MISC, 0,
2803 NULL, kngtmareRomInfo, kngtmareRomName, NULL, NULL, NULL, NULL, KngtmareInputInfo, KngtmareDIPInfo,
2804 DrvInit, DrvExit, DrvFrame, DrvDraw, DrvScan, &DrvRecalc, 0x10,
2805 256, 240, 4, 3
2806 };
2807
2808
2809 // Reactor
2810
2811 static struct BurnRomInfo reactorRomDesc[] = {
2812 { "gv_100_rom7.rom7.c9-10", 0x1000, 0xa62d86fd, 1 | BRF_PRG | BRF_ESS }, // 0 i8080 Code
2813 { "gv_100_rom6.rom6.c10-11", 0x1000, 0x6ed841f3, 1 | BRF_PRG | BRF_ESS }, // 1
2814 { "gv_100_rom5.rom5.c11-12", 0x1000, 0xd90576a3, 1 | BRF_PRG | BRF_ESS }, // 2
2815 { "gv_100_rom4.rom4.c12-13", 0x1000, 0x0155daae, 1 | BRF_PRG | BRF_ESS }, // 3
2816 { "gv_100_rom3.rom3.c13-14", 0x1000, 0xf8881385, 1 | BRF_PRG | BRF_ESS }, // 4
2817 { "gv_100_rom2.rom2.c14-15", 0x1000, 0x3caba35b, 1 | BRF_PRG | BRF_ESS }, // 5
2818 { "gv_100_rom1.rom1.c16", 0x1000, 0x944e1ddf, 1 | BRF_PRG | BRF_ESS }, // 6
2819 { "gv_100_rom0.rom0.c17", 0x1000, 0x55930aed, 1 | BRF_PRG | BRF_ESS }, // 7
2820
2821 { "snd1", 0x0800, 0xd958a0fd, 2 | BRF_PRG | BRF_ESS }, // 8 m6502 Code
2822 { "snd2", 0x0800, 0x5dc86942, 2 | BRF_PRG | BRF_ESS }, // 9
2823
2824 { "gv_100_fg_3.fg3.k7-8", 0x1000, 0x8416ad53, 4 | BRF_GRA }, // 10 Sprites
2825 { "gv_100_fg_2.fg2.k6-7", 0x1000, 0x5489605a, 4 | BRF_GRA }, // 11
2826 { "gv_100_fg_1.fg1.k5-6", 0x1000, 0x18396c57, 4 | BRF_GRA }, // 12
2827 { "gv_100_fg_0.fg0.k4-5", 0x1000, 0xd1f20e15, 4 | BRF_GRA }, // 13
2828 };
2829
2830 STD_ROM_PICK(reactor)
STD_ROM_FN(reactor)2831 STD_ROM_FN(reactor)
2832
2833 static INT32 DrvInitReactor()
2834 {
2835 game_type = 10;
2836 has_tball = 1;
2837
2838 return DrvInit();
2839 }
2840
2841 struct BurnDriver BurnDrvReactor = {
2842 "reactor", NULL, NULL, "reactor", "1982",
2843 "Reactor\0", NULL, "Gottlieb", "Miscellaneous",
2844 NULL, NULL, NULL, NULL,
2845 BDF_GAME_WORKING, 2, HARDWARE_MISC_PRE90S, GBF_MISC, 0,
2846 NULL, reactorRomInfo, reactorRomName, NULL, NULL, reactorSampleInfo, reactorSampleName, ReactorInputInfo, ReactorDIPInfo,
2847 DrvInitReactor, DrvExit, DrvFrame, DrvDraw, DrvScan, &DrvRecalc, 0x10,
2848 256, 240, 4, 3
2849 };
2850
2851
2852 // Screw Loose (prototype)
2853
2854 static struct BurnRomInfo screwlooRomDesc[] = {
2855 { "rom4", 0x2000, 0x744a2513, 1 | BRF_PRG | BRF_ESS }, // 0 i8088 Code
2856 { "rom3", 0x2000, 0xffde5b5d, 1 | BRF_PRG | BRF_ESS }, // 1
2857 { "rom2", 0x2000, 0x97932b05, 1 | BRF_PRG | BRF_ESS }, // 2
2858 { "rom1", 0x2000, 0x571b65ca, 1 | BRF_PRG | BRF_ESS }, // 3
2859 { "rom0", 0x2000, 0x6447fe54, 1 | BRF_PRG | BRF_ESS }, // 4
2860
2861 { "drom1", 0x2000, 0xae965ade, 2 | BRF_PRG | BRF_ESS }, // 5 m6502 Code (audio)
2862
2863 { "yrom1", 0x2000, 0x3719b0b5, 6 | BRF_PRG | BRF_ESS }, // 6 m6502 Code (speech)
2864
2865 { "bg0", 0x1000, 0x1fd5b649, 3 | BRF_GRA }, // 7 Background Tiles
2866 { "bg1", 0x1000, 0xc8ddb8ba, 3 | BRF_GRA }, // 8
2867
2868 { "fg3", 0x2000, 0x97d4e63b, 4 | BRF_GRA }, // 9 Sprites
2869 { "fg2", 0x2000, 0xf76e56ca, 4 | BRF_GRA }, // 10
2870 { "fg1", 0x2000, 0x698c395f, 4 | BRF_GRA }, // 11
2871 { "fg0", 0x2000, 0xf23269fb, 4 | BRF_GRA }, // 12
2872 };
2873
2874 STD_ROM_PICK(screwloo)
STD_ROM_FN(screwloo)2875 STD_ROM_FN(screwloo)
2876
2877 static INT32 DrvInitScrewloo()
2878 {
2879 game_type = 11;
2880
2881 INT32 nRet = DrvInit();
2882
2883 if (nRet == 0)
2884 {
2885 tilemap_bank[0] = 1; // ram
2886 }
2887
2888 return nRet;
2889 }
2890
2891 struct BurnDriver BurnDrvScrewloo = {
2892 "screwloo", NULL, NULL, NULL, "1983",
2893 "Screw Loose (prototype)\0", NULL, "Mylstar", "Miscellaneous",
2894 NULL, NULL, NULL, NULL,
2895 BDF_GAME_WORKING | BDF_PROTOTYPE, 2, HARDWARE_MISC_PRE90S, GBF_MISC, 0,
2896 NULL, screwlooRomInfo, screwlooRomName, NULL, NULL, NULL, NULL, ScrewlooInputInfo, ScrewlooDIPInfo,
2897 DrvInitScrewloo, DrvExit, Drv2Frame, DrvDraw, DrvScan, &DrvRecalc, 0x10,
2898 256, 240, 4, 3
2899 };
2900
2901
2902 // Wiz Warz (prototype)
2903
2904 static struct BurnRomInfo wizwarzRomDesc[] = {
2905 { "gv110_rom4_2764.c16", 0x2000, 0xe4e6c29b, 1 | BRF_PRG | BRF_ESS }, // 0 i8088 Code
2906 { "gv110_rom3_2764.c14c15", 0x2000, 0xaa8e0fc4, 1 | BRF_PRG | BRF_ESS }, // 1
2907 { "gv110_rom2_2764.c13c14", 0x2000, 0x16c7d8ba, 1 | BRF_PRG | BRF_ESS }, // 2
2908 { "gv110_rom1_2764.c12c13", 0x2000, 0x358895b5, 1 | BRF_PRG | BRF_ESS }, // 3
2909 { "gv110_rom0_2764.c11c12", 0x2000, 0xf7157e17, 1 | BRF_PRG | BRF_ESS }, // 4
2910
2911 { "gv110_drom1_snd_2732.k2", 0x1000, 0x05ca79da, 2 | BRF_PRG | BRF_ESS }, // 5 m6502 Code (audio)
2912
2913 { "gv110_yrom1_snd_2732.n3", 0x1000, 0x1e3de643, 6 | BRF_PRG | BRF_ESS }, // 6 m6502 Code (speech)
2914
2915 { "gv110_bg0_2732.e11e12", 0x1000, 0x7437813c, 3 | BRF_GRA }, // 7 Background Tiles
2916 { "gv110_bg1_2732.e13", 0x1000, 0x70a54cc5, 3 | BRF_GRA }, // 8
2917
2918 { "gv110_fg3_2764.k7k8", 0x2000, 0xce0c3e8b, 4 | BRF_GRA }, // 9 Sprites
2919 { "gv110_fg2_2764.k6", 0x2000, 0xe42a166f, 4 | BRF_GRA }, // 10
2920 { "gv110_fg1_2764.k5", 0x2000, 0xb947cf84, 4 | BRF_GRA }, // 11
2921 { "gv110_fg0_2764.k4", 0x2000, 0xf7ba0fcb, 4 | BRF_GRA }, // 12
2922 };
2923
2924 STD_ROM_PICK(wizwarz)
STD_ROM_FN(wizwarz)2925 STD_ROM_FN(wizwarz)
2926
2927 static INT32 DrvInitWizwarz()
2928 {
2929 has_tball = 1;
2930
2931 return DrvInit();
2932 }
2933
2934 struct BurnDriver BurnDrvWizwarz = {
2935 "wizwarz", NULL, NULL, NULL, "1984",
2936 "Wiz Warz (prototype)\0", NULL, "Mylstar", "Miscellaneous",
2937 NULL, NULL, NULL, NULL,
2938 BDF_GAME_WORKING | BDF_PROTOTYPE, 2, HARDWARE_MISC_PRE90S, GBF_MISC, 0,
2939 NULL, wizwarzRomInfo, wizwarzRomName, NULL, NULL, NULL, NULL, WizwarzInputInfo, WizwarzDIPInfo,
2940 DrvInitWizwarz, DrvExit, Drv2Frame, DrvDraw, DrvScan, &DrvRecalc, 0x10,
2941 256, 240, 4, 3
2942 };
2943
2944
2945 // Video Vince and the Game Factory (prototype)
2946
2947 static struct BurnRomInfo vidvinceRomDesc[] = {
2948 { "gv132_ram4_2732.c9c10", 0x1000, 0x67a4927b, 9 | BRF_PRG | BRF_ESS }, // 0 i8088 Code
2949 { "gv132_rom4_2764.c16", 0x2000, 0x3c5f39f5, 1 | BRF_PRG | BRF_ESS }, // 1
2950 { "gv132_rom3_2764.c14c15", 0x2000, 0x3983cb79, 1 | BRF_PRG | BRF_ESS }, // 2
2951 { "gv132_rom2_2764.c13c14", 0x2000, 0x0f5ebab9, 1 | BRF_PRG | BRF_ESS }, // 3
2952 { "gv132_rom1_2764.c12c13", 0x2000, 0xa5bf40b7, 1 | BRF_PRG | BRF_ESS }, // 4
2953 { "gv132_rom0_2764.c11c12", 0x2000, 0x2c02b598, 1 | BRF_PRG | BRF_ESS }, // 5
2954
2955 { "gv132_drom_snd_2764.k2", 0x2000, 0x18d9d72f, 2 | BRF_PRG | BRF_ESS }, // 6 m6502 Code (audio)
2956
2957 { "gv132_yrom2_snd_2764.k3", 0x2000, 0xff59f618, 6 | BRF_PRG | BRF_ESS }, // 7 m6502 Code (speech)
2958 { "gv132_yrom1_snd_2764.n3", 0x2000, 0xbefa4b97, 6 | BRF_PRG | BRF_ESS }, // 8
2959
2960 { "gv132_bg0_2732.e11e12", 0x1000, 0x1521bb4a, 3 | BRF_GRA }, // 9 Background Tiles
2961
2962 { "gv132_fg3_2764.k7k8", 0x2000, 0x42a78a52, 4 | BRF_GRA }, // 10 Sprites
2963 { "gv132_fg2_2764.k6", 0x2000, 0x8ae428ba, 4 | BRF_GRA }, // 11
2964 { "gv132_fg1_2764.k5", 0x2000, 0xea423550, 4 | BRF_GRA }, // 12
2965 { "gv132_fg0_2764.k4", 0x2000, 0x74c996a6, 4 | BRF_GRA }, // 13
2966 };
2967
2968 STD_ROM_PICK(vidvince)
STD_ROM_FN(vidvince)2969 STD_ROM_FN(vidvince)
2970
2971 static INT32 DrvInitVidvince()
2972 {
2973 game_type = 13;
2974
2975 INT32 nRet = DrvInit();
2976
2977 if (nRet == 0)
2978 {
2979 tilemap_bank[0] = 0; // tiles
2980 tilemap_bank[1] = 0; // tiles
2981 tilemap_bank[2] = 1; // ram
2982 tilemap_bank[3] = 1; // ram
2983 }
2984
2985 return nRet;
2986 }
2987
2988 struct BurnDriver BurnDrvVidvince = {
2989 "vidvince", NULL, NULL, NULL, "1984",
2990 "Video Vince and the Game Factory (prototype)\0", NULL, "Mylstar", "Miscellaneous",
2991 NULL, NULL, NULL, NULL,
2992 BDF_GAME_WORKING, 2, HARDWARE_MISC_PRE90S, GBF_MISC, 0,
2993 NULL, vidvinceRomInfo, vidvinceRomName, NULL, NULL, NULL, NULL, VidvinceInputInfo, VidvinceDIPInfo,
2994 DrvInitVidvince, DrvExit, Drv2Frame, DrvDraw, DrvScan, &DrvRecalc, 0x10,
2995 256, 240, 4, 3
2996 };
2997
2998 // The Three Stooges In Brides Is Brides (set 1)
2999
3000 static struct BurnRomInfo stooges3RomDesc[] = {
3001 { "gv113ram.4", 0x1000, 0x533bff2a, 9 | BRF_PRG | BRF_ESS }, // 0 i8088 Code
3002 { "gv113rom.4", 0x2000, 0x8b6e52b8, 1 | BRF_PRG | BRF_ESS }, // 1
3003 { "gv113rom.3", 0x2000, 0xb816d8c4, 1 | BRF_PRG | BRF_ESS }, // 2
3004 { "gv113rom.2", 0x2000, 0xb45b2a79, 1 | BRF_PRG | BRF_ESS }, // 3
3005 { "gv113rom.1", 0x2000, 0x34ab051e, 1 | BRF_PRG | BRF_ESS }, // 4
3006 { "gv113rom.0", 0x2000, 0xab124329, 1 | BRF_PRG | BRF_ESS }, // 5
3007
3008 { "drom1", 0x2000, 0x87a9fa10, 2 | BRF_PRG | BRF_ESS }, // 6 m6502 Code (audio)
3009
3010 { "yrom2", 0x2000, 0x90f9c940, 6 | BRF_PRG | BRF_ESS }, // 7 m6502 Code (speech)
3011 { "yrom1", 0x2000, 0x55f8ab30, 6 | BRF_PRG | BRF_ESS }, // 8
3012
3013 // ram-based tiles
3014
3015 { "gv113fg3", 0x2000, 0x28071212, 4 | BRF_GRA }, // 9 Sprites
3016 { "gv113fg2", 0x2000, 0x9fa3dfde, 4 | BRF_GRA }, // 10
3017 { "gv113fg1", 0x2000, 0xfb223854, 4 | BRF_GRA }, // 11
3018 { "gv113fg0", 0x2000, 0x95762c53, 4 | BRF_GRA }, // 12
3019 };
3020
3021 STD_ROM_PICK(stooges3)
STD_ROM_FN(stooges3)3022 STD_ROM_FN(stooges3)
3023
3024 static INT32 DrvInitStooges3()
3025 {
3026 game_type = 14;
3027
3028 return DrvInit();
3029 }
3030
3031 struct BurnDriver BurnDrvStooges3 = {
3032 "3stooges", NULL, NULL, NULL, "1984",
3033 "The Three Stooges In Brides Is Brides (set 1)\0", NULL, "Mylstar", "Miscellaneous",
3034 NULL, NULL, NULL, NULL,
3035 BDF_GAME_WORKING, 2, HARDWARE_MISC_PRE90S, GBF_MISC, 0,
3036 NULL, stooges3RomInfo, stooges3RomName, NULL, NULL, NULL, NULL, Stooges3InputInfo, Stooges3DIPInfo,
3037 DrvInitStooges3, DrvExit, Drv2Frame, DrvDraw, DrvScan, &DrvRecalc, 0x10,
3038 256, 240, 4, 3
3039 };
3040
3041
3042 // The Three Stooges In Brides Is Brides (set 2)
3043
3044 static struct BurnRomInfo stooges3aRomDesc[] = {
3045 { "gv113ram4.bin", 0x1000, 0xa00365be, 9 | BRF_PRG | BRF_ESS }, // 0 i8088 Code
3046 { "gv113rom4.bin", 0x2000, 0xa8f9d51d, 1 | BRF_PRG | BRF_ESS }, // 1
3047 { "gv113rom3.bin", 0x2000, 0x60bda7b6, 1 | BRF_PRG | BRF_ESS }, // 2
3048 { "gv113rom2.bin", 0x2000, 0x9bb95798, 1 | BRF_PRG | BRF_ESS }, // 3
3049 { "gv113rom1.bin", 0x2000, 0x0a8ce58d, 1 | BRF_PRG | BRF_ESS }, // 4
3050 { "gv113rom0.bin", 0x2000, 0xf245fe18, 1 | BRF_PRG | BRF_ESS }, // 5
3051
3052 { "drom1", 0x2000, 0x87a9fa10, 2 | BRF_PRG | BRF_ESS }, // 6 m6502 Code (audio)
3053
3054 { "yrom2", 0x2000, 0x90f9c940, 6 | BRF_PRG | BRF_ESS }, // 7 m6502 Code (speech)
3055 { "yrom1", 0x2000, 0x55f8ab30, 6 | BRF_PRG | BRF_ESS }, // 8
3056
3057 // ram-based tiles
3058
3059 { "gv113fg3", 0x2000, 0x28071212, 4 | BRF_GRA }, // 9 Sprites
3060 { "gv113fg2", 0x2000, 0x9fa3dfde, 4 | BRF_GRA }, // 10
3061 { "gv113fg1", 0x2000, 0xfb223854, 4 | BRF_GRA }, // 11
3062 { "gv113fg0", 0x2000, 0x95762c53, 4 | BRF_GRA }, // 12
3063 };
3064
3065 STD_ROM_PICK(stooges3a)
3066 STD_ROM_FN(stooges3a)
3067
3068 struct BurnDriver BurnDrvStooges3a = {
3069 "3stoogesa", "3stooges", NULL, NULL, "1984",
3070 "The Three Stooges In Brides Is Brides (set 2)\0", NULL, "Mylstar", "Miscellaneous",
3071 NULL, NULL, NULL, NULL,
3072 BDF_GAME_WORKING | BDF_CLONE, 2, HARDWARE_MISC_PRE90S, GBF_MISC, 0,
3073 NULL, stooges3aRomInfo, stooges3aRomName, NULL, NULL, NULL, NULL, Stooges3InputInfo, Stooges3DIPInfo,
3074 DrvInitStooges3, DrvExit, Drv2Frame, DrvDraw, DrvScan, &DrvRecalc, 0x10,
3075 256, 240, 4, 3
3076 };
3077