1 // FB Alpha Midway MCR driver module
2 // Based on MAME driver by Aaron Giles
3
4 /*
5 twotigerc - <<-- todo (alt.inpt) (marked not working/BurnDriverD for now)
6 dpoker - don't bother with this (uses light panel/special buttons/etc)
7 nflfoot - don't bother with this (laserdisc)
8 */
9
10 #include "tiles_generic.h"
11 #include "z80_intf.h"
12 #include "m6809_intf.h"
13 #include "midssio.h"
14 #include "midsat.h" // for dotrone
15 #include "midtcs.h" // demoderb
16 #include "dac.h"
17 #include "ay8910.h"
18 #include "samples.h"
19 #include "watchdog.h"
20 #include "burn_pal.h"
21 #include "burn_gun.h" // for dial (kick, kroozr, ..), and trackball (wacko)
22
23 static UINT8 *AllMem;
24 static UINT8 *MemEnd;
25 static UINT8 *AllRam;
26 static UINT8 *RamEnd;
27 static UINT8 *DrvZ80ROM0;
28 static UINT8 *DrvZ80ROM1;
29 static UINT8 *DrvGfxROM0;
30 static UINT8 *DrvGfxROM1;
31 static UINT8 *DrvSndPROM;
32 static UINT8 *DrvNVRAM;
33 static UINT8 *DrvSprRAM;
34 static UINT8 *DrvVidRAM;
35 static UINT8 *DrvZ80RAM1;
36 static UINT8 *DrvTCSROM;
37 static UINT16 *DrvPalRAM16;
38
39 static UINT32 *DrvPalette;
40 static UINT8 DrvRecalc;
41
42 static INT32 flipscreen;
43
44 static INT32 nGraphicsLen0;
45 static INT32 nGraphicsLen1;
46 static INT32 nMainClock;
47 static INT32 nScreenFlip = 0;
48 static INT32 has_ssio;
49 static INT32 sprite_config;
50
51 static UINT8 DrvJoy1[8];
52 static UINT8 DrvJoy2[8];
53 static UINT8 DrvJoy3[8];
54 static UINT8 DrvJoy4[8];
55 static UINT8 DrvJoy5[8];
56 static UINT8 DrvJoy6[8];
57 static UINT8 DrvDips[5];
58 static UINT8 DrvInputs[6];
59 static UINT8 DrvReset;
60
61 static UINT8 DrvJoy4f[8];
62 static INT16 DrvAnalogPortX = 0;
63 static INT16 DrvAnalogPortY = 0;
64 static INT16 DrvAnalogPort2 = 0;
65 static INT16 DrvAnalogPort3 = 0;
66 static INT16 DrvAnalogPortZ = 0; // dial
67
68 static INT32 input_playernum = 0;
69
70 static INT32 has_dial = 0;
71 static INT32 has_squak = 0;
72
73 static INT32 is_kroozr = 0;
74 static INT32 is_wacko = 0;
75 static INT32 is_twotiger = 0;
76 static INT32 is_dotron = 0;
77 static INT32 is_demoderb = 0;
78
79 #define A(a, b, c, d) {a, b, (UINT8*)(c), d}
80 static struct BurnInputInfo SolarfoxInputList[] = {
81 {"P1 Coin", BIT_DIGITAL, DrvJoy1 + 0, "p1 coin" },
82 {"P1 Up", BIT_DIGITAL, DrvJoy2 + 3, "p1 up" },
83 {"P1 Down", BIT_DIGITAL, DrvJoy2 + 2, "p1 down" },
84 {"P1 Left", BIT_DIGITAL, DrvJoy2 + 1, "p1 left" },
85 {"P1 Right", BIT_DIGITAL, DrvJoy2 + 0, "p1 right" },
86 {"P1 Button 1", BIT_DIGITAL, DrvJoy1 + 4, "p1 fire 1" },
87 {"P1 Button 2", BIT_DIGITAL, DrvJoy1 + 2, "p1 fire 2" },
88
89 {"P2 Coin", BIT_DIGITAL, DrvJoy1 + 1, "p2 coin" },
90 {"P2 Up", BIT_DIGITAL, DrvJoy2 + 7, "p2 up" },
91 {"P2 Down", BIT_DIGITAL, DrvJoy2 + 6, "p2 down" },
92 {"P2 Left", BIT_DIGITAL, DrvJoy2 + 5, "p2 left" },
93 {"P2 Right", BIT_DIGITAL, DrvJoy2 + 4, "p2 right" },
94 {"P2 Button 1", BIT_DIGITAL, DrvJoy3 + 0, "p2 fire 1" },
95 {"P2 Button 2", BIT_DIGITAL, DrvJoy1 + 3, "p2 fire 2" },
96
97 {"Reset", BIT_DIGITAL, &DrvReset, "reset" },
98 {"Service", BIT_DIGITAL, DrvJoy1 + 6, "service" },
99 {"Tilt", BIT_DIGITAL, DrvJoy1 + 5, "tilt" },
100 {"Dip A", BIT_DIPSWITCH, DrvDips + 0, "dip" },
101 {"Dip B", BIT_DIPSWITCH, DrvDips + 1, "dip" },
102 };
103
104 STDINPUTINFO(Solarfox)
105
106 static struct BurnInputInfo KickInputList[] = {
107 {"P1 Coin", BIT_DIGITAL, DrvJoy1 + 0, "p1 coin" },
108 {"P1 Start", BIT_DIGITAL, DrvJoy1 + 2, "p1 start" },
109 {"P1 Button 1", BIT_DIGITAL, DrvJoy1 + 4, "p1 fire 1" },
110 {"P1 Left", BIT_DIGITAL, DrvJoy4f + 0, "p1 left" },
111 {"P1 Right", BIT_DIGITAL, DrvJoy4f + 1, "p1 right" },
112 A("P1 Dial", BIT_ANALOG_REL, &DrvAnalogPortZ,"p1 x-axis"),
113
114 {"Reset", BIT_DIGITAL, &DrvReset, "reset" },
115 {"Service", BIT_DIGITAL, DrvJoy1 + 6, "service" },
116 {"Tilt", BIT_DIGITAL, DrvJoy1 + 5, "tilt" },
117 {"Dip A", BIT_DIPSWITCH, DrvDips + 0, "dip" },
118 {"Dip B", BIT_DIPSWITCH, DrvDips + 1, "dip" },
119 };
120
121 STDINPUTINFO(Kick)
122
123 static struct BurnInputInfo TapperInputList[] = {
124 {"P1 Coin", BIT_DIGITAL, DrvJoy1 + 0, "p1 coin" },
125 {"P1 Start", BIT_DIGITAL, DrvJoy1 + 2, "p1 start" },
126 {"P1 Up", BIT_DIGITAL, DrvJoy2 + 3, "p1 up" },
127 {"P1 Down", BIT_DIGITAL, DrvJoy2 + 2, "p1 down" },
128 {"P1 Left", BIT_DIGITAL, DrvJoy2 + 1, "p1 left" },
129 {"P1 Right", BIT_DIGITAL, DrvJoy2 + 0, "p1 right" },
130 {"P1 Button 1", BIT_DIGITAL, DrvJoy2 + 4, "p1 fire 1" },
131
132 {"P2 Coin", BIT_DIGITAL, DrvJoy1 + 1, "p2 coin" },
133 {"P2 Start", BIT_DIGITAL, DrvJoy1 + 3, "p2 start" },
134 {"P2 Up", BIT_DIGITAL, DrvJoy3 + 3, "p2 up" },
135 {"P2 Down", BIT_DIGITAL, DrvJoy3 + 2, "p2 down" },
136 {"P2 Left", BIT_DIGITAL, DrvJoy3 + 1, "p2 left" },
137 {"P2 Right", BIT_DIGITAL, DrvJoy3 + 0, "p2 right" },
138 {"P2 Button 1", BIT_DIGITAL, DrvJoy3 + 4, "p2 fire 1" },
139
140 {"Reset", BIT_DIGITAL, &DrvReset, "reset" },
141 {"Service", BIT_DIGITAL, DrvJoy1 + 6, "service" },
142 {"Tilt", BIT_DIGITAL, DrvJoy1 + 5, "tilt" },
143 {"Dip A", BIT_DIPSWITCH, DrvDips + 0, "dip" },
144 {"Dip B", BIT_DIPSWITCH, DrvDips + 1, "dip" },
145 };
146
147 STDINPUTINFO(Tapper)
148
149 static struct BurnInputInfo ShollowInputList[] = {
150 {"P1 Coin", BIT_DIGITAL, DrvJoy1 + 0, "p1 coin" },
151 {"P1 Start", BIT_DIGITAL, DrvJoy1 + 2, "p1 start" },
152 {"P1 Left", BIT_DIGITAL, DrvJoy2 + 0, "p1 left" },
153 {"P1 Right", BIT_DIGITAL, DrvJoy2 + 1, "p1 right" },
154 {"P1 Button 1", BIT_DIGITAL, DrvJoy2 + 2, "p1 fire 1" },
155 {"P1 Button 2", BIT_DIGITAL, DrvJoy2 + 3, "p1 fire 2" },
156
157 {"P2 Coin", BIT_DIGITAL, DrvJoy1 + 1, "p2 coin" },
158 {"P2 Start", BIT_DIGITAL, DrvJoy1 + 3, "p2 start" },
159 {"P2 Left", BIT_DIGITAL, DrvJoy2 + 4, "p2 left" },
160 {"P2 Right", BIT_DIGITAL, DrvJoy2 + 5, "p2 right" },
161 {"P2 Button 1", BIT_DIGITAL, DrvJoy2 + 6, "p2 fire 1" },
162 {"P2 Button 2", BIT_DIGITAL, DrvJoy2 + 7, "p2 fire 2" },
163
164 {"Reset", BIT_DIGITAL, &DrvReset, "reset" },
165 {"Service", BIT_DIGITAL, DrvJoy1 + 6, "service" },
166 {"Tilt", BIT_DIGITAL, DrvJoy1 + 5, "tilt" },
167 {"Dip A", BIT_DIPSWITCH, DrvDips + 0, "dip" },
168 {"Dip B", BIT_DIPSWITCH, DrvDips + 1, "dip" },
169 };
170
171 STDINPUTINFO(Shollow)
172
173 static struct BurnInputInfo TronInputList[] = {
174 {"P1 Coin", BIT_DIGITAL, DrvJoy1 + 0, "p1 coin" },
175 {"P1 Start", BIT_DIGITAL, DrvJoy1 + 2, "p1 start" },
176 {"P1 Up", BIT_DIGITAL, DrvJoy3 + 2, "p1 up" },
177 {"P1 Down", BIT_DIGITAL, DrvJoy3 + 3, "p1 down" },
178 {"P1 Left", BIT_DIGITAL, DrvJoy3 + 0, "p1 left" },
179 {"P1 Right", BIT_DIGITAL, DrvJoy3 + 1, "p1 right" },
180 {"P1 Button 1", BIT_DIGITAL, DrvJoy1 + 4, "p1 fire 1" },
181 A("P1 Dial", BIT_ANALOG_REL, &DrvAnalogPortZ,"p1 x-axis"),
182
183 {"P2 Coin", BIT_DIGITAL, DrvJoy1 + 1, "p2 coin" },
184 {"P2 Start", BIT_DIGITAL, DrvJoy1 + 3, "p2 start" },
185 {"P2 Up", BIT_DIGITAL, DrvJoy3 + 6, "p2 up" },
186 {"P2 Down", BIT_DIGITAL, DrvJoy3 + 7, "p2 down" },
187 {"P2 Left", BIT_DIGITAL, DrvJoy3 + 4, "p2 left" },
188 {"P2 Right", BIT_DIGITAL, DrvJoy3 + 5, "p2 right" },
189 {"P2 Button 1", BIT_DIGITAL, DrvJoy4 + 7, "p2 fire 1" },
190 A("P2 Dial", BIT_ANALOG_REL, &DrvAnalogPort2,"p2 x-axis"),
191
192 {"Reset", BIT_DIGITAL, &DrvReset, "reset" },
193 {"Service", BIT_DIGITAL, DrvJoy1 + 6, "service" },
194 {"Tilt", BIT_DIGITAL, DrvJoy1 + 5, "tilt" },
195 {"Dip A", BIT_DIPSWITCH, DrvDips + 0, "dip" },
196 {"Dip B", BIT_DIPSWITCH, DrvDips + 1, "dip" },
197 };
198
199 STDINPUTINFO(Tron)
200
201 static struct BurnInputInfo KroozrInputList[] = {
202 {"P1 Coin", BIT_DIGITAL, DrvJoy1 + 0, "p1 coin" },
203 {"P1 Start", BIT_DIGITAL, DrvJoy1 + 2, "p1 start" },
204 A("P1 Stick X", BIT_ANALOG_REL, &DrvAnalogPortX,"p1 x-axis"),
205 A("P1 Stick Y", BIT_ANALOG_REL, &DrvAnalogPortY,"p1 y-axis"),
206 A("P1 Dial", BIT_ANALOG_REL, &DrvAnalogPortZ,"p1 z-axis"),
207 {"P1 Button 1", BIT_DIGITAL, DrvJoy1 + 4, "p1 fire 1" },
208 {"P1 Button 2", BIT_DIGITAL, DrvJoy2 + 7, "p1 fire 2" },
209
210 {"P2 Coin", BIT_DIGITAL, DrvJoy1 + 1, "p2 coin" },
211 {"P2 Start", BIT_DIGITAL, DrvJoy1 + 3, "p2 start" },
212
213 {"Reset", BIT_DIGITAL, &DrvReset, "reset" },
214 {"Service", BIT_DIGITAL, DrvJoy1 + 6, "service" },
215 {"Tilt", BIT_DIGITAL, DrvJoy1 + 5, "tilt" },
216 {"Dip A", BIT_DIPSWITCH, DrvDips + 0, "dip" },
217 {"Dip B", BIT_DIPSWITCH, DrvDips + 1, "dip" },
218 };
219
220 STDINPUTINFO(Kroozr)
221
222 static struct BurnInputInfo DominoInputList[] = {
223 {"P1 Coin", BIT_DIGITAL, DrvJoy1 + 0, "p1 coin" },
224 {"P1 Start", BIT_DIGITAL, DrvJoy1 + 2, "p1 start" },
225 {"P1 Up", BIT_DIGITAL, DrvJoy2 + 2, "p1 up" },
226 {"P1 Down", BIT_DIGITAL, DrvJoy2 + 3, "p1 down" },
227 {"P1 Left", BIT_DIGITAL, DrvJoy2 + 0, "p1 left" },
228 {"P1 Right", BIT_DIGITAL, DrvJoy2 + 1, "p1 right" },
229 {"P1 Button 1", BIT_DIGITAL, DrvJoy1 + 4, "p1 fire 1" },
230
231 {"P2 Coin", BIT_DIGITAL, DrvJoy1 + 1, "p2 coin" },
232 {"P2 Start", BIT_DIGITAL, DrvJoy1 + 3, "p2 start" },
233 {"P2 Up", BIT_DIGITAL, DrvJoy3 + 2, "p2 up" },
234 {"P2 Down", BIT_DIGITAL, DrvJoy3 + 3, "p2 down" },
235 {"P2 Left", BIT_DIGITAL, DrvJoy3 + 0, "p2 left" },
236 {"P2 Right", BIT_DIGITAL, DrvJoy3 + 1, "p2 right" },
237 {"P2 Button 1", BIT_DIGITAL, DrvJoy3 + 4, "p2 fire 1" },
238
239 {"Reset", BIT_DIGITAL, &DrvReset, "reset" },
240 {"Service", BIT_DIGITAL, DrvJoy1 + 6, "service" },
241 {"Tilt", BIT_DIGITAL, DrvJoy1 + 5, "tilt" },
242 {"Dip A", BIT_DIPSWITCH, DrvDips + 0, "dip" },
243 {"Dip B", BIT_DIPSWITCH, DrvDips + 1, "dip" },
244 };
245
246 STDINPUTINFO(Domino)
247
248 static struct BurnInputInfo JourneyInputList[] = {
249 {"P1 Coin", BIT_DIGITAL, DrvJoy1 + 0, "p1 coin" },
250 {"P1 Start", BIT_DIGITAL, DrvJoy1 + 2, "p1 start" },
251 {"P1 Up", BIT_DIGITAL, DrvJoy2 + 2, "p1 up" },
252 {"P1 Down", BIT_DIGITAL, DrvJoy2 + 3, "p1 down" },
253 {"P1 Left", BIT_DIGITAL, DrvJoy2 + 0, "p1 left" },
254 {"P1 Right", BIT_DIGITAL, DrvJoy2 + 1, "p1 right" },
255 {"P1 Button 1", BIT_DIGITAL, DrvJoy1 + 4, "p1 fire 1" },
256
257 {"P2 Coin", BIT_DIGITAL, DrvJoy1 + 1, "p2 coin" },
258 {"P2 Start", BIT_DIGITAL, DrvJoy1 + 3, "p2 start" },
259 {"P2 Up", BIT_DIGITAL, DrvJoy3 + 2, "p2 up" },
260 {"P2 Down", BIT_DIGITAL, DrvJoy3 + 3, "p2 down" },
261 {"P2 Left", BIT_DIGITAL, DrvJoy3 + 0, "p2 left" },
262 {"P2 Right", BIT_DIGITAL, DrvJoy3 + 1, "p2 right" },
263 {"P2 Button 1", BIT_DIGITAL, DrvJoy3 + 4, "p2 fire 1" },
264
265 {"Reset", BIT_DIGITAL, &DrvReset, "reset" },
266 {"Service", BIT_DIGITAL, DrvJoy1 + 6, "service" },
267 {"Tilt", BIT_DIGITAL, DrvJoy1 + 5, "tilt" },
268 {"Dip A", BIT_DIPSWITCH, DrvDips + 0, "dip" },
269 {"Dip B", BIT_DIPSWITCH, DrvDips + 1, "dip" },
270 };
271
272 STDINPUTINFO(Journey)
273
274 static struct BurnInputInfo WackoInputList[] = {
275 {"P1 Coin", BIT_DIGITAL, DrvJoy1 + 0, "p1 coin" },
276 {"P1 Start", BIT_DIGITAL, DrvJoy1 + 2, "p1 start" },
277 {"P1 Up", BIT_DIGITAL, DrvJoy5 + 3, "p1 up" },
278 {"P1 Down", BIT_DIGITAL, DrvJoy5 + 2, "p1 down" },
279 {"P1 Left", BIT_DIGITAL, DrvJoy5 + 1, "p1 left" },
280 {"P1 Right", BIT_DIGITAL, DrvJoy5 + 0, "p1 right" },
281 A("P1 Trackball X", BIT_ANALOG_REL, &DrvAnalogPortX,"p1 x-axis"),
282 A("P1 Trackball Y", BIT_ANALOG_REL, &DrvAnalogPortY,"p1 y-axis"),
283
284 {"P2 Coin", BIT_DIGITAL, DrvJoy1 + 1, "p2 coin" },
285 {"P2 Start", BIT_DIGITAL, DrvJoy1 + 3, "p2 start" },
286 {"P2 Up", BIT_DIGITAL, DrvJoy5 + 7, "p2 up" },
287 {"P2 Down", BIT_DIGITAL, DrvJoy5 + 6, "p2 down" },
288 {"P2 Left", BIT_DIGITAL, DrvJoy5 + 5, "p2 left" },
289 {"P2 Right", BIT_DIGITAL, DrvJoy5 + 4, "p2 right" },
290 A("P2 Trackball X", BIT_ANALOG_REL, &DrvAnalogPort2,"p2 x-axis"),
291 A("P2 Trackball Y", BIT_ANALOG_REL, &DrvAnalogPort3,"p2 y-axis"),
292
293 {"Reset", BIT_DIGITAL, &DrvReset, "reset" },
294 {"Service", BIT_DIGITAL, DrvJoy1 + 6, "service" },
295 {"Tilt", BIT_DIGITAL, DrvJoy1 + 5, "tilt" },
296 {"Dip A", BIT_DIPSWITCH, DrvDips + 0, "dip" },
297 {"Dip B", BIT_DIPSWITCH, DrvDips + 1, "dip" },
298 };
299
300 STDINPUTINFO(Wacko)
301
302 static struct BurnInputInfo TimberInputList[] = {
303 {"P1 Coin", BIT_DIGITAL, DrvJoy1 + 0, "p1 coin" },
304 {"P1 Start", BIT_DIGITAL, DrvJoy1 + 2, "p1 start" },
305 {"P1 Up", BIT_DIGITAL, DrvJoy2 + 3, "p1 up" },
306 {"P1 Down", BIT_DIGITAL, DrvJoy2 + 2, "p1 down" },
307 {"P1 Left", BIT_DIGITAL, DrvJoy2 + 1, "p1 left" },
308 {"P1 Right", BIT_DIGITAL, DrvJoy2 + 0, "p1 right" },
309 {"P1 Button 1", BIT_DIGITAL, DrvJoy2 + 4, "p1 fire 1" },
310 {"P1 Button 2", BIT_DIGITAL, DrvJoy2 + 5, "p1 fire 2" },
311
312 {"P2 Coin", BIT_DIGITAL, DrvJoy1 + 1, "p2 coin" },
313 {"P2 Start", BIT_DIGITAL, DrvJoy1 + 3, "p2 start" },
314 {"P2 Up", BIT_DIGITAL, DrvJoy3 + 3, "p2 up" },
315 {"P2 Down", BIT_DIGITAL, DrvJoy3 + 2, "p2 down" },
316 {"P2 Left", BIT_DIGITAL, DrvJoy3 + 1, "p2 left" },
317 {"P2 Right", BIT_DIGITAL, DrvJoy3 + 0, "p2 right" },
318 {"P2 Button 1", BIT_DIGITAL, DrvJoy3 + 4, "p2 fire 1" },
319 {"P2 Button 2", BIT_DIGITAL, DrvJoy3 + 5, "p2 fire 2" },
320
321 {"Reset", BIT_DIGITAL, &DrvReset, "reset" },
322 {"Service", BIT_DIGITAL, DrvJoy1 + 6, "service" },
323 {"Tilt", BIT_DIGITAL, DrvJoy1 + 5, "tilt" },
324 {"Dip A", BIT_DIPSWITCH, DrvDips + 0, "dip" },
325 {"Dip B", BIT_DIPSWITCH, DrvDips + 1, "dip" },
326 };
327
328 STDINPUTINFO(Timber)
329
330 static struct BurnInputInfo TwotigerInputList[] = {
331 {"P1 Coin", BIT_DIGITAL, DrvJoy1 + 0, "p1 coin" },
332 {"P1 Start", BIT_DIGITAL, DrvJoy1 + 4, "p1 start" },
333 {"P1 & P2 Dogfight Start", BIT_DIGITAL, DrvJoy1 + 3, "p3 start" },
334 {"P1 Button 1", BIT_DIGITAL, DrvJoy5 + 2, "p1 fire 1" },
335 {"P1 Button 2", BIT_DIGITAL, DrvJoy5 + 1, "p1 fire 2" },
336 {"P1 Button 3", BIT_DIGITAL, DrvJoy5 + 0, "p1 fire 3" },
337 A("P1 Stick X", BIT_ANALOG_REL, &DrvAnalogPortX,"p1 x-axis"),
338
339 {"P2 Coin", BIT_DIGITAL, DrvJoy1 + 1, "p2 coin" },
340 {"P2 Start", BIT_DIGITAL, DrvJoy1 + 2, "p2 start" },
341 {"P2 Button 1", BIT_DIGITAL, DrvJoy5 + 5, "p2 fire 1" },
342 {"P2 Button 2", BIT_DIGITAL, DrvJoy5 + 4, "p2 fire 2" },
343 {"P2 Button 3", BIT_DIGITAL, DrvJoy5 + 3, "p2 fire 3" },
344 A("P2 Stick X", BIT_ANALOG_REL, &DrvAnalogPortY,"p2 x-axis"),
345
346 {"Reset", BIT_DIGITAL, &DrvReset, "reset" },
347 {"Service", BIT_DIGITAL, DrvJoy1 + 6, "service" },
348 {"Tilt", BIT_DIGITAL, DrvJoy1 + 5, "tilt" },
349 {"Dip A", BIT_DIPSWITCH, DrvDips + 0, "dip" },
350 {"Dip B", BIT_DIPSWITCH, DrvDips + 1, "dip" },
351 };
352
353 STDINPUTINFO(Twotiger)
354
355 static struct BurnInputInfo DotronInputList[] = {
356 {"P1 Coin", BIT_DIGITAL, DrvJoy1 + 0, "p1 coin" },
357 {"P1 Start", BIT_DIGITAL, DrvJoy1 + 2, "p1 start" },
358 {"P1 Up", BIT_DIGITAL, DrvJoy3 + 2, "p1 up" },
359 {"P1 Down", BIT_DIGITAL, DrvJoy3 + 3, "p1 down" },
360 {"P1 Left", BIT_DIGITAL, DrvJoy3 + 0, "p1 left" },
361 {"P1 Right", BIT_DIGITAL, DrvJoy3 + 1, "p1 right" },
362 A("P1 Dial", BIT_ANALOG_REL, &DrvAnalogPortZ,"p1 x-axis"),
363 A("P1 Aim Analog", BIT_ANALOG_REL, &DrvAnalogPortY,"p1 y-axis"),
364 {"P1 Button 1", BIT_DIGITAL, DrvJoy1 + 4, "p1 fire 1" },
365 {"P1 Button 2", BIT_DIGITAL, DrvJoy3 + 6, "p1 fire 2" },
366 {"P1 Aim Down", BIT_DIGITAL, DrvJoy3 + 4, "p1 fire 3" },
367 {"P1 Aim Up", BIT_DIGITAL, DrvJoy3 + 5, "p1 fire 4" },
368
369 {"Reset", BIT_DIGITAL, &DrvReset, "reset" },
370 {"Service", BIT_DIGITAL, DrvJoy1 + 6, "service" },
371 {"Tilt", BIT_DIGITAL, DrvJoy1 + 5, "tilt" },
372 {"Dip A", BIT_DIPSWITCH, DrvDips + 0, "dip" },
373 {"Dip B", BIT_DIPSWITCH, DrvDips + 1, "dip" },
374 {"Dip C", BIT_DIPSWITCH, DrvDips + 2, "dip" },
375 };
376
377 STDINPUTINFO(Dotron)
378
379 static struct BurnInputInfo DemoderbInputList[] = {
380 {"P1 Coin", BIT_DIGITAL, DrvJoy1 + 0, "p1 coin" },
381 {"P1 Start", BIT_DIGITAL, DrvJoy1 + 2, "p1 start" },
382 A("P1 Dial", BIT_ANALOG_REL, &DrvAnalogPortZ,"p1 x-axis"),
383 {"P1 Button 1", BIT_DIGITAL, DrvJoy2 + 0, "p1 fire 1" },
384 {"P1 Button 2", BIT_DIGITAL, DrvJoy2 + 1, "p1 fire 2" },
385
386 {"P2 Coin", BIT_DIGITAL, DrvJoy1 + 1, "p2 coin" },
387 {"P2 Start", BIT_DIGITAL, DrvJoy1 + 3, "p2 start" },
388 A("P2 Dial", BIT_ANALOG_REL, &DrvAnalogPort2,"p2 x-axis"),
389 {"P2 Button 1", BIT_DIGITAL, DrvJoy3 + 0, "p2 fire 1" },
390 {"P2 Button 2", BIT_DIGITAL, DrvJoy3 + 1, "p2 fire 2" },
391
392 {"P3 Coin", BIT_DIGITAL, DrvJoy5 + 0, "p3 coin" },
393 {"P3 Start", BIT_DIGITAL, DrvJoy5 + 2, "p3 start" },
394 A("P3 Dial", BIT_ANALOG_REL, &DrvAnalogPortX,"p3 x-axis"),
395 {"P3 Button 1", BIT_DIGITAL, DrvJoy5 + 4, "p3 fire 1" },
396 {"P3 Button 2", BIT_DIGITAL, DrvJoy5 + 5, "p3 fire 2" },
397
398 {"P4 Coin", BIT_DIGITAL, DrvJoy5 + 1, "p4 coin" },
399 {"P4 Start", BIT_DIGITAL, DrvJoy5 + 3, "p4 start" },
400 A("P4 Dial", BIT_ANALOG_REL, &DrvAnalogPortY,"p4 x-axis"),
401 {"P4 Button 1", BIT_DIGITAL, DrvJoy5 + 6, "p4 fire 1" },
402 {"P4 Button 2", BIT_DIGITAL, DrvJoy5 + 7, "p4 fire 2" },
403
404 {"Reset", BIT_DIGITAL, &DrvReset, "reset" },
405 {"Tilt", BIT_DIGITAL, DrvJoy1 + 6, "tilt" },
406 {"Dip A", BIT_DIPSWITCH, DrvDips + 0, "dip" },
407 {"Dip B", BIT_DIPSWITCH, DrvDips + 1, "dip" },
408 };
409
410 STDINPUTINFO(Demoderb)
411 #undef A
412
413 static struct BurnDIPInfo DemoderbDIPList[]=
414 {
415 {0x16, 0xff, 0xff, 0xff, NULL },
416 {0x17, 0xff, 0xff, 0x20, NULL },
417
418 {0 , 0xfe, 0 , 2, "Cabinet" },
419 {0x16, 0x01, 0x01, 0x01, "2P Upright" },
420 {0x16, 0x01, 0x01, 0x00, "4P Cocktail" },
421
422 {0 , 0xfe, 0 , 2, "Difficulty" },
423 {0x16, 0x01, 0x02, 0x02, "Normal" },
424 {0x16, 0x01, 0x02, 0x00, "Harder" },
425
426 {0 , 0xfe, 0 , 2, "Free Play" },
427 {0x16, 0x01, 0x04, 0x04, "Off" },
428 {0x16, 0x01, 0x04, 0x00, "On" },
429
430 {0 , 0xfe, 0 , 2, "Reward Screen" },
431 {0x16, 0x01, 0x08, 0x08, "Expanded" },
432 {0x16, 0x01, 0x08, 0x00, "Limited" },
433
434 {0 , 0xfe, 0 , 4, "Coinage" },
435 {0x16, 0x01, 0x30, 0x20, "2 Coins 1 Credits" },
436 {0x16, 0x01, 0x30, 0x00, "2 Coins 2 Credits" },
437 {0x16, 0x01, 0x30, 0x30, "1 Coin 1 Credits" },
438 {0x16, 0x01, 0x30, 0x10, "1 Coin 2 Credits" },
439
440 {0 , 0xfe, 0 , 2, "Service Mode" },
441 {0x17, 0x01, 0x20, 0x20, "Off" },
442 {0x17, 0x01, 0x20, 0x00, "On" },
443 };
444
445 STDDIPINFO(Demoderb)
446
447 static struct BurnDIPInfo DotronDIPList[]=
448 {
449 {0x0f, 0xff, 0xff, 0x80, NULL },
450 {0x10, 0xff, 0xff, 0xff, NULL },
451 {0x11, 0xff, 0xff, 0x80, NULL },
452
453 {0 , 0xfe, 0 , 2, "Cabinet" },
454 {0x0f, 0x01, 0x80, 0x00, "Environmental" },
455 {0x0f, 0x01, 0x80, 0x80, "Upright" },
456
457 {0 , 0xfe, 0 , 2, "Coin Meters" },
458 {0x10, 0x01, 0x01, 0x01, "1" },
459 {0x10, 0x01, 0x01, 0x00, "2" },
460
461 {0 , 0xfe, 0 , 2, "Service Mode" },
462 {0x11, 0x01, 0x80, 0x80, "Off" },
463 {0x11, 0x01, 0x80, 0x00, "On" },
464 };
465
466 STDDIPINFO(Dotron)
467
468 static struct BurnDIPInfo DotroneDIPList[]=
469 {
470 {0x0f, 0xff, 0xff, 0x00, NULL },
471 {0x10, 0xff, 0xff, 0xff, NULL },
472 {0x11, 0xff, 0xff, 0x80, NULL },
473
474 {0 , 0xfe, 0 , 2, "Cabinet" },
475 {0x0f, 0x01, 0x80, 0x00, "Environmental" },
476 {0x0f, 0x01, 0x80, 0x80, "Upright" },
477
478 {0 , 0xfe, 0 , 2, "Coin Meters" },
479 {0x10, 0x01, 0x01, 0x01, "1" },
480 {0x10, 0x01, 0x01, 0x00, "2" },
481
482 {0 , 0xfe, 0 , 2, "Service Mode" },
483 {0x11, 0x01, 0x80, 0x80, "Off" },
484 {0x11, 0x01, 0x80, 0x00, "On" },
485 };
486
487 STDDIPINFO(Dotrone)
488
489 static struct BurnDIPInfo TwotigerDIPList[]=
490 {
491 {0x10, 0xff, 0xff, 0xfc, NULL },
492 {0x11, 0xff, 0xff, 0x80, NULL },
493
494 {0 , 0xfe, 0 , 2, "Shot Speed" },
495 {0x10, 0x01, 0x01, 0x01, "Fast" },
496 {0x10, 0x01, 0x01, 0x00, "Slow" },
497
498 {0 , 0xfe, 0 , 2, "Dogfight" },
499 {0x10, 0x01, 0x02, 0x00, "1 Credit" },
500 {0x10, 0x01, 0x02, 0x02, "2 Credits" },
501
502 {0 , 0xfe, 0 , 2, "Service Mode" },
503 {0x11, 0x01, 0x80, 0x80, "Off" },
504 {0x11, 0x01, 0x80, 0x00, "On" },
505 };
506
507 STDDIPINFO(Twotiger)
508
509 static struct BurnDIPInfo TimberDIPList[]=
510 {
511 {0x13, 0xff, 0xff, 0xfb, NULL },
512 {0x14, 0xff, 0xff, 0x80, NULL },
513
514 {0 , 0xfe, 0 , 2, "Demo Sounds" },
515 {0x13, 0x01, 0x04, 0x04, "Off" },
516 {0x13, 0x01, 0x04, 0x00, "On" },
517
518 {0 , 0xfe, 0 , 2, "Cabinet" },
519 {0x13, 0x01, 0x40, 0x40, "Upright" },
520 {0x13, 0x01, 0x40, 0x00, "Cocktail" },
521
522 {0 , 0xfe, 0 , 2, "Coin Meters" },
523 {0x13, 0x01, 0x80, 0x80, "1" },
524 {0x13, 0x01, 0x80, 0x00, "2" },
525
526 {0 , 0xfe, 0 , 2, "Service Mode" },
527 {0x14, 0x01, 0x80, 0x80, "Off" },
528 {0x14, 0x01, 0x80, 0x00, "On" },
529 };
530
531 STDDIPINFO(Timber)
532
533 static struct BurnDIPInfo WackoDIPList[]=
534 {
535 {0x13, 0xff, 0xff, 0x3f, NULL },
536 {0x14, 0xff, 0xff, 0x80, NULL },
537
538 {0 , 0xfe, 0 , 2, "Cabinet" },
539 {0x13, 0x01, 0x40, 0x00, "Upright" },
540 {0x13, 0x01, 0x40, 0x40, "Cocktail" },
541
542 {0 , 0xfe, 0 , 2, "Coin Meters" },
543 {0x13, 0x01, 0x80, 0x80, "1" },
544 {0x13, 0x01, 0x80, 0x00, "2" },
545
546 {0 , 0xfe, 0 , 2, "Service Mode" },
547 {0x14, 0x01, 0x80, 0x80, "Off" },
548 {0x14, 0x01, 0x80, 0x00, "On" },
549 };
550
551 STDDIPINFO(Wacko)
552
553 static struct BurnDIPInfo JourneyDIPList[]=
554 {
555 {0x11, 0xff, 0xff, 0xfd, NULL },
556 {0x12, 0xff, 0xff, 0x80, NULL },
557
558 {0 , 0xfe, 0 , 2, "Coin Meters" },
559 {0x11, 0x01, 0x01, 0x01, "1" },
560 {0x11, 0x01, 0x01, 0x00, "2" },
561
562 {0 , 0xfe, 0 , 2, "Cabinet" },
563 {0x11, 0x01, 0x02, 0x00, "Upright" },
564 {0x11, 0x01, 0x02, 0x02, "Cocktail" },
565
566 {0 , 0xfe, 0 , 2, "Service Mode" },
567 {0x12, 0x01, 0x80, 0x80, "Off" },
568 {0x12, 0x01, 0x80, 0x00, "On" },
569 };
570
571 STDDIPINFO(Journey)
572
573 static struct BurnDIPInfo DominoDIPList[]=
574 {
575 {0x11, 0xff, 0xff, 0x3e, NULL },
576 {0x12, 0xff, 0xff, 0x80, NULL },
577
578 {0 , 0xfe, 0 , 2, "Music" },
579 {0x11, 0x01, 0x01, 0x01, "Off" },
580 {0x11, 0x01, 0x01, 0x00, "On" },
581
582 {0 , 0xfe, 0 , 2, "Skin Color" },
583 {0x11, 0x01, 0x02, 0x02, "Light" },
584 {0x11, 0x01, 0x02, 0x00, "Dark" },
585
586 {0 , 0xfe, 0 , 2, "Cabinet" },
587 {0x11, 0x01, 0x40, 0x00, "Upright" },
588 {0x11, 0x01, 0x40, 0x40, "Cocktail" },
589
590 {0 , 0xfe, 0 , 2, "Coin Meters" },
591 {0x11, 0x01, 0x80, 0x80, "1" },
592 {0x11, 0x01, 0x80, 0x00, "2" },
593
594 {0 , 0xfe, 0 , 2, "Service Mode" },
595 {0x12, 0x01, 0x80, 0x80, "Off" },
596 {0x12, 0x01, 0x80, 0x00, "On" },
597 };
598
599 STDDIPINFO(Domino)
600
601 static struct BurnDIPInfo TronDIPList[]=
602 {
603 {0x13, 0xff, 0xff, 0x80, NULL },
604 {0x14, 0xff, 0xff, 0x80, NULL },
605
606 {0 , 0xfe, 0 , 2, "Coin Meters" },
607 {0x13, 0x01, 0x01, 0x01, "1" },
608 {0x13, 0x01, 0x01, 0x00, "2" },
609
610 {0 , 0xfe, 0 , 2, "Cabinet" },
611 {0x13, 0x01, 0x02, 0x00, "Upright" },
612 {0x13, 0x01, 0x02, 0x02, "Cocktail" },
613
614 {0 , 0xfe, 0 , 2, "Allow Continue" },
615 {0x13, 0x01, 0x04, 0x04, "No" },
616 {0x13, 0x01, 0x04, 0x00, "Yes" },
617
618 {0 , 0xfe, 0 , 2, "Service Mode" },
619 {0x14, 0x01, 0x80, 0x80, "Off" },
620 {0x14, 0x01, 0x80, 0x00, "On" },
621 };
622
623 STDDIPINFO(Tron)
624
625 static struct BurnDIPInfo KroozrDIPList[]=
626 {
627 {0x0c, 0xff, 0xff, 0xbf, NULL },
628 {0x0d, 0xff, 0xff, 0x80, NULL },
629
630 {0 , 0xfe, 0 , 2, "Cabinet" },
631 {0x0c, 0x01, 0x40, 0x00, "Upright" },
632 {0x0c, 0x01, 0x40, 0x40, "Cocktail" },
633
634 {0 , 0xfe, 0 , 2, "Service Mode" },
635 {0x0d, 0x01, 0x80, 0x80, "Off" },
636 {0x0d, 0x01, 0x80, 0x00, "On" },
637 };
638
639 STDDIPINFO(Kroozr)
640
641 static struct BurnDIPInfo SolarfoxDIPList[]=
642 {
643 {0x11, 0xff, 0xff, 0xef, NULL },
644 {0x12, 0xff, 0xff, 0x80, NULL },
645
646 {0 , 0xfe, 0 , 3, "Bonus" },
647 {0x11, 0x01, 0x03, 0x02, "None" },
648 {0x11, 0x01, 0x03, 0x03, "After 10 racks" },
649 {0x11, 0x01, 0x03, 0x01, "After 20 racks" },
650
651 {0 , 0xfe, 0 , 2, "Demo Sounds" },
652 {0x11, 0x01, 0x10, 0x10, "Off" },
653 {0x11, 0x01, 0x10, 0x00, "On" },
654
655 {0 , 0xfe, 0 , 2, "Ignore Hardware Failure" },
656 {0x11, 0x01, 0x40, 0x40, "Off" },
657 {0x11, 0x01, 0x40, 0x00, "On" },
658
659 {0 , 0xfe, 0 , 2, "Cabinet" },
660 {0x11, 0x01, 0x80, 0x80, "Upright" },
661 {0x11, 0x01, 0x80, 0x00, "Cocktail" },
662
663 {0 , 0xfe, 0 , 2, "Service Mode" },
664 {0x12, 0x01, 0x80, 0x80, "Off" },
665 {0x12, 0x01, 0x80, 0x00, "On" },
666 };
667
668 STDDIPINFO(Solarfox)
669
670 static struct BurnDIPInfo KickDIPList[]=
671 {
672 {0x09, 0xff, 0xff, 0xfe, NULL },
673 {0x0a, 0xff, 0xff, 0x80, NULL },
674
675 {0 , 0xfe, 0 , 2, "Music" },
676 {0x09, 0x01, 0x01, 0x01, "Off" },
677 {0x09, 0x01, 0x01, 0x00, "On" },
678
679 {0 , 0xfe, 0 , 2, "Service Mode" },
680 {0x0a, 0x01, 0x80, 0x80, "Off" },
681 {0x0a, 0x01, 0x80, 0x00, "On" },
682 };
683
684 STDDIPINFO(Kick)
685
686 static struct BurnDIPInfo TapperDIPList[]=
687 {
688 {0x11, 0xff, 0xff, 0xfb, NULL },
689 {0x12, 0xff, 0xff, 0x80, NULL },
690
691 {0 , 0xfe, 0 , 2, "Demo Sounds" },
692 {0x11, 0x01, 0x04, 0x04, "Off" },
693 {0x11, 0x01, 0x04, 0x00, "On" },
694
695 {0 , 0xfe, 0 , 2, "Cabinet" },
696 {0x11, 0x01, 0x40, 0x40, "Upright" },
697 {0x11, 0x01, 0x40, 0x00, "Cocktail" },
698
699 {0 , 0xfe, 0 , 2, "Coin Meters" },
700 {0x11, 0x01, 0x80, 0x80, "1" },
701 {0x11, 0x01, 0x80, 0x00, "2" },
702
703 {0 , 0xfe, 0 , 2, "Service Mode" },
704 {0x12, 0x01, 0x80, 0x80, "Off" },
705 {0x12, 0x01, 0x80, 0x00, "On" },
706 };
707
708 STDDIPINFO(Tapper)
709
710 static struct BurnDIPInfo ShollowDIPList[]=
711 {
712 {0x0f, 0xff, 0xff, 0xfd, NULL },
713 {0x10, 0xff, 0xff, 0x80, NULL },
714
715 {0 , 0xfe, 0 , 2, "Coin Meters" },
716 {0x0f, 0x01, 0x01, 0x01, "1" },
717 {0x0f, 0x01, 0x01, 0x00, "2" },
718
719 {0 , 0xfe, 0 , 2, "Cabinet" },
720 {0x0f, 0x01, 0x02, 0x00, "Upright" },
721 {0x0f, 0x01, 0x02, 0x02, "Cocktail" },
722
723 {0 , 0xfe, 0 , 2, "Service Mode" },
724 {0x10, 0x01, 0x80, 0x80, "Off" },
725 {0x10, 0x01, 0x80, 0x00, "On" },
726 };
727
STDDIPINFO(Shollow)728 STDDIPINFO(Shollow)
729
730 static void __fastcall mcr_90009_write(UINT16 address, UINT8 data)
731 {
732 if (address >= 0xf400 && address <= 0xfbff) {
733 INT32 select = (address >> 8) & 8;
734 address = address & 0x1f;
735 DrvPalRAM16[address] &= ~(0xff << select);
736 DrvPalRAM16[address] |= data << select;
737 return;
738 }
739 }
740
mcr_90010_write(UINT16 address,UINT8 data)741 static void __fastcall mcr_90010_write(UINT16 address, UINT8 data)
742 {
743 if ((address & 0xe800) == 0xe800) {
744 DrvVidRAM[address & 0x7ff] = data;
745
746 if ((address & 0xef80) == 0xef80) {
747 address &= 0x7f;
748 DrvPalRAM16[address/2] = data | ((address & 1) << 8);
749 }
750 return;
751 }
752 }
753
mcr_91490_write(UINT16 address,UINT8 data)754 static void __fastcall mcr_91490_write(UINT16 address, UINT8 data)
755 {
756 if ((address & 0xf800) == 0xf800) {
757 address &= 0x7f;
758 DrvPalRAM16[address/2] = data | ((address & 1) << 8);
759 return;
760 }
761 }
762
twotiger_vidram_write(UINT16 address,UINT8 data)763 static void __fastcall twotiger_vidram_write(UINT16 address, UINT8 data)
764 {
765 if ((address & 0xe800) == 0xe800) {
766 INT32 offs = ((address & 0x3ff) << 1) | ((address & 0x400) >> 10);
767 DrvVidRAM[offs] = data;
768
769 if ((offs & 0x780) == 0x780) {
770 DrvPalRAM16[((address & 0x400) >> 5) | ((address >> 1) & 0x1f)] = data | ((address & 1) << 8);
771 return;
772 }
773 }
774 }
775
twotiger_vidram_read(UINT16 address)776 static UINT8 __fastcall twotiger_vidram_read(UINT16 address)
777 {
778 if ((address & 0xe800) == 0xe800) {
779 INT32 offs = ((address & 0x3ff) << 1) | ((address & 0x400) >> 10);
780 return DrvVidRAM[offs];
781 }
782
783 return 0;
784 }
785
mcr_write_port(UINT16 address,UINT8 data)786 static void __fastcall mcr_write_port(UINT16 address, UINT8 data)
787 {
788 switch (address & 0xff)
789 {
790 case 0x00:
791 case 0x01:
792 case 0x02:
793 case 0x03:
794 flipscreen = (data >> 6) & 1;
795 // coin cointers..
796 break; // use ssio_write_ports (below)
797
798 case 0xe0:
799 BurnWatchdogWrite();
800 return;
801
802 case 0xe8:
803 return; // nop
804
805 case 0xf0:
806 case 0xf1:
807 case 0xf2:
808 case 0xf3:
809 z80ctc_write(address & 3, data);
810 return;
811 }
812
813 ssio_write_ports(address, data);
814 }
815
mcr_read_port(UINT16 address)816 static UINT8 __fastcall mcr_read_port(UINT16 address)
817 {
818 switch (address & 0xff)
819 {
820 case 0xf0:
821 case 0xf1:
822 case 0xf2:
823 case 0xf3:
824 return z80ctc_read(address & 3);
825 }
826
827 return ssio_read_ports(address);
828 }
829
solarfox_ip0_read(UINT8)830 static UINT8 solarfox_ip0_read(UINT8)
831 {
832 return DrvInputs[0]; // wrong! (hint: mux)
833 }
834
solarfox_ip1_read(UINT8)835 static UINT8 solarfox_ip1_read(UINT8)
836 {
837 return DrvInputs[1]; // wrong!
838 }
839
solarfox_op0_write(UINT8,UINT8 data)840 static void solarfox_op0_write(UINT8 , UINT8 data)
841 {
842 flipscreen = (data >> 6) & 1;
843 }
844
kroozr_ip1_read(UINT8)845 static UINT8 kroozr_ip1_read(UINT8)
846 {
847 UINT8 tb = BurnTrackballRead(0, 0);
848 BurnTrackballUpdate(0);
849 return ((tb & 0x80) >> 1) | ((tb & 0x70) >> 4);
850 }
851
kick_ip1_read(UINT8)852 static UINT8 kick_ip1_read(UINT8)
853 {
854 UINT8 tb = (BurnTrackballRead(0, 0) ) & 0x0f;
855 BurnTrackballUpdate(0);
856
857 return tb;
858 }
859
tilemap_callback(bg90009)860 static tilemap_callback( bg90009 )
861 {
862 TILE_SET_INFO(0, DrvVidRAM[offs], 0, TILE_GROUP(1));
863 }
864
tilemap_callback(bg90010)865 static tilemap_callback( bg90010 )
866 {
867 INT32 attr = DrvVidRAM[offs * 2 + 1];
868 INT32 code = DrvVidRAM[offs * 2 + 0] | (attr * 256);
869
870 TILE_SET_INFO(0, code, attr >> 3, TILE_FLIPYX(attr >> 1) | TILE_GROUP(attr >> 6));
871 }
872
tilemap_callback(bg91490)873 static tilemap_callback( bg91490 )
874 {
875 INT32 attr = DrvVidRAM[offs * 2 + 1];
876 INT32 code = DrvVidRAM[offs * 2 + 0] | (attr * 256);
877
878 TILE_SET_INFO(0, code, attr >> 4, TILE_FLIPYX(attr >> 2) | TILE_GROUP(attr >> 6));
879 }
880
ctc_interrupt(INT32 state)881 static void ctc_interrupt(INT32 state)
882 {
883 ZetSetIRQLine(0, state ? CPU_IRQSTATUS_ACK : CPU_IRQSTATUS_NONE);
884 }
885
ctc_trigger(INT32,UINT8 data)886 static void ctc_trigger(INT32 , UINT8 data)
887 {
888 z80ctc_trg_write(1, data);
889 }
890
DrvDoReset(INT32 clear_mem)891 static INT32 DrvDoReset(INT32 clear_mem)
892 {
893 if (clear_mem) {
894 memset (AllRam, 0x00, RamEnd - AllRam);
895 }
896
897 ZetOpen(0);
898 ZetReset();
899 ZetClose();
900
901 BurnSampleReset();
902 ssio_reset();
903 if (has_squak) midsat_reset();
904 tcs_reset();
905
906 flipscreen = 0;
907
908 return 0;
909 }
910
MemIndex()911 static INT32 MemIndex()
912 {
913 UINT8 *Next; Next = AllMem;
914
915 DrvZ80ROM1 = Next; Next += 0x010000;
916 DrvZ80ROM0 = Next; Next += 0x010000;
917 DrvTCSROM = Next; Next += 0x010000;
918
919 DrvGfxROM0 = Next; Next += nGraphicsLen0 * 2 * 2 * 2;
920 DrvGfxROM1 = Next; Next += nGraphicsLen1 * 2;
921
922 DrvSndPROM = Next; Next += 0x0000200;
923
924 DrvPalette = (UINT32*)Next; Next += 0x80 * sizeof(UINT32);
925
926 DrvNVRAM = Next; Next += 0x000800; // this is work-ram and nvram (HS, service mode options)
927
928 AllRam = Next;
929
930 DrvSprRAM = Next; Next += 0x000200;
931 DrvVidRAM = Next; Next += 0x000800;
932 DrvZ80RAM1 = Next; Next += 0x001000; // 0x400 ssio, 0x1000 tcs
933 DrvPalRAM16 = (UINT16*)Next; Next += 0x40 * sizeof(UINT16);
934
935 RamEnd = Next;
936
937 MemEnd = Next;
938
939 return 0;
940 }
941
DrvGfxDecode()942 static INT32 DrvGfxDecode()
943 {
944 INT32 Plane0[4] = { ((nGraphicsLen0/2)*8)+0, ((nGraphicsLen0/2)*8)+1, 0, 1 };
945 INT32 XOffs0[8] = { STEP8(0,2) };
946 INT32 YOffs0[8] = { STEP8(0,16) };
947
948 INT32 L = (nGraphicsLen1 / 4) * 8;
949 INT32 Plane1[4] = { STEP4(0,1) };
950 INT32 XOffs1[32] = {
951 L*0+0, L*0+4, L*1+0, L*1+4, L*2+0, L*2+4, L*3+0, L*3+4,
952 L*0+0+8, L*0+4+8, L*1+0+8, L*1+4+8, L*2+0+8, L*2+4+8, L*3+0+8, L*3+4+8,
953 L*0+0+16, L*0+4+16, L*1+0+16, L*1+4+16, L*2+0+16, L*2+4+16, L*3+0+16, L*3+4+16,
954 L*0+0+24, L*0+4+24, L*1+0+24, L*1+4+24, L*2+0+24, L*2+4+24, L*3+0+24, L*3+4+24
955 };
956 INT32 YOffs1[32] = { STEP32(0,32) };
957
958 UINT8 *tmp = (UINT8*)BurnMalloc((nGraphicsLen1 > nGraphicsLen0) ? nGraphicsLen1 : nGraphicsLen0);
959 if (tmp == NULL) {
960 return 1;
961 }
962
963 GfxDecode((nGraphicsLen0 * 2) / (8 * 8), 4, 8, 8, Plane0, XOffs0, YOffs0, 0x080, DrvGfxROM0, tmp);
964
965 for (INT32 i = 0; i < nGraphicsLen0*2; i+=0x40) { // 2x size and invert pixel
966 for (INT32 y = 0; y < 16; y++) {
967 for (INT32 x = 0; x < 16; x++) {
968 DrvGfxROM0[(i * 4) + (y * 16) + x] = tmp[i + ((y / 2) * 8) + (x / 2)];
969 }
970 }
971 }
972
973 memcpy (tmp, DrvGfxROM1, nGraphicsLen1);
974
975 GfxDecode((nGraphicsLen1 * 2) / (32 * 32), 4, 32, 32, Plane1, XOffs1, YOffs1, 0x400, tmp, DrvGfxROM1);
976
977 BurnFree(tmp);
978
979 return 0;
980 }
981
map_90009()982 static void map_90009()
983 {
984 ZetMapMemory(DrvZ80ROM0, 0x0000, 0x6fff, MAP_ROM);
985 ZetMapMemory(DrvNVRAM, 0x7000, 0x77ff, MAP_RAM);
986 ZetMapMemory(DrvNVRAM, 0x7800, 0x7fff, MAP_RAM);
987 ZetMapMemory(DrvSprRAM, 0xf000, 0xf1ff, MAP_RAM);
988 ZetMapMemory(DrvSprRAM, 0xf200, 0xf3ff, MAP_RAM);
989 ZetMapMemory(DrvVidRAM, 0xfc00, 0xffff, MAP_RAM);
990 ZetSetWriteHandler(mcr_90009_write);
991 ZetSetOutHandler(mcr_write_port);
992 ZetSetInHandler(mcr_read_port);
993
994 nMainClock = 2496000;
995 }
996
mcr_read_unmapped(UINT16 address)997 static UINT8 __fastcall mcr_read_unmapped(UINT16 address)
998 {
999 return 0xff;
1000 }
1001
map_90010()1002 static void map_90010()
1003 {
1004 ZetMapMemory(DrvZ80ROM0, 0x0000, 0xbfff, MAP_ROM);
1005 for (INT32 i = 0; i < 0x2000; i+=0x0800) {
1006 ZetMapMemory(DrvNVRAM, 0xc000 + i + 0, 0xc7ff + i + 0, MAP_RAM);
1007 }
1008 for (INT32 i = 0; i < 0x2000; i+=0x1000) {
1009 for (INT32 j = 0; j < 0x800; j+= 0x200) {
1010 ZetMapMemory(DrvSprRAM, 0xe000 + i + j, 0xe1ff + i + j, MAP_RAM);
1011 }
1012 ZetMapMemory(DrvVidRAM, 0xe800 + i + 0, 0xefff + i + 0, MAP_ROM);
1013 }
1014 ZetSetWriteHandler(mcr_90010_write);
1015 ZetSetReadHandler(mcr_read_unmapped);
1016 ZetSetOutHandler(mcr_write_port);
1017 ZetSetInHandler(mcr_read_port);
1018
1019 nMainClock = 2496000;
1020 }
1021
map_91490()1022 static void map_91490()
1023 {
1024 ZetMapMemory(DrvZ80ROM0, 0x0000, 0xdfff, MAP_ROM);
1025 ZetMapMemory(DrvNVRAM, 0xe000, 0xe7ff, MAP_RAM);
1026 ZetMapMemory(DrvSprRAM, 0xe800, 0xe9ff, MAP_RAM);
1027 ZetMapMemory(DrvSprRAM, 0xea00, 0xebff, MAP_RAM);
1028 ZetMapMemory(DrvVidRAM, 0xf000, 0xf7ff, MAP_RAM);
1029 ZetSetWriteHandler(mcr_91490_write);
1030 ZetSetReadHandler(mcr_read_unmapped);
1031 ZetSetOutHandler(mcr_write_port);
1032 ZetSetInHandler(mcr_read_port);
1033
1034 nMainClock = 5000000;
1035 }
1036
DrvLoadRoms(bool bLoad)1037 static INT32 DrvLoadRoms(bool bLoad)
1038 {
1039 char* pRomName;
1040 struct BurnRomInfo ri;
1041 UINT8 *pLoad[3] = { DrvZ80ROM0, DrvZ80ROM1, DrvTCSROM };
1042 UINT8 *gLoad[2] = { DrvGfxROM0, DrvGfxROM1 };
1043
1044 for (INT32 i = 0; !BurnDrvGetRomName(&pRomName, i, 0); i++)
1045 {
1046 BurnDrvGetRomInfo(&ri, i);
1047
1048 if ((ri.nType & BRF_PRG) && ((ri.nType & 7) == 1 || (ri.nType & 7) == 2 || (ri.nType & 7) == 3)) {
1049 INT32 type = (ri.nType - 1) & 3;
1050 //bprintf(0, _T("loading %S, type %d\n"), pRomName, type);
1051 if (bLoad) if (BurnLoadRom(pLoad[type], i, 1)) return 1;
1052 pLoad[type] += ri.nLen;
1053 continue;
1054 }
1055
1056 if ((ri.nType & BRF_GRA) && ((ri.nType & 7) == 3 || (ri.nType & 7) == 4)) {
1057 INT32 type = (ri.nType - 3) & 1;
1058 if (bLoad) if (BurnLoadRom(gLoad[type], i, 1)) return 1;
1059 gLoad[type] += ri.nLen;
1060 continue;
1061 }
1062 }
1063
1064 INT32 prg0 = pLoad[0] - DrvZ80ROM0;
1065 INT32 prg1 = pLoad[1] - DrvZ80ROM1;
1066 INT32 prg2 = pLoad[2] - DrvTCSROM;
1067 nGraphicsLen0 = gLoad[0] - DrvGfxROM0;
1068 nGraphicsLen1 = gLoad[1] - DrvGfxROM1;
1069 if (bLoad) {
1070 bprintf (0, _T("PRG0: %x, PRG1: %x, GFX0: %x, GFX1: %x, PRG2: %x\n"), prg0, prg1, nGraphicsLen0, nGraphicsLen1, prg2);
1071 }
1072 if (nGraphicsLen1 & 0x20) nGraphicsLen1 -= 0x20; // wtfff???
1073
1074 has_ssio = (prg1) ? 1 : 0;
1075
1076 return 0;
1077 }
1078
DrvInit(INT32 cpu_board)1079 static INT32 DrvInit(INT32 cpu_board)
1080 {
1081 BurnSetRefreshRate(30.00);
1082
1083 DrvZ80ROM0 = DrvZ80ROM1 = DrvTCSROM = 0;
1084 DrvGfxROM0 = DrvGfxROM1 = 0;
1085
1086 DrvLoadRoms(false);
1087
1088 AllMem = NULL;
1089 MemIndex();
1090 INT32 nLen = MemEnd - (UINT8 *)0;
1091 if ((AllMem = (UINT8 *)BurnMalloc(nLen)) == NULL) return 1;
1092 memset(AllMem, 0, nLen);
1093 MemIndex();
1094
1095 memset (DrvNVRAM, 0xff, 0x800);
1096
1097 if (DrvLoadRoms(true)) return 1;
1098
1099 if (BurnLoadRom(DrvSndPROM, 0x80, 1)) return 1; // load sound prom!
1100
1101 DrvGfxDecode();
1102
1103 GenericTilesInit();
1104 GenericTilemapSetGfx(0, DrvGfxROM0, 4, 16, 16, nGraphicsLen0 * 8, 0, 3);
1105
1106 ZetInit(0);
1107 ZetOpen(0);
1108
1109 ZetDaisyInit(Z80_CTC, 0);
1110 z80ctc_init(nMainClock, 0, ctc_interrupt, ctc_trigger, NULL, NULL);
1111
1112 switch (cpu_board)
1113 {
1114 case 90009:
1115 map_90009();
1116 GenericTilemapInit(0, TILEMAP_SCAN_ROWS, bg90009_map_callback, 16, 16, 32, 30);
1117 sprite_config = 0x000000;
1118 break;
1119
1120 case 90010:
1121 map_90010();
1122 GenericTilemapInit(0, TILEMAP_SCAN_ROWS, bg90010_map_callback, 16, 16, 32, 30);
1123 sprite_config = 0x000000;
1124 break;
1125
1126 case 91490: // tapper
1127 map_91490();
1128 GenericTilemapInit(0, TILEMAP_SCAN_ROWS, bg91490_map_callback, 16, 16, 32, 30);
1129 sprite_config = 0x003000;
1130 break;
1131
1132 case 91475: // journey
1133 map_90010();
1134 GenericTilemapInit(0, TILEMAP_SCAN_ROWS, bg90010_map_callback, 16, 16, 32, 30);
1135 sprite_config = 0x003040;
1136 break;
1137
1138 default: bprintf (0, _T("No map selected!!\n"));
1139 }
1140
1141 ZetClose();
1142
1143 BurnSampleInit(1);
1144 BurnSampleSetAllRoutesAllSamples(0.80, BURN_SND_ROUTE_BOTH);
1145
1146 ssio_init(DrvZ80ROM1, DrvZ80RAM1, DrvSndPROM);
1147
1148 if (has_squak) {
1149 bprintf(0, _T("Has squak n talk or tcs.\n"));
1150 midsat_init(DrvTCSROM);
1151 }
1152
1153 BurnWatchdogInit(DrvDoReset, 1180);
1154
1155 BurnTrackballInit(2); // kick
1156
1157 DrvDoReset(1);
1158
1159 return 0;
1160 }
1161
DrvExit()1162 static INT32 DrvExit()
1163 {
1164 GenericTilesExit();
1165 ZetExit();
1166 ssio_exit();
1167
1168 if (has_squak) midsat_exit();
1169 tcs_exit();
1170
1171 BurnSampleExit();
1172
1173 BurnTrackballExit();
1174
1175 BurnFree(AllMem);
1176
1177 nScreenFlip = 0;
1178 sprite_config = 0;
1179
1180 input_playernum = 0;
1181
1182 has_dial = 0;
1183
1184 is_kroozr = 0;
1185 is_wacko = 0;
1186 is_twotiger = 0;
1187 is_dotron = 0;
1188 is_demoderb = 0;
1189
1190 return 0;
1191 }
1192
DrvPaletteUpdate(INT32 type)1193 static void DrvPaletteUpdate(INT32 type)
1194 {
1195 if (type == 0)
1196 {
1197 for (INT32 i = 0; i < BurnDrvGetPaletteEntries(); i++)
1198 {
1199 UINT8 r = pal4bit((DrvPalRAM16[i] >> 8) & 0xf);
1200 UINT8 g = pal4bit(DrvPalRAM16[i] & 0xf);
1201 UINT8 b = pal4bit((DrvPalRAM16[i] >> 4)&0xf);
1202
1203 DrvPalette[i] = BurnHighCol(r,g,b,0);
1204 }
1205 }
1206 else if (type == 1)
1207 {
1208 for (INT32 i = 0; i < BurnDrvGetPaletteEntries(); i++)
1209 {
1210 UINT8 r = pal3bit((DrvPalRAM16[i] >> 6) & 7);
1211 UINT8 g = pal3bit(DrvPalRAM16[i] & 7);
1212 UINT8 b = pal3bit((DrvPalRAM16[i] >> 3) & 7);
1213
1214 DrvPalette[i] = BurnHighCol(r,g,b,0);
1215 }
1216 }
1217 else if (type == 2) // journey
1218 {
1219 for (INT32 i = 0; i < BurnDrvGetPaletteEntries()/2; i++)
1220 {
1221 UINT8 r = (DrvPalRAM16[i] >> 6) & 7;
1222 UINT8 g = (DrvPalRAM16[i] >> 0) & 7;
1223 UINT8 b = (DrvPalRAM16[i] >> 3) & 7;
1224
1225 r = (r << 5) | (r << 1);
1226 g = (g << 5) | (g << 1);
1227 b = (b << 5) | (b << 1);
1228
1229 DrvPalette[i] = BurnHighCol(r,g,b,0);
1230
1231 if ((i & 0x31) == 0x31)
1232 {
1233 r |= 0x11;
1234 g |= 0x11;
1235 b |= 0x11;
1236 }
1237
1238 DrvPalette[i + 0x40] = BurnHighCol(r,g,b,0);
1239 }
1240 }
1241 }
1242
render_sprites_91399()1243 static void render_sprites_91399()
1244 {
1245 for (INT32 offs = 0; offs < 0x200; offs += 4)
1246 {
1247 INT32 code = DrvSprRAM[offs + 1] & 0x3f;
1248 INT32 hflip = (DrvSprRAM[offs + 1] & 0x40) ? 31 : 0;
1249 INT32 vflip = (DrvSprRAM[offs + 1] & 0x80) ? 31 : 0;
1250 INT32 sx = (DrvSprRAM[offs + 2] - 4) * 2;
1251 INT32 sy = (240 - DrvSprRAM[offs]) * 2;
1252
1253 /* apply cocktail mode */
1254 if (flipscreen)
1255 {
1256 hflip ^= 31;
1257 vflip ^= 31;
1258 sx = 466 - sx; // + m_mcr12_sprite_xoffs_flip;
1259 sy = 450 - sy;
1260 }
1261 else
1262 sx += 0; //m_mcr12_sprite_xoffs;
1263
1264 if (nScreenFlip & TMAP_FLIPY) {
1265 vflip ^= 31;
1266 sy = 450 - sy;
1267 }
1268 if (nScreenFlip & TMAP_FLIPX) {
1269 hflip ^= 31;
1270 sx = 466 - sx;
1271 }
1272
1273 sx &= 0x1ff;
1274 sy &= 0x1ff;
1275
1276 for (int y = 0; y < 32; y++, sy = (sy + 1) & 0x1ff)
1277 {
1278 if (sy >= 0 && sy < nScreenHeight)
1279 {
1280 const UINT8 *src = DrvGfxROM1 + (code * 0x400) + 32 * (y ^ vflip);
1281 UINT16 *dst = pTransDraw + (sy * nScreenWidth);
1282 UINT8 *pri = pPrioDraw + (sy * nScreenWidth);
1283
1284 for (INT32 x = 0; x < 32; x++)
1285 {
1286 INT32 tx = (sx + x) & 0x1ff;
1287 if (tx >= nScreenWidth) continue;
1288 INT32 pix = pri[tx] | src[x ^ hflip];
1289
1290 pri[tx] = pix;
1291
1292 if (pix & 0x07)
1293 dst[tx] = pix;
1294 }
1295 }
1296 }
1297 }
1298 }
1299
render_sprites_91464(int primask,int sprmask,int colormask)1300 static void render_sprites_91464(int primask, int sprmask, int colormask)
1301 {
1302 INT32 codemask = (nGraphicsLen1 * 2) / (32 * 32);
1303
1304 for (int offs = 0x200 - 4; offs >= 0; offs -= 4)
1305 {
1306 /* extract the bits of information */
1307 int code = (DrvSprRAM[offs + 2] + 256 * ((DrvSprRAM[offs + 1] >> 3) & 0x01)) % codemask;
1308 int color = (((~DrvSprRAM[offs + 1] & 3) << 4) & sprmask) | colormask;
1309 int hflip = (DrvSprRAM[offs + 1] & 0x10) ? 31 : 0;
1310 int vflip = (DrvSprRAM[offs + 1] & 0x20) ? 31 : 0;
1311 int sx = (DrvSprRAM[offs + 3] - 3) * 2;
1312 int sy = (241 - DrvSprRAM[offs]) * 2;
1313
1314 /* apply cocktail mode */
1315 if (flipscreen)
1316 {
1317 hflip ^= 31;
1318 vflip ^= 31;
1319 sx = 480 - sx;
1320 sy = 452 - sy;
1321 }
1322
1323 if (nScreenFlip & TMAP_FLIPY) {
1324 vflip ^= 31;
1325 sy = 452 - sy;
1326 }
1327 if (nScreenFlip & TMAP_FLIPX) {
1328 hflip ^= 31;
1329 sx = 480 - sx;
1330 }
1331
1332 /* clamp within 512 */
1333 sx &= 0x1ff;
1334 sy &= 0x1ff;
1335
1336 /* loop over lines in the sprite */
1337 for (int y = 0; y < 32; y++, sy = (sy + 1) & 0x1ff)
1338 {
1339 if (sy >= 2 && sy >= 0 && sy < nScreenHeight)
1340 {
1341 const UINT8 *src = DrvGfxROM1 + (code * 0x400) + 32 * (y ^ vflip);
1342 UINT16 *dst = pTransDraw + (sy * nScreenWidth);
1343 UINT8 *pri = pPrioDraw + (sy * nScreenWidth);
1344
1345 /* loop over columns */
1346 for (int x = 0; x < 32; x++)
1347 {
1348 int tx = (sx + x) & 0x1ff;
1349 if (tx >= nScreenWidth) continue;
1350
1351 int pix = pri[tx];
1352 if (pix != 0xff)
1353 {
1354 /* compute the final value */
1355 pix = (pix & primask) | color | src[x ^ hflip];
1356
1357 /* if non-zero, draw */
1358 if (pix & 0x0f)
1359 {
1360 /* mark this pixel so we don't draw there again */
1361 pri[tx] = 0xff;
1362
1363 /* only draw if the low 3 bits are set */
1364 if (pix & 0x07)
1365 dst[tx] = pix;
1366 }
1367 }
1368 }
1369 }
1370 }
1371 }
1372 }
1373
DrvDraw()1374 static INT32 DrvDraw()
1375 {
1376 //if (DrvRecalc) {
1377 DrvPaletteUpdate(BurnDrvGetPaletteEntries()/0x40);
1378 DrvRecalc = 1;
1379 //}
1380
1381 GenericTilemapSetFlip(0, (flipscreen ? (TMAP_FLIPX | TMAP_FLIPY) : 0) ^ nScreenFlip);
1382
1383 BurnTransferClear();
1384
1385 if (nBurnLayer & 1) GenericTilemapDraw(0, pTransDraw, 0x00 | TMAP_SET_GROUP(0));
1386 if (nBurnLayer & 2) GenericTilemapDraw(0, pTransDraw, 0x10 | TMAP_SET_GROUP(1));
1387 if (nBurnLayer & 4) GenericTilemapDraw(0, pTransDraw, 0x20 | TMAP_SET_GROUP(2));
1388 if (nBurnLayer & 8) GenericTilemapDraw(0, pTransDraw, 0x30 | TMAP_SET_GROUP(3));
1389
1390 if (sprite_config == 0)
1391 {
1392 if (nSpriteEnable & 1) render_sprites_91399();
1393 }
1394 else
1395 {
1396 if (nSpriteEnable & 1) render_sprites_91464((sprite_config >> 16) & 0xff, (sprite_config >> 8) & 0xff, sprite_config & 0xff);
1397 }
1398
1399 BurnTransferCopy(DrvPalette);
1400
1401 return 0;
1402 }
1403
mcr_interrupt(INT32 scanline)1404 static void mcr_interrupt(INT32 scanline)
1405 {
1406 if (scanline == 0 || scanline == 240)
1407 {
1408 z80ctc_trg_write(2, 1);
1409 z80ctc_trg_write(2, 0);
1410 }
1411 if (scanline == 0)
1412 {
1413 z80ctc_trg_write(3, 1);
1414 z80ctc_trg_write(3, 0);
1415 }
1416 }
1417
DrvFrame()1418 static INT32 DrvFrame()
1419 {
1420 BurnWatchdogUpdate();
1421
1422 if (DrvReset) {
1423 DrvDoReset(1);
1424 }
1425
1426 ZetNewFrame();
1427 if (has_squak) midsatNewFrame();
1428 INT32 has_tcs = tcs_initialized();
1429 if (has_tcs) M6809NewFrame();
1430
1431 {
1432 memset (DrvInputs, 0xff, 6);
1433
1434 for (INT32 i = 0; i < 8; i++) {
1435 DrvInputs[0] ^= (DrvJoy1[i] & 1) << i;
1436 DrvInputs[1] ^= (DrvJoy2[i] & 1) << i;
1437 DrvInputs[2] ^= (DrvJoy3[i] & 1) << i;
1438 DrvInputs[3] ^= (DrvJoy4[i] & 1) << i;
1439 DrvInputs[4] ^= (DrvJoy5[i] & 1) << i;
1440 DrvInputs[5] ^= (DrvJoy6[i] & 1) << i;
1441 }
1442
1443 ssio_inputs = DrvInputs;
1444
1445 DrvInputs[3] = (is_dotron) ? DrvDips[1] : DrvDips[0];
1446 if (is_demoderb) {
1447 DrvInputs[0] = (DrvInputs[0] & ~0x20) | (DrvDips[1] & 0x20); // service mode
1448 } else {
1449 DrvInputs[0] = (DrvInputs[0] & ~0x80) | (DrvDips[((is_dotron) ? 2 : 1)] & 0x80); // service mode
1450 }
1451 ssio_dips = 0xff; // always 0xff in every mcr game
1452
1453 {
1454 if (has_dial) { // kick, kroozr, tron, dotron
1455 BurnTrackballConfig(0, AXIS_REVERSED, AXIS_REVERSED);
1456 BurnTrackballFrame(0, DrvAnalogPortZ, DrvAnalogPort2, (is_dotron) ? 2 : 7, (is_dotron) ? 5 : 10);
1457 BurnTrackballUDLR(0, 0, 0, DrvJoy4f[0], DrvJoy4f[1]);
1458 BurnTrackballUpdate(0);
1459 }
1460
1461 if (is_demoderb) {
1462 BurnTrackballConfig(0, AXIS_NORMAL, AXIS_NORMAL);
1463 BurnTrackballFrame(0, DrvAnalogPortZ, DrvAnalogPort2, 2, 5);
1464 BurnTrackballUpdate(0);
1465
1466 BurnTrackballConfig(1, AXIS_NORMAL, AXIS_NORMAL);
1467 BurnTrackballFrame(1, DrvAnalogPortX, DrvAnalogPortY, 2, 5);
1468 BurnTrackballUpdate(1);
1469 }
1470
1471 if (is_dotron) { // dotron up/down "aim" analog
1472 UINT8 an = ProcessAnalog(DrvAnalogPortY, 0, INPUT_DEADZONE, 0x00, 0xff);
1473 if (an != 0x80) {
1474 DrvInputs[2] |= 0x30; // processing analog: ignore digital buttons
1475 if (an < 0x80) DrvInputs[2] &= ( 1 << 4 ); // down
1476 if (an > 0x80) DrvInputs[2] &= ( 1 << 5 ); // up
1477 }
1478 }
1479
1480 if (is_kroozr) {
1481 DrvInputs[2] = ProcessAnalog(DrvAnalogPortX, 0, INPUT_DEADZONE, 0x30, 0x98);
1482 DrvInputs[4] = ProcessAnalog(DrvAnalogPortY, 0, INPUT_DEADZONE, 0x30, 0x98);
1483 }
1484
1485 if (is_twotiger) {
1486 DrvInputs[2] = ProcessAnalog(DrvAnalogPortX, 0, INPUT_DEADZONE, 0x00, 0xce);
1487 DrvInputs[1] = ProcessAnalog(DrvAnalogPortY, 0, INPUT_DEADZONE, 0x00, 0xce);
1488 }
1489
1490 if (is_wacko) {
1491 BurnTrackballConfig(0, AXIS_NORMAL, AXIS_REVERSED);
1492 BurnTrackballFrame(0, DrvAnalogPortX, DrvAnalogPortY, 0x06, 0x0a);
1493 BurnTrackballUpdate(0);
1494
1495 BurnTrackballConfig(1, AXIS_NORMAL, AXIS_REVERSED);
1496 BurnTrackballFrame(1, DrvAnalogPort2, DrvAnalogPort3, 0x06, 0x0a);
1497 BurnTrackballUpdate(1);
1498 }
1499 }
1500 }
1501
1502 INT32 nInterleave = 480;
1503 INT32 nCyclesTotal[3] = { nMainClock / 30, 2000000 / 30, 3579545 / 4 / 30 };
1504 INT32 nCyclesDone[3] = { 0, 0, 0 };
1505 INT32 nSoundBufferPos = 0;
1506
1507 for (INT32 i = 0; i < nInterleave; i++)
1508 {
1509 ZetOpen(0);
1510 nCyclesDone[0] += ZetRun(((i + 1) * nCyclesTotal[0] / nInterleave) - nCyclesDone[0]);
1511 mcr_interrupt(i);
1512 ZetClose();
1513
1514 if (has_ssio)
1515 {
1516 ZetOpen(1);
1517 nCyclesDone[1] += ZetRun(((i + 1) * nCyclesTotal[1] / nInterleave) - nCyclesDone[1]);
1518 ssio_14024_clock(nInterleave);
1519 ZetClose();
1520 }
1521
1522 if (has_squak) {
1523 nCyclesDone[2] += midsat_run(((i + 1) * nCyclesTotal[2] / nInterleave) - nCyclesDone[2]);
1524 }
1525
1526 if (has_tcs) {
1527 M6809Open(0);
1528 if (tcs_reset_status())
1529 {
1530 nCyclesDone[1] += M6809Idle(((i + 1) * nCyclesTotal[1] / nInterleave) - nCyclesDone[1]);
1531 }
1532 else
1533 {
1534 nCyclesDone[1] += M6809Run(((i + 1) * nCyclesTotal[1] / nInterleave) - nCyclesDone[1]);
1535 }
1536 M6809Close();
1537 }
1538
1539 // Render Sound Segment
1540 if (pBurnSoundOut && (i%8)==7) {
1541 INT32 nSegmentLength = nBurnSoundLen / (nInterleave/8);
1542 INT16* pSoundBuf = pBurnSoundOut + (nSoundBufferPos << 1);
1543 AY8910Render(pSoundBuf, nSegmentLength);
1544 nSoundBufferPos += nSegmentLength;
1545 }
1546 }
1547
1548 // Make sure the buffer is entirely filled.
1549 if (pBurnSoundOut) {
1550 INT32 nSegmentLength = nBurnSoundLen - nSoundBufferPos;
1551 INT16* pSoundBuf = pBurnSoundOut + (nSoundBufferPos << 1);
1552 if (nSegmentLength) {
1553 AY8910Render(pSoundBuf, nSegmentLength);
1554 }
1555 BurnSampleRender(pBurnSoundOut, nBurnSoundLen);
1556 if (has_squak) {
1557 midsat_update(pBurnSoundOut, nBurnSoundLen);
1558 }
1559 if (has_tcs) {
1560 DACUpdate(pBurnSoundOut, nBurnSoundLen);
1561 }
1562 }
1563
1564 if (pBurnDraw) {
1565 BurnDrvRedraw();
1566 }
1567
1568 return 0;
1569 }
1570
DrvScan(INT32 nAction,INT32 * pnMin)1571 static INT32 DrvScan(INT32 nAction, INT32 *pnMin)
1572 {
1573 struct BurnArea ba;
1574
1575 if (pnMin) {
1576 *pnMin = 0x029702;
1577 }
1578
1579 if (nAction & ACB_VOLATILE) {
1580 memset(&ba, 0, sizeof(ba));
1581
1582 ba.Data = AllRam;
1583 ba.nLen = RamEnd - AllRam;
1584 ba.szName = "All Ram";
1585 BurnAcb(&ba);
1586
1587 ScanVar(DrvNVRAM, 0x800, "WORK RAM"); // also nv...
1588
1589 ZetScan(nAction);
1590
1591 ssio_scan(nAction, pnMin);
1592 if (has_squak) midsat_scan(nAction, pnMin);
1593 if (tcs_initialized()) tcs_scan(nAction, pnMin);
1594
1595 BurnSampleScan(nAction, pnMin);
1596
1597 BurnTrackballScan();
1598
1599 SCAN_VAR(input_playernum);
1600 }
1601
1602 if (nAction & ACB_NVRAM) {
1603 ScanVar(DrvNVRAM, 0x800, "NV RAM");
1604 }
1605
1606 return 0;
1607 }
1608
1609
1610
1611 static struct BurnRomInfo emptyRomDesc[] = {
1612 { "", 0, 0, 0 },
1613 };
1614
1615 static struct BurnRomInfo SsiopromRomDesc[] = {
1616 #if !defined (ROM_VERIFY)
1617 { "82s123.12d", 0x0020, 0xe1281ee9, 0 | BRF_SND },
1618 #else
1619 { "", 0x000000, 0x00000000, BRF_ESS | BRF_PRG | BRF_BIOS },
1620 #endif
1621 };
1622
1623 STD_ROM_PICK(Ssioprom)
1624 STD_ROM_FN(Ssioprom)
1625
1626 struct BurnDriver BurnDrvSsioprom = {
1627 "midssio", NULL, NULL, NULL, "1981",
1628 "Midway SSIO Sound Board Internal pROM\0", "Internal pROM only", "Midway", "SSIO",
1629 NULL, NULL, NULL, NULL,
1630 BDF_BOARDROM, 0, HARDWARE_MISC_PRE90S, GBF_BIOS, 0,
1631 NULL, SsiopromRomInfo, SsiopromRomName, NULL, NULL, NULL, NULL, NULL, NULL,
1632 NULL, NULL, NULL, NULL, NULL, NULL, 0,
1633 480, 512, 3, 4
1634 };
1635
1636
1637 // Solar Fox (upright)
1638
1639 static struct BurnRomInfo solarfoxRomDesc[] = {
1640 { "sfcpu.3b", 0x1000, 0x8c40f6eb, 1 | BRF_PRG | BRF_ESS }, // 0 Z80 #0 Code
1641 { "sfcpu.4b", 0x1000, 0x4d47bd7e, 1 | BRF_PRG | BRF_ESS }, // 1
1642 { "sfcpu.5b", 0x1000, 0xb52c3bd5, 1 | BRF_PRG | BRF_ESS }, // 2
1643 { "sfcpu.4d", 0x1000, 0xbd5d25ba, 1 | BRF_PRG | BRF_ESS }, // 3
1644 { "sfcpu.5d", 0x1000, 0xdd57d817, 1 | BRF_PRG | BRF_ESS }, // 4
1645 { "sfcpu.6d", 0x1000, 0xbd993cd9, 1 | BRF_PRG | BRF_ESS }, // 5
1646 { "sfcpu.7d", 0x1000, 0x8ad8731d, 1 | BRF_PRG | BRF_ESS }, // 6
1647
1648 { "sfsnd.7a", 0x1000, 0xcdecf83a, 2 | BRF_PRG | BRF_ESS }, // 7 Z80 #1 Code (SSIO)
1649 { "sfsnd.8a", 0x1000, 0xcb7788cb, 2 | BRF_PRG | BRF_ESS }, // 8
1650 { "sfsnd.9a", 0x1000, 0x304896ce, 2 | BRF_PRG | BRF_ESS }, // 9
1651
1652 { "sfcpu.4g", 0x1000, 0xba019a60, 3 | BRF_GRA }, // 10 Background Tiles
1653 { "sfcpu.5g", 0x1000, 0x7ff0364e, 3 | BRF_GRA }, // 11
1654
1655 { "sfvid.1a", 0x2000, 0x9d9b5d7e, 4 | BRF_GRA }, // 12 Sprites
1656 { "sfvid.1b", 0x2000, 0x78801e83, 4 | BRF_GRA }, // 13
1657 { "sfvid.1d", 0x2000, 0x4d8445cf, 4 | BRF_GRA }, // 14
1658 { "sfvid.1e", 0x2000, 0x3da25495, 4 | BRF_GRA }, // 15
1659 };
1660
STDROMPICKEXT(solarfox,solarfox,Ssioprom)1661 STDROMPICKEXT(solarfox, solarfox, Ssioprom)
1662 STD_ROM_FN(solarfox)
1663
1664 static INT32 SolarfoxInit()
1665 {
1666 INT32 nRet = DrvInit(90009);
1667
1668 nScreenFlip = TMAP_FLIPY;
1669
1670 if (nRet == 0)
1671 {
1672 ssio_set_custom_input(0, 0x1c, solarfox_ip0_read);
1673 ssio_set_custom_input(1, 0xff, solarfox_ip1_read);
1674 ssio_set_custom_output(0, 0xff, solarfox_op0_write);
1675 }
1676
1677 return nRet;
1678 }
1679
1680 struct BurnDriver BurnDrvSolarfox = {
1681 "solarfox", NULL, "midssio", NULL, "1981",
1682 "Solar Fox (upright)\0", NULL, "Bally Midway", "Miscellaneous",
1683 NULL, NULL, NULL, NULL,
1684 BDF_GAME_WORKING | BDF_ORIENTATION_VERTICAL, 2, HARDWARE_MISC_PRE90S, GBF_MAZE | GBF_ACTION, 0,
1685 NULL, solarfoxRomInfo, solarfoxRomName, NULL, NULL, NULL, NULL, SolarfoxInputInfo, SolarfoxDIPInfo,
1686 SolarfoxInit, DrvExit, DrvFrame, DrvDraw, DrvScan, &DrvRecalc, 0x20,
1687 480, 512, 3, 4
1688 };
1689
1690
1691 // Kick (upright)
1692
1693 static struct BurnRomInfo kickRomDesc[] = {
1694 { "1200a-v2.b3", 0x1000, 0x65924917, 1 | BRF_PRG | BRF_ESS }, // 0 Z80 #0 Code
1695 { "1300b-v2.b4", 0x1000, 0x27929f52, 1 | BRF_PRG | BRF_ESS }, // 1
1696 { "1400c-v2.b5", 0x1000, 0x69107ce6, 1 | BRF_PRG | BRF_ESS }, // 2
1697 { "1500d-v2.d4", 0x1000, 0x04a23aa1, 1 | BRF_PRG | BRF_ESS }, // 3
1698 { "1600e-v2.d5", 0x1000, 0x1d2834c0, 1 | BRF_PRG | BRF_ESS }, // 4
1699 { "1700f-v2.d6", 0x1000, 0xddf84ce1, 1 | BRF_PRG | BRF_ESS }, // 5
1700
1701 { "4200-a.a7", 0x1000, 0x9e35c02e, 2 | BRF_PRG | BRF_ESS }, // 6 Z80 #1 Code
1702 { "4300-b.a8", 0x1000, 0xca2b7c28, 2 | BRF_PRG | BRF_ESS }, // 7
1703 { "4400-c.a9", 0x1000, 0xd1901551, 2 | BRF_PRG | BRF_ESS }, // 8
1704 { "4500-d.a10", 0x1000, 0xd36ddcdc, 2 | BRF_PRG | BRF_ESS }, // 9
1705
1706 { "1800g-v2.g4", 0x1000, 0xb4d120f3, 3 | BRF_GRA }, // 10 Background Tiles
1707 { "1900h-v2.g5", 0x1000, 0xc3ba4893, 3 | BRF_GRA }, // 11
1708
1709 { "2600a-v2.1e", 0x2000, 0x2c5d6b55, 4 | BRF_GRA }, // 12 Sprites
1710 { "2700b-v2.1d", 0x2000, 0x565ea97d, 4 | BRF_GRA }, // 13
1711 { "2800c-v2.1b", 0x2000, 0xf3be56a1, 4 | BRF_GRA }, // 14
1712 { "2900d-v2.1a", 0x2000, 0x77da795e, 4 | BRF_GRA }, // 15
1713 };
1714
STDROMPICKEXT(kick,kick,Ssioprom)1715 STDROMPICKEXT(kick, kick, Ssioprom)
1716 STD_ROM_FN(kick)
1717
1718 static INT32 KickInit()
1719 {
1720 INT32 nRet = DrvInit(90009);
1721
1722 nScreenFlip = TMAP_FLIPY;
1723
1724 if (nRet == 0)
1725 {
1726 has_dial = 1;
1727 ssio_set_custom_input(1, 0xff, kick_ip1_read);
1728 ssio_set_custom_output(0, 0xff, solarfox_op0_write);
1729 }
1730
1731 return nRet;
1732 }
1733
KickcInit()1734 static INT32 KickcInit()
1735 {
1736 INT32 nRet = KickInit();
1737
1738 nScreenFlip = 0;
1739
1740 return nRet;
1741 }
1742
1743 struct BurnDriver BurnDrvKick = {
1744 "kick", NULL, "midssio", NULL, "1981",
1745 "Kick (upright)\0", NULL, "Midway", "Miscellaneous",
1746 NULL, NULL, NULL, NULL,
1747 BDF_GAME_WORKING | BDF_ORIENTATION_VERTICAL | BDF_ORIENTATION_FLIPPED, 2, HARDWARE_MISC_PRE90S, GBF_BREAKOUT, 0,
1748 NULL, kickRomInfo, kickRomName, NULL, NULL, NULL, NULL, KickInputInfo, KickDIPInfo,
1749 KickInit, DrvExit, DrvFrame, DrvDraw, DrvScan, &DrvRecalc, 0x20,
1750 480, 512, 3, 4
1751 };
1752
1753
1754 // Kickman (upright)
1755
1756 static struct BurnRomInfo kickmanRomDesc[] = {
1757 { "1200-a-ur.b3", 0x1000, 0xd8cd9f0f, 1 | BRF_PRG | BRF_ESS }, // 0 maincpu
1758 { "1300-b-ur.b4", 0x1000, 0x4dee27bb, 1 | BRF_PRG | BRF_ESS }, // 1
1759 { "1400-c-ur.b5", 0x1000, 0x06f070c9, 1 | BRF_PRG | BRF_ESS }, // 2
1760 { "1500-d-ur.d4", 0x1000, 0x8d95b740, 1 | BRF_PRG | BRF_ESS }, // 3
1761 { "1600-e-ur.d5", 0x1000, 0xf24bc0d7, 1 | BRF_PRG | BRF_ESS }, // 4
1762 { "1700-f-ur.d6", 0x1000, 0x672361fc, 1 | BRF_PRG | BRF_ESS }, // 5
1763
1764 { "4200-a.a7", 0x1000, 0x9e35c02e, 2 | BRF_PRG | BRF_ESS }, // 6 ssio:cpu
1765 { "4300-b.a8", 0x1000, 0xca2b7c28, 2 | BRF_PRG | BRF_ESS }, // 7
1766 { "4400-c.a9", 0x1000, 0xd1901551, 2 | BRF_PRG | BRF_ESS }, // 8
1767 { "4500-d.a10", 0x1000, 0xd36ddcdc, 2 | BRF_PRG | BRF_ESS }, // 9
1768
1769 { "1800g-v2.g4", 0x1000, 0xb4d120f3, 3 | BRF_GRA }, // 10 gfx1
1770 { "1900h-v2.g5", 0x1000, 0xc3ba4893, 3 | BRF_GRA }, // 11
1771
1772 { "2600a-v2.1e", 0x2000, 0x2c5d6b55, 4 | BRF_GRA }, // 12 gfx2
1773 { "2700b-v2.1d", 0x2000, 0x565ea97d, 4 | BRF_GRA }, // 13
1774 { "2800c-v2.1b", 0x2000, 0xf3be56a1, 4 | BRF_GRA }, // 14
1775 { "2900d-v2.1a", 0x2000, 0x77da795e, 4 | BRF_GRA }, // 15
1776 };
1777
1778 STDROMPICKEXT(kickman, kickman, Ssioprom)
1779 STD_ROM_FN(kickman)
1780
1781 struct BurnDriver BurnDrvKickman = {
1782 "kickman", "kick", "ssio", NULL, "1981",
1783 "Kickman (upright)\0", NULL, "Midway", "Miscellaneous",
1784 NULL, NULL, NULL, NULL,
1785 BDF_GAME_WORKING | BDF_CLONE | BDF_ORIENTATION_VERTICAL | BDF_ORIENTATION_FLIPPED, 2, HARDWARE_MISC_PRE90S, GBF_BREAKOUT, 0,
1786 NULL, kickmanRomInfo, kickmanRomName, NULL, NULL, NULL, NULL, KickInputInfo, KickDIPInfo,
1787 KickInit, DrvExit, DrvFrame, DrvDraw, DrvScan, &DrvRecalc, 0x20,
1788 480, 512, 3, 4
1789 };
1790
1791
1792 // Kick (cocktail)
1793
1794 static struct BurnRomInfo kickcRomDesc[] = {
1795 { "1200-a.b3", 0x1000, 0x22fa42ed, 1 | BRF_PRG | BRF_ESS }, // 0 maincpu
1796 { "1300-b.b4", 0x1000, 0xafaca819, 1 | BRF_PRG | BRF_ESS }, // 1
1797 { "1400-c.b5", 0x1000, 0x6054ee56, 1 | BRF_PRG | BRF_ESS }, // 2
1798 { "1500-d.d4", 0x1000, 0x263af0f3, 1 | BRF_PRG | BRF_ESS }, // 3
1799 { "1600-e.d5", 0x1000, 0xeaaa78a7, 1 | BRF_PRG | BRF_ESS }, // 4
1800 { "1700-f.d6", 0x1000, 0xc06c880f, 1 | BRF_PRG | BRF_ESS }, // 5
1801
1802 { "4200-a.a7", 0x1000, 0x9e35c02e, 2 | BRF_PRG | BRF_ESS }, // 6 ssio:cpu
1803 { "4300-b.a8", 0x1000, 0xca2b7c28, 2 | BRF_PRG | BRF_ESS }, // 7
1804 { "4400-c.a9", 0x1000, 0xd1901551, 2 | BRF_PRG | BRF_ESS }, // 8
1805 { "4500-d.a10", 0x1000, 0xd36ddcdc, 2 | BRF_PRG | BRF_ESS }, // 9
1806
1807 { "1000-g.g4", 0x1000, 0xacdae4f6, 3 | BRF_GRA }, // 10 gfx1
1808 { "1100-h.g5", 0x1000, 0xdbb18c96, 3 | BRF_GRA }, // 11
1809
1810 { "2600-a.1e", 0x2000, 0x74b409d7, 4 | BRF_GRA }, // 12 gfx2
1811 { "2700-b.1d", 0x2000, 0x78eda36c, 4 | BRF_GRA }, // 13
1812 { "2800-c.1b", 0x2000, 0xc93e0170, 4 | BRF_GRA }, // 14
1813 { "2900-d.1a", 0x2000, 0x91e59383, 4 | BRF_GRA }, // 15
1814 };
1815
1816 STDROMPICKEXT(kickc, kickc, Ssioprom)
1817 STD_ROM_FN(kickc)
1818
1819 struct BurnDriver BurnDrvKickc = {
1820 "kickc", "kick", "ssio", NULL, "1981",
1821 "Kick (cocktail)\0", NULL, "Midway", "Miscellaneous",
1822 NULL, NULL, NULL, NULL,
1823 BDF_GAME_WORKING | BDF_CLONE | BDF_ORIENTATION_VERTICAL | BDF_ORIENTATION_FLIPPED, 2, HARDWARE_MISC_PRE90S, GBF_BREAKOUT, 0,
1824 NULL, kickcRomInfo, kickcRomName, NULL, NULL, NULL, NULL, KickInputInfo, KickDIPInfo,//, KickcInputInfo, KickcDIPInfo,
1825 KickcInit, DrvExit, DrvFrame, DrvDraw, DrvScan, &DrvRecalc, 0x20,
1826 480, 512, 3, 4
1827 };
1828
1829
1830 // Draw Poker (Bally, 03-20)
1831
1832 static struct BurnRomInfo dpokerRomDesc[] = {
1833 { "vppp.b3", 0x1000, 0x2a76ded2, 1 | BRF_PRG | BRF_ESS }, // 0 maincpu
1834 { "vppp.b4", 0x1000, 0xd6948faa, 1 | BRF_PRG | BRF_ESS }, // 1
1835 { "vppp.b5", 0x1000, 0xa49916e5, 1 | BRF_PRG | BRF_ESS }, // 2
1836 { "vppp.d4", 0x1000, 0xc496934f, 1 | BRF_PRG | BRF_ESS }, // 3
1837 { "vppp.d5", 0x1000, 0x84f4bd38, 1 | BRF_PRG | BRF_ESS }, // 4
1838 { "vppp.d6", 0x1000, 0xb0023bf1, 1 | BRF_PRG | BRF_ESS }, // 5
1839 { "vppp.d7", 0x1000, 0xa4012f5a, 1 | BRF_PRG | BRF_ESS }, // 6
1840
1841 { "vssp.a7", 0x1000, 0xf78b2283, 2 | BRF_PRG | BRF_ESS }, // 7 ssio:cpu
1842 { "vssp.a8", 0x1000, 0x3f531bd0, 2 | BRF_PRG | BRF_ESS }, // 8
1843
1844 { "vpbg.g4", 0x1000, 0x9fe9aad8, 3 | BRF_GRA }, // 9 gfx1
1845 { "vpbg.g5", 0x1000, 0xd43aeaae, 3 | BRF_GRA }, // 10
1846
1847 { "vpfg.a1", 0x2000, 0xd76ec7dd, 4 | BRF_GRA }, // 11 gfx2
1848 { "vpfg.b1", 0x2000, 0xcdba9a7d, 4 | BRF_GRA }, // 12
1849 { "vpfg.d1", 0x2000, 0xc661cace, 4 | BRF_GRA }, // 13
1850 { "vpfg.e1", 0x2000, 0xacb3b469, 4 | BRF_GRA }, // 14
1851 };
1852
STDROMPICKEXT(dpoker,dpoker,Ssioprom)1853 STDROMPICKEXT(dpoker, dpoker, Ssioprom)
1854 STD_ROM_FN(dpoker)
1855
1856 static INT32 DpokerInit()
1857 {
1858 INT32 nRet = DrvInit(90009);
1859
1860 if (nRet == 0)
1861 {
1862 // ssio_set_custom_input(1, 0xff, dpoker_ip1_read);
1863 // ssio_set_custom_output(0, 0xff, dpoker_op0_write);
1864 }
1865
1866 return nRet;
1867 }
1868
1869 struct BurnDriverD BurnDrvDpoker = {
1870 "dpoker", NULL, "midssio", NULL, "1985",
1871 "Draw Poker (Bally, 03-20)\0", NULL, "Bally", "Miscellaneous",
1872 NULL, NULL, NULL, NULL,
1873 BDF_GAME_NOT_WORKING, 2, HARDWARE_MISC_PRE90S, GBF_CASINO, 0,
1874 NULL, dpokerRomInfo, dpokerRomName, NULL, NULL, NULL, NULL, KickInputInfo, KickDIPInfo,//DpokerInputInfo, DpokerDIPInfo,
1875 DpokerInit, DrvExit, DrvFrame, DrvDraw, DrvScan, &DrvRecalc, 0x20,
1876 512, 480, 4, 3
1877 };
1878
1879
1880 // Satan's Hollow (set 1)
1881
1882 static struct BurnRomInfo shollowRomDesc[] = {
1883 { "sh-pro.00", 0x2000, 0x95e2b800, 1 | BRF_PRG | BRF_ESS }, // 0 maincpu
1884 { "sh-pro.01", 0x2000, 0xb99f6ff8, 1 | BRF_PRG | BRF_ESS }, // 1
1885 { "sh-pro.02", 0x2000, 0x1202c7b2, 1 | BRF_PRG | BRF_ESS }, // 2
1886 { "sh-pro.03", 0x2000, 0x0a64afb9, 1 | BRF_PRG | BRF_ESS }, // 3
1887 { "sh-pro.04", 0x2000, 0x22fa9175, 1 | BRF_PRG | BRF_ESS }, // 4
1888 { "sh-pro.05", 0x2000, 0x1716e2bb, 1 | BRF_PRG | BRF_ESS }, // 5
1889
1890 { "sh-snd.01", 0x1000, 0x55a297cc, 2 | BRF_PRG | BRF_ESS }, // 6 ssio:cpu
1891 { "sh-snd.02", 0x1000, 0x46fc31f6, 2 | BRF_PRG | BRF_ESS }, // 7
1892 { "sh-snd.03", 0x1000, 0xb1f4a6a8, 2 | BRF_PRG | BRF_ESS }, // 8
1893
1894 { "sh-bg.00", 0x2000, 0x3e2b333c, 3 | BRF_GRA }, // 9 gfx1
1895 { "sh-bg.01", 0x2000, 0xd1d70cc4, 3 | BRF_GRA }, // 10
1896
1897 { "sh-fg.00", 0x2000, 0x33f4554e, 4 | BRF_GRA }, // 11 gfx2
1898 { "sh-fg.01", 0x2000, 0xba1a38b4, 4 | BRF_GRA }, // 12
1899 { "sh-fg.02", 0x2000, 0x6b57f6da, 4 | BRF_GRA }, // 13
1900 { "sh-fg.03", 0x2000, 0x37ea9d07, 4 | BRF_GRA }, // 14
1901 };
1902
STDROMPICKEXT(shollow,shollow,Ssioprom)1903 STDROMPICKEXT(shollow, shollow, Ssioprom)
1904 STD_ROM_FN(shollow)
1905
1906 static INT32 ShollowInit()
1907 {
1908 return DrvInit(90010);
1909 }
1910
1911 struct BurnDriver BurnDrvShollow = {
1912 "shollow", NULL, "midssio", NULL, "1981",
1913 "Satan's Hollow (set 1)\0", NULL, "Bally Midway", "Miscellaneous",
1914 NULL, NULL, NULL, NULL,
1915 BDF_GAME_WORKING | BDF_ORIENTATION_VERTICAL | BDF_ORIENTATION_FLIPPED, 2, HARDWARE_MISC_PRE90S, GBF_ACTION | GBF_SHOOT, 0,
1916 NULL, shollowRomInfo, shollowRomName, NULL, NULL, NULL, NULL, ShollowInputInfo, ShollowDIPInfo,
1917 ShollowInit, DrvExit, DrvFrame, DrvDraw, DrvScan, &DrvRecalc, 0x40,
1918 480, 512, 3, 4
1919 };
1920
1921
1922 // Satan's Hollow (set 2)
1923
1924 static struct BurnRomInfo shollow2RomDesc[] = {
1925 { "sh-pro.00", 0x2000, 0x95e2b800, 1 | BRF_PRG | BRF_ESS }, // 0 maincpu
1926 { "sh-pro.01", 0x2000, 0xb99f6ff8, 1 | BRF_PRG | BRF_ESS }, // 1
1927 { "sh-pro.02", 0x2000, 0x1202c7b2, 1 | BRF_PRG | BRF_ESS }, // 2
1928 { "sh-pro.03", 0x2000, 0x0a64afb9, 1 | BRF_PRG | BRF_ESS }, // 3
1929 { "sh-pro.04", 0x2000, 0x22fa9175, 1 | BRF_PRG | BRF_ESS }, // 4
1930 { "sh-pro.05", 0x2000, 0x1716e2bb, 1 | BRF_PRG | BRF_ESS }, // 5
1931
1932 { "snd-0.a7", 0x1000, 0x9d815bb3, 2 | BRF_PRG | BRF_ESS }, // 6 ssio:cpu
1933 { "snd-1.a8", 0x1000, 0x9f253412, 2 | BRF_PRG | BRF_ESS }, // 7
1934 { "snd-2.a9", 0x1000, 0x7783d6c6, 2 | BRF_PRG | BRF_ESS }, // 8
1935
1936 { "sh-bg.00", 0x2000, 0x3e2b333c, 3 | BRF_GRA }, // 9 gfx1
1937 { "sh-bg.01", 0x2000, 0xd1d70cc4, 3 | BRF_GRA }, // 10
1938
1939 { "sh-fg.00", 0x2000, 0x33f4554e, 4 | BRF_GRA }, // 11 gfx2
1940 { "sh-fg.01", 0x2000, 0xba1a38b4, 4 | BRF_GRA }, // 12
1941 { "sh-fg.02", 0x2000, 0x6b57f6da, 4 | BRF_GRA }, // 13
1942 { "sh-fg.03", 0x2000, 0x37ea9d07, 4 | BRF_GRA }, // 14
1943 };
1944
1945 STDROMPICKEXT(shollow2, shollow2, Ssioprom)
1946 STD_ROM_FN(shollow2)
1947
1948 struct BurnDriver BurnDrvShollow2 = {
1949 "shollow2", "shollow", "midssio", NULL, "1981",
1950 "Satan's Hollow (set 2)\0", NULL, "Bally Midway", "Miscellaneous",
1951 NULL, NULL, NULL, NULL,
1952 BDF_GAME_WORKING | BDF_CLONE | BDF_ORIENTATION_VERTICAL | BDF_ORIENTATION_FLIPPED, 2, HARDWARE_MISC_PRE90S, GBF_ACTION | GBF_SHOOT, 0,
1953 NULL, shollow2RomInfo, shollow2RomName, NULL, NULL, NULL, NULL, ShollowInputInfo, ShollowDIPInfo,
1954 ShollowInit, DrvExit, DrvFrame, DrvDraw, DrvScan, &DrvRecalc, 0x40,
1955 480, 512, 3, 4
1956 };
1957
1958
1959 // Tron (8/9)
1960
1961 static struct BurnRomInfo tronRomDesc[] = {
1962 { "pro0.d2", 0x2000, 0x0de0471a, 1 | BRF_PRG | BRF_ESS }, // 0 maincpu
1963 { "scpu_pgb.d3", 0x2000, 0x8ddf8717, 1 | BRF_PRG | BRF_ESS }, // 1
1964 { "scpu_pgc.d4", 0x2000, 0x4241e3a0, 1 | BRF_PRG | BRF_ESS }, // 2
1965 { "scpu_pgd.d5", 0x2000, 0x035d2fe7, 1 | BRF_PRG | BRF_ESS }, // 3
1966 { "scpu_pge.d6", 0x2000, 0x24c185d8, 1 | BRF_PRG | BRF_ESS }, // 4
1967 { "scpu_pgf.d7", 0x2000, 0x38c4bbaf, 1 | BRF_PRG | BRF_ESS }, // 5
1968
1969 { "ssi_0a.a7", 0x1000, 0x765e6eba, 2 | BRF_PRG | BRF_ESS }, // 6 ssio:cpu
1970 { "ssi_0b.a8", 0x1000, 0x1b90ccdd, 2 | BRF_PRG | BRF_ESS }, // 7
1971 { "ssi_0c.a9", 0x1000, 0x3a4bc629, 2 | BRF_PRG | BRF_ESS }, // 8
1972
1973 { "scpu_bgg.g3", 0x2000, 0x1a9ed2f5, 3 | BRF_GRA }, // 9 gfx1
1974 { "scpu_bgh.g4", 0x2000, 0x3220f974, 3 | BRF_GRA }, // 10
1975
1976 { "vga.e1", 0x2000, 0xbc036d1d, 4 | BRF_GRA }, // 11 gfx2
1977 { "vgb.dc1", 0x2000, 0x58ee14d3, 4 | BRF_GRA }, // 12
1978 { "vgc.cb1", 0x2000, 0x3329f9d4, 4 | BRF_GRA }, // 13
1979 { "vga.a1", 0x2000, 0x9743f873, 4 | BRF_GRA }, // 14
1980
1981 { "0066-313bx-xxqx.a12.bin", 0x0001, 0x00000000, 5 | BRF_NODUMP | BRF_PRG | BRF_ESS }, // 15 scpu_pals
1982 { "0066-315bx-xxqx.b12.bin", 0x0001, 0x00000000, 5 | BRF_NODUMP | BRF_PRG | BRF_ESS }, // 16
1983 { "0066-322bx-xx0x.e3.bin", 0x0001, 0x00000000, 5 | BRF_NODUMP | BRF_PRG | BRF_ESS }, // 17
1984 { "0066-316bx-xxqx.g11.bin", 0x0001, 0x00000000, 5 | BRF_NODUMP | BRF_PRG | BRF_ESS }, // 18
1985 { "0066-314bx-xxqx.g12.bin", 0x0001, 0x00000000, 5 | BRF_NODUMP | BRF_PRG | BRF_ESS }, // 19
1986 };
1987
STDROMPICKEXT(tron,tron,Ssioprom)1988 STDROMPICKEXT(tron, tron, Ssioprom)
1989 STD_ROM_FN(tron)
1990
1991 static UINT8 tron_ip1_read(UINT8)
1992 {
1993 return BurnTrackballRead(0, 0);
1994 }
1995
tron_ip4_read(UINT8)1996 static UINT8 tron_ip4_read(UINT8)
1997 {
1998 return BurnTrackballRead(0, 1);
1999 }
2000
TronInit()2001 static INT32 TronInit()
2002 {
2003 INT32 nRet = DrvInit(90010);
2004
2005 if (!nRet) {
2006 has_dial = 1;
2007 ssio_set_custom_input(1, 0xff, tron_ip1_read);
2008 ssio_set_custom_input(4, 0xff, tron_ip4_read);
2009 }
2010
2011 return nRet;
2012 }
2013
2014 struct BurnDriver BurnDrvTron = {
2015 "tron", NULL, "midssio", NULL, "1982",
2016 "Tron (8/9)\0", NULL, "Bally Midway", "Miscellaneous",
2017 NULL, NULL, NULL, NULL,
2018 BDF_GAME_WORKING | BDF_ORIENTATION_VERTICAL | BDF_ORIENTATION_FLIPPED, 2, HARDWARE_MISC_PRE90S, GBF_ACTION, 0,
2019 NULL, tronRomInfo, tronRomName, NULL, NULL, NULL, NULL, TronInputInfo, TronDIPInfo,
2020 TronInit, DrvExit, DrvFrame, DrvDraw, DrvScan, &DrvRecalc, 0x40,
2021 480, 512, 3, 4
2022 };
2023
2024
2025 // Tron (6/25)
2026
2027 static struct BurnRomInfo tron2RomDesc[] = {
2028 { "scpu_pga.d2", 0x2000, 0x5151770b, 1 | BRF_PRG | BRF_ESS }, // 0 maincpu
2029 { "scpu_pgb.d3", 0x2000, 0x8ddf8717, 1 | BRF_PRG | BRF_ESS }, // 1
2030 { "scpu_pgc.d4", 0x2000, 0x4241e3a0, 1 | BRF_PRG | BRF_ESS }, // 2
2031 { "scpu_pgd.d5", 0x2000, 0x035d2fe7, 1 | BRF_PRG | BRF_ESS }, // 3
2032 { "scpu_pge.d6", 0x2000, 0x24c185d8, 1 | BRF_PRG | BRF_ESS }, // 4
2033 { "scpu_pgf.d7", 0x2000, 0x38c4bbaf, 1 | BRF_PRG | BRF_ESS }, // 5
2034
2035 { "ssi_0a.a7", 0x1000, 0x765e6eba, 2 | BRF_PRG | BRF_ESS }, // 6 ssio:cpu
2036 { "ssi_0b.a8", 0x1000, 0x1b90ccdd, 2 | BRF_PRG | BRF_ESS }, // 7
2037 { "ssi_0c.a9", 0x1000, 0x3a4bc629, 2 | BRF_PRG | BRF_ESS }, // 8
2038
2039 { "scpu_bgg.g3", 0x2000, 0x1a9ed2f5, 3 | BRF_GRA }, // 9 gfx1
2040 { "scpu_bgh.g4", 0x2000, 0x3220f974, 3 | BRF_GRA }, // 10
2041
2042 { "vga.e1", 0x2000, 0xbc036d1d, 4 | BRF_GRA }, // 11 gfx2
2043 { "vgb.dc1", 0x2000, 0x58ee14d3, 4 | BRF_GRA }, // 12
2044 { "vgc.cb1", 0x2000, 0x3329f9d4, 4 | BRF_GRA }, // 13
2045 { "vga.a1", 0x2000, 0x9743f873, 4 | BRF_GRA }, // 14
2046
2047 { "0066-313bx-xxqx.a12.bin", 0x0001, 0x00000000, 5 | BRF_NODUMP | BRF_PRG | BRF_ESS }, // 15 scpu_pals
2048 { "0066-315bx-xxqx.b12.bin", 0x0001, 0x00000000, 5 | BRF_NODUMP | BRF_PRG | BRF_ESS }, // 16
2049 { "0066-322bx-xx0x.e3.bin", 0x0001, 0x00000000, 5 | BRF_NODUMP | BRF_PRG | BRF_ESS }, // 17
2050 { "0066-316bx-xxqx.g11.bin", 0x0001, 0x00000000, 5 | BRF_NODUMP | BRF_PRG | BRF_ESS }, // 18
2051 { "0066-314bx-xxqx.g12.bin", 0x0001, 0x00000000, 5 | BRF_NODUMP | BRF_PRG | BRF_ESS }, // 19
2052 };
2053
2054 STDROMPICKEXT(tron2, tron2, Ssioprom)
2055 STD_ROM_FN(tron2)
2056
2057 struct BurnDriver BurnDrvTron2 = {
2058 "tron2", "tron", "midssio", NULL, "1982",
2059 "Tron (6/25)\0", NULL, "Bally Midway", "Miscellaneous",
2060 NULL, NULL, NULL, NULL,
2061 BDF_GAME_WORKING | BDF_CLONE | BDF_ORIENTATION_VERTICAL | BDF_ORIENTATION_FLIPPED, 2, HARDWARE_MISC_PRE90S, GBF_ACTION, 0,
2062 NULL, tron2RomInfo, tron2RomName, NULL, NULL, NULL, NULL, TronInputInfo, TronDIPInfo,
2063 TronInit, DrvExit, DrvFrame, DrvDraw, DrvScan, &DrvRecalc, 0x40,
2064 480, 512, 3, 4
2065 };
2066
2067
2068 // Tron (6/17)
2069
2070 static struct BurnRomInfo tron3RomDesc[] = {
2071 { "scpu_pga.d2", 0x2000, 0xfc33afd7, 1 | BRF_PRG | BRF_ESS }, // 0 maincpu
2072 { "scpu_pgb.d3", 0x2000, 0x7d9e22ac, 1 | BRF_PRG | BRF_ESS }, // 1
2073 { "scpu_pgc.d4", 0x2000, 0x902011c6, 1 | BRF_PRG | BRF_ESS }, // 2
2074 { "scpu_pgd.d5", 0x2000, 0x86477e89, 1 | BRF_PRG | BRF_ESS }, // 3
2075 { "scpu_pge.d6", 0x2000, 0xea198fa8, 1 | BRF_PRG | BRF_ESS }, // 4
2076 { "scpu_pgf.d7", 0x2000, 0x4325fb08, 1 | BRF_PRG | BRF_ESS }, // 5
2077
2078 { "ssi_0a.a7", 0x1000, 0x765e6eba, 2 | BRF_PRG | BRF_ESS }, // 6 ssio:cpu
2079 { "ssi_0b.a8", 0x1000, 0x1b90ccdd, 2 | BRF_PRG | BRF_ESS }, // 7
2080 { "ssi_0c.a9", 0x1000, 0x3a4bc629, 2 | BRF_PRG | BRF_ESS }, // 8
2081
2082 { "scpu_bgg.g3", 0x2000, 0x1a9ed2f5, 3 | BRF_GRA }, // 9 gfx1
2083 { "scpu_bgh.g4", 0x2000, 0x3220f974, 3 | BRF_GRA }, // 10
2084
2085 { "vga.e1", 0x2000, 0xbc036d1d, 4 | BRF_GRA }, // 11 gfx2
2086 { "vgb.dc1", 0x2000, 0x58ee14d3, 4 | BRF_GRA }, // 12
2087 { "vgc.cb1", 0x2000, 0x3329f9d4, 4 | BRF_GRA }, // 13
2088 { "vga.a1", 0x2000, 0x9743f873, 4 | BRF_GRA }, // 14
2089
2090 { "0066-313bx-xxqx.a12.bin", 0x0001, 0x00000000, 5 | BRF_NODUMP | BRF_PRG | BRF_ESS }, // 15 scpu_pals
2091 { "0066-315bx-xxqx.b12.bin", 0x0001, 0x00000000, 5 | BRF_NODUMP | BRF_PRG | BRF_ESS }, // 16
2092 { "0066-322bx-xx0x.e3.bin", 0x0001, 0x00000000, 5 | BRF_NODUMP | BRF_PRG | BRF_ESS }, // 17
2093 { "0066-316bx-xxqx.g11.bin", 0x0001, 0x00000000, 5 | BRF_NODUMP | BRF_PRG | BRF_ESS }, // 18
2094 { "0066-314bx-xxqx.g12.bin", 0x0001, 0x00000000, 5 | BRF_NODUMP | BRF_PRG | BRF_ESS }, // 19
2095 };
2096
2097 STDROMPICKEXT(tron3, tron3, Ssioprom)
2098 STD_ROM_FN(tron3)
2099
2100 struct BurnDriver BurnDrvTron3 = {
2101 "tron3", "tron", "midssio", NULL, "1982",
2102 "Tron (6/17)\0", NULL, "Bally Midway", "Miscellaneous",
2103 NULL, NULL, NULL, NULL,
2104 BDF_GAME_WORKING | BDF_CLONE | BDF_ORIENTATION_VERTICAL | BDF_ORIENTATION_FLIPPED, 2, HARDWARE_MISC_PRE90S, GBF_ACTION, 0,
2105 NULL, tron3RomInfo, tron3RomName, NULL, NULL, NULL, NULL, TronInputInfo, TronDIPInfo,// Tron3InputInfo, Tron3DIPInfo,
2106 TronInit, DrvExit, DrvFrame, DrvDraw, DrvScan, &DrvRecalc, 0x40,
2107 480, 512, 3, 4
2108 };
2109
2110
2111 // Tron (6/15)
2112
2113 static struct BurnRomInfo tron4RomDesc[] = {
2114 { "pga-615.d2", 0x2000, 0x09d7a95a, 1 | BRF_PRG | BRF_ESS }, // 0 maincpu
2115 { "pgb-615.d3", 0x2000, 0xb454337d, 1 | BRF_PRG | BRF_ESS }, // 1
2116 { "pgc-615.d4", 0x2000, 0xac1836ff, 1 | BRF_PRG | BRF_ESS }, // 2
2117 { "pgd-615.d5", 0x2000, 0x1a7bec6d, 1 | BRF_PRG | BRF_ESS }, // 3
2118 { "pge-615.d6", 0x2000, 0xea198fa8, 1 | BRF_PRG | BRF_ESS }, // 4
2119 { "pgf-615.d7", 0x2000, 0x790ee743, 1 | BRF_PRG | BRF_ESS }, // 5
2120
2121 { "ssi_oa.a7", 0x1000, 0x2cbb332b, 2 | BRF_PRG | BRF_ESS }, // 6 ssio:cpu
2122 { "ssi_ob.a8", 0x1000, 0x1355b7e6, 2 | BRF_PRG | BRF_ESS }, // 7
2123 { "ssi_oc.a9", 0x1000, 0x6dd4b7c9, 2 | BRF_PRG | BRF_ESS }, // 8
2124
2125 { "scpu_bgg.g3", 0x2000, 0x1a9ed2f5, 3 | BRF_GRA }, // 9 gfx1
2126 { "scpu_bgh.g4", 0x2000, 0x3220f974, 3 | BRF_GRA }, // 10
2127
2128 { "vga.e1", 0x2000, 0xbc036d1d, 4 | BRF_GRA }, // 11 gfx2
2129 { "vgb.dc1", 0x2000, 0x58ee14d3, 4 | BRF_GRA }, // 12
2130 { "vgc.cb1", 0x2000, 0x3329f9d4, 4 | BRF_GRA }, // 13
2131 { "vga.a1", 0x2000, 0x9743f873, 4 | BRF_GRA }, // 14
2132
2133 { "0066-313bx-xxqx.a12.bin", 0x0001, 0x00000000, 5 | BRF_NODUMP | BRF_PRG | BRF_ESS }, // 15 scpu_pals
2134 { "0066-315bx-xxqx.b12.bin", 0x0001, 0x00000000, 5 | BRF_NODUMP | BRF_PRG | BRF_ESS }, // 16
2135 { "0066-322bx-xx0x.e3.bin", 0x0001, 0x00000000, 5 | BRF_NODUMP | BRF_PRG | BRF_ESS }, // 17
2136 { "0066-316bx-xxqx.g11.bin", 0x0001, 0x00000000, 5 | BRF_NODUMP | BRF_PRG | BRF_ESS }, // 18
2137 { "0066-314bx-xxqx.g12.bin", 0x0001, 0x00000000, 5 | BRF_NODUMP | BRF_PRG | BRF_ESS }, // 19
2138 };
2139
2140 STDROMPICKEXT(tron4, tron4, Ssioprom)
2141 STD_ROM_FN(tron4)
2142
2143 struct BurnDriver BurnDrvTron4 = {
2144 "tron4", "tron", "midssio", NULL, "1982",
2145 "Tron (6/15)\0", NULL, "Bally Midway", "Miscellaneous",
2146 NULL, NULL, NULL, NULL,
2147 BDF_GAME_WORKING | BDF_CLONE | BDF_ORIENTATION_VERTICAL | BDF_ORIENTATION_FLIPPED, 2, HARDWARE_MISC_PRE90S, GBF_ACTION, 0,
2148 NULL, tron4RomInfo, tron4RomName, NULL, NULL, NULL, NULL, TronInputInfo, TronDIPInfo,//, Tron3InputInfo, Tron3DIPInfo,
2149 TronInit, DrvExit, DrvFrame, DrvDraw, DrvScan, &DrvRecalc, 0x40,
2150 480, 512, 3, 4
2151 };
2152
2153
2154 // Tron (Germany)
2155
2156 static struct BurnRomInfo trongerRomDesc[] = {
2157 { "pro0.d2", 0x2000, 0xba14603d, 1 | BRF_PRG | BRF_ESS }, // 0 maincpu
2158 { "scpu_pgb.d3", 0x2000, 0x063a748f, 1 | BRF_PRG | BRF_ESS }, // 1
2159 { "scpu_pgc.d4", 0x2000, 0x6ca50365, 1 | BRF_PRG | BRF_ESS }, // 2
2160 { "scpu_pgd.d5", 0x2000, 0xb5b241c9, 1 | BRF_PRG | BRF_ESS }, // 3
2161 { "scpu_pge.d6", 0x2000, 0x04597abe, 1 | BRF_PRG | BRF_ESS }, // 4
2162 { "scpu_pgf.d7", 0x2000, 0x3908e404, 1 | BRF_PRG | BRF_ESS }, // 5
2163
2164 { "ssi_0a.a7", 0x1000, 0x765e6eba, 2 | BRF_PRG | BRF_ESS }, // 6 ssio:cpu
2165 { "ssi_0b.a8", 0x1000, 0x1b90ccdd, 2 | BRF_PRG | BRF_ESS }, // 7
2166 { "ssi_0c.a9", 0x1000, 0x3a4bc629, 2 | BRF_PRG | BRF_ESS }, // 8
2167
2168 { "scpu_bgg.g3", 0x2000, 0x1a9ed2f5, 3 | BRF_GRA }, // 9 gfx1
2169 { "scpu_bgh.g4", 0x2000, 0x3220f974, 3 | BRF_GRA }, // 10
2170
2171 { "vga.e1", 0x2000, 0xbc036d1d, 4 | BRF_GRA }, // 11 gfx2
2172 { "vgb.dc1", 0x2000, 0x58ee14d3, 4 | BRF_GRA }, // 12
2173 { "vgc.cb1", 0x2000, 0x3329f9d4, 4 | BRF_GRA }, // 13
2174 { "vga.a1", 0x2000, 0x9743f873, 4 | BRF_GRA }, // 14
2175
2176 { "0066-313bx-xxqx.a12.bin", 0x0001, 0x00000000, 5 | BRF_NODUMP | BRF_PRG | BRF_ESS }, // 15 scpu_pals
2177 { "0066-315bx-xxqx.b12.bin", 0x0001, 0x00000000, 5 | BRF_NODUMP | BRF_PRG | BRF_ESS }, // 16
2178 { "0066-322bx-xx0x.e3.bin", 0x0001, 0x00000000, 5 | BRF_NODUMP | BRF_PRG | BRF_ESS }, // 17
2179 { "0066-316bx-xxqx.g11.bin", 0x0001, 0x00000000, 5 | BRF_NODUMP | BRF_PRG | BRF_ESS }, // 18
2180 { "0066-314bx-xxqx.g12.bin", 0x0001, 0x00000000, 5 | BRF_NODUMP | BRF_PRG | BRF_ESS }, // 19
2181 };
2182
2183 STDROMPICKEXT(tronger, tronger, Ssioprom)
2184 STD_ROM_FN(tronger)
2185
2186 struct BurnDriver BurnDrvTronger = {
2187 "tronger", "tron", "midssio", NULL, "1982",
2188 "Tron (Germany)\0", NULL, "Bally Midway", "Miscellaneous",
2189 NULL, NULL, NULL, NULL,
2190 BDF_GAME_WORKING | BDF_CLONE | BDF_ORIENTATION_VERTICAL | BDF_ORIENTATION_FLIPPED, 2, HARDWARE_MISC_PRE90S, GBF_ACTION, 0,
2191 NULL, trongerRomInfo, trongerRomName, NULL, NULL, NULL, NULL, TronInputInfo, TronDIPInfo,//, Tron3InputInfo, Tron3DIPInfo,
2192 TronInit, DrvExit, DrvFrame, DrvDraw, DrvScan, &DrvRecalc, 0x40,
2193 480, 512, 3, 4
2194 };
2195
2196
2197 // Domino Man
2198
2199 static struct BurnRomInfo dominoRomDesc[] = {
2200 { "dmanpg0.bin", 0x2000, 0x3bf3bb1c, 1 | BRF_PRG | BRF_ESS }, // 0 maincpu
2201 { "dmanpg1.bin", 0x2000, 0x85cf1d69, 1 | BRF_PRG | BRF_ESS }, // 1
2202 { "dmanpg2.bin", 0x2000, 0x7dd2177a, 1 | BRF_PRG | BRF_ESS }, // 2
2203 { "dmanpg3.bin", 0x2000, 0xf2e0aa44, 1 | BRF_PRG | BRF_ESS }, // 3
2204
2205 { "dm-a7.snd", 0x1000, 0xfa982dcc, 2 | BRF_PRG | BRF_ESS }, // 4 ssio:cpu
2206 { "dm-a8.snd", 0x1000, 0x72839019, 2 | BRF_PRG | BRF_ESS }, // 5
2207 { "dm-a9.snd", 0x1000, 0xad760da7, 2 | BRF_PRG | BRF_ESS }, // 6
2208 { "dm-a10.snd", 0x1000, 0x958c7287, 2 | BRF_PRG | BRF_ESS }, // 7
2209
2210 { "dmanbg0.bin", 0x2000, 0x9163007f, 3 | BRF_GRA }, // 8 gfx1
2211 { "dmanbg1.bin", 0x2000, 0x28615c56, 3 | BRF_GRA }, // 9
2212
2213 { "dmanfg0.bin", 0x2000, 0x0b1f9f9e, 4 | BRF_GRA }, // 10 gfx2
2214 { "dmanfg1.bin", 0x2000, 0x16aa4b9b, 4 | BRF_GRA }, // 11
2215 { "dmanfg2.bin", 0x2000, 0x4a8e76b8, 4 | BRF_GRA }, // 12
2216 { "dmanfg3.bin", 0x2000, 0x1f39257e, 4 | BRF_GRA }, // 13
2217 };
2218
STDROMPICKEXT(domino,domino,Ssioprom)2219 STDROMPICKEXT(domino, domino, Ssioprom)
2220 STD_ROM_FN(domino)
2221
2222 static INT32 DominoInit()
2223 {
2224 INT32 nRet = DrvInit(90010);
2225
2226 if (!nRet) {
2227 ssio_basevolume(0.15);
2228 }
2229
2230 return nRet;
2231 }
2232
2233 struct BurnDriver BurnDrvDomino = {
2234 "domino", NULL, "midssio", NULL, "1982",
2235 "Domino Man\0", NULL, "Bally Midway", "Miscellaneous",
2236 NULL, NULL, NULL, NULL,
2237 BDF_GAME_WORKING, 2, HARDWARE_MISC_PRE90S, GBF_ACTION | GBF_PUZZLE, 0,
2238 NULL, dominoRomInfo, dominoRomName, NULL, NULL, NULL, NULL, DominoInputInfo, DominoDIPInfo,
2239 DominoInit, DrvExit, DrvFrame, DrvDraw, DrvScan, &DrvRecalc, 0x40,
2240 512, 480, 4, 3
2241 };
2242
2243
2244 // Wacko
2245
2246 static struct BurnRomInfo wackoRomDesc[] = {
2247 { "wackocpu.2d", 0x2000, 0xc98e29b6, 1 | BRF_PRG | BRF_ESS }, // 0 maincpu
2248 { "wackocpu.3d", 0x2000, 0x90b89774, 1 | BRF_PRG | BRF_ESS }, // 1
2249 { "wackocpu.4d", 0x2000, 0x515edff7, 1 | BRF_PRG | BRF_ESS }, // 2
2250 { "wackocpu.5d", 0x2000, 0x9b01bf32, 1 | BRF_PRG | BRF_ESS }, // 3
2251
2252 { "wackosnd.7a", 0x1000, 0x1a58763f, 2 | BRF_PRG | BRF_ESS }, // 4 ssio:cpu
2253 { "wackosnd.8a", 0x1000, 0xa4e3c771, 2 | BRF_PRG | BRF_ESS }, // 5
2254 { "wackosnd.9a", 0x1000, 0x155ba3dd, 2 | BRF_PRG | BRF_ESS }, // 6
2255
2256 { "wackocpu.3g", 0x2000, 0x33160eb1, 3 | BRF_GRA }, // 7 gfx1
2257 { "wackocpu.4g", 0x2000, 0xdaf37d7c, 3 | BRF_GRA }, // 8
2258
2259 { "wackovid.1e", 0x2000, 0xdca59be7, 4 | BRF_GRA }, // 9 gfx2
2260 { "wackovid.1d", 0x2000, 0xa02f1672, 4 | BRF_GRA }, // 10
2261 { "wackovid.1b", 0x2000, 0x7d899790, 4 | BRF_GRA }, // 11
2262 { "wackovid.1a", 0x2000, 0x080be3ad, 4 | BRF_GRA }, // 12
2263 };
2264
STDROMPICKEXT(wacko,wacko,Ssioprom)2265 STDROMPICKEXT(wacko, wacko, Ssioprom)
2266 STD_ROM_FN(wacko)
2267
2268 static void wacko_op4_write(UINT8, UINT8 data)
2269 {
2270 input_playernum = data & 1;
2271 }
2272
wacko_ip1_read(UINT8)2273 static UINT8 wacko_ip1_read(UINT8)
2274 {
2275 return BurnTrackballRead(input_playernum, 0);
2276 }
2277
wacko_ip2_read(UINT8)2278 static UINT8 wacko_ip2_read(UINT8)
2279 {
2280 return BurnTrackballRead(input_playernum, 1);
2281 }
2282
WackoInit()2283 static INT32 WackoInit()
2284 {
2285 INT32 nRet = DrvInit(90010);
2286
2287 if (!nRet) {
2288 is_wacko = 1;
2289 ssio_set_custom_input(1, 0xff, wacko_ip1_read);
2290 ssio_set_custom_input(2, 0xff, wacko_ip2_read);
2291 ssio_set_custom_output(4, 0x01, wacko_op4_write);
2292 }
2293
2294 return nRet;
2295 }
2296
2297 struct BurnDriver BurnDrvWacko = {
2298 "wacko", NULL, "ssio", NULL, "1982",
2299 "Wacko\0", NULL, "Bally Midway", "Miscellaneous",
2300 NULL, NULL, NULL, NULL,
2301 BDF_GAME_WORKING, 2, HARDWARE_MISC_PRE90S, GBF_SHOOT | GBF_ACTION, 0,
2302 NULL, wackoRomInfo, wackoRomName, NULL, NULL, NULL, NULL, WackoInputInfo, WackoDIPInfo,
2303 WackoInit, DrvExit, DrvFrame, DrvDraw, DrvScan, &DrvRecalc, 0x40,
2304 512, 480, 4, 3
2305 };
2306
2307
2308 // Two Tigers (dedicated)
2309
2310 static struct BurnRomInfo twotigerRomDesc[] = {
2311 { "cpu_d2", 0x2000, 0xa682ed24, 1 | BRF_PRG | BRF_ESS }, // 0 maincpu
2312 { "cpu_d3", 0x2000, 0x5b48fde9, 1 | BRF_PRG | BRF_ESS }, // 1
2313 { "cpu_d4", 0x2000, 0xf1ab8c4d, 1 | BRF_PRG | BRF_ESS }, // 2
2314 { "cpu_d5", 0x2000, 0xd7129900, 1 | BRF_PRG | BRF_ESS }, // 3
2315
2316 { "ssio_a7", 0x1000, 0x64ddc16c, 2 | BRF_PRG | BRF_ESS }, // 4 ssio:cpu
2317 { "ssio_a8", 0x1000, 0xc3467612, 2 | BRF_PRG | BRF_ESS }, // 5
2318 { "ssio_a9", 0x1000, 0xc50f7b2d, 2 | BRF_PRG | BRF_ESS }, // 6
2319
2320 { "2tgrbg0.bin", 0x2000, 0x52f69068, 3 | BRF_GRA }, // 7 gfx1
2321 { "2tgrbg1.bin", 0x2000, 0x758d4f7d, 3 | BRF_GRA }, // 8
2322
2323 { "vid_d1", 0x2000, 0xda5f49da, 4 | BRF_GRA }, // 9 gfx2
2324 { "vid_c1", 0x2000, 0x62ed737b, 4 | BRF_GRA }, // 10
2325 { "vid_b1", 0x2000, 0x0939921e, 4 | BRF_GRA }, // 11
2326 { "vid_a1", 0x2000, 0xef515824, 4 | BRF_GRA }, // 12
2327 };
2328
2329 STDROMPICKEXT(twotiger, twotiger, Ssioprom)
2330 STD_ROM_FN(twotiger)
2331
2332 static struct BurnSampleInfo TwotigerSampleDesc[] = {
2333 { "left", SAMPLE_NOLOOP },
2334 { "right", SAMPLE_NOLOOP },
2335 { "", 0 }
2336 };
2337
2338 STD_SAMPLE_PICK(Twotiger)
STD_SAMPLE_FN(Twotiger)2339 STD_SAMPLE_FN(Twotiger)
2340
2341 static void twotiger_op4_write(UINT8, UINT8 data)
2342 {
2343 if (~data & 2) {
2344 BurnSamplePause(0);
2345 BurnSamplePause(1);
2346 }
2347 else if (!BurnSampleGetStatus(0)) {
2348 BurnSampleResume(0);
2349 BurnSampleResume(1);
2350 }
2351 }
2352
TwotigerInit()2353 static INT32 TwotigerInit()
2354 {
2355 INT32 nRet = DrvInit(90010);
2356
2357 if (nRet == 0)
2358 {
2359 is_twotiger = 1;
2360 BurnSampleSetRoute(0, BURN_SND_SAMPLE_ROUTE_1, 0.50, BURN_SND_ROUTE_LEFT);
2361 BurnSampleSetRoute(0, BURN_SND_SAMPLE_ROUTE_2, 0.50, BURN_SND_ROUTE_LEFT);
2362 BurnSampleSetRoute(1, BURN_SND_SAMPLE_ROUTE_1, 0.50, BURN_SND_ROUTE_RIGHT);
2363 BurnSampleSetRoute(1, BURN_SND_SAMPLE_ROUTE_2, 0.50, BURN_SND_ROUTE_RIGHT);
2364 ssio_set_custom_output(4, 0xff, twotiger_op4_write);
2365
2366 ZetOpen(0);
2367 ZetUnmapMemory(0xe800, 0xefff, MAP_RAM);
2368 ZetUnmapMemory(0xf800, 0xffff, MAP_RAM);
2369 ZetSetWriteHandler(twotiger_vidram_write);
2370 ZetSetReadHandler(twotiger_vidram_read);
2371 ZetClose();
2372 }
2373
2374 return nRet;
2375 }
2376
2377 struct BurnDriver BurnDrvTwotiger = {
2378 "twotiger", NULL, "midssio", "twotiger", "1984",
2379 "Two Tigers (dedicated)\0", NULL, "Bally Midway", "Miscellaneous",
2380 NULL, NULL, NULL, NULL,
2381 BDF_GAME_WORKING | BDF_CLONE, 2, HARDWARE_MISC_PRE90S, GBF_SHOOT, 0,
2382 NULL, twotigerRomInfo, twotigerRomName, NULL, NULL, TwotigerSampleInfo, TwotigerSampleName, TwotigerInputInfo, TwotigerDIPInfo,
2383 TwotigerInit, DrvExit, DrvFrame, DrvDraw, DrvScan, &DrvRecalc, 0x40,
2384 512, 480, 4, 3
2385 };
2386
2387
2388 // Two Tigers (Tron conversion)
2389
2390 static struct BurnRomInfo twotigercRomDesc[] = {
2391 { "2tgrpg0.bin", 0x2000, 0xe77a924b, 1 | BRF_PRG | BRF_ESS }, // 0 maincpu
2392 { "2tgrpg1.bin", 0x2000, 0x2699ebdc, 1 | BRF_PRG | BRF_ESS }, // 1
2393 { "2tgrpg2.bin", 0x2000, 0xb5ca3f17, 1 | BRF_PRG | BRF_ESS }, // 2
2394 { "2tgrpg3.bin", 0x2000, 0x8aa82049, 1 | BRF_PRG | BRF_ESS }, // 3
2395
2396 { "2tgra7.bin", 0x1000, 0x4620d970, 2 | BRF_PRG | BRF_ESS }, // 4 ssio:cpu
2397 { "2tgra8.bin", 0x1000, 0xe95d8cfe, 2 | BRF_PRG | BRF_ESS }, // 5
2398 { "2tgra9.bin", 0x1000, 0x81e6ce0e, 2 | BRF_PRG | BRF_ESS }, // 6
2399
2400 { "2tgrbg0.bin", 0x2000, 0x52f69068, 3 | BRF_GRA }, // 7 gfx1
2401 { "2tgrbg1.bin", 0x2000, 0x758d4f7d, 3 | BRF_GRA }, // 8
2402
2403 { "2tgrfg0.bin", 0x2000, 0x4abf3ca0, 4 | BRF_GRA }, // 9 gfx2
2404 { "2tgrfg1.bin", 0x2000, 0xfbcaffa5, 4 | BRF_GRA }, // 10
2405 { "2tgrfg2.bin", 0x2000, 0x08e3e1a6, 4 | BRF_GRA }, // 11
2406 { "2tgrfg3.bin", 0x2000, 0x9b22697b, 4 | BRF_GRA }, // 12
2407 };
2408
STDROMPICKEXT(twotigerc,twotigerc,Ssioprom)2409 STDROMPICKEXT(twotigerc, twotigerc, Ssioprom)
2410 STD_ROM_FN(twotigerc)
2411
2412 static INT32 TwotigercInit()
2413 {
2414 return DrvInit(90010);
2415 }
2416
2417 struct BurnDriverD BurnDrvTwotigerc = {
2418 "twotigerc", "twotiger", "midssio", NULL, "1984",
2419 "Two Tigers (Tron conversion)\0", NULL, "Bally Midway", "Miscellaneous",
2420 NULL, NULL, NULL, NULL,
2421 BDF_GAME_NOT_WORKING | BDF_CLONE, 2, HARDWARE_MISC_PRE90S, GBF_SHOOT, 0,
2422 NULL, twotigercRomInfo, twotigercRomName, NULL, NULL, NULL, NULL, TronInputInfo, TronDIPInfo,//, TwotigrcInputInfo, TwotigrcDIPInfo,
2423 TwotigercInit, DrvExit, DrvFrame, DrvDraw, DrvScan, &DrvRecalc, 0x40,
2424 512, 480, 4, 3
2425 };
2426
2427
2428 // Tapper (Budweiser, 1/27/84)
2429
2430 static struct BurnRomInfo tapperRomDesc[] = {
2431 { "tapper_c.p.u._pg_0_1c_1-27-84.1c", 0x4000, 0xbb060bb0, 1 | BRF_PRG | BRF_ESS }, // 0 maincpu
2432 { "tapper_c.p.u._pg_1_2c_1-27-84.2c", 0x4000, 0xfd9acc22, 1 | BRF_PRG | BRF_ESS }, // 1
2433 { "tapper_c.p.u._pg_2_3c_1-27-84.3c", 0x4000, 0xb3755d41, 1 | BRF_PRG | BRF_ESS }, // 2
2434 { "tapper_c.p.u._pg_3_4c_1-27-84.4c", 0x2000, 0x77273096, 1 | BRF_PRG | BRF_ESS }, // 3
2435
2436 { "tapper_sound_snd_0_a7_12-7-83.a7", 0x1000, 0x0e8bb9d5, 2 | BRF_PRG | BRF_ESS }, // 4 ssio:cpu
2437 { "tapper_sound_snd_1_a8_12-7-83.a8", 0x1000, 0x0cf0e29b, 2 | BRF_PRG | BRF_ESS }, // 5
2438 { "tapper_sound_snd_2_a9_12-7-83.a9", 0x1000, 0x31eb6dc6, 2 | BRF_PRG | BRF_ESS }, // 6
2439 { "tapper_sound_snd_3_a10_12-7-83.a10", 0x1000, 0x01a9be6a, 2 | BRF_PRG | BRF_ESS }, // 7
2440
2441 { "tapper_c.p.u._bg_1_6f_12-7-83.6f", 0x4000, 0x2a30238c, 3 | BRF_GRA }, // 8 gfx1
2442 { "tapper_c.p.u._bg_0_5f_12-7-83.5f", 0x4000, 0x394ab576, 3 | BRF_GRA }, // 9
2443
2444 { "tapper_video_fg_1_a7_12-7-83.a7", 0x4000, 0x32509011, 4 | BRF_GRA }, // 10 gfx2
2445 { "tapper_video_fg_0_a8_12-7-83.a8", 0x4000, 0x8412c808, 4 | BRF_GRA }, // 11
2446 { "tapper_video_fg_3_a5_12-7-83.a5", 0x4000, 0x818fffd4, 4 | BRF_GRA }, // 12
2447 { "tapper_video_fg_2_a6_12-7-83.a6", 0x4000, 0x67e37690, 4 | BRF_GRA }, // 13
2448 { "tapper_video_fg_5_a3_12-7-83.a3", 0x4000, 0x800f7c8a, 4 | BRF_GRA }, // 14
2449 { "tapper_video_fg_4_a4_12-7-83.a4", 0x4000, 0x32674ee6, 4 | BRF_GRA }, // 15
2450 { "tapper_video_fg_7_a1_12-7-83.a1", 0x4000, 0x070b4c81, 4 | BRF_GRA }, // 16
2451 { "tapper_video_fg_6_a2_12-7-83.a2", 0x4000, 0xa37aef36, 4 | BRF_GRA }, // 17
2452 };
2453
STDROMPICKEXT(tapper,tapper,Ssioprom)2454 STDROMPICKEXT(tapper, tapper, Ssioprom)
2455 STD_ROM_FN(tapper)
2456
2457 static INT32 TapperInit()
2458 {
2459 return DrvInit(91490);
2460 }
2461
2462 struct BurnDriver BurnDrvTapper = {
2463 "tapper", NULL, "midssio", NULL, "1983",
2464 "Tapper (Budweiser, 1/27/84)\0", NULL, "Bally Midway", "Miscellaneous",
2465 NULL, NULL, NULL, NULL,
2466 BDF_GAME_WORKING, 2, HARDWARE_MISC_PRE90S, GBF_ACTION, 0,
2467 NULL, tapperRomInfo, tapperRomName, NULL, NULL, NULL, NULL, TapperInputInfo, TapperDIPInfo,
2468 TapperInit, DrvExit, DrvFrame, DrvDraw, DrvScan, &DrvRecalc, 0x40,
2469 512, 480, 4, 3
2470 };
2471
2472
2473 // Tapper (Budweiser, 1/27/84 - Alternate graphics)
2474
2475 static struct BurnRomInfo tappergRomDesc[] = {
2476 { "tapper_c.p.u._pg_0_1c_1-27-84.1c", 0x4000, 0xbb060bb0, 1 | BRF_PRG | BRF_ESS }, // 0 maincpu
2477 { "tapper_c.p.u._pg_1_2c_1-27-84.2c", 0x4000, 0xfd9acc22, 1 | BRF_PRG | BRF_ESS }, // 1
2478 { "tapper_c.p.u._pg_2_3c_1-27-84.3c", 0x4000, 0xb3755d41, 1 | BRF_PRG | BRF_ESS }, // 2
2479 { "tapper_c.p.u._pg_3_4c_1-27-84.4c", 0x2000, 0x77273096, 1 | BRF_PRG | BRF_ESS }, // 3
2480
2481 { "tapper_sound_snd_0_a7_12-7-83.a7", 0x1000, 0x0e8bb9d5, 2 | BRF_PRG | BRF_ESS }, // 4 ssio:cpu
2482 { "tapper_sound_snd_1_a8_12-7-83.a8", 0x1000, 0x0cf0e29b, 2 | BRF_PRG | BRF_ESS }, // 5
2483 { "tapper_sound_snd_2_a9_12-7-83.a9", 0x1000, 0x31eb6dc6, 2 | BRF_PRG | BRF_ESS }, // 6
2484 { "tapper_sound_snd_3_a10_12-7-83.a10", 0x1000, 0x01a9be6a, 2 | BRF_PRG | BRF_ESS }, // 7
2485
2486 { "tapper_c.p.u._bg_1_6f_12-7-83.6f", 0x4000, 0x2a30238c, 3 | BRF_GRA }, // 8 gfx1
2487 { "tapper_c.p.u._bg_0_5f_12-7-83.5f", 0x4000, 0x394ab576, 3 | BRF_GRA }, // 9
2488
2489 { "fg1_a7.128", 0x4000, 0xbac70b69, 4 | BRF_GRA }, // 10 gfx2
2490 { "fg0_a8.128", 0x4000, 0xc300925d, 4 | BRF_GRA }, // 11
2491 { "fg3_a5.128", 0x4000, 0xecff6c23, 4 | BRF_GRA }, // 12
2492 { "fg2_a6.128", 0x4000, 0xa4f2d1be, 4 | BRF_GRA }, // 13
2493 { "fg5_a3.128", 0x4000, 0x16ce38cb, 4 | BRF_GRA }, // 14
2494 { "fg4_a4.128", 0x4000, 0x082a4059, 4 | BRF_GRA }, // 15
2495 { "fg7_a1.128", 0x4000, 0x3b476abe, 4 | BRF_GRA }, // 16
2496 { "fg6_a2.128", 0x4000, 0x6717264c, 4 | BRF_GRA }, // 17
2497 };
2498
2499 STDROMPICKEXT(tapperg, tapperg, Ssioprom)
2500 STD_ROM_FN(tapperg)
2501
2502 struct BurnDriver BurnDrvTapperg = {
2503 "tapperg", "tapper", "midssio", NULL, "1983",
2504 "Tapper (Budweiser, 1/27/84 - Alternate graphics)\0", NULL, "Bally Midway", "Miscellaneous",
2505 NULL, NULL, NULL, NULL,
2506 BDF_GAME_WORKING | BDF_CLONE, 2, HARDWARE_MISC_PRE90S, GBF_ACTION, 0,
2507 NULL, tappergRomInfo, tappergRomName, NULL, NULL, NULL, NULL, TapperInputInfo, TapperDIPInfo,
2508 TapperInit, DrvExit, DrvFrame, DrvDraw, DrvScan, &DrvRecalc, 0x40,
2509 512, 480, 4, 3
2510 };
2511
2512
2513 // Tapper (Budweiser, 12/9/83)
2514
2515 static struct BurnRomInfo tapperaRomDesc[] = {
2516 { "tapper_c.p.u._pg_0_1c_12-9-83.1c", 0x4000, 0x496a8e04, 1 | BRF_PRG | BRF_ESS }, // 0 maincpu
2517 { "tapper_c.p.u._pg_1_2c_12-9-83.2c", 0x4000, 0xe79c4b0c, 1 | BRF_PRG | BRF_ESS }, // 1
2518 { "tapper_c.p.u._pg_2_3c_12-9-83.3c", 0x4000, 0x3034ccf0, 1 | BRF_PRG | BRF_ESS }, // 2
2519 { "tapper_c.p.u._pg_3_4c_12-9-83.4c", 0x2000, 0x2dc99e05, 1 | BRF_PRG | BRF_ESS }, // 3
2520
2521 { "tapper_sound_snd_0_a7_12-7-83.a7", 0x1000, 0x0e8bb9d5, 2 | BRF_PRG | BRF_ESS }, // 4 ssio:cpu
2522 { "tapper_sound_snd_1_a8_12-7-83.a8", 0x1000, 0x0cf0e29b, 2 | BRF_PRG | BRF_ESS }, // 5
2523 { "tapper_sound_snd_2_a9_12-7-83.a9", 0x1000, 0x31eb6dc6, 2 | BRF_PRG | BRF_ESS }, // 6
2524 { "tapper_sound_snd_3_a10_12-7-83.a10", 0x1000, 0x01a9be6a, 2 | BRF_PRG | BRF_ESS }, // 7
2525
2526 { "tapper_c.p.u._bg_1_6f_12-7-83.6f", 0x4000, 0x2a30238c, 3 | BRF_GRA }, // 8 gfx1
2527 { "tapper_c.p.u._bg_0_5f_12-7-83.5f", 0x4000, 0x394ab576, 3 | BRF_GRA }, // 9
2528
2529 { "tapper_video_fg_1_a7_12-7-83.a7", 0x4000, 0x32509011, 4 | BRF_GRA }, // 10 gfx2
2530 { "tapper_video_fg_0_a8_12-7-83.a8", 0x4000, 0x8412c808, 4 | BRF_GRA }, // 11
2531 { "tapper_video_fg_3_a5_12-7-83.a5", 0x4000, 0x818fffd4, 4 | BRF_GRA }, // 12
2532 { "tapper_video_fg_2_a6_12-7-83.a6", 0x4000, 0x67e37690, 4 | BRF_GRA }, // 13
2533 { "tapper_video_fg_5_a3_12-7-83.a3", 0x4000, 0x800f7c8a, 4 | BRF_GRA }, // 14
2534 { "tapper_video_fg_4_a4_12-7-83.a4", 0x4000, 0x32674ee6, 4 | BRF_GRA }, // 15
2535 { "tapper_video_fg_7_a1_12-7-83.a1", 0x4000, 0x070b4c81, 4 | BRF_GRA }, // 16
2536 { "tapper_video_fg_6_a2_12-7-83.a2", 0x4000, 0xa37aef36, 4 | BRF_GRA }, // 17
2537 };
2538
2539 STDROMPICKEXT(tappera, tappera, Ssioprom)
2540 STD_ROM_FN(tappera)
2541
2542 struct BurnDriver BurnDrvTappera = {
2543 "tappera", "tapper", "midssio", NULL, "1983",
2544 "Tapper (Budweiser, 12/9/83)\0", NULL, "Bally Midway", "Miscellaneous",
2545 NULL, NULL, NULL, NULL,
2546 BDF_GAME_WORKING | BDF_CLONE, 2, HARDWARE_MISC_PRE90S, GBF_ACTION, 0,
2547 NULL, tapperaRomInfo, tapperaRomName, NULL, NULL, NULL, NULL, TapperInputInfo, TapperDIPInfo,
2548 TapperInit, DrvExit, DrvFrame, DrvDraw, DrvScan, &DrvRecalc, 0x40,
2549 512, 480, 4, 3
2550 };
2551
2552
2553 // Tapper (Budweiser, Date Unknown)
2554
2555 static struct BurnRomInfo tapperbRomDesc[] = {
2556 { "tapper_c.p.u._pg_0_1c.1c", 0x4000, 0x127171d1, 1 | BRF_PRG | BRF_ESS }, // 0 maincpu
2557 { "tapper_c.p.u._pg_1_2c.1c", 0x4000, 0x9d6a47f7, 1 | BRF_PRG | BRF_ESS }, // 1
2558 { "tapper_c.p.u._pg_2_3c.3c", 0x4000, 0x3a1f8778, 1 | BRF_PRG | BRF_ESS }, // 2
2559 { "tapper_c.p.u._pg_3_4c.4c", 0x2000, 0xe8dcdaa4, 1 | BRF_PRG | BRF_ESS }, // 3
2560
2561 { "tapper_sound_snd_0_a7_12-7-83.a7", 0x1000, 0x0e8bb9d5, 2 | BRF_PRG | BRF_ESS }, // 4 ssio:cpu
2562 { "tapper_sound_snd_1_a8_12-7-83.a8", 0x1000, 0x0cf0e29b, 2 | BRF_PRG | BRF_ESS }, // 5
2563 { "tapper_sound_snd_2_a9_12-7-83.a9", 0x1000, 0x31eb6dc6, 2 | BRF_PRG | BRF_ESS }, // 6
2564 { "tapper_sound_snd_3_a10_12-7-83.a10", 0x1000, 0x01a9be6a, 2 | BRF_PRG | BRF_ESS }, // 7
2565
2566 { "tapper_c.p.u._bg_1_6f_12-7-83.6f", 0x4000, 0x2a30238c, 3 | BRF_GRA }, // 8 gfx1
2567 { "tapper_c.p.u._bg_0_5f_12-7-83.5f", 0x4000, 0x394ab576, 3 | BRF_GRA }, // 9
2568
2569 { "tapper_video_fg_1_a7_12-7-83.a7", 0x4000, 0x32509011, 4 | BRF_GRA }, // 10 gfx2
2570 { "tapper_video_fg_0_a8_12-7-83.a8", 0x4000, 0x8412c808, 4 | BRF_GRA }, // 11
2571 { "tapper_video_fg_3_a5_12-7-83.a5", 0x4000, 0x818fffd4, 4 | BRF_GRA }, // 12
2572 { "tapper_video_fg_2_a6_12-7-83.a6", 0x4000, 0x67e37690, 4 | BRF_GRA }, // 13
2573 { "tapper_video_fg_5_a3_12-7-83.a3", 0x4000, 0x800f7c8a, 4 | BRF_GRA }, // 14
2574 { "tapper_video_fg_4_a4_12-7-83.a4", 0x4000, 0x32674ee6, 4 | BRF_GRA }, // 15
2575 { "tapper_video_fg_7_a1_12-7-83.a1", 0x4000, 0x070b4c81, 4 | BRF_GRA }, // 16
2576 { "tapper_video_fg_6_a2_12-7-83.a2", 0x4000, 0xa37aef36, 4 | BRF_GRA }, // 17
2577 };
2578
2579 STDROMPICKEXT(tapperb, tapperb, Ssioprom)
2580 STD_ROM_FN(tapperb)
2581
2582 struct BurnDriver BurnDrvTapperb = {
2583 "tapperb", "tapper", "midssio", NULL, "1983",
2584 "Tapper (Budweiser, Date Unknown)\0", NULL, "Bally Midway", "Miscellaneous",
2585 NULL, NULL, NULL, NULL,
2586 BDF_GAME_WORKING | BDF_CLONE, 2, HARDWARE_MISC_PRE90S, GBF_ACTION, 0,
2587 NULL, tapperbRomInfo, tapperbRomName, NULL, NULL, NULL, NULL, TapperInputInfo, TapperDIPInfo,
2588 TapperInit, DrvExit, DrvFrame, DrvDraw, DrvScan, &DrvRecalc, 0x40,
2589 512, 480, 4, 3
2590 };
2591
2592
2593 // Tapper (Suntory)
2594
2595 static struct BurnRomInfo sutapperRomDesc[] = {
2596 { "epr-5791", 0x4000, 0x87119cc4, 1 | BRF_PRG | BRF_ESS }, // 0 maincpu
2597 { "epr-5792", 0x4000, 0x4c23ad89, 1 | BRF_PRG | BRF_ESS }, // 1
2598 { "epr-5793", 0x4000, 0xfecbf683, 1 | BRF_PRG | BRF_ESS }, // 2
2599 { "epr-5794", 0x2000, 0x5bdc1916, 1 | BRF_PRG | BRF_ESS }, // 3
2600
2601 { "epr-5788.h11.ic8", 0x1000, 0x5c1d0982, 2 | BRF_PRG | BRF_ESS }, // 4 ssio:cpu
2602 { "epr-5787.h10.ic6", 0x1000, 0x09e74ed8, 2 | BRF_PRG | BRF_ESS }, // 5
2603 { "epr-5786.h9.ic5", 0x1000, 0xc3e98284, 2 | BRF_PRG | BRF_ESS }, // 6
2604 { "epr-5785.h7.ic4", 0x1000, 0xced2fd47, 2 | BRF_PRG | BRF_ESS }, // 7
2605
2606 { "epr-5790", 0x4000, 0xac1558c1, 3 | BRF_GRA }, // 8 gfx1
2607 { "epr-5789", 0x4000, 0xfa66cab5, 3 | BRF_GRA }, // 9
2608
2609 { "epr-5795", 0x4000, 0x5d987c92, 4 | BRF_GRA }, // 10 gfx2
2610 { "epr-5796", 0x4000, 0xde5700b4, 4 | BRF_GRA }, // 11
2611 { "epr-5797", 0x4000, 0xf10a1d05, 4 | BRF_GRA }, // 12
2612 { "epr-5798", 0x4000, 0x614990cd, 4 | BRF_GRA }, // 13
2613 { "epr-5799", 0x4000, 0x02c69432, 4 | BRF_GRA }, // 14
2614 { "epr-5800", 0x4000, 0xebf1f948, 4 | BRF_GRA }, // 15
2615 { "epr-5801", 0x4000, 0xd70defa7, 4 | BRF_GRA }, // 16
2616 { "epr-5802", 0x4000, 0xd4f114b9, 4 | BRF_GRA }, // 17
2617 };
2618
2619 STDROMPICKEXT(sutapper, sutapper, Ssioprom)
2620 STD_ROM_FN(sutapper)
2621
2622 struct BurnDriver BurnDrvSutapper = {
2623 "sutapper", "tapper", "midssio", NULL, "1983",
2624 "Tapper (Suntory)\0", NULL, "Bally Midway", "Miscellaneous",
2625 NULL, NULL, NULL, NULL,
2626 BDF_GAME_WORKING | BDF_CLONE, 2, HARDWARE_MISC_PRE90S, GBF_ACTION, 0,
2627 NULL, sutapperRomInfo, sutapperRomName, NULL, NULL, NULL, NULL, TapperInputInfo, TapperDIPInfo,
2628 TapperInit, DrvExit, DrvFrame, DrvDraw, DrvScan, &DrvRecalc, 0x40,
2629 512, 480, 4, 3
2630 };
2631
2632
2633 // Tapper (Root Beer)
2634
2635 static struct BurnRomInfo rbtapperRomDesc[] = {
2636 { "rbtpg0.bin", 0x4000, 0x20b9adf4, 1 | BRF_PRG | BRF_ESS }, // 0 maincpu
2637 { "rbtpg1.bin", 0x4000, 0x87e616c2, 1 | BRF_PRG | BRF_ESS }, // 1
2638 { "rbtpg2.bin", 0x4000, 0x0b332c97, 1 | BRF_PRG | BRF_ESS }, // 2
2639 { "rbtpg3.bin", 0x2000, 0x698c06f2, 1 | BRF_PRG | BRF_ESS }, // 3
2640
2641 { "5788", 0x1000, 0x5c1d0982, 2 | BRF_PRG | BRF_ESS }, // 4 ssio:cpu
2642 { "5787", 0x1000, 0x09e74ed8, 2 | BRF_PRG | BRF_ESS }, // 5
2643 { "5786", 0x1000, 0xc3e98284, 2 | BRF_PRG | BRF_ESS }, // 6
2644 { "5785", 0x1000, 0xced2fd47, 2 | BRF_PRG | BRF_ESS }, // 7
2645
2646 { "rbtbg1.bin", 0x4000, 0x44dfa483, 3 | BRF_GRA }, // 8 gfx1
2647 { "rbtbg0.bin", 0x4000, 0x510b13de, 3 | BRF_GRA }, // 9
2648
2649 { "rbtfg1.bin", 0x4000, 0x1c0b8791, 4 | BRF_GRA }, // 10 gfx2
2650 { "rbtfg0.bin", 0x4000, 0xe99f6018, 4 | BRF_GRA }, // 11
2651 { "rbtfg3.bin", 0x4000, 0x3e725e77, 4 | BRF_GRA }, // 12
2652 { "rbtfg2.bin", 0x4000, 0x4ee8b624, 4 | BRF_GRA }, // 13
2653 { "rbtfg5.bin", 0x4000, 0x9eeca46e, 4 | BRF_GRA }, // 14
2654 { "rbtfg4.bin", 0x4000, 0x8c79e7d7, 4 | BRF_GRA }, // 15
2655 { "rbtfg7.bin", 0x4000, 0x8dbf0c36, 4 | BRF_GRA }, // 16
2656 { "rbtfg6.bin", 0x4000, 0x441201a0, 4 | BRF_GRA }, // 17
2657 };
2658
2659 STDROMPICKEXT(rbtapper, rbtapper, Ssioprom)
2660 STD_ROM_FN(rbtapper)
2661
2662 struct BurnDriver BurnDrvRbtapper = {
2663 "rbtapper", "tapper", "midssio", NULL, "1984",
2664 "Tapper (Root Beer)\0", NULL, "Bally Midway", "Miscellaneous",
2665 NULL, NULL, NULL, NULL,
2666 BDF_GAME_WORKING | BDF_CLONE, 2, HARDWARE_MISC_PRE90S, GBF_ACTION, 0,
2667 NULL, rbtapperRomInfo, rbtapperRomName, NULL, NULL, NULL, NULL, TapperInputInfo, TapperDIPInfo,
2668 TapperInit, DrvExit, DrvFrame, DrvDraw, DrvScan, &DrvRecalc, 0x40,
2669 512, 480, 4, 3
2670 };
2671
2672
2673 // Kozmik Kroozr
2674
2675 static struct BurnRomInfo kroozrRomDesc[] = {
2676 { "kozmkcpu.2d", 0x2000, 0x61e02045, 1 | BRF_PRG | BRF_ESS }, // 0 maincpu
2677 { "kozmkcpu.3d", 0x2000, 0xcaabed57, 1 | BRF_PRG | BRF_ESS }, // 1
2678 { "kozmkcpu.4d", 0x2000, 0x2bc83fc7, 1 | BRF_PRG | BRF_ESS }, // 2
2679 { "kozmkcpu.5d", 0x2000, 0xa0ec38c1, 1 | BRF_PRG | BRF_ESS }, // 3
2680 { "kozmkcpu.6d", 0x2000, 0x7044f2b6, 1 | BRF_PRG | BRF_ESS }, // 4
2681
2682 { "kozmksnd.7a", 0x1000, 0x6736e433, 2 | BRF_PRG | BRF_ESS }, // 5 ssio:cpu
2683 { "kozmksnd.8a", 0x1000, 0xea9cd919, 2 | BRF_PRG | BRF_ESS }, // 6
2684 { "kozmksnd.9a", 0x1000, 0x9dfa7994, 2 | BRF_PRG | BRF_ESS }, // 7
2685
2686 { "kozmkcpu.3g", 0x2000, 0xeda6ed2d, 3 | BRF_GRA }, // 8 gfx1
2687 { "kozmkcpu.4g", 0x2000, 0xddde894b, 3 | BRF_GRA }, // 9
2688
2689 { "kozmkvid.1e", 0x2000, 0xca60e2cc, 4 | BRF_GRA }, // 10 gfx2
2690 { "kozmkvid.1d", 0x2000, 0x4e23b35b, 4 | BRF_GRA }, // 11
2691 { "kozmkvid.1b", 0x2000, 0xc6041ba7, 4 | BRF_GRA }, // 12
2692 { "kozmkvid.1a", 0x2000, 0xb57fb0ff, 4 | BRF_GRA }, // 13
2693 };
2694
STDROMPICKEXT(kroozr,kroozr,Ssioprom)2695 STDROMPICKEXT(kroozr, kroozr, Ssioprom)
2696 STD_ROM_FN(kroozr)
2697
2698 static INT32 KroozrInit()
2699 {
2700 INT32 nRet = DrvInit(90010);
2701
2702 if (nRet == 0)
2703 {
2704 has_dial = 1;
2705 is_kroozr = 1;
2706 ssio_set_custom_input(1, 0x7f, kroozr_ip1_read);
2707 }
2708
2709 return nRet;
2710 }
2711
2712 struct BurnDriver BurnDrvKroozr = {
2713 "kroozr", NULL, "midssio", NULL, "1982",
2714 "Kozmik Kroozr\0", NULL, "Bally Midway", "Miscellaneous",
2715 NULL, NULL, NULL, NULL,
2716 BDF_GAME_WORKING, 2, HARDWARE_MISC_PRE90S, GBF_ACTION | GBF_SHOOT, 0,
2717 NULL, kroozrRomInfo, kroozrRomName, NULL, NULL, NULL, NULL, KroozrInputInfo, KroozrDIPInfo,
2718 KroozrInit, DrvExit, DrvFrame, DrvDraw, DrvScan, &DrvRecalc, 0x40,
2719 512, 480, 4, 3
2720 };
2721
2722
2723 // Journey
2724
2725 static struct BurnRomInfo journeyRomDesc[] = {
2726 { "d2", 0x2000, 0xf2618913, 1 | BRF_PRG | BRF_ESS }, // 0 maincpu
2727 { "d3", 0x2000, 0x2f290d2e, 1 | BRF_PRG | BRF_ESS }, // 1
2728 { "d4", 0x2000, 0xcc6c0150, 1 | BRF_PRG | BRF_ESS }, // 2
2729 { "d5", 0x2000, 0xc3023931, 1 | BRF_PRG | BRF_ESS }, // 3
2730 { "d6", 0x2000, 0x5d445c99, 1 | BRF_PRG | BRF_ESS }, // 4
2731
2732 { "a", 0x1000, 0x2524a2aa, 2 | BRF_PRG | BRF_ESS }, // 5 ssio:cpu
2733 { "b", 0x1000, 0xb8e35814, 2 | BRF_PRG | BRF_ESS }, // 6
2734 { "c", 0x1000, 0x09c488cf, 2 | BRF_PRG | BRF_ESS }, // 7
2735 { "d", 0x1000, 0x3d627bee, 2 | BRF_PRG | BRF_ESS }, // 8
2736
2737 { "g3", 0x2000, 0xc14558de, 3 | BRF_GRA }, // 9 gfx1
2738 { "g4", 0x2000, 0x9104c1d0, 3 | BRF_GRA }, // 10
2739
2740 { "a7", 0x2000, 0x4ca2bb2d, 4 | BRF_GRA }, // 11 gfx2
2741 { "a8", 0x2000, 0x4fb7925d, 4 | BRF_GRA }, // 12
2742 { "a5", 0x2000, 0x560c474f, 4 | BRF_GRA }, // 13
2743 { "a6", 0x2000, 0xb1f31583, 4 | BRF_GRA }, // 14
2744 { "a3", 0x2000, 0xf295afda, 4 | BRF_GRA }, // 15
2745 { "a4", 0x2000, 0x765876a7, 4 | BRF_GRA }, // 16
2746 { "a1", 0x2000, 0x4af986f8, 4 | BRF_GRA }, // 17
2747 { "a2", 0x2000, 0xb30cd2a7, 4 | BRF_GRA }, // 18
2748 };
2749
2750 STDROMPICKEXT(journey, journey, Ssioprom)
2751 STD_ROM_FN(journey)
2752
2753 static struct BurnSampleInfo JourneySampleDesc[] = {
2754 { "sepways", SAMPLE_NOLOOP },
2755 { "", 0 }
2756 };
2757
2758 STD_SAMPLE_PICK(Journey)
STD_SAMPLE_FN(Journey)2759 STD_SAMPLE_FN(Journey)
2760
2761 static void journey_op4_write(UINT8, UINT8 data)
2762 {
2763 if ((data & 1) == 0) {
2764 BurnSampleStop(0);
2765 }
2766 else if (!BurnSampleGetStatus(0)) {
2767 BurnSamplePlay(0);
2768 }
2769 }
2770
JourneyInit()2771 static INT32 JourneyInit()
2772 {
2773 INT32 nRet = DrvInit(91475);
2774
2775 if (nRet == 0)
2776 {
2777 ssio_set_custom_output(4, 0xff, journey_op4_write);
2778 }
2779
2780 return nRet;
2781 }
2782
2783 struct BurnDriver BurnDrvJourney = {
2784 "journey", NULL, "midssio", "journey", "1983",
2785 "Journey\0", NULL, "Bally Midway", "Miscellaneous",
2786 NULL, NULL, NULL, NULL,
2787 BDF_GAME_WORKING | BDF_ORIENTATION_VERTICAL | BDF_ORIENTATION_FLIPPED, 2, HARDWARE_MISC_PRE90S, GBF_ACTION, 0,
2788 NULL, journeyRomInfo, journeyRomName, NULL, NULL, JourneySampleInfo, JourneySampleName, JourneyInputInfo, JourneyDIPInfo,
2789 JourneyInit, DrvExit, DrvFrame, DrvDraw, DrvScan, &DrvRecalc, 0x80,
2790 480, 512, 3, 4
2791 };
2792
2793
2794 // Timber
2795
2796 static struct BurnRomInfo timberRomDesc[] = {
2797 { "timpg0.bin", 0x4000, 0x377032ab, 1 | BRF_PRG | BRF_ESS }, // 0 maincpu
2798 { "timpg1.bin", 0x4000, 0xfd772836, 1 | BRF_PRG | BRF_ESS }, // 1
2799 { "timpg2.bin", 0x4000, 0x632989f9, 1 | BRF_PRG | BRF_ESS }, // 2
2800 { "timpg3.bin", 0x2000, 0xdae8a0dc, 1 | BRF_PRG | BRF_ESS }, // 3
2801
2802 { "tima7.bin", 0x1000, 0xc615dc3e, 2 | BRF_PRG | BRF_ESS }, // 4 ssio:cpu
2803 { "tima8.bin", 0x1000, 0x83841c87, 2 | BRF_PRG | BRF_ESS }, // 5
2804 { "tima9.bin", 0x1000, 0x22bcdcd3, 2 | BRF_PRG | BRF_ESS }, // 6
2805
2806 { "timbg1.bin", 0x4000, 0xb1cb2651, 3 | BRF_GRA }, // 7 gfx1
2807 { "timbg0.bin", 0x4000, 0x2ae352c4, 3 | BRF_GRA }, // 8
2808
2809 { "timfg1.bin", 0x4000, 0x81de4a73, 4 | BRF_GRA }, // 9 gfx2
2810 { "timfg0.bin", 0x4000, 0x7f3a4f59, 4 | BRF_GRA }, // 10
2811 { "timfg3.bin", 0x4000, 0x37c03272, 4 | BRF_GRA }, // 11
2812 { "timfg2.bin", 0x4000, 0xe2c2885c, 4 | BRF_GRA }, // 12
2813 { "timfg5.bin", 0x4000, 0xeb636216, 4 | BRF_GRA }, // 13
2814 { "timfg4.bin", 0x4000, 0xb7105eb7, 4 | BRF_GRA }, // 14
2815 { "timfg7.bin", 0x4000, 0xd9c27475, 4 | BRF_GRA }, // 15
2816 { "timfg6.bin", 0x4000, 0x244778e8, 4 | BRF_GRA }, // 16
2817 };
2818
STDROMPICKEXT(timber,timber,Ssioprom)2819 STDROMPICKEXT(timber, timber, Ssioprom)
2820 STD_ROM_FN(timber)
2821
2822 static INT32 TimberInit()
2823 {
2824 return DrvInit(91490);
2825 }
2826
2827 struct BurnDriver BurnDrvTimber = {
2828 "timber", NULL, "midssio", NULL, "1984",
2829 "Timber\0", NULL, "Bally Midway", "Miscellaneous",
2830 NULL, NULL, NULL, NULL,
2831 BDF_GAME_WORKING, 2, HARDWARE_MISC_PRE90S, GBF_ACTION, 0,
2832 NULL, timberRomInfo, timberRomName, NULL, NULL, NULL, NULL, TimberInputInfo, TimberDIPInfo,
2833 TimberInit, DrvExit, DrvFrame, DrvDraw, DrvScan, &DrvRecalc, 0x40,
2834 512, 480, 4, 3
2835 };
2836
2837
2838 // Discs of Tron (Upright)
2839
2840 static struct BurnRomInfo dotronRomDesc[] = {
2841 { "loc-pg0.1c", 0x4000, 0xba0da15f, 1 | BRF_PRG | BRF_ESS }, // 0 maincpu
2842 { "loc-pg1.2c", 0x4000, 0xdc300191, 1 | BRF_PRG | BRF_ESS }, // 1
2843 { "loc-pg2.3c", 0x4000, 0xab0b3800, 1 | BRF_PRG | BRF_ESS }, // 2
2844 { "loc-pg1.4c", 0x2000, 0xf98c9f8e, 1 | BRF_PRG | BRF_ESS }, // 3
2845
2846 { "sound0.a7", 0x1000, 0x6d39bf19, 2 | BRF_PRG | BRF_ESS }, // 4 ssio:cpu
2847 { "sound1.a8", 0x1000, 0xac872e1d, 2 | BRF_PRG | BRF_ESS }, // 5
2848 { "sound2.a9", 0x1000, 0xe8ef6519, 2 | BRF_PRG | BRF_ESS }, // 6
2849 { "sound3.a10", 0x1000, 0x6b5aeb02, 2 | BRF_PRG | BRF_ESS }, // 7
2850
2851 { "loc-bg2.6f", 0x2000, 0x40167124, 3 | BRF_GRA }, // 8 gfx1
2852 { "loc-bg1.5f", 0x2000, 0xbb2d7a5d, 3 | BRF_GRA }, // 9
2853
2854 { "loc-g.cp4", 0x2000, 0x57a2b1ff, 4 | BRF_GRA }, // 10 gfx2
2855 { "loc-h.cp3", 0x2000, 0x3bb4d475, 4 | BRF_GRA }, // 11
2856 { "loc-e.cp6", 0x2000, 0xce957f1a, 4 | BRF_GRA }, // 12
2857 { "loc-f.cp5", 0x2000, 0xd26053ce, 4 | BRF_GRA }, // 13
2858 { "loc-c.cp8", 0x2000, 0xef45d146, 4 | BRF_GRA }, // 14
2859 { "loc-d.cp7", 0x2000, 0x5e8a3ef3, 4 | BRF_GRA }, // 15
2860 { "loc-a.cp0", 0x2000, 0xb35f5374, 4 | BRF_GRA }, // 16
2861 { "loc-b.cp9", 0x2000, 0x565a5c48, 4 | BRF_GRA }, // 17
2862 };
2863
STDROMPICKEXT(dotron,dotron,Ssioprom)2864 STDROMPICKEXT(dotron, dotron, Ssioprom)
2865 STD_ROM_FN(dotron)
2866
2867 static void dotron_op4_write(UINT8, UINT8 data)
2868 {
2869 if (has_squak) {
2870 midsat_write(data);
2871 }
2872 }
2873
dotron_ip1_read(UINT8)2874 static UINT8 dotron_ip1_read(UINT8)
2875 {
2876 UINT8 tb = (BurnTrackballRead(0, 0) ) & 0x7f;
2877 BurnTrackballUpdate(0);
2878
2879 return tb;
2880 }
2881
dotron_ip2_read(UINT8)2882 static UINT8 dotron_ip2_read(UINT8)
2883 {
2884 return DrvDips[0];
2885 }
2886
DotronInit()2887 static INT32 DotronInit()
2888 {
2889 nScreenFlip = TMAP_FLIPX;
2890
2891 INT32 nRet = DrvInit(91490);
2892
2893 if (nRet == 0)
2894 {
2895 is_dotron = 1;
2896 has_dial = 1;
2897 ssio_set_custom_input(1, 0xff, dotron_ip1_read);
2898 ssio_set_custom_input(2, 0x80, dotron_ip2_read);
2899 ssio_set_custom_output(4, 0xff, dotron_op4_write);
2900 }
2901
2902 return nRet;
2903 }
2904
DotroneInit()2905 static INT32 DotroneInit()
2906 {
2907 has_squak = 1;
2908
2909 return DotronInit();
2910 }
2911
2912 struct BurnDriver BurnDrvDotron = {
2913 "dotron", NULL, "midssio", NULL, "1983",
2914 "Discs of Tron (Upright)\0", NULL, "Bally Midway", "Miscellaneous",
2915 NULL, NULL, NULL, NULL,
2916 BDF_GAME_WORKING, 2, HARDWARE_MISC_PRE90S, GBF_ACTION | GBF_SHOOT, 0,
2917 NULL, dotronRomInfo, dotronRomName, NULL, NULL, NULL, NULL, DotronInputInfo, DotronDIPInfo,
2918 DotronInit, DrvExit, DrvFrame, DrvDraw, DrvScan, &DrvRecalc, 0x40,
2919 512, 480, 4, 3
2920 };
2921
2922
2923 // Discs of Tron (Upright alternate)
2924
2925 static struct BurnRomInfo dotronaRomDesc[] = {
2926 { "aloc-pg0.1c", 0x4000, 0x40d00195, 1 | BRF_PRG | BRF_ESS }, // 0 maincpu
2927 { "aloc-pg1.2c", 0x4000, 0x5a7d1300, 1 | BRF_PRG | BRF_ESS }, // 1
2928 { "aloc-pg2.3c", 0x4000, 0xcb89c9be, 1 | BRF_PRG | BRF_ESS }, // 2
2929 { "aloc-pg1.4c", 0x2000, 0x5098faf4, 1 | BRF_PRG | BRF_ESS }, // 3
2930
2931 { "asound0.a7", 0x1000, 0x7fb54293, 2 | BRF_PRG | BRF_ESS }, // 4 ssio:cpu
2932 { "asound1.a8", 0x1000, 0xedef7326, 2 | BRF_PRG | BRF_ESS }, // 5
2933 { "sound2.a9", 0x1000, 0xe8ef6519, 2 | BRF_PRG | BRF_ESS }, // 6
2934 { "sound3.a10", 0x1000, 0x6b5aeb02, 2 | BRF_PRG | BRF_ESS }, // 7
2935
2936 { "loc-bg2.6f", 0x2000, 0x40167124, 3 | BRF_GRA }, // 8 gfx1
2937 { "loc-bg1.5f", 0x2000, 0xbb2d7a5d, 3 | BRF_GRA }, // 9
2938
2939 { "loc-g.cp4", 0x2000, 0x57a2b1ff, 4 | BRF_GRA }, // 10 gfx2
2940 { "loc-h.cp3", 0x2000, 0x3bb4d475, 4 | BRF_GRA }, // 11
2941 { "loc-e.cp6", 0x2000, 0xce957f1a, 4 | BRF_GRA }, // 12
2942 { "loc-f.cp5", 0x2000, 0xd26053ce, 4 | BRF_GRA }, // 13
2943 { "loc-c.cp8", 0x2000, 0xef45d146, 4 | BRF_GRA }, // 14
2944 { "loc-d.cp7", 0x2000, 0x5e8a3ef3, 4 | BRF_GRA }, // 15
2945 { "loc-a.cp0", 0x2000, 0xb35f5374, 4 | BRF_GRA }, // 16
2946 { "loc-b.cp9", 0x2000, 0x565a5c48, 4 | BRF_GRA }, // 17
2947 };
2948
2949 STDROMPICKEXT(dotrona, dotrona, Ssioprom)
2950 STD_ROM_FN(dotrona)
2951
2952 struct BurnDriver BurnDrvDotrona = {
2953 "dotrona", "dotron", "midssio", NULL, "1983",
2954 "Discs of Tron (Upright alternate)\0", NULL, "Bally Midway", "Miscellaneous",
2955 NULL, NULL, NULL, NULL,
2956 BDF_GAME_WORKING | BDF_CLONE, 2, HARDWARE_MISC_PRE90S, GBF_ACTION | GBF_SHOOT, 0,
2957 NULL, dotronaRomInfo, dotronaRomName, NULL, NULL, NULL, NULL, DotronInputInfo, DotronDIPInfo,
2958 DotronInit, DrvExit, DrvFrame, DrvDraw, DrvScan, &DrvRecalc, 0x40,
2959 512, 480, 4, 3
2960 };
2961
2962
2963 // Discs of Tron (Environmental)
2964
2965 static struct BurnRomInfo dotroneRomDesc[] = {
2966 { "loc-cpu1", 0x4000, 0xeee31b8c, 1 | BRF_PRG | BRF_ESS }, // 0 maincpu
2967 { "loc-cpu2", 0x4000, 0x75ba6ad3, 1 | BRF_PRG | BRF_ESS }, // 1
2968 { "loc-cpu3", 0x4000, 0x94bb1a0e, 1 | BRF_PRG | BRF_ESS }, // 2
2969 { "loc-cpu4", 0x2000, 0xc137383c, 1 | BRF_PRG | BRF_ESS }, // 3
2970
2971 { "loc-a", 0x1000, 0x2de6a8a8, 2 | BRF_PRG | BRF_ESS }, // 4 ssio:cpu
2972 { "loc-b", 0x1000, 0x4097663e, 2 | BRF_PRG | BRF_ESS }, // 5
2973 { "loc-c", 0x1000, 0xf576b9e7, 2 | BRF_PRG | BRF_ESS }, // 6
2974 { "loc-d", 0x1000, 0x74b0059e, 2 | BRF_PRG | BRF_ESS }, // 7
2975
2976 { "pre.u3", 0x1000, 0xc3d0f762, 3 | BRF_PRG | BRF_ESS }, // 8 snt:cpu
2977 { "pre.u4", 0x1000, 0x7ca79b43, 3 | BRF_PRG | BRF_ESS }, // 9
2978 { "pre.u5", 0x1000, 0x24e9618e, 3 | BRF_PRG | BRF_ESS }, // 10
2979
2980 { "loc-bg2.6f", 0x2000, 0x40167124, 3 | BRF_GRA }, // 11 gfx1
2981 { "loc-bg1.5f", 0x2000, 0xbb2d7a5d, 3 | BRF_GRA }, // 12
2982
2983 { "loc-g.cp4", 0x2000, 0x57a2b1ff, 4 | BRF_GRA }, // 13 gfx2
2984 { "loc-h.cp3", 0x2000, 0x3bb4d475, 4 | BRF_GRA }, // 14
2985 { "loc-e.cp6", 0x2000, 0xce957f1a, 4 | BRF_GRA }, // 15
2986 { "loc-f.cp5", 0x2000, 0xd26053ce, 4 | BRF_GRA }, // 16
2987 { "loc-c.cp8", 0x2000, 0xef45d146, 4 | BRF_GRA }, // 17
2988 { "loc-d.cp7", 0x2000, 0x5e8a3ef3, 4 | BRF_GRA }, // 18
2989 { "loc-a.cp0", 0x2000, 0xb35f5374, 4 | BRF_GRA }, // 19
2990 { "loc-b.cp9", 0x2000, 0x565a5c48, 4 | BRF_GRA }, // 20
2991
2992 // { "edotlamp.u2", 0x0020, 0xfb58b867, 6 | BRF_GRA }, // 21 proms
2993 };
2994
2995 STDROMPICKEXT(dotrone, dotrone, Ssioprom)
2996 STD_ROM_FN(dotrone)
2997
2998 struct BurnDriver BurnDrvDotrone = {
2999 "dotrone", "dotron", "midssio", NULL, "1983",
3000 "Discs of Tron (Environmental)\0", NULL, "Bally Midway", "Miscellaneous",
3001 NULL, NULL, NULL, NULL,
3002 BDF_GAME_WORKING | BDF_CLONE, 2, HARDWARE_MISC_PRE90S, GBF_ACTION | GBF_SHOOT, 0,
3003 NULL, dotroneRomInfo, dotroneRomName, NULL, NULL, NULL, NULL, DotronInputInfo, DotroneDIPInfo,
3004 DotroneInit, DrvExit, DrvFrame, DrvDraw, DrvScan, &DrvRecalc, 0x40,
3005 512, 480, 4, 3
3006 };
3007
3008
3009 // Demolition Derby
3010
3011 static struct BurnRomInfo demoderbRomDesc[] = {
3012 { "demo_drby_pro_0", 0x4000, 0xbe7da2f3, 1 | BRF_PRG | BRF_ESS }, // 0 Z80 #0 Code
3013 { "demo_drby_pro_1", 0x4000, 0xc6f6604c, 1 | BRF_PRG | BRF_ESS }, // 1
3014 { "demo_drby_pro_2", 0x4000, 0xfa93b9d9, 1 | BRF_PRG | BRF_ESS }, // 2
3015 { "demo_drby_pro_3", 0x4000, 0x4e964883, 1 | BRF_PRG | BRF_ESS }, // 3
3016
3017 { "tcs_u5.bin", 0x2000, 0xeca33b2c, 3 | BRF_PRG | BRF_ESS }, // 4 M6809 Code
3018 { "tcs_u4.bin", 0x2000, 0x3490289a, 3 | BRF_PRG | BRF_ESS }, // 5
3019
3020 { "demo_derby_bg_06f.6f", 0x2000, 0xcf80be19, 3 | BRF_GRA }, // 6 Background Tiles
3021 { "demo_derby_bg_15f.5f", 0x2000, 0x4e173e52, 3 | BRF_GRA }, // 7
3022
3023 { "demo_derby_fg0_a4.a4", 0x4000, 0xe57a4de6, 4 | BRF_GRA }, // 8 Sprites
3024 { "demo_derby_fg4_a3.a3", 0x4000, 0x55aa667f, 4 | BRF_GRA }, // 9
3025 { "demo_derby_fg1_a6.a6", 0x4000, 0x70259651, 4 | BRF_GRA }, // 10
3026 { "demo_derby_fg5_a5.a5", 0x4000, 0x5fe99007, 4 | BRF_GRA }, // 11
3027 { "demo_derby_fg2_a8.a8", 0x4000, 0x6cab7b95, 4 | BRF_GRA }, // 12
3028 { "demo_derby_fg6_a7.a7", 0x4000, 0xabfb9a8b, 4 | BRF_GRA }, // 13
3029 { "demo_derby_fg3_a10.a10", 0x4000, 0x801d9b86, 4 | BRF_GRA }, // 14
3030 { "demo_derby_fg7_a9.a9", 0x4000, 0x0ec3f60a, 4 | BRF_GRA }, // 15
3031 };
3032
3033 STD_ROM_PICK(demoderb)
STD_ROM_FN(demoderb)3034 STD_ROM_FN(demoderb)
3035
3036 static void demoderb_op4_write(UINT8, UINT8 data)
3037 {
3038 if (data & 0x40) input_playernum = 1;
3039 if (data & 0x80) input_playernum = 0;
3040
3041 INT32 cycles = (ZetTotalCycles() * 2) / 5;
3042 M6809Open(0);
3043 M6809Run(cycles - M6809TotalCycles());
3044 tcs_data_write(data);
3045 M6809Close();
3046 }
3047
demoderb_ip1_read(UINT8)3048 static UINT8 demoderb_ip1_read(UINT8)
3049 {
3050 UINT8 ipt = DrvInputs[1] & 0x03;
3051 ipt |= (((input_playernum) ? ~BurnTrackballRead(1, 0) : ~BurnTrackballRead(0, 0)) << 2) & 0x3f;
3052
3053 BurnTrackballUpdate(input_playernum);
3054
3055 return ipt;
3056 }
3057
demoderb_ip2_read(UINT8)3058 static UINT8 demoderb_ip2_read(UINT8)
3059 {
3060 UINT8 ipt = DrvInputs[2] & 0x03;
3061 ipt |= (((input_playernum) ? ~BurnTrackballRead(1, 1) : ~BurnTrackballRead(0, 1)) << 2) & 0x3f;
3062
3063 BurnTrackballUpdate(input_playernum);
3064
3065 return ipt;
3066 }
3067
DemoderbInit()3068 static INT32 DemoderbInit()
3069 {
3070 INT32 nRet = DrvInit(91490);
3071
3072 if (nRet == 0)
3073 {
3074 is_demoderb = 1;
3075 ssio_set_custom_input(1, 0xff, demoderb_ip1_read);
3076 ssio_set_custom_input(2, 0xff, demoderb_ip2_read);
3077 ssio_set_custom_output(4, 0xff, demoderb_op4_write);
3078 memmove(DrvTCSROM + 0xc000, DrvTCSROM, 0x4000);
3079 tcs_init(0, 0, 0, DrvTCSROM, DrvZ80RAM1); // actually m6809
3080 }
3081
3082 return nRet;
3083 }
3084
3085 struct BurnDriver BurnDrvDemoderb = {
3086 "demoderb", NULL, NULL, NULL, "1984",
3087 "Demolition Derby\0", NULL, "Bally Midway", "Miscellaneous",
3088 NULL, NULL, NULL, NULL,
3089 BDF_GAME_WORKING, 2, HARDWARE_MISC_PRE90S, GBF_ACTION, 0,
3090 NULL, demoderbRomInfo, demoderbRomName, NULL, NULL, NULL, NULL, DemoderbInputInfo, DemoderbDIPInfo,
3091 DemoderbInit, DrvExit, DrvFrame, DrvDraw, DrvScan, &DrvRecalc, 0x40,
3092 512, 480, 4, 3
3093 };
3094
3095
3096 // Demolition Derby (cocktail)
3097
3098 static struct BurnRomInfo demoderbcRomDesc[] = {
3099 { "dd_pro0", 0x4000, 0x8781b367, 1 | BRF_PRG | BRF_ESS }, // 0 maincpu
3100 { "dd_pro1", 0x4000, 0x4c713bfe, 1 | BRF_PRG | BRF_ESS }, // 1
3101 { "dd_pro2", 0x4000, 0xc2cbd2a4, 1 | BRF_PRG | BRF_ESS }, // 2
3102
3103 { "tcs_u5.bin", 0x2000, 0xeca33b2c, 3 | BRF_PRG | BRF_ESS }, // 3 tcs:cpu
3104 { "tcs_u4.bin", 0x2000, 0x3490289a, 3 | BRF_PRG | BRF_ESS }, // 4
3105
3106 { "demo_derby_bg_06f.6f", 0x2000, 0xcf80be19, 3 | BRF_GRA }, // 5 gfx1
3107 { "demo_derby_bg_15f.5f", 0x2000, 0x4e173e52, 3 | BRF_GRA }, // 6
3108
3109 { "demo_derby_fg0_a4.a4", 0x4000, 0xe57a4de6, 4 | BRF_GRA }, // 7 gfx2
3110 { "demo_derby_fg4_a3.a3", 0x4000, 0x55aa667f, 4 | BRF_GRA }, // 8
3111 { "demo_derby_fg1_a6.a6", 0x4000, 0x70259651, 4 | BRF_GRA }, // 9
3112 { "demo_derby_fg5_a5.a5", 0x4000, 0x5fe99007, 4 | BRF_GRA }, // 10
3113 { "demo_derby_fg2_a8.a8", 0x4000, 0x6cab7b95, 4 | BRF_GRA }, // 11
3114 { "demo_derby_fg6_a7.a7", 0x4000, 0xabfb9a8b, 4 | BRF_GRA }, // 12
3115 { "demo_derby_fg3_a10.a10", 0x4000, 0x801d9b86, 4 | BRF_GRA }, // 13
3116 { "demo_derby_fg7_a9.a9", 0x4000, 0x0ec3f60a, 4 | BRF_GRA }, // 14
3117 };
3118
3119 STD_ROM_PICK(demoderbc)
3120 STD_ROM_FN(demoderbc)
3121
3122 struct BurnDriver BurnDrvDemoderbc = {
3123 "demoderbc", "demoderb", NULL, NULL, "1984",
3124 "Demolition Derby (cocktail)\0", NULL, "Bally Midway", "Miscellaneous",
3125 NULL, NULL, NULL, NULL,
3126 BDF_GAME_WORKING | BDF_CLONE, 2, HARDWARE_MISC_PRE90S, GBF_ACTION, 0,
3127 NULL, demoderbcRomInfo, demoderbcRomName, NULL, NULL, NULL, NULL, DemoderbInputInfo, DemoderbDIPInfo,
3128 DemoderbInit, DrvExit, DrvFrame, DrvDraw, DrvScan, &DrvRecalc, 0x40,
3129 512, 480, 4, 3
3130 };
3131
3132
3133 // NFL Football
3134
3135 static struct BurnRomInfo nflfootRomDesc[] = {
3136 { "nflcpupg.1c", 0x4000, 0xd76a7a41, 1 | BRF_PRG | BRF_ESS }, // 0 maincpu
3137 { "nflcpupg.2c", 0x4000, 0x2aa76168, 1 | BRF_PRG | BRF_ESS }, // 1
3138 { "nflcpupg.3c", 0x4000, 0x5ec01e09, 1 | BRF_PRG | BRF_ESS }, // 2
3139
3140 { "nflsnd.a7", 0x1000, 0x1339be2e, 2 | BRF_PRG | BRF_ESS }, // 3 ssio:cpu
3141 { "nflsnd.a8", 0x1000, 0x8630b560, 2 | BRF_PRG | BRF_ESS }, // 4
3142 { "nflsnd.a9", 0x1000, 0x1e0fe4c8, 2 | BRF_PRG | BRF_ESS }, // 5
3143
3144 { "nfl-sqtk-11-15-83.u2", 0x1000, 0xaeddda31, 3 | BRF_PRG | BRF_ESS }, // 6 snt:cpu
3145 { "nfl-sqtk-11-15-83.u3", 0x1000, 0x36229d13, 3 | BRF_PRG | BRF_ESS }, // 7
3146 { "nfl-sqtk-11-15-83.u4", 0x1000, 0xb202439b, 3 | BRF_PRG | BRF_ESS }, // 8
3147 { "nfl-sqtk-11-15-83.u5", 0x1000, 0xbbfe4d39, 3 | BRF_PRG | BRF_ESS }, // 9
3148
3149 { "ipu-7-9.a2", 0x2000, 0x0e083adb, 4 | BRF_GRA }, // 10 ipu
3150 { "ipu-7-9.a4", 0x2000, 0x5c9c4764, 4 | BRF_GRA }, // 11
3151
3152 { "nflcpubg.6f", 0x2000, 0x6d116cd9, 5 | BRF_GRA }, // 12 gfx1
3153 { "nflcpubg.5f", 0x2000, 0x5f1b0b67, 5 | BRF_GRA }, // 13
3154
3155 { "nflvidfg.cp4", 0x2000, 0xeb6b808d, 6 | BRF_GRA }, // 14 gfx2
3156 { "nflvidfg.cp3", 0x2000, 0xbe21580a, 6 | BRF_GRA }, // 15
3157 { "nflvidfg.cp6", 0x2000, 0x54a0bff8, 6 | BRF_GRA }, // 16
3158 { "nflvidfg.cp5", 0x2000, 0x6aeba0ab, 6 | BRF_GRA }, // 17
3159 { "nflvidfg.cp8", 0x2000, 0x112ee67b, 6 | BRF_GRA }, // 18
3160 { "nflvidfg.cp7", 0x2000, 0x73f62392, 6 | BRF_GRA }, // 19
3161 { "nflvidfg.c10", 0x2000, 0x1766dcc7, 6 | BRF_GRA }, // 20
3162 { "nflvidfg.cp9", 0x2000, 0x46558146, 6 | BRF_GRA }, // 21
3163 };
3164
STDROMPICKEXT(nflfoot,nflfoot,Ssioprom)3165 STDROMPICKEXT(nflfoot, nflfoot, Ssioprom)
3166 STD_ROM_FN(nflfoot)
3167
3168 static INT32 NflfootInit()
3169 {
3170 return 1;
3171 }
3172
3173 struct BurnDriverD BurnDrvNflfoot = {
3174 "nflfoot", NULL, "ssio", NULL, "1983",
3175 "NFL Football\0", NULL, "Bally Midway", "Miscellaneous",
3176 NULL, NULL, NULL, NULL,
3177 BDF_GAME_NOT_WORKING, 2, HARDWARE_MISC_PRE90S, GBF_MISC, 0,
3178 NULL, nflfootRomInfo, nflfootRomName, NULL, NULL, NULL, NULL, TronInputInfo, TronDIPInfo, // NflfootInputInfo, NflfootDIPInfo,
3179 NflfootInit, DrvExit, DrvFrame, DrvDraw, DrvScan, &DrvRecalc, 0x40,
3180 512, 480, 4, 3
3181 };
3182
3183