1 #include "../vidhrdw/seta.c"
2 #include "../sndhrdw/seta.c"
3 
4 /***************************************************************************
5 
6 								-= Seta Games =-
7 
8 					driver by	Luca Elia (eliavit@unina.it)
9 
10 
11 CPU:	68000 + 65C02 [Optional]
12 Sound:	X1-010  [Custom 16 Bit PCM]
13 Other:  NEC D4701 [?]
14 
15 ---------------------------------------------------------------------------
16 Game							Year	Licensed To 		Issues / Notes
17 ---------------------------------------------------------------------------
18 Thundercade / Twin Formation	1987	Taito
19 Twin Eagle (Japan)				1988	Taito				Some Wrong Tiles
20 Caliber 50						1988	Taito / RomStar
21 DownTown						1989	Taito / RomStar
22 Dragon Unit (Japan) 			1989	Athena / Taito / RomStar
23 U.S. Classic					1989	Taito / RomStar		Wrong Colors
24 Arbalester						1989	Taito / RomStar
25 Meta Fox						1989	Taito / RomStar
26 Blandia             (1)			1992	Allumer
27 Zing Zing Zip					1992	Allumer + Tecmo
28 Mobile Suit Gundam				1993	Banpresto			Not Working
29 War Of Aero						1993	Yang Cheng
30 ---------------------------------------------------------------------------
31 (1) Prototype?
32 
33 
34 To do: better sound, nvram.
35 
36 
37 ***************************************************************************/
38 #include "driver.h"
39 #include "vidhrdw/generic.h"
40 
41 /* Variables and functions only used here */
42 
43 static unsigned char *sharedram;
44 
45 
46 /* Variables that vidhrdw has access to */
47 
48 int blandia_samples_bank;
49 
50 
51 /* Variables and functions defined in vidhrdw */
52 
53 extern unsigned char *seta_vram_0, *seta_vram_1, *seta_vctrl_0;
54 extern unsigned char *seta_vram_2, *seta_vram_3, *seta_vctrl_2;
55 extern unsigned char *seta_vregs;
56 
57 extern int seta_tiles_offset;
58 
59 WRITE_HANDLER( seta_vram_0_w );
60 WRITE_HANDLER( seta_vram_1_w );
61 WRITE_HANDLER( seta_vram_2_w );
62 WRITE_HANDLER( seta_vram_3_w );
63 WRITE_HANDLER( seta_vregs_w );
64 
65 void blandia_vh_init_palette(unsigned char *palette, unsigned short *colortable,const unsigned char *color_prom);
66 void zingzip_vh_init_palette(unsigned char *palette, unsigned short *colortable,const unsigned char *color_prom);
67 void usclssic_vh_init_palette(unsigned char *palette, unsigned short *colortable,const unsigned char *color_prom);
68 
69 int  seta_vh_start_1_layer(void);
70 int  seta_vh_start_1_layer_offset_0x02(void);
71 int  seta_vh_start_2_layers(void);
72 
73 void seta_vh_screenrefresh(struct osd_bitmap *bitmap,int full_refresh);
74 void seta_vh_screenrefresh_no_layers(struct osd_bitmap *bitmap,int full_refresh);
75 
76 
77 
78 /* Variables and functions defined in sndhrdw */
79 
80 extern unsigned char *seta_sound_ram;
81 
82 READ_HANDLER ( seta_sound_r );
83 READ_HANDLER ( seta_sound_word_r );
84 WRITE_HANDLER( seta_sound_w );
85 WRITE_HANDLER( seta_sound_word_w );
86 int  seta_sh_start_4KHz(const struct MachineSound *msound);
87 int  seta_sh_start_6KHz(const struct MachineSound *msound);
88 int  seta_sh_start_8KHz(const struct MachineSound *msound);
89 
90 
91 static struct CustomSound_interface seta_4KHz_interface =
92 {
93 	seta_sh_start_4KHz,
94 	0,
95 	0,
96 };
97 static struct CustomSound_interface seta_6KHz_interface =
98 {
99 	seta_sh_start_6KHz,
100 	0,
101 	0,
102 };
103 static struct CustomSound_interface seta_8KHz_interface =
104 {
105 	seta_sh_start_8KHz,
106 	0,
107 	0,
108 };
109 
110 
111 
112 /***************************************************************************
113 
114 
115 								Main CPU
116 
117 (for debugging it is useful to be able to peek at some memory regions that
118  the game writes to but never reads from. I marked this regions with an empty
119  comment to distinguish them, since there's always the possibility that some
120  games actually read from this kind of regions, expecting some hardware
121  register's value there, instead of the data they wrote)
122 
123 ***************************************************************************/
124 
125 
126 /*
127 
128  Shared RAM:
129 
130  The 65c02 sees a linear array of bytes that is mapped, for the 68000,
131  to a linear array of words whose low order bytes hold the data
132 
133 */
134 
READ_HANDLER(sharedram_68000_r)135 static READ_HANDLER( sharedram_68000_r )
136 {
137 	return sharedram[offset/2];
138 }
139 
WRITE_HANDLER(sharedram_68000_w)140 static WRITE_HANDLER( sharedram_68000_w )
141 {
142 	sharedram[offset/2] = data & 0xff;
143 }
144 
145 
WRITE_HANDLER(sub_ctrl_w)146 static WRITE_HANDLER( sub_ctrl_w )
147 {
148 	static int old_data = 0;
149 
150 	switch(offset)
151 	{
152 		case 0:	// bit 0: reset sub cpu?
153 			if ( !(old_data&1) && (data&1) ) cpu_set_reset_line(1,PULSE_LINE);
154 			old_data = data;
155 			break;
156 
157 		case 2:	// ?
158 			break;
159 
160 		case 4:	// not sure
161 			soundlatch_w(0,data&0xff);
162 			break;
163 
164 		case 6:	// not sure
165 			soundlatch2_w(0,data&0xff);
166 			break;
167 	}
168 
169 }
170 
READ_HANDLER(seta_dsw_r)171 static READ_HANDLER( seta_dsw_r )
172 {
173 	int dsw = readinputport(3);
174 	if (offset == 0)	return (dsw >> 8) & 0xff;
175 	else				return (dsw >> 0) & 0xff;
176 }
177 
178 
179 /***************************************************************************
180 								Caliber 50
181 ***************************************************************************/
182 
READ_HANDLER(calibr50_ip_r)183 READ_HANDLER ( calibr50_ip_r )
184 {
185 	int dir1 = readinputport(4) & 0xfff;	// analog port
186 	int dir2 = readinputport(5) & 0xfff;	// analog port
187 
188 	switch (offset)
189 	{
190 		case 0x00:	return readinputport(0);	// p1
191 		case 0x02:	return readinputport(1);	// p2
192 		case 0x08:	return readinputport(2);	// Coins
193 		case 0x10:	return (dir1&0xff);			// lower 8 bits of p1 rotation
194 		case 0x12:	return (dir1>>8);			// upper 4 bits of p1 rotation
195 		case 0x14:	return (dir2&0xff);			// lower 8 bits of p2 rotation
196 		case 0x16:	return (dir2>>8);			// upper 4 bits of p2 rotation
197 		case 0x18:	return 0xffff;				// ? (value's read but not used)
198 		default:
199 			//logerror("PC %06X - Read input %02X !\n", cpu_get_pc(), offset);
200 			return 0;
201 	}
202 }
203 
WRITE_HANDLER(calibr50_soundlatch_w)204 WRITE_HANDLER( calibr50_soundlatch_w )
205 {
206 	soundlatch_w(0,data);
207 	cpu_set_nmi_line(1,PULSE_LINE);
208 	cpu_spinuntil_time(TIME_IN_USEC(50));	// Allow the sound cpu to acknowledge
209 }
210 
211 static struct MemoryReadAddress calibr50_readmem[] =
212 {
213 	{ 0x000000, 0x09ffff, MRA_ROM					},	// ROM
214 	{ 0xff0000, 0xffffff, MRA_BANK1					},	// RAM
215 	{ 0x100000, 0x100007, MRA_NOP					},	// ? (same as a00010-a00017?)
216 	{ 0x200000, 0x200fff, MRA_BANK2					},	// NVRAM
217 	{ 0x300000, 0x300001, MRA_NOP					},	// ? (value's read but not used)
218 	{ 0x400000, 0x400001, watchdog_reset_r			},	// Watchdog
219 	{ 0x600000, 0x600003, seta_dsw_r				},	// DSW
220 	{ 0x700000, 0x7003ff, MRA_BANK3					},	// Palette
221 /**/{ 0x800000, 0x800005, MRA_BANK4					},	// VRAM Ctrl
222 	{ 0x900000, 0x901fff, MRA_BANK5					},	// VRAM
223 	{ 0x902000, 0x903fff, MRA_BANK6					},	// VRAM
224 	{ 0x904000, 0x904fff, MRA_BANK7					},	//
225 	{ 0xa00000, 0xa00019, calibr50_ip_r				},	// Input Ports
226 /**/{ 0xd00000, 0xd00607, MRA_BANK8					},	// Sprites Y
227 	{ 0xe00000, 0xe03fff, MRA_BANK9					},	// Sprites Code + X + Attr
228 	{ 0xb00000, 0xb00001, soundlatch2_r				},	// From Sub CPU
229 /**/{ 0xc00000, 0xc00001, MRA_BANK10				},	// ? $4000
230 	{ -1 }
231 };
232 
233 static struct MemoryWriteAddress calibr50_writemem[] =
234 {
235 	{ 0x000000, 0x09ffff, MWA_ROM								},	// ROM
236 	{ 0xff0000, 0xffffff, MWA_BANK1								},	// RAM
237 	{ 0x200000, 0x200fff, MWA_BANK2								},	// NVRAM
238 	{ 0x300000, 0x300001, MWA_NOP								},	// ? (random value)
239 	{ 0x500000, 0x500001, MWA_NOP								},	// ?
240 	{ 0x700000, 0x7003ff, paletteram_xRRRRRGGGGGBBBBB_word_w, &paletteram	},	// Palette
241 	{ 0x800000, 0x800005, MWA_BANK4, &seta_vctrl_0				},	// VRAM Ctrl
242 	{ 0x900000, 0x901fff, seta_vram_0_w, &seta_vram_0			},	// VRAM
243 	{ 0x902000, 0x903fff, seta_vram_1_w, &seta_vram_1			},	// VRAM
244 	{ 0x904000, 0x904fff, MWA_BANK7								},	//
245 	{ 0xd00000, 0xd00607, MWA_BANK8, &spriteram					},	// Sprites Y
246 	{ 0xe00000, 0xe03fff, MWA_BANK9, &spriteram_2				},	// Sprites Code + X + Attr
247 	{ 0xb00000, 0xb00001, calibr50_soundlatch_w					},	// To Sub CPU
248 	{ 0xc00000, 0xc00001, MWA_BANK10							},	// ? $4000
249 	{ -1 }
250 };
251 
252 
253 /***************************************************************************
254 				DownTown, Meta Fox, Twin Eagle, Arbalester
255 			(with slight variations, and protections hooked in)
256 ***************************************************************************/
257 
258 static struct MemoryReadAddress downtown_readmem[] =
259 {
260 	{ 0x000000, 0x09ffff, MRA_ROM					},	// ROM
261 	{ 0xf00000, 0xffffff, MRA_BANK1					},	// RAM
262 	{ 0x100000, 0x103fff, seta_sound_word_r			},	// Sound
263 	{ 0x600000, 0x600003, seta_dsw_r				},	// DSW
264 	{ 0x700000, 0x7003ff, MRA_BANK3					},	// Palette
265 /**/{ 0x800000, 0x800005, MRA_BANK4					},	// VRAM Ctrl
266 	{ 0x900000, 0x901fff, MRA_BANK5					},	// VRAM
267 	{ 0x902000, 0x903fff, MRA_BANK6					},	// VRAM
268 	{ 0xb00000, 0xb00fff, sharedram_68000_r			},	// Shared RAM
269 /**/{ 0xc00000, 0xc00001, MRA_BANK7					},	// ? $4000
270 /**/{ 0xd00000, 0xd00607, MRA_BANK8					},	// Sprites Y
271 	{ 0xe00000, 0xe03fff, MRA_BANK9					},	// Sprites Code + X + Attr
272 	{ -1 }
273 };
274 
275 static struct MemoryWriteAddress downtown_writemem[] =
276 {
277 	{ 0x000000, 0x09ffff, MWA_ROM								},	// ROM
278 	{ 0xf00000, 0xffffff, MWA_BANK1								},	// RAM
279 	{ 0x100000, 0x103fff, seta_sound_word_w, &seta_sound_ram	},	// Sound
280 	{ 0x500000, 0x500001, MWA_NOP								},	// ?
281 	{ 0x700000, 0x7003ff, paletteram_xRRRRRGGGGGBBBBB_word_w, &paletteram	},	// Palette
282 	{ 0x800000, 0x800005, MWA_BANK4, &seta_vctrl_0				},	// VRAM Ctrl
283 	{ 0x900000, 0x901fff, seta_vram_0_w, &seta_vram_0			},	// VRAM
284 	{ 0x902000, 0x903fff, seta_vram_1_w, &seta_vram_1			},	// VRAM
285 	{ 0xa00000, 0xa00007, sub_ctrl_w							},	// Sub CPU Control?
286 	{ 0xb00000, 0xb00fff, sharedram_68000_w						},	// Shared RAM
287 	{ 0xc00000, 0xc00001, MWA_BANK7								},	// ? $4000
288 	{ 0xd00000, 0xd00607, MWA_BANK8, &spriteram					},	// Sprites Y
289 	{ 0xe00000, 0xe03fff, MWA_BANK9, &spriteram_2				},	// Sprites Code + X + Attr
290 	{ -1 }
291 };
292 
293 
294 
295 
296 /***************************************************************************
297 							Mobile Suit Gundam
298 ***************************************************************************/
299 
300 
301 static struct MemoryReadAddress msgundam_readmem[] =
302 {
303 	{ 0x000000, 0x07ffff, MRA_ROM				},	// ROM
304 	{ 0x100000, 0x1fffff, MRA_ROM				},	// ROM
305 	{ 0x200000, 0x24ffff, MRA_BANK1				},	// RAM
306 	{ 0x400000, 0x400001, input_port_0_r		},	// P1
307 	{ 0x400002, 0x400003, input_port_1_r		},	// P2
308 	{ 0x400004, 0x400005, input_port_2_r		},	// Coins
309 	{ 0x500000, 0x500005, MRA_BANK4				},	// Coin Lockout + Video Registers
310 	{ 0x600000, 0x600003, seta_dsw_r			},	// DSW
311 	{ 0x700400, 0x700fff, MRA_BANK5				},	// Palette
312 	{ 0x800000, 0x800607, MRA_BANK6				},	// Sprites Y
313 /**/{ 0x880000, 0x880001, MRA_BANK7				},	// ? 0x4000
314 	{ 0x900000, 0x903fff, MRA_BANK8				},	// Sprites Code + X + Attr
315 	{ 0xa00000, 0xa03fff, MRA_BANK9				},	// VRAM 0&1
316 	{ 0xa80000, 0xa83fff, MRA_BANK10			},	// VRAM 2&3
317 	{ 0xb00000, 0xb00005, MRA_BANK11			},	// VRAM 0&1 Ctrl
318 	{ 0xb80000, 0xb80005, MRA_BANK12			},	// VRAM 1&2 Ctrl
319 	{ 0xc00000, 0xc03fff, seta_sound_word_r		},	// Sound
320 	{ -1 }
321 };
322 static struct MemoryWriteAddress msgundam_writemem[] =
323 {
324 	{ 0x000000, 0x07ffff, MWA_ROM								},	// ROM
325 	{ 0x100000, 0x1fffff, MWA_ROM								},	// ROM
326 	{ 0x200000, 0x24ffff, MWA_BANK1								},	// RAM
327 	{ 0x400000, 0x400001, MWA_NOP								},	// ? 0
328 	{ 0x400004, 0x400005, MWA_NOP								},	// ? 0
329 	{ 0x500000, 0x500005, seta_vregs_w, &seta_vregs				},	// Coin Lockout + Video Registers
330 	{ 0x700400, 0x700fff, paletteram_xRRRRRGGGGGBBBBB_word_w, &paletteram	},	// Palette
331 	{ 0x800000, 0x800607, MWA_BANK6 , &spriteram				},	// Sprites Y
332 	{ 0x880000, 0x880001, MWA_BANK7								},	// ? 0x4000
333 	{ 0x900000, 0x903fff, MWA_BANK8 , &spriteram_2				},	// Sprites Code + X + Attr
334 	{ 0xa00000, 0xa01fff, seta_vram_0_w, &seta_vram_0			},	// VRAM 0
335 	{ 0xa02000, 0xa03fff, seta_vram_1_w, &seta_vram_1			},	// VRAM 1
336 	{ 0xa80000, 0xa81fff, seta_vram_2_w, &seta_vram_2			},	// VRAM 2
337 	{ 0xa82000, 0xa83fff, seta_vram_3_w, &seta_vram_3			},	// VRAM 3
338 	{ 0xb00000, 0xb00005, MWA_BANK11, &seta_vctrl_0				},	// VRAM 0&1 Ctrl
339 	{ 0xb80000, 0xb80005, MWA_BANK12, &seta_vctrl_2				},	// VRAM 2&3 Ctrl
340 	{ 0xc00000, 0xc03fff, seta_sound_word_w, &seta_sound_ram	},	// Sound
341 //	{ 0xd00000, 0xd00007, MWA_NOP								},	// ?
342 	{ -1 }
343 };
344 
345 
346 
347 
348 
349 /***************************************************************************
350 								Thundercade
351 ***************************************************************************/
352 
353 /* Mirror ram seems necessary since the e00000-e03fff area is not cleared
354    on startup. Level 2 int uses $e0000a as a counter that controls when
355    to write a value to the sub cpu, and when to read the result back.
356    If the check fails "error x0-006" is displayed. Hence if the counter
357    is not cleared at startup the game could check for the result before
358    writing to sharedram! */
359 
360 
361 static unsigned char *mirror_ram;
362 
READ_HANDLER(mirror_ram_r)363 READ_HANDLER( mirror_ram_r )
364 {
365 	return READ_WORD(&mirror_ram[offset]);
366 }
367 
WRITE_HANDLER(mirror_ram_w)368 WRITE_HANDLER( mirror_ram_w )
369 {
370 	COMBINE_WORD_MEM(&mirror_ram[offset], data);
371 }
372 
373 
374 static struct MemoryReadAddress tndrcade_readmem[] =
375 {
376 	{ 0x000000, 0x07ffff, MRA_ROM					},	// ROM
377 	{ 0x380000, 0x3803ff, MRA_BANK1					},	// Palette
378 /**/{ 0x400000, 0x400001, MRA_BANK2					},	// ? $4000
379 /**/{ 0x600000, 0x600607, MRA_BANK3					},	// Sprites Y
380 	{ 0xa00000, 0xa00fff, sharedram_68000_r			},	// Shared RAM
381 	{ 0xc00000, 0xc03fff, MRA_BANK4					},	// Sprites Code + X + Attr
382 	{ 0xe00000, 0xe03fff, MRA_BANK5					},	// RAM (Mirrored?)
383 	{ 0xffc000, 0xffffff, mirror_ram_r				},	// RAM (Mirrored?)
384 	{ -1 }
385 };
386 
387 static struct MemoryWriteAddress tndrcade_writemem[] =
388 {
389 	{ 0x000000, 0x07ffff, MWA_ROM							},	// ROM
390 	{ 0x200000, 0x200001, MWA_NOP							},	// ? 0
391 	{ 0x280000, 0x280001, MWA_NOP							},	// ? 0 / 1 (sub cpu related?)
392 	{ 0x300000, 0x300001, MWA_NOP							},	// ? 0 / 1
393 	{ 0x380000, 0x3803ff, paletteram_xRRRRRGGGGGBBBBB_word_w, &paletteram	},	// Palette
394 	{ 0x400000, 0x400001, MWA_BANK2							},	// ? $4000
395 	{ 0x600000, 0x600607, MWA_BANK3, &spriteram				},	// Sprites Y
396 	{ 0x800000, 0x800007, sub_ctrl_w						},	// Sub CPU Control?
397 	{ 0xa00000, 0xa00fff, sharedram_68000_w					},	// Shared RAM
398 	{ 0xc00000, 0xc03fff, MWA_BANK4, &spriteram_2			},	// Sprites Code + X + Attr
399 	{ 0xe00000, 0xe03fff, MWA_BANK5, &mirror_ram			},	// RAM (Mirrored?)
400 	{ 0xffc000, 0xffffff, mirror_ram_w						},	// RAM (Mirrored?)
401 	{ -1 }
402 };
403 
404 
405 
406 
407 /***************************************************************************
408 								U.S. Classic
409 ***************************************************************************/
410 
READ_HANDLER(usclssic_dsw_r)411 READ_HANDLER( usclssic_dsw_r )
412 {
413 	switch (offset)
414 	{
415 		case 0:	return (readinputport(3) >>  8) & 0xf;
416 		case 2:	return (readinputport(3) >> 12) & 0xf;
417 		case 4:	return (readinputport(3) >>  0) & 0xf;
418 		case 6:	return (readinputport(3) >>  4) & 0xf;
419 	}
420 	return 0;
421 }
422 
READ_HANDLER(usclssic_trackball_x_r)423 READ_HANDLER( usclssic_trackball_x_r )
424 {
425 	switch (offset)
426 	{
427 		case 0:	return (readinputport(0) >> 0) & 0xff;
428 		case 2:	return (readinputport(0) >> 8) & 0xff;
429 	}
430 	return 0;
431 }
432 
READ_HANDLER(usclssic_trackball_y_r)433 READ_HANDLER( usclssic_trackball_y_r )
434 {
435 	switch (offset)
436 	{
437 		case 0:	return (readinputport(1) >> 0) & 0xff;
438 		case 2:	return (readinputport(1) >> 8) & 0xff;
439 	}
440 	return 0;
441 }
442 
443 
WRITE_HANDLER(usclssic_lockout_w)444 WRITE_HANDLER( usclssic_lockout_w )
445 {
446 	static int old_tiles_offset = 0;
447 
448 	seta_tiles_offset = (data & 0x10) ? 0x4000: 0;
449 	if (old_tiles_offset != seta_tiles_offset)	tilemap_mark_all_tiles_dirty(ALL_TILEMAPS);
450 	old_tiles_offset = seta_tiles_offset;
451 
452 	coin_lockout_w(0, ((~data) >> 2) & 1 );
453 	coin_lockout_w(1, ((~data) >> 3) & 1 );
454 }
455 
456 
457 static struct MemoryReadAddress usclssic_readmem[] =
458 {
459 	{ 0x000000, 0x07ffff, MRA_ROM					},	// ROM
460 	{ 0xff0000, 0xffffff, MRA_BANK1					},	// RAM
461 	{ 0x800000, 0x800607, MRA_BANK2					},	// Sprites Y
462 /**/{ 0x900000, 0x900001, MRA_BANK3					},	// ?
463 	{ 0xa00000, 0xa00005, MRA_BANK4					},	// VRAM Ctrl
464 /**/{ 0xb00000, 0xb003ff, MRA_BANK5					},	// Palette
465 	{ 0xb40000, 0xb40003, usclssic_trackball_x_r	},	// TrackBall X
466 	{ 0xb40004, 0xb40007, usclssic_trackball_y_r	},	// TrackBall Y + Buttons
467 	{ 0xb40010, 0xb40011, input_port_2_r			},	// Coins
468 	{ 0xb40018, 0xb4001f, usclssic_dsw_r			},	// 2 DSWs
469 	{ 0xb80000, 0xb80001, MRA_NOP					},	// watchdog (value is discarded)?
470 	{ 0xc00000, 0xc03fff, MRA_BANK6					},	// Sprites Code + X + Attr
471 	{ 0xd00000, 0xd01fff, MRA_BANK7					},	// VRAM
472 	{ 0xd02000, 0xd03fff, MRA_BANK8					},	// VRAM
473 	{ 0xd04000, 0xd04fff, MRA_BANK9					},	//
474 	{ 0xe00000, 0xe00fff, MRA_BANK10				},	// NVRAM? (odd bytes)
475 	{ -1 }
476 };
477 
478 static struct MemoryWriteAddress usclssic_writemem[] =
479 {
480 	{ 0x000000, 0x07ffff, MWA_ROM							},	// ROM
481 	{ 0xff0000, 0xffffff, MWA_BANK1							},	// RAM
482 	{ 0x800000, 0x800607, MWA_BANK2 , &spriteram			},	// Sprites Y
483 	{ 0x900000, 0x900001, MWA_BANK3							},	// ? $4000
484 	{ 0xa00000, 0xa00005, MWA_BANK4, &seta_vctrl_0			},	// VRAM Ctrl
485 	{ 0xb00000, 0xb003ff, paletteram_xRRRRRGGGGGBBBBB_word_w, &paletteram	},	// Palette
486 	{ 0xb40000, 0xb40001, usclssic_lockout_w				},	// Coin Lockout + Tiles Banking
487 	{ 0xb40010, 0xb40011, calibr50_soundlatch_w				},	// To Sub CPU
488 	{ 0xb40018, 0xb40019, watchdog_reset_w					},	// Watchdog
489 	{ 0xb4000a, 0xb4000b, MWA_NOP							},	// ? (value's not important. In lev2&6)
490 	{ 0xc00000, 0xc03fff, MWA_BANK6 , &spriteram_2			},	// Sprites Code + X + Attr
491 	{ 0xd00000, 0xd01fff, seta_vram_0_w, &seta_vram_0		},	// VRAM
492 	{ 0xd02000, 0xd03fff, seta_vram_1_w, &seta_vram_1		},	// VRAM
493 	{ 0xd04000, 0xd04fff, MWA_BANK9							},	//
494 	{ 0xe00000, 0xe00fff, MWA_BANK10						},	// NVRAM? (odd bytes)
495 	{ -1 }
496 };
497 
498 
499 
500 /***************************************************************************
501 					Blandia / War of Aero / Zing Zing Zip
502 ***************************************************************************/
503 
504 static struct MemoryReadAddress wrofaero_readmem[] =
505 {
506 	{ 0x000000, 0x07ffff, MRA_ROM				},	// ROM
507 	{ 0x100000, 0x1fffff, MRA_ROM				},	// ROM (for blandia)
508 	{ 0x200000, 0x20ffff, MRA_BANK1				},	// RAM (main ram for zingzip, wrofaero writes to 20f000-20ffff)
509 	{ 0x300000, 0x30ffff, MRA_BANK2				},	// RAM (wrofaero only?)
510 	{ 0x400000, 0x400001, input_port_0_r		},	// P1
511 	{ 0x400002, 0x400003, input_port_1_r		},	// P2
512 	{ 0x400004, 0x400005, input_port_2_r		},	// Coins
513 	{ 0x600000, 0x600003, seta_dsw_r			},	// DSW
514 	{ 0x700400, 0x700fff, MRA_BANK3				},	// Palette
515 	{ 0x701000, 0x7013ff, MRA_BANK13			},	// ? Palette ?
516 	{ 0x800000, 0x803fff, MRA_BANK4				},	// VRAM 0&1
517 	{ 0x880000, 0x883fff, MRA_BANK5				},	// VRAM 2&3
518 /**/{ 0x900000, 0x900005, MRA_BANK6				},	// VRAM 0&1 Ctrl
519 /**/{ 0x980000, 0x980005, MRA_BANK7				},	// VRAM 2&3 Ctrl
520 /**/{ 0xa00000, 0xa00607, MRA_BANK8				},	// Sprites Y
521 /**/{ 0xa80000, 0xa80001, MRA_BANK9				},	// ? 0x4000
522 	{ 0xb00000, 0xb03fff, MRA_BANK10			},	// Sprites Code + X + Attr
523 /**/{ 0xc00000, 0xc03fff, seta_sound_word_r		},	// Sound
524 	{ -1 }
525 };
526 static struct MemoryWriteAddress wrofaero_writemem[] =
527 {
528 	{ 0x000000, 0x07ffff, MWA_ROM								},	// ROM
529 	{ 0x100000, 0x1fffff, MWA_ROM								},	// ROM (for blandia)
530 	{ 0x200000, 0x20ffff, MWA_BANK1								},	// RAM
531 	{ 0x300000, 0x30ffff, MWA_BANK2								},	// RAM (wrofaero only?)
532 	{ 0x500000, 0x500005, seta_vregs_w, &seta_vregs				},	// Coin Lockout + Video Registers
533 	{ 0x700400, 0x700fff, paletteram_xRRRRRGGGGGBBBBB_word_w, &paletteram	},	// Palette
534 	{ 0x701000, 0x7013ff, MWA_BANK13							},	// ? Palette ?
535 	{ 0x800000, 0x801fff, seta_vram_0_w, &seta_vram_0			},	// VRAM 0
536 	{ 0x802000, 0x803fff, seta_vram_1_w, &seta_vram_1			},	// VRAM 1
537 	{ 0x880000, 0x881fff, seta_vram_2_w, &seta_vram_2			},	// VRAM 2
538 	{ 0x882000, 0x883fff, seta_vram_3_w, &seta_vram_3			},	// VRAM 3
539 	{ 0x900000, 0x900005, MWA_BANK6, &seta_vctrl_0				},	// VRAM 0&1 Ctrl
540 	{ 0x980000, 0x980005, MWA_BANK7, &seta_vctrl_2				},	// VRAM 2&3 Ctrl
541 	{ 0xa00000, 0xa00607, MWA_BANK8, &spriteram					},	// Sprites Y
542 	{ 0xa80000, 0xa80001, MWA_BANK9								},	// ? 0x4000
543 	{ 0xb00000, 0xb03fff, MWA_BANK10, &spriteram_2				},	// Sprites Code + X + Attr
544 	{ 0xc00000, 0xc03fff, seta_sound_word_w, &seta_sound_ram	},	// Sound
545 //	{ 0xd00000, 0xd00007, MWA_NOP								},	// ?
546 	{ 0xe00000, 0xe00001, MWA_NOP								},	// ?
547 	{ 0xf00000, 0xf00001, MWA_NOP								},	// ?
548 	{ -1 }
549 };
550 
551 
552 
553 
554 
555 
556 
557 /***************************************************************************
558 
559 
560 									Sub CPU
561 
562 
563 ***************************************************************************/
564 
WRITE_HANDLER(sub_bankswitch_w)565 static WRITE_HANDLER( sub_bankswitch_w )
566 {
567 	unsigned char *RAM = memory_region(REGION_CPU2);
568 	int bank = data >> 4;
569 
570 	coin_lockout_w(0, ((~data) >> 2) & 1 );
571 	coin_lockout_w(1, ((~data) >> 3) & 1 );
572 
573 	cpu_setbank(15, &RAM[bank*0x4000 + 0xc000]);
574 
575 #if 0
576 {
577 	char buf[80];
578 	sprintf(buf,"%02X",	data&0xff );
579 	usrintf_showmessage(buf);
580 }
581 #endif
582 }
583 
584 
585 /***************************************************************************
586 								Caliber 50
587 ***************************************************************************/
588 
589 static struct MemoryReadAddress calibr50_sub_readmem[] =
590 {
591 	{ 0x0000, 0x0fff, MRA_RAM			},	// RAM
592 	{ 0x1000, 0x107f, seta_sound_r		},	// Sound
593 	{ 0x1080, 0x1fff, MRA_RAM			},	// RAM
594 	{ 0x4000, 0x4000, soundlatch_r		},	// From Main CPU
595 	{ 0x8000, 0xbfff, MRA_BANK15		},	// Banked ROM
596 	{ 0xc000, 0xffff, MRA_ROM			},	// ROM
597 	{ -1 }
598 };
599 
600 static struct MemoryWriteAddress calibr50_sub_writemem[] =
601 {
602 	{ 0x0000, 0x0fff, MWA_RAM							},	// RAM
603 	{ 0x1000, 0x107f, seta_sound_w, &seta_sound_ram		},	// Sound
604 	{ 0x1080, 0x1fff, MWA_RAM							},	// RAM
605 	{ 0x4000, 0x4000, sub_bankswitch_w					},	// Bankswitching
606 	{ 0x8000, 0xbfff, MWA_ROM							},	// Banked ROM
607 	{ 0xc000, 0xc000, soundlatch2_w						},	// To Main CPU
608 	{ 0xc001, 0xffff, MWA_ROM							},	// ROM
609 	{ -1 }
610 };
611 
612 
613 
614 /***************************************************************************
615 								DownTown
616 ***************************************************************************/
617 
READ_HANDLER(downtown_ip_r)618 READ_HANDLER( downtown_ip_r )
619 {
620 	int dir1 = readinputport(4);	// analog port
621 	int dir2 = readinputport(5);	// analog port
622 
623 	dir1 = (~ (0x800 >> ((dir1 * 12)/0x100)) ) & 0xfff;
624 	dir2 = (~ (0x800 >> ((dir2 * 12)/0x100)) ) & 0xfff;
625 
626 	switch (offset)
627 	{
628 		case 0:	return (readinputport(2) & 0xf0) + (dir1>>8);	// upper 4 bits of p1 rotation + coins
629 		case 1:	return (dir1&0xff);			// lower 8 bits of p1 rotation
630 		case 2:	return readinputport(0);	// p1
631 		case 3:	return 0xff;				// ?
632 		case 4:	return (dir2>>8);			// upper 4 bits of p2 rotation + ?
633 		case 5:	return (dir2&0xff);			// lower 8 bits of p2 rotation
634 		case 6:	return readinputport(1);	// p2
635 		case 7:	return 0xff;				// ?
636 	}
637 
638 	return 0;
639 }
640 
641 static struct MemoryReadAddress downtown_sub_readmem[] =
642 {
643 	{ 0x0000, 0x01ff, MRA_RAM			},	// RAM
644 	{ 0x0800, 0x0800, soundlatch_r		},	//
645 	{ 0x0801, 0x0801, soundlatch2_r		},	//
646 	{ 0x1000, 0x1007, downtown_ip_r		},	// Input Ports
647 	{ 0x5000, 0x57ff, MRA_RAM			},	// Shared RAM
648 	{ 0x7000, 0x7fff, MRA_ROM			},	// ROM
649 	{ 0x8000, 0xbfff, MRA_BANK15		},	// Banked ROM
650 	{ 0xc000, 0xffff, MRA_ROM			},	// ROM
651 	{ -1 }
652 };
653 
654 static struct MemoryWriteAddress downtown_sub_writemem[] =
655 {
656 	{ 0x0000, 0x01ff, MWA_RAM				},	// RAM
657 	{ 0x1000, 0x1000, sub_bankswitch_w		},	// ROM Bank + Coin Lockout
658 	{ 0x5000, 0x57ff, MWA_RAM, &sharedram	},	// Shared RAM
659 	{ 0x7000, 0xffff, MWA_ROM				},	// ROM
660 	{ -1 }
661 };
662 
663 
664 
665 
666 /***************************************************************************
667 								Meta Fox
668 ***************************************************************************/
669 
670 static struct MemoryReadAddress metafox_sub_readmem[] =
671 {
672 	{ 0x0000, 0x01ff, MRA_RAM			},	// RAM
673 	{ 0x0800, 0x0800, soundlatch_r		},	//
674 	{ 0x0801, 0x0801, soundlatch2_r		},	//
675 	{ 0x1000, 0x1000, input_port_2_r	},	// Coins
676 	{ 0x1002, 0x1002, input_port_0_r	},	// P1
677 //	{ 0x1004, 0x1004, MRA_NOP			},	// ?
678 	{ 0x1006, 0x1006, input_port_1_r	},	// P2
679 	{ 0x5000, 0x57ff, MRA_RAM			},	// Shared RAM
680 	{ 0x7000, 0x7fff, MRA_ROM			},	// ROM
681 	{ 0xc000, 0xffff, MRA_ROM			},	// ROM
682 	{ -1 }
683 };
684 
685 static struct MemoryWriteAddress metafox_sub_writemem[] =
686 {
687 	{ 0x0000, 0x01ff, MWA_RAM				},	// RAM
688 	{ 0x1000, 0x1000, sub_bankswitch_w		},	// ROM Bank + Coin Lockout
689 	{ 0x5000, 0x57ff, MWA_RAM, &sharedram	},	// Shared RAM
690 	{ 0x7000, 0x7fff, MWA_ROM				},	// ROM
691 	{ 0x8000, 0xbfff, MWA_ROM				},	// ROM
692 	{ 0xc000, 0xffff, MWA_ROM				},	// ROM
693 	{ -1 }
694 };
695 
696 
697 /***************************************************************************
698 								Twin Eagle
699 ***************************************************************************/
700 
701 static struct MemoryReadAddress twineagl_sub_readmem[] =
702 {
703 	{ 0x0000, 0x01ff, MRA_RAM			},	// RAM
704 	{ 0x0800, 0x0800, soundlatch_r		},	//
705 	{ 0x0801, 0x0801, soundlatch2_r		},	//
706 	{ 0x1000, 0x1000, input_port_0_r	},	// P1
707 	{ 0x1001, 0x1001, input_port_1_r	},	// P2
708 	{ 0x1002, 0x1002, input_port_2_r	},	// Coins
709 	{ 0x5000, 0x57ff, MRA_RAM			},	// Shared RAM
710 	{ 0x7000, 0x7fff, MRA_ROM			},	// ROM
711 	{ 0x8000, 0xbfff, MRA_BANK15		},	// ROM
712 	{ 0xc000, 0xffff, MRA_ROM			},	// ROM
713 	{ -1 }
714 };
715 
716 static struct MemoryWriteAddress twineagl_sub_writemem[] =
717 {
718 	{ 0x0000, 0x01ff, MWA_RAM				},	// RAM
719 	{ 0x1000, 0x1000, sub_bankswitch_w		},	// ROM Bank + Coin Lockout
720 	{ 0x5000, 0x57ff, MWA_RAM, &sharedram	},	// Shared RAM
721 	{ 0x7000, 0x7fff, MWA_ROM				},	// ROM
722 	{ 0xc000, 0xffff, MWA_ROM				},	// ROM
723 	{ -1 }
724 };
725 
726 
727 
728 /***************************************************************************
729 								Thundercade
730 ***************************************************************************/
731 
READ_HANDLER(ff_r)732 static READ_HANDLER( ff_r )	{return 0xff;}
733 
734 static struct MemoryReadAddress tndrcade_sub_readmem[] =
735 {
736 	{ 0x0000, 0x01ff, MRA_RAM					},	// RAM
737 	{ 0x0800, 0x0800, ff_r						},	// ? (bits 0/1/2/3: 1 -> do test 0-ff/100-1e0/5001-57ff/banked rom)
738 //	{ 0x0800, 0x0800, soundlatch_r				},	//
739 //	{ 0x0801, 0x0801, soundlatch2_r				},	//
740 	{ 0x1000, 0x1000, input_port_0_r			},	// P1
741 	{ 0x1001, 0x1001, input_port_1_r			},	// P2
742 	{ 0x1002, 0x1002, input_port_2_r			},	// Coins
743 	{ 0x2001, 0x2001, YM2203_read_port_0_r		},
744 	{ 0x5000, 0x57ff, MRA_RAM					},	// Shared RAM
745 	{ 0x6000, 0x7fff, MRA_ROM					},	// ROM
746 	{ 0x8000, 0xbfff, MRA_BANK15				},	// Banked ROM
747 	{ 0xc000, 0xffff, MRA_ROM					},	// ROM
748 	{ -1 }
749 };
750 
751 static struct MemoryWriteAddress tndrcade_sub_writemem[] =
752 {
753 	{ 0x0000, 0x01ff, MWA_RAM					},	// RAM
754 	{ 0x1000, 0x1000, sub_bankswitch_w			},	// ROM Bank + Coin Lockout
755 	{ 0x2000, 0x2000, YM2203_control_port_0_w	},
756 	{ 0x2001, 0x2001, YM2203_write_port_0_w		},
757 	{ 0x3000, 0x3000, YM3812_control_port_0_w	},
758 	{ 0x3001, 0x3001, YM3812_write_port_0_w		},
759 	{ 0x5000, 0x57ff, MWA_RAM, &sharedram		},	// Shared RAM
760 	{ 0x6000, 0xffff, MWA_ROM					},	// ROM
761 	{ -1 }
762 };
763 
764 
765 
766 
767 
768 
769 
770 /***************************************************************************
771 
772 
773 								Input Ports
774 
775 
776 ***************************************************************************/
777 
778 #define	JOY_TYPE1_2BUTTONS(_n_) \
779 	PORT_BIT(  0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT		|	IPF_PLAYER##_n_	) \
780 	PORT_BIT(  0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT	|	IPF_PLAYER##_n_	) \
781 	PORT_BIT(  0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_UP		|	IPF_PLAYER##_n_	) \
782 	PORT_BIT(  0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN		|	IPF_PLAYER##_n_	) \
783 	PORT_BIT(  0x0010, IP_ACTIVE_LOW, IPT_BUTTON1			|	IPF_PLAYER##_n_	) \
784 	PORT_BIT(  0x0020, IP_ACTIVE_LOW, IPT_BUTTON2			|	IPF_PLAYER##_n_	) \
785 	PORT_BIT(  0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN								) \
786 	PORT_BIT(  0x0080, IP_ACTIVE_LOW, IPT_START##_n_							)
787 
788 #define	JOY_TYPE1_3BUTTONS(_n_) \
789 	PORT_BIT(  0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT		|	IPF_PLAYER##_n_	) \
790 	PORT_BIT(  0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT	|	IPF_PLAYER##_n_	) \
791 	PORT_BIT(  0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_UP		|	IPF_PLAYER##_n_	) \
792 	PORT_BIT(  0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN		|	IPF_PLAYER##_n_	) \
793 	PORT_BIT(  0x0010, IP_ACTIVE_LOW, IPT_BUTTON1			|	IPF_PLAYER##_n_	) \
794 	PORT_BIT(  0x0020, IP_ACTIVE_LOW, IPT_BUTTON2			|	IPF_PLAYER##_n_	) \
795 	PORT_BIT(  0x0040, IP_ACTIVE_LOW, IPT_BUTTON3			|	IPF_PLAYER##_n_	) \
796 	PORT_BIT(  0x0080, IP_ACTIVE_LOW, IPT_START##_n_							)
797 
798 
799 
800 #define	JOY_TYPE2_2BUTTONS(_n_) \
801 	PORT_BIT(  0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP		|	IPF_PLAYER##_n_	) \
802 	PORT_BIT(  0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN		|	IPF_PLAYER##_n_	) \
803 	PORT_BIT(  0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT		|	IPF_PLAYER##_n_	) \
804 	PORT_BIT(  0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT	|	IPF_PLAYER##_n_	) \
805 	PORT_BIT(  0x0010, IP_ACTIVE_LOW, IPT_BUTTON1			|	IPF_PLAYER##_n_	) \
806 	PORT_BIT(  0x0020, IP_ACTIVE_LOW, IPT_BUTTON2			|	IPF_PLAYER##_n_	) \
807 	PORT_BIT(  0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN								) \
808 	PORT_BIT(  0x0080, IP_ACTIVE_LOW, IPT_START##_n_							)
809 
810 #define	JOY_TYPE2_3BUTTONS(_n_) \
811 	PORT_BIT(  0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP		|	IPF_PLAYER##_n_	) \
812 	PORT_BIT(  0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN		|	IPF_PLAYER##_n_	) \
813 	PORT_BIT(  0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT		|	IPF_PLAYER##_n_	) \
814 	PORT_BIT(  0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT	|	IPF_PLAYER##_n_	) \
815 	PORT_BIT(  0x0010, IP_ACTIVE_LOW, IPT_BUTTON1			|	IPF_PLAYER##_n_	) \
816 	PORT_BIT(  0x0020, IP_ACTIVE_LOW, IPT_BUTTON2			|	IPF_PLAYER##_n_	) \
817 	PORT_BIT(  0x0040, IP_ACTIVE_LOW, IPT_BUTTON3			|	IPF_PLAYER##_n_	) \
818 	PORT_BIT(  0x0080, IP_ACTIVE_LOW, IPT_START##_n_							)
819 
820 
821 #define JOY_ROTATION(_n_, _left_, _right_ ) \
822 	PORT_ANALOGX( 0xff, 0x00, IPT_DIAL | IPF_PLAYER##_n_, 15, 15, 0, 0, KEYCODE_##_left_, KEYCODE_##_right_, 0, 0 )
823 
824 
825 
826 /***************************************************************************
827 								Arbalester
828 ***************************************************************************/
829 
830 INPUT_PORTS_START( arbalest )
831 
832 	PORT_START	// IN0 - Player 1
833 	JOY_TYPE2_2BUTTONS(1)
834 
835 	PORT_START	// IN1 - Player 2
836 	JOY_TYPE2_2BUTTONS(2)
837 
838 	PORT_START	// IN2 - Coins
839 	PORT_BIT(  0x0001, IP_ACTIVE_LOW, IPT_UNKNOWN  )
840 	PORT_BIT(  0x0002, IP_ACTIVE_LOW, IPT_UNKNOWN  )
841 	PORT_BIT(  0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN  )
842 	PORT_BIT(  0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN  )
843 	PORT_BIT(  0x0010, IP_ACTIVE_LOW, IPT_TILT     )
844 	PORT_BIT(  0x0020, IP_ACTIVE_LOW, IPT_SERVICE1 )
845 	PORT_BIT_IMPULSE( 0x0040, IP_ACTIVE_LOW, IPT_COIN2, 5 )
846 	PORT_BIT_IMPULSE( 0x0080, IP_ACTIVE_LOW, IPT_COIN1, 5 )
847 
848 	PORT_START	// IN3 - 2 DSWs - $600001 & 3.b
849 	PORT_DIPNAME( 0x4001, 0x4001, "Licensed To" )
850 	PORT_DIPSETTING(      0x0001, "Jordan" )
851 	PORT_DIPSETTING(      0x4000, "Romstar" )
852 	PORT_DIPSETTING(      0x4001, "Romstar" )
853 	PORT_DIPSETTING(      0x0000, "Taito" )
854 	PORT_DIPNAME( 0x0002, 0x0002, DEF_STR( Flip_Screen ) )
855 	PORT_DIPSETTING(      0x0002, DEF_STR( Off ) )
856 	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
857 	PORT_SERVICE( 0x0004, IP_ACTIVE_LOW )
858 	PORT_DIPNAME( 0x0008, 0x0008, "Unknown 2-4" )	// not used, according to manual
859 	PORT_DIPSETTING(      0x0008, DEF_STR( Off ) )
860 	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
861 	PORT_DIPNAME( 0x0030, 0x0030, DEF_STR( Coin_A ) )
862 	PORT_DIPSETTING(      0x0010, DEF_STR( 2C_1C ) )
863 	PORT_DIPSETTING(      0x0030, DEF_STR( 1C_1C ) )
864 	PORT_DIPSETTING(      0x0000, DEF_STR( 2C_3C ) )
865 	PORT_DIPSETTING(      0x0020, DEF_STR( 1C_2C ) )
866 	PORT_DIPNAME( 0x00c0, 0x00c0, DEF_STR( Coin_B ) )
867 	PORT_DIPSETTING(      0x0040, DEF_STR( 2C_1C ) )
868 	PORT_DIPSETTING(      0x00c0, DEF_STR( 1C_1C ) )
869 	PORT_DIPSETTING(      0x0000, DEF_STR( 2C_3C ) )
870 	PORT_DIPSETTING(      0x0080, DEF_STR( 1C_2C ) )
871 
872 	PORT_DIPNAME( 0x0300, 0x0300, DEF_STR( Difficulty ) )
873 	PORT_DIPSETTING(      0x0300, "Easy" )
874 	PORT_DIPSETTING(      0x0200, "Hard" )
875 	PORT_DIPSETTING(      0x0100, "Harder" )
876 	PORT_DIPSETTING(      0x0000, "Hardest" )
877 	PORT_DIPNAME( 0x0c00, 0x0c00, DEF_STR( Bonus_Life ) )
878 	PORT_DIPSETTING(      0x0c00, "Never" )
879 	PORT_DIPSETTING(      0x0800, "300k Only" )
880 	PORT_DIPSETTING(      0x0400, "600k Only" )
881 	PORT_DIPSETTING(      0x0000, "300k & 600k" )
882 	PORT_DIPNAME( 0x3000, 0x3000, DEF_STR( Lives ) )
883 	PORT_DIPSETTING(      0x1000, "1" )
884 	PORT_DIPSETTING(      0x0000, "2" )
885 	PORT_DIPSETTING(      0x3000, "3" )
886 	PORT_DIPSETTING(      0x2000, "5" )
887 //                        0x4000  License (see first dsw)
888 	PORT_DIPNAME( 0x8000, 0x8000, "Coinage Type" )	// not supported
889 	PORT_DIPSETTING(      0x8000, "1" )
890 	PORT_DIPSETTING(      0x0000, "2" )
891 
892 INPUT_PORTS_END
893 
894 
895 
896 /***************************************************************************
897 								Blandia
898 ***************************************************************************/
899 
900 INPUT_PORTS_START( blandia )
901 
902 	PORT_START	// IN0 - Player 1 - $400000.w
903 	JOY_TYPE1_3BUTTONS(1)
904 
905 	PORT_START	// IN1 - Player 2 - $400002.w
906 	JOY_TYPE1_3BUTTONS(2)
907 
908 	PORT_START	// IN2 - Coins - $400004.w
909 	PORT_BIT_IMPULSE( 0x0001, IP_ACTIVE_LOW, IPT_COIN1, 5 )
910 	PORT_BIT_IMPULSE( 0x0002, IP_ACTIVE_LOW, IPT_COIN2, 5 )
911 	PORT_BIT(  0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 )
912 	PORT_BIT(  0x0008, IP_ACTIVE_LOW, IPT_TILT     )
913 	PORT_BIT(  0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN  )
914 	PORT_BIT(  0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN  )
915 	PORT_BIT(  0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN  )
916 	PORT_BIT(  0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN  )
917 
918 	PORT_START	// IN3 - 2 DSWs - $600001 & 3.b
919 	PORT_DIPNAME( 0x0001, 0x0001, DEF_STR( Demo_Sounds ) )
920 	PORT_DIPSETTING(      0x0000, DEF_STR( Off ) )
921 	PORT_DIPSETTING(      0x0001, DEF_STR( On ) )
922 	PORT_DIPNAME( 0x0002, 0x0002, "Coinage Type" )	// not supported
923 	PORT_DIPSETTING(      0x0002, "1" )
924 	PORT_DIPSETTING(      0x0000, "2" )
925 	PORT_DIPNAME( 0x001c, 0x001c, DEF_STR( Coin_A ) )
926 	PORT_DIPSETTING(      0x0010, DEF_STR( 3C_1C ) )
927 	PORT_DIPSETTING(      0x000c, DEF_STR( 2C_1C ) )
928 	PORT_DIPSETTING(      0x001c, DEF_STR( 1C_1C ) )
929 	PORT_DIPSETTING(      0x0004, DEF_STR( 2C_3C ) )
930 	PORT_DIPSETTING(      0x0018, DEF_STR( 1C_2C ) )
931 	PORT_DIPSETTING(      0x0008, DEF_STR( 2C_5C ) )
932 	PORT_DIPSETTING(      0x0014, DEF_STR( 1C_3C ) )
933 	PORT_DIPSETTING(      0x0000, DEF_STR( Free_Play ) )
934 	PORT_DIPNAME( 0x00e0, 0x00e0, DEF_STR( Coin_B ) )
935 	PORT_DIPSETTING(      0x00e0, DEF_STR( 1C_1C ) )
936 	PORT_DIPSETTING(      0x0060, DEF_STR( 2C_4C ) )
937 	PORT_DIPSETTING(      0x00c0, DEF_STR( 1C_2C ) )
938 	PORT_DIPSETTING(      0x0080, "3 Coins/7 Credit" )
939 	PORT_DIPSETTING(      0x0020, DEF_STR( 2C_5C ) )
940 	PORT_DIPSETTING(      0x0040, DEF_STR( 2C_6C ) )
941 	PORT_DIPSETTING(      0x00a0, DEF_STR( 1C_3C ) )
942 	PORT_DIPSETTING(      0x0000, DEF_STR( Free_Play ) )
943 
944 	PORT_DIPNAME( 0x0300, 0x0300, DEF_STR( Lives ) )
945 	PORT_DIPSETTING(      0x0200, "1" )
946 	PORT_DIPSETTING(      0x0300, "2" )
947 	PORT_DIPSETTING(      0x0100, "3" )
948 	PORT_DIPSETTING(      0x0000, "4" )
949 	PORT_DIPNAME( 0x0c00, 0x0c00, DEF_STR( Difficulty ) )
950 	PORT_DIPSETTING(      0x0800, "Easy"    )
951 	PORT_DIPSETTING(      0x0c00, "Normal"  )
952 	PORT_DIPSETTING(      0x0400, "Hard"    )
953 	PORT_DIPSETTING(      0x0000, "Hardest" )
954 	PORT_DIPNAME( 0x1000, 0x1000, "2 Player Game" )
955 	PORT_DIPSETTING(      0x1000, "2 Credits" )
956 	PORT_DIPSETTING(      0x0000, "1 Credit"  )
957 	PORT_DIPNAME( 0x2000, 0x2000, "Continue" )
958 	PORT_DIPSETTING(      0x2000, "1 Credit" )
959 	PORT_DIPSETTING(      0x0000, "1 Coin"   )
960 	PORT_DIPNAME( 0x4000, 0x4000, DEF_STR( Flip_Screen ) )
961 	PORT_DIPSETTING(      0x4000, DEF_STR( Off ) )
962 	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
963 	PORT_SERVICE( 0x8000, IP_ACTIVE_LOW )
964 
965 INPUT_PORTS_END
966 
967 
968 
969 /***************************************************************************
970 								Caliber 50
971 ***************************************************************************/
972 
973 INPUT_PORTS_START( calibr50 )
974 
975 	PORT_START	// IN0 - Player 1
976 	JOY_TYPE2_2BUTTONS(1)
977 
978 	PORT_START	// IN1 - Player 2
979 	JOY_TYPE2_2BUTTONS(2)
980 
981 	PORT_START	// IN2 - Coins
982 	PORT_BIT(  0x0001, IP_ACTIVE_LOW, IPT_UNKNOWN  )
983 	PORT_BIT(  0x0002, IP_ACTIVE_LOW, IPT_UNKNOWN  )
984 	PORT_BIT(  0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN  )
985 	PORT_BIT(  0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN  )
986 	PORT_BIT(  0x0010, IP_ACTIVE_LOW, IPT_TILT     )
987 	PORT_BIT(  0x0020, IP_ACTIVE_LOW, IPT_SERVICE1 )
988 	PORT_BIT_IMPULSE( 0x0040, IP_ACTIVE_LOW, IPT_COIN2, 5 )
989 	PORT_BIT_IMPULSE( 0x0080, IP_ACTIVE_LOW, IPT_COIN1, 5 )
990 
991 	PORT_START	// IN3 - 2 DSWs - $600001 & 3.b
992 	PORT_DIPNAME( 0x4001, 0x4000, "Licensed To" )
993 	PORT_DIPSETTING(      0x0001, "Romstar"       )
994 	PORT_DIPSETTING(      0x4001, "Taito America" )
995 	PORT_DIPSETTING(      0x4000, "Taito"         )
996 	PORT_DIPSETTING(      0x0000, "None (Japan)"  )
997 	PORT_DIPNAME( 0x0002, 0x0002, DEF_STR( Flip_Screen ) )
998 	PORT_DIPSETTING(      0x0002, DEF_STR( Off ) )
999 	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
1000 	PORT_SERVICE( 0x0004, IP_ACTIVE_LOW )
1001 	PORT_DIPNAME( 0x0008, 0x0008, DEF_STR( Demo_Sounds ) )
1002 	PORT_DIPSETTING(      0x0000, DEF_STR( Off ) )
1003 	PORT_DIPSETTING(      0x0008, DEF_STR( On ) )
1004 	PORT_DIPNAME( 0x0030, 0x0030, DEF_STR( Coin_A ) )
1005 	PORT_DIPSETTING(      0x0010, DEF_STR( 2C_1C ) )
1006 	PORT_DIPSETTING(      0x0030, DEF_STR( 1C_1C ) )
1007 	PORT_DIPSETTING(      0x0000, DEF_STR( 2C_3C ) )
1008 	PORT_DIPSETTING(      0x0020, DEF_STR( 1C_2C ) )
1009 	PORT_DIPNAME( 0x00c0, 0x00c0, DEF_STR( Coin_B ) )
1010 	PORT_DIPSETTING(      0x0040, DEF_STR( 2C_1C ) )
1011 	PORT_DIPSETTING(      0x00c0, DEF_STR( 1C_1C ) )
1012 	PORT_DIPSETTING(      0x0000, DEF_STR( 2C_3C ) )
1013 	PORT_DIPSETTING(      0x0080, DEF_STR( 1C_2C ) )
1014 
1015 	PORT_DIPNAME( 0x0300, 0x0100, DEF_STR( Difficulty ) )
1016 	PORT_DIPSETTING(      0x0300, "Easiest" )
1017 	PORT_DIPSETTING(      0x0200, "Easy" )
1018 	PORT_DIPSETTING(      0x0100, "Normal" )
1019 	PORT_DIPSETTING(      0x0000, "Hard" )
1020 	PORT_DIPNAME( 0x0400, 0x0400, "Score Digits" )
1021 	PORT_DIPSETTING(      0x0400, "7" )
1022 	PORT_DIPSETTING(      0x0000, "3" )
1023 	PORT_DIPNAME( 0x0800, 0x0800, DEF_STR( Lives ) )
1024 	PORT_DIPSETTING(      0x0800, "3" )
1025 	PORT_DIPSETTING(      0x0000, "4" )
1026 	PORT_DIPNAME( 0x1000, 0x1000, "Display Score" )
1027 	PORT_DIPSETTING(      0x0000, DEF_STR( Off ) )
1028 	PORT_DIPSETTING(      0x1000, DEF_STR( On ) )
1029 	PORT_DIPNAME( 0x2000, 0x2000, "Erase Backup Ram" )
1030 	PORT_DIPSETTING(      0x0000, DEF_STR( Off ) )
1031 	PORT_DIPSETTING(      0x2000, DEF_STR( On ) )
1032 	//                    0x4000  Country / License (see first dsw)
1033 	PORT_DIPNAME( 0x8000, 0x8000, "Unknown 2-7" )	/* manual: "Don't Touch" */
1034 	PORT_DIPSETTING(      0x8000, DEF_STR( Off ) )
1035 	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
1036 
1037 	PORT_START	// IN4 - Rotation Player 1
1038 	JOY_ROTATION(1, Z, X)
1039 
1040 	PORT_START	// IN5 - Rotation Player 2
1041 	JOY_ROTATION(2, N, M)
1042 
1043 INPUT_PORTS_END
1044 
1045 
1046 
1047 /***************************************************************************
1048 								Dragon Unit
1049 ***************************************************************************/
1050 
1051 INPUT_PORTS_START( drgnunit )
1052 
1053 	PORT_START	// IN0 - Player 1
1054 	JOY_TYPE1_3BUTTONS(1)
1055 
1056 	PORT_START	// IN1 - Player 2
1057 	JOY_TYPE1_3BUTTONS(2)
1058 
1059 	PORT_START	// IN2 - Coins
1060 	PORT_BIT_IMPULSE( 0x0001, IP_ACTIVE_LOW, IPT_COIN1, 5 )
1061 	PORT_BIT_IMPULSE( 0x0002, IP_ACTIVE_LOW, IPT_COIN2, 5 )
1062 	PORT_BIT(  0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 )
1063 	PORT_BIT(  0x0008, IP_ACTIVE_LOW, IPT_TILT     )
1064 	PORT_DIPNAME( 0x0010, 0x0010, "Coinage Type" ) // not supported
1065 	PORT_DIPSETTING(      0x0010, "1" )
1066 	PORT_DIPSETTING(      0x0000, "2" )
1067 	PORT_DIPNAME( 0x0020, 0x0020, "Title" )
1068 	PORT_DIPSETTING(      0x0020, "Dragon Unit" )
1069 	PORT_DIPSETTING(      0x0000, "Castle of Dragon" )
1070 	PORT_DIPNAME( 0x00c0, 0x00c0, "(C) / License" )
1071 	PORT_DIPSETTING(      0x00c0, "Athena (Japan)" )
1072 	PORT_DIPSETTING(      0x0080, "Athena / Taito (Japan)" )
1073 	PORT_DIPSETTING(      0x0040, "Seta USA / Taito America" )
1074 	PORT_DIPSETTING(      0x0000, "Seta USA / Romstar" )
1075 
1076 	PORT_START	// IN3 - 2 DSWs - $600001 & 3.b
1077 	PORT_DIPNAME( 0x0003, 0x0003, "Unknown 1-0&1" )
1078 	PORT_DIPSETTING(      0x0002, "00" )
1079 	PORT_DIPSETTING(      0x0003, "08" )
1080 	PORT_DIPSETTING(      0x0001, "10" )
1081 	PORT_DIPSETTING(      0x0000, "18" )
1082 	PORT_DIPNAME( 0x000c, 0x000c, DEF_STR( Bonus_Life ) )
1083 	PORT_DIPSETTING(      0x0008, "150K, Every 300K" )
1084 	PORT_DIPSETTING(      0x000c, "200K, Every 400K" )
1085 	PORT_DIPSETTING(      0x0004, "300K, Every 500K" )
1086 	PORT_DIPSETTING(      0x0000, "400K Only" )
1087 	PORT_DIPNAME( 0x0030, 0x0030, DEF_STR( Lives ) )
1088 	PORT_DIPSETTING(      0x0000, "1" )
1089 	PORT_DIPSETTING(      0x0010, "2" )
1090 	PORT_DIPSETTING(      0x0030, "3" )
1091 	PORT_DIPSETTING(      0x0020, "5" )
1092 	PORT_DIPNAME( 0x0040, 0x0040, "Unknown 1-6" )
1093 	PORT_DIPSETTING(      0x0040, DEF_STR( Off ) )
1094 	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
1095 	PORT_DIPNAME( 0x0080, 0x0080, "Unknown 1-7*" )
1096 	PORT_DIPSETTING(      0x0080, DEF_STR( Off ) )
1097 	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
1098 
1099 	PORT_DIPNAME( 0x0100, 0x0100, "Unknown 2-0" )
1100 	PORT_DIPSETTING(      0x0100, DEF_STR( Off ) )
1101 	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
1102 	PORT_DIPNAME( 0x0200, 0x0200, DEF_STR( Flip_Screen ) )
1103 	PORT_DIPSETTING(      0x0200, DEF_STR( Off ) )
1104 	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
1105 	PORT_DIPNAME( 0x0400, 0x0400, "Unknown 2-2*" )
1106 	PORT_DIPSETTING(      0x0400, DEF_STR( Off ) )
1107 	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
1108 	PORT_SERVICE( 0x0800, IP_ACTIVE_LOW )
1109 	PORT_DIPNAME( 0x3000, 0x3000, DEF_STR( Coin_A ) )
1110 	PORT_DIPSETTING(      0x1000, DEF_STR( 2C_1C ) )
1111 	PORT_DIPSETTING(      0x3000, DEF_STR( 1C_1C ) )
1112 	PORT_DIPSETTING(      0x0000, DEF_STR( 2C_3C ) )
1113 	PORT_DIPSETTING(      0x2000, DEF_STR( 1C_2C ) )
1114 	PORT_DIPNAME( 0xc000, 0xc000, DEF_STR( Coin_B ) )
1115 	PORT_DIPSETTING(      0x4000, DEF_STR( 2C_1C ) )
1116 	PORT_DIPSETTING(      0xc000, DEF_STR( 1C_1C ) )
1117 	PORT_DIPSETTING(      0x0000, DEF_STR( 2C_3C ) )
1118 	PORT_DIPSETTING(      0x8000, DEF_STR( 1C_2C ) )
1119 
1120 INPUT_PORTS_END
1121 
1122 
1123 
1124 /***************************************************************************
1125 								DownTown
1126 ***************************************************************************/
1127 
1128 INPUT_PORTS_START( downtown )
1129 
1130 	PORT_START	// IN0 - Player 1
1131 	JOY_TYPE2_2BUTTONS(1)
1132 
1133 	PORT_START	// IN1 - Player 2
1134 	JOY_TYPE2_2BUTTONS(2)
1135 
1136 	PORT_START	// IN2 - Coins
1137 	PORT_BIT(  0x0001, IP_ACTIVE_LOW, IPT_UNKNOWN  )
1138 	PORT_BIT(  0x0002, IP_ACTIVE_LOW, IPT_UNKNOWN  )
1139 	PORT_BIT(  0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN  )
1140 	PORT_BIT(  0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN  )
1141 	PORT_BIT(  0x0010, IP_ACTIVE_LOW, IPT_TILT     )
1142 	PORT_BIT(  0x0020, IP_ACTIVE_LOW, IPT_SERVICE1 )
1143 	PORT_BIT_IMPULSE( 0x0040, IP_ACTIVE_LOW, IPT_COIN2, 5 )
1144 	PORT_BIT_IMPULSE( 0x0080, IP_ACTIVE_LOW, IPT_COIN1, 5 )
1145 
1146 	PORT_START	// IN3 - 2 DSWs - $600001 & 3.b
1147 	PORT_DIPNAME( 0x0001, 0x0000, "Sales" )
1148 	PORT_DIPSETTING(      0x0001, "Japan Only" )
1149 	PORT_DIPSETTING(      0x0000, "World" )
1150 	PORT_DIPNAME( 0x0002, 0x0002, DEF_STR( Flip_Screen ) )
1151 	PORT_DIPSETTING(      0x0002, DEF_STR( Off ) )
1152 	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
1153 	PORT_SERVICE( 0x0004, IP_ACTIVE_LOW )
1154 	PORT_DIPNAME( 0x0008, 0x0000, DEF_STR( Demo_Sounds ) )
1155 	PORT_DIPSETTING(      0x0008, DEF_STR( Off ) )
1156 	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
1157 	PORT_DIPNAME( 0x0030, 0x0030, DEF_STR( Coin_A ) )
1158 	PORT_DIPSETTING(      0x0010, DEF_STR( 2C_1C ) )
1159 	PORT_DIPSETTING(      0x0030, DEF_STR( 1C_1C ) )
1160 	PORT_DIPSETTING(      0x0000, DEF_STR( 2C_3C ) )
1161 	PORT_DIPSETTING(      0x0020, DEF_STR( 1C_2C ) )
1162 	PORT_DIPNAME( 0x00c0, 0x00c0, DEF_STR( Coin_B ) )
1163 	PORT_DIPSETTING(      0x0040, DEF_STR( 2C_1C ) )
1164 	PORT_DIPSETTING(      0x00c0, DEF_STR( 1C_1C ) )
1165 	PORT_DIPSETTING(      0x0000, DEF_STR( 2C_3C ) )
1166 	PORT_DIPSETTING(      0x0080, DEF_STR( 1C_2C ) )
1167 // other coinage
1168 #if 0
1169 	PORT_DIPNAME( 0x0030, 0x0030, DEF_STR( Coin_A ) )
1170 	PORT_DIPSETTING(      0x0000, DEF_STR( 4C_1C ) )
1171 	PORT_DIPSETTING(      0x0010, DEF_STR( 3C_1C ) )
1172 	PORT_DIPSETTING(      0x0020, DEF_STR( 2C_1C ) )
1173 	PORT_DIPSETTING(      0x0030, DEF_STR( 1C_1C ) )
1174 	PORT_DIPNAME( 0x00c0, 0x00c0, DEF_STR( Coin_B ) )
1175 	PORT_DIPSETTING(      0x00c0, DEF_STR( 1C_2C ) )
1176 	PORT_DIPSETTING(      0x0080, DEF_STR( 1C_3C ) )
1177 	PORT_DIPSETTING(      0x0040, DEF_STR( 1C_4C ) )
1178 	PORT_DIPSETTING(      0x0000, DEF_STR( 1C_6C ) )
1179 #endif
1180 
1181 	PORT_DIPNAME( 0x0300, 0x0300, "Unknown 2-0&1" )
1182 	PORT_DIPSETTING(      0x0200, "2" )
1183 	PORT_DIPSETTING(      0x0300, "3" )
1184 	PORT_DIPSETTING(      0x0100, "4" )
1185 	PORT_DIPSETTING(      0x0000, "5" )
1186 	PORT_DIPNAME( 0x0c00, 0x0c00, DEF_STR( Bonus_Life ) )
1187 	PORT_DIPSETTING(      0x0c00, "Never" )
1188 	PORT_DIPSETTING(      0x0800, "50K Only" )
1189 	PORT_DIPSETTING(      0x0400, "100K Only" )
1190 	PORT_DIPSETTING(      0x0000, "50K, Every 150K" )
1191 	PORT_DIPNAME( 0x3000, 0x3000, DEF_STR( Lives ) )
1192 	PORT_DIPSETTING(      0x1000, "2" )
1193 	PORT_DIPSETTING(      0x3000, "3" )
1194 	PORT_DIPSETTING(      0x0000, "4" )
1195 	PORT_DIPSETTING(      0x2000, "5" )
1196 	PORT_DIPNAME( 0x4000, 0x4000, "World License" )
1197 	PORT_DIPSETTING(      0x4000, "Romstar" )
1198 	PORT_DIPSETTING(      0x0000, "Taito" )
1199 	PORT_DIPNAME( 0x8000, 0x8000, "Coinage Type" )	// not supported
1200 	PORT_DIPSETTING(      0x8000, "1" )
1201 	PORT_DIPSETTING(      0x0000, "2" )
1202 
1203 	PORT_START	// IN4 - Rotation Player 1
1204 	JOY_ROTATION(1, Z, X)
1205 
1206 	PORT_START	// IN5 - Rotation Player 2
1207 	JOY_ROTATION(1, N, M)
1208 
1209 
1210 INPUT_PORTS_END
1211 
1212 
1213 
1214 /***************************************************************************
1215 								Meta Fox
1216 ***************************************************************************/
1217 
1218 INPUT_PORTS_START( metafox )
1219 
1220 	PORT_START	// IN0
1221 	JOY_TYPE2_2BUTTONS(1)
1222 
1223 	PORT_START	// IN1
1224 	JOY_TYPE2_2BUTTONS(2)
1225 
1226 	PORT_START	// IN2
1227 	PORT_BIT(  0x0001, IP_ACTIVE_LOW, IPT_UNKNOWN  )
1228 	PORT_BIT(  0x0002, IP_ACTIVE_LOW, IPT_UNKNOWN  )
1229 	PORT_BIT(  0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN  )
1230 	PORT_BIT(  0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN  )
1231 	PORT_BIT(  0x0010, IP_ACTIVE_LOW, IPT_TILT     )
1232 	PORT_BIT(  0x0020, IP_ACTIVE_LOW, IPT_SERVICE1 )
1233 	PORT_BIT_IMPULSE( 0x0040, IP_ACTIVE_LOW, IPT_COIN2, 5 )
1234 	PORT_BIT_IMPULSE( 0x0080, IP_ACTIVE_LOW, IPT_COIN1, 5 )
1235 
1236 	PORT_START	// IN3 - 2 DSWs - $600001 & 3.b
1237 	PORT_DIPNAME( 0x4001, 0x4001, "Licensed To"    )
1238 	PORT_DIPSETTING(      0x0001, "Jordan"        )
1239 	PORT_DIPSETTING(      0x4001, "Romstar"       )
1240 	PORT_DIPSETTING(      0x4000, "Taito"         )
1241 	PORT_DIPSETTING(      0x0000, "Taito America" )
1242 	PORT_DIPNAME( 0x0002, 0x0002, DEF_STR( Flip_Screen ) )
1243 	PORT_DIPSETTING(      0x0002, DEF_STR( Off ) )
1244 	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
1245 	PORT_SERVICE( 0x0004, IP_ACTIVE_LOW )
1246 	PORT_DIPNAME( 0x0008, 0x0008, DEF_STR( Demo_Sounds ) )
1247 	PORT_DIPSETTING(      0x0000, DEF_STR( Off ) )
1248 	PORT_DIPSETTING(      0x0008, DEF_STR( On ) )
1249 	PORT_DIPNAME( 0x0030, 0x0030, DEF_STR( Coin_A ) )
1250 	PORT_DIPSETTING(      0x0010, DEF_STR( 2C_1C ) )
1251 	PORT_DIPSETTING(      0x0030, DEF_STR( 1C_1C ) )
1252 	PORT_DIPSETTING(      0x0000, DEF_STR( 2C_3C ) )
1253 	PORT_DIPSETTING(      0x0020, DEF_STR( 1C_2C ) )
1254 	PORT_DIPNAME( 0x00c0, 0x00c0, DEF_STR( Coin_B ) )
1255 	PORT_DIPSETTING(      0x0040, DEF_STR( 2C_1C ) )
1256 	PORT_DIPSETTING(      0x00c0, DEF_STR( 1C_1C ) )
1257 	PORT_DIPSETTING(      0x0000, DEF_STR( 2C_3C ) )
1258 	PORT_DIPSETTING(      0x0080, DEF_STR( 1C_2C ) )
1259 
1260 	PORT_DIPNAME( 0x0300, 0x0100, DEF_STR( Difficulty ) )
1261 	PORT_DIPSETTING(      0x0300, "Normal"  )
1262 	PORT_DIPSETTING(      0x0200, "Easy"    )
1263 	PORT_DIPSETTING(      0x0100, "Hard"    )
1264 	PORT_DIPSETTING(      0x0000, "Hardest" )
1265 	PORT_DIPNAME( 0x0400, 0x0400, "Unknown 2-2" )
1266 	PORT_DIPSETTING(      0x0400, DEF_STR( Off ) )
1267 	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
1268 	PORT_DIPNAME( 0x0800, 0x0800, "Unknown 2-3" )
1269 	PORT_DIPSETTING(      0x0800, DEF_STR( Off ) )
1270 	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
1271 	PORT_DIPNAME( 0x3000, 0x3000, DEF_STR( Lives ) )
1272 	PORT_DIPSETTING(      0x1000, "1" )
1273 	PORT_DIPSETTING(      0x0000, "2" )
1274 	PORT_DIPSETTING(      0x3000, "3" )
1275 	PORT_DIPSETTING(      0x2000, "5" )
1276 //	PORT_DIPNAME( 0x4000, 0x4000, "License" )
1277 	PORT_DIPNAME( 0x8000, 0x8000, "Coinage Type" )	// not supported
1278 	PORT_DIPSETTING(      0x8000, "1" )
1279 	PORT_DIPSETTING(      0x0000, "2" )
1280 
1281 
1282 INPUT_PORTS_END
1283 
1284 
1285 
1286 
1287 /***************************************************************************
1288 							Mobile Suit Gundam
1289 ***************************************************************************/
1290 
1291 
1292 INPUT_PORTS_START( msgundam )
1293 
1294 	PORT_START	// IN0 - Player 1 - $400000.w
1295 	JOY_TYPE2_2BUTTONS(1)
1296 
1297 	PORT_START	// IN1 - Player 2 - $400002.w
1298 	JOY_TYPE2_2BUTTONS(2)
1299 
1300 	PORT_START	// IN2 - Coins - $400004.w
1301 	PORT_BIT_IMPULSE( 0x0001, IP_ACTIVE_LOW, IPT_COIN1, 5 )
1302 	PORT_BIT_IMPULSE( 0x0002, IP_ACTIVE_LOW, IPT_COIN2, 5 )
1303 	PORT_BIT(  0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 )
1304 	PORT_BIT(  0x0008, IP_ACTIVE_LOW, IPT_TILT     )
1305 	PORT_BIT(  0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN  )
1306 	PORT_BIT(  0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN  )
1307 	PORT_BIT(  0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN  )
1308 	PORT_BIT(  0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN  )
1309 
1310 	PORT_START	// IN3 - 2 DSWs - $600001 & 3.b
1311 	PORT_DIPNAME( 0x0007, 0x0007, DEF_STR( Coin_A ) )
1312 	PORT_DIPSETTING(      0x0000, DEF_STR( 4C_1C ) )
1313 	PORT_DIPSETTING(      0x0001, DEF_STR( 3C_1C ) )
1314 	PORT_DIPSETTING(      0x0002, DEF_STR( 2C_1C ) )
1315 	PORT_DIPSETTING(      0x0007, DEF_STR( 1C_1C ) )
1316 	PORT_DIPSETTING(      0x0006, DEF_STR( 1C_2C ) )
1317 	PORT_DIPSETTING(      0x0005, DEF_STR( 1C_3C ) )
1318 	PORT_DIPSETTING(      0x0003, DEF_STR( 1C_4C ) )
1319 	PORT_DIPSETTING(      0x0004, DEF_STR( 1C_5C ) )
1320 	PORT_DIPNAME( 0x0038, 0x0038, DEF_STR( Coin_B ) )
1321 	PORT_DIPSETTING(      0x0000, DEF_STR( 4C_1C ) )
1322 	PORT_DIPSETTING(      0x0008, DEF_STR( 3C_1C ) )
1323 	PORT_DIPSETTING(      0x0010, DEF_STR( 2C_1C ) )
1324 	PORT_DIPSETTING(      0x0038, DEF_STR( 1C_1C ) )
1325 	PORT_DIPSETTING(      0x0030, DEF_STR( 1C_2C ) )
1326 	PORT_DIPSETTING(      0x0028, DEF_STR( 1C_3C ) )
1327 	PORT_DIPSETTING(      0x0018, DEF_STR( 1C_4C ) )
1328 	PORT_DIPSETTING(      0x0020, DEF_STR( 1C_5C ) )
1329 	PORT_DIPNAME( 0x0040, 0x0040, "Unknown 2-6" )
1330 	PORT_DIPSETTING(      0x0040, DEF_STR( Off ) )
1331 	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
1332 	PORT_DIPNAME( 0x0080, 0x0080, DEF_STR( Free_Play ) )
1333 	PORT_DIPSETTING(      0x0080, DEF_STR( Off ) )
1334 	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
1335 
1336 	PORT_DIPNAME( 0x0100, 0x0100, "Unknown 1-0" )	// demo sound??
1337 	PORT_DIPSETTING(      0x0100, DEF_STR( Off ) )
1338 	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
1339 	PORT_DIPNAME( 0x0200, 0x0200, "Unknown 1-1" )
1340 	PORT_DIPSETTING(      0x0200, DEF_STR( Off ) )
1341 	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
1342 	PORT_DIPNAME( 0x0400, 0x0400, "Unknown 1-2" )
1343 	PORT_DIPSETTING(      0x0400, DEF_STR( Off ) )
1344 	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
1345 	PORT_DIPNAME( 0x0800, 0x0800, "Unknown 1-3" )
1346 	PORT_DIPSETTING(      0x0800, DEF_STR( Off ) )
1347 	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
1348 	PORT_DIPNAME( 0x1000, 0x1000, DEF_STR( Flip_Screen ) )
1349 	PORT_DIPSETTING(      0x1000, DEF_STR( Off ) )
1350 	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
1351 	PORT_DIPNAME( 0x2000, 0x2000, "Memory Check?" )
1352 	PORT_DIPSETTING(      0x2000, DEF_STR( Off ) )
1353 	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
1354 	PORT_DIPNAME( 0x4000, 0x4000, "Unknown 1-6" )
1355 	PORT_DIPSETTING(      0x4000, DEF_STR( Off ) )
1356 	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
1357 	PORT_SERVICE( 0x8000, IP_ACTIVE_LOW )
1358 
1359 INPUT_PORTS_END
1360 
1361 
1362 
1363 
1364 
1365 /***************************************************************************
1366 								Thundercade (US)
1367 ***************************************************************************/
1368 
1369 INPUT_PORTS_START( tndrcade )
1370 
1371 	PORT_START	// IN0 - Player 1
1372 	JOY_TYPE1_2BUTTONS(1)
1373 
1374 	PORT_START	// IN1 - Player 2
1375 	JOY_TYPE1_2BUTTONS(2)
1376 
1377 	PORT_START	// IN2 - Coins
1378 	PORT_BIT_IMPULSE( 0x0001, IP_ACTIVE_LOW, IPT_COIN1, 5 )
1379 	PORT_BIT_IMPULSE( 0x0002, IP_ACTIVE_LOW, IPT_COIN2, 5 )
1380 	PORT_BIT(  0x0004, IP_ACTIVE_LOW, IPT_START1   )
1381 	PORT_BIT(  0x0008, IP_ACTIVE_LOW, IPT_START2   )
1382 	PORT_BIT(  0x0010, IP_ACTIVE_LOW, IPT_SERVICE1 )
1383 	PORT_BIT(  0x0020, IP_ACTIVE_LOW, IPT_TILT     )
1384 	PORT_BIT(  0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN  )
1385 	PORT_BIT(  0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN  )
1386 
1387 	PORT_START	// IN3 - 2 DSWs - $600001 & 3.b
1388 	PORT_DIPNAME( 0x0003, 0x0003, "Difficulty?" )
1389 	PORT_DIPSETTING(      0x0002, "0" )
1390 	PORT_DIPSETTING(      0x0003, "1" )
1391 	PORT_DIPSETTING(      0x0001, "2" )
1392 	PORT_DIPSETTING(      0x0000, "3" )
1393 	PORT_DIPNAME( 0x000c, 0x000c, DEF_STR( Bonus_Life ) )
1394 	PORT_DIPSETTING(      0x000c, "50K  Only" )
1395 	PORT_DIPSETTING(      0x0004, "50K, Every 150K" )
1396 	PORT_DIPSETTING(      0x0004, "70K, Every 200K" )
1397 	PORT_DIPSETTING(      0x0008, "100K Only" )
1398 	PORT_DIPNAME( 0x0030, 0x0030, DEF_STR( Lives ) )
1399 	PORT_DIPSETTING(      0x0010, "1" )
1400 	PORT_DIPSETTING(      0x0000, "2" )
1401 	PORT_DIPSETTING(      0x0030, "3" )
1402 	PORT_DIPSETTING(      0x0020, "5" )
1403 	PORT_DIPNAME( 0x0040, 0x0040, "Allow Continue" )
1404 	PORT_DIPSETTING(      0x0000, DEF_STR( Off ) )
1405 	PORT_DIPSETTING(      0x0040, DEF_STR( On ) )
1406 	PORT_DIPNAME( 0x0080, 0x0000, "Licensed To" )	// + coin mode (not supported)
1407 	PORT_DIPSETTING(      0x0080, "Taito America Corp." )
1408 	PORT_DIPSETTING(      0x0000, "Taito Corp. Japan" )
1409 
1410 	PORT_DIPNAME( 0x0100, 0x0100, "Title" )
1411 	PORT_DIPSETTING(      0x0100, "Thundercade" )
1412 	PORT_DIPSETTING(      0x0000, "Twin Formation" )
1413 	PORT_DIPNAME( 0x0200, 0x0200, DEF_STR( Flip_Screen ) )
1414 	PORT_DIPSETTING(      0x0200, DEF_STR( Off ) )
1415 	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
1416 	PORT_SERVICE( 0x0400, IP_ACTIVE_LOW )
1417 	PORT_DIPNAME( 0x0800, 0x0000, DEF_STR( Demo_Sounds ) )
1418 	PORT_DIPSETTING(      0x0800, DEF_STR( Off ) )
1419 	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
1420 	PORT_DIPNAME( 0x3000, 0x3000, DEF_STR( Coin_A ) )
1421 	PORT_DIPSETTING(      0x1000, DEF_STR( 2C_1C ) )
1422 	PORT_DIPSETTING(      0x3000, DEF_STR( 1C_1C ) )
1423 	PORT_DIPSETTING(      0x0000, DEF_STR( 2C_3C ) )
1424 	PORT_DIPSETTING(      0x2000, DEF_STR( 1C_2C ) )
1425 	PORT_DIPNAME( 0xc000, 0xc000, DEF_STR( Coin_B ) )
1426 	PORT_DIPSETTING(      0x4000, DEF_STR( 2C_1C ) )
1427 	PORT_DIPSETTING(      0xc000, DEF_STR( 1C_1C ) )
1428 	PORT_DIPSETTING(      0x0000, DEF_STR( 2C_3C ) )
1429 	PORT_DIPSETTING(      0x8000, DEF_STR( 1C_2C ) )
1430 
1431 INPUT_PORTS_END
1432 
1433 
1434 /***************************************************************************
1435 								Thundercade (Japan)
1436 ***************************************************************************/
1437 
1438 INPUT_PORTS_START( tndrcadj )
1439 
1440 	PORT_START	// IN0 - Player 1
1441 	JOY_TYPE1_2BUTTONS(1)
1442 
1443 	PORT_START	// IN1 - Player 2
1444 	JOY_TYPE1_2BUTTONS(2)
1445 
1446 	PORT_START	// IN2 - Coins
1447 	PORT_BIT_IMPULSE( 0x0001, IP_ACTIVE_LOW, IPT_COIN1, 5 )
1448 	PORT_BIT_IMPULSE( 0x0002, IP_ACTIVE_LOW, IPT_COIN2, 5 )
1449 	PORT_BIT(  0x0004, IP_ACTIVE_LOW, IPT_START1   )
1450 	PORT_BIT(  0x0008, IP_ACTIVE_LOW, IPT_START2   )
1451 	PORT_BIT(  0x0010, IP_ACTIVE_LOW, IPT_SERVICE1 )
1452 	PORT_BIT(  0x0020, IP_ACTIVE_LOW, IPT_TILT     )
1453 	PORT_BIT(  0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN  )
1454 	PORT_BIT(  0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN  )
1455 
1456 	PORT_START	// IN3 - 2 DSWs - $600001 & 3.b
1457 	PORT_DIPNAME( 0x0003, 0x0003, "Difficulty?" )
1458 	PORT_DIPSETTING(      0x0002, "0" )
1459 	PORT_DIPSETTING(      0x0003, "1" )
1460 	PORT_DIPSETTING(      0x0001, "2" )
1461 	PORT_DIPSETTING(      0x0000, "3" )
1462 	PORT_DIPNAME( 0x000c, 0x000c, DEF_STR( Bonus_Life ) )
1463 	PORT_DIPSETTING(      0x000c, "50K  Only" )
1464 	PORT_DIPSETTING(      0x0004, "50K, Every 150K" )
1465 	PORT_DIPSETTING(      0x0004, "70K, Every 200K" )
1466 	PORT_DIPSETTING(      0x0008, "100K Only" )
1467 	PORT_DIPNAME( 0x0030, 0x0030, DEF_STR( Lives ) )
1468 	PORT_DIPSETTING(      0x0010, "1" )
1469 	PORT_DIPSETTING(      0x0000, "2" )
1470 	PORT_DIPSETTING(      0x0030, "3" )
1471 	PORT_DIPSETTING(      0x0020, "5" )
1472 	PORT_DIPNAME( 0x0040, 0x0040, "Allow Continue" )
1473 	PORT_DIPSETTING(      0x0000, DEF_STR( Off ) )
1474 	PORT_DIPSETTING(      0x0040, DEF_STR( On ) )
1475 	PORT_DIPNAME( 0x0080, 0x0080, DEF_STR( Free_Play ) )
1476 	PORT_DIPSETTING(      0x0080, DEF_STR( Off ) )
1477 	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
1478 
1479 	PORT_BITX(    0x0100, 0x0100, IPT_DIPSWITCH_NAME | IPF_CHEAT, "Invulnerability", IP_KEY_NONE, IP_JOY_NONE )
1480 	PORT_DIPSETTING(      0x0100, DEF_STR( Off ) )
1481 	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
1482 	PORT_DIPNAME( 0x0200, 0x0200, DEF_STR( Flip_Screen ) )
1483 	PORT_DIPSETTING(      0x0200, DEF_STR( Off ) )
1484 	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
1485 	PORT_SERVICE( 0x0400, IP_ACTIVE_LOW )
1486 	PORT_DIPNAME( 0x0800, 0x0000, DEF_STR( Demo_Sounds ) )
1487 	PORT_DIPSETTING(      0x0800, DEF_STR( Off ) )
1488 	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
1489 	PORT_DIPNAME( 0x3000, 0x3000, DEF_STR( Coin_A ) )
1490 	PORT_DIPSETTING(      0x1000, DEF_STR( 2C_1C ) )
1491 	PORT_DIPSETTING(      0x3000, DEF_STR( 1C_1C ) )
1492 	PORT_DIPSETTING(      0x0000, DEF_STR( 2C_3C ) )
1493 	PORT_DIPSETTING(      0x2000, DEF_STR( 1C_2C ) )
1494 	PORT_DIPNAME( 0xc000, 0xc000, DEF_STR( Coin_B ) )
1495 	PORT_DIPSETTING(      0x4000, DEF_STR( 2C_1C ) )
1496 	PORT_DIPSETTING(      0xc000, DEF_STR( 1C_1C ) )
1497 	PORT_DIPSETTING(      0x0000, DEF_STR( 2C_3C ) )
1498 	PORT_DIPSETTING(      0x8000, DEF_STR( 1C_2C ) )
1499 
1500 INPUT_PORTS_END
1501 
1502 
1503 
1504 /***************************************************************************
1505 								Twin Eagle
1506 ***************************************************************************/
1507 
1508 INPUT_PORTS_START( twineagl )
1509 
1510 	PORT_START	// IN0 - Player 1
1511 	JOY_TYPE1_2BUTTONS(1)
1512 
1513 	PORT_START	// IN1 - Player 2
1514 	JOY_TYPE1_2BUTTONS(2)
1515 
1516 	PORT_START	// IN2 - Coins
1517 	PORT_BIT_IMPULSE( 0x0001, IP_ACTIVE_LOW, IPT_COIN1, 5 )
1518 	PORT_BIT_IMPULSE( 0x0002, IP_ACTIVE_LOW, IPT_COIN2, 5 )
1519 	PORT_BIT(  0x0004, IP_ACTIVE_LOW, IPT_START1   )
1520 	PORT_BIT(  0x0008, IP_ACTIVE_LOW, IPT_START2   )
1521 	PORT_BIT(  0x0010, IP_ACTIVE_LOW, IPT_SERVICE1 )
1522 	PORT_BIT(  0x0020, IP_ACTIVE_LOW, IPT_TILT     )
1523 	PORT_BIT(  0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN  )
1524 	PORT_BIT(  0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN  )
1525 
1526 	PORT_START	// IN3 - 2 DSWs - $600001 & 3.b
1527 	PORT_DIPNAME( 0x0001, 0x0001, "Unknown 1-0*" )	// this is merged with 2-6!
1528 	PORT_DIPSETTING(      0x0001, DEF_STR( Off ) )
1529 	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
1530 	PORT_DIPNAME( 0x0002, 0x0002, DEF_STR( Flip_Screen ) )
1531 	PORT_DIPSETTING(      0x0002, DEF_STR( Off ) )
1532 	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
1533 	PORT_SERVICE( 0x0004, IP_ACTIVE_LOW )
1534 	PORT_DIPNAME( 0x0008, 0x0008, DEF_STR( Cabinet ) )
1535 	PORT_DIPSETTING(      0x0000, DEF_STR( Upright ) )
1536 	PORT_DIPSETTING(      0x0008, DEF_STR( Cocktail ) )
1537 	PORT_DIPNAME( 0x0030, 0x0030, DEF_STR( Coin_A ) )
1538 	PORT_DIPSETTING(      0x0010, DEF_STR( 2C_1C ) )
1539 	PORT_DIPSETTING(      0x0030, DEF_STR( 1C_1C ) )
1540 	PORT_DIPSETTING(      0x0000, DEF_STR( 2C_3C ) )
1541 	PORT_DIPSETTING(      0x0020, DEF_STR( 1C_2C ) )
1542 	PORT_DIPNAME( 0x00c0, 0x00c0, DEF_STR( Coin_B ) )
1543 	PORT_DIPSETTING(      0x0040, DEF_STR( 2C_1C ) )
1544 	PORT_DIPSETTING(      0x00c0, DEF_STR( 1C_1C ) )
1545 	PORT_DIPSETTING(      0x0000, DEF_STR( 2C_3C ) )
1546 	PORT_DIPSETTING(      0x0080, DEF_STR( 1C_2C ) )
1547 
1548 	PORT_DIPNAME( 0x0300, 0x0100, DEF_STR( Difficulty ) )
1549 	PORT_DIPSETTING(      0x0300, "Normal"  )
1550 	PORT_DIPSETTING(      0x0200, "Easy"    )
1551 	PORT_DIPSETTING(      0x0100, "Hard"    )
1552 	PORT_DIPSETTING(      0x0000, "Hardest" )
1553 	PORT_DIPNAME( 0x0c00, 0x0c00, DEF_STR( Bonus_Life ) )
1554 	PORT_DIPSETTING(      0x0c00, "Never" )
1555 	PORT_DIPSETTING(      0x0800, "500K Only" )
1556 	PORT_DIPSETTING(      0x0400, "1000K Only" )
1557 	PORT_DIPSETTING(      0x0000, "500K, Every 1500K" )
1558 	PORT_DIPNAME( 0x3000, 0x3000, DEF_STR( Lives ) )
1559 	PORT_DIPSETTING(      0x1000, "1" )
1560 	PORT_DIPSETTING(      0x0000, "2" )
1561 	PORT_DIPSETTING(      0x3000, "3" )
1562 	PORT_DIPSETTING(      0x2000, "5" )
1563 	PORT_DIPNAME( 0x4000, 0x4000, "?Continue Mode?" )
1564 	PORT_DIPSETTING(      0x4000, "1" )
1565 	PORT_DIPSETTING(      0x0000, "2" )
1566 	PORT_DIPNAME( 0x8000, 0x8000, "Coinage Type" )	// not supported
1567 	PORT_DIPSETTING(      0x8000, "1" )
1568 	PORT_DIPSETTING(      0x0000, "2" )
1569 
1570 INPUT_PORTS_END
1571 
1572 
1573 
1574 
1575 /***************************************************************************
1576 								U.S. Classic
1577 ***************************************************************************/
1578 
1579 INPUT_PORTS_START( usclssic )
1580 
1581 #define TRACKBALL(_dir_) \
1582 	PORT_ANALOG( 0x0fff, 0x0000, IPT_TRACKBALL_##_dir_ | IPF_CENTER, 70, 30, 0, 0 )
1583 
1584 	PORT_START	// IN0
1585 	TRACKBALL(X)
1586 	PORT_BIT   ( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN )
1587 	PORT_BIT   ( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN )
1588 	PORT_BIT   ( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN )
1589 	PORT_BIT   ( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN )
1590 
1591 	PORT_START	// IN1
1592 	TRACKBALL(Y)
1593 	PORT_BIT   ( 0x1000, IP_ACTIVE_LOW,  IPT_UNKNOWN )
1594 	PORT_BIT   ( 0x2000, IP_ACTIVE_HIGH, IPT_BUTTON1 )
1595 	PORT_BIT   ( 0x4000, IP_ACTIVE_HIGH, IPT_START1  )
1596 	PORT_BIT   ( 0x8000, IP_ACTIVE_LOW,  IPT_UNKNOWN )
1597 
1598 	PORT_START	// IN2
1599 	PORT_BIT(  0x0001, IP_ACTIVE_LOW,  IPT_UNKNOWN  )	// tested (sound related?)
1600 	PORT_BIT(  0x0002, IP_ACTIVE_LOW,  IPT_UNKNOWN  )
1601 	PORT_BIT(  0x0004, IP_ACTIVE_LOW,  IPT_UNKNOWN  )
1602 	PORT_BIT(  0x0008, IP_ACTIVE_LOW,  IPT_UNKNOWN  )
1603 	PORT_BIT_IMPULSE( 0x0010, IP_ACTIVE_LOW, IPT_COIN1, 5 )
1604 	PORT_BIT_IMPULSE( 0x0020, IP_ACTIVE_LOW, IPT_COIN2, 5 )
1605 	PORT_BIT(  0x0040, IP_ACTIVE_HIGH, IPT_SERVICE1 )
1606 	PORT_BIT(  0x0080, IP_ACTIVE_HIGH, IPT_TILT     )
1607 
1608 	PORT_START	// IN3 - 2 DSWs - $600001 & 3.b
1609 	PORT_DIPNAME( 0x0001, 0x0001, "Credits For 9-Hole" )
1610 	PORT_DIPSETTING(      0x0001, "2" )
1611 	PORT_DIPSETTING(      0x0000, "3" )
1612 	PORT_DIPNAME( 0x0002, 0x0002, "Game Type" )
1613 	PORT_DIPSETTING(      0x0002, "Domestic" )
1614 	PORT_DIPSETTING(      0x0000, "Foreign" )
1615 	PORT_DIPNAME( 0x000c, 0x000c, DEF_STR( Lives ) )
1616 	PORT_DIPSETTING(      0x0004, "1" )
1617 	PORT_DIPSETTING(      0x0008, "2" )
1618 	PORT_DIPSETTING(      0x000c, "3" )
1619 	PORT_DIPSETTING(      0x0000, "4" )
1620 	PORT_DIPNAME( 0x0030, 0x0030, DEF_STR( Coin_A ) )
1621 	PORT_DIPSETTING(      0x0010, DEF_STR( 2C_1C ) )
1622 	PORT_DIPSETTING(      0x0030, DEF_STR( 1C_1C ) )
1623 	PORT_DIPSETTING(      0x0000, DEF_STR( 2C_3C ) )
1624 	PORT_DIPSETTING(      0x0020, DEF_STR( 1C_2C ) )
1625 	PORT_DIPNAME( 0x00c0, 0x00c0, DEF_STR( Coin_B ) )
1626 	PORT_DIPSETTING(      0x0040, DEF_STR( 2C_1C ) )
1627 	PORT_DIPSETTING(      0x00c0, DEF_STR( 1C_1C ) )
1628 	PORT_DIPSETTING(      0x0000, DEF_STR( 2C_3C ) )
1629 	PORT_DIPSETTING(      0x0080, DEF_STR( 1C_2C ) )
1630 
1631 	PORT_DIPNAME( 0x0100, 0x0100, DEF_STR( Cabinet ) )
1632 	PORT_DIPSETTING(      0x0000, DEF_STR( Upright ) )
1633 	PORT_DIPSETTING(      0x0100, DEF_STR( Cocktail ) )
1634 	PORT_DIPNAME( 0x0200, 0x0200, DEF_STR( Flip_Screen ) )
1635 	PORT_DIPSETTING(      0x0200, DEF_STR( Off ) )
1636 	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
1637 	PORT_SERVICE( 0x0400, IP_ACTIVE_LOW )
1638 	PORT_DIPNAME( 0x3800, 0x3800, "Flight Distance" )
1639 	PORT_DIPSETTING(      0x3800, "Normal" )
1640 	PORT_DIPSETTING(      0x3000, "-30 Yards" )
1641 	PORT_DIPSETTING(      0x2800, "+10 Yards" )
1642 	PORT_DIPSETTING(      0x2000, "+20 Yards" )
1643 	PORT_DIPSETTING(      0x1800, "+30 Yards" )
1644 	PORT_DIPSETTING(      0x1000, "+40 Yards" )
1645 	PORT_DIPSETTING(      0x0800, "+50 Yards" )
1646 	PORT_DIPSETTING(      0x0000, "+60 Yards" )
1647 	PORT_DIPNAME( 0xc000, 0xc000, "Licensed To"     )
1648 	PORT_DIPSETTING(      0xc000, "Romstar"       )
1649 	PORT_DIPSETTING(      0x8000, "None (Japan)"  )
1650 	PORT_DIPSETTING(      0x4000, "Taito"         )
1651 	PORT_DIPSETTING(      0x0000, "Taito America" )
1652 
1653 INPUT_PORTS_END
1654 
1655 
1656 
1657 
1658 /***************************************************************************
1659 								Zing Zing Zip
1660 ***************************************************************************/
1661 
1662 INPUT_PORTS_START( zingzip )
1663 
1664 	PORT_START	// IN0 - Player 1 - $400000.w
1665 	JOY_TYPE1_2BUTTONS(1)
1666 
1667 	PORT_START	// IN1 - Player 2 - $400002.w
1668 	JOY_TYPE1_2BUTTONS(2)
1669 
1670 	PORT_START	// IN2 - Coins - $400004.w
1671 	PORT_BIT_IMPULSE( 0x0001, IP_ACTIVE_LOW, IPT_COIN1, 5 )
1672 	PORT_BIT(  0x0002, IP_ACTIVE_LOW, IPT_UNKNOWN  ) // no coin 2
1673 	PORT_BIT(  0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 )
1674 	PORT_BIT(  0x0008, IP_ACTIVE_LOW, IPT_TILT     )
1675 	PORT_BIT(  0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN  )
1676 	PORT_BIT(  0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN  )
1677 	PORT_BIT(  0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN  )
1678 	PORT_BIT(  0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN  )
1679 
1680 	PORT_START	// IN3 - 2 DSWs - $600001 & 3.b
1681 	PORT_DIPNAME( 0x0001, 0x0001, DEF_STR( Flip_Screen ) )
1682 	PORT_DIPSETTING(      0x0001, DEF_STR( Off ) )
1683 	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
1684 	PORT_DIPNAME( 0x0002, 0x0002, DEF_STR( Demo_Sounds ) )
1685 	PORT_DIPSETTING(      0x0000, DEF_STR( Off ) )
1686 	PORT_DIPSETTING(      0x0002, DEF_STR( On ) )
1687 	PORT_DIPNAME( 0x0004, 0x0004, "Unknown 1-2" )	// remaining switches seem unused
1688 	PORT_DIPSETTING(      0x0004, DEF_STR( Off ) )
1689 	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
1690 	PORT_DIPNAME( 0x0008, 0x0008, "Unknown 1-3" )
1691 	PORT_DIPSETTING(      0x0008, DEF_STR( Off ) )
1692 	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
1693 	PORT_DIPNAME( 0x0010, 0x0010, "Unknown 1-4" )
1694 	PORT_DIPSETTING(      0x0010, DEF_STR( Off ) )
1695 	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
1696 	PORT_DIPNAME( 0x0020, 0x0020, "Unknown 1-5" )
1697 	PORT_DIPSETTING(      0x0020, DEF_STR( Off ) )
1698 	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
1699 	PORT_DIPNAME( 0x0040, 0x0040, "Unknown 1-6" )
1700 	PORT_DIPSETTING(      0x0040, DEF_STR( Off ) )
1701 	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
1702 	PORT_SERVICE( 0x0080, IP_ACTIVE_LOW )
1703 
1704 	PORT_DIPNAME( 0x0300, 0x0300, DEF_STR( Lives ) )
1705 	PORT_DIPSETTING(      0x0200, "2" )
1706 	PORT_DIPSETTING(      0x0300, "3" )
1707 	PORT_DIPSETTING(      0x0100, "4" )
1708 	PORT_DIPSETTING(      0x0000, "5" )
1709 	PORT_DIPNAME( 0x0c00, 0x0c00, "Unknown 2-2&3" )
1710 	PORT_DIPSETTING(      0x0800, "01" )
1711 	PORT_DIPSETTING(      0x0c00, "08" )
1712 	PORT_DIPSETTING(      0x0400, "10" )
1713 	PORT_DIPSETTING(      0x0000, "18" )
1714 	PORT_DIPNAME( 0xf000, 0xf000, DEF_STR( Coinage ) )
1715 	PORT_DIPSETTING(      0xa000, DEF_STR( 6C_1C ) )
1716 	PORT_DIPSETTING(      0xb000, DEF_STR( 5C_1C ) )
1717 	PORT_DIPSETTING(      0xc000, DEF_STR( 4C_1C ) )
1718 	PORT_DIPSETTING(      0xd000, DEF_STR( 3C_1C ) )
1719 	PORT_DIPSETTING(      0x1000, DEF_STR( 8C_3C ) )
1720 	PORT_DIPSETTING(      0xe000, DEF_STR( 2C_1C ) )
1721 	PORT_DIPSETTING(      0x2000, DEF_STR( 5C_3C ) )
1722 	PORT_DIPSETTING(      0x3000, DEF_STR( 3C_2C ) )
1723 	PORT_DIPSETTING(      0xf000, DEF_STR( 1C_1C ) )
1724 	PORT_DIPSETTING(      0x4000, DEF_STR( 2C_3C ) )
1725 	PORT_DIPSETTING(      0x9000, DEF_STR( 1C_2C ) )
1726 	PORT_DIPSETTING(      0x8000, DEF_STR( 1C_3C ) )
1727 	PORT_DIPSETTING(      0x7000, DEF_STR( 1C_4C ) )
1728 	PORT_DIPSETTING(      0x6000, DEF_STR( 1C_5C ) )
1729 	PORT_DIPSETTING(      0x5000, DEF_STR( 1C_6C ) )
1730 	PORT_DIPSETTING(      0x0000, DEF_STR( Free_Play ) )
1731 
1732 INPUT_PORTS_END
1733 
1734 
1735 
1736 /***************************************************************************
1737 								War of Aero
1738 ***************************************************************************/
1739 
1740 INPUT_PORTS_START( wrofaero )
1741 
1742 	PORT_START	// IN0 - Player 1 - $400000.w
1743 	JOY_TYPE1_3BUTTONS(1)	// 3rd button selects the weapon
1744 							// when the dsw for cheating is on
1745 
1746 	PORT_START	// IN1 - Player 2 - $400002.w
1747 	JOY_TYPE1_3BUTTONS(2)
1748 
1749 	PORT_START	// IN2 - Coins - $400004.w
1750 	PORT_BIT_IMPULSE( 0x0001, IP_ACTIVE_LOW, IPT_COIN1, 5 )
1751 	PORT_BIT_IMPULSE( 0x0002, IP_ACTIVE_LOW, IPT_COIN2, 5 )
1752 	PORT_BIT(  0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 )
1753 	PORT_BIT(  0x0008, IP_ACTIVE_LOW, IPT_TILT     )
1754 	PORT_BIT(  0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN  )
1755 	PORT_BIT(  0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN  )
1756 	PORT_BIT(  0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN  )
1757 	PORT_BIT(  0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN  )
1758 
1759 	PORT_START	// IN3 - 2 DSWs - $600001 & 3.b
1760 	PORT_DIPNAME( 0x0001, 0x0001, DEF_STR( Flip_Screen ) )
1761 	PORT_DIPSETTING(      0x0001, DEF_STR( Off ) )
1762 	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
1763 	PORT_DIPNAME( 0x0002, 0x0002, "Unknown 1-1*" )	// tested
1764 	PORT_DIPSETTING(      0x0002, DEF_STR( Off ) )
1765 	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
1766 	PORT_DIPNAME( 0x0004, 0x0004, "Unknown 1-2*" )	// tested
1767 	PORT_DIPSETTING(      0x0004, DEF_STR( Off ) )
1768 	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
1769 	PORT_BITX(    0x0008, 0x0008, IPT_DIPSWITCH_NAME | IPF_CHEAT, "Stage & Weapon Select", IP_KEY_NONE, IP_JOY_NONE )	// P2 Start Is Freeze Screen...
1770 	PORT_DIPSETTING(      0x0008, DEF_STR( Off ) )
1771 	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
1772 	PORT_DIPNAME( 0x0010, 0x0010, "Unknown 1-4" )
1773 	PORT_DIPSETTING(      0x0010, DEF_STR( Off ) )
1774 	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
1775 	PORT_DIPNAME( 0x0020, 0x0020, "Unknown 1-5" )
1776 	PORT_DIPSETTING(      0x0020, DEF_STR( Off ) )
1777 	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
1778 	PORT_DIPNAME( 0x0040, 0x0040, "Unknown 1-6" )
1779 	PORT_DIPSETTING(      0x0040, DEF_STR( Off ) )
1780 	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
1781 	PORT_SERVICE( 0x0080, IP_ACTIVE_LOW )
1782 
1783 	PORT_DIPNAME( 0x0300, 0x0300, DEF_STR( Lives ) )
1784 	PORT_DIPSETTING(      0x0200, "2" )
1785 	PORT_DIPSETTING(      0x0300, "3" )
1786 	PORT_DIPSETTING(      0x0100, "4" )
1787 	PORT_DIPSETTING(      0x0000, "5" )
1788 	PORT_DIPNAME( 0x0c00, 0x0c00, "Unknown 2-2&3" )
1789 	PORT_DIPSETTING(      0x0800, "0" )
1790 	PORT_DIPSETTING(      0x0c00, "1" )
1791 	PORT_DIPSETTING(      0x0400, "2" )
1792 	PORT_DIPSETTING(      0x0000, "3" )
1793 	PORT_DIPNAME( 0xf000, 0xf000, DEF_STR( Coinage ) )
1794 	PORT_DIPSETTING(      0xa000, DEF_STR( 6C_1C ) )
1795 	PORT_DIPSETTING(      0xb000, DEF_STR( 5C_1C ) )
1796 	PORT_DIPSETTING(      0xc000, DEF_STR( 4C_1C ) )
1797 	PORT_DIPSETTING(      0xd000, DEF_STR( 3C_1C ) )
1798 	PORT_DIPSETTING(      0x1000, DEF_STR( 8C_3C ) )
1799 	PORT_DIPSETTING(      0xe000, DEF_STR( 2C_1C ) )
1800 	PORT_DIPSETTING(      0x2000, DEF_STR( 5C_3C ) )
1801 	PORT_DIPSETTING(      0x3000, DEF_STR( 3C_2C ) )
1802 	PORT_DIPSETTING(      0xf000, DEF_STR( 1C_1C ) )
1803 	PORT_DIPSETTING(      0x4000, DEF_STR( 2C_3C ) )
1804 	PORT_DIPSETTING(      0x9000, DEF_STR( 1C_2C ) )
1805 	PORT_DIPSETTING(      0x8000, DEF_STR( 1C_3C ) )
1806 	PORT_DIPSETTING(      0x7000, DEF_STR( 1C_4C ) )
1807 	PORT_DIPSETTING(      0x6000, DEF_STR( 1C_5C ) )
1808 	PORT_DIPSETTING(      0x5000, DEF_STR( 1C_6C ) )
1809 	PORT_DIPSETTING(      0x0000, DEF_STR( Free_Play ) )
1810 
1811 
1812 INPUT_PORTS_END
1813 
1814 
1815 
1816 
1817 
1818 
1819 
1820 
1821 /***************************************************************************
1822 
1823 
1824 								Graphics Layouts
1825 
1826 Sprites and layers use 16x16 tile, made of four 8x8 tiles. They can be 4
1827 or 6 planes deep and are stored in a wealth of formats.
1828 
1829 ***************************************************************************/
1830 
1831 						/* First the 4 bit tiles */
1832 
1833 
1834 /* The bitplanes are packed togheter */
1835 static struct GfxLayout layout_packed =
1836 {
1837 	16,16,
1838 	RGN_FRAC(1,1),
1839 	4,
1840 	{2*4,3*4,0*4,1*4},
1841 	{256+128,256+129,256+130,256+131, 256+0,256+1,256+2,256+3,
1842 	 128,129,130,131, 0,1,2,3},
1843 	{0*16,1*16,2*16,3*16,4*16,5*16,6*16,7*16,
1844 	 32*16,33*16,34*16,35*16,36*16,37*16,38*16,39*16},
1845 	16*16*4
1846 };
1847 
1848 
1849 /* The bitplanes are separated */
1850 static struct GfxLayout layout_planes =
1851 {
1852 	16,16,
1853 	RGN_FRAC(1,4),
1854 	4,
1855 	{ RGN_FRAC(3,4), RGN_FRAC(2,4), RGN_FRAC(1,4), RGN_FRAC(0,4) },
1856 	{0,1,2,3,4,5,6,7, 64,65,66,67,68,69,70,71},
1857 	{0*8,1*8,2*8,3*8,4*8,5*8,6*8,7*8,
1858 	 16*8,17*8,18*8,19*8,20*8,21*8,22*8,23*8 },
1859 	16*16*1
1860 };
1861 
1862 
1863 /* The bitplanes are separated (but there are 2 per rom) */
1864 static struct GfxLayout layout_planes_2roms =
1865 {
1866 	16,16,
1867 	RGN_FRAC(1,2),
1868 	4,
1869 	{RGN_FRAC(1,2)+8, RGN_FRAC(1,2)+0, 8, 0},
1870 	{0,1,2,3,4,5,6,7, 128,129,130,131,132,133,134,135},
1871 	{0*16,1*16,2*16,3*16,4*16,5*16,6*16,7*16,
1872 	 16*16,17*16,18*16,19*16,20*16,21*16,22*16,23*16 },
1873 	16*16*2
1874 };
1875 
1876 
1877 /* The bitplanes are separated (but there are 2 per rom).
1878    Each 8x8 tile is additionally split in 2 vertical halves four bits wide,
1879    stored one after the other */
1880 static struct GfxLayout layout_planes_2roms_split =
1881 {
1882 	16,16,
1883 	RGN_FRAC(1,2),
1884 	4,
1885 	{0,4, RGN_FRAC(1,2)+0,RGN_FRAC(1,2)+4},
1886 	{128+64,128+65,128+66,128+67, 128+0,128+1,128+2,128+3,
1887 	 8*8+0,8*8+1,8*8+2,8*8+3, 0,1,2,3},
1888 	{0*8,1*8,2*8,3*8,4*8,5*8,6*8,7*8,
1889 	 32*8,33*8,34*8,35*8,36*8,37*8,38*8,39*8},
1890 	16*16*2
1891 };
1892 
1893 
1894 
1895 
1896 						/* Then the 6 bit tiles */
1897 
1898 
1899 /* The bitplanes are packed together: 3 roms with 2 bits in each */
1900 static struct GfxLayout layout_packed_6bits_3roms =
1901 {
1902 	16,16,
1903 	RGN_FRAC(1,3),
1904 	6,
1905 	{RGN_FRAC(0,3)+0,RGN_FRAC(0,3)+4,  RGN_FRAC(1,3)+0,RGN_FRAC(1,3)+4,  RGN_FRAC(2,3)+0,RGN_FRAC(2,3)+4},
1906 	{128+64,128+65,128+66,128+67, 128+0,128+1,128+2,128+3,
1907 	 64,65,66,67, 0,1,2,3},
1908 	{0*8,1*8,2*8,3*8,4*8,5*8,6*8,7*8,
1909 	 32*8,33*8,34*8,35*8,36*8,37*8,38*8,39*8},
1910 	16*16*2
1911 };
1912 
1913 
1914 /* The bitplanes are packed togheter: 4 bits in one rom, 2 bits in another.
1915    Since there isn't simmetry between the two roms, we load the latter with
1916    ROM_LOAD_GFX_EVEN. This way we can think of it as a 4 planes rom, with the
1917    upper 2 planes unused.	 */
1918 
1919 static struct GfxLayout layout_packed_6bits_2roms =
1920 {
1921 	16,16,
1922 	RGN_FRAC(6,8),	// use 6 of the "8 planes"
1923 	6,
1924 	{RGN_FRAC(4,8), RGN_FRAC(4,8)+1*4, 2*4,3*4,0*4,1*4},
1925 	{256+128,256+129,256+130,256+131, 256+0,256+1,256+2,256+3,
1926 	 128,129,130,131, 0,1,2,3},
1927 	{0*16,1*16,2*16,3*16,4*16,5*16,6*16,7*16,
1928 	 32*16,33*16,34*16,35*16,36*16,37*16,38*16,39*16},
1929 	16*16*4
1930 };
1931 
1932 
1933 
1934 /***************************************************************************
1935 								Blandia
1936 ***************************************************************************/
1937 
1938 static struct GfxDecodeInfo blandia_gfxdecodeinfo[] =
1939 {
1940 	{ REGION_GFX1, 0, &layout_planes,             0,           32 }, // [0] Sprites
1941 	{ REGION_GFX2, 0, &layout_packed_6bits_3roms, 16*32+64*32, 32 }, // [1] Layer 1
1942 	{ REGION_GFX3, 0, &layout_packed_6bits_3roms, 16*32,       32 }, // [2] Layer 2
1943 	{ -1 }
1944 };
1945 
1946 /***************************************************************************
1947 								DownTown
1948 ***************************************************************************/
1949 
1950 static struct GfxDecodeInfo downtown_gfxdecodeinfo[] =
1951 {
1952 	{ REGION_GFX1, 0, &layout_planes,             512*0, 32 }, // [0] Sprites
1953 	{ REGION_GFX2, 0, &layout_planes_2roms_split, 512*0, 32 }, // [1] Layer 1
1954 	{ -1 }
1955 };
1956 
1957 /***************************************************************************
1958 							Mobile Suit Gundam
1959 ***************************************************************************/
1960 
1961 static struct GfxDecodeInfo msgundam_gfxdecodeinfo[] =
1962 {
1963 	{ REGION_GFX1, 0, &layout_planes_2roms, 512*0, 32 }, // [0] Sprites
1964 	{ REGION_GFX2, 0, &layout_packed,       512*2, 32 }, // [1] Layer 1
1965 	{ REGION_GFX3, 0, &layout_packed,       512*1, 32 }, // [2] Layer 2
1966 	{ -1 }
1967 };
1968 
1969 /***************************************************************************
1970 								Thundercade
1971 ***************************************************************************/
1972 
1973 static struct GfxDecodeInfo tndrcade_gfxdecodeinfo[] =
1974 {
1975 	{ REGION_GFX1, 0, &layout_planes_2roms, 512*0, 32 }, // [0] Sprites
1976 	{ -1 }
1977 };
1978 
1979 /***************************************************************************
1980 								U.S. Classic
1981 ***************************************************************************/
1982 
1983 /* 6 bit layer. The colors are still WRONG.
1984    Remeber there's a vh_init_palette */
1985 
1986 static struct GfxDecodeInfo usclssic_gfxdecodeinfo[] =
1987 {
1988 	{ REGION_GFX1, 0, &layout_planes,             512*0+256, 32/2 }, // [0] Sprites
1989 	{ REGION_GFX2, 0, &layout_packed_6bits_3roms, 512*1, 32 }, // [1] Layer 1
1990 	{ -1 }
1991 };
1992 
1993 /***************************************************************************
1994 								Zing Zing Zip
1995 ***************************************************************************/
1996 
1997 static struct GfxDecodeInfo zingzip_gfxdecodeinfo[] =
1998 {
1999 	{ REGION_GFX1, 0, &layout_planes_2roms,       512*0, 32 }, // [0] Sprites
2000 	{ REGION_GFX2, 0, &layout_packed_6bits_2roms, 512*2, 32 }, // [1] Layer 1
2001 	{ REGION_GFX3, 0, &layout_packed,             512*1, 32 }, // [2] Layer 2
2002 	{ -1 }
2003 };
2004 
2005 
2006 
2007 
2008 
2009 
2010 
2011 
2012 
2013 
2014 /***************************************************************************
2015 
2016 								Machine drivers
2017 
2018 ***************************************************************************/
2019 
2020 #define SETA_INTERRUPTS_NUM 2
2021 
seta_interrupt_1_and_2(void)2022 static int seta_interrupt_1_and_2(void)
2023 {
2024 	switch (cpu_getiloops())
2025 	{
2026 		case 0:		return 1;
2027 		case 1:		return 2;
2028 		default:	return ignore_interrupt();
2029 	}
2030 }
2031 
seta_interrupt_2_and_4(void)2032 static int seta_interrupt_2_and_4(void)
2033 {
2034 	switch (cpu_getiloops())
2035 	{
2036 		case 0:		return 2;
2037 		case 1:		return 4;
2038 		default:	return ignore_interrupt();
2039 	}
2040 }
2041 
2042 
2043 #define SETA_SUB_INTERRUPTS_NUM 2
2044 
seta_sub_interrupt(void)2045 static int seta_sub_interrupt(void)
2046 {
2047 	switch (cpu_getiloops())
2048 	{
2049 		case 0:		return nmi_interrupt();
2050 		case 1:		return interrupt();
2051 		default:	return ignore_interrupt();
2052 	}
2053 }
2054 
2055 
2056 /***************************************************************************
2057 								Blandia
2058 ***************************************************************************/
2059 
2060 /*
2061 	Similar to wrofaero, but the layers are 6 planes deep (and
2062 	the pens are strangely mapped to palette entries) + the
2063 	samples are bankswitched
2064 */
2065 
blandia_init_machine(void)2066 void blandia_init_machine(void)
2067 {
2068 	blandia_samples_bank = -1;	// set the samples bank to an out of range value at start-up
2069 }
2070 
2071 static struct MachineDriver machine_driver_blandia =
2072 {
2073 	{
2074 		{
2075 			CPU_M68000,
2076 			16000000,
2077 			wrofaero_readmem, wrofaero_writemem,0,0,
2078 			seta_interrupt_2_and_4, SETA_INTERRUPTS_NUM
2079 		},
2080 	},
2081 	60,DEFAULT_60HZ_VBLANK_DURATION,
2082 	1,
2083 	blandia_init_machine,	/* This game bankswitches the samples */
2084 
2085 	/* video hardware */
2086 	400, 256, { 16, 400-1, 0, 256-16-1 },
2087 	blandia_gfxdecodeinfo,
2088 	16*32+16*32+16*32, 16*32+64*32+64*32,	/* sprites, layer1, layer2 */
2089 	blandia_vh_init_palette,				/* layers 1&2 are 6 planes deep */
2090 	VIDEO_TYPE_RASTER | VIDEO_MODIFIES_PALETTE,
2091 	0,
2092 	seta_vh_start_2_layers,
2093 	0,
2094 	seta_vh_screenrefresh,
2095 
2096 	/* sound hardware */
2097 	0,0,0,0,
2098 	{
2099 		{
2100 			SOUND_CUSTOM,
2101 			&seta_6KHz_interface
2102 		}
2103 	}
2104 };
2105 
2106 
2107 /***************************************************************************
2108 								Caliber 50
2109 ***************************************************************************/
2110 
2111 /*	calibr50 lev 6 = lev 2 + lev 4 !
2112 	Test mode shows a 16ms and 4ms counters. I wonder if every game has
2113 	5 ints per frame */
2114 
2115 #define calibr50_INTERRUPTS_NUM (4+1)
calibr50_interrupt(void)2116 int calibr50_interrupt(void)
2117 {
2118 	switch (cpu_getiloops())
2119 	{
2120 		case 0:
2121 		case 1:
2122 		case 2:
2123 		case 3:		return 4;
2124 
2125 		case 4:		return 2;
2126 
2127 		default:	return ignore_interrupt();
2128 	}
2129 }
2130 
2131 
2132 static struct MachineDriver machine_driver_calibr50 =
2133 {
2134 	{
2135 		{
2136 			CPU_M68000,
2137 			8000000,
2138 			calibr50_readmem, calibr50_writemem,0,0,
2139 			calibr50_interrupt, calibr50_INTERRUPTS_NUM
2140 		},
2141 		{
2142 			CPU_M65C02,
2143 			1000000,	/* ?? */
2144 			calibr50_sub_readmem, calibr50_sub_writemem,0,0,
2145 			interrupt, 1	/* NMI caused by main cpu when writing to the sound latch */
2146 		},
2147 	},
2148 	60,DEFAULT_60HZ_VBLANK_DURATION,
2149 	1,
2150 	0,
2151 
2152 	/* video hardware */
2153 	400, 256, { 16, 400-1, 0, 256-16-1 },
2154 	downtown_gfxdecodeinfo,
2155 	512, 512,
2156 	0,
2157 	VIDEO_TYPE_RASTER | VIDEO_MODIFIES_PALETTE,
2158 	0,
2159 //	seta_vh_start_1_layer,
2160 	seta_vh_start_1_layer_offset_0x02,	// a little offset
2161 	0,
2162 	seta_vh_screenrefresh,
2163 
2164 	/* sound hardware */
2165 	0,0,0,0,
2166 	{
2167 		{
2168 			SOUND_CUSTOM,
2169 			&seta_4KHz_interface
2170 		}
2171 	}
2172 };
2173 
2174 
2175 /***************************************************************************
2176 								DownTown
2177 ***************************************************************************/
2178 
2179 /* downtown lev 3 = lev 2 + lev 1 ! */
2180 
2181 static struct MachineDriver machine_driver_downtown =
2182 {
2183 	{
2184 		{
2185 			CPU_M68000,
2186 			8000000,
2187 			downtown_readmem, downtown_writemem,0,0,
2188 			m68_level3_irq, 1
2189 		},
2190 		{
2191 			CPU_M65C02,
2192 			1000000,	/* ?? */
2193 			downtown_sub_readmem, downtown_sub_writemem,0,0,
2194 			seta_sub_interrupt, SETA_SUB_INTERRUPTS_NUM
2195 		},
2196 	},
2197 	60,DEFAULT_60HZ_VBLANK_DURATION,
2198 	1,
2199 	0,
2200 
2201 	/* video hardware */
2202 	400, 256, { 16, 400-1, 0, 256-16-1 },
2203 	downtown_gfxdecodeinfo,
2204 	512, 512,
2205 	0,
2206 	VIDEO_TYPE_RASTER | VIDEO_MODIFIES_PALETTE,
2207 	0,
2208 	seta_vh_start_1_layer,
2209 	0,
2210 	seta_vh_screenrefresh,
2211 
2212 	/* sound hardware */
2213 	0,0,0,0,
2214 	{
2215 		{
2216 			SOUND_CUSTOM,
2217 			&seta_4KHz_interface
2218 		}
2219 	}
2220 };
2221 
2222 
2223 
2224 /***************************************************************************
2225 								Dragon Unit
2226 ***************************************************************************/
2227 
2228 /* Like downtown but without the sub cpu?? */
2229 
2230 /* drgnunit lev 1 == lev 3 (writes to $500000)
2231    lev 2 drives the game */
2232 
2233 static struct MachineDriver machine_driver_drgnunit =
2234 {
2235 	{
2236 		{
2237 			CPU_M68000,
2238 			8000000,
2239 			downtown_readmem, downtown_writemem,0,0,
2240 			seta_interrupt_1_and_2, SETA_INTERRUPTS_NUM
2241 		},
2242 	},
2243 	60,DEFAULT_60HZ_VBLANK_DURATION,
2244 	1,
2245 	0,
2246 
2247 	/* video hardware */
2248 	400, 256, { 16, 400-1, 0, 256-16-1 },
2249 	downtown_gfxdecodeinfo,
2250 	512, 512,
2251 	0,
2252 	VIDEO_TYPE_RASTER | VIDEO_MODIFIES_PALETTE,
2253 	0,
2254 //	seta_vh_start_1_layer,
2255 	seta_vh_start_1_layer_offset_0x02,	// a little offset
2256 	0,
2257 	seta_vh_screenrefresh,
2258 
2259 	/* sound hardware */
2260 	0,0,0,0,
2261 	{
2262 		{
2263 			SOUND_CUSTOM,
2264 			&seta_4KHz_interface
2265 		}
2266 	}
2267 };
2268 
2269 
2270 /***************************************************************************
2271 								Meta Fox
2272 ***************************************************************************/
2273 
2274 /* metafox lev 3 = lev 2 + lev 1 ! */
2275 
2276 static struct MachineDriver machine_driver_metafox =
2277 {
2278 	{
2279 		{
2280 			CPU_M68000,
2281 			8000000,
2282 			downtown_readmem, downtown_writemem,0,0,
2283 			m68_level3_irq, 1
2284 		},
2285 		{
2286 			CPU_M65C02,
2287 			1000000,	/* ?? */
2288 			metafox_sub_readmem, metafox_sub_writemem,0,0,
2289 			seta_sub_interrupt, SETA_SUB_INTERRUPTS_NUM
2290 		},
2291 	},
2292 	60,DEFAULT_60HZ_VBLANK_DURATION,
2293 	1,
2294 	0,
2295 
2296 	/* video hardware */
2297 	400, 256, { 16, 400-1, 0, 256-8-16-1 },
2298 	downtown_gfxdecodeinfo,
2299 	512, 512,
2300 	0,
2301 	VIDEO_TYPE_RASTER | VIDEO_MODIFIES_PALETTE,
2302 	0,
2303 	seta_vh_start_1_layer,
2304 	0,
2305 	seta_vh_screenrefresh,
2306 
2307 	/* sound hardware */
2308 	0,0,0,0,
2309 	{
2310 		{
2311 			SOUND_CUSTOM,
2312 			&seta_4KHz_interface
2313 		}
2314 	}
2315 };
2316 
2317 
2318 
2319 /***************************************************************************
2320 							Mobile Suit Gundam
2321 ***************************************************************************/
2322 
2323 /* msgundam lev 2 == lev 6 ! */
2324 
2325 static struct MachineDriver machine_driver_msgundam =
2326 {
2327 	{
2328 		{
2329 			CPU_M68000,
2330 			16000000,
2331 			msgundam_readmem, msgundam_writemem,0,0,
2332 			seta_interrupt_2_and_4, SETA_INTERRUPTS_NUM
2333 		},
2334 	},
2335 	60,DEFAULT_60HZ_VBLANK_DURATION,
2336 	1,
2337 	0,
2338 
2339 	/* video hardware */
2340 	400, 256, { 16, 400-1, 0, 256-16-1 },
2341 	msgundam_gfxdecodeinfo,
2342 	512 * 3, 512 * 3,	/* sprites, layer2, layer1 */
2343 	0,
2344 	VIDEO_TYPE_RASTER | VIDEO_MODIFIES_PALETTE,
2345 	0,
2346 	seta_vh_start_2_layers,
2347 	0,
2348 	seta_vh_screenrefresh,
2349 
2350 	/* sound hardware */
2351 	0,0,0,0,
2352 	{
2353 		{
2354 			SOUND_CUSTOM,
2355 			&seta_6KHz_interface
2356 		}
2357 	}
2358 };
2359 
2360 
2361 
2362 /***************************************************************************
2363 								Thundercade
2364 ***************************************************************************/
2365 
READ_HANDLER(dsw1_r)2366 static READ_HANDLER( dsw1_r )
2367 {
2368 	return (readinputport(3) >> 8) & 0xff;
2369 }
2370 
READ_HANDLER(dsw2_r)2371 static READ_HANDLER( dsw2_r )
2372 {
2373 	return (readinputport(3) >> 0) & 0xff;
2374 }
2375 
2376 /*static void irq_handler(int irq)
2377 {
2378 	cpu_set_irq_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE);
2379 }*/
2380 
2381 static struct YM2203interface tndrcade_ym2203_interface =
2382 {
2383 	1,
2384 	2000000,		/* ? */
2385 	{ YM2203_VOL(50,50) },
2386 	{ dsw1_r },		/* input A: DSW 1 */
2387 	{ dsw2_r },		/* input B: DSW 2 */
2388 	{ 0 },
2389 	{ 0 },
2390 //	{ irq_handler }
2391 };
2392 
2393 static struct YM3812interface ym3812_interface =
2394 {
2395 	1,
2396 	4000000,	/* ? */
2397 	{ 80,80 },	/* mixing level */
2398 //	{ irq_handler },
2399 };
2400 
2401 
2402 #define TNDRCADE_SUB_INTERRUPTS_NUM 			1+16
tndrcade_sub_interrupt(void)2403 static int tndrcade_sub_interrupt(void)
2404 {
2405 	switch (cpu_getiloops())
2406 	{
2407 		case 0:		return nmi_interrupt();
2408 		default:	return interrupt();
2409 	}
2410 }
2411 
2412 static struct MachineDriver machine_driver_tndrcade =
2413 {
2414 	{
2415 		{
2416 			CPU_M68000,
2417 			8000000,
2418 			tndrcade_readmem, tndrcade_writemem,0,0,
2419 			m68_level2_irq, 1
2420 		},
2421 		{
2422 			CPU_M65C02,
2423 			2000000,	/* ?? */
2424 			tndrcade_sub_readmem, tndrcade_sub_writemem,0,0,
2425 			tndrcade_sub_interrupt, TNDRCADE_SUB_INTERRUPTS_NUM
2426 		},
2427 	},
2428 	60,DEFAULT_60HZ_VBLANK_DURATION,
2429 	1,
2430 	0,
2431 
2432 	/* video hardware */
2433 //	400, 256, { 16, 400-1, 0, 256-16-1 },
2434 	400, 256, { 16, 400-1, 0+8, 256-16-8-1 },
2435 	tndrcade_gfxdecodeinfo,
2436 	512, 512,	/* sprites only */
2437 	0,
2438 	VIDEO_TYPE_RASTER | VIDEO_MODIFIES_PALETTE,
2439 	0,
2440 	0,	/* no need for a vh_start: no tilemaps */
2441 	0,
2442 	seta_vh_screenrefresh_no_layers, /* just draw the sprites */
2443 
2444 	/* sound hardware */
2445 	0,0,0,0,
2446 	{
2447 		{
2448 			SOUND_YM2203,
2449 			&tndrcade_ym2203_interface
2450 		},
2451 		{
2452 			SOUND_YM3812,
2453 			&ym3812_interface
2454 		}
2455 	}
2456 };
2457 
2458 
2459 
2460 /***************************************************************************
2461 								Twin Eagle
2462 ***************************************************************************/
2463 
2464 /* Just like metafox, but:
2465    the sub cpu reads the ip at different locations,
2466    the samples need a different playback rate,
2467    the visible area seems different. */
2468 
2469 static struct MachineDriver machine_driver_twineagl =
2470 {
2471 	{
2472 		{
2473 			CPU_M68000,
2474 			8000000,
2475 			downtown_readmem, downtown_writemem,0,0,
2476 			m68_level3_irq, 1
2477 		},
2478 		{
2479 			CPU_M65C02,
2480 			1000000,	/* ?? */
2481 			twineagl_sub_readmem, twineagl_sub_writemem,0,0,
2482 			seta_sub_interrupt, SETA_SUB_INTERRUPTS_NUM
2483 		},
2484 	},
2485 	60,DEFAULT_60HZ_VBLANK_DURATION,
2486 	1,
2487 	0,
2488 
2489 	/* video hardware */
2490 //	400, 256, { 16, 400-1, 0, 256-16-1 },
2491 	400, 256, { 16, 400-1, 0+8, 256-16-1-8 },
2492 	downtown_gfxdecodeinfo,
2493 	512, 512,
2494 	0,
2495 	VIDEO_TYPE_RASTER | VIDEO_MODIFIES_PALETTE,
2496 	0,
2497 	seta_vh_start_1_layer,
2498 	0,
2499 	seta_vh_screenrefresh,
2500 
2501 	/* sound hardware */
2502 	0,0,0,0,
2503 	{
2504 		{
2505 			SOUND_CUSTOM,
2506 			&seta_8KHz_interface
2507 		}
2508 	}
2509 };
2510 
2511 
2512 /***************************************************************************
2513 								U.S. Classic
2514 ***************************************************************************/
2515 
2516 
2517 /*	usclssic lev 6 = lev 2+4 !
2518 	Test mode shows a 16ms and 4ms counters. I wonder if every game has
2519 	5 ints per frame
2520 */
2521 
2522 static struct MachineDriver machine_driver_usclssic =
2523 {
2524 	{
2525 		{
2526 			CPU_M68000,
2527 			8000000,
2528 			usclssic_readmem, usclssic_writemem,0,0,
2529 			calibr50_interrupt, calibr50_INTERRUPTS_NUM
2530 		},
2531 		{
2532 			CPU_M65C02,
2533 			1000000,	/* ?? */
2534 			calibr50_sub_readmem, calibr50_sub_writemem,0,0,
2535 			interrupt, 1	/* NMI caused by main cpu when writing to the sound latch */
2536 		},
2537 	},
2538 	60,DEFAULT_60HZ_VBLANK_DURATION,
2539 	1,
2540 	0,
2541 
2542 	/* video hardware */
2543 	400, 256, { 16, 400-1, 0, 256-16-1 },
2544 	usclssic_gfxdecodeinfo,
2545 	16*32, 16*32 + 64*32,		/* sprites, layer */
2546 	usclssic_vh_init_palette,	/* layer is 6 planes deep */
2547 	VIDEO_TYPE_RASTER | VIDEO_MODIFIES_PALETTE,
2548 	0,
2549 	seta_vh_start_1_layer,
2550 	0,
2551 	seta_vh_screenrefresh,
2552 
2553 	/* sound hardware */
2554 	0,0,0,0,
2555 	{
2556 		{
2557 			SOUND_CUSTOM,
2558 			&seta_4KHz_interface
2559 		}
2560 	}
2561 };
2562 
2563 
2564 /***************************************************************************
2565 								War of Aero
2566 ***************************************************************************/
2567 
2568 /* wrofaero lev 2 almost identical to lev 6, but there's an additional
2569    call in the latter (sound related?) */
2570 
2571 static struct MachineDriver machine_driver_wrofaero =
2572 {
2573 	{
2574 		{
2575 			CPU_M68000,
2576 			16000000,
2577 			wrofaero_readmem, wrofaero_writemem,0,0,
2578 			m68_level6_irq, 1
2579 		},
2580 	},
2581 	60,DEFAULT_60HZ_VBLANK_DURATION,
2582 	1,
2583 	0,
2584 
2585 	/* video hardware */
2586 	400, 256, { 16, 400-1, 0, 256-16-1 },
2587 	msgundam_gfxdecodeinfo,
2588 	512 * 3, 512 * 3,	/* sprites, layer1, layer2 */
2589 	0,
2590 	VIDEO_TYPE_RASTER | VIDEO_MODIFIES_PALETTE,
2591 	0,
2592 	seta_vh_start_2_layers,
2593 	0,
2594 	seta_vh_screenrefresh,
2595 
2596 	/* sound hardware */
2597 	0,0,0,0,
2598 	{
2599 		{
2600 			SOUND_CUSTOM,
2601 			&seta_6KHz_interface
2602 		}
2603 	}
2604 };
2605 
2606 
2607 
2608 
2609 /***************************************************************************
2610 								Zing Zing Zip
2611 ***************************************************************************/
2612 
2613 /* zingzip lev 3 = lev 2 + lev 1 !
2614    SR = 2100 -> lev1 is ignored so we must supply int 3, since the routine
2615    at int 1 is necessary: it plays the background music.
2616  */
2617 
2618 static struct MachineDriver machine_driver_zingzip =
2619 {
2620 	{
2621 		{
2622 			CPU_M68000,
2623 			16000000,
2624 			wrofaero_readmem, wrofaero_writemem,0,0,
2625 			m68_level3_irq, 1
2626 		},
2627 	},
2628 	60,DEFAULT_60HZ_VBLANK_DURATION,
2629 	1,
2630 	0,
2631 
2632 	/* video hardware */
2633 	400, 256, { 16, 400-1, 0, 256-16-1 },
2634 	zingzip_gfxdecodeinfo,
2635 	16*32+16*32+16*32, 16*32+16*32+64*32,	/* sprites, layer2, layer1 */
2636 	zingzip_vh_init_palette,				/* layer 1 gfx is 6 planes deep */
2637 	VIDEO_TYPE_RASTER | VIDEO_MODIFIES_PALETTE,
2638 	0,
2639 	seta_vh_start_2_layers,
2640 	0,
2641 	seta_vh_screenrefresh,
2642 
2643 	/* sound hardware */
2644 	0,0,0,0,
2645 	{
2646 		{
2647 			SOUND_CUSTOM,
2648 			&seta_6KHz_interface
2649 		}
2650 	}
2651 };
2652 
2653 
2654 
2655 
2656 
2657 /***************************************************************************
2658 
2659 
2660 								ROMs Loading
2661 
2662 
2663 ***************************************************************************/
2664 
2665 
2666 
2667 
2668 /***************************************************************************
2669 
2670 								Arbalester
2671 
2672 ***************************************************************************/
2673 
2674 ROM_START( arbalest )
2675 
2676 	ROM_REGION( 0x080000, REGION_CPU1 )		/* 68000 Code */
2677 	ROM_LOAD_EVEN( "uk001.03",  0x000000, 0x040000, 0xee878a2c )
2678 	ROM_LOAD_ODD(  "uk001.04",  0x000000, 0x040000, 0x902bb4e3 )
2679 
2680 	ROM_REGION( 0x010000, REGION_CPU2 )		/* 65c02 Code */
2681 	ROM_LOAD( "uk001.05", 0x006000, 0x002000, 0x0339fc53 )
2682 	ROM_RELOAD(           0x008000, 0x002000  )
2683 	ROM_RELOAD(           0x00a000, 0x002000  )
2684 	ROM_RELOAD(           0x00c000, 0x002000  )
2685 	ROM_RELOAD(           0x00e000, 0x002000  )
2686 
2687 	ROM_REGION( 0x100000, REGION_GFX1 | REGIONFLAG_DISPOSE )	/* Sprites */
2688 	ROM_LOAD( "uk001.06", 0x000000, 0x040000, 0x11c75746 )
2689 	ROM_LOAD( "uk001.07", 0x040000, 0x040000, 0x01b166c7 )
2690 	ROM_LOAD( "uk001.08", 0x080000, 0x040000, 0x78d60ba3 )
2691 	ROM_LOAD( "uk001.09", 0x0c0000, 0x040000, 0xb4748ae0 )
2692 
2693 	ROM_REGION( 0x200000, REGION_GFX2 | REGIONFLAG_DISPOSE )	/* Layer 1 */
2694 	ROM_LOAD( "uk001.10", 0x000000, 0x080000, 0xc1e2f823 )
2695 	ROM_LOAD( "uk001.11", 0x080000, 0x080000, 0x09dfe56a )
2696 	ROM_LOAD( "uk001.12", 0x100000, 0x080000, 0x818a4085 )
2697 	ROM_LOAD( "uk001.13", 0x180000, 0x080000, 0x771fa164 )
2698 
2699 	ROM_REGION( 0x100000, REGION_SOUND1 )	/* Samples */
2700 	ROM_LOAD( "uk001.15", 0x000000, 0x080000, 0xce9df5dd )
2701 	ROM_LOAD( "uk001.14", 0x080000, 0x080000, 0x016b844a )
2702 
2703 ROM_END
2704 
READ_HANDLER(arbalest_protection_r)2705 READ_HANDLER( arbalest_protection_r )
2706 {
2707 	return 0;
2708 }
2709 
init_arbalest(void)2710 void init_arbalest(void)
2711 {
2712 	install_mem_read_handler(0, 0x80000, 0x8000f, arbalest_protection_r);
2713 }
2714 
2715 
2716 
2717 
2718 /***************************************************************************
2719 
2720 								Blandia [Prototype]
2721 
2722 PCB:	P0-072-2
2723 CPU:	68000-16
2724 Sound:	X1-010
2725 OSC:	16.0000MHz
2726 
2727 Chips:	X1-001A		X1-004					X1-011 x2
2728 		X1-002A		X1-007		X1-010		X1-012 x2
2729 
2730 ***************************************************************************/
2731 
2732 ROM_START( blandia )
2733 
2734 	ROM_REGION( 0x200000, REGION_CPU1 )		/* 68000 Code */
2735 	ROM_LOAD_EVEN( "prg-even.bin", 0x000000, 0x040000, 0x7ecd30e8 )
2736 	ROM_LOAD_ODD(  "prg-odd.bin",  0x000000, 0x040000, 0x42b86c15 )
2737 	ROM_LOAD_EVEN( "tbl0.bin",     0x100000, 0x080000, 0x69b79eb8 )
2738 	ROM_LOAD_ODD(  "tbl1.bin",     0x100000, 0x080000, 0xcf2fd350 )
2739 
2740 	ROM_REGION( 0x400000, REGION_GFX1 | REGIONFLAG_DISPOSE )	/* Sprites */
2741 	ROM_LOAD( "o-1.bin",  0x000000, 0x080000, 0x4c67b7f0 )
2742 	ROM_LOAD( "o-5.bin",  0x080000, 0x080000, 0x40bee78b )
2743 	ROM_LOAD( "o-0.bin",  0x100000, 0x080000, 0x5e7b8555 )
2744 	ROM_LOAD( "o-4.bin",  0x180000, 0x080000, 0x7c634784 )
2745 	ROM_LOAD( "o-3.bin",  0x200000, 0x080000, 0x387fc7c4 )
2746 	ROM_LOAD( "o-7.bin",  0x280000, 0x080000, 0xfc77b04a )
2747 	ROM_LOAD( "o-2.bin",  0x300000, 0x080000, 0xc669bb49 )
2748 	ROM_LOAD( "o-6.bin",  0x380000, 0x080000, 0x92882943 )
2749 
2750 	ROM_REGION( 0x0c0000, REGION_GFX2 | REGIONFLAG_DISPOSE )	/* Layer 1 */
2751 	ROM_LOAD( "v1-2.bin",  0x000000, 0x020000, 0xd524735e )
2752 	ROM_LOAD( "v1-5.bin",  0x020000, 0x020000, 0xeb440cdb )
2753 	ROM_LOAD( "v1-1.bin",  0x040000, 0x020000, 0x09bdf75f )
2754 	ROM_LOAD( "v1-4.bin",  0x060000, 0x020000, 0x803911e5 )
2755 	ROM_LOAD( "v1-0.bin",  0x080000, 0x020000, 0x73617548 )
2756 	ROM_LOAD( "v1-3.bin",  0x0a0000, 0x020000, 0x7f18e4fb )
2757 
2758 	ROM_REGION( 0x0c0000, REGION_GFX3 | REGIONFLAG_DISPOSE )	/* Layer 2 */
2759 	ROM_LOAD( "v2-2.bin",  0x000000, 0x020000, 0xc4f15638 )	// identical to v2-1
2760 	ROM_LOAD( "v2-5.bin",  0x020000, 0x020000, 0xc2e57622 )
2761 	ROM_LOAD( "v2-1.bin",  0x040000, 0x020000, 0xc4f15638 )
2762 	ROM_LOAD( "v2-4.bin",  0x060000, 0x020000, 0x16ec2130 )
2763 	ROM_LOAD( "v2-0.bin",  0x080000, 0x020000, 0x5b05eba9 )
2764 	ROM_LOAD( "v2-3.bin",  0x0a0000, 0x020000, 0x80ad0c3b )
2765 
2766 	/* 6KHz? The c0000-fffff region is bankswitched */
2767 	ROM_REGION( 0x240000, REGION_SOUND1 )	/* Samples */
2768 	ROM_LOAD( "s-0.bin",  0x000000, 0x020000, 0xa5fde408 )
2769 	ROM_CONTINUE(         0x140000, 0x020000             )
2770 	ROM_LOAD( "s-1.bin",  0x020000, 0x020000, 0x3083f9c4 )
2771 	ROM_CONTINUE(         0x160000, 0x020000             )
2772 	ROM_LOAD( "s-2.bin",  0x040000, 0x020000, 0xa591c9ef )
2773 	ROM_CONTINUE(         0x180000, 0x020000             )
2774 	ROM_LOAD( "s-3.bin",  0x060000, 0x020000, 0x68826c9d )
2775 	ROM_CONTINUE(         0x1a0000, 0x020000             )
2776 	ROM_LOAD( "s-4.bin",  0x080000, 0x020000, 0x1c7dc8c2 )
2777 	ROM_CONTINUE(         0x1c0000, 0x020000             )
2778 	ROM_LOAD( "s-5.bin",  0x0a0000, 0x020000, 0x4bb0146a )
2779 	ROM_CONTINUE(         0x1e0000, 0x020000             )
2780 	ROM_LOAD( "s-6.bin",  0x100000, 0x020000, 0x9f8f34ee )	// skip c0000-fffff (banked region)
2781 	ROM_CONTINUE(         0x200000, 0x020000             )	// this half is 0
2782 	ROM_LOAD( "s-7.bin",  0x120000, 0x020000, 0xe077dd39 )
2783 	ROM_CONTINUE(         0x220000, 0x020000             )	// this half is 0
2784 
2785 ROM_END
2786 
2787 
2788 
2789 /***************************************************************************
2790 
2791 								Caliber 50
2792 
2793 CPU:   TMP 68000N-8, 65C02
2794 Other: NEC D4701
2795 
2796 UH-001-006        SW2  SW1
2797 UH-001-007
2798 UH-001-008                    8464         68000-8
2799 UH-001-009  X1-002A X1-001A   8464         Uh-002-001=T01
2800 UH-001-010                    8464            51832
2801 UH-001-011                    8464            51832
2802                                            UH-001-002
2803 UH-001-012            X1-012               UH-001-003
2804 UH-001-013                               UH-002-004-T02
2805                       X1-011               5116-10
2806                                            BAT
2807                          16MHz
2808              X1-010   65C02      X1-006
2809                       UH-001-005 X1-007
2810                       4701       X1-004
2811 
2812 
2813 ***************************************************************************/
2814 
2815 ROM_START( calibr50 )
2816 
2817 	ROM_REGION( 0x0a0000, REGION_CPU1 )		/* 68000 Code */
2818 	ROM_LOAD_EVEN( "uh002001.u45", 0x000000, 0x040000, 0xeb92e7ed )
2819 	ROM_LOAD_ODD(  "uh002004.u41", 0x000000, 0x040000, 0x5a0ed31e )
2820 	ROM_LOAD_EVEN( "uh001003.9a",  0x080000, 0x010000, 0x0d30d09f )
2821 	ROM_LOAD_ODD(  "uh001002.7a",  0x080000, 0x010000, 0x7aecc3f9 )
2822 
2823 	ROM_REGION( 0x04c000, REGION_CPU2 )		/* 65c02 Code */
2824 	ROM_LOAD( "uh001005.u61", 0x004000, 0x040000, 0x4a54c085 )
2825 	ROM_RELOAD(               0x00c000, 0x040000             )
2826 
2827 	ROM_REGION( 0x200000, REGION_GFX1 | REGIONFLAG_DISPOSE )	/* Sprites */
2828 	ROM_LOAD( "uh001006.ux2", 0x000000, 0x080000, 0xfff52f91 )
2829 	ROM_LOAD( "uh001007.ux1", 0x080000, 0x080000, 0xb6c19f71 )
2830 	ROM_LOAD( "uh001008.ux6", 0x100000, 0x080000, 0x7aae07ef )
2831 	ROM_LOAD( "uh001009.ux0", 0x180000, 0x080000, 0xf85da2c5 )
2832 
2833 	ROM_REGION( 0x100000, REGION_GFX2 | REGIONFLAG_DISPOSE )	/* Layer 1 */
2834 	ROM_LOAD( "uh001010.u3x", 0x000000, 0x080000, 0xf986577a )
2835 	ROM_LOAD( "uh001011.u50", 0x080000, 0x080000, 0x08620052 )
2836 
2837 	/* 4KHz? */
2838 	ROM_REGION( 0x100000, REGION_SOUND1 )	/* Samples */
2839 	ROM_LOAD( "uh001013.u60", 0x000000, 0x080000, 0x09ec0df6 )
2840 	ROM_LOAD( "uh001012.u46", 0x080000, 0x080000, 0xbb996547 )
2841 
2842 ROM_END
2843 
2844 
2845 /***************************************************************************
2846 
2847 								DownTown
2848 
2849 ***************************************************************************/
2850 
2851 ROM_START( downtown )
2852 
2853 	ROM_REGION( 0x0a0000, REGION_CPU1 )		/* 68000 Code */
2854 	ROM_LOAD_EVEN( "ud2001.000", 0x000000, 0x040000, 0xf1965260 )
2855 	ROM_LOAD_ODD(  "ud2001.003", 0x000000, 0x040000, 0xe7d5fa5f )
2856 	ROM_LOAD_EVEN( "ud2000.002", 0x080000, 0x010000, 0xca976b24 )
2857 	ROM_LOAD_ODD(  "ud2000.001", 0x080000, 0x010000, 0x1708aebd )
2858 
2859 	ROM_REGION( 0x04c000, REGION_CPU2 )		/* 65c02 Code */
2860 	ROM_LOAD( "ud2002.004", 0x004000, 0x040000, 0xbbd538b1 )
2861 	ROM_RELOAD(             0x00c000, 0x040000             )
2862 
2863 	ROM_REGION( 0x200000, REGION_GFX1 | REGIONFLAG_DISPOSE )	/* Sprites */
2864 	ROM_LOAD( "ud2005.t01", 0x000000, 0x080000, 0x77e6d249 )
2865 	ROM_LOAD( "ud2006.t02", 0x080000, 0x080000, 0x6e381bf2 )
2866 	ROM_LOAD( "ud2007.t03", 0x100000, 0x080000, 0x737b4971 )
2867 	ROM_LOAD( "ud2008.t04", 0x180000, 0x080000, 0x99b9d757 )
2868 
2869 	ROM_REGION( 0x100000, REGION_GFX2 | REGIONFLAG_DISPOSE )	/* Layer 1 */
2870 	ROM_LOAD( "ud2009.t05", 0x000000, 0x080000, 0xaee6c581 )
2871 	ROM_LOAD( "ud2010.t06", 0x080000, 0x080000, 0x3d399d54 )
2872 
2873 	/* 4KHz? */
2874 	ROM_REGION( 0x080000, REGION_SOUND1 )	/* Samples */
2875 	ROM_LOAD( "ud2011.t07", 0x000000, 0x080000, 0x9c9ff69f )
2876 
2877 ROM_END
2878 
2879 
2880 /* Protection. NVRAM is handled writing commands here */
2881 unsigned char downtown_protection[0x200];
READ_HANDLER(downtown_protection_r)2882 static READ_HANDLER( downtown_protection_r )
2883 {
2884 	int job = READ_WORD(&downtown_protection[0xf8]) & 0xff;
2885 
2886 	switch (job)
2887 	{
2888 		case 0xa3:
2889 		{
2890 			char word[] = "WALTZ0";
2891 			if (offset >= 0x100 && offset <= 0x10a)	return word[(offset-0x100)/2];
2892 			else									return 0;
2893 		}
2894 		default:
2895 			return READ_WORD(&downtown_protection[offset]) & 0xff;
2896 	}
2897 }
WRITE_HANDLER(downtown_protection_w)2898 static WRITE_HANDLER( downtown_protection_w )
2899 {
2900 	COMBINE_WORD_MEM(&downtown_protection[offset], data);
2901 }
2902 
init_downtown(void)2903 void init_downtown(void)
2904 {
2905 	install_mem_read_handler (0, 0x200000, 0x2001ff, downtown_protection_r);
2906 	install_mem_write_handler(0, 0x200000, 0x2001ff, downtown_protection_w);
2907 }
2908 
2909 
2910 
2911 
2912 /***************************************************************************
2913 
2914 								Dragon Unit
2915 					 [Prototype of "Castle Of Dragon"]
2916 
2917 PCB:	P0-053-1
2918 CPU:	68000-8
2919 Sound:	X1-010
2920 OSC:	16.0000MHz
2921 
2922 Chips:	X1-001A, X1-002A, X1-004, X1-006, X1-007, X1-010, X1-011, X1-012
2923 
2924 ***************************************************************************/
2925 
2926 ROM_START( drgnunit )
2927 
2928 	ROM_REGION( 0x040000, REGION_CPU1 )		/* 68000 Code */
2929 	ROM_LOAD_EVEN( "prg-e.bin", 0x000000, 0x020000, 0x728447df )
2930 	ROM_LOAD_ODD(  "prg-o.bin", 0x000000, 0x020000, 0xb2f58ecf )
2931 
2932 	ROM_REGION( 0x100000, REGION_GFX1 | REGIONFLAG_DISPOSE )	/* Sprites */
2933 	ROM_LOAD( "obj-2.bin", 0x000000, 0x020000, 0xd7f6ab5a )
2934 	ROM_LOAD( "obj-6.bin", 0x020000, 0x020000, 0x80b801f7 )
2935 	ROM_LOAD( "obj-1.bin", 0x040000, 0x020000, 0x53a95b13 )
2936 	ROM_LOAD( "obj-5.bin", 0x060000, 0x020000, 0x6b87bc20 )
2937 	ROM_LOAD( "obj-4.bin", 0x080000, 0x020000, 0x60d17771 )
2938 	ROM_LOAD( "obj-8.bin", 0x0a0000, 0x020000, 0x826c1543 )
2939 	ROM_LOAD( "obj-3.bin", 0x0c0000, 0x020000, 0x0bccd4d5 )
2940 	ROM_LOAD( "obj-7.bin", 0x0e0000, 0x020000, 0xcbaa7f6a )
2941 
2942 	ROM_REGION( 0x100000, REGION_GFX2 | REGIONFLAG_DISPOSE )	/* Layer 1 */
2943 	ROM_LOAD( "scr-1o.bin",  0x000000, 0x020000, 0x671525db )
2944 	ROM_LOAD( "scr-2o.bin",  0x020000, 0x020000, 0x2a3f2ed8 )
2945 	ROM_LOAD( "scr-3o.bin",  0x040000, 0x020000, 0x4d33a92d )
2946 	ROM_LOAD( "scr-4o.bin",  0x060000, 0x020000, 0x79a0aa61 )
2947 	ROM_LOAD( "scr-1e.bin",  0x080000, 0x020000, 0xdc9cd8c9 )
2948 	ROM_LOAD( "scr-2e.bin",  0x0a0000, 0x020000, 0xb6126b41 )
2949 	ROM_LOAD( "scr-3e.bin",  0x0c0000, 0x020000, 0x1592b8c2 )
2950 	ROM_LOAD( "scr-4e.bin",  0x0e0000, 0x020000, 0x8201681c )
2951 
2952 	/* 4 KHz? */
2953 	ROM_REGION( 0x100000, REGION_SOUND1 )	/* Samples */
2954 	ROM_LOAD( "snd-1.bin", 0x000000, 0x020000, 0x8f47bd0d )
2955 	ROM_LOAD( "snd-2.bin", 0x020000, 0x020000, 0x65c40ef5 )
2956 	ROM_LOAD( "snd-3.bin", 0x040000, 0x020000, 0x71fbd54e )
2957 	ROM_LOAD( "snd-4.bin", 0x060000, 0x020000, 0xac50133f )
2958 	ROM_LOAD( "snd-5.bin", 0x080000, 0x020000, 0x70652f2c )
2959 	ROM_LOAD( "snd-6.bin", 0x0a0000, 0x020000, 0x10a1039d )
2960 	ROM_LOAD( "snd-7.bin", 0x0c0000, 0x020000, 0xdecbc8b0 )
2961 	ROM_LOAD( "snd-8.bin", 0x0e0000, 0x020000, 0x3ac51bee )
2962 
2963 ROM_END
2964 
init_drgnunit(void)2965 void init_drgnunit(void)
2966 {
2967 	install_mem_read_handler (0, 0xb00000, 0xb00001, input_port_0_r);
2968 	install_mem_read_handler (0, 0xb00002, 0xb00003, input_port_1_r);
2969 	install_mem_read_handler (0, 0xb00004, 0xb00005, input_port_2_r);
2970 }
2971 
2972 
2973 
2974 /***************************************************************************
2975 
2976 									Meta Fox
2977 
2978 (Seta 1990)
2979 
2980 P0-045A
2981 
2982 P1-006-163                    8464   68000-8
2983 P1-007-164    X1-002A X1-001A 8464
2984 P1-008-165                    8464
2985 P1-009-166                    8464     256K-12
2986                                        256K-12
2987 
2988                  X1-012
2989                  X1-011
2990 
2991 
2992    2063    X1-010     X1-006     X0-006
2993                       X1-007
2994                       X1-004     X1-004
2995 
2996 ----------------------
2997 P1-036-A
2998 
2999 UP-001-010
3000 UP-001-011
3001 UP-001-012
3002 UP-001-013
3003 
3004 
3005 UP-001-014
3006 UP-001-015
3007 
3008 -----------------------
3009 P1-049-A
3010 
3011               UP-001-001
3012               UP-001-002
3013               P1-003-161
3014               P1-004-162
3015 
3016 
3017               UP-001-005
3018               x
3019 
3020 ***************************************************************************/
3021 
3022 ROM_START( metafox )
3023 
3024 	ROM_REGION( 0x0a0000, REGION_CPU1 )		/* 68000 Code */
3025 	ROM_LOAD_EVEN( "p1003161", 0x000000, 0x040000, 0x4fd6e6a1 )
3026 	ROM_LOAD_ODD(  "p1004162", 0x000000, 0x040000, 0xb6356c9a )
3027 	ROM_LOAD_EVEN( "up001002", 0x080000, 0x010000, 0xce91c987 )
3028 	ROM_LOAD_ODD(  "up001001", 0x080000, 0x010000, 0x0db7a505 )
3029 
3030 	ROM_REGION( 0x010000, REGION_CPU2 )		/* 65c02 Code */
3031 	ROM_LOAD( "up001005", 0x006000, 0x002000, 0x2ac5e3e3 )
3032 	ROM_RELOAD(           0x008000, 0x002000  )
3033 	ROM_RELOAD(           0x00a000, 0x002000  )
3034 	ROM_RELOAD(           0x00c000, 0x002000  )
3035 	ROM_RELOAD(           0x00e000, 0x002000  )
3036 
3037 	ROM_REGION( 0x100000, REGION_GFX1 | REGIONFLAG_DISPOSE )	/* Sprites */
3038 	ROM_LOAD( "p1006163", 0x000000, 0x040000, 0x80f69c7c )
3039 	ROM_LOAD( "p1007164", 0x040000, 0x040000, 0xd137e1a3 )
3040 	ROM_LOAD( "p1008165", 0x080000, 0x040000, 0x57494f2b )
3041 	ROM_LOAD( "p1009166", 0x0c0000, 0x040000, 0x8344afd2 )
3042 
3043 	ROM_REGION( 0x200000, REGION_GFX2 | REGIONFLAG_DISPOSE )	/* Layer 1 */
3044 	ROM_LOAD( "up001010", 0x000000, 0x080000, 0xbfbab472 )
3045 	ROM_LOAD( "up001011", 0x080000, 0x080000, 0x26cea381 )
3046 	ROM_LOAD( "up001012", 0x100000, 0x080000, 0xfed2c5f9 )
3047 	ROM_LOAD( "up001013", 0x180000, 0x080000, 0xadabf9ea )
3048 
3049 	/* 4KHz? */
3050 	ROM_REGION( 0x100000, REGION_SOUND1 )	/* Samples */
3051 	ROM_LOAD( "up001015", 0x000000, 0x080000, 0x2e20e39f )
3052 	ROM_LOAD( "up001014", 0x080000, 0x080000, 0xfca6315e )
3053 
3054 ROM_END
3055 
3056 
init_metafox(void)3057 void init_metafox(void)
3058 {
3059 	unsigned char *RAM;
3060 
3061 	/* This game uses the 21c000-21cfff area for protecton? */
3062 	install_mem_read_handler (0, 0x200000, 0x2001ff, MRA_NOP);
3063 	install_mem_write_handler(0, 0x200000, 0x2001ff, MWA_NOP);
3064 
3065 	RAM	= memory_region(REGION_CPU1);
3066 	WRITE_WORD(&RAM[0x8ab1c], 0x0000);	// patch protection test: "cp error"
3067 	WRITE_WORD(&RAM[0x8ab1e], 0x0000);
3068 	WRITE_WORD(&RAM[0x8ab20], 0x0000);
3069 }
3070 
3071 
3072 
3073 /***************************************************************************
3074 
3075 							Mobile Suit Gundam
3076 
3077 Banpresto 1993
3078 P0-081A
3079                                SW2  SW1
3080 
3081 FA-001-008                          FA-001-001
3082 FA-001-007    X1-002A X1-001A       FA-002-002
3083                               5160
3084                               5160
3085                                         71054
3086 FA-001-006                    5160     62256
3087 FA-001-005    X1-011  X1-012  5160     62256
3088 
3089 FA-001-004    X1-011  X1-012  5160
3090 5160                          5160
3091 
3092                                 68000-16
3093 
3094                                          16MHz
3095   X1-010
3096                     X1-007   X1-004     X1-005
3097 
3098 ***************************************************************************/
3099 
3100 ROM_START( msgundam )
3101 
3102 	ROM_REGION( 0x200000, REGION_CPU1 )		/* 68000 Code */
3103 	ROM_LOAD_WIDE_SWAP( "fa002",  0x000000, 0x080000, 0xdee3b083 )
3104 	ROM_LOAD_WIDE_SWAP( "fa001",  0x100000, 0x100000, 0xfca139d0 )
3105 
3106 	ROM_REGION( 0x400000, REGION_GFX1 | REGIONFLAG_DISPOSE )	/* Sprites */
3107 	ROM_LOAD( "fa008",  0x000000, 0x200000, 0xe7accf48 )
3108 	ROM_LOAD( "fa007",  0x200000, 0x200000, 0x793198a6 )
3109 
3110 	ROM_REGION( 0x100000, REGION_GFX2 | REGIONFLAG_DISPOSE )	/* Layer 1 */
3111 	ROM_LOAD( "fa006",  0x000000, 0x100000, 0x3b60365c )
3112 
3113 	ROM_REGION( 0x080000, REGION_GFX3 | REGIONFLAG_DISPOSE )	/* Layer 2 */
3114 	ROM_LOAD( "fa005",  0x000000, 0x080000, 0x8cd7ff86 )
3115 
3116 	ROM_REGION( 0x100000, REGION_SOUND1 )	/* Samples */
3117 	ROM_LOAD( "fa004",  0x000000, 0x100000, 0xb965f07c )
3118 
3119 ROM_END
3120 
3121 
3122 
3123 
3124 
3125 
3126 /***************************************************************************
3127 
3128 						Thundercade / Twin Formation
3129 
3130 CPU: HD68000PS8
3131 SND: YM3812, YM2203C
3132 OSC: 16Mhz
3133 
3134 This PCB is loaded with custom SETA chips as follows
3135 X1-001 (also has written YM3906)
3136 X1-002 (also has written YM3909)
3137 X1-003
3138 X1-004
3139 X1-006
3140 
3141 Rom code is UAO, M/B code is M6100287A (the TAITO logo is written also)
3142 
3143 P0-029-A
3144 
3145   UA0-4 UA0-3 4364 UA0-2 UA0-1 4364  X1-001  16MHz  X1-002
3146   68000-8
3147                          4364 4364   UA0-9  UA0-8  UA0-7  UA0-6
3148                                      UA0-13 UA0-12 UA0-11 UA0-10
3149      X0-006
3150   UA10-5 2016 YM3812 YM2203  SW1
3151                              SW2                   X1-006
3152                                      X1-004
3153                                                  X1-003
3154 
3155 ***************************************************************************/
3156 
ROM_START(tndrcade)3157 ROM_START( tndrcade )
3158 
3159 	ROM_REGION( 0x080000, REGION_CPU1 )		/* 68000 Code */
3160 	ROM_LOAD_EVEN( "ua0-4.1l", 0x000000, 0x020000, 0x73bd63eb )
3161 	ROM_LOAD_ODD(  "ua0-2.1h", 0x000000, 0x020000, 0xe96194b1 )
3162 	ROM_LOAD_EVEN( "ua0-3.1k", 0x040000, 0x020000, 0x0a7b1c41 )
3163 	ROM_LOAD_ODD(  "ua0-1.1g", 0x040000, 0x020000, 0xfa906626 )
3164 
3165 	ROM_REGION( 0x02c000, REGION_CPU2 )		/* 65c02 Code */
3166 	ROM_LOAD( "ua10-5.8m", 0x004000, 0x020000, 0x8eff6122 )	// $1fffd=2 (country code)
3167 	ROM_RELOAD(            0x00c000, 0x020000             )
3168 
3169 	ROM_REGION( 0x200000, REGION_GFX1 | REGIONFLAG_DISPOSE )	/* Sprites */
3170 	ROM_LOAD( "ua0-10", 0x000000, 0x040000, 0xaa7b6757 )
3171 	ROM_LOAD( "ua0-11", 0x040000, 0x040000, 0x11eaf931 )
3172 	ROM_LOAD( "ua0-12", 0x080000, 0x040000, 0x00b5381c )
3173 	ROM_LOAD( "ua0-13", 0x0c0000, 0x040000, 0x8f9a0ed3 )
3174 	ROM_LOAD( "ua0-6",  0x100000, 0x040000, 0x14ecc7bb )
3175 	ROM_LOAD( "ua0-7",  0x140000, 0x040000, 0xff1a4e68 )
3176 	ROM_LOAD( "ua0-8",  0x180000, 0x040000, 0x936e1884 )
3177 	ROM_LOAD( "ua0-9",  0x1c0000, 0x040000, 0xe812371c )
3178 
3179 ROM_END
3180 
3181 
3182 ROM_START( tndrcadj )
3183 
3184 	ROM_REGION( 0x080000, REGION_CPU1 )		/* 68000 Code */
3185 	ROM_LOAD_EVEN( "ua0-4.1l", 0x000000, 0x020000, 0x73bd63eb )
3186 	ROM_LOAD_ODD(  "ua0-2.1h", 0x000000, 0x020000, 0xe96194b1 )
3187 	ROM_LOAD_EVEN( "ua0-3.1k", 0x040000, 0x020000, 0x0a7b1c41 )
3188 	ROM_LOAD_ODD(  "ua0-1.1g", 0x040000, 0x020000, 0xfa906626 )
3189 
3190 	ROM_REGION( 0x02c000, REGION_CPU2 )		/* 65c02 Code */
3191 	ROM_LOAD( "thcade5.bin", 0x004000, 0x020000, 0x8cb9df7b )	// $1fffd=1 (country code jp)
3192 	ROM_RELOAD(              0x00c000, 0x020000             )
3193 
3194 	ROM_REGION( 0x200000, REGION_GFX1 | REGIONFLAG_DISPOSE )	/* Sprites */
3195 	ROM_LOAD( "ua0-10", 0x000000, 0x040000, 0xaa7b6757 )
3196 	ROM_LOAD( "ua0-11", 0x040000, 0x040000, 0x11eaf931 )
3197 	ROM_LOAD( "ua0-12", 0x080000, 0x040000, 0x00b5381c )
3198 	ROM_LOAD( "ua0-13", 0x0c0000, 0x040000, 0x8f9a0ed3 )
3199 	ROM_LOAD( "ua0-6",  0x100000, 0x040000, 0x14ecc7bb )
3200 	ROM_LOAD( "ua0-7",  0x140000, 0x040000, 0xff1a4e68 )
3201 	ROM_LOAD( "ua0-8",  0x180000, 0x040000, 0x936e1884 )
3202 	ROM_LOAD( "ua0-9",  0x1c0000, 0x040000, 0xe812371c )
3203 
3204 ROM_END
3205 
3206 
3207 /***************************************************************************
3208 
3209 								Twin Eagle
3210 
3211 M6100326A	Taito (Seta)
3212 
3213 ua2-4              68000
3214 ua2-3
3215 ua2-6
3216 ua2-5
3217 ua2-8
3218 ua2-10
3219 ua2-7               ua2-1
3220 ua2-9
3221 ua2-12
3222 ua2-11              ua2-2
3223 
3224 ***************************************************************************/
3225 
3226 ROM_START( twineagl )
3227 
3228 	ROM_REGION( 0x080000, REGION_CPU1 )		/* 68000 Code */
3229 	ROM_LOAD_WIDE( "ua2-1", 0x000000, 0x080000, 0x5c3fe531 )
3230 
3231 	ROM_REGION( 0x010000, REGION_CPU2 )		/* 65c02 Code */
3232 	ROM_LOAD( "ua2-2", 0x006000, 0x002000, 0x783ca84e )
3233 	ROM_RELOAD(        0x008000, 0x002000  )
3234 	ROM_RELOAD(        0x00a000, 0x002000  )
3235 	ROM_RELOAD(        0x00c000, 0x002000  )
3236 	ROM_RELOAD(        0x00e000, 0x002000  )
3237 
3238 	ROM_REGION( 0x100000, REGION_GFX1 | REGIONFLAG_DISPOSE )	/* Sprites */
3239 	ROM_LOAD( "ua2-4",  0x000000, 0x040000, 0x8b7532d6 )
3240 	ROM_LOAD( "ua2-3",  0x040000, 0x040000, 0x1124417a )
3241 	ROM_LOAD( "ua2-6",  0x080000, 0x040000, 0x99d8dbba )
3242 	ROM_LOAD( "ua2-5",  0x0c0000, 0x040000, 0x6e450d28 )
3243 
3244 	ROM_REGION( 0x200000, REGION_GFX2 | REGIONFLAG_DISPOSE )	/* Layer 1 */
3245 	ROM_LOAD( "ua2-8",  0x000000, 0x080000, 0x7d3a8d73 )
3246 	ROM_LOAD( "ua2-10", 0x080000, 0x080000, 0x5bbe1f56 )
3247 	ROM_LOAD( "ua2-7",  0x100000, 0x080000, 0xfce56907 )
3248 	ROM_LOAD( "ua2-9",  0x180000, 0x080000, 0xa451eae9 )
3249 
3250 	/* 8KHz? */
3251 	ROM_REGION( 0x100000, REGION_SOUND1 )	/* Samples */
3252 	ROM_LOAD( "ua2-11", 0x000000, 0x080000, 0x624e6057 )
3253 	ROM_LOAD( "ua2-12", 0x080000, 0x080000, 0x3068ff64 )
3254 
3255 ROM_END
3256 
3257 
3258 READ_HANDLER( twineagl_protection_r )
3259 {
3260 	return 0;
3261 }
3262 
init_twineagl(void)3263 void init_twineagl(void)
3264 {
3265 	int i;
3266 	unsigned char *RAM;
3267 
3268 	/* Protection? */
3269 	install_mem_read_handler(0, 0x800000, 0x8000ff, twineagl_protection_r);
3270 
3271 	RAM	= memory_region(REGION_GFX2);
3272 
3273 #if 1
3274 	// waterfalls: tiles 3e00-3fff must be a copy of 2e00-2fff ??
3275 	for (i = 0x3e00 * (16*16*2/8); i < 0x3f00 * (16*16*2/8); i++)
3276 	{
3277 		RAM[i+0x000000] = RAM[i+0x000000 - 0x700*(16*16*2/8)];
3278 		RAM[i+0x100000] = RAM[i+0x100000 - 0x700*(16*16*2/8)];
3279 	}
3280 
3281 
3282 	// Sea level:  tiles 3e00-3fff must be a copy of 3700-38ff ??
3283 	for (i = 0x3f00 * (16*16*2/8); i < 0x4000 * (16*16*2/8); i++)
3284 	{
3285 		RAM[i+0x000000] = RAM[i+0x000000 - 0x1000*(16*16*2/8)];
3286 		RAM[i+0x100000] = RAM[i+0x100000 - 0x1000*(16*16*2/8)];
3287 	}
3288 
3289 #endif
3290 }
3291 
3292 
3293 
3294 
3295 /***************************************************************************
3296 
3297 								U.S. Classic
3298 
3299 M6100430A (Taito 1989)
3300 
3301        u7 119  u6 118   u5 117   u4 116
3302                                          68000-8
3303 u13  120                                 000
3304 u19  121                                 001
3305 u21  122                                 002
3306 u29  123                                 003
3307 u33  124
3308 u40  125
3309 u44  126
3310 u51  127
3311 u58  128
3312 u60  129                                 65c02
3313 u68  130
3314 u75  131                                 u61 004
3315 
3316                                          u83 132
3317 
3318 ***************************************************************************/
3319 
3320 ROM_START( usclssic )
3321 
3322 	ROM_REGION( 0x080000, REGION_CPU1 )		/* 68000 Code */
3323 	ROM_LOAD_EVEN( "ue2001.u20", 0x000000, 0x020000, 0x18b41421 )
3324 	ROM_LOAD_ODD(  "ue2000.u14", 0x000000, 0x020000, 0x69454bc2 )
3325 	ROM_LOAD_EVEN( "ue2002.u22", 0x040000, 0x020000, 0xa7bbe248 )
3326 	ROM_LOAD_ODD(  "ue2003.u30", 0x040000, 0x020000, 0x29601906 )
3327 
3328 	ROM_REGION( 0x04c000, REGION_CPU2 )		/* 65c02 Code */
3329 	ROM_LOAD( "ue002u61.004", 0x004000, 0x040000, 0x476e9f60 )
3330 	ROM_RELOAD(               0x00c000, 0x040000             )
3331 
3332 	ROM_REGION( 0x200000, REGION_GFX1 | REGIONFLAG_DISPOSE )	/* Sprites */
3333 	ROM_LOAD( "ue001009.119", 0x000000, 0x080000, 0xdc065204 )
3334 	ROM_LOAD( "ue001008.118", 0x080000, 0x080000, 0x5947d9b5 )
3335 	ROM_LOAD( "ue001007.117", 0x100000, 0x080000, 0xb48a885c )
3336 	ROM_LOAD( "ue001006.116", 0x180000, 0x080000, 0xa6ab6ef4 )
3337 
3338 	ROM_REGION( 0x600000, REGION_GFX2 | REGIONFLAG_DISPOSE )	/* Layer 1 */
3339 	ROM_LOAD( "ue001010.120", 0x000000, 0x080000, 0xdd683031 )	// planes 01
3340 	ROM_LOAD( "ue001011.121", 0x080000, 0x080000, 0x0e27bc49 )
3341 	ROM_LOAD( "ue001012.122", 0x100000, 0x080000, 0x961dfcdc )
3342 	ROM_LOAD( "ue001013.123", 0x180000, 0x080000, 0x03e9eb79 )
3343 
3344 	ROM_LOAD( "ue001014.124", 0x200000, 0x080000, 0x9576ace7 )	// planes 23
3345 	ROM_LOAD( "ue001015.125", 0x280000, 0x080000, 0x631d6eb1 )
3346 	ROM_LOAD( "ue001016.126", 0x300000, 0x080000, 0xf44a8686 )
3347 	ROM_LOAD( "ue001017.127", 0x380000, 0x080000, 0x7f568258 )
3348 
3349 	ROM_LOAD( "ue001018.128", 0x400000, 0x080000, 0x4bd98f23 )	// planes 45
3350 	ROM_LOAD( "ue001019.129", 0x480000, 0x080000, 0x6d9f5a33 )
3351 	ROM_LOAD( "ue001020.130", 0x500000, 0x080000, 0xbc07403f )
3352 	ROM_LOAD( "ue001021.131", 0x580000, 0x080000, 0x98c03efd )
3353 
3354 	/* 4KHz? */
3355 	ROM_REGION( 0x080000, REGION_SOUND1 )	/* Samples */
3356 	ROM_LOAD( "ue001005.132", 0x000000, 0x080000, 0xc5fea37c )
3357 
3358 ROM_END
3359 
3360 
3361 
3362 
3363 /***************************************************************************
3364 
3365 								Zing Zing Zip
3366 
3367 P0-079A
3368 
3369 UY-001-005   X1-002A   X1-001A   5168-10      256k-12
3370 UY-001-006                       5168-10      UY-001-001
3371 UY-001-007                                    UY-001-002
3372 UY-001-008   X1-011 X1-012                    58257-12
3373                                  5168-10
3374 UY-001-010   X1-011 X1-012       5168-10
3375 UY-001-017
3376 UY-001-018
3377                                  5168-10
3378 X1-010                           5168-10       68000-16
3379 
3380 
3381                            8464-80
3382                            8464-80       16MHz
3383 
3384 
3385                              X1-007    X1-004
3386 
3387 ***************************************************************************/
3388 
ROM_START(zingzip)3389 ROM_START( zingzip )
3390 
3391 	ROM_REGION( 0x080000, REGION_CPU1 )		/* 68000 Code */
3392 	ROM_LOAD_EVEN( "uy001001",  0x000000, 0x040000, 0x1a1687ec )
3393 	ROM_LOAD_ODD(  "uy001002",  0x000000, 0x040000, 0x62e3b0c4 )
3394 
3395 	ROM_REGION( 0x100000, REGION_GFX1 | REGIONFLAG_DISPOSE )	/* Sprites */
3396 	ROM_LOAD( "uy001016",  0x000000, 0x080000, 0x46e4a7d8 )
3397 	ROM_LOAD( "uy001015",  0x080000, 0x080000, 0x4aac128e )
3398 
3399 	ROM_REGION( 0x200000, REGION_GFX2 | REGIONFLAG_DISPOSE )	/* Layer 1 */
3400 	ROM_LOAD( "uy001008",  0x000000, 0x200000, 0x0d07d34b ) // FIRST AND SECOND HALF IDENTICAL
3401 	ROM_LOAD_GFX_EVEN( "uy001007",  0x100000, 0x080000, 0xec5b3ab9 )
3402 
3403 	ROM_REGION( 0x200000, REGION_GFX3 | REGIONFLAG_DISPOSE )	/* Layer 2 */
3404 	ROM_LOAD( "uy001010",  0x000000, 0x200000, 0x0129408a ) // FIRST AND SECOND HALF IDENTICAL
3405 
3406 	/* 6KHz? */
3407 	ROM_REGION( 0x100000, REGION_SOUND1 )	/* Samples */
3408 	ROM_LOAD( "uy001017",  0x000000, 0x080000, 0xd2cda2eb )
3409 	ROM_LOAD( "uy001018",  0x080000, 0x080000, 0x3d30229a )
3410 
3411 ROM_END
3412 
3413 
3414 
3415 /***************************************************************************
3416 
3417 							   War of Aero
3418 							Project M E I O U
3419 
3420 93111A	YANG CHENG
3421 
3422 CPU   : TOSHIBA TMP68HC000N-16
3423 Sound : ?
3424 OSC   : 16.000000MHz
3425 
3426 ***************************************************************************/
3427 
3428 ROM_START( wrofaero )
3429 
3430 	ROM_REGION( 0x080000, REGION_CPU1 )		/* 68000 Code */
3431 	ROM_LOAD_EVEN( "u3.bin",  0x000000, 0x040000, 0x9b896a97 )
3432 	ROM_LOAD_ODD(  "u4.bin",  0x000000, 0x040000, 0xdda84846 )
3433 
3434 	ROM_REGION( 0x100000, REGION_GFX1 | REGIONFLAG_DISPOSE )	/* Sprites */
3435 	ROM_LOAD( "u64.bin",  0x000000, 0x080000, 0xf06ccd78 )
3436 	ROM_LOAD( "u63.bin",  0x080000, 0x080000, 0x2a602a1b )
3437 
3438 	ROM_REGION( 0x080000, REGION_GFX2 | REGIONFLAG_DISPOSE )	/* Layer 1 */
3439 	ROM_LOAD( "u66.bin",  0x000000, 0x080000, 0xc9fc6a0c )
3440 
3441 	ROM_REGION( 0x080000, REGION_GFX3 | REGIONFLAG_DISPOSE )	/* Layer 2 */
3442 	ROM_LOAD( "u68.bin",  0x000000, 0x080000, BADCRC(0x3b9cc2b9) )
3443 
3444 	ROM_REGION( 0x100000, REGION_SOUND1 )	/* Samples */
3445 	ROM_LOAD( "u69.bin",  0x000000, 0x080000, 0x957ecd41 )
3446 	ROM_LOAD( "u70.bin",  0x080000, 0x080000, 0x8d756fdf )
3447 
3448 ROM_END
3449 
3450 
3451 void init_wrofaero(void)
3452 {
3453 	unsigned char *RAM;
3454 
3455 	RAM	= memory_region(REGION_GFX3);	// layer 2's tile 0 has some
3456 	RAM[0] = 0;							// opaque pixels (bad dump)
3457 }
3458 
3459 
3460 
3461 
3462 /***************************************************************************
3463 
3464 								Game Drivers
3465 
3466 ***************************************************************************/
3467 
3468 GAMEX( 1987, tndrcade, 0,        tndrcade, tndrcade, 0,        ROT270, "[Seta] (Taito license)", "Thundercade / Twin Formation", GAME_IMPERFECT_SOUND ) // Title/License: DSW
3469 GAMEX( 1987, tndrcadj, tndrcade, tndrcade, tndrcadj, 0,        ROT270, "[Seta] (Taito license)", "Tokusyu Butai UAG (Japan)", GAME_IMPERFECT_SOUND ) // License: DSW
3470 GAMEX( 1988, twineagl, 0,        twineagl, twineagl, twineagl, ROT270, "Seta (Taito license)", "Twin Eagle (Japan)",  GAME_IMPERFECT_SOUND )
3471 GAMEX( 1989, calibr50, 0,        calibr50, calibr50, 0,        ROT270, "Athena / Seta",        "Caliber 50",          GAME_IMPERFECT_SOUND ) // Country/License: DSW
3472 GAMEX( 1989, drgnunit, 0,        drgnunit, drgnunit, drgnunit, ROT0,   "Seta",                 "Dragon Unit / Castle of Dragon", GAME_IMPERFECT_SOUND )
3473 GAMEX( 1989, downtown, 0,        downtown, downtown, downtown, ROT270, "Seta",                 "DownTown",            GAME_IMPERFECT_SOUND ) // Country/License: DSW
3474 GAMEX( 1989, usclssic, 0,        usclssic, usclssic, 0,        ROT270, "Seta",                 "U.S. Classic",        GAME_IMPERFECT_SOUND | GAME_WRONG_COLORS ) // Country/License: DSW
3475 GAMEX( 1989, arbalest, 0,        metafox,  arbalest, arbalest, ROT270, "Seta",                 "Arbalester",          GAME_IMPERFECT_SOUND ) // Country/License: DSW
3476 GAMEX( 1989, metafox,  0,        metafox,  metafox,  metafox,  ROT270, "Seta",                 "Meta Fox",            GAME_IMPERFECT_SOUND ) // Country/License: DSW
3477 GAMEX( 1992, blandia,  0,        blandia,  blandia,  0,        ROT0,   "Allumer",              "Blandia [Prototype]", GAME_IMPERFECT_SOUND )
3478 GAMEX( 1992, zingzip,  0,        zingzip,  zingzip,  0,        ROT270, "Allumer + Tecmo",      "Zing Zing Zip",       GAME_IMPERFECT_SOUND )
3479 GAMEX( 1993, msgundam, 0,        msgundam, msgundam, 0,        ROT0  , "Banpresto",            "Mobile Suit Gundam",  GAME_IMPERFECT_SOUND|GAME_NOT_WORKING )
3480 GAMEX( 1993, wrofaero, 0,        wrofaero, wrofaero, wrofaero, ROT270, "Yang Cheng",           "War of Aero - Project MEIOU", GAME_IMPERFECT_SOUND )
3481