1 // FB Alpha Twin Cobra driver module
2 // Based on MAME driver by Quench
3 
4 #include "tiles_generic.h"
5 #include "m68000_intf.h"
6 #include "tms32010.h"
7 #include "z80_intf.h"
8 #include "burn_ym3812.h"
9 
10 static UINT8 *AllMem;
11 static UINT8 *MemEnd;
12 static UINT8 *AllRam;
13 static UINT8 *RamEnd;
14 static UINT8 *Drv68KROM;
15 static UINT8 *DrvMCUROM;
16 static UINT8 *DrvZ80ROM;
17 static UINT8 *DrvGfxROM0;
18 static UINT8 *DrvGfxROM1;
19 static UINT8 *DrvGfxROM2;
20 static UINT8 *DrvGfxROM3;
21 static UINT8 *DrvSprRAM;
22 static UINT8 *Drv68KRAM;
23 static UINT8 *DrvMCURAM;
24 static UINT8 *DrvPalRAM;
25 static UINT8 *DrvShareRAM;
26 static UINT8 *DrvBgRAM;
27 static UINT8 *DrvFgRAM;
28 static UINT8 *DrvTxRAM;
29 static UINT8 *DrvSprBuf;
30 
31 static UINT16 *pTempDraw;
32 
33 static UINT32 *DrvPalette;
34 static UINT8 DrvRecalc;
35 
36 static UINT8 DrvJoy1[8];
37 static UINT8 DrvJoy2[8];
38 static UINT8 DrvJoy3[8];
39 static UINT8 DrvJoy4[8];
40 static UINT8 DrvDips[3];
41 static UINT8 DrvReset;
42 static UINT8 DrvInputs[4];
43 
44 static UINT16 scrollx[4];
45 static UINT16 scrolly[4];
46 static UINT16 vidramoffs[4];
47 static INT32 vblank;
48 
49 static UINT16 golfwar = 0;
50 
51 static INT32 m68k_halt = 0;
52 static INT32 irq_enable;
53 static INT32 flipscreen;
54 static INT32 bgrambank;
55 static INT32 fgrombank;
56 static INT32 displayenable;
57 static INT32 fsharkbt_8741;
58 
59 static UINT32 main_ram_seg;
60 static UINT16 dsp_addr_w;
61 static INT32 dsp_execute;
62 static INT32 dsp_BIO;
63 static INT32 dsp_on;
64 
65 static struct BurnInputInfo TwincobrInputList[] = {
66 	{"P1 Coin",		BIT_DIGITAL,	DrvJoy3 + 3,	"p1 coin"	},
67 	{"P1 Start",		BIT_DIGITAL,	DrvJoy3 + 5,	"p1 start"	},
68 	{"P1 Up",		BIT_DIGITAL,	DrvJoy1 + 0,	"p1 up"		},
69 	{"P1 Down",		BIT_DIGITAL,	DrvJoy1 + 1,	"p1 down"	},
70 	{"P1 Left",		BIT_DIGITAL,	DrvJoy1 + 2,	"p1 left"	},
71 	{"P1 Right",		BIT_DIGITAL,	DrvJoy1 + 3,	"p1 right"	},
72 	{"P1 Button 1",		BIT_DIGITAL,	DrvJoy1 + 4,	"p1 fire 1"	},
73 	{"P1 Button 2",		BIT_DIGITAL,	DrvJoy1 + 5,	"p1 fire 2"	},
74 
75 	{"P2 Coin",		BIT_DIGITAL,	DrvJoy3 + 4,	"p2 coin"	},
76 	{"P2 Start",		BIT_DIGITAL,	DrvJoy3 + 6,	"p2 start"	},
77 	{"P2 Up",		BIT_DIGITAL,	DrvJoy2 + 0,	"p2 up"		},
78 	{"P2 Down",		BIT_DIGITAL,	DrvJoy2 + 1,	"p2 down"	},
79 	{"P2 Left",		BIT_DIGITAL,	DrvJoy2 + 2,	"p2 left"	},
80 	{"P2 Right",		BIT_DIGITAL,	DrvJoy2 + 3,	"p2 right"	},
81 	{"P2 Button 1",		BIT_DIGITAL,	DrvJoy2 + 4,	"p2 fire 1"	},
82 	{"P2 Button 2",		BIT_DIGITAL,	DrvJoy2 + 5,	"p2 fire 2"	},
83 
84 	{"Reset",		BIT_DIGITAL,	&DrvReset,	"reset"		},
85 	{"Service",		BIT_DIGITAL,	DrvJoy3 + 0,	"service"	},
86 	{"Tilt",		BIT_DIGITAL,	DrvJoy3 + 1,	"tilt"		},
87 	{"Dip A",		BIT_DIPSWITCH,	DrvDips + 0,	"dip"		},
88 	{"Dip B",		BIT_DIPSWITCH,	DrvDips + 1,	"dip"		},
89 };
90 
91 STDINPUTINFO(Twincobr)
92 
93 static struct BurnInputInfo FsharkInputList[] = {
94 	{"P1 Coin",		BIT_DIGITAL,	DrvJoy4 + 3,	"p1 coin"	},
95 	{"P1 Start",		BIT_DIGITAL,	DrvJoy4 + 5,	"p1 start"	},
96 	{"P1 Up",		BIT_DIGITAL,	DrvJoy1 + 0,	"p1 up"		},
97 	{"P1 Down",		BIT_DIGITAL,	DrvJoy1 + 1,	"p1 down"	},
98 	{"P1 Left",		BIT_DIGITAL,	DrvJoy1 + 2,	"p1 left"	},
99 	{"P1 Right",		BIT_DIGITAL,	DrvJoy1 + 3,	"p1 right"	},
100 	{"P1 Button 1",		BIT_DIGITAL,	DrvJoy1 + 4,	"p1 fire 1"	},
101 	{"P1 Button 2",		BIT_DIGITAL,	DrvJoy1 + 5,	"p1 fire 2"	},
102 
103 	{"P2 Coin",		BIT_DIGITAL,	DrvJoy4 + 4,	"p2 coin"	},
104 	{"P2 Start",		BIT_DIGITAL,	DrvJoy4 + 6,	"p2 start"	},
105 	{"P2 Up",		BIT_DIGITAL,	DrvJoy2 + 0,	"p2 up"		},
106 	{"P2 Down",		BIT_DIGITAL,	DrvJoy2 + 1,	"p2 down"	},
107 	{"P2 Left",		BIT_DIGITAL,	DrvJoy2 + 2,	"p2 left"	},
108 	{"P2 Right",		BIT_DIGITAL,	DrvJoy2 + 3,	"p2 right"	},
109 	{"P2 Button 1",		BIT_DIGITAL,	DrvJoy2 + 4,	"p2 fire 1"	},
110 	{"P2 Button 2",		BIT_DIGITAL,	DrvJoy2 + 5,	"p2 fire 2"	},
111 
112 	{"Reset",		BIT_DIGITAL,	&DrvReset,	"reset"		},
113 	{"Service",		BIT_DIGITAL,	DrvJoy4 + 0,	"service"	},
114 	{"Tilt",		BIT_DIGITAL,	DrvJoy4 + 1,	"tilt"		},
115 	{"Dip A",		BIT_DIPSWITCH,	DrvDips + 0,	"dip"		},
116 	{"Dip B",		BIT_DIPSWITCH,	DrvDips + 1,	"dip"		},
117 };
118 
119 STDINPUTINFO(Fshark)
120 
121 static struct BurnDIPInfo TwincobrDIPList[]=
122 {
123 	{0x13, 0xff, 0xff, 0x00, NULL			},
124 	{0x14, 0xff, 0xff, 0x00, NULL			},
125 
126 	{0   , 0xfe, 0   ,    2, "Flip Screen"		},
127 	{0x13, 0x01, 0x02, 0x00, "Off"			},
128 	{0x13, 0x01, 0x02, 0x02, "On"			},
129 
130 	{0   , 0xfe, 0   ,    2, "Service Mode"		},
131 	{0x13, 0x01, 0x04, 0x00, "Off"			},
132 	{0x13, 0x01, 0x04, 0x04, "On"			},
133 
134 	{0   , 0xfe, 0   ,    2, "Demo Sounds"		},
135 	{0x13, 0x01, 0x08, 0x08, "Off"			},
136 	{0x13, 0x01, 0x08, 0x00, "On"			},
137 
138 	{0   , 0xfe, 0   ,    4, "Coin A"		},
139 	{0x13, 0x01, 0x30, 0x30, "4 Coins 1 Credits"	},
140 	{0x13, 0x01, 0x30, 0x20, "3 Coins 1 Credits"	},
141 	{0x13, 0x01, 0x30, 0x10, "2 Coins 1 Credits"	},
142 	{0x13, 0x01, 0x30, 0x00, "1 Coin  1 Credits"	},
143 
144 	{0   , 0xfe, 0   ,    4, "Coin B"		},
145 	{0x13, 0x01, 0xc0, 0x00, "1 Coin  2 Credits"	},
146 	{0x13, 0x01, 0xc0, 0x40, "1 Coin  3 Credits"	},
147 	{0x13, 0x01, 0xc0, 0x80, "1 Coin  4 Credits"	},
148 	{0x13, 0x01, 0xc0, 0xc0, "1 Coin  6 Credits"	},
149 
150 	{0   , 0xfe, 0   ,    4, "Difficulty"		},
151 	{0x14, 0x01, 0x03, 0x01, "Easy"			},
152 	{0x14, 0x01, 0x03, 0x00, "Normal"		},
153 	{0x14, 0x01, 0x03, 0x02, "Hard"			},
154 	{0x14, 0x01, 0x03, 0x03, "Very Hard"		},
155 
156 	{0   , 0xfe, 0   ,    4, "Bonus Life"		},
157 	{0x14, 0x01, 0x0c, 0x00, "50k 200k 150k+"	},
158 	{0x14, 0x01, 0x0c, 0x04, "70k 270k 200k+"	},
159 	{0x14, 0x01, 0x0c, 0x08, "50k Only"		},
160 	{0x14, 0x01, 0x0c, 0x0c, "100k Only"		},
161 
162 	{0   , 0xfe, 0   ,    4, "Lives"		},
163 	{0x14, 0x01, 0x30, 0x30, "2"			},
164 	{0x14, 0x01, 0x30, 0x00, "3"			},
165 	{0x14, 0x01, 0x30, 0x20, "4"			},
166 	{0x14, 0x01, 0x30, 0x10, "5"			},
167 
168 	{0   , 0xfe, 0   ,    2, "Dip Switch Display"	},
169 	{0x14, 0x01, 0x40, 0x00, "Off"			},
170 	{0x14, 0x01, 0x40, 0x40, "On"			},
171 };
172 
173 STDDIPINFO(Twincobr)
174 
175 static struct BurnDIPInfo TwincobruDIPList[]=
176 {
177 	{0x13, 0xff, 0xff, 0x00, NULL			},
178 	{0x14, 0xff, 0xff, 0x00, NULL			},
179 
180 	{0   , 0xfe, 0   ,    2, "Flip Screen"		},
181 	{0x13, 0x01, 0x02, 0x00, "Off"			},
182 	{0x13, 0x01, 0x02, 0x02, "On"			},
183 
184 	{0   , 0xfe, 0   ,    2, "Service Mode"		},
185 	{0x13, 0x01, 0x04, 0x00, "Off"			},
186 	{0x13, 0x01, 0x04, 0x04, "On"			},
187 
188 	{0   , 0xfe, 0   ,    2, "Demo Sounds"		},
189 	{0x13, 0x01, 0x08, 0x08, "Off"			},
190 	{0x13, 0x01, 0x08, 0x00, "On"			},
191 
192 	{0   , 0xfe, 0   ,    4, "Coin A"		},
193 	{0x13, 0x01, 0x30, 0x20, "2 Coins 1 Credits"	},
194 	{0x13, 0x01, 0x30, 0x00, "1 Coin  1 Credits"	},
195 	{0x13, 0x01, 0x30, 0x30, "2 Coins 3 Credits"	},
196 	{0x13, 0x01, 0x30, 0x10, "1 Coin  2 Credits"	},
197 
198 	{0   , 0xfe, 0   ,    4, "Coin B"		},
199 	{0x13, 0x01, 0xc0, 0x80, "2 Coins 1 Credits"	},
200 	{0x13, 0x01, 0xc0, 0x00, "1 Coin  1 Credits"	},
201 	{0x13, 0x01, 0xc0, 0xc0, "2 Coins 3 Credits"	},
202 	{0x13, 0x01, 0xc0, 0x40, "1 Coin  2 Credits"	},
203 
204 	{0   , 0xfe, 0   ,    4, "Difficulty"		},
205 	{0x14, 0x01, 0x03, 0x01, "Easy"			},
206 	{0x14, 0x01, 0x03, 0x00, "Normal"		},
207 	{0x14, 0x01, 0x03, 0x02, "Hard"			},
208 	{0x14, 0x01, 0x03, 0x03, "Very Hard"		},
209 
210 	{0   , 0xfe, 0   ,    4, "Bonus Life"		},
211 	{0x14, 0x01, 0x0c, 0x00, "50k 200k 150k+"	},
212 	{0x14, 0x01, 0x0c, 0x04, "70k 270k 200k+"	},
213 	{0x14, 0x01, 0x0c, 0x08, "50k Only"		},
214 	{0x14, 0x01, 0x0c, 0x0c, "100k Only"		},
215 
216 	{0   , 0xfe, 0   ,    4, "Lives"		},
217 	{0x14, 0x01, 0x30, 0x30, "2"			},
218 	{0x14, 0x01, 0x30, 0x00, "3"			},
219 	{0x14, 0x01, 0x30, 0x20, "4"			},
220 	{0x14, 0x01, 0x30, 0x10, "5"			},
221 
222 	{0   , 0xfe, 0   ,    2, "Dip Switch Display"	},
223 	{0x14, 0x01, 0x40, 0x00, "Off"			},
224 	{0x14, 0x01, 0x40, 0x40, "On"			},
225 };
226 
227 STDDIPINFO(Twincobru)
228 
229 
230 static struct BurnDIPInfo KtigerDIPList[]=
231 {
232 	{0x13, 0xff, 0xff, 0x01, NULL			},
233 	{0x14, 0xff, 0xff, 0x80, NULL			},
234 
235 	{0   , 0xfe, 0   ,    2, "Cabinet"		},
236 	{0x13, 0x01, 0x01, 0x01, "Upright"		},
237 	{0x13, 0x01, 0x01, 0x00, "Cocktail"		},
238 
239 	{0   , 0xfe, 0   ,    2, "Flip Screen"		},
240 	{0x13, 0x01, 0x02, 0x00, "Off"			},
241 	{0x13, 0x01, 0x02, 0x02, "On"			},
242 
243 	{0   , 0xfe, 0   ,    2, "Service Mode"		},
244 	{0x13, 0x01, 0x04, 0x00, "Off"			},
245 	{0x13, 0x01, 0x04, 0x04, "On"			},
246 
247 	{0   , 0xfe, 0   ,    2, "Demo Sounds"		},
248 	{0x13, 0x01, 0x08, 0x08, "Off"			},
249 	{0x13, 0x01, 0x08, 0x00, "On"			},
250 
251 	{0   , 0xfe, 0   ,    4, "Coin A"		},
252 	{0x13, 0x01, 0x30, 0x20, "2 Coins 1 Credits"	},
253 	{0x13, 0x01, 0x30, 0x00, "1 Coin  1 Credits"	},
254 	{0x13, 0x01, 0x30, 0x30, "2 Coins 3 Credits"	},
255 	{0x13, 0x01, 0x30, 0x10, "1 Coin  2 Credits"	},
256 
257 	{0   , 0xfe, 0   ,    4, "Coin B"		},
258 	{0x13, 0x01, 0xc0, 0x80, "2 Coins 1 Credits"	},
259 	{0x13, 0x01, 0xc0, 0x00, "1 Coin  1 Credits"	},
260 	{0x13, 0x01, 0xc0, 0xc0, "2 Coins 3 Credits"	},
261 	{0x13, 0x01, 0xc0, 0x40, "1 Coin  2 Credits"	},
262 
263 	{0   , 0xfe, 0   ,    4, "Difficulty"		},
264 	{0x14, 0x01, 0x03, 0x01, "Easy"			},
265 	{0x14, 0x01, 0x03, 0x00, "Normal"		},
266 	{0x14, 0x01, 0x03, 0x02, "Hard"			},
267 	{0x14, 0x01, 0x03, 0x03, "Very Hard"		},
268 
269 	{0   , 0xfe, 0   ,    4, "Bonus Life"		},
270 	{0x14, 0x01, 0x0c, 0x04, "50k 200k 150k+"	},
271 	{0x14, 0x01, 0x0c, 0x00, "70k 270k 200k+"	},
272 	{0x14, 0x01, 0x0c, 0x08, "100k Only"		},
273 	{0x14, 0x01, 0x0c, 0x0c, "None"			},
274 
275 	{0   , 0xfe, 0   ,    4, "Lives"		},
276 	{0x14, 0x01, 0x30, 0x30, "2"			},
277 	{0x14, 0x01, 0x30, 0x00, "3"			},
278 	{0x14, 0x01, 0x30, 0x20, "4"			},
279 	{0x14, 0x01, 0x30, 0x10, "5"			},
280 
281 	{0   , 0xfe, 0   ,    2, "Dip Switch Display"	},
282 	{0x14, 0x01, 0x40, 0x00, "Off"			},
283 	{0x14, 0x01, 0x40, 0x40, "On"			},
284 
285 	{0   , 0xfe, 0   ,    2, "Allow Continue"	},
286 	{0x14, 0x01, 0x80, 0x00, "No"			},
287 	{0x14, 0x01, 0x80, 0x80, "Yes"			},
288 };
289 
290 STDDIPINFO(Ktiger)
291 
292 
293 static struct BurnDIPInfo FsharkDIPList[]=
294 {
295 	{0x13, 0xff, 0xff, 0x01, NULL			},
296 	{0x14, 0xff, 0xff, 0x80, NULL			},
297 
298 	{0   , 0xfe, 0   ,    2, "Cabinet"		},
299 	{0x13, 0x01, 0x01, 0x01, "Upright"		},
300 	{0x13, 0x01, 0x01, 0x00, "Cocktail"		},
301 
302 	{0   , 0xfe, 0   ,    2, "Flip Screen"		},
303 	{0x13, 0x01, 0x02, 0x00, "Off"			},
304 	{0x13, 0x01, 0x02, 0x02, "On"			},
305 
306 	{0   , 0xfe, 0   ,    2, "Service Mode"		},
307 	{0x13, 0x01, 0x04, 0x00, "Off"			},
308 	{0x13, 0x01, 0x04, 0x04, "On"			},
309 
310 	{0   , 0xfe, 0   ,    2, "Demo Sounds"		},
311 	{0x13, 0x01, 0x08, 0x08, "Off"			},
312 	{0x13, 0x01, 0x08, 0x00, "On"			},
313 
314 	{0   , 0xfe, 0   ,    4, "Coin A"		},
315 	{0x13, 0x01, 0x30, 0x30, "4 Coins 1 Credits"	},
316 	{0x13, 0x01, 0x30, 0x20, "3 Coins 1 Credits"	},
317 	{0x13, 0x01, 0x30, 0x10, "2 Coins 1 Credits"	},
318 	{0x13, 0x01, 0x30, 0x00, "1 Coin  1 Credits"	},
319 
320 	{0   , 0xfe, 0   ,    4, "Coin B"		},
321 	{0x13, 0x01, 0xc0, 0x00, "1 Coin  2 Credits"	},
322 	{0x13, 0x01, 0xc0, 0x40, "1 Coin  3 Credits"	},
323 	{0x13, 0x01, 0xc0, 0x80, "1 Coin  4 Credits"	},
324 	{0x13, 0x01, 0xc0, 0xc0, "1 Coin  6 Credits"	},
325 
326 	{0   , 0xfe, 0   ,    4, "Difficulty"		},
327 	{0x14, 0x01, 0x03, 0x01, "Easy"			},
328 	{0x14, 0x01, 0x03, 0x00, "Normal"		},
329 	{0x14, 0x01, 0x03, 0x02, "Hard"			},
330 	{0x14, 0x01, 0x03, 0x03, "Very Hard"		},
331 
332 	{0   , 0xfe, 0   ,    4, "Bonus Life"		},
333 	{0x14, 0x01, 0x0c, 0x00, "50k 200k 150k+"	},
334 	{0x14, 0x01, 0x0c, 0x04, "70k 270k 200k+"	},
335 	{0x14, 0x01, 0x0c, 0x08, "50k Only"		},
336 	{0x14, 0x01, 0x0c, 0x0c, "100k Only"		},
337 
338 	{0   , 0xfe, 0   ,    4, "Lives"		},
339 	{0x14, 0x01, 0x30, 0x20, "1"			},
340 	{0x14, 0x01, 0x30, 0x30, "2"			},
341 	{0x14, 0x01, 0x30, 0x00, "3"			},
342 	{0x14, 0x01, 0x30, 0x10, "5"			},
343 
344 	{0   , 0xfe, 0   ,    2, "Dip Switch Display"	},
345 	{0x14, 0x01, 0x40, 0x00, "Off"			},
346 	{0x14, 0x01, 0x40, 0x40, "On"			},
347 
348 	{0   , 0xfe, 0   ,    2, "Allow Continue"	},
349 	{0x14, 0x01, 0x80, 0x00, "No"			},
350 	{0x14, 0x01, 0x80, 0x80, "Yes"			},
351 };
352 
353 STDDIPINFO(Fshark)
354 
355 static struct BurnDIPInfo SkysharkDIPList[]=
356 {
357 	{0x13, 0xff, 0xff, 0x01, NULL			},
358 	{0x14, 0xff, 0xff, 0x80, NULL			},
359 
360 	{0   , 0xfe, 0   ,    2, "Cabinet"		},
361 	{0x13, 0x01, 0x01, 0x01, "Upright"		},
362 	{0x13, 0x01, 0x01, 0x00, "Cocktail"		},
363 
364 	{0   , 0xfe, 0   ,    2, "Flip Screen"		},
365 	{0x13, 0x01, 0x02, 0x00, "Off"			},
366 	{0x13, 0x01, 0x02, 0x02, "On"			},
367 
368 	{0   , 0xfe, 0   ,    2, "Service Mode"		},
369 	{0x13, 0x01, 0x04, 0x00, "Off"			},
370 	{0x13, 0x01, 0x04, 0x04, "On"			},
371 
372 	{0   , 0xfe, 0   ,    2, "Demo Sounds"		},
373 	{0x13, 0x01, 0x08, 0x08, "Off"			},
374 	{0x13, 0x01, 0x08, 0x00, "On"			},
375 
376 	{0   , 0xfe, 0   ,    3, "Coin A"		},
377 	{0x13, 0x01, 0x30, 0x10, "2 Coins 1 Credits"	},
378 	{0x13, 0x01, 0x30, 0x00, "1 Coin  1 Credits"	},
379 	{0x13, 0x01, 0x30, 0x20, "1 Coin  2 Credits"	},
380 
381 	{0   , 0xfe, 0   ,    3, "Coin B"		},
382 	{0x13, 0x01, 0xc0, 0x40, "2 Coins 1 Credits"	},
383 	{0x13, 0x01, 0xc0, 0x00, "1 Coin  1 Credits"	},
384 	{0x13, 0x01, 0xc0, 0x80, "1 Coin  2 Credits"	},
385 
386 	{0   , 0xfe, 0   ,    4, "Difficulty"		},
387 	{0x14, 0x01, 0x03, 0x01, "Easy"			},
388 	{0x14, 0x01, 0x03, 0x00, "Normal"		},
389 	{0x14, 0x01, 0x03, 0x02, "Hard"			},
390 	{0x14, 0x01, 0x03, 0x03, "Very Hard"		},
391 
392 	{0   , 0xfe, 0   ,    4, "Bonus Life"		},
393 	{0x14, 0x01, 0x0c, 0x00, "50k 200k 150k+"	},
394 	{0x14, 0x01, 0x0c, 0x04, "70k 270k 200k+"	},
395 	{0x14, 0x01, 0x0c, 0x08, "50k Only"		},
396 	{0x14, 0x01, 0x0c, 0x0c, "100k Only"		},
397 
398 	{0   , 0xfe, 0   ,    4, "Lives"		},
399 	{0x14, 0x01, 0x30, 0x20, "1"			},
400 	{0x14, 0x01, 0x30, 0x30, "2"			},
401 	{0x14, 0x01, 0x30, 0x00, "3"			},
402 	{0x14, 0x01, 0x30, 0x10, "5"			},
403 
404 	{0   , 0xfe, 0   ,    2, "Dip Switch Display"	},
405 	{0x14, 0x01, 0x40, 0x00, "Off"			},
406 	{0x14, 0x01, 0x40, 0x40, "On"			},
407 
408 	{0   , 0xfe, 0   ,    2, "Allow Continue"	},
409 	{0x14, 0x01, 0x80, 0x00, "No"			},
410 	{0x14, 0x01, 0x80, 0x80, "Yes"			},
411 };
412 
413 STDDIPINFO(Skyshark)
414 
415 
416 static struct BurnDIPInfo HishouzaDIPList[]=
417 {
418 	{0x13, 0xff, 0xff, 0x01, NULL			},
419 	{0x14, 0xff, 0xff, 0x00, NULL			},
420 
421 	{0   , 0xfe, 0   ,    2, "Cabinet"		},
422 	{0x13, 0x01, 0x01, 0x01, "Upright"		},
423 	{0x13, 0x01, 0x01, 0x00, "Cocktail"		},
424 
425 	{0   , 0xfe, 0   ,    2, "Flip Screen"		},
426 	{0x13, 0x01, 0x02, 0x00, "Off"			},
427 	{0x13, 0x01, 0x02, 0x02, "On"			},
428 
429 	{0   , 0xfe, 0   ,    2, "Service Mode"		},
430 	{0x13, 0x01, 0x04, 0x00, "Off"			},
431 	{0x13, 0x01, 0x04, 0x04, "On"			},
432 
433 	{0   , 0xfe, 0   ,    2, "Demo Sounds"		},
434 	{0x13, 0x01, 0x08, 0x08, "Off"			},
435 	{0x13, 0x01, 0x08, 0x00, "On"			},
436 
437 	{0   , 0xfe, 0   ,    4, "Coin A"		},
438 	{0x13, 0x01, 0x30, 0x20, "2 Coins 1 Credits"	},
439 	{0x13, 0x01, 0x30, 0x00, "1 Coin  1 Credits"	},
440 	{0x13, 0x01, 0x30, 0x30, "2 Coins 3 Credits"	},
441 	{0x13, 0x01, 0x30, 0x10, "1 Coin  2 Credits"	},
442 
443 	{0   , 0xfe, 0   ,    4, "Coin B"		},
444 	{0x13, 0x01, 0xc0, 0x80, "2 Coins 1 Credits"	},
445 	{0x13, 0x01, 0xc0, 0x00, "1 Coin  1 Credits"	},
446 	{0x13, 0x01, 0xc0, 0xc0, "2 Coins 3 Credits"	},
447 	{0x13, 0x01, 0xc0, 0x40, "1 Coin  2 Credits"	},
448 
449 	{0   , 0xfe, 0   ,    4, "Difficulty"		},
450 	{0x14, 0x01, 0x03, 0x01, "Easy"			},
451 	{0x14, 0x01, 0x03, 0x00, "Normal"		},
452 	{0x14, 0x01, 0x03, 0x02, "Hard"			},
453 	{0x14, 0x01, 0x03, 0x03, "Very Hard"		},
454 
455 	{0   , 0xfe, 0   ,    4, "Bonus Life"		},
456 	{0x14, 0x01, 0x0c, 0x00, "50k 200k 150k+"	},
457 	{0x14, 0x01, 0x0c, 0x04, "70k 270k 200k+"	},
458 	{0x14, 0x01, 0x0c, 0x08, "50k Only"		},
459 	{0x14, 0x01, 0x0c, 0x0c, "100k Only"		},
460 
461 	{0   , 0xfe, 0   ,    4, "Lives"		},
462 	{0x14, 0x01, 0x30, 0x20, "1"			},
463 	{0x14, 0x01, 0x30, 0x30, "2"			},
464 	{0x14, 0x01, 0x30, 0x00, "3"			},
465 	{0x14, 0x01, 0x30, 0x10, "5"			},
466 
467 	{0   , 0xfe, 0   ,    2, "Dip Switch Display"	},
468 	{0x14, 0x01, 0x40, 0x00, "Off"			},
469 	{0x14, 0x01, 0x40, 0x40, "On"			},
470 
471 	{0   , 0xfe, 0   ,    2, "Allow Continue"	},
472 	{0x14, 0x01, 0x80, 0x00, "No"			},
473 	{0x14, 0x01, 0x80, 0x80, "Yes"			},
474 };
475 
STDDIPINFO(Hishouza)476 STDDIPINFO(Hishouza)
477 
478 static void palette_write(INT32 offset)
479 {
480 	offset &= 0xffe;
481 
482 	INT32 p = BURN_ENDIAN_SWAP_INT16(*((UINT16*)(DrvPalRAM + offset)));
483 
484 	INT32 r = (p >>  0) & 0x1f;
485 	INT32 g = (p >>  5) & 0x1f;
486 	INT32 b = (p >> 10) & 0x1f;
487 
488 	r = (r << 3) | (r >> 2);
489 	g = (g << 3) | (g >> 2);
490 	b = (b << 3) | (b >> 2);
491 
492 	DrvPalette[offset/2] = BurnHighCol(r,g,b,0);
493 }
494 
twincobr_dsp(INT32 enable)495 static void twincobr_dsp(INT32 enable)
496 {
497 	enable ^= 1;
498 	dsp_on = enable;
499 
500 	if (enable)
501 	{
502 		tms32010_set_irq_line(0, CPU_IRQSTATUS_ACK); /* TMS32010 INT */
503 		m68k_halt = 1;
504 		SekRunEnd();
505 	}
506 	else
507 	{
508 		tms32010_set_irq_line(0, CPU_IRQSTATUS_NONE); /* TMS32010 INT */
509 	}
510 }
511 
control_write(UINT16 data)512 static void control_write(UINT16 data)
513 {
514 	switch (data)
515 	{
516 		case 0x0004:
517 		case 0x0005:
518 			irq_enable = data & 1;
519 		break;
520 
521 		case 0x0006:
522 		case 0x0007:
523 			flipscreen = data & 1;
524 		break;
525 
526 		case 0x0008:
527 		case 0x0009:
528 			bgrambank = ((data & 1) << 13);
529 		break;
530 
531 		case 0x000a:
532 		case 0x000b:
533 			fgrombank = ((data & 1) << 12);
534 		break;
535 
536 		case 0x000c:
537 		case 0x000d:
538 			twincobr_dsp(data & 1);
539 		break;
540 
541 		case 0x000e:
542 		case 0x000f:
543 			displayenable = data & 1;
544 		break;
545 	}
546 }
547 
twincobr_main_write_word(UINT32 address,UINT16 data)548 static void __fastcall twincobr_main_write_word(UINT32 address, UINT16 data)
549 {
550 	if ((address & 0xfff000) == 0x07a000) {
551 		DrvShareRAM[(address / 2) & 0x7ff] = data & 0xff;
552 		return;
553 	}
554 
555 	if ((address & 0xfff000) == 0x050000) {
556 		*((UINT16*)(DrvPalRAM + (address & 0xffe))) = BURN_ENDIAN_SWAP_INT16(data);
557 		palette_write(address);
558 		return;
559 	}
560 
561 	switch (address)
562 	{
563 		case 0x060000:
564 			// mc6845 address_w
565 		return;
566 
567 		case 0x060002:
568 			// mc6845 register_w
569 		return;
570 
571 		case 0x070000:
572 			scrollx[0] = data;
573 		return;
574 
575 		case 0x070002:
576 			scrolly[0] = data;
577 		return;
578 
579 		case 0x070004:
580 			vidramoffs[0] = data<<1;
581 		return;
582 
583 		case 0x072000:
584 			scrollx[1] = data;
585 		return;
586 
587 		case 0x072002:
588 			scrolly[1] = data;
589 		return;
590 
591 		case 0x072004:
592 			vidramoffs[1] = data<<1;
593 		return;
594 
595 		case 0x074000:
596 			scrollx[2] = data;
597 		return;
598 
599 		case 0x074002:
600 			scrolly[2] = data;
601 		return;
602 
603 		case 0x074004:
604 			vidramoffs[2] = data<<1;
605 		return;
606 
607 		case 0x076000:
608 		case 0x076002:	// exscroll (not used)
609 		return;
610 
611 		case 0x07800a:
612 			if (data < 2) twincobr_dsp(data);
613 		return;
614 
615 		case 0x07800c:
616 			control_write(data & 0xff);
617 		return;
618 
619 		case 0x07e000:
620 			*((UINT16*)(DrvTxRAM + (vidramoffs[0] & 0x0ffe))) = BURN_ENDIAN_SWAP_INT16(data);
621 		return;
622 
623 		case 0x07e002:
624 			*((UINT16*)(DrvBgRAM + (vidramoffs[1] & 0x1ffe) + bgrambank)) = BURN_ENDIAN_SWAP_INT16(data);
625 		return;
626 
627 		case 0x07e004:
628 			*((UINT16*)(DrvFgRAM + (vidramoffs[2] & 0x1ffe))) = BURN_ENDIAN_SWAP_INT16(data);
629 		return;
630 	}
631 }
632 
twincobr_main_write_byte(UINT32 address,UINT8 data)633 static void __fastcall twincobr_main_write_byte(UINT32 address, UINT8 data)
634 {
635 	if ((address & 0xfff000) == 0x050000) {
636 		DrvPalRAM[(address & 0xfff)^1] = data;
637 		palette_write(address);
638 		return;
639 	}
640 
641 	bprintf (0, _T("MWB %5.5x, %2.2x\n"), address, data);
642 }
643 
twincobr_main_read_word(UINT32 address)644 static UINT16 __fastcall twincobr_main_read_word(UINT32 address)
645 {
646 	if ((address & 0xfff000) == 0x07a000) {
647 		return DrvShareRAM[(address / 2) & 0x7ff] & 0xff;
648 	}
649 
650 	switch (address)
651 	{
652 		case 0x07e000:
653 			return BURN_ENDIAN_SWAP_INT16(*((UINT16*)(DrvTxRAM + (vidramoffs[0] & 0x0ffe))));
654 
655 		case 0x07e002:
656 			return BURN_ENDIAN_SWAP_INT16(*((UINT16*)(DrvBgRAM + (vidramoffs[1] & 0x1ffe) + bgrambank)));
657 
658 		case 0x07e004:
659 			return BURN_ENDIAN_SWAP_INT16(*((UINT16*)(DrvFgRAM + (vidramoffs[2] & 0x1ffe))));
660 
661 		case 0x078000:
662 			return DrvDips[0];
663 
664 		case 0x078002:
665 			return DrvDips[1];
666 
667 		case 0x078004:
668 			return DrvInputs[0];
669 
670 		case 0x078006:
671 			return DrvInputs[1];
672 
673 		case 0x078008:
674 			return ((DrvInputs[3] & 0x7f) | (vblank ? 0x80 : 0)) ^ golfwar;
675 	}
676 
677 	return 0;
678 }
679 
twincobr_main_read_byte(UINT32 address)680 static UINT8 __fastcall twincobr_main_read_byte(UINT32 address)
681 {
682 	if ((address & 0xfff000) == 0x07a000) {
683 		return DrvShareRAM[(address / 2) & 0x7ff] & 0xff;
684 	}
685 
686 	switch (address)
687 	{
688 		case 0x078001:
689 			return DrvDips[0];
690 
691 		case 0x078003:
692 			return DrvDips[1];
693 
694 		case 0x078009:
695 			return ((vblank ? 0x80 : 0) | (DrvInputs[3] & 0x7f)) ^ golfwar;
696 	}
697 
698 	bprintf (0, _T("MRB %5.5x\n"), address);
699 
700 	return 0;
701 }
702 
twincobr_sound_write_port(UINT16 port,UINT8 data)703 static void __fastcall twincobr_sound_write_port(UINT16 port, UINT8 data)
704 {
705 	switch (port & 0xff)
706 	{
707 		case 0x00:
708 		case 0x01:
709 			BurnYM3812Write(0, port & 1, data);
710 		return;
711 
712 		case 0x20:
713 			if (data < 2) twincobr_dsp(data);
714 		return;
715 	}
716 }
717 
twincobr_sound_read_port(UINT16 port)718 static UINT8 __fastcall twincobr_sound_read_port(UINT16 port)
719 {
720 	switch (port & 0xff)
721 	{
722 		case 0x00:
723 		case 0x01:
724 			return BurnYM3812Read(0, port & 1);
725 
726 		case 0x10:
727 			return DrvInputs[2];
728 
729 		case 0x40:
730 			return DrvDips[0];
731 
732 		case 0x50:
733 			return DrvDips[1];
734 	}
735 
736 	return 0;
737 }
738 
twincobr_dsp_addrsel_w(UINT16 data)739 static void twincobr_dsp_addrsel_w(UINT16 data)
740 {
741 	main_ram_seg = ((data & 0xe000) << 3);
742 	dsp_addr_w   = ((data & 0x1fff) << 1);
743 }
744 
twincobr_dsp_r()745 static UINT16 twincobr_dsp_r()
746 {
747 	switch (main_ram_seg)
748 	{
749 		case 0x30000:
750 		case 0x40000:
751 		case 0x50000:
752 			return SekReadWord(main_ram_seg + dsp_addr_w);
753 	}
754 
755 	return 0;
756 }
757 
twincobr_dsp_w(UINT16 data)758 static void twincobr_dsp_w(UINT16 data)
759 {
760 	dsp_execute = 0;
761 
762 	switch (main_ram_seg)
763 	{
764 		case 0x30000: if ((dsp_addr_w < 3) && (data == 0)) dsp_execute = 1;
765 		case 0x40000:
766 		case 0x50000:
767 			SekWriteWord(main_ram_seg + dsp_addr_w, data);
768 		break;
769 	}
770 }
771 
twincobr_dsp_bio_w(UINT16 data)772 static void twincobr_dsp_bio_w(UINT16 data)
773 {
774 	if (data & 0x8000) {
775 		dsp_BIO = 0;
776 	}
777 
778 	if (data == 0) {
779 		if (dsp_execute) {
780 			m68k_halt = 0;
781 			dsp_execute = 0;
782 			tms32010RunEnd();
783 		}
784 
785 		dsp_BIO = 1;
786 	}
787 }
788 
twincobr_BIO_r()789 static UINT8 twincobr_BIO_r()
790 {
791 	return dsp_BIO;
792 }
793 
dsp_write(INT32 port,UINT16 data)794 static void dsp_write(INT32 port, UINT16 data)
795 {
796 	switch (port)
797 	{
798 		case 0x00: twincobr_dsp_addrsel_w(data); return;
799 		case 0x01: twincobr_dsp_w(data); return;
800 		case 0x02: return; // bootleg
801 		case 0x03: twincobr_dsp_bio_w(data); return;
802 	}
803 }
804 
dsp_read(INT32 port)805 static UINT16 dsp_read(INT32 port)
806 {
807 	switch (port)
808 	{
809 		case 0x01: return twincobr_dsp_r();
810 		case 0x02: fsharkbt_8741 += 1; return (fsharkbt_8741 & 1);
811 		case 0x10: return twincobr_BIO_r();
812 	}
813 
814 	return 0;
815 }
816 
DrvFMIRQHandler(INT32,INT32 nStatus)817 static void DrvFMIRQHandler(INT32, INT32 nStatus)
818 {
819 	ZetSetIRQLine(0, (nStatus) ? CPU_IRQSTATUS_ACK : CPU_IRQSTATUS_NONE);
820 }
821 
DrvSynchroniseStream(INT32 nSoundRate)822 static INT32 DrvSynchroniseStream(INT32 nSoundRate)
823 {
824 	return (INT64)(double)ZetTotalCycles() * nSoundRate / 3500000;
825 }
826 
DrvDoReset()827 static INT32 DrvDoReset()
828 {
829 	memset (AllRam, 0, RamEnd - AllRam);
830 
831 	SekOpen(0);
832 	SekReset();
833 	SekClose();
834 
835 	ZetOpen(0);
836 	ZetReset();
837 	BurnYM3812Reset();
838 	ZetClose();
839 
840 	tms32010_reset();
841 
842 	irq_enable = 0;
843 	flipscreen = 0;
844 	bgrambank = 0;
845 	fgrombank = 0;
846 	displayenable = 0;
847 
848 	main_ram_seg = 0;
849 	dsp_addr_w = 0;
850 	dsp_execute = 0;
851 	dsp_BIO = 0;
852 	dsp_on = 0;
853 
854 	fsharkbt_8741 = -1;
855 
856 	return 0;
857 }
858 
MemIndex()859 static INT32 MemIndex()
860 {
861 	UINT8 *Next; Next = AllMem;
862 
863 	Drv68KROM		= Next; Next += 0x040000;
864 	DrvMCUROM		= Next; Next += 0x004000;
865 	DrvZ80ROM		= Next; Next += 0x008000;
866 
867 	DrvGfxROM0		= Next; Next += 0x020000;
868 	DrvGfxROM1		= Next; Next += 0x080000;
869 	DrvGfxROM2		= Next; Next += 0x040000;
870 	DrvGfxROM3		= Next; Next += 0x080000;
871 
872 	DrvPalette		= (UINT32*)Next; Next += 0x0700 * sizeof(UINT32);
873 
874 	pTempDraw		= (UINT16*)Next; Next += nScreenWidth * nScreenHeight * sizeof(UINT16);
875 
876 	AllRam			= Next;
877 
878 	DrvSprBuf		= Next; Next += 0x001000;
879 	DrvSprRAM		= Next; Next += 0x001000;
880 	Drv68KRAM		= Next; Next += 0x010000;
881 	DrvMCURAM		= Next; Next += 0x010000;
882 	DrvPalRAM		= Next; Next += 0x000e00;
883 	DrvShareRAM		= Next; Next += 0x000800;
884 
885 	DrvBgRAM		= Next; Next += 0x004000;
886 	DrvFgRAM		= Next; Next += 0x002000;
887 	DrvTxRAM		= Next; Next += 0x001000;
888 
889 	RamEnd			= Next;
890 
891 	MemEnd			= Next;
892 
893 	return 0;
894 }
895 
DrvGfxDecode()896 static INT32 DrvGfxDecode()
897 {
898 	INT32 Plane0[3] = { (0x4000*8*0), (0x4000*8*1), (0x4000*8*2) };
899 	INT32 Plane1[4] = { (0x8000*8*0), (0x8000*8*1), (0x8000*8*2), (0x8000*8*3) };
900 	INT32 Plane2[4] = { (0x10000*8*0), (0x10000*8*1), (0x10000*8*2), (0x10000*8*3) };
901 	INT32 XOffs[16] = { STEP16(0,1) };
902 	INT32 YOffs[8] = { STEP8(0,8) };
903 	INT32 YOffs1[16] = { STEP16(0,16) };
904 
905 	UINT8 *tmp = (UINT8*)BurnMalloc(0x40000);
906 	if (tmp == NULL) {
907 		return 1;
908 	}
909 
910 	memcpy (tmp, DrvGfxROM0, 0xc000);
911 
912 	GfxDecode(0x0800, 3, 8, 8, Plane0, XOffs, YOffs, 0x040, tmp, DrvGfxROM0);
913 
914 	memcpy (tmp, DrvGfxROM1, 0x40000);
915 
916 	GfxDecode(0x2000, 4, 8, 8, Plane2, XOffs, YOffs, 0x040, tmp, DrvGfxROM1);
917 
918 	memcpy (tmp, DrvGfxROM2, 0x20000);
919 
920 	GfxDecode(0x1000, 4, 8, 8, Plane1, XOffs, YOffs, 0x040, tmp, DrvGfxROM2);
921 
922 	memcpy (tmp, DrvGfxROM3, 0x40000);
923 
924 	GfxDecode(0x0800, 4, 16, 16, Plane2, XOffs, YOffs1, 0x100, tmp, DrvGfxROM3);
925 
926 	BurnFree(tmp);
927 
928 	return 0;
929 }
930 
LoadNibbles(UINT8 * dst,INT32 idx,INT32 len)931 static INT32 LoadNibbles(UINT8 *dst, INT32 idx, INT32 len)
932 {
933 	UINT8 *tmp = (UINT8*)BurnMalloc(len*2);
934 
935 #ifdef LSB_FIRST
936 	if (BurnLoadRom(dst + 0, idx + 1, 2)) return 1;
937 	if (BurnLoadRom(dst + 1, idx + 3, 2)) return 1;
938 	if (BurnLoadRom(tmp + 0, idx + 0, 2)) return 1;
939 	if (BurnLoadRom(tmp + 1, idx + 2, 2)) return 1;
940 #else
941 	if (BurnLoadRom(dst + 0, idx + 3, 2)) return 1;
942 	if (BurnLoadRom(dst + 1, idx + 1, 2)) return 1;
943 	if (BurnLoadRom(tmp + 0, idx + 2, 2)) return 1;
944 	if (BurnLoadRom(tmp + 1, idx + 0, 2)) return 1;
945 #endif
946 
947 	for (INT32 i = 0; i < len * 2; i++) {
948 		dst[i] = (dst[i] & 0xf) | (tmp[i] << 4);
949 	}
950 
951 	BurnFree(tmp);
952 
953 	return 0;
954 }
955 
DrvInit(INT32 game_select,INT32 nibble_mcu)956 static INT32 DrvInit(INT32 game_select, INT32 nibble_mcu)
957 {
958 	GenericTilesInit();
959 
960 	AllMem = NULL;
961 	MemIndex();
962 	INT32 nLen = MemEnd - (UINT8 *)0;
963 	if ((AllMem = (UINT8 *)BurnMalloc(nLen)) == NULL) return 1;
964 	memset(AllMem, 0, nLen);
965 	MemIndex();
966 
967 	INT32 k = 0;
968 
969 	if (game_select == 0) // Twin Cobra
970 	{
971 		if (BurnLoadRom(Drv68KROM  + 0x00001,  k++, 2)) return 1;
972 		if (BurnLoadRom(Drv68KROM  + 0x00000,  k++, 2)) return 1;
973 		if (BurnLoadRom(Drv68KROM  + 0x20001,  k++, 2)) return 1;
974 		if (BurnLoadRom(Drv68KROM  + 0x20000,  k++, 2)) return 1;
975 
976 		if (BurnLoadRom(DrvZ80ROM  + 0x00000,  k++, 1)) return 1;
977 
978 		if (nibble_mcu) {
979 			if (BurnLoadRom(DrvMCUROM  + 0x00001,  k++, 2)) return 1;
980 			if (BurnLoadRom(DrvMCUROM  + 0x00000,  k++, 2)) return 1;
981 		} else {
982 			if (BurnLoadRom(DrvMCUROM  + 0x00000,  k++, 1)) return 1;
983 		}
984 
985 		if (BurnLoadRom(DrvGfxROM0 + 0x00000,  k++, 1)) return 1;
986 		if (BurnLoadRom(DrvGfxROM0 + 0x04000,  k++, 1)) return 1;
987 		if (BurnLoadRom(DrvGfxROM0 + 0x08000,  k++, 1)) return 1;
988 
989 		if (BurnLoadRom(DrvGfxROM1 + 0x00000,  k++, 1)) return 1;
990 		if (BurnLoadRom(DrvGfxROM1 + 0x10000,  k++, 1)) return 1;
991 		if (BurnLoadRom(DrvGfxROM1 + 0x20000,  k++, 1)) return 1;
992 		if (BurnLoadRom(DrvGfxROM1 + 0x30000,  k++, 1)) return 1;
993 
994 		if (BurnLoadRom(DrvGfxROM2 + 0x00000,  k++, 1)) return 1;
995 		if (BurnLoadRom(DrvGfxROM2 + 0x08000,  k++, 1)) return 1;
996 		if (BurnLoadRom(DrvGfxROM2 + 0x10000,  k++, 1)) return 1;
997 		if (BurnLoadRom(DrvGfxROM2 + 0x18000,  k++, 1)) return 1;
998 
999 		if (BurnLoadRom(DrvGfxROM3 + 0x00000,  k++, 1)) return 1;
1000 		if (BurnLoadRom(DrvGfxROM3 + 0x10000,  k++, 1)) return 1;
1001 		if (BurnLoadRom(DrvGfxROM3 + 0x20000,  k++, 1)) return 1;
1002 		if (BurnLoadRom(DrvGfxROM3 + 0x30000,  k++, 1)) return 1;
1003 	}
1004 	else if (game_select == 1) // Flying Shark
1005 	{
1006 		if (BurnLoadRom(Drv68KROM  + 0x00001,  k++, 2)) return 1;
1007 		if (BurnLoadRom(Drv68KROM  + 0x00000,  k++, 2)) return 1;
1008 
1009 		if (BurnLoadRom(DrvZ80ROM  + 0x00000,  k++, 1)) return 1;
1010 
1011 		if (nibble_mcu) {
1012 			if (LoadNibbles(DrvMCUROM  + 0x00000,  3, 0x0400)) return 1;
1013 			if (LoadNibbles(DrvMCUROM  + 0x00800,  7, 0x0400)) return 1;
1014 			k++; k++; k++; k++; // 8 nibble-roms are loaded in LoadNibbles()
1015 			k++; k++; k++; k++;
1016 		} else {
1017 			if (BurnLoadRom(DrvMCUROM  + 0x00000,  k++, 1)) return 1;
1018 		}
1019 
1020 		if (BurnLoadRom(DrvGfxROM0 + 0x00000, k++, 1)) return 1;
1021 		if (BurnLoadRom(DrvGfxROM0 + 0x04000, k++, 1)) return 1;
1022 		if (BurnLoadRom(DrvGfxROM0 + 0x08000, k++, 1)) return 1;
1023 
1024 		if (BurnLoadRom(DrvGfxROM1 + 0x00000, k++, 1)) return 1;
1025 		if (BurnLoadRom(DrvGfxROM1 + 0x10000, k++, 1)) return 1;
1026 		if (BurnLoadRom(DrvGfxROM1 + 0x20000, k++, 1)) return 1;
1027 		if (BurnLoadRom(DrvGfxROM1 + 0x30000, k++, 1)) return 1;
1028 
1029 		if (BurnLoadRom(DrvGfxROM2 + 0x00000, k++, 1)) return 1;
1030 		if (BurnLoadRom(DrvGfxROM2 + 0x08000, k++, 1)) return 1;
1031 		if (BurnLoadRom(DrvGfxROM2 + 0x10000, k++, 1)) return 1;
1032 		if (BurnLoadRom(DrvGfxROM2 + 0x18000, k++, 1)) return 1;
1033 
1034 		if (BurnLoadRom(DrvGfxROM3 + 0x00000, k++, 1)) return 1;
1035 		if (BurnLoadRom(DrvGfxROM3 + 0x10000, k++, 1)) return 1;
1036 		if (BurnLoadRom(DrvGfxROM3 + 0x20000, k++, 1)) return 1;
1037 		if (BurnLoadRom(DrvGfxROM3 + 0x30000, k++, 1)) return 1;
1038 	}
1039 	else if (game_select == 2 || game_select == 3) // gulfwar2, fsharkbt
1040 	{
1041 		if (BurnLoadRom(Drv68KROM  + 0x00001,  0, 2)) return 1;
1042 		if (BurnLoadRom(Drv68KROM  + 0x00000,  1, 2)) return 1;
1043 
1044 		if (BurnLoadRom(DrvZ80ROM  + 0x00000,  2, 1)) return 1;
1045 
1046 		if (BurnLoadRom(DrvMCUROM  + 0x00001,  3, 2)) return 1;
1047 		if (BurnLoadRom(DrvMCUROM  + 0x00000,  4, 2)) return 1;
1048 
1049 		if (BurnLoadRom(DrvGfxROM0 + 0x00000,  5, 1)) return 1;
1050 		if (BurnLoadRom(DrvGfxROM0 + 0x04000,  6, 1)) return 1;
1051 		if (BurnLoadRom(DrvGfxROM0 + 0x08000,  7, 1)) return 1;
1052 
1053 		if (BurnLoadRom(DrvGfxROM1 + 0x00000,  8, 1)) return 1;
1054 		if (BurnLoadRom(DrvGfxROM1 + 0x10000,  9, 1)) return 1;
1055 		if (BurnLoadRom(DrvGfxROM1 + 0x20000, 10, 1)) return 1;
1056 		if (BurnLoadRom(DrvGfxROM1 + 0x30000, 11, 1)) return 1;
1057 
1058 		if (BurnLoadRom(DrvGfxROM2 + 0x00000, 12, 1)) return 1;
1059 		if (BurnLoadRom(DrvGfxROM2 + 0x08000, 13, 1)) return 1;
1060 		if (BurnLoadRom(DrvGfxROM2 + 0x10000, 14, 1)) return 1;
1061 		if (BurnLoadRom(DrvGfxROM2 + 0x18000, 15, 1)) return 1;
1062 
1063 		if (BurnLoadRom(DrvGfxROM3 + 0x00000, 16, 1)) return 1;
1064 		if (BurnLoadRom(DrvGfxROM3 + 0x10000, 17, 1)) return 1;
1065 		if (BurnLoadRom(DrvGfxROM3 + 0x20000, 18, 1)) return 1;
1066 		if (BurnLoadRom(DrvGfxROM3 + 0x30000, 19, 1)) return 1;
1067 
1068 		golfwar = (game_select == 2) ? 0xff : 0;
1069 	}
1070 
1071 	DrvGfxDecode();
1072 
1073 	BurnSetRefreshRate(54.877858);
1074 
1075 	SekInit(0, 0x68000);
1076 	SekOpen(0);
1077 	SekMapMemory(Drv68KROM,		0x000000, 0x02ffff, MAP_ROM);
1078 	SekMapMemory(Drv68KRAM,		0x030000, 0x033fff, MAP_RAM);
1079 	SekMapMemory(DrvSprRAM,		0x040000, 0x040fff, MAP_RAM);
1080 	SekMapMemory(DrvPalRAM,		0x050000, 0x050dff, MAP_ROM);
1081 //	SekMapMemory(DrvShareRAM,	0x07a000, 0x07afff, MAP_RAM);
1082 	SekSetWriteWordHandler(0,	twincobr_main_write_word);
1083 	SekSetWriteByteHandler(0,	twincobr_main_write_byte);
1084 	SekSetReadWordHandler(0,	twincobr_main_read_word);
1085 	SekSetReadByteHandler(0,	twincobr_main_read_byte);
1086 	SekClose();
1087 
1088 	ZetInit(0);
1089 	ZetOpen(0);
1090 	ZetMapMemory(DrvZ80ROM,		0x0000, 0x7fff, MAP_ROM);
1091 	ZetMapMemory(DrvShareRAM,	0x8000, 0x87ff, MAP_RAM);
1092 	ZetSetOutHandler(twincobr_sound_write_port);
1093 	ZetSetInHandler(twincobr_sound_read_port);
1094 	ZetClose();
1095 
1096 	tms32010_init();
1097 	tms32010_set_write_port_handler(dsp_write);
1098 	tms32010_set_read_port_handler(dsp_read);
1099 	tms32010_ram = (UINT16*)DrvMCURAM;
1100 	tms32010_rom = (UINT16*)DrvMCUROM;
1101 
1102 	BurnYM3812Init(1, 3500000, &DrvFMIRQHandler, &DrvSynchroniseStream, 0);
1103 	BurnTimerAttachYM3812(&ZetConfig, 3500000);
1104 	BurnYM3812SetRoute(0, BURN_SND_YM3812_ROUTE, 1.00, BURN_SND_ROUTE_BOTH);
1105 
1106 	DrvDoReset();
1107 
1108 	return 0;
1109 }
1110 
DrvExit()1111 static INT32 DrvExit()
1112 {
1113 	GenericTilesExit();
1114 
1115 	BurnYM3812Exit();
1116 
1117 	ZetExit();
1118 	SekExit();
1119 	tms32010_exit();
1120 
1121 	BurnFree (AllMem);
1122 
1123 	golfwar = 0;
1124 
1125 	return 0;
1126 }
1127 
DrvPaletteUpdate()1128 static void DrvPaletteUpdate()
1129 {
1130 	for (INT32 i = 0; i < 0xe00; i+=2) {
1131 		INT32 p = BURN_ENDIAN_SWAP_INT16(*((UINT16*)(DrvPalRAM + i)));
1132 
1133 		INT32 r = (p >>  0) & 0x1f;
1134 		INT32 g = (p >>  5) & 0x1f;
1135 		INT32 b = (p >> 10) & 0x1f;
1136 
1137 		r = (r << 3) | (r >> 2);
1138 		g = (g << 3) | (g >> 2);
1139 		b = (b << 3) | (b >> 2);
1140 
1141 		DrvPalette[i/2] = BurnHighCol(r,g,b,0);
1142 	}
1143 }
1144 
draw_layer(INT32 layer,INT32 rambank,INT32 rombank)1145 static void draw_layer(INT32 layer, INT32 rambank, INT32 rombank)
1146 {
1147 	UINT16 *ram[3] = { (UINT16*)DrvTxRAM, (UINT16*)DrvBgRAM, (UINT16*)DrvFgRAM };
1148 	UINT8 *gfx[3] = { DrvGfxROM0, DrvGfxROM2, DrvGfxROM1 };
1149 	INT32 colbank[3] = { 0x600, 0x400, 0x500 };
1150 	INT32 colshift[3] = { 11, 12, 12 };
1151 	INT32 depth = colshift[layer] - 8;
1152 
1153 	INT32 transp = (layer & 1) ? 0xff : 0;
1154 
1155 	INT32 height = (layer ? 64 : 32) * 8;
1156 
1157 	INT32 xscroll = (scrollx[layer] + 55 ) & 0x1ff;
1158 	INT32 yscroll = (scrolly[layer] + 30) & (height - 1);
1159 
1160 	for (INT32 offs = 0; offs < 64 * (height/8); offs++)
1161 	{
1162 		INT32 sx = (offs & 0x3f) * 8;
1163 		INT32 sy = (offs / 0x40) * 8;
1164 
1165 		sx -= xscroll;
1166 		if (sx < -7) sx += 512;
1167 		sy -= yscroll;
1168 		if (sy < -7) sy += height;
1169 
1170 		INT32 attr  = BURN_ENDIAN_SWAP_INT16(ram[layer][offs + (rambank/2)]);
1171 		INT32 color = attr >> colshift[layer];
1172 		INT32 code  = (attr & ((1 << colshift[layer])-1)) + rombank;
1173 
1174 		Render8x8Tile_Mask_Clip(pTransDraw, code, sx, sy, color, depth, transp, colbank[layer], gfx[layer]);
1175 	}
1176 }
1177 
predraw_sprites()1178 static void predraw_sprites()
1179 {
1180 	UINT16 *ram = (UINT16*)DrvSprBuf;
1181 
1182 	INT32 xoffs = 31;
1183 	INT32 xoffs_flipped = 14;
1184 
1185 	memset (pTempDraw, 0, nScreenWidth * nScreenHeight * sizeof(short));
1186 
1187 	for (INT32 offs = 0; offs < 0x1000/2; offs += 4)
1188 	{
1189 		INT32 attr = BURN_ENDIAN_SWAP_INT16(ram[offs + 1]);
1190 		INT32 prio = (attr >> 10) & 3;
1191 		if (prio == 0) continue;
1192 
1193 		INT32 sy = BURN_ENDIAN_SWAP_INT16(ram[offs + 3]) >> 7;
1194 
1195 		if (sy != 0x0100)
1196 		{
1197 			INT32 code  = BURN_ENDIAN_SWAP_INT16(ram[offs]) & 0x7ff;
1198 			INT32 color = (attr & 0x3f) | ((attr >> 4) & 0xc0);
1199 
1200 			INT32 sx    = BURN_ENDIAN_SWAP_INT16(ram[offs + 2]) >> 7;
1201 			INT32 flipx = attr & 0x100;
1202 			if (flipx) sx -= xoffs_flipped;
1203 
1204 			INT32 flipy = attr & 0x200;
1205 
1206 			sx -= xoffs;
1207 			sy -= 16;
1208 
1209 			if (flipx) {
1210 				if (flipy) {
1211 					Render16x16Tile_Mask_FlipXY_Clip(pTempDraw, code, sx, sy, color, 4, 0, 0, DrvGfxROM3);
1212 				} else {
1213 					Render16x16Tile_Mask_FlipX_Clip(pTempDraw, code, sx, sy, color, 4, 0, 0, DrvGfxROM3);
1214 				}
1215 			} else {
1216 				if (flipy) {
1217 					Render16x16Tile_Mask_FlipY_Clip(pTempDraw, code, sx, sy, color, 4, 0, 0, DrvGfxROM3);
1218 				} else {
1219 					Render16x16Tile_Mask_Clip(pTempDraw, code, sx, sy, color, 4, 0, 0, DrvGfxROM3);
1220 				}
1221 			}
1222 		}
1223 	}
1224 }
1225 
draw_sprites(INT32 priority)1226 static void draw_sprites(INT32 priority)
1227 {
1228 	priority <<= 10;
1229 
1230 	for (INT32 y = 0;y < nScreenHeight; y++)
1231 	{
1232 		UINT16* src = pTempDraw + y * nScreenWidth;
1233 		UINT16* dst = pTransDraw + y * nScreenWidth;
1234 
1235 		for (INT32 x = 0;x < nScreenWidth; x++)
1236 		{
1237 			UINT16 pix = src[x];
1238 
1239 			if (pix & 0xf)
1240 			{
1241 				if ((pix & 0xc00) == priority)
1242 				{
1243 					dst[x] = pix & 0x3ff;
1244 				}
1245 			}
1246 		}
1247 	}
1248 }
1249 
DrvDraw()1250 static INT32 DrvDraw()
1251 {
1252 	if (DrvRecalc) {
1253 		DrvPaletteUpdate();
1254 		DrvRecalc = 0;
1255 	}
1256 
1257 	BurnTransferClear();
1258 
1259 	if (displayenable)
1260 	{
1261 		predraw_sprites();
1262 
1263 		if (nBurnLayer & 1) draw_layer(1, bgrambank, 0);
1264 		if (nSpriteEnable & 1) draw_sprites(1);
1265 		if (nBurnLayer & 2) draw_layer(2, 0, fgrombank);
1266 		if (nSpriteEnable & 2) draw_sprites(2);
1267 		if (nBurnLayer & 4) draw_layer(0, 0, 0);
1268 		if (nSpriteEnable & 4) draw_sprites(3);
1269 	}
1270 
1271 	BurnTransferCopy(DrvPalette);
1272 
1273 	return 0;
1274 }
1275 
DrvFrame()1276 static INT32 DrvFrame()
1277 {
1278 	if (DrvReset) {
1279 		DrvDoReset();
1280 	}
1281 
1282 	SekNewFrame();
1283 	ZetNewFrame();
1284 
1285 	{
1286 		memset (DrvInputs, 0, 4);
1287 
1288 		for (INT32 i = 0; i < 8; i++) {
1289 			DrvInputs[0] ^= (DrvJoy1[i] & 1) << i;
1290 			DrvInputs[1] ^= (DrvJoy2[i] & 1) << i;
1291 			DrvInputs[2] ^= (DrvJoy3[i] & 1) << i;
1292 			DrvInputs[3] ^= (DrvJoy4[i] & 1) << i;
1293 		}
1294 	}
1295 
1296 	INT32 nInterleave = 286;
1297 	INT32 nCyclesTotal[3] = { (INT32)(double)(7000000 / 54.877858), (INT32)(double)(3500000 / 54.877858), (INT32)(double)(14000000 / 54.877858) };
1298 	INT32 nCyclesDone[3] = { 0, 0, 0 };
1299 
1300 	SekOpen(0);
1301 	ZetOpen(0);
1302 
1303 	vblank = 0;
1304 
1305 	for (INT32 i = 0; i < nInterleave; i++)
1306 	{
1307 		if (m68k_halt) {
1308 			CPU_IDLE(0, Sek);
1309 		} else {
1310 			CPU_RUN(0, Sek);
1311 
1312 			if (i == 240 && irq_enable) {
1313 				irq_enable = 0;
1314 				SekSetIRQLine(4, CPU_IRQSTATUS_AUTO);
1315 			}
1316 		}
1317 
1318 		if (dsp_on) {
1319 			CPU_RUN(2, tms32010);
1320 		}
1321 
1322 		BurnTimerUpdateYM3812((i + 1) * (nCyclesTotal[1] / nInterleave));
1323 
1324 		if (i == 240) {
1325 			if (pBurnDraw) {
1326 				DrvDraw();
1327 			}
1328 			vblank = 1;
1329 		}
1330 	}
1331 
1332 	BurnTimerEndFrameYM3812(nCyclesTotal[1]);
1333 
1334 	if (pBurnSoundOut) {
1335 		BurnYM3812Update(pBurnSoundOut, nBurnSoundLen);
1336 	}
1337 
1338 	ZetClose();
1339 	SekClose();
1340 
1341 	memcpy (DrvSprBuf, DrvSprRAM, 0x1000);
1342 
1343 	return 0;
1344 }
1345 
DrvScan(INT32 nAction,INT32 * pnMin)1346 static INT32 DrvScan(INT32 nAction, INT32 *pnMin)
1347 {
1348 	struct BurnArea ba;
1349 
1350 	if (pnMin != NULL) {
1351 		*pnMin = 0x029719;
1352 	}
1353 
1354 	if (nAction & ACB_MEMORY_RAM)
1355 	{
1356 		memset(&ba, 0, sizeof(ba));
1357 		ba.Data		= AllRam;
1358 		ba.nLen		= RamEnd - AllRam;
1359 		ba.szName	= "RAM";
1360 		BurnAcb(&ba);
1361 	}
1362 
1363 	if (nAction & ACB_DRIVER_DATA)
1364 	{
1365 		SekScan(nAction);
1366 		ZetScan(nAction);
1367 		tms32010_scan(nAction);
1368 
1369 		BurnYM3812Scan(nAction, pnMin);
1370 
1371 		SCAN_VAR(m68k_halt);
1372 		SCAN_VAR(irq_enable);
1373 		SCAN_VAR(flipscreen);
1374 		SCAN_VAR(bgrambank);
1375 		SCAN_VAR(fgrombank);
1376 		SCAN_VAR(displayenable);
1377 		SCAN_VAR(main_ram_seg);
1378 		SCAN_VAR(dsp_addr_w);
1379 		SCAN_VAR(dsp_execute);
1380 		SCAN_VAR(dsp_BIO);
1381 		SCAN_VAR(dsp_on);
1382 		SCAN_VAR(scrollx);
1383 		SCAN_VAR(scrolly);
1384 		SCAN_VAR(vidramoffs);
1385 
1386 		SCAN_VAR(fsharkbt_8741);
1387 	}
1388 
1389 	return 0;
1390 }
1391 
1392 
1393 // Twin Cobra (World)
1394 
1395 static struct BurnRomInfo twincobrRomDesc[] = {
1396 	{ "b30_01.7j",		0x10000, 0x07f64d13, 1 | BRF_PRG | BRF_ESS }, //  0 68k code
1397 	{ "b30_03.7h",		0x10000, 0x41be6978, 1 | BRF_PRG | BRF_ESS }, //  1
1398 	{ "b30_26_ii.8j",	0x08000, 0x3a646618, 1 | BRF_PRG | BRF_ESS }, //  2
1399 	{ "b30_27_ii.8h",	0x08000, 0xd7d1e317, 1 | BRF_PRG | BRF_ESS }, //  3
1400 
1401 	{ "b30_05_ii.4f",	0x08000, 0xe37b3c44, 2 | BRF_PRG | BRF_ESS }, //  4 Z80 code
1402 
1403 	{ "dsp_22.bin",		0x00800, 0x79389a71, 3 | BRF_PRG | BRF_ESS }, //  5 TMS32010 code
1404 	{ "dsp_21.bin",		0x00800, 0x2d135376, 3 | BRF_PRG | BRF_ESS }, //  6
1405 
1406 	{ "b30_08.8c",		0x04000, 0x0a254133, 4 | BRF_GRA },           //  7 Text characters
1407 	{ "b30_07.10b",		0x04000, 0xe9e2d4b1, 4 | BRF_GRA },           //  8
1408 	{ "b30_06.8b",		0x04000, 0xa599d845, 4 | BRF_GRA },           //  9
1409 
1410 	{ "b30_16.20b",		0x10000, 0x15b3991d, 5 | BRF_GRA },           // 10 Background tiles
1411 	{ "b30_15.18b",		0x10000, 0xd9e2e55d, 5 | BRF_GRA },           // 11
1412 	{ "b30_13.18c",		0x10000, 0x13daeac8, 5 | BRF_GRA },           // 12
1413 	{ "b30_14.20c",		0x10000, 0x8cc79357, 5 | BRF_GRA },           // 13
1414 
1415 	{ "b30_12.16c",		0x08000, 0xb5d48389, 6 | BRF_GRA },           // 14 Foreground tiles
1416 	{ "b30_11.14c",		0x08000, 0x97f20fdc, 6 | BRF_GRA },           // 15
1417 	{ "b30_10.12c",		0x08000, 0x170c01db, 6 | BRF_GRA },           // 16
1418 	{ "b30_09.10c",		0x08000, 0x44f5accd, 6 | BRF_GRA },           // 17
1419 
1420 	{ "b30_20.12d",		0x10000, 0xcb4092b8, 7 | BRF_GRA },           // 18 Sprites
1421 	{ "b30_19.14d",		0x10000, 0x9cb8675e, 7 | BRF_GRA },           // 19
1422 	{ "b30_18.15d",		0x10000, 0x806fb374, 7 | BRF_GRA },           // 20
1423 	{ "b30_17.16d",		0x10000, 0x4264bff8, 7 | BRF_GRA },           // 21
1424 
1425 	{ "82s129.d3",		0x00100, 0x24e7d62f, 0 | BRF_OPT },           // 22 Proms (not used)
1426 	{ "82s129.d4",		0x00100, 0xa50cef09, 0 | BRF_OPT },           // 23
1427 	{ "82s123.d2",		0x00020, 0xf72482db, 0 | BRF_OPT },           // 24
1428 	{ "82s123.e18",		0x00020, 0xbc88cced, 0 | BRF_OPT },           // 25
1429 	{ "82s123.b24",		0x00020, 0x4fb5df2a, 0 | BRF_OPT },           // 26
1430 };
1431 
1432 STD_ROM_PICK(twincobr)
STD_ROM_FN(twincobr)1433 STD_ROM_FN(twincobr)
1434 
1435 static INT32 twincobrInit()
1436 {
1437 	return DrvInit(0, 1);
1438 }
1439 
1440 struct BurnDriver BurnDrvTwincobr = {
1441 	"twincobr", NULL, NULL, NULL, "1987",
1442 	"Twin Cobra (World)\0", NULL, "Toaplan / Taito Corporation", "Miscellaneous",
1443 	NULL, NULL, NULL, NULL,
1444 	BDF_GAME_WORKING | BDF_ORIENTATION_VERTICAL, 2, HARDWARE_TOAPLAN_MISC, GBF_VERSHOOT, 0,
1445 	NULL, twincobrRomInfo, twincobrRomName, NULL, NULL, NULL, NULL, TwincobrInputInfo, TwincobrDIPInfo,
1446 	twincobrInit, DrvExit, DrvFrame, DrvDraw, DrvScan, &DrvRecalc, 0x700,
1447 	240, 320, 3, 4
1448 };
1449 
1450 
1451 // Twin Cobra (US)
1452 
1453 static struct BurnRomInfo twincobruRomDesc[] = {
1454 	{ "b30_01.7j",		0x10000, 0x07f64d13, 1 | BRF_PRG | BRF_ESS }, //  0 68k code
1455 	{ "b30_03.7h",		0x10000, 0x41be6978, 1 | BRF_PRG | BRF_ESS }, //  1
1456 	{ "b30_26_i.8j",	0x08000, 0xbdd00ba4, 1 | BRF_PRG | BRF_ESS }, //  2
1457 	{ "b30_27_i.8h",	0x08000, 0xed600907, 1 | BRF_PRG | BRF_ESS }, //  3
1458 
1459 	{ "b30_05.4f",		0x08000, 0x1a8f1e10, 2 | BRF_PRG | BRF_ESS }, //  4 Z80 code
1460 
1461 	{ "dsp_22.bin",		0x00800, 0x79389a71, 3 | BRF_PRG | BRF_ESS }, //  5 TMS32010 code
1462 	{ "dsp_21.bin",		0x00800, 0x2d135376, 3 | BRF_PRG | BRF_ESS }, //  6
1463 
1464 	{ "b30_08.8c",		0x04000, 0x0a254133, 4 | BRF_GRA },           //  7 Text characters
1465 	{ "b30_07.10b",		0x04000, 0xe9e2d4b1, 4 | BRF_GRA },           //  8
1466 	{ "b30_06.8b",		0x04000, 0xa599d845, 4 | BRF_GRA },           //  9
1467 
1468 	{ "b30_16.20b",		0x10000, 0x15b3991d, 5 | BRF_GRA },           // 10 Background tiles
1469 	{ "b30_15.18b",		0x10000, 0xd9e2e55d, 5 | BRF_GRA },           // 11
1470 	{ "b30_13.18c",		0x10000, 0x13daeac8, 5 | BRF_GRA },           // 12
1471 	{ "b30_14.20c",		0x10000, 0x8cc79357, 5 | BRF_GRA },           // 13
1472 
1473 	{ "b30_12.16c",		0x08000, 0xb5d48389, 6 | BRF_GRA },           // 14 Foreground tiles
1474 	{ "b30_11.14c",		0x08000, 0x97f20fdc, 6 | BRF_GRA },           // 15
1475 	{ "b30_10.12c",		0x08000, 0x170c01db, 6 | BRF_GRA },           // 16
1476 	{ "b30_09.10c",		0x08000, 0x44f5accd, 6 | BRF_GRA },           // 17
1477 
1478 	{ "b30_20.12d",		0x10000, 0xcb4092b8, 7 | BRF_GRA },           // 18 Sprites
1479 	{ "b30_19.14d",		0x10000, 0x9cb8675e, 7 | BRF_GRA },           // 19
1480 	{ "b30_18.15d",		0x10000, 0x806fb374, 7 | BRF_GRA },           // 20
1481 	{ "b30_17.16d",		0x10000, 0x4264bff8, 7 | BRF_GRA },           // 21
1482 
1483 	{ "82s129.d3",		0x00100, 0x24e7d62f, 0 | BRF_OPT },           // 22 Proms (not used)
1484 	{ "82s129.d4",		0x00100, 0xa50cef09, 0 | BRF_OPT },           // 23
1485 	{ "82s123.d2",		0x00020, 0xf72482db, 0 | BRF_OPT },           // 24
1486 	{ "82s123.e18",		0x00020, 0xbc88cced, 0 | BRF_OPT },           // 25
1487 	{ "82s123.b24",		0x00020, 0x4fb5df2a, 0 | BRF_OPT },           // 26
1488 };
1489 
1490 STD_ROM_PICK(twincobru)
1491 STD_ROM_FN(twincobru)
1492 
1493 struct BurnDriver BurnDrvTwincobru = {
1494 	"twincobru", "twincobr", NULL, NULL, "1987",
1495 	"Twin Cobra (US)\0", NULL, "Toaplan / Taito America Corporation (Romstar license)", "Miscellaneous",
1496 	NULL, NULL, NULL, NULL,
1497 	BDF_GAME_WORKING | BDF_CLONE | BDF_ORIENTATION_VERTICAL, 2, HARDWARE_TOAPLAN_MISC, GBF_VERSHOOT, 0,
1498 	NULL, twincobruRomInfo, twincobruRomName, NULL, NULL, NULL, NULL, TwincobrInputInfo, TwincobruDIPInfo,
1499 	twincobrInit, DrvExit, DrvFrame, DrvDraw, DrvScan, &DrvRecalc, 0x700,
1500 	240, 320, 3, 4
1501 };
1502 
1503 
1504 // Kyukyoku Tiger (Japan)
1505 
1506 static struct BurnRomInfo ktigerRomDesc[] = {
1507 	{ "b30_01.7j",		0x10000, 0x07f64d13, 1 | BRF_PRG | BRF_ESS }, //  0 68k code
1508 	{ "b30_03.7h",		0x10000, 0x41be6978, 1 | BRF_PRG | BRF_ESS }, //  1
1509 	{ "b30_02.8j",		0x08000, 0x1d63e9c4, 1 | BRF_PRG | BRF_ESS }, //  2
1510 	{ "b30_04.8h",		0x08000, 0x03957a30, 1 | BRF_PRG | BRF_ESS }, //  3
1511 
1512 	{ "b30_05.4f",		0x08000, 0x1a8f1e10, 2 | BRF_PRG | BRF_ESS }, //  4 Z80 code
1513 
1514 	{ "d70015u_gxc-03_mcu_74002", 0x00c00, 0x265b6f32, 3 | BRF_PRG | BRF_ESS }, //  5 TMS32010 code
1515 
1516 	{ "b30_08.8c",		0x04000, 0x0a254133, 4 | BRF_GRA },           //  6 Text characters
1517 	{ "b30_07.10b",		0x04000, 0xe9e2d4b1, 4 | BRF_GRA },           //  7
1518 	{ "b30_06.8b",		0x04000, 0xa599d845, 4 | BRF_GRA },           //  8
1519 
1520 	{ "b30_16.20b",		0x10000, 0x15b3991d, 5 | BRF_GRA },           //  9 Background tiles
1521 	{ "b30_15.18b",		0x10000, 0xd9e2e55d, 5 | BRF_GRA },           // 10
1522 	{ "b30_13.18c",		0x10000, 0x13daeac8, 5 | BRF_GRA },           // 11
1523 	{ "b30_14.20c",		0x10000, 0x8cc79357, 5 | BRF_GRA },           // 12
1524 
1525 	{ "b30_12.16c",		0x08000, 0xb5d48389, 6 | BRF_GRA },           // 13 Foreground tiles
1526 	{ "b30_11.14c",		0x08000, 0x97f20fdc, 6 | BRF_GRA },           // 14
1527 	{ "b30_10.12c",		0x08000, 0x170c01db, 6 | BRF_GRA },           // 15
1528 	{ "b30_09.10c",		0x08000, 0x44f5accd, 6 | BRF_GRA },           // 16
1529 
1530 	{ "b30_20.12d",		0x10000, 0xcb4092b8, 7 | BRF_GRA },           // 17 Sprites
1531 	{ "b30_19.14d",		0x10000, 0x9cb8675e, 7 | BRF_GRA },           // 18
1532 	{ "b30_18.15d",		0x10000, 0x806fb374, 7 | BRF_GRA },           // 19
1533 	{ "b30_17.16d",		0x10000, 0x4264bff8, 7 | BRF_GRA },           // 20
1534 
1535 	{ "82s129.d3",		0x00100, 0x24e7d62f, 0 | BRF_OPT },           // 21 Proms (not used)
1536 	{ "82s129.d4",		0x00100, 0xa50cef09, 0 | BRF_OPT },           // 22
1537 	{ "82s123.d2",		0x00020, 0xf72482db, 0 | BRF_OPT },           // 23
1538 	{ "82s123.e18",		0x00020, 0xbc88cced, 0 | BRF_OPT },           // 24
1539 	{ "82s123.b24",		0x00020, 0x4fb5df2a, 0 | BRF_OPT },           // 25
1540 };
1541 
1542 STD_ROM_PICK(ktiger)
STD_ROM_FN(ktiger)1543 STD_ROM_FN(ktiger)
1544 
1545 static INT32 ktigerInit()
1546 {
1547 	return DrvInit(0, 0);
1548 }
1549 
1550 struct BurnDriver BurnDrvKtiger = {
1551 	"ktiger", "twincobr", NULL, NULL, "1987",
1552 	"Kyukyoku Tiger (Japan)\0", NULL, "Toaplan / Taito Corporation", "Miscellaneous",
1553 	NULL, NULL, NULL, NULL,
1554 	BDF_GAME_WORKING | BDF_CLONE | BDF_ORIENTATION_VERTICAL, 2, HARDWARE_TOAPLAN_MISC, GBF_VERSHOOT, 0,
1555 	NULL, ktigerRomInfo, ktigerRomName, NULL, NULL, NULL, NULL, TwincobrInputInfo, KtigerDIPInfo,
1556 	ktigerInit, DrvExit, DrvFrame, DrvDraw, DrvScan, &DrvRecalc, 0x700,
1557 	240, 320, 3, 4
1558 };
1559 
1560 
1561 // Kyukyoku Tiger (Japan, 2 Players)
1562 
1563 static struct BurnRomInfo ktiger2pRomDesc[] = {
1564 	{ "b30_01.7j",		0x10000, 0x07f64d13, 1 | BRF_PRG | BRF_ESS }, //  0 68k code
1565 	{ "b30_03.7h",		0x10000, 0x41be6978, 1 | BRF_PRG | BRF_ESS }, //  1
1566 	{ "b30_02_2p.8j",	0x08000, 0x321e2be6, 1 | BRF_PRG | BRF_ESS }, //  2
1567 	{ "b30_04_2p.8h",	0x08000, 0xc3f960ff, 1 | BRF_PRG | BRF_ESS }, //  3
1568 
1569 	{ "b30_05.4f",		0x08000, 0x1a8f1e10, 2 | BRF_PRG | BRF_ESS }, //  4 Z80 code
1570 
1571 	{ "d70015u_gxc-03_mcu_74002", 0x00c00, 0x265b6f32, 3 | BRF_PRG | BRF_ESS }, //  5 TMS32010 code
1572 
1573 	{ "b30_08.8c",		0x04000, 0x0a254133, 4 | BRF_GRA },           //  6 Text characters
1574 	{ "b30_07.10b",		0x04000, 0xe9e2d4b1, 4 | BRF_GRA },           //  7
1575 	{ "b30_06.8b",		0x04000, 0xa599d845, 4 | BRF_GRA },           //  8
1576 
1577 	{ "b30_16.20b",		0x10000, 0x15b3991d, 5 | BRF_GRA },           //  9 Background tiles
1578 	{ "b30_15.18b",		0x10000, 0xd9e2e55d, 5 | BRF_GRA },           // 10
1579 	{ "b30_13.18c",		0x10000, 0x13daeac8, 5 | BRF_GRA },           // 11
1580 	{ "b30_14.20c",		0x10000, 0x8cc79357, 5 | BRF_GRA },           // 12
1581 
1582 	{ "b30_12.16c",		0x08000, 0xb5d48389, 6 | BRF_GRA },           // 13 Foreground tiles
1583 	{ "b30_11.14c",		0x08000, 0x97f20fdc, 6 | BRF_GRA },           // 14
1584 	{ "b30_10.12c",		0x08000, 0x170c01db, 6 | BRF_GRA },           // 15
1585 	{ "b30_09.10c",		0x08000, 0x44f5accd, 6 | BRF_GRA },           // 16
1586 
1587 	{ "b30_20.12d",		0x10000, 0xcb4092b8, 7 | BRF_GRA },           // 17 Sprites
1588 	{ "b30_19.14d",		0x10000, 0x9cb8675e, 7 | BRF_GRA },           // 18
1589 	{ "b30_18.15d",		0x10000, 0x806fb374, 7 | BRF_GRA },           // 19
1590 	{ "b30_17.16d",		0x10000, 0x4264bff8, 7 | BRF_GRA },           // 20
1591 
1592 	{ "82s129.d3",		0x00100, 0x24e7d62f, 0 | BRF_OPT },           // 21 Proms (not used)
1593 	{ "82s129.d4",		0x00100, 0xa50cef09, 0 | BRF_OPT },           // 22
1594 	{ "82s123.d2",		0x00020, 0xf72482db, 0 | BRF_OPT },           // 23
1595 	{ "82s123.e18",		0x00020, 0xbc88cced, 0 | BRF_OPT },           // 24
1596 	{ "82s123.b24",		0x00020, 0x4fb5df2a, 0 | BRF_OPT },           // 25
1597 };
1598 
1599 STD_ROM_PICK(ktiger2p)
1600 STD_ROM_FN(ktiger2p)
1601 
1602 struct BurnDriver BurnDrvktiger2p = {
1603 	"ktiger2p", "twincobr", NULL, NULL, "2021",
1604 	"Kyukyoku Tiger (Japan, 2 Players)\0", NULL, "M2 Co., Ltd.", "Miscellaneous",
1605 	NULL, NULL, NULL, NULL,
1606 	BDF_GAME_WORKING | BDF_CLONE | BDF_ORIENTATION_VERTICAL, 2, HARDWARE_TOAPLAN_MISC, GBF_VERSHOOT, 0,
1607 	NULL, ktiger2pRomInfo, ktiger2pRomName, NULL, NULL, NULL, NULL, TwincobrInputInfo, TwincobruDIPInfo,
1608 	ktigerInit, DrvExit, DrvFrame, DrvDraw, DrvScan, &DrvRecalc, 0x700,
1609 	240, 320, 3, 4
1610 };
1611 
1612 
1613 // Flying Shark (World)
1614 
1615 static struct BurnRomInfo fsharkRomDesc[] = {
1616 	{ "b02_18-1.m8",	0x10000, 0x04739e02, 1 | BRF_PRG | BRF_ESS }, //  0 68k code
1617 	{ "b02_17-1.p8",	0x10000, 0xfd6ef7a8, 1 | BRF_PRG | BRF_ESS }, //  1
1618 
1619 	{ "b02_16.l5",		0x08000, 0xcdd1a153, 2 | BRF_PRG | BRF_ESS }, //  2 Z80 code
1620 
1621 	{ "d70012u_gxc-02_mcu_71001",	0x00c00, 0xeee0ff59, 3 | BRF_PRG | BRF_ESS }, //  3 TMS32010 code
1622 
1623 	{ "b02_07-1.h11",	0x04000, 0xe669f80e, 4 | BRF_GRA },           //  4 Text characters
1624 	{ "b02_06-1.h10",	0x04000, 0x5e53ae47, 4 | BRF_GRA },           //  5
1625 	{ "b02_05-1.h8",	0x04000, 0xa8b05bd0, 4 | BRF_GRA },           //  6
1626 
1627 	{ "b02_12.h20",		0x08000, 0x733b9997, 5 | BRF_GRA },           //  7 Background tiles
1628 	{ "b02_15.h24",		0x08000, 0x8b70ef32, 5 | BRF_GRA },           //  8
1629 	{ "b02_14.h23",		0x08000, 0xf711ba7d, 5 | BRF_GRA },           //  9
1630 	{ "b02_13.h21",		0x08000, 0x62532cd3, 5 | BRF_GRA },           // 10
1631 
1632 	{ "b02_08.h13",		0x08000, 0xef0cf49c, 6 | BRF_GRA },           // 11 Foreground tiles
1633 	{ "b02_11.h18",		0x08000, 0xf5799422, 6 | BRF_GRA },           // 12
1634 	{ "b02_10.h16",		0x08000, 0x4bd099ff, 6 | BRF_GRA },           // 13
1635 	{ "b02_09.h15",		0x08000, 0x230f1582, 6 | BRF_GRA },           // 14
1636 
1637 	{ "b02_01.d15",		0x10000, 0x2234b424, 7 | BRF_GRA },           // 15 Sprites
1638 	{ "b02_02.d16",		0x10000, 0x30d4c9a8, 7 | BRF_GRA },           // 16
1639 	{ "b02_03.d17",		0x10000, 0x64f3d88f, 7 | BRF_GRA },           // 17
1640 	{ "b02_04.d20",		0x10000, 0x3b23a9fc, 7 | BRF_GRA },           // 18
1641 
1642 	{ "b02-20.b4",		0x00100, 0x24e7d62f, 0 | BRF_OPT },           // 19 Proms (not used)
1643 	{ "b02-21.b5",		0x00100, 0xa50cef09, 0 | BRF_OPT },           // 20
1644 	{ "b02-19.b2",		0x00020, 0xf72482db, 0 | BRF_OPT },           // 21
1645 	{ "b02-22.c21",		0x00020, 0xbc88cced, 0 | BRF_OPT },           // 22
1646 	{ "b02-23.f28",		0x00020, 0x4fb5df2a, 0 | BRF_OPT },           // 33
1647 };
1648 
1649 STD_ROM_PICK(fshark)
STD_ROM_FN(fshark)1650 STD_ROM_FN(fshark)
1651 
1652 static INT32 fsharkInit()
1653 {
1654 	return DrvInit(1, 0);
1655 }
1656 
fsharknibInit()1657 static INT32 fsharknibInit()
1658 {
1659 	return DrvInit(1, 1);
1660 }
1661 
1662 struct BurnDriver BurnDrvFshark = {
1663 	"fshark", NULL, NULL, NULL, "1987",
1664 	"Flying Shark (World)\0", NULL, "Toaplan / Taito Corporation", "Miscellaneous",
1665 	NULL, NULL, NULL, NULL,
1666 	BDF_GAME_WORKING | BDF_ORIENTATION_VERTICAL, 2, HARDWARE_TOAPLAN_MISC, GBF_VERSHOOT, 0,
1667 	NULL, fsharkRomInfo, fsharkRomName, NULL, NULL, NULL, NULL, FsharkInputInfo, FsharkDIPInfo,
1668 	fsharkInit, DrvExit, DrvFrame, DrvDraw, DrvScan, &DrvRecalc, 0x700,
1669 	240, 320, 3, 4
1670 };
1671 
1672 
1673 // Sky Shark (US, set 1)
1674 
1675 static struct BurnRomInfo skysharkRomDesc[] = {
1676 	{ "b02_18-2.m8",	0x10000, 0x888e90f3, 1 | BRF_PRG | BRF_ESS }, //  0 68k code
1677 	{ "b02_17-2.p8",	0x10000, 0x066d67be, 1 | BRF_PRG | BRF_ESS }, //  1
1678 
1679 	{ "b02_16.l5",		0x08000, 0xcdd1a153, 2 | BRF_PRG | BRF_ESS }, //  2 Z80 code
1680 
1681 	{ "d70012u_gxc-02_mcu_71001",	0x00c00, 0xeee0ff59, 3 | BRF_PRG | BRF_ESS }, //  3 TMS32010 code
1682 
1683 	{ "b02_7-2.h11",	0x04000, 0xaf48c4e6, 4 | BRF_GRA },           //  4 Text characters
1684 	{ "b02_6-2.h10",	0x04000, 0x9a29a862, 4 | BRF_GRA },           //  5
1685 	{ "b02_5-2.h8",		0x04000, 0xfb7cad55, 4 | BRF_GRA },           //  6
1686 
1687 	{ "b02_12.h20",		0x08000, 0x733b9997, 5 | BRF_GRA },           //  7 Background tiles
1688 	{ "b02_15.h24",		0x08000, 0x8b70ef32, 5 | BRF_GRA },           //  8
1689 	{ "b02_14.h23",		0x08000, 0xf711ba7d, 5 | BRF_GRA },           //  9
1690 	{ "b02_13.h21",		0x08000, 0x62532cd3, 5 | BRF_GRA },           // 10
1691 
1692 	{ "b02_08.h13",		0x08000, 0xef0cf49c, 6 | BRF_GRA },           // 11 Foreground tiles
1693 	{ "b02_11.h18",		0x08000, 0xf5799422, 6 | BRF_GRA },           // 12
1694 	{ "b02_10.h16",		0x08000, 0x4bd099ff, 6 | BRF_GRA },           // 13
1695 	{ "b02_09.h15",		0x08000, 0x230f1582, 6 | BRF_GRA },           // 14
1696 
1697 	{ "b02_01.d15",		0x10000, 0x2234b424, 7 | BRF_GRA },           // 15 Sprites
1698 	{ "b02_02.d16",		0x10000, 0x30d4c9a8, 7 | BRF_GRA },           // 16
1699 	{ "b02_03.d17",		0x10000, 0x64f3d88f, 7 | BRF_GRA },           // 17
1700 	{ "b02_04.d20",		0x10000, 0x3b23a9fc, 7 | BRF_GRA },           // 18
1701 
1702 	{ "b02-20.b4",		0x00100, 0x24e7d62f, 0 | BRF_OPT },           // 19 Proms (not used)
1703 	{ "b02-21.b5",		0x00100, 0xa50cef09, 0 | BRF_OPT },           // 20
1704 	{ "b02-19.b2",		0x00020, 0xf72482db, 0 | BRF_OPT },           // 21
1705 	{ "b02-22.c21",		0x00020, 0xbc88cced, 0 | BRF_OPT },           // 22
1706 	{ "b02-23.f28",		0x00020, 0x4fb5df2a, 0 | BRF_OPT },           // 23
1707 };
1708 
1709 STD_ROM_PICK(skyshark)
1710 STD_ROM_FN(skyshark)
1711 
1712 struct BurnDriver BurnDrvSkyshark = {
1713 	"skyshark", "fshark", NULL, NULL, "1987",
1714 	"Sky Shark (US, set 1)\0", NULL, "Toaplan / Taito America Corporation (Romstar license)", "Miscellaneous",
1715 	NULL, NULL, NULL, NULL,
1716 	BDF_GAME_WORKING | BDF_CLONE | BDF_ORIENTATION_VERTICAL, 2, HARDWARE_TOAPLAN_MISC, GBF_VERSHOOT, 0,
1717 	NULL, skysharkRomInfo, skysharkRomName, NULL, NULL, NULL, NULL, FsharkInputInfo, SkysharkDIPInfo,
1718 	fsharkInit, DrvExit, DrvFrame, DrvDraw, DrvScan, &DrvRecalc, 0x700,
1719 	240, 320, 3, 4
1720 };
1721 
1722 
1723 // Sky Shark (US, set 2)
1724 
1725 static struct BurnRomInfo skysharkaRomDesc[] = {
1726 	{ "b02_18-2.m8",	0x10000, 0x341deaac, 1 | BRF_PRG | BRF_ESS }, //  0 68k code
1727 	{ "b02_17-2.p8",	0x10000, 0xec3b5a2c, 1 | BRF_PRG | BRF_ESS }, //  1
1728 
1729 	{ "b02_16.l5",		0x08000, 0xcdd1a153, 2 | BRF_PRG | BRF_ESS }, //  2 Z80 code
1730 
1731 	{ "d70012u_gxc-02_mcu_71001",	0x00c00, 0xeee0ff59, 3 | BRF_PRG | BRF_ESS }, //  3 TMS32010 code
1732 
1733 	{ "b02_7-2.h11",	0x04000, 0xaf48c4e6, 4 | BRF_GRA },           //  4 Text characters
1734 	{ "b02_6-2.h10",	0x04000, 0x9a29a862, 4 | BRF_GRA },           //  5
1735 	{ "b02_5-2.h8",		0x04000, 0xfb7cad55, 4 | BRF_GRA },           //  6
1736 
1737 	{ "b02_12.h20",		0x08000, 0x733b9997, 5 | BRF_GRA },           //  7 Background tiles
1738 	{ "b02_15.h24",		0x08000, 0x8b70ef32, 5 | BRF_GRA },           //  8
1739 	{ "b02_14.h23",		0x08000, 0xf711ba7d, 5 | BRF_GRA },           //  9
1740 	{ "b02_13.h21",		0x08000, 0x62532cd3, 5 | BRF_GRA },           // 10
1741 
1742 	{ "b02_08.h13",		0x08000, 0xef0cf49c, 6 | BRF_GRA },           // 11 Foreground tiles
1743 	{ "b02_11.h18",		0x08000, 0xf5799422, 6 | BRF_GRA },           // 12
1744 	{ "b02_10.h16",		0x08000, 0x4bd099ff, 6 | BRF_GRA },           // 13
1745 	{ "b02_09.h15",		0x08000, 0x230f1582, 6 | BRF_GRA },           // 14
1746 
1747 	{ "b02_01.d15",		0x10000, 0x2234b424, 7 | BRF_GRA },           // 15 Sprites
1748 	{ "b02_02.d16",		0x10000, 0x30d4c9a8, 7 | BRF_GRA },           // 16
1749 	{ "b02_03.d17",		0x10000, 0x64f3d88f, 7 | BRF_GRA },           // 17
1750 	{ "b02_04.d20",		0x10000, 0x3b23a9fc, 7 | BRF_GRA },           // 18
1751 
1752 	{ "b02-20.b4",		0x00100, 0x24e7d62f, 0 | BRF_OPT },           // 19 Proms (not used)
1753 	{ "b02-21.b5",		0x00100, 0xa50cef09, 0 | BRF_OPT },           // 20
1754 	{ "b02-19.b2",		0x00020, 0xf72482db, 0 | BRF_OPT },           // 21
1755 	{ "b02-22.c21",		0x00020, 0xbc88cced, 0 | BRF_OPT },           // 22
1756 	{ "b02-23.f28",		0x00020, 0x4fb5df2a, 0 | BRF_OPT },           // 23
1757 };
1758 
1759 STD_ROM_PICK(skysharka)
1760 STD_ROM_FN(skysharka)
1761 
1762 struct BurnDriver BurnDrvSkysharka = {
1763 	"skysharka", "fshark", NULL, NULL, "1987",
1764 	"Sky Shark (US, set 2)\0", NULL, "Toaplan / Taito America Corporation (Romstar license)", "Miscellaneous",
1765 	NULL, NULL, NULL, NULL,
1766 	BDF_GAME_WORKING | BDF_CLONE | BDF_ORIENTATION_VERTICAL, 2, HARDWARE_TOAPLAN_MISC, GBF_VERSHOOT, 0,
1767 	NULL, skysharkaRomInfo, skysharkaRomName, NULL, NULL, NULL, NULL, FsharkInputInfo, SkysharkDIPInfo,
1768 	fsharkInit, DrvExit, DrvFrame, DrvDraw, DrvScan, &DrvRecalc, 0x700,
1769 	240, 320, 3, 4
1770 };
1771 
1772 
1773 // Hishou Zame (Japan)
1774 
1775 static struct BurnRomInfo hishouzaRomDesc[] = {
1776 	{ "b02_18.m8",		0x10000, 0x4444bb94, 1 | BRF_PRG | BRF_ESS }, //  0 68k code
1777 	{ "b02_17.p8",		0x10000, 0xcdac7228, 1 | BRF_PRG | BRF_ESS }, //  1
1778 
1779 	{ "b02_16.l5",		0x08000, 0xcdd1a153, 2 | BRF_PRG | BRF_ESS }, //  2 Z80 code
1780 
1781 	{ "d70011u_gxc-01_mcu_64000",	0x00c00, 0x1ca63774, 3 | BRF_PRG | BRF_ESS }, //  3 TMS32010 code
1782 
1783 	{ "b02-07.h11",		0x04000, 0xc13a775e, 4 | BRF_GRA },           //  4 Text characters
1784 	{ "b02-06.h10",		0x04000, 0xad5f1371, 4 | BRF_GRA },           //  5
1785 	{ "b02-05.h8",		0x04000, 0x85a7bff6, 4 | BRF_GRA },           //  6
1786 
1787 	{ "b02_12.h20",		0x08000, 0x733b9997, 5 | BRF_GRA },           //  7 Background tiles
1788 	{ "b02_15.h24",		0x08000, 0x8b70ef32, 5 | BRF_GRA },           //  8
1789 	{ "b02_14.h23",		0x08000, 0xf711ba7d, 5 | BRF_GRA },           //  9
1790 	{ "b02_13.h21",		0x08000, 0x62532cd3, 5 | BRF_GRA },           // 10
1791 
1792 	{ "b02_08.h13",		0x08000, 0xef0cf49c, 6 | BRF_GRA },           // 11 Foreground tiles
1793 	{ "b02_11.h18",		0x08000, 0xf5799422, 6 | BRF_GRA },           // 12
1794 	{ "b02_10.h16",		0x08000, 0x4bd099ff, 6 | BRF_GRA },           // 13
1795 	{ "b02_09.h15",		0x08000, 0x230f1582, 6 | BRF_GRA },           // 14
1796 
1797 	{ "b02_01.d15",		0x10000, 0x2234b424, 7 | BRF_GRA },           // 15 Sprites
1798 	{ "b02_02.d16",		0x10000, 0x30d4c9a8, 7 | BRF_GRA },           // 16
1799 	{ "b02_03.d17",		0x10000, 0x64f3d88f, 7 | BRF_GRA },           // 17
1800 	{ "b02_04.d20",		0x10000, 0x3b23a9fc, 7 | BRF_GRA },           // 18
1801 
1802 	{ "b02-20.b4",		0x00100, 0x24e7d62f, 0 | BRF_OPT },           // 19 Proms (not used)
1803 	{ "b02-21.b5",		0x00100, 0xa50cef09, 0 | BRF_OPT },           // 20
1804 	{ "b02-19.b2",		0x00020, 0xf72482db, 0 | BRF_OPT },           // 21
1805 	{ "b02-22.c21",		0x00020, 0xbc88cced, 0 | BRF_OPT },           // 22
1806 	{ "b02-23.f28",		0x00020, 0x4fb5df2a, 0 | BRF_OPT },           // 23
1807 };
1808 
1809 STD_ROM_PICK(hishouza)
1810 STD_ROM_FN(hishouza)
1811 
1812 struct BurnDriver BurnDrvHishouza = {
1813 	"hishouza", "fshark", NULL, NULL, "1987",
1814 	"Hishou Zame (Japan)\0", NULL, "Toaplan / Taito Corporation", "Miscellaneous",
1815 	NULL, NULL, NULL, NULL,
1816 	BDF_GAME_WORKING | BDF_CLONE | BDF_ORIENTATION_VERTICAL, 2, HARDWARE_TOAPLAN_MISC, GBF_VERSHOOT, 0,
1817 	NULL, hishouzaRomInfo, hishouzaRomName, NULL, NULL, NULL, NULL, FsharkInputInfo, HishouzaDIPInfo,
1818 	fsharkInit, DrvExit, DrvFrame, DrvDraw, DrvScan, &DrvRecalc, 0x700,
1819 	240, 320, 3, 4
1820 };
1821 
1822 
1823 // Flying Shark (bootleg with 8741)
1824 
1825 static struct BurnRomInfo fsharkbtRomDesc[] = {
1826 	{ "r18",			0x10000, 0xef30f563, 1 | BRF_PRG | BRF_ESS }, //  0 68k code
1827 	{ "r17",			0x10000, 0x0e18d25f, 1 | BRF_PRG | BRF_ESS }, //  1
1828 
1829 	{ "b02_16.l5",		0x08000, 0xcdd1a153, 2 | BRF_PRG | BRF_ESS }, //  2 Z80 code
1830 
1831 	{ "mcu-1.bpr",		0x00400, 0x45d4d1b1, 3 | BRF_PRG | BRF_ESS }, //  3 TMS32010 code
1832 	{ "mcu-2.bpr",		0x00400, 0x651336d1, 3 | BRF_PRG | BRF_ESS }, //  4
1833 	{ "mcu-3.bpr",		0x00400, 0xdf88e79b, 3 | BRF_PRG | BRF_ESS }, //  5
1834 	{ "mcu-4.bpr",		0x00400, 0xa2094a7f, 3 | BRF_PRG | BRF_ESS }, //  6
1835 	{ "mcu-5.bpr",		0x00400, 0xf97a58da, 3 | BRF_PRG | BRF_ESS }, //  7
1836 	{ "mcu-6.bpr",		0x00400, 0xffcc422d, 3 | BRF_PRG | BRF_ESS }, //  8
1837 	{ "mcu-7.bpr",		0x00400, 0x0cd30d49, 3 | BRF_PRG | BRF_ESS }, //  9
1838 	{ "mcu-8.bpr",		0x00400, 0x3379bbff, 3 | BRF_PRG | BRF_ESS }, // 10
1839 
1840 	{ "b02_07-1.h11",	0x04000, 0xe669f80e, 4 | BRF_GRA },           // 11 Text characters
1841 	{ "b02_06-1.h10",	0x04000, 0x5e53ae47, 4 | BRF_GRA },           // 12
1842 	{ "b02_05-1.h8",	0x04000, 0xa8b05bd0, 4 | BRF_GRA },           // 13
1843 
1844 	{ "b02_12.h20",		0x08000, 0x733b9997, 5 | BRF_GRA },           // 14 Background tiles
1845 	{ "b02_15.h24",		0x08000, 0x8b70ef32, 5 | BRF_GRA },           // 15
1846 	{ "b02_14.h23",		0x08000, 0xf711ba7d, 5 | BRF_GRA },           // 16
1847 	{ "b02_13.h21",		0x08000, 0x62532cd3, 5 | BRF_GRA },           // 17
1848 
1849 	{ "b02_08.h13",		0x08000, 0xef0cf49c, 6 | BRF_GRA },           // 18 Foreground tiles
1850 	{ "b02_11.h18",		0x08000, 0xf5799422, 6 | BRF_GRA },           // 19
1851 	{ "b02_10.h16",		0x08000, 0x4bd099ff, 6 | BRF_GRA },           // 20
1852 	{ "b02_09.h15",		0x08000, 0x230f1582, 6 | BRF_GRA },           // 21
1853 
1854 	{ "b02_01.d15",		0x10000, 0x2234b424, 7 | BRF_GRA },           // 22 Sprites
1855 	{ "b02_02.d16",		0x10000, 0x30d4c9a8, 7 | BRF_GRA },           // 23
1856 	{ "b02_03.d17",		0x10000, 0x64f3d88f, 7 | BRF_GRA },           // 24
1857 	{ "b02_04.d20",		0x10000, 0x3b23a9fc, 7 | BRF_GRA },           // 25
1858 
1859 	{ "clr2.bpr",		0x00100, 0x24e7d62f, 0 | BRF_OPT },           // 26 Proms (not used)
1860 	{ "clr1.bpr",		0x00100, 0xa50cef09, 0 | BRF_OPT },           // 27
1861 	{ "clr3.bpr",		0x00100, 0x016fe2f7, 0 | BRF_OPT },           // 28
1862 
1863 	{ "fsb_8741.mcu",	0x00400, 0x00000000, 9 | BRF_NODUMP | BRF_OPT},// 29 MCU
1864 };
1865 
1866 STD_ROM_PICK(fsharkbt)
1867 STD_ROM_FN(fsharkbt)
1868 
1869 struct BurnDriver BurnDrvFsharkbt = {
1870 	"fsharkbt", "fshark", NULL, NULL, "1987",
1871 	"Flying Shark (bootleg with 8741)\0", NULL, "bootleg", "Miscellaneous",
1872 	NULL, NULL, NULL, NULL,
1873 	BDF_GAME_WORKING | BDF_CLONE | BDF_BOOTLEG | BDF_ORIENTATION_VERTICAL, 2, HARDWARE_TOAPLAN_MISC, GBF_VERSHOOT, 0,
1874 	NULL, fsharkbtRomInfo, fsharkbtRomName, NULL, NULL, NULL, NULL, FsharkInputInfo, SkysharkDIPInfo,
1875 	fsharknibInit, DrvExit, DrvFrame, DrvDraw, DrvScan, &DrvRecalc, 0x700,
1876 	240, 320, 3, 4
1877 };
1878 
1879 
1880 // Flyin' Shark (bootleg of Hishou Zame)
1881 
1882 static struct BurnRomInfo fnsharkRomDesc[] = {
1883 	{ "h.ic226",		0x10000, 0xea4bcb43, 1 | BRF_PRG | BRF_ESS }, //  0 68k code
1884 	{ "g.ic202",		0x10000, 0xd1f39ed2, 1 | BRF_PRG | BRF_ESS }, //  1
1885 
1886 	{ "f.ic170",		0x08000, 0xcdd1a153, 2 | BRF_PRG | BRF_ESS }, //  2 Z80 code
1887 
1888 	{ "82s191_r.bin",	0x00800, 0x5b96ae3f, 7 | BRF_PRG | BRF_ESS }, //  3 TMS32010 code
1889 	{ "82s191_l.bin",	0x00800, 0xd5dfc8dd, 7 | BRF_PRG | BRF_ESS }, //  4
1890 
1891 	{ "7.ic119",		0x04000, 0xa0f8890d, 3 | BRF_GRA },           //  5 Text characters
1892 	{ "6.ic120",		0x04000, 0xc5bfca95, 3 | BRF_GRA },           //  6
1893 	{ "5.ic121",		0x04000, 0xb8c370bc, 3 | BRF_GRA },           //  7
1894 
1895 	{ "b.ic114",		0x08000, 0x733b9997, 4 | BRF_GRA },           //  8 Background tiles
1896 	{ "e.ic111",		0x08000, 0x8b70ef32, 4 | BRF_GRA },           //  9
1897 	{ "d.ic112",		0x08000, 0xf711ba7d, 4 | BRF_GRA },           // 10
1898 	{ "c.ic113",		0x08000, 0x62532cd3, 4 | BRF_GRA },           // 11
1899 
1900 	{ "8.ic118",		0x08000, 0xef0cf49c, 5 | BRF_GRA },           // 12 Foreground tiles
1901 	{ "a.ic115",		0x08000, 0xf5799422, 5 | BRF_GRA },           // 13
1902 	{ "10.ic116",		0x08000, 0x4bd099ff, 5 | BRF_GRA },           // 14
1903 	{ "9.ic117",		0x08000, 0x230f1582, 5 | BRF_GRA },           // 15
1904 
1905 	{ "1.ic54",			0x10000, 0x2234b424, 6 | BRF_GRA },           // 16 Sprites
1906 	{ "2.ic53",			0x10000, 0x30d4c9a8, 6 | BRF_GRA },           // 17
1907 	{ "3.ic52",			0x10000, 0x64f3d88f, 6 | BRF_GRA },           // 18
1908 	{ "4.ic51",			0x10000, 0x3b23a9fc, 6 | BRF_GRA },           // 19
1909 
1910 	{ "82s129.ic41",	0x00100, 0x24e7d62f, 0 | BRF_OPT },           // 20 Proms (not used)
1911 	{ "82s129.ic40",	0x00100, 0xa50cef09, 0 | BRF_OPT },           // 21
1912 	{ "82s123.ic42",	0x00020, 0xf72482db, 0 | BRF_OPT },           // 22
1913 	{ "82s123.ic50",	0x00020, 0xbc88cced, 0 | BRF_OPT },           // 23
1914 	{ "82s123.ic99",	0x00020, 0x4fb5df2a, 0 | BRF_OPT },           // 24
1915 };
1916 
1917 STD_ROM_PICK(fnshark)
STD_ROM_FN(fnshark)1918 STD_ROM_FN(fnshark)
1919 
1920 static INT32 bootInit()
1921 {
1922 	return DrvInit(3, 1);
1923 }
1924 
1925 struct BurnDriver BurnDrvFnshark = {
1926 	"fnshark", "fshark", NULL, NULL, "1987",
1927 	"Flyin' Shark (bootleg of Hishou Zame)\0", NULL, "bootleg", "Miscellaneous",
1928 	NULL, NULL, NULL, NULL,
1929 	BDF_GAME_WORKING | BDF_CLONE | BDF_BOOTLEG | BDF_ORIENTATION_VERTICAL, 2, HARDWARE_TOAPLAN_MISC, GBF_VERSHOOT, 0,
1930 	NULL, fnsharkRomInfo, fnsharkRomName, NULL, NULL, NULL, NULL, FsharkInputInfo, HishouzaDIPInfo,
1931 	bootInit, DrvExit, DrvFrame, DrvDraw, DrvScan, &DrvRecalc, 0x700,
1932 	240, 320, 3, 4
1933 };
1934 
1935 
1936 // Sky Shark (bootleg)
1937 
1938 static struct BurnRomInfo skysharkbRomDesc[] = {
1939 	{ "1r.ic18",		0x10000, 0xea4bcb43, 1 | BRF_PRG | BRF_ESS }, //  0 68k code
1940 	{ "1q.ic17",		0x10000, 0xd1f39ed2, 1 | BRF_PRG | BRF_ESS }, //  1
1941 
1942 	{ "1p.ic16",		0x08000, 0xf0b98af2, 2 | BRF_PRG | BRF_ESS }, //  2 Z80 code
1943 
1944 	// This set uses 4 (four) Fujitsu MB7132E PROMs for the MCU, named "1-A", "1-B", "1-C" and "1-D" on a small subboard along with the TMS320C10NL.
1945 	// These ROMs are currently undumped, so we're using the DSP code from the other sets.
1946 	{ "82s191_r.bin",	0x00800, 0x5b96ae3f, 7 | BRF_PRG | BRF_ESS }, //  3 TMS32010 code
1947 	{ "82s191_l.bin",	0x00800, 0xd5dfc8dd, 7 | BRF_PRG | BRF_ESS }, //  4
1948 
1949 	{ "1g.ic7",			0x04000, 0x9d3f698d, 3 | BRF_GRA },           //  5 Text characters
1950 	{ "1e.ic5",			0x04000, 0x543bbb81, 3 | BRF_GRA },           //  6
1951 	{ "1f.ic6",			0x04000, 0xd357f494, 3 | BRF_GRA },           //  7
1952 
1953 	{ "1l.ic12",		0x08000, 0x733b9997, 4 | BRF_GRA },           //  8 Background tiles
1954 	{ "1o.ic15",		0x08000, 0x8b70ef32, 4 | BRF_GRA },           //  9
1955 	{ "1n.ic14",		0x08000, 0xf711ba7d, 4 | BRF_GRA },           // 10
1956 	{ "1m.ic13",		0x08000, 0x62532cd3, 4 | BRF_GRA },           // 11
1957 
1958 	{ "1h.ic8",			0x08000, 0xef0cf49c, 5 | BRF_GRA },           // 12 Foreground tiles
1959 	{ "1k.ic11",		0x08000, 0xf5799422, 5 | BRF_GRA },           // 13
1960 	{ "1j.ic10",		0x08000, 0x4bd099ff, 5 | BRF_GRA },           // 14
1961 	{ "1i.ic9",			0x08000, 0x230f1582, 5 | BRF_GRA },           // 15
1962 
1963 	{ "1a.ic1",			0x10000, 0x2234b424, 6 | BRF_GRA },           // 16 Sprites
1964 	{ "1b.ic2",			0x10000, 0x30d4c9a8, 6 | BRF_GRA },           // 17
1965 	{ "1c.ic3",			0x10000, 0x64f3d88f, 6 | BRF_GRA },           // 18
1966 	{ "1d.ic4",			0x10000, 0x3b23a9fc, 6 | BRF_GRA },           // 19
1967 
1968 	{ "82s129.ic41",	0x00100, 0x24e7d62f, 0 | BRF_OPT },           // 20 Proms (not used)
1969 	{ "82s129.ic40",	0x00100, 0xa50cef09, 0 | BRF_OPT },           // 21
1970 	{ "82s123.ic42",	0x00020, 0xf72482db, 0 | BRF_OPT },           // 22
1971 	{ "82s123.ic50",	0x00020, 0xbc88cced, 0 | BRF_OPT },           // 23
1972 	{ "82s123.ic99",	0x00020, 0x4fb5df2a, 0 | BRF_OPT },           // 24
1973 };
1974 
1975 STD_ROM_PICK(skysharkb)
1976 STD_ROM_FN(skysharkb)
1977 
1978 struct BurnDriver BurnDrvSkysharkb = {
1979 	"skysharkb", "fshark", NULL, NULL, "1987",
1980 	"Sky Shark (bootleg)\0", NULL, "bootleg", "Miscellaneous",
1981 	NULL, NULL, NULL, NULL,
1982 	BDF_GAME_WORKING | BDF_CLONE | BDF_BOOTLEG | BDF_ORIENTATION_VERTICAL, 2, HARDWARE_TOAPLAN_MISC, GBF_VERSHOOT, 0,
1983 	NULL, skysharkbRomInfo, skysharkbRomName, NULL, NULL, NULL, NULL, FsharkInputInfo, HishouzaDIPInfo,
1984 	bootInit, DrvExit, DrvFrame, DrvDraw, DrvScan, &DrvRecalc, 0x700,
1985 	240, 320, 3, 4
1986 };
1987 
1988 
1989 // Gulf War II (set 1)
1990 
1991 static struct BurnRomInfo gulfwar2RomDesc[] = {
1992 	{ "08-u119.bin",	0x20000, 0x41ebf9c0, 1 | BRF_PRG | BRF_ESS }, //  0 68k code
1993 	{ "07-u92.bin",		0x20000, 0xb73e6b25, 1 | BRF_PRG | BRF_ESS }, //  1
1994 
1995 	{ "06-u51.bin",		0x08000, 0x75504f95, 2 | BRF_PRG | BRF_ESS }, //  2 Z80 code
1996 
1997 	{ "02-u1.rom",		0x02000, 0xabefe4ca, 3 | BRF_PRG | BRF_ESS }, //  3 TMS32010 code
1998 	{ "01-u2.rom",		0x02000, 0x01399b65, 3 | BRF_PRG | BRF_ESS }, //  4
1999 
2000 	{ "03-u9.bin",		0x04000, 0x1b7934b3, 4 | BRF_GRA },           //  5 Text characters
2001 	{ "04-u10.bin",		0x04000, 0x6f7bfb58, 4 | BRF_GRA },           //  6
2002 	{ "05-u11.bin",		0x04000, 0x31814724, 4 | BRF_GRA },           //  7
2003 
2004 	{ "16-u202.bin",	0x10000, 0xd815d175, 5 | BRF_GRA },           //  8 Background tiles
2005 	{ "13-u199.bin",	0x10000, 0xd949b0d9, 5 | BRF_GRA },           //  9
2006 	{ "14-u200.bin",	0x10000, 0xc109a6ac, 5 | BRF_GRA },           // 10
2007 	{ "15-u201.bin",	0x10000, 0xad21f2ab, 5 | BRF_GRA },           // 11
2008 
2009 	{ "09-u195.bin",	0x08000, 0xb7be3a6d, 6 | BRF_GRA },           // 12 Foreground tiles
2010 	{ "12-u198.bin",	0x08000, 0xfd7032a6, 6 | BRF_GRA },           // 13
2011 	{ "11-u197.bin",	0x08000, 0x7b721ed3, 6 | BRF_GRA },           // 14
2012 	{ "10-u196.rom",	0x08000, 0x160f38ab, 6 | BRF_GRA },           // 15
2013 
2014 	{ "20-u262.bin",	0x10000, 0x10665ca0, 7 | BRF_GRA },           // 16 Sprites
2015 	{ "19-u261.bin",	0x10000, 0xcfa6d417, 7 | BRF_GRA },           // 17
2016 	{ "18-u260.bin",	0x10000, 0x2e6a0c49, 7 | BRF_GRA },           // 18
2017 	{ "17-u259.bin",	0x10000, 0x66c1b0e6, 7 | BRF_GRA },           // 19
2018 
2019 	{ "82s129.d3",		0x00100, 0x24e7d62f, 0 | BRF_OPT },           // 20 Proms (not used)
2020 	{ "82s129.d4",		0x00100, 0xa50cef09, 0 | BRF_OPT },           // 21
2021 	{ "82s123.d2",		0x00020, 0xf72482db, 0 | BRF_OPT },           // 22
2022 	{ "82s123.e18",		0x00020, 0xbc88cced, 0 | BRF_OPT },           // 23
2023 	{ "82s123.b24",		0x00020, 0x4fb5df2a, 0 | BRF_OPT },           // 24
2024 };
2025 
2026 STD_ROM_PICK(gulfwar2)
STD_ROM_FN(gulfwar2)2027 STD_ROM_FN(gulfwar2)
2028 
2029 static INT32 gulfwar2Init()
2030 {
2031 	return DrvInit(2, 1);
2032 }
2033 
2034 struct BurnDriver BurnDrvGulfwar2 = {
2035 	"gulfwar2", NULL, NULL, NULL, "1991",
2036 	"Gulf War II (set 1)\0", NULL, "Comad", "Miscellaneous",
2037 	NULL, NULL, NULL, NULL,
2038 	BDF_GAME_WORKING | BDF_ORIENTATION_VERTICAL, 2, HARDWARE_TOAPLAN_MISC, GBF_VERSHOOT, 0,
2039 	NULL, gulfwar2RomInfo, gulfwar2RomName, NULL, NULL, NULL, NULL, TwincobrInputInfo, TwincobrDIPInfo,
2040 	gulfwar2Init, DrvExit, DrvFrame, DrvDraw, DrvScan, &DrvRecalc, 0x700,
2041 	240, 320, 3, 4
2042 };
2043 
2044 
2045 // Gulf War II (set 2)
2046 
2047 static struct BurnRomInfo gulfwar2aRomDesc[] = {
2048 	{ "gw2_28.u119",	0x20000, 0xb9118660, 1 | BRF_PRG | BRF_ESS }, //  0 68k code
2049 	{ "gw2_27.u92",		0x20000, 0x3494f1aa, 1 | BRF_PRG | BRF_ESS }, //  1
2050 
2051 	{ "06-u51.bin",		0x08000, 0x75504f95, 2 | BRF_PRG | BRF_ESS }, //  2 Z80 code
2052 
2053 	{ "gw2_22.udsp1",	0x01000, 0x3a97b0db, 3 | BRF_PRG | BRF_ESS }, //  3 TMS32010 code
2054 	{ "gw2_21.udsp2",	0x01000, 0x87a473af, 3 | BRF_PRG | BRF_ESS }, //  4
2055 
2056 	{ "gw2_23.u9",		0x08000, 0xa2aee4c8, 4 | BRF_GRA },           //  5 Text characters
2057 	{ "gw2_24.u10",		0x08000, 0xfb3f71cd, 4 | BRF_GRA },           //  6
2058 	{ "gw2_25.u11",		0x08000, 0x90eeb0a0, 4 | BRF_GRA },           //  7
2059 
2060 	{ "16-u202.bin",	0x10000, 0xd815d175, 5 | BRF_GRA },           //  8 Background tiles
2061 	{ "13-u199.bin",	0x10000, 0xd949b0d9, 5 | BRF_GRA },           //  9
2062 	{ "14-u200.bin",	0x10000, 0xc109a6ac, 5 | BRF_GRA },           // 10
2063 	{ "15-u201.bin",	0x10000, 0xad21f2ab, 5 | BRF_GRA },           // 11
2064 
2065 	{ "09-u195.bin",	0x08000, 0xb7be3a6d, 6 | BRF_GRA },           // 12 Foreground tiles
2066 	{ "12-u198.bin",	0x08000, 0xfd7032a6, 6 | BRF_GRA },           // 13
2067 	{ "11-u197.bin",	0x08000, 0x7b721ed3, 6 | BRF_GRA },           // 14
2068 	{ "10-u196.rom",	0x08000, 0x160f38ab, 6 | BRF_GRA },           // 15
2069 
2070 	{ "20-u262.bin",	0x10000, 0x10665ca0, 7 | BRF_GRA },           // 16 Sprites
2071 	{ "19-u261.bin",	0x10000, 0xcfa6d417, 7 | BRF_GRA },           // 17
2072 	{ "18-u260.bin",	0x10000, 0x2e6a0c49, 7 | BRF_GRA },           // 18
2073 	{ "17-u259.bin",	0x10000, 0x66c1b0e6, 7 | BRF_GRA },           // 19
2074 
2075 	{ "82s129.d3",		0x00100, 0x24e7d62f, 0 | BRF_OPT },           // 20 Proms (not used)
2076 	{ "82s129.d4",		0x00100, 0xa50cef09, 0 | BRF_OPT },           // 21
2077 	{ "82s123.d2",		0x00020, 0xf72482db, 0 | BRF_OPT },           // 22
2078 	{ "82s123.e18",		0x00020, 0xbc88cced, 0 | BRF_OPT },           // 23
2079 	{ "82s123.b24",		0x00020, 0x4fb5df2a, 0 | BRF_OPT },           // 24
2080 };
2081 
2082 STD_ROM_PICK(gulfwar2a)
2083 STD_ROM_FN(gulfwar2a)
2084 
2085 struct BurnDriver BurnDrvGulfwar2a = {
2086 	"gulfwar2a", "gulfwar2", NULL, NULL, "1991",
2087 	"Gulf War II (set 2)\0", NULL, "Comad", "Miscellaneous",
2088 	NULL, NULL, NULL, NULL,
2089 	BDF_GAME_WORKING | BDF_CLONE | BDF_ORIENTATION_VERTICAL, 2, HARDWARE_TOAPLAN_MISC, GBF_VERSHOOT, 0,
2090 	NULL, gulfwar2aRomInfo, gulfwar2aRomName, NULL, NULL, NULL, NULL, TwincobrInputInfo, TwincobrDIPInfo,
2091 	gulfwar2Init, DrvExit, DrvFrame, DrvDraw, NULL, &DrvRecalc, 0x700,
2092 	240, 320, 3, 4
2093 };
2094