1 // FB Alpha Bank Panic Driver Module
2 // Based on MAME driver by Nicola Salmoria
3 
4 #include "tiles_generic.h"
5 #include "z80_intf.h"
6 #include "sn76496.h"
7 
8 static UINT8 *AllMem;
9 static UINT8 *MemEnd;
10 static UINT8 *AllRam;
11 static UINT8 *RamEnd;
12 static UINT8 *DrvZ80ROM;
13 static UINT8 *DrvGfxROM0;
14 static UINT8 *DrvGfxROM1;
15 static UINT8 *DrvZ80RAM;
16 static UINT8 *DrvVidRAM0;
17 static UINT8 *DrvVidRAM1;
18 static UINT8 *DrvColRAM0;
19 static UINT8 *DrvColRAM1;
20 static UINT8 *DrvColPROM;
21 
22 static UINT32 *DrvPalette;
23 static UINT8 DrvRecalc;
24 
25 static UINT8 scrollx;
26 static UINT8 priority;
27 static UINT8 nmi_enable;
28 static UINT8 flipscreen;
29 
30 static UINT8 DrvJoy1[8];
31 static UINT8 DrvJoy2[8];
32 static UINT8 DrvJoy3[8];
33 static UINT8 DrvDips[1];
34 static UINT8 DrvInputs[3];
35 static UINT8 DrvReset;
36 
37 static struct BurnInputInfo bankpInputList[] = {
38 	{"P1 Coin"      , BIT_DIGITAL  , DrvJoy1 + 5,	"p1 coin"  },
39 	{"P1 Start"     , BIT_DIGITAL  , DrvJoy2 + 5,	"p1 start" },
40 	{"P1 Left"      , BIT_DIGITAL  , DrvJoy1 + 3, 	"p1 left"  },
41 	{"P1 Right"     , BIT_DIGITAL  , DrvJoy1 + 1, 	"p1 right" },
42 	{"P1 Button 1"  , BIT_DIGITAL  , DrvJoy1 + 4,	"p1 fire 1"},
43 	{"P1 Button 2"  , BIT_DIGITAL  , DrvJoy1 + 7,	"p1 fire 2"},
44 	{"P1 Button 3"  , BIT_DIGITAL  , DrvJoy3 + 0,	"p1 fire 3"},
45 
46 	{"P2 Coin"      , BIT_DIGITAL  , DrvJoy1 + 6,	"p2 coin"  },
47 	{"P2 Start"     , BIT_DIGITAL  , DrvJoy2 + 6,	"p2 start" },
48 	{"P2 Left"      , BIT_DIGITAL  , DrvJoy2 + 3, 	"p2 left"  },
49 	{"P2 Right"     , BIT_DIGITAL  , DrvJoy2 + 1, 	"p2 right" },
50 	{"P2 Button 1"  , BIT_DIGITAL  , DrvJoy2 + 4,	"p2 fire 1"},
51 	{"P2 Button 2"  , BIT_DIGITAL  , DrvJoy2 + 7,	"p2 fire 2"},
52 	{"P2 Button 3"  , BIT_DIGITAL  , DrvJoy3 + 1,	"p2 fire 3"},
53 
54 	{"P3 Coin"      , BIT_DIGITAL  , DrvJoy3 + 2,	"p3 coin"  },
55 
56 	{"Reset"        , BIT_DIGITAL  , &DrvReset  ,	"reset"    },
57 	{"Dip 1"        , BIT_DIPSWITCH, DrvDips + 0,   "dip"      },
58 };
59 
60 STDINPUTINFO(bankp)
61 
62 static struct BurnInputInfo combhInputList[] = {
63 	{"P1 Coin"      , BIT_DIGITAL  , DrvJoy1 + 5,	"p1 coin"  },
64 	{"P1 Start"     , BIT_DIGITAL  , DrvJoy2 + 5,	"p1 start" },
65 	{"P1 Up"        , BIT_DIGITAL  , DrvJoy1 + 0, 	"p1 up"    },
66 	{"P1 Down"      , BIT_DIGITAL  , DrvJoy1 + 2, 	"p1 down"  },
67 	{"P1 Button 1"  , BIT_DIGITAL  , DrvJoy1 + 4,	"p1 fire 1"},
68 	{"P1 Button 2"  , BIT_DIGITAL  , DrvJoy1 + 7,	"p1 fire 2"},
69 	{"P1 Button 3"  , BIT_DIGITAL  , DrvJoy3 + 0,	"p1 fire 3"},
70 
71 	{"P2 Coin"      , BIT_DIGITAL  , DrvJoy1 + 6,	"p2 coin"  },
72 	{"P2 Start"     , BIT_DIGITAL  , DrvJoy2 + 6,	"p2 start" },
73 	{"P2 Up"        , BIT_DIGITAL  , DrvJoy2 + 0, 	"p2 up"    },
74 	{"P2 Down"      , BIT_DIGITAL  , DrvJoy2 + 2, 	"p2 down"  },
75 	{"P2 Button 1"  , BIT_DIGITAL  , DrvJoy2 + 4,	"p2 fire 1"},
76 	{"P2 Button 2"  , BIT_DIGITAL  , DrvJoy2 + 7,	"p2 fire 2"},
77 	{"P2 Button 3"  , BIT_DIGITAL  , DrvJoy3 + 1,	"p2 fire 3"},
78 
79 	{"P3 Coin"      , BIT_DIGITAL  , DrvJoy3 + 2,	"p3 coin"  },
80 
81 	{"Reset"        , BIT_DIGITAL  , &DrvReset  ,	"reset"    },
82 	{"Dip 1"        , BIT_DIPSWITCH, DrvDips + 0,   "dip"      },
83 
84 };
85 
86 STDINPUTINFO(combh)
87 
88 static struct BurnDIPInfo bankpDIPList[]=
89 {
90 	{0x10, 0xff, 0xff, 0xc0, NULL					},
91 
92 	{0   , 0xfe, 0   , 4   , "Coin A/B"				},
93 	{0x10, 0x01, 0x03, 0x03, "3C 1C"				},
94 	{0x10, 0x01, 0x03, 0x02, "2C 1C"				},
95 	{0x10, 0x01, 0x03, 0x00, "1C 1C"				},
96 	{0x10, 0x01, 0x03, 0x01, "1C 2C"				},
97 
98 	{0   , 0xfe, 0   , 2   , "Coin C"				},
99 	{0x10, 0x01, 0x04, 0x04, "2C 1C"				},
100 	{0x10, 0x01, 0x04, 0x00, "1C 1C"				},
101 
102 	{0   , 0xfe, 0   , 2   , "Lives"				},
103 	{0x10, 0x01, 0x08, 0x00, "3"					},
104 	{0x10, 0x01, 0x08, 0x08, "4"					},
105 
106 	{0   , 0xfe, 0   , 2   , "Bonus Life"	 		},
107 	{0x10, 0x01, 0x10, 0x00, "70K 200K 500K..."		},
108 	{0x10, 0x01, 0x10, 0x10, "100K 400K 800K..."	},
109 
110 	{0   , 0xfe, 0   , 2   , "Difficulty"			},
111 	{0x10, 0x01, 0x20, 0x00, "Easy"					},
112 	{0x10, 0x01, 0x20, 0x20, "Hard"					},
113 
114 	{0   , 0xfe, 0   , 2   , "Demo Sounds"			},
115 	{0x10, 0x01, 0x40, 0x00, "Off"					},
116 	{0x10, 0x01, 0x40, 0x40, "On"					},
117 
118 	{0   , 0xfe, 0   , 2   , "Cabinet"				},
119 	{0x10, 0x01, 0x80, 0x80, "Upright"				},
120 	{0x10, 0x01, 0x80, 0x00, "Cocktail"				},
121 };
122 
123 STDDIPINFO(bankp)
124 
125 static struct BurnDIPInfo combhDIPList[]=
126 {
127 	{0x10, 0xff, 0xff, 0x10, NULL					},
128 
129 	{0   , 0xfe, 0   , 2   , "Flip Screen"			},
130 	{0x10, 0x01, 0x01, 0x00, "Off"					},
131 	{0x10, 0x01, 0x01, 0x01, "On"					},
132 
133 	{0   , 0xfe, 0   , 4   , "Coinage"				},
134 	{0x10, 0x01, 0x06, 0x06, "2C 1C"				},
135 	{0x10, 0x01, 0x06, 0x00, "1C 1C"				},
136 	{0x10, 0x01, 0x06, 0x02, "1C 2C"				},
137 	{0x10, 0x01, 0x06, 0x04, "1C 3C"				},
138 
139 	{0   , 0xfe, 0   , 2   , "Lives"				},
140 	{0x10, 0x01, 0x08, 0x00, "3"					},
141 	{0x10, 0x01, 0x08, 0x08, "4"					},
142 
143 	{0   , 0xfe, 0   , 2   , "Cabinet"				},
144 	{0x10, 0x01, 0x10, 0x10, "Upright" 				},
145 	{0x10, 0x01, 0x10, 0x00, "Cocktail"				},
146 
147 	{0   , 0xfe, 0   , 2   , "Difficulty"			},
148 	{0x10, 0x01, 0x40, 0x00, "Easy"					},
149 	{0x10, 0x01, 0x40, 0x40, "Hard"					},
150 
151 	{0   , 0xfe, 0   , 2   , "Fuel"					},
152 	{0x10, 0x01, 0x80, 0x00, "120 Units" 			},
153 	{0x10, 0x01, 0x80, 0x80, "90 Units"				},
154 };
155 
STDDIPINFO(combh)156 STDDIPINFO(combh)
157 
158 static void __fastcall bankp_write_port(UINT16 port, UINT8 data)
159 {
160 	switch (port & 0xff)
161 	{
162 		case 0x00:
163 		case 0x01:
164 		case 0x02:
165 			SN76496Write(port & 3, data);
166 		return;
167 
168 		case 0x05:
169 			scrollx = data;
170 		return;
171 
172 		case 0x07:
173 			priority   = data & 0x03;
174 			nmi_enable = data & 0x10;
175 			flipscreen = data & 0x20;
176 		return;
177 	}
178 }
179 
bankp_read_port(UINT16 port)180 static UINT8 __fastcall bankp_read_port(UINT16 port)
181 {
182 	switch (port & 0xff)
183 	{
184 		case 0x00:
185 		case 0x01:
186 		case 0x02:
187 			return DrvInputs[port & 3];
188 
189 		case 0x04:
190 			return DrvDips[0];
191 	}
192 
193 	return 0;
194 }
195 
tilemap_callback(bg)196 static tilemap_callback( bg )
197 {
198 	INT32 attr = DrvColRAM1[offs];
199 	INT32 code = DrvVidRAM1[offs] + ((attr & 7) * 256);
200 	INT32 color = attr >> 4;
201 
202 	TILE_SET_INFO(0, code, color, (attr & 0x08) ? TILE_FLIPX : 0);
203 	sTile->category = color;
204 }
205 
tilemap_callback(fg)206 static tilemap_callback( fg )
207 {
208 	INT32 attr = DrvColRAM0[offs];
209 	INT32 code = DrvVidRAM0[offs] + ((attr & 3) * 256);
210 	INT32 color = attr >> 3;
211 
212 	TILE_SET_INFO(1, code, color, (attr & 0x04) ? TILE_FLIPX : 0);
213 	sTile->category = color;
214 }
215 
DrvDoReset()216 static INT32 DrvDoReset()
217 {
218 	memset (AllRam, 0, RamEnd - AllRam);
219 
220 	ZetOpen(0);
221 	ZetReset();
222 	ZetClose();
223 
224 	SN76496Reset();
225 
226 	nmi_enable = 0;
227 	scrollx = 0;
228 	flipscreen = 0;
229 	priority = 0;
230 
231 	return 0;
232 }
233 
MemIndex()234 static INT32 MemIndex()
235 {
236 	UINT8 *Next; Next = AllMem;
237 
238 	DrvZ80ROM		= Next; Next += 0x00e000;
239 
240 	DrvGfxROM0		= Next; Next += 0x010000;
241 	DrvGfxROM1		= Next; Next += 0x020000;
242 
243 	DrvColPROM		= Next; Next += 0x000220;
244 
245 	DrvPalette		= (UINT32*)Next; Next += 0x100 * sizeof(UINT32);
246 
247 	AllRam			= Next;
248 
249 	DrvZ80RAM		= Next; Next += 0x001000;
250 	DrvVidRAM0		= Next; Next += 0x000400;
251 	DrvColRAM0		= Next; Next += 0x000400;
252 	DrvVidRAM1		= Next; Next += 0x000400;
253 	DrvColRAM1		= Next; Next += 0x000400;
254 
255 	RamEnd			= Next;
256 
257 	MemEnd			= Next;
258 
259 	return 0;
260 }
261 
DrvGfxDecode()262 static INT32 DrvGfxDecode() // 0, 0x80
263 {
264 	INT32 Plane0[2] = { 0, 4 };
265 	INT32 Plane1[3] = { 0, 0x20000, 0x40000 };
266 	INT32 XOffs0[8] = { STEP4(64+3,-1), STEP4(0+3,-1) };
267 	INT32 XOffs1[8] = { STEP8(7,-1) };
268 	INT32 YOffs0[8] = { STEP8(0,8) };
269 
270 	UINT8 *tmp = (UINT8*)BurnMalloc(0x10000);
271 	if (tmp == NULL) {
272 		return 1;
273 	}
274 
275 	memcpy (tmp, DrvGfxROM0, 0x10000);
276 
277 	GfxDecode(0x400, 2, 8, 8, Plane0, XOffs0, YOffs0, 0x080, tmp, DrvGfxROM0);
278 
279 	memcpy (tmp, DrvGfxROM1, 0x10000);
280 
281 	GfxDecode(0x800, 3, 8, 8, Plane1, XOffs1, YOffs0, 0x040, tmp, DrvGfxROM1);
282 
283 	BurnFree (tmp);
284 
285 	return 0;
286 }
287 
DrvInit()288 static INT32 DrvInit()
289 {
290 	AllMem = NULL;
291 	MemIndex();
292 	INT32 nLen = MemEnd - (UINT8 *)0;
293 	if ((AllMem = (UINT8 *)BurnMalloc(nLen)) == NULL) return 1;
294 	memset(AllMem, 0, nLen);
295 	MemIndex();
296 
297 	{
298 		INT32 k = 0;
299 		if (BurnLoadRom(DrvZ80ROM  + 0x0000, k++, 1)) return 1;
300 		if (BurnLoadRom(DrvZ80ROM  + 0x4000, k++, 1)) return 1;
301 		if (BurnLoadRom(DrvZ80ROM  + 0x8000, k++, 1)) return 1;
302 		if (BurnLoadRom(DrvZ80ROM  + 0xc000, k++, 1)) return 1;
303 
304 		if (BurnLoadRom(DrvGfxROM0 + 0x0000, k++, 1)) return 1;
305 		if (BurnLoadRom(DrvGfxROM0 + 0x2000, k++, 1)) return 1;
306 
307 		if (BurnLoadRom(DrvGfxROM1 + 0x0000, k++, 1)) return 1;
308 		if (BurnLoadRom(DrvGfxROM1 + 0x2000, k++, 1)) return 1;
309 		if (BurnLoadRom(DrvGfxROM1 + 0x4000, k++, 1)) return 1;
310 		if (BurnLoadRom(DrvGfxROM1 + 0x6000, k++, 1)) return 1;
311 		if (BurnLoadRom(DrvGfxROM1 + 0x8000, k++, 1)) return 1;
312 		if (BurnLoadRom(DrvGfxROM1 + 0xa000, k++, 1)) return 1;
313 
314 		if (BurnLoadRom(DrvColPROM + 0x0000, k++, 1)) return 1;
315 		if (BurnLoadRom(DrvColPROM + 0x0020, k++, 1)) return 1;
316 		if (BurnLoadRom(DrvColPROM + 0x0120, k++, 1)) return 1;
317 
318 	    DrvGfxDecode();
319 	}
320 	ZetInit(0);
321 	ZetOpen(0);
322 	ZetMapMemory(DrvZ80ROM,		0x0000, 0xdfff, MAP_ROM);
323 	ZetMapMemory(DrvZ80RAM,		0xe000, 0xefff, MAP_RAM);
324 	ZetMapMemory(DrvVidRAM0,	0xf000, 0xf3ff, MAP_RAM);
325 	ZetMapMemory(DrvColRAM0,	0xf400, 0xf7ff, MAP_RAM);
326 	ZetMapMemory(DrvVidRAM1,	0xf800, 0xfbff, MAP_RAM);
327 	ZetMapMemory(DrvColRAM1,	0xfc00, 0xffff, MAP_RAM);
328 	ZetSetOutHandler(bankp_write_port);
329 	ZetSetInHandler(bankp_read_port);
330 	ZetClose();
331 
332 	SN76489Init(0, 15468000 / 6, 0);
333 	SN76489Init(1, 15468000 / 6, 1);
334 	SN76489Init(2, 15468000 / 6, 1);
335 	SN76496SetRoute(0, 1.00, BURN_SND_ROUTE_BOTH);
336 	SN76496SetRoute(1, 1.00, BURN_SND_ROUTE_BOTH);
337 	SN76496SetRoute(2, 1.00, BURN_SND_ROUTE_BOTH);
338 
339 	GenericTilesInit();
340 	GenericTilemapInit(0, TILEMAP_SCAN_ROWS, bg_map_callback, 8, 8, 32, 32);
341 	GenericTilemapInit(1, TILEMAP_SCAN_ROWS, fg_map_callback, 8, 8, 32, 32);
342 	GenericTilemapSetGfx(0, DrvGfxROM1, 3, 8, 8, 0x20000, 0x80, 0x0f);
343 	GenericTilemapSetGfx(1, DrvGfxROM0, 2, 8, 8, 0x10000, 0x00, 0x1f);
344 	GenericTilemapCategoryConfig(0, 0x10);
345 	GenericTilemapCategoryConfig(1, 0x20);
346 	for (INT32 i = 0; i < 0x80; i++) {
347 		GenericTilemapSetCategoryEntry(0, i/0x08, i & 7, (DrvColPROM[0x120 + i] == 0) ? 1 : 0);
348 		GenericTilemapSetCategoryEntry(1, i/0x04, i & 3, (DrvColPROM[0x020 + i] == 0) ? 1 : 0);
349 	}
350 	GenericTilemapSetOffsets(TMAP_GLOBAL, -24, -16);
351 
352 	DrvDoReset();
353 
354 	return 0;
355 }
356 
DrvExit()357 static INT32 DrvExit()
358 {
359 	GenericTilesExit();
360 
361 	ZetExit();
362 	SN76496Exit();
363 
364 	BurnFree(AllMem);
365 
366 	return 0;
367 }
368 
DrvPaletteInit()369 static void DrvPaletteInit()
370 {
371 	UINT32 pal[16];
372 
373 	for (INT32 i = 0; i < 16; i++)
374 	{
375 		INT32 bit0 = (DrvColPROM[i] >> 0) & 0x01;
376 		INT32 bit1 = (DrvColPROM[i] >> 1) & 0x01;
377 		INT32 bit2 = (DrvColPROM[i] >> 2) & 0x01;
378 		INT32 r = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
379 
380 		bit0 = (DrvColPROM[i] >> 3) & 0x01;
381 		bit1 = (DrvColPROM[i] >> 4) & 0x01;
382 		bit2 = (DrvColPROM[i] >> 5) & 0x01;
383 		INT32 g = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
384 
385 		bit0 = 0;
386 		bit1 = (DrvColPROM[i] >> 6) & 0x01;
387 		bit2 = (DrvColPROM[i] >> 7) & 0x01;
388 		INT32 b = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
389 
390 		pal[i] = BurnHighCol(r,g,b,0);
391 	}
392 
393 	for (INT32 i = 0; i < 0x80; i++) {
394 		DrvPalette[i + 0x00] = pal[DrvColPROM[0x020 + i] & 0xf];
395 	}
396 
397 	for (INT32 i = 0; i < 0x80; i++) {
398 		DrvPalette[i + 0x80] = pal[DrvColPROM[0x120 + i] & 0xf];
399 	}
400 }
401 
DrvDraw()402 static INT32 DrvDraw()
403 {
404 	if (DrvRecalc) {
405 		DrvPaletteInit();
406 		DrvRecalc = 0;
407 	}
408 
409 	GenericTilemapSetScrollX(1, scrollx);
410 
411 	BurnTransferClear();
412 	if (priority & 2)
413 	{
414 		if (nBurnLayer & 2) GenericTilemapDraw(1, pTransDraw, TMAP_FORCEOPAQUE);
415 		if (nBurnLayer & 1) GenericTilemapDraw(0, pTransDraw, 0);
416 	}
417 	else
418 	{
419 		if (nBurnLayer & 1) GenericTilemapDraw(0, pTransDraw, TMAP_FORCEOPAQUE);
420 		if (nBurnLayer & 2) GenericTilemapDraw(1, pTransDraw, 0);
421 	}
422 	BurnTransferCopy(DrvPalette);
423 
424 	return 0;
425 }
426 
DrvFrame()427 static INT32 DrvFrame()
428 {
429 	if (DrvReset) {
430 		DrvDoReset();
431 	}
432 
433 	{
434 		memset (DrvInputs, 0, 3);
435 
436 		for (INT32 i = 0; i < 8; i++) {
437 			DrvInputs[0] ^= (DrvJoy1[i] & 1) << i;
438 			DrvInputs[1] ^= (DrvJoy2[i] & 1) << i;
439 			DrvInputs[2] ^= (DrvJoy3[i] & 1) << i;
440 		}
441 	}
442 
443 	INT32 nCyclesTotal = 2578000 / 60;
444 
445 	ZetOpen(0);
446 	ZetRun(nCyclesTotal);
447 	if (nmi_enable) ZetNmi();
448 	ZetClose();
449 
450 	if (pBurnSoundOut) {
451 		SN76496Update(0, pBurnSoundOut, nBurnSoundLen);
452 		SN76496Update(1, pBurnSoundOut, nBurnSoundLen);
453 		SN76496Update(2, pBurnSoundOut, nBurnSoundLen);
454 	}
455 
456 	if (pBurnDraw) {
457 		BurnDrvRedraw();
458 	}
459 
460 	return 0;
461 }
462 
DrvScan(INT32 nAction,INT32 * pnMin)463 static INT32 DrvScan(INT32 nAction, INT32 *pnMin)
464 {
465 	struct BurnArea ba;
466 
467 	if (pnMin) {
468 		*pnMin = 0x029521;
469 	}
470 
471 	if (nAction & ACB_VOLATILE) {
472 		memset(&ba, 0, sizeof(ba));
473 		ba.Data	  = AllRam;
474 		ba.nLen	  = RamEnd - AllRam;
475 		ba.szName = "All Ram";
476 		BurnAcb(&ba);
477 
478 		ZetScan(nAction);
479 		SN76496Scan(nAction, pnMin);
480 
481 		SCAN_VAR(scrollx);
482 		SCAN_VAR(priority);
483 		SCAN_VAR(flipscreen);
484 		SCAN_VAR(nmi_enable);
485 	}
486 
487 	return 0;
488 }
489 
490 
491 // Bank Panic
492 
493 static struct BurnRomInfo bankpRomDesc[] = {
494 	{ "epr-6175.7e",       0x4000, 0x044552b8, 1 | BRF_ESS | BRF_PRG }, //  0 Z80 Code
495 	{ "epr-6174.7f",       0x4000, 0xd29b1598, 1 | BRF_ESS | BRF_PRG }, //  1
496 	{ "epr-6173.7h",       0x4000, 0xb8405d38, 1 | BRF_ESS | BRF_PRG }, //  2
497 	{ "epr-6176.7d",       0x2000, 0xc98ac200, 1 | BRF_ESS | BRF_PRG }, //  3
498 
499 	{ "epr-6165.5l",       0x2000, 0xaef34a93, 2 | BRF_GRA },	        //  4 Foreground Characters
500 	{ "epr-6166.5k",       0x2000, 0xca13cb11, 2 | BRF_GRA },	        //  5
501 
502 	{ "epr-6172.5b",       0x2000, 0xc4c4878b, 3 | BRF_GRA },	        //  6 Background Characters
503 	{ "epr-6171.5d",       0x2000, 0xa18165a1, 3 | BRF_GRA },	        //  7
504 	{ "epr-6170.5e",       0x2000, 0xb58aa8fa, 3 | BRF_GRA },	        //  8
505 	{ "epr-6169.5f",       0x2000, 0x1aa37fce, 3 | BRF_GRA },	        //  9
506 	{ "epr-6168.5h",       0x2000, 0x05f3a867, 3 | BRF_GRA },	        // 10
507 	{ "epr-6167.5i",       0x2000, 0x3fa337e1, 3 | BRF_GRA },	        // 11
508 
509 	{ "pr-6177.8a",        0x0020, 0xeb70c5ae, 4 | BRF_GRA },	        // 12 Color PROM
510 	{ "pr-6178.6f",        0x0100, 0x0acca001, 4 | BRF_GRA },	        // 13 Foreground Color LUT
511 	{ "pr-6179.5a",        0x0100, 0xe53bafdb, 4 | BRF_GRA },	        // 14 Background Color LUT
512 
513 	{ "315-5074.2c.bin",   0x025b, 0x2e57bbba, 0 | BRF_OPT },	        // 15 PALs
514 	{ "315-5073.pal16l4",  0x0001, 0x00000000, 0 | BRF_OPT | BRF_NODUMP }, // 16
515 };
516 
517 STD_ROM_PICK(bankp)
518 STD_ROM_FN(bankp)
519 
520 struct BurnDriver BurnDrvbankp = {
521 	"bankp", NULL, NULL, NULL, "1984",
522 	"Bank Panic\0", NULL, "[Sanritsu] Sega", "Miscellaneous",
523 	NULL, NULL, NULL, NULL,
524 	BDF_GAME_WORKING, 3, HARDWARE_SEGA_MISC, GBF_SHOOT, 0,
525 	NULL, bankpRomInfo, bankpRomName, NULL, NULL, NULL, NULL, bankpInputInfo, bankpDIPInfo,
526 	DrvInit, DrvExit, DrvFrame, DrvDraw, DrvScan, &DrvRecalc, 0x100,
527 	224, 224, 4, 3
528 };
529 
530 
531 // Combat Hawk
532 
533 static struct BurnRomInfo combhRomDesc[] = {
534 	{ "epr-10904.7e",      0x4000, 0x4b106335, 1 | BRF_ESS | BRF_PRG }, //  0 Z80 Code
535 	{ "epr-10905.7f",      0x4000, 0xa76fc390, 1 | BRF_ESS | BRF_PRG }, //  1
536 	{ "epr-10906.7h",      0x4000, 0x16d54885, 1 | BRF_ESS | BRF_PRG }, //  2
537 	{ "epr-10903.7d",      0x2000, 0xb7a59cab, 1 | BRF_ESS | BRF_PRG }, //  3
538 
539 	{ "epr-10914.5l",      0x2000, 0x7d7a2340, 2 | BRF_GRA },	        //  4 Foreground Characters
540 	{ "epr-10913.5k",      0x2000, 0xd5c1a8ae, 2 | BRF_GRA },	        //  5
541 
542 	{ "epr-10907.5b",      0x2000, 0x08e5eea3, 3 | BRF_GRA },	        //  6 Background Characters
543 	{ "epr-10908.5d",      0x2000, 0xd9e413f5, 3 | BRF_GRA },	        //  7
544 	{ "epr-10909.5e",      0x2000, 0xfec7962c, 3 | BRF_GRA },	        //  8
545 	{ "epr-10910.5f",      0x2000, 0x33db0fa7, 3 | BRF_GRA },	        //  9
546 	{ "epr-10911.5h",      0x2000, 0x565d9e6d, 3 | BRF_GRA },	        // 10
547 	{ "epr-10912.5i",      0x2000, 0xcbe22738, 3 | BRF_GRA },	        // 11
548 
549 	{ "pr-10900.8a",       0x0020, 0xf95fcd66, 4 | BRF_GRA },	        // 12 Color PROM
550 	{ "pr-10901.6f",       0x0100, 0x6fd981c8, 4 | BRF_GRA },	        // 13 Foreground Color LUT
551 	{ "pr-10902.5a",       0x0100, 0x84d6bded, 4 | BRF_GRA },	        // 14 Background Color LUT
552 
553 	{ "315-5074.2c.bin",   0x025b, 0x2e57bbba, 0 | BRF_OPT },	        // 15 PALs
554 	{ "315-5073.pal16l4",  0x0001, 0x00000000, 0 | BRF_OPT | BRF_NODUMP }, // 16
555 };
556 
557 STD_ROM_PICK(combh)
558 STD_ROM_FN(combh)
559 
560 struct BurnDriver BurnDrvcombh = {
561 	"combh", NULL, NULL, NULL, "1987",
562 	"Combat Hawk\0", NULL, "Sega / Sanritsu", "Miscellaneous",
563 	NULL, NULL, NULL, NULL,
564 	BDF_GAME_WORKING | BDF_ORIENTATION_VERTICAL, 3, HARDWARE_SEGA_MISC, GBF_SHOOT, 0,
565 	NULL, combhRomInfo, combhRomName, NULL, NULL, NULL, NULL, combhInputInfo, combhDIPInfo,
566 	DrvInit, DrvExit, DrvFrame, DrvDraw, DrvScan, &DrvRecalc, 0x100,
567 	224, 224, 3, 4
568 };
569