1 /***************************************************************************
2 
3 Taito B System
4 
5 driver by Jarek Burczynski, with help from:
6 Nicola Salmoria, Brian A. Troha, Stephane Humbert, Gerardo Oporto Jorrin, David Graves
7 heavily based on Taito F2 System driver by Brad Oliver, Andrew Prime
8 
9 The board uses TC0220IOC, TC0260DAR, TC0180VCU, and TC0140SYT.
10 Sonic Blast Man uses TC0510NIO instead of TC0220IOC.
11 
12 The palette resolution is 12 bits in some games and 15 bits in others.
13 
14 TODO:
15 - hitice: ice trails might not be 100% correct (I'm doubling them horizontally)
16 - hitice: the pixel bitmap is not cleared on startup nor during attract mode. There's a
17   kludge to fix it in the first case.
18 - rambo3a: has a lot of unmapped writes in the VCU area (log up to end of
19   round 2) [viofight also does a few]
20 - The eprom games could have a single io handler if it's confirmed all
21   3 use a special 4 player I/O chip. Puzzle Bobble and qzshowby use TC0640FIO
22 - can the text layer scroll? (hitice: glass walls at beginning of match, also check when the
23   screen wiggles after the puck hits the wall shortly into the first round of attract mode)
24 - sprites are not in perfect sync with the background. Check ashura, they are almost
25   tight during gameplay but completely off in attract mode.
26 
27 The Taito B system is a fairly flexible hardware platform. It supports 4
28 separate layers of graphics - one 64x64 tiled scrolling background plane
29 of 16x16 tiles, a similar foreground plane, a sprite plane capable of sprite
30 zooming and 'pageable' text plane of 8x8 tiles.
31 
32 Sound is handled by a Z80 with a YM2610 or YM2610B or YM2203's connected
33 to it. Different sound chips - depending on game.
34 
35 The memory map for each of the games is similar but not identical.
36 
37 
38 Memory map for Rastan Saga 2 / Nastar / Nastar Warrior :
39 
40 CPU 1 : 68000, uses irqs 2 & 4. One of the IRQs just sets a flag which is
41 checked in the other IRQ routine. Could be timed to vblank...
42 
43   0x000000 - 0x07ffff : ROM
44   0x200000 - 0x201fff : palette RAM, 4096 total colors (0x1000 words)
45   0x400000 - 0x403fff : 64x64 foreground layer (offsets 0x0000-0x1fff tile codes; offsets 0x2000-0x3fff tile attributes)
46   0x404000 - 0x407fff : 64x64 background layer (offsets 0x0000-0x1fff tile codes; offsets 0x2000-0x3fff tile attributes)
47   0x408000 - 0x408fff : 64x64 text layer
48   0x410000 - 0x41197f : ??k of sprite RAM (this is the range that Rastan Saga II tests at startup time)
49   0x413800 - 0x413bff : foreground (line/screen) scroll RAM
50   0x413c00 - 0x413fff : background (line/screen) scroll RAM
51 
52   0x600000 - 0x607fff : 32k of CPU RAM
53   0x800000 - 0x800003 : communication with sound CPU via TC0140SYT
54   0xa00000 - 0xa0000f : input ports and dipswitches
55 
56 
57 Notes:
58  Master of Weapon has secret command to select level:
59  (sequence is the same as in Metal Black):
60  - boot machine with service switch pressed
61  - message appears: "SERVICE SWITCH ERROR"
62  - press 1p start, 1p start, 1p start, service switch, 1p start
63  - message appears: "SELECT BY DOWN SW"
64  - select level with joy down/up
65  - press 1p start button
66 
67 Other games that have this feature:
68  Rastan Saga 2
69  Crime City
70  Violence Fight
71  Rambo 3
72 
73 
74 
75 List of known B-System games:
76 
77 	Rastan Saga II					(YM2610 sound)
78 	Ashura Blaster					(YM2610 sound)
79 	Crime City						(YM2610 sound)
80 	Rambo 3 (two different versions)(YM2610 sound)
81 	Tetris							(YM2610 sound)
82 	Space Invaders DX				(YM2610 sound, MB87078 - electronic volume control)
83 	Silent Dragon					(YM2610 sound)
84 	Sel Feena						(YM2610 sound)
85 	Ryujin							(YM2610 sound)
86 
87 	Violence Fight					(YM2203 sound, 1xMSM6295 )
88 	Hit The Ice						(YM2203 sound, 2xMSM6295 )
89 	Master of Weapons				(YM2203 sound)
90 
91 	Quiz Sekai wa SHOW by shobai	(YM2610-B sound, MB87078 - electronic volume control)
92 	Puzzle Bobble					(YM2610-B sound, MB87078 - electronic volume control)
93 	Sonic Blast Man					(YM2610-B sound)
94 
95 Nastar
96 Taito, 1988
97 
98 PCB Layout
99 ----------
100 
101 K1100419A  J1100178A
102 |---------------------------------------|
103 |68000  B81-13.31  B81-08.50  DSWA  DSWB|
104 |       B81-09.30  B81-10.49  TCO220IOC |
105 |24MHz B81-05.21 6264  6264             |
106 |      B81-06.22 6264  6264             |
107 |                           27.164MHz   |
108 |B81-04.15                             J|
109 |B81-03.14                             A|
110 |             TCO180VCU     6264       M|
111 |62256 62256                           M|
112 |                           TCO260DAR  A|
113 |62256 62256                            |
114 |                              MB3735   |
115 |62256 62256                 6264       |
116 |             TCO140SYT      B81-11.37  |
117 |62256 62256                 Z80A       |
118 |                       16MHz           |
119 |B81-02.2                               |
120 |B81-01.1     YM2610 YM3016  TL074 TL074|
121 |---------------------------------------|
122 
123 Notes:
124       68000 clock: 12.000MHz (24 / 2)
125         Z80 clock: 4.000MHz  (16 / 4)
126      YM2610 clock: 8.000MHz  (16 / 2)
127             Vsync: 60Hz
128 
129 
130 
131 Violence Fight
132 Taito, 1989
133 
134 PCB Layout
135 ----------
136 
137 K1100511A  J1100213A
138 |---------------------------------------|
139 |C16-01.1   6264     6264     DSWA DSWB |
140 |C16-02.2 C16-06.22 C16-07.41 TCO220IOC |
141 |C16-03.3 C16-14.23 C16-11.42           |
142 |C16-04.4      68000        6116        |
143 |               / C16-08                |
144 |           PALS\ C16-09    TCO260DAR  J|
145 |   TCO180VCU                          A|
146 |                                      M|
147 |        27.164MHz               TL074 M|
148 |                                      A|
149 |        24MHz                          |
150 |                               YM3014B |
151 |            PC060HA      YM2203        |
152 | 62256 62256            C16-05.47      |
153 | 62256 62256 Z80B                MB3735|
154 | 62256 62256 C16-12.32                 |
155 | 62256 62256 6264        M6295  TL074  |
156 |                  4.224MHz             |
157 |---------------------------------------|
158 
159 Notes:
160       68000 clock: 12.000MHz (24 / 2)
161         Z80 clock: 6.000MHz  (24 / 4)
162      YM2203 clock: 3.000MHz  (24 / 8)
163       M6295 clock: 1.056MHz  (4.224 / 4), sample rate = 1056000 / 132
164             Vsync: 60Hz
165 
166 
167 
168 ***************************************************************************/
169 
170 #include "driver.h"
171 #include "cpu/m68000/m68000.h"
172 #include "vidhrdw/generic.h"
173 #include "vidhrdw/taitoic.h"
174 #include "machine/eeprom.h"
175 #include "machine/mb87078.h"
176 #include "sndhrdw/taitosnd.h"
177 
178 extern data16_t *taitob_scroll;
179 extern data16_t *TC0180VCU_ram;
180 extern data16_t *taitob_spriteram;
181 extern data16_t *taitob_pixelram;
182 
183 
184 VIDEO_START( taitob_color_order0 );
185 VIDEO_START( taitob_color_order1 );
186 VIDEO_START( taitob_color_order2 );
187 VIDEO_START( hitice );
188 VIDEO_EOF( taitob );
189 
190 VIDEO_UPDATE( taitob );
191 
192 WRITE16_HANDLER( TC0180VCU_word_w );
193 READ16_HANDLER ( TC0180VCU_word_r );
194 
195 READ16_HANDLER( TC0180VCU_framebuffer_word_r );
196 WRITE16_HANDLER( TC0180VCU_framebuffer_word_w );
197 
198 WRITE16_HANDLER( taitob_v_control_w );
199 READ16_HANDLER ( taitob_v_control_r );
200 
201 WRITE16_HANDLER( hitice_pixelram_w );
202 WRITE16_HANDLER( hitice_pixel_scroll_w );
203 
WRITE_HANDLER(bankswitch_w)204 static WRITE_HANDLER( bankswitch_w )
205 {
206 	unsigned char *RAM = memory_region(REGION_CPU2);
207 	int banknum = (data - 1) & 3;
208 
209 	cpu_setbank (1, &RAM [0x10000 + (banknum * 0x4000)]);
210 }
211 
212 
213 
rsaga2_interrupt2(int x)214 void rsaga2_interrupt2(int x)
215 {
216 	cpu_set_irq_line(0,2,HOLD_LINE);
217 }
218 
INTERRUPT_GEN(rastansaga2_interrupt)219 static INTERRUPT_GEN( rastansaga2_interrupt )
220 {
221 	timer_set(TIME_IN_CYCLES(5000,0),0,rsaga2_interrupt2);
222 	cpu_set_irq_line(0, 4, HOLD_LINE);
223 }
224 
225 
crimec_interrupt3(int x)226 void crimec_interrupt3(int x)
227 {
228 	cpu_set_irq_line(0,3,HOLD_LINE);
229 }
230 
INTERRUPT_GEN(crimec_interrupt)231 static INTERRUPT_GEN( crimec_interrupt )
232 {
233 	timer_set(TIME_IN_CYCLES(5000,0),0,crimec_interrupt3);
234 	cpu_set_irq_line(0, 5, HOLD_LINE);
235 }
236 
237 
hitice_interrupt6(int x)238 void hitice_interrupt6(int x)
239 {
240 	cpu_set_irq_line(0,6,HOLD_LINE);
241 }
242 
INTERRUPT_GEN(hitice_interrupt)243 static INTERRUPT_GEN( hitice_interrupt )
244 {
245 	timer_set(TIME_IN_CYCLES(5000,0),0,hitice_interrupt6);
246 	cpu_set_irq_line(0, 4, HOLD_LINE);
247 }
248 
249 
rambo3_interrupt1(int x)250 void rambo3_interrupt1(int x)
251 {
252 	cpu_set_irq_line(0,1,HOLD_LINE);
253 }
254 
INTERRUPT_GEN(rambo3_interrupt)255 static INTERRUPT_GEN( rambo3_interrupt )
256 {
257 	timer_set(TIME_IN_CYCLES(5000,0),0,rambo3_interrupt1);
258 	cpu_set_irq_line(0, 6, HOLD_LINE);
259 }
260 
261 
pbobble_interrupt5(int x)262 void pbobble_interrupt5(int x)
263 {
264 	cpu_set_irq_line(0,5,HOLD_LINE);
265 }
266 
INTERRUPT_GEN(pbobble_interrupt)267 static INTERRUPT_GEN( pbobble_interrupt )
268 {
269 	timer_set(TIME_IN_CYCLES(5000,0),0,pbobble_interrupt5);
270 	cpu_set_irq_line(0, 3, HOLD_LINE);
271 }
272 
viofight_interrupt1(int x)273 void viofight_interrupt1(int x)
274 {
275 	cpu_set_irq_line(0,1,HOLD_LINE);
276 }
277 
INTERRUPT_GEN(viofight_interrupt)278 static INTERRUPT_GEN( viofight_interrupt )
279 {
280 	timer_set(TIME_IN_CYCLES(5000,0),0,viofight_interrupt1);
281 	cpu_set_irq_line(0, 4, HOLD_LINE);
282 }
283 
masterw_interrupt4(int x)284 void masterw_interrupt4(int x)
285 {
286 	cpu_set_irq_line(0,4,HOLD_LINE);
287 }
288 
INTERRUPT_GEN(masterw_interrupt)289 static INTERRUPT_GEN( masterw_interrupt )
290 {
291 	timer_set(TIME_IN_CYCLES(5000,0),0,masterw_interrupt4);
292 	cpu_set_irq_line(0, 5, HOLD_LINE);
293 }
294 
silentd_interrupt6(int x)295 void silentd_interrupt6(int x)
296 {
297 	cpu_set_irq_line(0,6,HOLD_LINE);
298 }
299 
INTERRUPT_GEN(silentd_interrupt)300 static INTERRUPT_GEN( silentd_interrupt )
301 {
302 	timer_set(TIME_IN_CYCLES(5000,0),0,silentd_interrupt6);
303 	cpu_set_irq_line(0, 4, HOLD_LINE);
304 }
305 
selfeena_interrupt4(int x)306 void selfeena_interrupt4(int x)
307 {
308 	cpu_set_irq_line(0,4,HOLD_LINE);
309 }
310 
INTERRUPT_GEN(selfeena_interrupt)311 static INTERRUPT_GEN( selfeena_interrupt )
312 {
313 	timer_set(TIME_IN_CYCLES(5000,0),0,selfeena_interrupt4);
314 	cpu_set_irq_line(0, 6, HOLD_LINE);
315 }
316 
sbm_interrupt5(int x)317 void sbm_interrupt5(int x)/*4*/
318 {
319 	cpu_set_irq_line(0,5,HOLD_LINE);
320 }
321 
INTERRUPT_GEN(sbm_interrupt)322 static INTERRUPT_GEN( sbm_interrupt )/*5*/
323 {
324 	timer_set(TIME_IN_CYCLES(10000,0),0,sbm_interrupt5);
325 	cpu_set_irq_line(0, 4, HOLD_LINE);
326 }
327 
328 
329 
READ16_HANDLER(tracky1_hi_r)330 static READ16_HANDLER( tracky1_hi_r )
331 {
332 	return input_port_5_word_r(0,0);
333 }
READ16_HANDLER(tracky1_lo_r)334 static READ16_HANDLER( tracky1_lo_r )
335 {
336 	return (input_port_5_word_r(0,0) & 0xff) <<8;
337 }
READ16_HANDLER(trackx1_hi_r)338 static READ16_HANDLER( trackx1_hi_r )
339 {
340 	return input_port_6_word_r(0,0);
341 }
READ16_HANDLER(trackx1_lo_r)342 static READ16_HANDLER( trackx1_lo_r )
343 {
344 	return (input_port_6_word_r(0,0) & 0xff) <<8;
345 }
READ16_HANDLER(tracky2_hi_r)346 static READ16_HANDLER( tracky2_hi_r )
347 {
348 	return input_port_7_word_r(0,0);
349 }
READ16_HANDLER(tracky2_lo_r)350 static READ16_HANDLER( tracky2_lo_r )
351 {
352 	return (input_port_7_word_r(0,0) & 0xff) <<8;
353 }
READ16_HANDLER(trackx2_hi_r)354 static READ16_HANDLER( trackx2_hi_r )
355 {
356 	return input_port_8_word_r(0,0);
357 }
READ16_HANDLER(trackx2_lo_r)358 static READ16_HANDLER( trackx2_lo_r )
359 {
360 	return (input_port_8_word_r(0,0) & 0xff) <<8;
361 }
362 
363 
WRITE16_HANDLER(gain_control_w)364 static WRITE16_HANDLER( gain_control_w )
365 {
366 	if (ACCESSING_MSB)
367 	{
368 		if (offset==0)
369 		{
370 			MB87078_data_w(0, data>>8, 0);
371             /*logerror("MB87078 dsel=0 data=%4x\n",data);*/
372 		}
373 		else
374 		{
375 			MB87078_data_w(0, data>>8, 1);
376             /*logerror("MB87078 dsel=1 data=%4x\n",data);*/
377 		}
378 	}
379 }
380 
381 /***************************************************************************
382 
383   Puzzle Bobble, Qzshowby, Space DX   EEPROM
384 
385 ***************************************************************************/
386 
387 static struct EEPROM_interface eeprom_interface =
388 {
389 	6,				/* address bits */
390 	16,				/* data bits */
391 	"0110",			/*  read command */
392 	"0101",			/* write command */
393 	"0111",			/* erase command */
394 	"0100000000",	/*  lock command */
395 	"0100110000" 	/* unlock command*/
396 };
397 
NVRAM_HANDLER(taito_b)398 static NVRAM_HANDLER( taito_b )
399 {
400 	if (read_or_write)
401 		EEPROM_save(file);
402 	else
403 	{
404 		EEPROM_init(&eeprom_interface);
405 		if (file)
406 		{
407 			EEPROM_load(file);
408 		}
409 	}
410 }
411 
READ16_HANDLER(eeprom_r)412 static READ16_HANDLER( eeprom_r )
413 {
414 	int res;
415 
416 	res = (EEPROM_read_bit() & 0x01);
417 	res |= input_port_1_word_r(0,0) & 0xfe; /* coin inputs */
418 
419 	return res;
420 }
421 
422 static data16_t eep_latch = 0;
423 
READ16_HANDLER(eep_latch_r)424 static READ16_HANDLER( eep_latch_r )
425 {
426 	return eep_latch;
427 }
428 
WRITE16_HANDLER(eeprom_w)429 static WRITE16_HANDLER( eeprom_w )
430 {
431 	COMBINE_DATA(&eep_latch);
432 
433     if (ACCESSING_MSB)
434     {
435 		data >>= 8; /*M68k byte write*/
436 
437 		/* bit 0 - Unused */
438 		/* bit 1 - Unused */
439 		/* bit 2 - Eeprom data  */
440 		/* bit 3 - Eeprom clock */
441 		/* bit 4 - Eeprom reset (active low) */
442 		/* bit 5 - Unused */
443 		/* bit 6 - Unused */
444 		/* bit 7 - set all the time (Chip Select?) */
445 
446 		/* EEPROM */
447 		EEPROM_write_bit(data & 0x04);
448 		EEPROM_set_clock_line((data & 0x08) ? ASSERT_LINE : CLEAR_LINE);
449 		EEPROM_set_cs_line((data & 0x10) ? CLEAR_LINE : ASSERT_LINE);
450 	}
451 }
452 
453 /*************************************************************************
454    The input area for the three eprom games ($500000-2f) may well be
455    addressing a single i/o chip with 4 player and coin inputs as
456    standard.
457 
458    Does anyone have custom chip numbers from the Space Invaders DX ?
459    (qzshowby and pbobble do use TC0640FIO).
460 
461 *************************************************************************/
462 
463 static UINT16 coin_word=0;
464 
READ16_HANDLER(player_34_coin_ctrl_r)465 static READ16_HANDLER( player_34_coin_ctrl_r )
466 {
467 	return coin_word;
468 }
469 
WRITE16_HANDLER(player_34_coin_ctrl_w)470 static WRITE16_HANDLER( player_34_coin_ctrl_w )
471 {
472 	COMBINE_DATA(&coin_word);
473 
474 	/* coin counters and lockout */
475 	coin_lockout_w(2,~data & 0x0100);
476 	coin_lockout_w(3,~data & 0x0200);
477 	coin_counter_w(2, data & 0x0400);
478 	coin_counter_w(3, data & 0x0800);
479 }
480 
READ16_HANDLER(pbobble_input_bypass_r)481 static READ16_HANDLER( pbobble_input_bypass_r )
482 {
483 	switch (offset)
484 	{
485 		case 0x01:
486 			return eeprom_r(0,mem_mask) << 8;
487 
488 		default:
489 			return TC0640FIO_r( offset ) << 8;
490 	}
491 }
492 
493 
494 
495 #define TC0180VCU_MEMR( ADDR )											\
496 	{ ADDR+0x00000, ADDR+0x0ffff, TC0180VCU_word_r },					\
497 	{ ADDR+0x10000, ADDR+0x1197f, MRA16_RAM },							\
498 	{ ADDR+0x11980, ADDR+0x137ff, MRA16_RAM },							\
499 	{ ADDR+0x13800, ADDR+0x13fff, MRA16_RAM },							\
500 	{ ADDR+0x18000, ADDR+0x1801f, taitob_v_control_r },					\
501 	{ ADDR+0x40000, ADDR+0x7ffff, TC0180VCU_framebuffer_word_r },
502 
503 #define TC0180VCU_MEMW( ADDR )											\
504 	{ ADDR+0x00000, ADDR+0x0ffff, TC0180VCU_word_w, &TC0180VCU_ram },	\
505 	{ ADDR+0x10000, ADDR+0x1197f, MWA16_RAM, &taitob_spriteram },		\
506 	{ ADDR+0x11980, ADDR+0x137ff, MWA16_RAM },							\
507 	{ ADDR+0x13800, ADDR+0x13fff, MWA16_RAM, &taitob_scroll },			\
508 	{ ADDR+0x18000, ADDR+0x1801f, taitob_v_control_w },					\
509 	{ ADDR+0x40000, ADDR+0x7ffff, TC0180VCU_framebuffer_word_w },
510 
511 
MEMORY_READ16_START(rastsag2_readmem)512 static MEMORY_READ16_START( rastsag2_readmem )
513 	{ 0x000000, 0x07ffff, MRA16_ROM },
514 	{ 0x600000, 0x607fff, MRA16_RAM },			/* Main RAM */
515 
516 	{ 0x200000, 0x201fff, MRA16_RAM },			/* palette */
517 
518 	TC0180VCU_MEMR( 0x400000 )
519 
520 	{ 0xa00000, 0xa0000f, TC0220IOC_halfword_byteswap_r },
521 
522 	{ 0x800000, 0x800001, MRA16_NOP },
523 	{ 0x800002, 0x800003, taitosound_comm16_msb_r },
524 MEMORY_END
525 
526 static MEMORY_WRITE16_START( rastsag2_writemem )
527 	{ 0x000000, 0x07ffff, MWA16_ROM },
528 	{ 0x600000, 0x607fff, MWA16_RAM },	/* Main RAM */ /*ashura up to 603fff only*/
529 
530 	{ 0x200000, 0x201fff, paletteram16_RRRRGGGGBBBBxxxx_word_w, &paletteram16 },
531 
532 	TC0180VCU_MEMW( 0x400000 )
533 
534 	{ 0xa00000, 0xa0000f, TC0220IOC_halfword_byteswap_w },
535 
536 	{ 0x800000, 0x800001, taitosound_port16_msb_w },
537 	{ 0x800002, 0x800003, taitosound_comm16_msb_w },
538 MEMORY_END
539 
540 
541 static MEMORY_READ16_START( crimec_readmem )
542 	{ 0x000000, 0x07ffff, MRA16_ROM },
543 	{ 0xa00000, 0xa0ffff, MRA16_RAM },	/* Main RAM */
544 
545 	{ 0x800000, 0x801fff, MRA16_RAM },
546 
547 	TC0180VCU_MEMR( 0x400000 )
548 
549 	{ 0x200000, 0x20000f, TC0220IOC_halfword_byteswap_r },
550 
551 	{ 0x600000, 0x600001, MRA16_NOP },
552 	{ 0x600002, 0x600003, taitosound_comm16_msb_r },
553 MEMORY_END
554 
555 static MEMORY_WRITE16_START( crimec_writemem )
556 	{ 0x000000, 0x07ffff, MWA16_ROM },
557 	{ 0xa00000, 0xa0ffff, MWA16_RAM },	/* Main RAM */
558 
559 	{ 0x800000, 0x801fff, paletteram16_RRRRGGGGBBBBxxxx_word_w, &paletteram16 },
560 
561 	TC0180VCU_MEMW( 0x400000 )
562 
563 	{ 0x200000, 0x20000f, TC0220IOC_halfword_byteswap_w },
564 
565 	{ 0x600000, 0x600001, taitosound_port16_msb_w },
566 	{ 0x600002, 0x600003, taitosound_comm16_msb_w },
567 MEMORY_END
568 
569 
570 static MEMORY_READ16_START( tetrist_readmem )
571 	{ 0x000000, 0x07ffff, MRA16_ROM },
572 	{ 0x800000, 0x807fff, MRA16_RAM },	/* Main RAM */
573 
574 	{ 0xa00000, 0xa01fff, MRA16_RAM }, /*palette*/
575 
576 	TC0180VCU_MEMR( 0x400000 )
577 
578 	{ 0x600000, 0x60000f, TC0220IOC_halfword_byteswap_r },
579 
580 	{ 0x200000, 0x200001, MRA16_NOP },
581 	{ 0x200002, 0x200003, taitosound_comm16_msb_r },
582 MEMORY_END
583 
584 static MEMORY_WRITE16_START( tetrist_writemem )
585 	{ 0x000000, 0x07ffff, MWA16_ROM },
586 	{ 0x800000, 0x807fff, MWA16_RAM },	/* Main RAM */
587 
588 	{ 0xa00000, 0xa01fff, paletteram16_RRRRGGGGBBBBRGBx_word_w, &paletteram16 },
589 
590 	TC0180VCU_MEMW( 0x400000 )
591 
592 	{ 0x600000, 0x60000f, TC0220IOC_halfword_byteswap_w },
593 
594 	{ 0x200000, 0x200001, taitosound_port16_msb_w },
595 	{ 0x200002, 0x200003, taitosound_comm16_msb_w },
596 MEMORY_END
597 
598 
599 static MEMORY_READ16_START( hitice_readmem )
600 	{ 0x000000, 0x07ffff, MRA16_ROM },
601 	{ 0x800000, 0x803fff, MRA16_RAM },	/* Main RAM */
602 
603 	{ 0xa00000, 0xa01fff, MRA16_RAM },
604 
605 	TC0180VCU_MEMR( 0x400000 )
606 
607 	{ 0x600000, 0x60000f, TC0220IOC_halfword_byteswap_r },
608 	{ 0x610000, 0x610001, input_port_5_word_r },		/* player 3,4 inputs*/
609 
610 	{ 0x700000, 0x700001, MRA16_NOP },
611 	{ 0x700002, 0x700003, taitosound_comm16_msb_r },
612 
613 	{ 0xb00000, 0xb7ffff, MRA16_RAM },
614 MEMORY_END
615 
616 static MEMORY_WRITE16_START( hitice_writemem )
617 	{ 0x000000, 0x07ffff, MWA16_ROM },
618 	{ 0x800000, 0x803fff, MWA16_RAM },	/* Main RAM */
619 
620 	{ 0xa00000, 0xa01fff, paletteram16_RRRRGGGGBBBBxxxx_word_w, &paletteram16 },
621 
622 	TC0180VCU_MEMW( 0x400000 )
623 
624 	{ 0x600000, 0x60000f, TC0220IOC_halfword_byteswap_w },
625 
626 	{ 0x700000, 0x700001, taitosound_port16_msb_w },
627 	{ 0x700002, 0x700003, taitosound_comm16_msb_w },
628 
629 	{ 0xb00000, 0xb7ffff, hitice_pixelram_w, &taitob_pixelram },
630 /*	{ 0xbffff0, 0xbffff1, ???*/
631 	{ 0xbffff2, 0xbffff5, hitice_pixel_scroll_w },
632 /*	{ 0xbffffa, 0xbffffb, ???*/
633 MEMORY_END
634 
635 
636 static MEMORY_READ16_START( rambo3_readmem )
637 	{ 0x000000, 0x07ffff, MRA16_ROM },
638 	{ 0x800000, 0x803fff, MRA16_RAM },	/* Main RAM */
639 
640 	{ 0xa00000, 0xa01fff, MRA16_RAM },
641 
642 	TC0180VCU_MEMR( 0x400000 )
643 
644 	{ 0x600000, 0x60000f, TC0220IOC_halfword_byteswap_r },
645 	{ 0x600010, 0x600011, tracky1_lo_r }, /*player 1*/
646 	{ 0x600012, 0x600013, tracky1_hi_r },
647 	{ 0x600014, 0x600015, trackx1_lo_r },
648 	{ 0x600016, 0x600017, trackx1_hi_r },
649 	{ 0x600018, 0x600019, tracky2_lo_r }, /*player 2*/
650 	{ 0x60001a, 0x60001b, tracky2_hi_r },
651 	{ 0x60001c, 0x60001d, trackx2_lo_r },
652 	{ 0x60001e, 0x60001f, trackx2_hi_r },
653 
654 	{ 0x200000, 0x200001, MRA16_NOP },
655 	{ 0x200002, 0x200003, taitosound_comm16_msb_r },
656 MEMORY_END
657 
658 static MEMORY_WRITE16_START( rambo3_writemem )
659 	{ 0x000000, 0x07ffff, MWA16_ROM },
660 	{ 0x800000, 0x803fff, MWA16_RAM },	/* Main RAM */
661 
662 	{ 0xa00000, 0xa01fff, paletteram16_RRRRGGGGBBBBxxxx_word_w, &paletteram16 },
663 
664 	TC0180VCU_MEMW( 0x400000 )
665 
666 	{ 0x600000, 0x60000f, TC0220IOC_halfword_byteswap_w },
667 
668 	{ 0x200000, 0x200001, taitosound_port16_msb_w },
669 	{ 0x200002, 0x200003, taitosound_comm16_msb_w },
670 MEMORY_END
671 
672 
673 static MEMORY_READ16_START( pbobble_readmem )
674 	{ 0x000000, 0x07ffff, MRA16_ROM },
675 	{ 0x900000, 0x90ffff, MRA16_RAM },	/* Main RAM */
676 
677 	{ 0x800000, 0x801fff, MRA16_RAM },
678 
679 	TC0180VCU_MEMR( 0x400000 )
680 
681 	{ 0x500000, 0x50000f, pbobble_input_bypass_r },
682 	{ 0x500024, 0x500025, input_port_5_word_r },	/* shown in service mode, game omits to read it */
683 	{ 0x500026, 0x500027, eep_latch_r },	/* not read by this game */
684 	{ 0x50002e, 0x50002f, input_port_6_word_r },	/* shown in service mode, game omits to read it */
685 
686 	{ 0x700000, 0x700001, MRA16_NOP },
687 	{ 0x700002, 0x700003, taitosound_comm16_msb_r },
688 MEMORY_END
689 
690 static MEMORY_WRITE16_START( pbobble_writemem )
691 	{ 0x000000, 0x07ffff, MWA16_ROM },
692 	{ 0x900000, 0x90ffff, MWA16_RAM },	/* Main RAM */
693 
694 	{ 0x800000, 0x801fff, paletteram16_RRRRGGGGBBBBRGBx_word_w, &paletteram16 },
695 
696 	TC0180VCU_MEMW( 0x400000 )
697 
698 	{ 0x500000, 0x50000f, TC0640FIO_halfword_byteswap_w },
699 	{ 0x500026, 0x500027, eeprom_w },
700 	{ 0x500028, 0x500029, player_34_coin_ctrl_w },	/* simply locks coins 3&4 out */
701 
702 	{ 0x700000, 0x700001, taitosound_port16_msb_w },
703 	{ 0x700002, 0x700003, taitosound_comm16_msb_w },
704 	{ 0x600000, 0x600003, gain_control_w },
705 MEMORY_END
706 
707 static MEMORY_READ16_START( spacedx_readmem )
708 	{ 0x000000, 0x07ffff, MRA16_ROM },
709 	{ 0x900000, 0x90ffff, MRA16_RAM },	/* Main RAM */
710 
711 	{ 0x800000, 0x801fff, MRA16_RAM },
712 
713 	TC0180VCU_MEMR( 0x400000 )
714 
715 	{ 0x500000, 0x50000f, pbobble_input_bypass_r },
716 	{ 0x500024, 0x500025, input_port_5_word_r },
717 	{ 0x500026, 0x500027, eep_latch_r },
718 	{ 0x50002e, 0x50002f, input_port_6_word_r },
719 
720 	{ 0x700000, 0x700001, MRA16_NOP },
721 	{ 0x700002, 0x700003, taitosound_comm16_msb_r },
722 MEMORY_END
723 
724 static MEMORY_WRITE16_START( spacedx_writemem )
725 	{ 0x000000, 0x07ffff, MWA16_ROM },
726 	{ 0x900000, 0x90ffff, MWA16_RAM },	/* Main RAM */
727 
728 	{ 0x800000, 0x801fff, paletteram16_RRRRGGGGBBBBRGBx_word_w, &paletteram16 },
729 
730 	TC0180VCU_MEMW( 0x400000 )
731 
732 	{ 0x500000, 0x50000f, TC0640FIO_halfword_byteswap_w },
733 	{ 0x500026, 0x500027, eeprom_w },
734 	{ 0x500028, 0x500029, player_34_coin_ctrl_w },	/* simply locks coins 3&4 out */
735 
736 	{ 0x700000, 0x700001, taitosound_port16_msb_w },
737 	{ 0x700002, 0x700003, taitosound_comm16_msb_w },
738 	{ 0x600000, 0x600003, gain_control_w },
739 MEMORY_END
740 
741 static MEMORY_READ16_START( spacedxo_readmem )
742 	{ 0x000000, 0x07ffff, MRA16_ROM },
743 	{ 0x400000, 0x40ffff, MRA16_RAM },	/* Main RAM */
744 
745 	{ 0x300000, 0x303fff, MRA16_RAM },
746 
747 	TC0180VCU_MEMR( 0x500000 )
748 
749 	{ 0x200000, 0x20000f, TC0220IOC_halfword_r },
750 	{ 0x210000, 0x210001, input_port_5_word_r },
751 	{ 0x220000, 0x220001, input_port_6_word_r },
752 	{ 0x230000, 0x230001, input_port_7_word_r },
753 
754 	{ 0x100000, 0x100001, MRA16_NOP },
755 	{ 0x100002, 0x100003, taitosound_comm16_msb_r },
756 MEMORY_END
757 
758 static MEMORY_WRITE16_START( spacedxo_writemem )
759 	{ 0x000000, 0x07ffff, MWA16_ROM },
760 	{ 0x400000, 0x40ffff, MWA16_RAM },	/* Main RAM */
761 
762 	{ 0x300000, 0x301fff, paletteram16_RRRRGGGGBBBBRGBx_word_w, &paletteram16 },
763 
764 	TC0180VCU_MEMW( 0x500000 )
765 
766 	{ 0x200000, 0x20000f, TC0220IOC_halfword_w },
767 
768 	{ 0x100000, 0x100001, taitosound_port16_msb_w },
769 	{ 0x100002, 0x100003, taitosound_comm16_msb_w },
770 MEMORY_END
771 
772 static MEMORY_READ16_START( qzshowby_readmem )
773 	{ 0x000000, 0x0fffff, MRA16_ROM },
774 	{ 0x900000, 0x90ffff, MRA16_RAM },	/* Main RAM */
775 
776 	{ 0x800000, 0x801fff, MRA16_RAM },
777 
778 	TC0180VCU_MEMR( 0x400000 )
779 
780 	{ 0x200000, 0x20000f, pbobble_input_bypass_r },
781 	{ 0x200024, 0x200025, input_port_5_word_r },	/* player 3,4 start */
782 	{ 0x200028, 0x200029, player_34_coin_ctrl_r },
783 	{ 0x20002e, 0x20002f, input_port_6_word_r },	/* player 3,4 buttons */
784 
785 	{ 0x600000, 0x600001, MRA16_NOP },
786 	{ 0x600002, 0x600003, taitosound_comm16_msb_r },
787 MEMORY_END
788 
789 static MEMORY_WRITE16_START( qzshowby_writemem )
790 	{ 0x000000, 0x0fffff, MWA16_ROM },
791 	{ 0x900000, 0x90ffff, MWA16_RAM },	/* Main RAM */
792 
793 	{ 0x800000, 0x801fff, paletteram16_RRRRGGGGBBBBRGBx_word_w, &paletteram16 },
794 
795 	TC0180VCU_MEMW( 0x400000 )
796 
797 	{ 0x200000, 0x20000f, TC0640FIO_halfword_byteswap_w },
798 	{ 0x200026, 0x200027, eeprom_w },
799 	{ 0x200028, 0x200029, player_34_coin_ctrl_w },
800 
801 	{ 0x600000, 0x600001, taitosound_port16_msb_w },
802 	{ 0x600002, 0x600003, taitosound_comm16_msb_w },
803 	{ 0x700000, 0x700003, gain_control_w },
804 MEMORY_END
805 
806 
807 static MEMORY_READ16_START( viofight_readmem )
808 	{ 0x000000, 0x07ffff, MRA16_ROM },
809 	{ 0xa00000, 0xa03fff, MRA16_RAM },	/* Main RAM */
810 
811 	{ 0x600000, 0x601fff, MRA16_RAM },
812 
813 	TC0180VCU_MEMR( 0x400000 )
814 
815 	{ 0x800000, 0x80000f, TC0220IOC_halfword_byteswap_r },
816 
817 	{ 0x200000, 0x200001, MRA16_NOP },
818 	{ 0x200002, 0x200003, taitosound_comm16_msb_r },
819 MEMORY_END
820 
821 static MEMORY_WRITE16_START( viofight_writemem )
822 	{ 0x000000, 0x07ffff, MWA16_ROM },
823 	{ 0xa00000, 0xa03fff, MWA16_RAM },	/* Main RAM */
824 
825 	{ 0x600000, 0x601fff, paletteram16_RRRRGGGGBBBBxxxx_word_w, &paletteram16 },
826 
827 	TC0180VCU_MEMW( 0x400000 )
828 
829 	{ 0x800000, 0x80000f, TC0220IOC_halfword_byteswap_w },
830 
831 	{ 0x200000, 0x200001, taitosound_port16_msb_w },
832 	{ 0x200002, 0x200003, taitosound_comm16_msb_w },
833 MEMORY_END
834 
835 
836 static MEMORY_READ16_START( masterw_readmem )
837 	{ 0x000000, 0x07ffff, MRA16_ROM },
838 	{ 0x200000, 0x203fff, MRA16_RAM },			/* Main RAM */
839 
840 	{ 0x600000, 0x601fff, MRA16_RAM },	/*palette*/
841 
842 	TC0180VCU_MEMR( 0x400000 )
843 
844 	{ 0x800000, 0x800001, TC0220IOC_halfword_byteswap_portreg_r },	/* DSW A/B, player inputs*/
845 	{ 0x800002, 0x800003, TC0220IOC_halfword_byteswap_port_r /*watchdog_reset16_r*/ },
846 
847 	{ 0xa00000, 0xa00001, MRA16_NOP },
848 	{ 0xa00002, 0xa00003, taitosound_comm16_msb_r },
849 MEMORY_END
850 
851 static MEMORY_WRITE16_START( masterw_writemem )
852 	{ 0x000000, 0x07ffff, MWA16_ROM },
853 	{ 0x200000, 0x203fff, MWA16_RAM },	/* Main RAM */
854 
855 	{ 0x600000, 0x601fff, paletteram16_RRRRGGGGBBBBxxxx_word_w, &paletteram16 },
856 
857 	TC0180VCU_MEMW( 0x400000 )
858 
859 	{ 0x800000, 0x800001, TC0220IOC_halfword_byteswap_portreg_w },
860 	{ 0x800002, 0x800003, TC0220IOC_halfword_byteswap_port_w },
861 
862 	{ 0xa00000, 0xa00001, taitosound_port16_msb_w },
863 	{ 0xa00002, 0xa00003, taitosound_comm16_msb_w },
864 MEMORY_END
865 
866 
867 static MEMORY_READ16_START( silentd_readmem )
868 	{ 0x000000, 0x07ffff, MRA16_ROM },
869 	{ 0x400000, 0x403fff, MRA16_RAM },	/* Main RAM */
870 
871 	{ 0x300000, 0x301fff, MRA16_RAM },
872 
873 	TC0180VCU_MEMR( 0x500000 )
874 
875 	{ 0x200000, 0x20000f, TC0220IOC_halfword_r },
876 	{ 0x210000, 0x210001, input_port_5_word_r },
877 	{ 0x220000, 0x220001, input_port_6_word_r },
878 	{ 0x230000, 0x230001, input_port_7_word_r },
879 /*	{ 0x240000, 0x240001, MRA16_NOP },	 // read 4 times at init /*/
880 
881 	{ 0x100000, 0x100001, MRA16_NOP },
882 	{ 0x100002, 0x100003, taitosound_comm16_msb_r },
883 /*	{ 0x10001a, 0x10001b, MRA16_NOP },	*/ /* ??? read at $1e344*/
884 /*	{ 0x10001c, 0x10001d, MRA16_NOP },	*/ /* ??? read at $1e356*/
885 MEMORY_END
886 
887 static MEMORY_WRITE16_START( silentd_writemem )
888 	{ 0x000000, 0x07ffff, MWA16_ROM },
889 	{ 0x400000, 0x403fff, MWA16_RAM },	/* Main RAM */
890 
891 	{ 0x300000, 0x301fff, paletteram16_RRRRGGGGBBBBRGBx_word_w, &paletteram16 },
892 
893 	TC0180VCU_MEMW( 0x500000 )
894 
895 	{ 0x200000, 0x20000f, TC0220IOC_halfword_w },
896 	{ 0x240000, 0x240001, MWA16_NOP }, /* ???*/
897 
898 	{ 0x100000, 0x100001, taitosound_port16_msb_w },
899 	{ 0x100002, 0x100003, taitosound_comm16_msb_w },
900 MEMORY_END
901 
902 
903 static MEMORY_READ16_START( selfeena_readmem )
904 	{ 0x000000, 0x07ffff, MRA16_ROM },
905 	{ 0x100000, 0x103fff, MRA16_RAM },	/* Main RAM */
906 
907 	{ 0x300000, 0x301fff, MRA16_RAM },
908 
909 	TC0180VCU_MEMR( 0x200000 )
910 
911 	{ 0x400000, 0x40000f, TC0220IOC_halfword_byteswap_r },
912 	{ 0x410000, 0x41000f, TC0220IOC_halfword_byteswap_r }, /* mirror address - seems to be only used for coin control */
913 
914 	{ 0x500000, 0x500001, MRA16_NOP },
915 	{ 0x500002, 0x500003, taitosound_comm16_msb_r },
916 MEMORY_END
917 
918 static MEMORY_WRITE16_START( selfeena_writemem )
919 	{ 0x000000, 0x07ffff, MWA16_ROM },
920 	{ 0x100000, 0x103fff, MWA16_RAM },	/* Main RAM */
921 
922 	{ 0x300000, 0x301fff, paletteram16_RRRRGGGGBBBBRGBx_word_w, &paletteram16 },
923 
924 	TC0180VCU_MEMW( 0x200000 )
925 
926 	{ 0x400000, 0x40000f, TC0220IOC_halfword_byteswap_w },
927 	{ 0x410000, 0x41000f, TC0220IOC_halfword_byteswap_w }, /* mirror address - seems to be only used for coin control */
928 
929 	{ 0x500000, 0x500001, taitosound_port16_msb_w },
930 	{ 0x500002, 0x500003, taitosound_comm16_msb_w },
931 MEMORY_END
932 
933 
934 static MEMORY_READ16_START( sbm_readmem )
935 	{ 0x000000, 0x07ffff, MRA16_ROM },
936 	{ 0x100000, 0x10ffff, MRA16_RAM },	/* Main RAM */
937 
938 	{ 0x200000, 0x201fff, MRA16_RAM },
939 
940 	TC0180VCU_MEMR( 0x900000 )
941 
942 	{ 0x300000, 0x30000f, TC0510NIO_halfword_wordswap_r },
943 
944 	{ 0x320000, 0x320001, MRA16_NOP },
945 	{ 0x320002, 0x320003, taitosound_comm16_msb_r },
946 MEMORY_END
947 
948 static MEMORY_WRITE16_START( sbm_writemem )
949 	{ 0x000000, 0x07ffff, MWA16_ROM },
950 	{ 0x100000, 0x10ffff, MWA16_RAM },	/* Main RAM */
951 
952 	{ 0x200000, 0x201fff, paletteram16_RRRRGGGGBBBBxxxx_word_w, &paletteram16 },
953 
954 	TC0180VCU_MEMW( 0x900000 )
955 
956 	{ 0x300000, 0x30000f, TC0510NIO_halfword_wordswap_w },
957 
958 	{ 0x320000, 0x320001, taitosound_port16_msb_w },
959 	{ 0x320002, 0x320003, taitosound_comm16_msb_w },
960 MEMORY_END
961 
962 
963 
964 static MEMORY_READ_START( masterw_sound_readmem )
965 	{ 0x0000, 0x3fff, MRA_ROM },
966 	{ 0x4000, 0x7fff, MRA_BANK1 },
967 	{ 0x8000, 0x8fff, MRA_RAM },
968 	{ 0x9000, 0x9000, YM2203_status_port_0_r },
969 	{ 0xa001, 0xa001, taitosound_slave_comm_r },
970 MEMORY_END
971 
972 static MEMORY_WRITE_START( masterw_sound_writemem )
973 	{ 0x0000, 0x7fff, MWA_ROM },
974 	{ 0x8000, 0x8fff, MWA_RAM },
975 	{ 0x9000, 0x9000, YM2203_control_port_0_w },
976 	{ 0x9001, 0x9001, YM2203_write_port_0_w },
977 	{ 0xa000, 0xa000, taitosound_slave_port_w },
978 	{ 0xa001, 0xa001, taitosound_slave_comm_w },
979 MEMORY_END
980 
981 static MEMORY_READ_START( sound_readmem )
982 	{ 0x0000, 0x3fff, MRA_ROM },
983 	{ 0x4000, 0x7fff, MRA_BANK1 },
984 	{ 0xc000, 0xdfff, MRA_RAM },
985 	{ 0xe000, 0xe000, YM2610_status_port_0_A_r },
986 	{ 0xe001, 0xe001, YM2610_read_port_0_r },
987 	{ 0xe002, 0xe002, YM2610_status_port_0_B_r },
988 	{ 0xe200, 0xe200, MRA_NOP },
989 	{ 0xe201, 0xe201, taitosound_slave_comm_r },
990 	{ 0xea00, 0xea00, MRA_NOP },
991 MEMORY_END
992 
993 static MEMORY_WRITE_START( sound_writemem )
994 	{ 0x0000, 0x7fff, MWA_ROM },
995 	{ 0xc000, 0xdfff, MWA_RAM },
996 	{ 0xe000, 0xe000, YM2610_control_port_0_A_w },
997 	{ 0xe001, 0xe001, YM2610_data_port_0_A_w },
998 	{ 0xe002, 0xe002, YM2610_control_port_0_B_w },
999 	{ 0xe003, 0xe003, YM2610_data_port_0_B_w },
1000 	{ 0xe200, 0xe200, taitosound_slave_port_w },
1001 	{ 0xe201, 0xe201, taitosound_slave_comm_w },
1002 	{ 0xe400, 0xe403, MWA_NOP }, /* pan */
1003 	{ 0xe600, 0xe600, MWA_NOP }, /* ? */
1004 	{ 0xee00, 0xee00, MWA_NOP }, /* ? */
1005 	{ 0xf000, 0xf000, MWA_NOP }, /* ? */
1006 	{ 0xf200, 0xf200, bankswitch_w },
1007 MEMORY_END
1008 
1009 static MEMORY_READ_START( hitice_sound_readmem )
1010 	{ 0x0000, 0x3fff, MRA_ROM },
1011 	{ 0x4000, 0x7fff, MRA_BANK1 },
1012 	{ 0x8000, 0x8fff, MRA_RAM },
1013 	{ 0x9000, 0x9000, YM2203_status_port_0_r },
1014 	{ 0xb000, 0xb000, OKIM6295_status_0_r },
1015 	{ 0xa001, 0xa001, taitosound_slave_comm_r },
1016 MEMORY_END
1017 
1018 static MEMORY_WRITE_START( hitice_sound_writemem )
1019 	{ 0x0000, 0x7fff, MWA_ROM },
1020 	{ 0x8000, 0x8fff, MWA_RAM },
1021 	{ 0x9000, 0x9000, YM2203_control_port_0_w },
1022 	{ 0x9001, 0x9001, YM2203_write_port_0_w },
1023 	{ 0xb000, 0xb000, OKIM6295_data_0_w },
1024 	{ 0xb001, 0xb001, OKIM6295_data_1_w },
1025 	{ 0xa000, 0xa000, taitosound_slave_port_w },
1026 	{ 0xa001, 0xa001, taitosound_slave_comm_w },
1027 MEMORY_END
1028 
1029 static MEMORY_WRITE_START( viofight_sound_writemem )
1030 	{ 0x0000, 0x7fff, MWA_ROM },
1031 	{ 0x8000, 0x8fff, MWA_RAM },
1032 	{ 0x9000, 0x9000, YM2203_control_port_0_w },
1033 	{ 0x9001, 0x9001, YM2203_write_port_0_w },
1034 	{ 0xb000, 0xb001, OKIM6295_data_0_w },		/* yes, both addresses for the same chip */
1035 	{ 0xa000, 0xa000, taitosound_slave_port_w },
1036 	{ 0xa001, 0xa001, taitosound_slave_comm_w },
1037 MEMORY_END
1038 
1039 
1040 /***********************************************************
1041 			 INPUT PORTS, DIPs
1042 ***********************************************************/
1043 
1044 #define TAITO_COINAGE_JAPAN_8 \
1045 	PORT_DIPNAME( 0x30, 0x30, DEF_STR( Coin_A ) ) \
1046 	PORT_DIPSETTING(    0x10, DEF_STR( 2C_1C ) ) \
1047 	PORT_DIPSETTING(    0x30, DEF_STR( 1C_1C ) ) \
1048 	PORT_DIPSETTING(    0x00, DEF_STR( 2C_3C ) ) \
1049 	PORT_DIPSETTING(    0x20, DEF_STR( 1C_2C ) ) \
1050 	PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Coin_B ) ) \
1051 	PORT_DIPSETTING(    0x40, DEF_STR( 2C_1C ) ) \
1052 	PORT_DIPSETTING(    0xc0, DEF_STR( 1C_1C ) ) \
1053 	PORT_DIPSETTING(    0x00, DEF_STR( 2C_3C ) ) \
1054 	PORT_DIPSETTING(    0x80, DEF_STR( 1C_2C ) )
1055 
1056 #define TAITO_COINAGE_WORLD_8 \
1057 	PORT_DIPNAME( 0x30, 0x30, DEF_STR( Coin_A ) ) \
1058 	PORT_DIPSETTING(    0x00, DEF_STR( 4C_1C ) ) \
1059 	PORT_DIPSETTING(    0x10, DEF_STR( 3C_1C ) ) \
1060 	PORT_DIPSETTING(    0x20, DEF_STR( 2C_1C ) ) \
1061 	PORT_DIPSETTING(    0x30, DEF_STR( 1C_1C ) ) \
1062 	PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Coin_B ) ) \
1063 	PORT_DIPSETTING(    0xc0, DEF_STR( 1C_2C ) ) \
1064 	PORT_DIPSETTING(    0x80, DEF_STR( 1C_3C ) ) \
1065 	PORT_DIPSETTING(    0x40, DEF_STR( 1C_4C ) ) \
1066 	PORT_DIPSETTING(    0x00, DEF_STR( 1C_6C ) )
1067 
1068 #define TAITO_COINAGE_US_8 \
1069 	PORT_DIPNAME( 0x30, 0x30, DEF_STR( Coinage ) ) \
1070 	PORT_DIPSETTING(    0x00, DEF_STR( 4C_1C ) ) \
1071 	PORT_DIPSETTING(    0x10, DEF_STR( 3C_1C ) ) \
1072 	PORT_DIPSETTING(    0x20, DEF_STR( 2C_1C ) ) \
1073 	PORT_DIPSETTING(    0x30, DEF_STR( 1C_1C ) ) \
1074 	PORT_DIPNAME( 0xc0, 0xc0, "Price to Continue" ) \
1075 	PORT_DIPSETTING(    0x00, DEF_STR( 3C_1C ) ) \
1076 	PORT_DIPSETTING(    0x40, DEF_STR( 2C_1C ) ) \
1077 	PORT_DIPSETTING(    0x80, DEF_STR( 1C_1C ) ) \
1078 	PORT_DIPSETTING(    0xc0, "Same as Start" )
1079 
1080 #define TAITO_COINAGE_JAPAN_NEW_8 \
1081 	PORT_DIPNAME( 0x30, 0x30, DEF_STR( Coin_A ) ) \
1082 	PORT_DIPSETTING(    0x00, DEF_STR( 3C_1C ) ) \
1083 	PORT_DIPSETTING(    0x10, DEF_STR( 2C_1C ) ) \
1084 	PORT_DIPSETTING(    0x30, DEF_STR( 1C_1C ) ) \
1085 	PORT_DIPSETTING(    0x20, DEF_STR( 1C_2C ) ) \
1086 	PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Coin_B ) ) \
1087 	PORT_DIPSETTING(    0x00, DEF_STR( 3C_1C ) ) \
1088 	PORT_DIPSETTING(    0x40, DEF_STR( 2C_1C ) ) \
1089 	PORT_DIPSETTING(    0xc0, DEF_STR( 1C_1C ) ) \
1090 	PORT_DIPSETTING(    0x80, DEF_STR( 1C_2C ) )
1091 
1092 #define TAITO_DIFFICULTY_8 \
1093 	PORT_DIPNAME( 0x03, 0x03, DEF_STR( Difficulty ) ) \
1094 	PORT_DIPSETTING(    0x02, "Easy" ) \
1095 	PORT_DIPSETTING(    0x03, "Medium" ) \
1096 	PORT_DIPSETTING(    0x01, "Hard" ) \
1097 	PORT_DIPSETTING(    0x00, "Hardest" )
1098 
1099 
1100 /* Included only the bits that are common to all sets (viofight has 3 buttons) */
1101 #define TAITO_B_PLAYERS_INPUT( player ) \
1102 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | player ) \
1103 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | player ) \
1104 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | player ) \
1105 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | player ) \
1106 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 | player ) \
1107 	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 | player )
1108 
1109 #define TAITO_B_SYSTEM_INPUT \
1110 	PORT_START \
1111 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_TILT ) \
1112 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE1 ) \
1113 	PORT_BIT_IMPULSE( 0x04, IP_ACTIVE_LOW, IPT_COIN1, 2 ) \
1114 	PORT_BIT_IMPULSE( 0x08, IP_ACTIVE_LOW, IPT_COIN2, 2 ) \
1115 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) \
1116 	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) \
1117 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START1 ) \
1118 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 )
1119 
1120 #define TAITO_B_DSWA_2_4 \
1121 	PORT_DIPNAME( 0x02, 0x02, DEF_STR( Flip_Screen ) ) \
1122 	PORT_DIPSETTING(    0x02, DEF_STR( Off )) \
1123 	PORT_DIPSETTING(    0x00, DEF_STR( On )) \
1124 	PORT_SERVICE( 0x04, IP_ACTIVE_LOW ) \
1125 	PORT_DIPNAME( 0x08, 0x08, DEF_STR( Demo_Sounds ) ) \
1126 	PORT_DIPSETTING(    0x00, DEF_STR( Off )) \
1127 	PORT_DIPSETTING(    0x08, DEF_STR( On ))
1128 
1129 
1130 INPUT_PORTS_START( rastsag2 )
1131 	PORT_START /* DSW A */
1132 	PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unused ) )  /* all 2 "unused" in manual*/
1133 	PORT_DIPSETTING(    0x01, DEF_STR( Off ))
1134 	PORT_DIPSETTING(    0x00, DEF_STR( On ))
1135 	TAITO_B_DSWA_2_4
1136 	TAITO_COINAGE_JAPAN_8
1137 
1138 	PORT_START /* DSW B */
1139 	TAITO_DIFFICULTY_8
1140 	PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Bonus_Life ) )
1141 	PORT_DIPSETTING(    0x0c, "100k only" )
1142 	PORT_DIPSETTING(    0x08, "150k only" )
1143 	PORT_DIPSETTING(    0x04, "200k only" )
1144 	PORT_DIPSETTING(    0x00, "250k only" )
1145 	PORT_DIPNAME( 0x30, 0x30, DEF_STR( Lives ) )
1146 	PORT_DIPSETTING(    0x20, "1" )
1147 	PORT_DIPSETTING(    0x10, "2" )
1148 	PORT_DIPSETTING(    0x30, "3" )
1149 	PORT_DIPSETTING(    0x00, "5" )
1150 	PORT_DIPNAME( 0x40, 0x40, "Allow Continue" )
1151 	PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
1152 	PORT_DIPSETTING(    0x40, DEF_STR( On ) )
1153 	PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unused ) )
1154 	PORT_DIPSETTING(    0x80, DEF_STR( Off ))
1155 	PORT_DIPSETTING(    0x00, DEF_STR( On ))
1156 
1157 	PORT_START      /* IN0 */
1158 	TAITO_B_PLAYERS_INPUT( IPF_PLAYER1 )
1159 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
1160 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
1161 
1162 	PORT_START      /* IN1 */
1163 	TAITO_B_PLAYERS_INPUT( IPF_PLAYER2 )
1164 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
1165 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
1166 
1167 	/* IN2 */
1168 	TAITO_B_SYSTEM_INPUT
1169 INPUT_PORTS_END
1170 
1171 INPUT_PORTS_START( nastar )
1172 	PORT_START /* DSW A */
1173 	PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unused ) )
1174 	PORT_DIPSETTING(    0x01, DEF_STR( Off ))
1175 	PORT_DIPSETTING(    0x00, DEF_STR( On ))
1176 	TAITO_B_DSWA_2_4
1177 	TAITO_COINAGE_WORLD_8
1178 
1179 	PORT_START /* DSW B */
1180 	TAITO_DIFFICULTY_8
1181 	PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Bonus_Life ) )
1182 	PORT_DIPSETTING(    0x0c, "100k only" )
1183 	PORT_DIPSETTING(    0x08, "150k only" )
1184 	PORT_DIPSETTING(    0x04, "200k only" )
1185 	PORT_DIPSETTING(    0x00, "250k only" )
1186 	PORT_DIPNAME( 0x30, 0x30, DEF_STR( Lives ) )
1187 	PORT_DIPSETTING(    0x20, "1" )
1188 	PORT_DIPSETTING(    0x10, "2" )
1189 	PORT_DIPSETTING(    0x30, "3" )
1190 	PORT_DIPSETTING(    0x00, "5" )
1191 	PORT_DIPNAME( 0x40, 0x40, "Allow Continue" )
1192 	PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
1193 	PORT_DIPSETTING(    0x40, DEF_STR( On ) )
1194 	PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unused ) )
1195 	PORT_DIPSETTING(    0x80, DEF_STR( Off ))
1196 	PORT_DIPSETTING(    0x00, DEF_STR( On ))
1197 
1198 	PORT_START      /* IN0 */
1199 	TAITO_B_PLAYERS_INPUT( IPF_PLAYER1 )
1200 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
1201 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
1202 
1203 	PORT_START      /* IN1 */
1204 	TAITO_B_PLAYERS_INPUT( IPF_PLAYER2 )
1205 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
1206 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
1207 
1208 	/* IN2 */
1209 	TAITO_B_SYSTEM_INPUT
1210 INPUT_PORTS_END
1211 
1212 INPUT_PORTS_START( nastarw )
1213 	PORT_START /* DSW A */
1214 	PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unused ) )
1215 	PORT_DIPSETTING(    0x01, DEF_STR( Off ))
1216 	PORT_DIPSETTING(    0x00, DEF_STR( On ))
1217 	TAITO_B_DSWA_2_4
1218 	TAITO_COINAGE_US_8
1219 
1220 	PORT_START /* DSW B */
1221 	TAITO_DIFFICULTY_8
1222 	PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Bonus_Life ) )
1223 	PORT_DIPSETTING(    0x0c, "100k only" )
1224 	PORT_DIPSETTING(    0x08, "150k only" )
1225 	PORT_DIPSETTING(    0x04, "200k only" )
1226 	PORT_DIPSETTING(    0x00, "250k only" )
1227 	PORT_DIPNAME( 0x30, 0x30, DEF_STR( Lives ) )
1228 	PORT_DIPSETTING(    0x20, "1" )
1229 	PORT_DIPSETTING(    0x10, "2" )
1230 	PORT_DIPSETTING(    0x30, "3" )
1231 	PORT_DIPSETTING(    0x00, "5" )
1232 	PORT_DIPNAME( 0x40, 0x40, "Allow Continue" )
1233 	PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
1234 	PORT_DIPSETTING(    0x40, DEF_STR( On ) )
1235 	PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unused ) )
1236 	PORT_DIPSETTING(    0x80, DEF_STR( Off ))
1237 	PORT_DIPSETTING(    0x00, DEF_STR( On ))
1238 
1239 	PORT_START      /* IN0 */
1240 	TAITO_B_PLAYERS_INPUT( IPF_PLAYER1 )
1241 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
1242 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
1243 
1244 	PORT_START      /* IN1 */
1245 	TAITO_B_PLAYERS_INPUT( IPF_PLAYER2 )
1246 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
1247 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
1248 
1249 	/* IN2 */
1250 	TAITO_B_SYSTEM_INPUT
1251 INPUT_PORTS_END
1252 
1253 INPUT_PORTS_START( masterw )
1254 	PORT_START /* DSW A */
1255 	PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) )
1256 	PORT_DIPSETTING(    0x01, DEF_STR( Off ))
1257 	PORT_DIPSETTING(    0x00, DEF_STR( On ))
1258 	TAITO_B_DSWA_2_4
1259 	TAITO_COINAGE_WORLD_8
1260 
1261 	PORT_START /* DSW B */
1262 	TAITO_DIFFICULTY_8
1263 	PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Bonus_Life ) )
1264 	PORT_DIPSETTING(    0x08, "500k, 1000k and 1500k" )
1265 	PORT_DIPSETTING(    0x0c, "500k and 1000k" )
1266 	PORT_DIPSETTING(    0x04, "500k only" )
1267 	PORT_DIPSETTING(    0x00, "None" )
1268 	PORT_DIPNAME( 0x30, 0x30, DEF_STR( Lives ) )
1269 	PORT_DIPSETTING(    0x30, "3" )
1270 	PORT_DIPSETTING(    0x20, "4" )
1271 	PORT_DIPSETTING(    0x10, "5" )
1272 	PORT_DIPSETTING(    0x00, "6" )
1273 	PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
1274 	PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
1275 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
1276 	PORT_DIPNAME( 0x80, 0x80, "Ship" )
1277 	PORT_DIPSETTING(    0x80, "Default" )
1278 	PORT_DIPSETTING(    0x00, "Alternate" )
1279 
1280 	PORT_START      /* IN0 */
1281 	TAITO_B_PLAYERS_INPUT( IPF_PLAYER1 )
1282 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
1283 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
1284 
1285 	PORT_START      /* IN1 */
1286 	TAITO_B_PLAYERS_INPUT( IPF_PLAYER2 )
1287 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
1288 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
1289 
1290 	/* IN2 */
1291 	TAITO_B_SYSTEM_INPUT
1292 
1293 INPUT_PORTS_END
1294 
1295 INPUT_PORTS_START( crimec )
1296 	PORT_START /* DSW A */
1297 	PORT_DIPNAME( 0x01, 0x01, "Hi Score" )
1298 	PORT_DIPSETTING(    0x01, "Scribble" )
1299 	PORT_DIPSETTING(    0x00, "3 Characters" )
1300 	TAITO_B_DSWA_2_4
1301 	TAITO_COINAGE_WORLD_8
1302 
1303 	PORT_START /* DSW B */
1304 	TAITO_DIFFICULTY_8
1305 	PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Bonus_Life ) )
1306 	PORT_DIPSETTING(    0x08, "every 80k" )
1307 	PORT_DIPSETTING(    0x0c, "80k only" )
1308 	PORT_DIPSETTING(    0x04, "160k only" )
1309 	PORT_DIPSETTING(    0x00, "None" )
1310 	PORT_DIPNAME( 0x30, 0x30, DEF_STR( Lives ) )
1311 	PORT_DIPSETTING(    0x10, "1" )
1312 	PORT_DIPSETTING(    0x20, "2" )
1313 	PORT_DIPSETTING(    0x30, "3" )
1314 	PORT_DIPSETTING(    0x00, "4" )
1315 	PORT_DIPNAME( 0xc0, 0xc0, "Allow Continue" )
1316 	PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
1317 	PORT_DIPSETTING( 0x40, "5 Times" )
1318 	PORT_DIPSETTING( 0x80, "8 Times" )
1319 	PORT_DIPSETTING( 0xc0, DEF_STR( On ) )
1320 
1321 	PORT_START      /* IN0 */
1322 	TAITO_B_PLAYERS_INPUT( IPF_PLAYER1 )
1323 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
1324 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
1325 
1326 	PORT_START      /* IN1 */
1327 	TAITO_B_PLAYERS_INPUT( IPF_PLAYER2 )
1328 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
1329 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
1330 
1331 	/* IN2 */
1332 	TAITO_B_SYSTEM_INPUT
1333 INPUT_PORTS_END
1334 
1335 INPUT_PORTS_START( crimecj )
1336 	PORT_START /* DSW A */
1337 	PORT_DIPNAME( 0x01, 0x01, "Hi Score" )
1338 	PORT_DIPSETTING(    0x01, "Scribble" )
1339 	PORT_DIPSETTING(    0x00, "3 Characters" )
1340 	TAITO_B_DSWA_2_4
1341 	TAITO_COINAGE_JAPAN_8
1342 
1343 	PORT_START /* DSW B */
1344 	TAITO_DIFFICULTY_8
1345 	PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Bonus_Life ) )
1346 	PORT_DIPSETTING(    0x08, "every 80k" )
1347 	PORT_DIPSETTING(    0x0c, "80k only" )
1348 	PORT_DIPSETTING(    0x04, "160k only" )
1349 	PORT_DIPSETTING(    0x00, "None" )
1350 	PORT_DIPNAME( 0x30, 0x30, DEF_STR( Lives ) )
1351 	PORT_DIPSETTING(    0x10, "1" )
1352 	PORT_DIPSETTING(    0x20, "2" )
1353 	PORT_DIPSETTING(    0x30, "3" )
1354 	PORT_DIPSETTING(    0x00, "4" )
1355 	PORT_DIPNAME( 0xc0, 0xc0, "Allow Continue" )
1356 	PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
1357 	PORT_DIPSETTING( 0x40, "5 Times" )
1358 	PORT_DIPSETTING( 0x80, "8 Times" )
1359 	PORT_DIPSETTING( 0xc0, DEF_STR( On ) )
1360 
1361 	PORT_START      /* IN0 */
1362 	TAITO_B_PLAYERS_INPUT( IPF_PLAYER1 )
1363 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
1364 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
1365 
1366 	PORT_START      /* IN1 */
1367 	TAITO_B_PLAYERS_INPUT( IPF_PLAYER2 )
1368 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
1369 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
1370 
1371 	/* IN2 */
1372 	TAITO_B_SYSTEM_INPUT
1373 INPUT_PORTS_END
1374 
1375 INPUT_PORTS_START( crimecu )
1376 	PORT_START /* DSW A */
1377 	PORT_DIPNAME( 0x01, 0x01, "Hi Score" )
1378 	PORT_DIPSETTING(    0x01, "Scribble" )
1379 	PORT_DIPSETTING(    0x00, "3 Characters" )
1380 	TAITO_B_DSWA_2_4
1381 	TAITO_COINAGE_US_8
1382 
1383 	PORT_START /* DSW B */
1384 	TAITO_DIFFICULTY_8
1385 	PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Bonus_Life ) )
1386 	PORT_DIPSETTING(    0x08, "every 80k" )
1387 	PORT_DIPSETTING(    0x0c, "80k only" )
1388 	PORT_DIPSETTING(    0x04, "160k only" )
1389 	PORT_DIPSETTING(    0x00, "None" )
1390 	PORT_DIPNAME( 0x30, 0x30, DEF_STR( Lives ) )
1391 	PORT_DIPSETTING(    0x10, "1" )
1392 	PORT_DIPSETTING(    0x20, "2" )
1393 	PORT_DIPSETTING(    0x30, "3" )
1394 	PORT_DIPSETTING(    0x00, "4" )
1395 	PORT_DIPNAME( 0xc0, 0xc0, "Allow Continue" )
1396 	PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
1397 	PORT_DIPSETTING( 0x40, "5 Times" )
1398 	PORT_DIPSETTING( 0x80, "8 Times" )
1399 	PORT_DIPSETTING( 0xc0, DEF_STR( On ) )
1400 
1401 
1402 	PORT_START      /* IN0 */
1403 	TAITO_B_PLAYERS_INPUT( IPF_PLAYER1 )
1404 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
1405 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
1406 
1407 	PORT_START      /* IN1 */
1408 	TAITO_B_PLAYERS_INPUT( IPF_PLAYER2 )
1409 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
1410 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
1411 
1412 	/* IN2 */
1413 	TAITO_B_SYSTEM_INPUT
1414 INPUT_PORTS_END
1415 
1416 INPUT_PORTS_START( tetrist )
1417 	PORT_START /* DSW A */
1418 	PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) )
1419 	PORT_DIPSETTING(    0x01, DEF_STR( Off ))
1420 	PORT_DIPSETTING(    0x00, DEF_STR( On ))
1421 	TAITO_B_DSWA_2_4
1422 	TAITO_COINAGE_JAPAN_8
1423 
1424 	PORT_START /* DSW B */
1425 	TAITO_DIFFICULTY_8
1426 	PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )
1427 	PORT_DIPSETTING(    0x04, DEF_STR( Off ))
1428 	PORT_DIPSETTING(    0x00, DEF_STR( On ))
1429 	PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
1430 	PORT_DIPSETTING(    0x08, DEF_STR( Off ))
1431 	PORT_DIPSETTING(    0x00, DEF_STR( On ))
1432 	PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
1433 	PORT_DIPSETTING(    0x10, DEF_STR( Off ))
1434 	PORT_DIPSETTING(    0x00, DEF_STR( On ))
1435 	PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
1436 	PORT_DIPSETTING(    0x20, DEF_STR( Off ))
1437 	PORT_DIPSETTING(    0x00, DEF_STR( On ))
1438 	PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
1439 	PORT_DIPSETTING(    0x00, DEF_STR( Off ))
1440 	PORT_DIPSETTING(    0x40, DEF_STR( On ))
1441 	PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
1442 	PORT_DIPSETTING(    0x80, DEF_STR( Off ))
1443 	PORT_DIPSETTING(    0x00, DEF_STR( On ))
1444 
1445 	PORT_START      /* IN0 */
1446 	TAITO_B_PLAYERS_INPUT( IPF_PLAYER1 )
1447 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
1448 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
1449 
1450 	PORT_START      /* IN1 */
1451 	TAITO_B_PLAYERS_INPUT( IPF_PLAYER2 )
1452 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
1453 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
1454 
1455 	/* IN2 */
1456 	TAITO_B_SYSTEM_INPUT
1457 INPUT_PORTS_END
1458 
1459 INPUT_PORTS_START( ashura )
1460 	PORT_START /* DSW A */
1461 	PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) )
1462 	PORT_DIPSETTING(    0x01, DEF_STR( Off ))
1463 	PORT_DIPSETTING(    0x00, DEF_STR( On ))
1464 	TAITO_B_DSWA_2_4
1465 	TAITO_COINAGE_JAPAN_8
1466 
1467 	PORT_START /* DSW B */
1468 	TAITO_DIFFICULTY_8
1469 	PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Bonus_Life ) )
1470 	PORT_DIPSETTING(    0x08, "every 100k" )
1471 	PORT_DIPSETTING(    0x0c, "every 150k" )
1472 	PORT_DIPSETTING(    0x04, "every 200k" )
1473 	PORT_DIPSETTING(    0x00, "every 250k" )
1474 	PORT_DIPNAME( 0x30, 0x30, DEF_STR( Lives ) )
1475 	PORT_DIPSETTING(    0x00, "1" )
1476 	PORT_DIPSETTING(    0x10, "2" )
1477 	PORT_DIPSETTING(    0x30, "3" )
1478 	PORT_DIPSETTING(    0x20, "4" )
1479 	PORT_DIPNAME( 0x40, 0x40, "Allow Continue" )
1480 	PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
1481 	PORT_DIPSETTING(    0x40, DEF_STR( On ) )
1482 	PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
1483 	PORT_DIPSETTING(    0x80, DEF_STR( Off ))
1484 	PORT_DIPSETTING(    0x00, DEF_STR( On ))
1485 
1486 	PORT_START      /* IN0 */
1487 	TAITO_B_PLAYERS_INPUT( IPF_PLAYER1 )
1488 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
1489 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
1490 
1491 	PORT_START      /* IN1 */
1492 	TAITO_B_PLAYERS_INPUT( IPF_PLAYER2 )
1493 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
1494 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
1495 
1496 	/* IN2 */
1497 	TAITO_B_SYSTEM_INPUT
1498 INPUT_PORTS_END
1499 
1500 INPUT_PORTS_START( ashurau )
1501 	PORT_START /* DSW A */
1502 	PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) )
1503 	PORT_DIPSETTING(    0x01, DEF_STR( Off ))
1504 	PORT_DIPSETTING(    0x00, DEF_STR( On ))
1505 	TAITO_B_DSWA_2_4
1506 	TAITO_COINAGE_US_8
1507 
1508 	PORT_START /* DSW B */
1509 	TAITO_DIFFICULTY_8
1510 	PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Bonus_Life ) )
1511 	PORT_DIPSETTING(    0x08, "every 100k" )
1512 	PORT_DIPSETTING(    0x0c, "every 150k" )
1513 	PORT_DIPSETTING(    0x04, "every 200k" )
1514 	PORT_DIPSETTING(    0x00, "every 250k" )
1515 	PORT_DIPNAME( 0x30, 0x30, DEF_STR( Lives ) )
1516 	PORT_DIPSETTING(    0x00, "1" )
1517 	PORT_DIPSETTING(    0x10, "2" )
1518 	PORT_DIPSETTING(    0x30, "3" )
1519 	PORT_DIPSETTING(    0x20, "4" )
1520 	PORT_DIPNAME( 0x40, 0x40, "Allow Continue" )
1521 	PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
1522 	PORT_DIPSETTING(    0x40, DEF_STR( On ) )
1523 	PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
1524 	PORT_DIPSETTING(    0x80, DEF_STR( Off ))
1525 	PORT_DIPSETTING(    0x00, DEF_STR( On ))
1526 
1527 	PORT_START      /* IN0 */
1528 	TAITO_B_PLAYERS_INPUT( IPF_PLAYER1 )
1529 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
1530 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
1531 
1532 	PORT_START      /* IN1 */
1533 	TAITO_B_PLAYERS_INPUT( IPF_PLAYER2 )
1534 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
1535 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
1536 
1537 	/* IN2 */
1538 	TAITO_B_SYSTEM_INPUT
1539 INPUT_PORTS_END
1540 
1541 /*
1542 Hit the Ice dipswitches
1543 (info from Kevin Watson)
1544 
1545 [1 is switch on and 0 is switch off]
1546 
1547 Dip switch A
1548 ------------
1549 
1550 Setting             Options          1 2 3 4 5 6 7 8
1551 cabinet style       4 player         0
1552                     2 player         1
1553 Test mode           normal               0
1554                     test mode            1
1555 Attract mode        on                     0
1556                     off                    1
1557 Game price          1 coin 1 play            0 0 0 0
1558                     2 coin 1 play            1 0 0 0
1559                     3 coin 1 play            0 1 0 0
1560            coin1    1 coin 2 play            0 0 1 0
1561            coin2    1 coin 3 play            1 1 0 0
1562                     1 coin 4 play            0 1 0 0
1563                     1 coin 5 play            1 0 1 0
1564                     1 coin 6 play            1 1 1 0
1565 
1566 switch 2 and 8 are always set to off
1567 
1568 Dip switch table B
1569 ------------------
1570 
1571 Setting             Options          1 2 3 4 5 6 7 8
1572 Difficulty          normal           0 0
1573                     easy             1 0
1574                     hard             0 1
1575                     hardest          1 1
1576 Timer count         1 sec = 58/60        0 0
1577                     1 sec = 56/60        1 0
1578                     1 sec = 62/60        0 1
1579                     1 sec = 45/60        1 1
1580 maximum credit      9                             0
1581                     99                            1
1582 
1583 5,6,7 are set to off
1584 */
1585 
1586 INPUT_PORTS_START( hitice )
1587 	PORT_START /* DSW A */
1588 	PORT_DIPNAME( 0x01, 0x01, "Cabinet Style" )
1589 	PORT_DIPSETTING(    0x01, "4 Players")
1590 	PORT_DIPSETTING(    0x00, "2 Players")
1591 	PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) )
1592 	PORT_DIPSETTING(    0x02, DEF_STR( Off ))
1593 	PORT_DIPSETTING(    0x00, DEF_STR( On ))
1594 	PORT_SERVICE( 0x04, IP_ACTIVE_LOW )
1595 	PORT_DIPNAME( 0x08, 0x08, DEF_STR( Demo_Sounds ) )
1596 	PORT_DIPSETTING(    0x00, DEF_STR( Off ))
1597 	PORT_DIPSETTING(    0x08, DEF_STR( On ))
1598 	TAITO_COINAGE_JAPAN_8
1599 
1600 	PORT_START /* DSW B */
1601 	TAITO_DIFFICULTY_8
1602 	PORT_DIPNAME( 0x0c, 0x0c, "Timer count" )
1603 	PORT_DIPSETTING(    0x0c, "1 sec = 58/60" )
1604 	PORT_DIPSETTING(    0x04, "1 sec = 56/60" )
1605 	PORT_DIPSETTING(    0x08, "1 sec = 62/60" )
1606 	PORT_DIPSETTING(    0x00, "1 sec = 45/60" )
1607 	PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
1608 	PORT_DIPSETTING(    0x00, DEF_STR( Off ))
1609 	PORT_DIPSETTING(    0x10, DEF_STR( On ))
1610 	PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
1611 	PORT_DIPSETTING(    0x00, DEF_STR( Off ))
1612 	PORT_DIPSETTING(    0x20, DEF_STR( On ))
1613 	PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown) )
1614 	PORT_DIPSETTING(    0x00, DEF_STR( Off ))
1615 	PORT_DIPSETTING(    0x40, DEF_STR( On ))
1616 	PORT_DIPNAME( 0x80, 0x80, "Maximum credits" )
1617 	PORT_DIPSETTING(    0x00, "99" )
1618 	PORT_DIPSETTING(    0x80, "9"  )
1619 
1620 	PORT_START      /* IN0 */
1621 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER1 )
1622 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER1 )
1623 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON3 | IPF_PLAYER1 )
1624 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER2 )
1625 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER2 )
1626 	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON3 | IPF_PLAYER2 )
1627 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
1628 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
1629 
1630 	PORT_START      /* IN1 */
1631 	PORT_BIT(         0x01, IP_ACTIVE_LOW, IPT_TILT )
1632 	PORT_BIT(         0x02, IP_ACTIVE_LOW, IPT_SERVICE1 )
1633 	PORT_BIT(         0x04, IP_ACTIVE_LOW, IPT_START1 )
1634 	PORT_BIT(         0x08, IP_ACTIVE_LOW, IPT_START2 )
1635 	PORT_BIT_IMPULSE( 0x10, IP_ACTIVE_LOW, IPT_COIN1, 2 )
1636 	PORT_BIT_IMPULSE( 0x20, IP_ACTIVE_LOW, IPT_COIN2, 2 )
1637 	PORT_BIT(         0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
1638 	PORT_BIT(         0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
1639 
1640 	PORT_START      /* IN2 */
1641 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_PLAYER1 )
1642 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_PLAYER1 )
1643 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_PLAYER1 )
1644 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER1 )
1645 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_PLAYER2 )
1646 	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_PLAYER2 )
1647 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_PLAYER2 )
1648 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER2 )
1649 
1650 	PORT_START      /* IN5 IN6 */
1651 	PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_PLAYER3 )
1652 	PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_PLAYER3 )
1653 	PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_PLAYER3 )
1654 	PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER3 )
1655 	PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER3 )
1656 	PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER3 )
1657 	PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON3 | IPF_PLAYER3 )
1658 	PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START3 )
1659 	PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_PLAYER4 )
1660 	PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_PLAYER4 )
1661 	PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_PLAYER4 )
1662 	PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER4 )
1663 	PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER4 )
1664 	PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER4 )
1665 	PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 | IPF_PLAYER4 )
1666 	PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_START4 )
1667 INPUT_PORTS_END
1668 
1669 INPUT_PORTS_START( rambo3 )
1670 	PORT_START /* DSW A */
1671 	PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unused ) )  /* all 5 "unused" in manual*/
1672 	PORT_DIPSETTING(    0x01, DEF_STR( Off ))
1673 	PORT_DIPSETTING(    0x00, DEF_STR( On ))
1674 	TAITO_B_DSWA_2_4
1675 	TAITO_COINAGE_WORLD_8
1676 
1677 	PORT_START /* DSW B */
1678 	TAITO_DIFFICULTY_8
1679 	PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unused ) )
1680 	PORT_DIPSETTING(    0x04, DEF_STR( Off ))
1681 	PORT_DIPSETTING(    0x00, DEF_STR( On ))
1682 	PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
1683 	PORT_DIPSETTING(    0x08, DEF_STR( Off ))
1684 	PORT_DIPSETTING(    0x00, DEF_STR( On ))
1685 	PORT_DIPNAME( 0x10, 0x10, "Allow Continue" )
1686 	PORT_DIPSETTING(    0x00, DEF_STR( Off ))
1687 	PORT_DIPSETTING(    0x10, DEF_STR( On ))
1688 	PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unused ) )
1689 	PORT_DIPSETTING(    0x20, DEF_STR( Off ))
1690 	PORT_DIPSETTING(    0x00, DEF_STR( On ))
1691 	PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unused ) )
1692 	PORT_DIPSETTING(    0x40, DEF_STR( Off ))
1693 	PORT_DIPSETTING(    0x00, DEF_STR( On ))
1694 	PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unused ) )
1695 	PORT_DIPSETTING(    0x80, DEF_STR( Off ))
1696 	PORT_DIPSETTING(    0x00, DEF_STR( On ))
1697 
1698 	PORT_START      /* IN0 */
1699 	TAITO_B_PLAYERS_INPUT( IPF_PLAYER1 )
1700 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
1701 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
1702 
1703 	PORT_START      /* IN1 */
1704 	TAITO_B_PLAYERS_INPUT( IPF_PLAYER2 )
1705 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
1706 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
1707 
1708 	/* IN2 */
1709 	TAITO_B_SYSTEM_INPUT
1710 INPUT_PORTS_END
1711 
1712 INPUT_PORTS_START( rambo3a )
1713 	PORT_START /* DSW A */
1714 	PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unused ) )
1715 	PORT_DIPSETTING(    0x01, DEF_STR( Off ))
1716 	PORT_DIPSETTING(    0x00, DEF_STR( On ))
1717 	TAITO_B_DSWA_2_4
1718 	/* Coinage similar to US, but there are some differences */
1719 	PORT_DIPNAME( 0x30, 0x30, DEF_STR( Coinage ) )
1720 	PORT_DIPSETTING(    0x10, DEF_STR( 3C_1C ) )
1721 	PORT_DIPSETTING(    0x20, DEF_STR( 2C_1C ) )
1722 	PORT_DIPSETTING(    0x00, DEF_STR( 4C_3C ) )
1723 	PORT_DIPSETTING(    0x30, DEF_STR( 1C_1C ) )
1724 	PORT_DIPNAME( 0xc0, 0xc0, "Price to Continue" )
1725 	PORT_DIPSETTING(    0x40, DEF_STR( 2C_1C ) )
1726 	PORT_DIPSETTING(    0x80, DEF_STR( 1C_1C ) )
1727 	PORT_DIPSETTING(    0xc0, "Same as Start" )
1728 	PORT_DIPSETTING(    0x00, "Same as Start or 1C/1C (if Coinage 4C/3C)" )
1729 
1730 	PORT_START /* DSW B */
1731 	TAITO_DIFFICULTY_8
1732 	PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unused ) )
1733 	PORT_DIPSETTING(    0x04, DEF_STR( Off ))
1734 	PORT_DIPSETTING(    0x00, DEF_STR( On ))
1735 	PORT_DIPNAME( 0x08, 0x08, "Control" )
1736 	PORT_DIPSETTING(    0x08, "8 way Joystick" )
1737 	PORT_DIPSETTING(    0x00, "Trackball" )
1738 	PORT_DIPNAME( 0x10, 0x10, "Allow Continue" )
1739 	PORT_DIPSETTING(    0x00, DEF_STR( Off ))
1740 	PORT_DIPSETTING(    0x10, DEF_STR( On ))
1741 	PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unused ) )
1742 	PORT_DIPSETTING(    0x20, DEF_STR( Off ))
1743 	PORT_DIPSETTING(    0x00, DEF_STR( On ))
1744 	PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unused ) )
1745 	PORT_DIPSETTING(    0x40, DEF_STR( Off ))
1746 	PORT_DIPSETTING(    0x00, DEF_STR( On ))
1747 	PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unused ) )
1748 	PORT_DIPSETTING(    0x80, DEF_STR( Off ))
1749 	PORT_DIPSETTING(    0x00, DEF_STR( On ))
1750 
1751 	PORT_START      /* IN0 */
1752 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER1 )
1753 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER1 )
1754 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
1755 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER2 )
1756 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER2 )
1757 	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
1758 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
1759 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
1760 
1761 	PORT_START      /* IN1 */
1762 	PORT_BIT(         0x01, IP_ACTIVE_LOW, IPT_TILT )
1763 	PORT_BIT(         0x02, IP_ACTIVE_LOW, IPT_SERVICE1 )
1764 	PORT_BIT(         0x04, IP_ACTIVE_LOW, IPT_START1 )
1765 	PORT_BIT(         0x08, IP_ACTIVE_LOW, IPT_START2 )
1766 	PORT_BIT_IMPULSE( 0x10, IP_ACTIVE_HIGH, IPT_COIN1, 2 )
1767 	PORT_BIT_IMPULSE( 0x20, IP_ACTIVE_HIGH, IPT_COIN2, 2 )
1768 	PORT_BIT(         0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
1769 	PORT_BIT(         0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
1770 
1771 	PORT_START      /* IN2 */
1772 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_PLAYER1 )
1773 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_PLAYER1 )
1774 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_PLAYER1 )
1775 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER1 )
1776 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_PLAYER2 )
1777 	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_PLAYER2 )
1778 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_PLAYER2 )
1779 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER2 )
1780 
1781 	PORT_START
1782 	PORT_ANALOG( 0xffff, 0x0000, IPT_TRACKBALL_Y | IPF_PLAYER1 | IPF_REVERSE, 70, 30, 0, 0 )
1783 
1784 	PORT_START
1785 	PORT_ANALOG( 0xffff, 0x0000, IPT_TRACKBALL_X | IPF_PLAYER1, 70, 30, 0, 0 )
1786 
1787 	PORT_START
1788 	PORT_ANALOG( 0xffff, 0x0000, IPT_TRACKBALL_Y | IPF_PLAYER2 | IPF_REVERSE, 70, 30, 0, 0 )
1789 
1790 	PORT_START
1791 	PORT_ANALOG( 0xffff, 0x0000, IPT_TRACKBALL_X | IPF_PLAYER2, 70, 30, 0, 0 )
1792 INPUT_PORTS_END
1793 
1794 
1795 /* Helps document the input ports. */
1796 
1797 INPUT_PORTS_START( pbobble )	/* Missing P3&4 controls ! */
1798 	PORT_START /* IN0 */
1799 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) /*unused in test mode*/
1800 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) /*unused in test mode*/
1801 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) /*unused in test mode*/
1802 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) /*unused in test mode*/
1803 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) /*unused in test mode*/
1804 	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) /*unused in test mode*/
1805 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) /*unused in test mode*/
1806 	PORT_SERVICE_NO_TOGGLE( 0x80, IP_ACTIVE_LOW ) /*ok*/
1807 
1808 	PORT_START /* IN1 */
1809 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
1810 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
1811 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
1812 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
1813 	PORT_BIT_IMPULSE( 0x10, IP_ACTIVE_LOW, IPT_COIN1, 2 ) /*ok*/
1814 	PORT_BIT_IMPULSE( 0x20, IP_ACTIVE_LOW, IPT_COIN2, 2 ) /*ok*/
1815 	PORT_BIT_IMPULSE( 0x40, IP_ACTIVE_LOW, IPT_COIN3, 2 ) /*ok*/
1816 	PORT_BIT_IMPULSE( 0x80, IP_ACTIVE_LOW, IPT_COIN4, 2 ) /*ok*/
1817 
1818 	PORT_START /* IN2 */ /*all OK*/
1819 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_TILT )
1820 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE1 )
1821 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE2 )
1822 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE3 )
1823 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 )
1824 	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 )
1825 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START3 )
1826 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START4 )
1827 
1828 	PORT_START /* IN3 */ /*all OK*/
1829 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER1 )
1830 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER1 )
1831 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON3 | IPF_PLAYER1 )
1832 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) /*unused in test mode*/
1833 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER2 )
1834 	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER2 )
1835 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 | IPF_PLAYER2 )
1836 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) /*unused in test mode*/
1837 
1838 	PORT_START /* IN4 */ /*all OK*/
1839 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_PLAYER1 )
1840 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_PLAYER1 )
1841 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_PLAYER1 )
1842 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER1 )
1843 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_PLAYER2 )
1844 	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_PLAYER2 )
1845 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_PLAYER2 )
1846 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER2 )
1847 
1848 	PORT_START /* IN5 */
1849 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER3 )
1850 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER3 )
1851 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON3 | IPF_PLAYER3 )
1852 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) /*unused in test mode*/
1853 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER4 )
1854 	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER4 )
1855 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 | IPF_PLAYER4 )
1856 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) /*unused in test mode*/
1857 
1858 	PORT_START /* IN6 */
1859 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_PLAYER3 )
1860 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_PLAYER3 )
1861 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_PLAYER3 )
1862 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER3 )
1863 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_PLAYER4 )
1864 	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_PLAYER4 )
1865 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_PLAYER4 )
1866 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER4 )
1867 INPUT_PORTS_END
1868 
1869 INPUT_PORTS_START( spacedxo )
1870 	PORT_START /* DSW A */
1871 	PORT_DIPNAME( 0x01, 0x01, DEF_STR( Cabinet ) )
1872 	PORT_DIPSETTING(    0x01, DEF_STR( Upright ) )
1873 	PORT_DIPSETTING(    0x00, DEF_STR( Cocktail ) )
1874 	TAITO_B_DSWA_2_4
1875 	TAITO_COINAGE_JAPAN_NEW_8
1876 
1877 	PORT_START /* DSW B */
1878 	TAITO_DIFFICULTY_8
1879 	PORT_DIPNAME( 0x0c, 0x0c, "Match Point" )
1880 	PORT_DIPSETTING(    0x08, "4" )
1881 	PORT_DIPSETTING(    0x0c, "3" )
1882 	PORT_DIPSETTING(    0x04, "5" )
1883 	PORT_DIPSETTING(    0x00, "2" )
1884 	PORT_DIPNAME( 0x30, 0x30, DEF_STR( Lives ) )
1885 	PORT_DIPSETTING(    0x30, "3" )
1886 	PORT_DIPSETTING(    0x20, "4" )
1887 	PORT_DIPSETTING(    0x10, "5" )
1888 	PORT_DIPSETTING(    0x00, "6" )
1889 	PORT_DIPNAME( 0x40, 0x40, DEF_STR( Bonus_Life ) )
1890 	PORT_DIPSETTING(    0x40, "1500 Points" )
1891 	PORT_DIPSETTING(    0x00, "1000 Points" )
1892 	PORT_DIPNAME( 0x80, 0x80, "Game Type" )
1893 	PORT_DIPSETTING(    0x80, "Double Company" )
1894 	PORT_DIPSETTING(    0x00, "Single Company" )
1895 
1896 	PORT_START	/* IN0 */
1897 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER1 )
1898 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER1 )
1899 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON3 | IPF_PLAYER1 )
1900 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER2 )
1901 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER2 )
1902 	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON3 | IPF_PLAYER2 )
1903 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
1904 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
1905 
1906 	PORT_START	/* IN1 */
1907 	PORT_BIT(         0x01, IP_ACTIVE_LOW, IPT_TILT )
1908 	PORT_BIT(         0x02, IP_ACTIVE_LOW, IPT_SERVICE1 )
1909 	PORT_BIT(         0x04, IP_ACTIVE_LOW, IPT_START1 )
1910 	PORT_BIT(         0x08, IP_ACTIVE_LOW, IPT_START2 )
1911 	PORT_BIT_IMPULSE( 0x10, IP_ACTIVE_LOW, IPT_COIN1, 2 )
1912 	PORT_BIT_IMPULSE( 0x20, IP_ACTIVE_LOW, IPT_COIN2, 2 )
1913 	PORT_BIT(         0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
1914 	PORT_BIT(         0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
1915 
1916 	PORT_START	/* IN2 */ /*all OK*/
1917 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_PLAYER1 )
1918 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_PLAYER1 )
1919 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_PLAYER1 )
1920 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER1 )
1921 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_PLAYER2 )
1922 	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_PLAYER2 )
1923 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_PLAYER2 )
1924 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER2 )
1925 
1926 	PORT_START      /* IN5 */
1927 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START3 )
1928 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_PLAYER3 )
1929 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER3 )
1930 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_PLAYER3 )
1931 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_PLAYER3 )
1932 	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER3 )
1933 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER3 )
1934 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON3 | IPF_PLAYER3 )
1935 
1936 	PORT_START      /* IN6 */
1937 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START4 )
1938 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_PLAYER4 )
1939 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER4 )
1940 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_PLAYER4 )
1941 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_PLAYER4 )
1942 	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER4 )
1943 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER4 )
1944 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON3 | IPF_PLAYER4 )
1945 
1946 	PORT_START      /* IN7 */
1947 	PORT_BIT_IMPULSE( 0x01, IP_ACTIVE_LOW, IPT_COIN3, 2 )
1948 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE2 )
1949 	PORT_BIT_IMPULSE( 0x04, IP_ACTIVE_LOW, IPT_COIN4, 2 )
1950 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE3 )
1951 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
1952 	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
1953 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
1954 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
1955 
1956 INPUT_PORTS_END
1957 
1958 INPUT_PORTS_START( qzshowby )
1959 	PORT_START /* DSW B */
1960 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) /*unused in test mode*/
1961 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) /*unused in test mode*/
1962 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) /*unused in test mode*/
1963 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) /*unused in test mode*/
1964 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) /*unused in test mode*/
1965 	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) /*unused in test mode*/
1966 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) /*unused in test mode*/
1967 	PORT_SERVICE_NO_TOGGLE( 0x80, IP_ACTIVE_LOW ) /*ok*/
1968 
1969 	PORT_START
1970 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
1971 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
1972 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
1973 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
1974 	PORT_BIT_IMPULSE( 0x10, IP_ACTIVE_LOW, IPT_COIN1, 2 ) /*ok*/
1975 	PORT_BIT_IMPULSE( 0x20, IP_ACTIVE_LOW, IPT_COIN2, 2 ) /*ok*/
1976 	PORT_BIT_IMPULSE( 0x40, IP_ACTIVE_LOW, IPT_COIN3, 2 ) /*ok*/
1977 	PORT_BIT_IMPULSE( 0x80, IP_ACTIVE_LOW, IPT_COIN4, 2 ) /*ok*/
1978 
1979 	PORT_START      /* IN0 */ /*all OK*/
1980 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_TILT )
1981 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE1 )
1982 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE2 )
1983 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE3 )
1984 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 )
1985 	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 )
1986 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START3 )
1987 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START4 )
1988 
1989 	PORT_START		/* IN 1 */ /*all OK*/
1990 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN  ) /* IPT_START1 in test mode */
1991 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
1992 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
1993 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
1994 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN  ) /* IPT_START2 in test mode */
1995 	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
1996 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
1997 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
1998 
1999 	PORT_START      /* IN2 */ /*all OK*/
2000 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER1 )
2001 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER1 )
2002 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON4 | IPF_PLAYER1 )
2003 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON3 | IPF_PLAYER1 )
2004 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER2 )
2005 	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER2 )
2006 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON4 | IPF_PLAYER2 )
2007 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON3 | IPF_PLAYER2 )
2008 
2009 	PORT_START      /* IN5 */
2010 	PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_UNKNOWN  ) /* IPT_START3 in test mode */
2011 	PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_UNKNOWN )
2012 	PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN )
2013 	PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN )
2014 	PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN  ) /* IPT_START4 in test mode */
2015 	PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN )
2016 	PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN )
2017 	PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN )
2018 
2019 	PORT_START      /* IN6 */
2020 	PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER3 )
2021 	PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER3 )
2022 	PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_BUTTON4 | IPF_PLAYER3 )
2023 	PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_BUTTON3 | IPF_PLAYER3 )
2024 	PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER4 )
2025 	PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER4 )
2026 	PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON4 | IPF_PLAYER4 )
2027 	PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_BUTTON3 | IPF_PLAYER4 )
2028 INPUT_PORTS_END
2029 
2030 INPUT_PORTS_START( viofight )
2031 	PORT_START /* DSW A */
2032 	PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unused ) )  /* all 7 "unused" in manual*/
2033 	PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
2034 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
2035 	TAITO_B_DSWA_2_4
2036 	TAITO_COINAGE_WORLD_8
2037 
2038 	PORT_START /* DSW B */
2039 	TAITO_DIFFICULTY_8
2040 	PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unused ) )
2041 	PORT_DIPSETTING(    0x04, DEF_STR( Off ))
2042 	PORT_DIPSETTING(    0x00, DEF_STR( On ))
2043 	PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unused ) )
2044 	PORT_DIPSETTING(    0x08, DEF_STR( Off ))
2045 	PORT_DIPSETTING(    0x00, DEF_STR( On ))
2046 	PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unused ) )
2047 	PORT_DIPSETTING(    0x10, DEF_STR( Off ))
2048 	PORT_DIPSETTING(    0x00, DEF_STR( On ))
2049 	PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unused ) )
2050 	PORT_DIPSETTING(    0x20, DEF_STR( Off ))
2051 	PORT_DIPSETTING(    0x00, DEF_STR( On ))
2052 	PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unused ) )
2053 	PORT_DIPSETTING(    0x40, DEF_STR( Off ))
2054 	PORT_DIPSETTING(    0x00, DEF_STR( On ))
2055 	PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unused ) )
2056 	PORT_DIPSETTING(    0x80, DEF_STR( Off ))
2057 	PORT_DIPSETTING(    0x00, DEF_STR( On ))
2058 
2059 	PORT_START      /* IN0 */
2060 	TAITO_B_PLAYERS_INPUT( IPF_PLAYER1 )
2061 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 | IPF_PLAYER1 )
2062 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
2063 
2064 	PORT_START      /* IN1 */
2065 	TAITO_B_PLAYERS_INPUT( IPF_PLAYER2 )
2066 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 | IPF_PLAYER2 )
2067 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
2068 
2069 	/* IN2 */
2070 	TAITO_B_SYSTEM_INPUT
2071 INPUT_PORTS_END
2072 
2073 INPUT_PORTS_START( silentd )	/* World Version */
2074 	PORT_START /* DSW A */
2075 	PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unused ) )	/* Listed as "NOT USED" in the manual and only shown as "OFF" */
2076 	PORT_DIPSETTING(    0x01, DEF_STR( Off ))
2077 	PORT_DIPSETTING(    0x00, DEF_STR( On ))
2078 	PORT_DIPNAME( 0x02, 0x02, DEF_STR( Flip_Screen ) )
2079 	PORT_DIPSETTING(    0x02, DEF_STR( Off ))
2080 	PORT_DIPSETTING(    0x00, DEF_STR( On ))
2081 	PORT_SERVICE( 0x04, IP_ACTIVE_LOW )
2082 	PORT_DIPNAME( 0x08, 0x08, DEF_STR( Demo_Sounds ) )
2083 	PORT_DIPSETTING(    0x00, DEF_STR( Off ))
2084 	PORT_DIPSETTING(    0x08, DEF_STR( On ))
2085 	PORT_DIPNAME( 0x30, 0x30, DEF_STR( Coinage ) )
2086 	PORT_DIPSETTING(    0x00, DEF_STR( 4C_1C ) )
2087 	PORT_DIPSETTING(    0x10, DEF_STR( 3C_1C ) )
2088 	PORT_DIPSETTING(    0x20, DEF_STR( 2C_1C ) )
2089 	PORT_DIPSETTING(    0x30, DEF_STR( 1C_1C ) )
2090 
2091 /* These next two are listed as Unused for "Oversea Versions"
2092 	For the USA version use this description:
2093 
2094   Buy-In Pricing	Same As Play Pricing	OFF	OFF (Defualt)
2095 					1 Coin  = Continue		ON	OFF
2096 					2 Coins = Contniue		OFF	ON
2097 					3 Coins = Continue		ON	ON
2098  */
2099 
2100 	PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unused ) )
2101 	PORT_DIPSETTING(    0x40, DEF_STR( Off ))
2102 	PORT_DIPSETTING(    0x00, DEF_STR( On ))
2103 	PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unused ) )
2104 	PORT_DIPSETTING(    0x80, DEF_STR( Off ))
2105 	PORT_DIPSETTING(    0x00, DEF_STR( On ))
2106 
2107 	PORT_START /* DSW B */
2108 	TAITO_DIFFICULTY_8
2109 	PORT_BITX(   0x04, 0x04, IPT_DIPSWITCH_NAME | IPF_CHEAT, "Invulnerability", IP_KEY_NONE, IP_JOY_NONE )
2110 	PORT_DIPSETTING(    0x04, DEF_STR( Off ))
2111 	PORT_DIPSETTING(    0x00, DEF_STR( On ))
2112 	PORT_DIPNAME( 0x08, 0x08, "Power-Up Bonus" )	/* Manual States "Power-Up at Stage Clear" */
2113 	PORT_DIPSETTING(    0x08, DEF_STR( Off ))
2114 	PORT_DIPSETTING(    0x00, DEF_STR( On ))
2115 	PORT_DIPNAME( 0x10, 0x10, "Regain Power" )
2116 	PORT_DIPSETTING(    0x10, DEF_STR( Off ))
2117 	PORT_DIPSETTING(    0x00, DEF_STR( On ))
2118 
2119 /*  Manual Shows "1 Coin Slot (Shared)" and "4 Coin Slot (1 Per Player)"
2120 
2121 	You can play the game with 2, 3, or 4 players and the last option is a linked 4 players.
2122 	Using bit6 and bit7&8 you end up with 1, 2 or 4 seperate "Credits" on the demo screens.
2123 	Using bits7&8 you can have 2-4 players as shown at the top of the game screens.
2124 
2125 */
2126 
2127 	PORT_DIPNAME( 0x20, 0x20, "Credits" )			/* Only shows 4 seperate credits with 4p/1m below */
2128 	PORT_DIPSETTING(    0x20, "Combined" )
2129 	PORT_DIPSETTING(    0x00, "Seperate" )			/* When multiple credits show, Coin B will affect p2 credits */
2130 	PORT_DIPNAME( 0xc0, 0x80, "Cabinet Style" )
2131 	PORT_DIPSETTING(    0xc0, "3 Players")
2132 	PORT_DIPSETTING(    0x80, "2 Players")
2133 	PORT_DIPSETTING(    0x40, "4 Players/1 Machine")	/* with bit6, shows 4 seperate credits */
2134 	PORT_DIPSETTING(    0x00, "4 Players/2 Machines")	/* with bit6 shows 2 seperate credits */
2135 
2136 	PORT_START      /* IN0 */
2137 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER1 )
2138 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER1 )
2139 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON3 | IPF_PLAYER1 )
2140 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER2 )
2141 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER2 )
2142 	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON3 | IPF_PLAYER2 )
2143 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
2144 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
2145 
2146 	PORT_START      /* IN1 */
2147 	PORT_BIT(         0x01, IP_ACTIVE_LOW, IPT_TILT )
2148 	PORT_BIT(         0x02, IP_ACTIVE_LOW, IPT_SERVICE1 )
2149 	PORT_BIT(         0x04, IP_ACTIVE_LOW, IPT_START1 )
2150 	PORT_BIT(         0x08, IP_ACTIVE_LOW, IPT_START2 )
2151 	PORT_BIT_IMPULSE( 0x10, IP_ACTIVE_LOW, IPT_COIN1, 2 )
2152 	PORT_BIT_IMPULSE( 0x20, IP_ACTIVE_LOW, IPT_COIN2, 2 )
2153 	PORT_BIT(         0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
2154 	PORT_BIT(         0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
2155 
2156 	PORT_START      /* IN2 */
2157 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_PLAYER1 )
2158 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_PLAYER1 )
2159 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_PLAYER1 )
2160 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER1 )
2161 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_PLAYER2 )
2162 	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_PLAYER2 )
2163 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_PLAYER2 )
2164 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER2 )
2165 
2166 	PORT_START      /* IN5 */
2167 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START3 )
2168 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_PLAYER3 )
2169 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER3 )
2170 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_PLAYER3 )
2171 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_PLAYER3 )
2172 	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER3 )
2173 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER3 )
2174 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON3 | IPF_PLAYER3 )
2175 
2176 	PORT_START      /* IN6 */
2177 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START4 )
2178 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_PLAYER4 )
2179 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER4 )
2180 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_PLAYER4 )
2181 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_PLAYER4 )
2182 	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER4 )
2183 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER4 )
2184 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON3 | IPF_PLAYER4 )
2185 
2186 	PORT_START      /* IN7 */
2187 	PORT_BIT_IMPULSE( 0x01, IP_ACTIVE_LOW, IPT_COIN3, 2 )
2188 	PORT_BIT_IMPULSE( 0x02, IP_ACTIVE_LOW, IPT_COIN3, 2 ) /*not sure if this is legal under MAME*/
2189 	PORT_BIT_IMPULSE( 0x04, IP_ACTIVE_LOW, IPT_COIN4, 2 )
2190 	PORT_BIT_IMPULSE( 0x08, IP_ACTIVE_LOW, IPT_COIN4, 2 ) /*not sure if this is legal under MAME*/
2191 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
2192 	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
2193 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
2194 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
2195 INPUT_PORTS_END
2196 
2197 INPUT_PORTS_START( silentdj )
2198 	PORT_START /* DSW A */
2199 	PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unused ) )	/* Listed as "NOT USED" in the manual and only shown as "OFF" */
2200 	PORT_DIPSETTING(    0x01, DEF_STR( Off ))
2201 	PORT_DIPSETTING(    0x00, DEF_STR( On ))
2202 	PORT_DIPNAME( 0x02, 0x02, DEF_STR( Flip_Screen ) )
2203 	PORT_DIPSETTING(    0x02, DEF_STR( Off ))
2204 	PORT_DIPSETTING(    0x00, DEF_STR( On ))
2205 	PORT_SERVICE( 0x04, IP_ACTIVE_LOW )
2206 	PORT_DIPNAME( 0x08, 0x08, DEF_STR( Demo_Sounds ) )
2207 	PORT_DIPSETTING(    0x00, DEF_STR( Off ))
2208 	PORT_DIPSETTING(    0x08, DEF_STR( On ))
2209 	TAITO_COINAGE_JAPAN_8
2210 
2211 	PORT_START /* DSW B */
2212 	TAITO_DIFFICULTY_8
2213 	PORT_BITX(   0x04, 0x04, IPT_DIPSWITCH_NAME | IPF_CHEAT, "Invulnerability", IP_KEY_NONE, IP_JOY_NONE )
2214 	PORT_DIPSETTING(    0x04, DEF_STR( Off ))
2215 	PORT_DIPSETTING(    0x00, DEF_STR( On ))
2216 	PORT_DIPNAME( 0x08, 0x08, "Power-Up Bonus" )	/* Manual States "Power-Up at Stage Clear" */
2217 	PORT_DIPSETTING(    0x08, DEF_STR( Off ))
2218 	PORT_DIPSETTING(    0x00, DEF_STR( On ))
2219 	PORT_DIPNAME( 0x10, 0x10, "Regain Power" )
2220 	PORT_DIPSETTING(    0x10, DEF_STR( Off ))
2221 	PORT_DIPSETTING(    0x00, DEF_STR( On ))
2222 	PORT_DIPNAME( 0x20, 0x20, "Credits" )			/* Only shows 4 seperate credits with 4p/1m below */
2223 	PORT_DIPSETTING(    0x20, "Combined" )
2224 	PORT_DIPSETTING(    0x00, "Seperate" )			/* When multiple credits show, Coin B will affect p2 credits */
2225 	PORT_DIPNAME( 0xc0, 0x80, "Cabinet Style" )
2226 	PORT_DIPSETTING(    0xc0, "3 Players")
2227 	PORT_DIPSETTING(    0x80, "2 Players")
2228 	PORT_DIPSETTING(    0x40, "4 Players/1 Machine")	/* with bit6, shows 4 seperate credits */
2229 	PORT_DIPSETTING(    0x00, "4 Players/2 Machines")	/* with bit6 shows 2 seperate credits */
2230 
2231 	PORT_START      /* IN0 */
2232 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER1 )
2233 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER1 )
2234 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON3 | IPF_PLAYER1 )
2235 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER2 )
2236 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER2 )
2237 	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON3 | IPF_PLAYER2 )
2238 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
2239 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
2240 
2241 	PORT_START      /* IN1 */
2242 	PORT_BIT(         0x01, IP_ACTIVE_LOW, IPT_TILT )
2243 	PORT_BIT(         0x02, IP_ACTIVE_LOW, IPT_SERVICE1 )
2244 	PORT_BIT(         0x04, IP_ACTIVE_LOW, IPT_START1 )
2245 	PORT_BIT(         0x08, IP_ACTIVE_LOW, IPT_START2 )
2246 	PORT_BIT_IMPULSE( 0x10, IP_ACTIVE_LOW, IPT_COIN1, 2 )
2247 	PORT_BIT_IMPULSE( 0x20, IP_ACTIVE_LOW, IPT_COIN2, 2 )
2248 	PORT_BIT(         0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
2249 	PORT_BIT(         0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
2250 
2251 	PORT_START      /* IN2 */
2252 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_PLAYER1 )
2253 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_PLAYER1 )
2254 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_PLAYER1 )
2255 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER1 )
2256 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_PLAYER2 )
2257 	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_PLAYER2 )
2258 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_PLAYER2 )
2259 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER2 )
2260 
2261 	PORT_START      /* IN5 */
2262 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START3 )
2263 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_PLAYER3 )
2264 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER3 )
2265 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_PLAYER3 )
2266 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_PLAYER3 )
2267 	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER3 )
2268 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER3 )
2269 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON3 | IPF_PLAYER3 )
2270 
2271 	PORT_START      /* IN6 */
2272 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START4 )
2273 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_PLAYER4 )
2274 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER4 )
2275 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_PLAYER4 )
2276 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_PLAYER4 )
2277 	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER4 )
2278 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER4 )
2279 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON3 | IPF_PLAYER4 )
2280 
2281 	PORT_START      /* IN7 */
2282 	PORT_BIT_IMPULSE( 0x01, IP_ACTIVE_LOW, IPT_COIN3, 2 )
2283 	PORT_BIT_IMPULSE( 0x02, IP_ACTIVE_LOW, IPT_COIN3, 2 ) /*not sure if this is legal under MAME*/
2284 	PORT_BIT_IMPULSE( 0x04, IP_ACTIVE_LOW, IPT_COIN4, 2 )
2285 	PORT_BIT_IMPULSE( 0x08, IP_ACTIVE_LOW, IPT_COIN4, 2 ) /*not sure if this is legal under MAME*/
2286 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
2287 	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
2288 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
2289 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
2290 INPUT_PORTS_END
2291 
2292 INPUT_PORTS_START( selfeena )
2293 	PORT_START /* DSW A */
2294 	PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unused ) )
2295 	PORT_DIPSETTING(    0x01, DEF_STR( Off ))
2296 	PORT_DIPSETTING(    0x00, DEF_STR( On ))
2297 	TAITO_B_DSWA_2_4
2298 	TAITO_COINAGE_JAPAN_NEW_8
2299 
2300 	PORT_START /* DSW B */
2301 	TAITO_DIFFICULTY_8
2302 	PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Bonus_Life ) )
2303 	PORT_DIPSETTING(    0x0c, "100k only" )
2304 	PORT_DIPSETTING(    0x08, "200k only" )
2305 	PORT_DIPSETTING(    0x04, "300k only" )
2306 	PORT_DIPSETTING(    0x00, "400k only" )
2307 	PORT_DIPNAME( 0x30, 0x30, DEF_STR( Lives ) )
2308 	PORT_DIPSETTING(    0x00, "1" )
2309 	PORT_DIPSETTING(    0x10, "2" )
2310 	PORT_DIPSETTING(    0x30, "3" )
2311 	PORT_DIPSETTING(    0x20, "4" )
2312 	PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unused ) )
2313 	PORT_DIPSETTING(    0x40, DEF_STR( Off ))
2314 	PORT_DIPSETTING(    0x00, DEF_STR( On ))
2315 	PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unused ) )
2316 	PORT_DIPSETTING(    0x80, DEF_STR( Off ))
2317 	PORT_DIPSETTING(    0x00, DEF_STR( On ))
2318 
2319 	PORT_START      /* IN0 */
2320 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER1 )
2321 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER1 )
2322 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON3 | IPF_PLAYER1 )
2323 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER2 )
2324 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER2 )
2325 	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON3 | IPF_PLAYER2 )
2326 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
2327 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
2328 
2329 	PORT_START      /* IN1 */
2330 	PORT_BIT(         0x01, IP_ACTIVE_LOW, IPT_TILT )
2331 	PORT_BIT(         0x02, IP_ACTIVE_LOW, IPT_SERVICE1 )
2332 	PORT_BIT(         0x04, IP_ACTIVE_LOW, IPT_START1 )
2333 	PORT_BIT(         0x08, IP_ACTIVE_LOW, IPT_START2 )
2334 	PORT_BIT_IMPULSE( 0x10, IP_ACTIVE_LOW, IPT_COIN1, 2 )
2335 	PORT_BIT_IMPULSE( 0x20, IP_ACTIVE_LOW, IPT_COIN2, 2 )
2336 	PORT_BIT(         0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
2337 	PORT_BIT(         0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
2338 
2339 	PORT_START      /* IN2 */
2340 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_PLAYER1 )
2341 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_PLAYER1 )
2342 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_PLAYER1 )
2343 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER1 )
2344 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_PLAYER2 )
2345 	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_PLAYER2 )
2346 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_PLAYER2 )
2347 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER2 )
2348 INPUT_PORTS_END
2349 
2350 INPUT_PORTS_START( ryujin )
2351 	PORT_START /* DSW A */
2352 	PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unused ) )
2353 	PORT_DIPSETTING(    0x01, DEF_STR( Off ))
2354 	PORT_DIPSETTING(    0x00, DEF_STR( On ))
2355 	TAITO_B_DSWA_2_4
2356 	TAITO_COINAGE_JAPAN_NEW_8
2357 
2358 	PORT_START /* DSW B */
2359 	TAITO_DIFFICULTY_8
2360 	PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Lives ) )
2361 	PORT_DIPSETTING(    0x00, "1" )
2362 	PORT_DIPSETTING(    0x04, "2" )
2363 	PORT_DIPSETTING(    0x0c, "3" )
2364 	PORT_DIPSETTING(    0x08, "4" )
2365 	PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unused ) )
2366 	PORT_DIPSETTING(    0x10, DEF_STR( Off ))
2367 	PORT_DIPSETTING(    0x00, DEF_STR( On ))
2368 	PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unused ) )
2369 	PORT_DIPSETTING(    0x20, DEF_STR( Off ))
2370 	PORT_DIPSETTING(    0x00, DEF_STR( On ))
2371 	PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unused ) )
2372 	PORT_DIPSETTING(    0x40, DEF_STR( Off ))
2373 	PORT_DIPSETTING(    0x00, DEF_STR( On ))
2374 	PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unused ) )
2375 	PORT_DIPSETTING(    0x80, DEF_STR( Off ))
2376 	PORT_DIPSETTING(    0x00, DEF_STR( On ))
2377 
2378 	PORT_START      /* IN0 */
2379 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER1 )
2380 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER1 )
2381 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON3 | IPF_PLAYER1 )
2382 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER2 )
2383 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER2 )
2384 	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON3 | IPF_PLAYER2 )
2385 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
2386 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
2387 
2388 	PORT_START      /* IN1 */
2389 	PORT_BIT(         0x01, IP_ACTIVE_LOW, IPT_TILT )
2390 	PORT_BIT(         0x02, IP_ACTIVE_LOW, IPT_SERVICE1 )
2391 	PORT_BIT(         0x04, IP_ACTIVE_LOW, IPT_START1 )
2392 	PORT_BIT(         0x08, IP_ACTIVE_LOW, IPT_START2 )
2393 	PORT_BIT_IMPULSE( 0x10, IP_ACTIVE_LOW, IPT_COIN1, 2 )
2394 	PORT_BIT_IMPULSE( 0x20, IP_ACTIVE_LOW, IPT_COIN2, 2 )
2395 	PORT_BIT(         0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
2396 	PORT_BIT(         0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
2397 
2398 	PORT_START      /* IN2 */
2399 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_PLAYER1 )
2400 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_PLAYER1 )
2401 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_PLAYER1 )
2402 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER1 )
2403 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_PLAYER2 )
2404 	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_PLAYER2 )
2405 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_PLAYER2 )
2406 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER2 )
2407 INPUT_PORTS_END
2408 
2409 INPUT_PORTS_START( sbm )
2410 	PORT_START /* DSW A */ /*+-ok */
2411 	PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) )
2412 	PORT_DIPSETTING(    0x01, DEF_STR( Off ))
2413 	PORT_DIPSETTING(    0x00, DEF_STR( On ))
2414 	PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) )
2415 	PORT_DIPSETTING(    0x02, DEF_STR( Off ))
2416 	PORT_DIPSETTING(    0x00, DEF_STR( On ))
2417 	PORT_SERVICE( 0x04, IP_ACTIVE_LOW )
2418 	PORT_DIPNAME( 0x08, 0x08, DEF_STR( Demo_Sounds ) )
2419 	PORT_DIPSETTING(    0x00, DEF_STR( Off ))
2420 	PORT_DIPSETTING(    0x08, DEF_STR( On ))
2421 	PORT_DIPNAME( 0x30, 0x30, DEF_STR( Coinage ) )
2422 	PORT_DIPSETTING(    0x00, DEF_STR( 4C_1C ) )
2423 	PORT_DIPSETTING(    0x10, DEF_STR( 3C_1C ) )
2424 	PORT_DIPSETTING(    0x20, DEF_STR( 2C_1C ) )
2425 	PORT_DIPSETTING(    0x30, DEF_STR( 1C_1C ) )
2426 	PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
2427 	PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
2428 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
2429 	PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
2430 	PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
2431 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
2432 
2433 	PORT_START /* DSW B */ /*+-ok*/
2434 	TAITO_DIFFICULTY_8
2435 	PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )
2436 	PORT_DIPSETTING(    0x04, DEF_STR( Off ))
2437 	PORT_DIPSETTING(    0x00, DEF_STR( On ))
2438 	PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
2439 	PORT_DIPSETTING(    0x08, DEF_STR( Off ))
2440 	PORT_DIPSETTING(    0x00, DEF_STR( On ))
2441 	PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
2442 	PORT_DIPSETTING(    0x10, DEF_STR( Off ))
2443 	PORT_DIPSETTING(    0x00, DEF_STR( On ))
2444 	PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
2445 	PORT_DIPSETTING(    0x20, DEF_STR( Off ))
2446 	PORT_DIPSETTING(    0x00, DEF_STR( On ))
2447 	PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
2448 	PORT_DIPSETTING(    0x40, DEF_STR( Off ))
2449 	PORT_DIPSETTING(    0x00, DEF_STR( On ))
2450 	PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
2451 	PORT_DIPSETTING(    0x80, DEF_STR( Off ))
2452 	PORT_DIPSETTING(    0x00, DEF_STR( On ))
2453 
2454 	PORT_START      /* IN0 */
2455 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_PLAYER1 )/*sound select UP*/
2456 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_PLAYER1 )/*sound select DOWN*/
2457 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_PLAYER1 )/*ok (object test)*/
2458 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER1 )/*ok (object test)*/
2459 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_PLAYER2 )/*-- unused in test modes*/
2460 	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_PLAYER2 )/*-- unused in test modes*/
2461 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_PLAYER2 )/*BEN IN (ticket dispenser)*/
2462 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER2 )/*LADY ????*/
2463 
2464 	PORT_START      /* IN1 */
2465 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 )/*select; ok (1P in object test)*/
2466 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 )/*start ; ok (2P in object test)*/
2467 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
2468 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
2469 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
2470 	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
2471 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
2472 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
2473 
2474 	PORT_START      /* IN2 */
2475 	PORT_BIT(         0x01, IP_ACTIVE_LOW, IPT_TILT )       /*ok*/
2476 	PORT_BIT(         0x02, IP_ACTIVE_LOW, IPT_SERVICE1 )	/*ok*/
2477 	PORT_BIT_IMPULSE( 0x04, IP_ACTIVE_LOW, IPT_COIN1, 2 )   /*ok*/
2478 	PORT_BIT_IMPULSE( 0x08, IP_ACTIVE_LOW, IPT_COIN2, 2 )   /*ok*/
2479 	/* BUTTON1 ACTIVE LOW, - game thinks that punching pad has already been raised */
2480 	PORT_BIT(         0x10, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER1 )/*PHOTO 1 (punching pad photosensor 1)*/
2481 	PORT_BIT(         0x20, IP_ACTIVE_HIGH,IPT_BUTTON2 | IPF_PLAYER1 )/*PHOTO 2 (punching pad photosensor 2)*/
2482 	PORT_BIT(         0x40, IP_ACTIVE_HIGH,IPT_BUTTON3 | IPF_PLAYER1 )/*PHOTO 3	(punching pad photosensor 3)*/
2483  	/*To simulate a punch:
2484 		- wait for "READY GO!" message,
2485 		- press button1 + button 2 (LCTRL + ALT) (you'll hear a "punching" sound),
2486   		- THEN  press button 3 (SPACE)
2487  		The time passed between the presses will be used to calculate the power of your punch.
2488 		The longer the time - the less power.
2489 	*/
2490 	PORT_BIT(         0x80, IP_ACTIVE_LOW, IPT_BUTTON4 | IPF_PLAYER1 )/*PHOTO 4  ??? ACTIVE_LOW  ??? (punching pad photosensor 4)*/
2491 INPUT_PORTS_END
2492 
2493 
2494 
2495 static struct GfxLayout charlayout =
2496 {
2497 	8,8,
2498 	RGN_FRAC(1,2),
2499 	4,
2500 	{ 0, 8, RGN_FRAC(1,2), RGN_FRAC(1,2)+8 },
2501 	{ 0, 1, 2, 3, 4, 5, 6, 7 },
2502 	{ 0*16, 1*16, 2*16, 3*16, 4*16, 5*16, 6*16, 7*16 },
2503 	16*8
2504 };
2505 static struct GfxLayout tilelayout =
2506 {
2507 	16,16,
2508 	RGN_FRAC(1,2),
2509 	4,
2510 	{ 0, 8, RGN_FRAC(1,2), RGN_FRAC(1,2)+8 },
2511 	{ 0, 1, 2, 3, 4, 5, 6, 7,
2512 			8*16+0, 8*16+1, 8*16+2, 8*16+3, 8*16+4, 8*16+5, 8*16+6, 8*16+7 },
2513 	{ 0*16, 1*16, 2*16, 3*16, 4*16, 5*16, 6*16, 7*16,
2514 			16*16, 17*16, 18*16, 19*16, 20*16, 21*16, 22*16, 23*16 },
2515 	64*8
2516 };
2517 
2518 static struct GfxDecodeInfo gfxdecodeinfo[] =
2519 {
2520 	{ REGION_GFX1, 0, &charlayout,  0, 256 },  /* text */
2521 	{ REGION_GFX1, 0, &tilelayout,  0, 256 },  /* sprites & playfield */
2522 	{ -1 } /* end of array */
2523 };
2524 
2525 static struct GfxLayout rambo3_charlayout =
2526 {
2527 	8,8,
2528 	RGN_FRAC(1,4),
2529 	4,
2530 	{ RGN_FRAC(0,4), RGN_FRAC(1,4), RGN_FRAC(2,4), RGN_FRAC(3,4) },
2531 	{ 0, 1, 2, 3, 4, 5, 6, 7 },
2532 	{ 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 },
2533 	8*8
2534 };
2535 static struct GfxLayout rambo3_tilelayout =
2536 {
2537 	16,16,
2538 	RGN_FRAC(1,4),
2539 	4,
2540 	{ RGN_FRAC(0,4), RGN_FRAC(1,4), RGN_FRAC(2,4), RGN_FRAC(3,4) },
2541 	{ 0, 1, 2, 3, 4, 5, 6, 7,
2542 			8*8+0, 8*8+1, 8*8+2, 8*8+3, 8*8+4, 8*8+5, 8*8+6, 8*8+7 },
2543 	{ 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8,
2544 			16*8, 17*8, 18*8, 19*8, 20*8, 21*8, 22*8, 23*8 },
2545 	32*8
2546 };
2547 
2548 static struct GfxDecodeInfo rambo3_gfxdecodeinfo[] =
2549 {
2550 	{ REGION_GFX1, 0, &rambo3_charlayout,  0, 256 },  /* text */
2551 	{ REGION_GFX1, 0, &rambo3_tilelayout,  0, 256 },  /* sprites & playfield */
2552 	{ -1 } /* end of array */
2553 };
2554 
2555 
2556 /* handler called by the YM2610 emulator when the internal timers cause an IRQ */
irqhandler(int irq)2557 static void irqhandler(int irq)
2558 {
2559 	cpu_set_irq_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE);
2560 }
2561 
2562 static struct YM2610interface ym2610_interface_rsaga2 =
2563 {
2564 	1,	/* 1 chip */
2565 	8000000,	/* 8 MHz */
2566 	{ 25 },
2567 	{ 0 },
2568 	{ 0 },
2569 	{ 0 },
2570 	{ 0 },
2571 	{ irqhandler },
2572 	{ REGION_SOUND1 },
2573 	{ REGION_SOUND2 },
2574 	{ YM3012_VOL(100,MIXER_PAN_LEFT,100,MIXER_PAN_RIGHT) }
2575 };
2576 
2577 static struct YM2610interface ym2610_interface_crimec =
2578 {
2579 	1,	/* 1 chip */
2580 	8000000,	/* 8 MHz */
2581 	{ 25 },
2582 	{ 0 },
2583 	{ 0 },
2584 	{ 0 },
2585 	{ 0 },
2586 	{ irqhandler },
2587 	{ REGION_SOUND1 },
2588 	{ REGION_SOUND1 },
2589 	{ YM3012_VOL(100,MIXER_PAN_LEFT,100,MIXER_PAN_RIGHT) }
2590 };
2591 
2592 static struct YM2203interface ym2203_interface =
2593 {
2594 	1,
2595 	3000000,				/* 3 MHz (verified on Viofight PCB) */
2596 	{ YM2203_VOL(80,25) },	/* ?? */
2597 	{ 0 },
2598 	{ 0 },
2599 	{ bankswitch_w },
2600 	{ 0 },
2601 	{ irqhandler }
2602 };
2603 
2604 static struct OKIM6295interface okim6295_interface =
2605 {
2606 	2,
2607 	{ 8000,8000 },			/* ?? */
2608 	{ REGION_SOUND1,REGION_SOUND1 }, /* memory regions */
2609 	{ 50,65 }				/* ?? */
2610 };
2611 static struct OKIM6295interface okim6295_interface_viofight =
2612 {
2613 	1,	/* 1 chip */
2614 	{ 8000 },			/* 8KHz, verified on viofight PCB */
2615 	{ REGION_SOUND1 }, /* memory region */
2616 	{ 50 }				/* ?? */
2617 };
2618 
2619 /*
2620 	Games that use the mb87078 are: pbobble, spacedx and qzshowby
2621 	schems are not available, but from the writes I guess that
2622 	they only use channel 1
2623 	The sound chips' volume altered with the mb87078 are:
2624 	ym2610 in spacedx,
2625 	ym2610b in pbobble,qzshowby,
2626 
2627 	Both ym2610 and ym2610b generate 3 (PSG like) + 2 (fm left,right) channels.
2628 	I use mixer_set_volume() to emulate the effect.
2629 */
mb87078_gain_changed(int channel,int percent)2630 static void mb87078_gain_changed(int channel, int percent)
2631 {
2632 	if (channel==1)
2633 	{
2634 		mixer_set_volume(0,percent);
2635 		mixer_set_volume(1,percent);
2636 		mixer_set_volume(2,percent);
2637 		mixer_set_volume(3,percent);
2638 		mixer_set_volume(4,percent);
2639 		/*usrintf_showmessage("MB87078 gain ch#%i percent=%i",channel,percent);*/
2640 	}
2641 }
2642 
2643 static struct MB87078interface mb87078_interface =
2644 {
2645 	mb87078_gain_changed	/*callback function for gain change*/
2646 };
2647 
2648 
MACHINE_INIT(mb87078)2649 static MACHINE_INIT( mb87078 )
2650 {
2651 	if (Machine->sample_rate != 0)
2652 		MB87078_start(0, &mb87078_interface); /*chip #0*/
2653 /*
2654 	{
2655 		int i;
2656 		for (i=0; i<6; i++)
2657 			log_cb(RETRO_LOG_DEBUG, LOGPRE "SOUND Chan#%i name=%s\n", i, mixer_get_name(i) );
2658 	}
2659 */
2660 }
2661 
2662 
2663 static MACHINE_DRIVER_START( rastsag2 )
2664 
2665 	/* basic machine hardware */
2666 	MDRV_CPU_ADD(M68000, 12000000)	/* 12 MHz */
2667 	MDRV_CPU_MEMORY(rastsag2_readmem,rastsag2_writemem)
2668 	MDRV_CPU_VBLANK_INT(rastansaga2_interrupt,1)
2669 
2670 	MDRV_CPU_ADD(Z80, 4000000)	/* 4 MHz */
2671 	MDRV_CPU_MEMORY(sound_readmem,sound_writemem)
2672 
2673 	MDRV_FRAMES_PER_SECOND(60)
2674 	MDRV_VBLANK_DURATION(DEFAULT_60HZ_VBLANK_DURATION)
2675 	MDRV_INTERLEAVE(10)
2676 
2677 	/* video hardware */
2678 	MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER)
2679 	MDRV_SCREEN_SIZE(64*8, 32*8)
2680 	MDRV_VISIBLE_AREA(0*8, 40*8-1, 2*8, 30*8-1)
2681 	MDRV_GFXDECODE(gfxdecodeinfo)
2682 	MDRV_PALETTE_LENGTH(4096)
2683 
2684 	MDRV_VIDEO_START(taitob_color_order0)
2685 	MDRV_VIDEO_EOF(taitob)
2686 	MDRV_VIDEO_UPDATE(taitob)
2687 
2688 	/* sound hardware */
2689 	MDRV_SOUND_ADD(YM2610, ym2610_interface_rsaga2)
2690 MACHINE_DRIVER_END
2691 
2692 
2693 static MACHINE_DRIVER_START( ashura )
2694 
2695 	/* basic machine hardware */
2696 	MDRV_CPU_ADD(M68000, 12000000)	/* 12 MHz */
2697 	MDRV_CPU_MEMORY(rastsag2_readmem,rastsag2_writemem)
2698 	MDRV_CPU_VBLANK_INT(rastansaga2_interrupt,1)
2699 
2700 	MDRV_CPU_ADD(Z80, 4000000)	/* 4 MHz */
2701 	MDRV_CPU_MEMORY(sound_readmem,sound_writemem)
2702 
2703 	MDRV_FRAMES_PER_SECOND(60)
2704 	MDRV_VBLANK_DURATION(DEFAULT_60HZ_VBLANK_DURATION)
2705 	MDRV_INTERLEAVE(10)
2706 
2707 	/* video hardware */
2708 	MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER)
2709 	MDRV_SCREEN_SIZE(64*8, 32*8)
2710 	MDRV_VISIBLE_AREA(0*8, 40*8-1, 2*8, 30*8-1)
2711 	MDRV_GFXDECODE(gfxdecodeinfo)
2712 	MDRV_PALETTE_LENGTH(4096)
2713 
2714 	MDRV_VIDEO_START(taitob_color_order0)
2715 	MDRV_VIDEO_EOF(taitob)
2716 	MDRV_VIDEO_UPDATE(taitob)
2717 
2718 	/* sound hardware */
2719 	MDRV_SOUND_ADD(YM2610, ym2610_interface_crimec)
2720 MACHINE_DRIVER_END
2721 
2722 
2723 static MACHINE_DRIVER_START( crimec )
2724 
2725 	/* basic machine hardware */
2726 	MDRV_CPU_ADD(M68000, 12000000)	/* 12 MHz */
2727 	MDRV_CPU_MEMORY(crimec_readmem,crimec_writemem)
2728 	MDRV_CPU_VBLANK_INT(crimec_interrupt,1)
2729 
2730 	MDRV_CPU_ADD(Z80, 4000000)	/* 4 MHz */
2731 	MDRV_CPU_MEMORY(sound_readmem,sound_writemem)
2732 
2733 	MDRV_FRAMES_PER_SECOND(60)
2734 	MDRV_VBLANK_DURATION(DEFAULT_60HZ_VBLANK_DURATION)
2735 	MDRV_INTERLEAVE(10)
2736 
2737 	/* video hardware */
2738 	MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER)
2739 	MDRV_SCREEN_SIZE(64*8, 32*8)
2740 	MDRV_VISIBLE_AREA(0*8, 40*8-1, 2*8, 30*8-1)
2741 	MDRV_GFXDECODE(gfxdecodeinfo)
2742 	MDRV_PALETTE_LENGTH(4096)
2743 
2744 	MDRV_VIDEO_START(taitob_color_order1)
2745 	MDRV_VIDEO_EOF(taitob)
2746 	MDRV_VIDEO_UPDATE(taitob)
2747 
2748 	/* sound hardware */
2749 	MDRV_SOUND_ADD(YM2610, ym2610_interface_crimec)
2750 MACHINE_DRIVER_END
2751 
2752 
2753 static MACHINE_DRIVER_START( tetrist )
2754 
2755 	/* basic machine hardware */
2756 	MDRV_CPU_ADD(M68000, 12000000)	/* 12 MHz ???*/
2757 	MDRV_CPU_MEMORY(tetrist_readmem,tetrist_writemem)
2758 	MDRV_CPU_VBLANK_INT(rastansaga2_interrupt,1)
2759 
2760 	MDRV_CPU_ADD(Z80, 4000000)	/* 4 MHz */
2761 	MDRV_CPU_MEMORY(sound_readmem,sound_writemem)
2762 
2763 	MDRV_FRAMES_PER_SECOND(60)
2764 	MDRV_VBLANK_DURATION(DEFAULT_60HZ_VBLANK_DURATION)
2765 	MDRV_INTERLEAVE(10)
2766 
2767 	/* video hardware */
2768 	MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER)
2769 	MDRV_SCREEN_SIZE(64*8, 32*8)
2770 	MDRV_VISIBLE_AREA(0*8, 40*8-1, 2*8, 30*8-1)
2771 	MDRV_GFXDECODE(gfxdecodeinfo)
2772 	MDRV_PALETTE_LENGTH(4096)
2773 
2774 	MDRV_VIDEO_START(taitob_color_order0)
2775 	MDRV_VIDEO_EOF(taitob)
2776 	MDRV_VIDEO_UPDATE(taitob)
2777 
2778 	/* sound hardware */
2779 	MDRV_SOUND_ADD(YM2610, ym2610_interface_rsaga2)
2780 MACHINE_DRIVER_END
2781 
2782 
2783 static MACHINE_DRIVER_START( hitice )
2784 
2785 	/* basic machine hardware */
2786 	MDRV_CPU_ADD(M68000, 12000000)	/* 12 MHz */
2787 	MDRV_CPU_MEMORY(hitice_readmem,hitice_writemem)
2788 	MDRV_CPU_VBLANK_INT(hitice_interrupt,1)
2789 
2790 	MDRV_CPU_ADD(Z80, 4000000)	/* 4 MHz */
2791 	MDRV_CPU_MEMORY(hitice_sound_readmem,hitice_sound_writemem)
2792 
2793 	MDRV_FRAMES_PER_SECOND(60)
2794 	MDRV_VBLANK_DURATION(DEFAULT_60HZ_VBLANK_DURATION)
2795 	MDRV_INTERLEAVE(10)
2796 
2797 	/* video hardware */
2798 	MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER)
2799 	MDRV_SCREEN_SIZE(64*8, 32*8)
2800 	MDRV_VISIBLE_AREA(0*8, 40*8-1, 2*8, 30*8-1)
2801 	MDRV_GFXDECODE(gfxdecodeinfo)
2802 	MDRV_PALETTE_LENGTH(4096)
2803 
2804 	MDRV_VIDEO_START(hitice)
2805 	MDRV_VIDEO_EOF(taitob)
2806 	MDRV_VIDEO_UPDATE(taitob)
2807 
2808 	/* sound hardware */
2809 	MDRV_SOUND_ADD(YM2203, ym2203_interface)
2810 	MDRV_SOUND_ADD(OKIM6295, okim6295_interface)
2811 MACHINE_DRIVER_END
2812 
2813 
2814 static MACHINE_DRIVER_START( rambo3 )
2815 
2816 	/* basic machine hardware */
2817 	MDRV_CPU_ADD(M68000, 12000000)	/* 12 MHz */
2818 	MDRV_CPU_MEMORY(rambo3_readmem,rambo3_writemem)
2819 	MDRV_CPU_VBLANK_INT(rambo3_interrupt,1)
2820 
2821 	MDRV_CPU_ADD(Z80, 4000000)	/* 4 MHz */
2822 	MDRV_CPU_MEMORY(sound_readmem,sound_writemem)
2823 
2824 	MDRV_FRAMES_PER_SECOND(60)
2825 	MDRV_VBLANK_DURATION(DEFAULT_60HZ_VBLANK_DURATION)
2826 	MDRV_INTERLEAVE(10)
2827 
2828 	/* video hardware */
2829 	MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER)
2830 	MDRV_SCREEN_SIZE(64*8, 32*8)
2831 	MDRV_VISIBLE_AREA(0*8, 40*8-1, 2*8, 30*8-1)
2832 	MDRV_GFXDECODE(rambo3_gfxdecodeinfo)
2833 	MDRV_PALETTE_LENGTH(4096)
2834 
2835 	MDRV_VIDEO_START(taitob_color_order0)
2836 	MDRV_VIDEO_EOF(taitob)
2837 	MDRV_VIDEO_UPDATE(taitob)
2838 
2839 	/* sound hardware */
2840 	MDRV_SOUND_ADD(YM2610, ym2610_interface_crimec)
2841 MACHINE_DRIVER_END
2842 
2843 
2844 static MACHINE_DRIVER_START( rambo3a )
2845 
2846 	/* basic machine hardware */
2847 	MDRV_CPU_ADD(M68000, 12000000)	/* 12 MHz */
2848 	MDRV_CPU_MEMORY(rambo3_readmem,rambo3_writemem)
2849 	MDRV_CPU_VBLANK_INT(rambo3_interrupt,1)
2850 
2851 	MDRV_CPU_ADD(Z80, 4000000)	/* 4 MHz */
2852 	MDRV_CPU_MEMORY(sound_readmem,sound_writemem)
2853 
2854 	MDRV_FRAMES_PER_SECOND(60)
2855 	MDRV_VBLANK_DURATION(DEFAULT_60HZ_VBLANK_DURATION)
2856 	MDRV_INTERLEAVE(10)
2857 
2858 	/* video hardware */
2859 	MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER)
2860 	MDRV_SCREEN_SIZE(64*8, 32*8)
2861 	MDRV_VISIBLE_AREA(0*8, 40*8-1, 2*8, 30*8-1)
2862 	MDRV_GFXDECODE(gfxdecodeinfo)
2863 	MDRV_PALETTE_LENGTH(4096)
2864 
2865 	MDRV_VIDEO_START(taitob_color_order2)
2866 	MDRV_VIDEO_EOF(taitob)
2867 	MDRV_VIDEO_UPDATE(taitob)
2868 
2869 	/* sound hardware */
2870 	MDRV_SOUND_ADD(YM2610, ym2610_interface_crimec)
2871 MACHINE_DRIVER_END
2872 
2873 
2874 static MACHINE_DRIVER_START( pbobble )
2875 
2876 	/* basic machine hardware */
2877 	MDRV_CPU_ADD(M68000, 12000000)	/* 12 MHz */
2878 	MDRV_CPU_MEMORY(pbobble_readmem,pbobble_writemem)
2879 	MDRV_CPU_VBLANK_INT(pbobble_interrupt,1)
2880 
2881 	MDRV_CPU_ADD(Z80, 4000000)	/* 4 MHz */
2882 	MDRV_CPU_MEMORY(sound_readmem,sound_writemem)
2883 
2884 	MDRV_FRAMES_PER_SECOND(60)
2885 	MDRV_VBLANK_DURATION(DEFAULT_60HZ_VBLANK_DURATION)
2886 	MDRV_INTERLEAVE(10)
2887 
2888 	MDRV_MACHINE_INIT(mb87078)
2889 	MDRV_NVRAM_HANDLER(taito_b)
2890 
2891 	/* video hardware */
2892 	MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER)
2893 	MDRV_SCREEN_SIZE(64*8, 32*8)
2894 	MDRV_VISIBLE_AREA(0*8, 40*8-1, 2*8, 30*8-1)
2895 	MDRV_GFXDECODE(gfxdecodeinfo)
2896 	MDRV_PALETTE_LENGTH(4096)
2897 
2898 	MDRV_VIDEO_START(taitob_color_order1)
2899 	MDRV_VIDEO_EOF(taitob)
2900 	MDRV_VIDEO_UPDATE(taitob)
2901 
2902 	/* sound hardware */
2903 	MDRV_SOUND_ADD(YM2610B, ym2610_interface_crimec)
2904 MACHINE_DRIVER_END
2905 
2906 
2907 static MACHINE_DRIVER_START( spacedx )
2908 
2909 	/* basic machine hardware */
2910 	MDRV_CPU_ADD(M68000, 12000000)	/* 12 MHz */
2911 	MDRV_CPU_MEMORY(spacedx_readmem,spacedx_writemem)
2912 	MDRV_CPU_VBLANK_INT(pbobble_interrupt,1)
2913 
2914 	MDRV_CPU_ADD(Z80, 4000000)	/* 4 MHz */
2915 	MDRV_CPU_MEMORY(sound_readmem,sound_writemem)
2916 
2917 	MDRV_FRAMES_PER_SECOND(60)
2918 	MDRV_VBLANK_DURATION(DEFAULT_60HZ_VBLANK_DURATION)
2919 	MDRV_INTERLEAVE(10)
2920 
2921 	MDRV_MACHINE_INIT(mb87078)
2922 	MDRV_NVRAM_HANDLER(taito_b)
2923 
2924 	/* video hardware */
2925 	MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER)
2926 	MDRV_SCREEN_SIZE(64*8, 32*8)
2927 	MDRV_VISIBLE_AREA(0*8, 40*8-1, 2*8, 30*8-1)
2928 	MDRV_GFXDECODE(gfxdecodeinfo)
2929 	MDRV_PALETTE_LENGTH(4096)
2930 
2931 	MDRV_VIDEO_START(taitob_color_order1)
2932 	MDRV_VIDEO_EOF(taitob)
2933 	MDRV_VIDEO_UPDATE(taitob)
2934 
2935 	/* sound hardware */
2936 	MDRV_SOUND_ADD(YM2610, ym2610_interface_crimec)
2937 MACHINE_DRIVER_END
2938 
2939 
2940 static MACHINE_DRIVER_START( spacedxo )
2941 
2942 	/* basic machine hardware */
2943 	MDRV_CPU_ADD(M68000, 12000000)	/* 12 MHz */
2944 	MDRV_CPU_MEMORY(spacedxo_readmem,spacedxo_writemem)
2945 	MDRV_CPU_VBLANK_INT(selfeena_interrupt,1)
2946 
2947 	MDRV_CPU_ADD(Z80, 4000000)	/* 4 MHz */
2948 	MDRV_CPU_MEMORY(sound_readmem,sound_writemem)
2949 
2950 	MDRV_FRAMES_PER_SECOND(60)
2951 	MDRV_VBLANK_DURATION(DEFAULT_60HZ_VBLANK_DURATION)
2952 	MDRV_INTERLEAVE(10)
2953 
2954 	/* video hardware */
2955 	MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER)
2956 	MDRV_SCREEN_SIZE(64*8, 32*8)
2957 	MDRV_VISIBLE_AREA(0*8, 40*8-1, 2*8, 30*8-1)
2958 	MDRV_GFXDECODE(gfxdecodeinfo)
2959 	MDRV_PALETTE_LENGTH(4096)
2960 
2961 	MDRV_VIDEO_START(taitob_color_order2)
2962 	MDRV_VIDEO_EOF(taitob)
2963 	MDRV_VIDEO_UPDATE(taitob)
2964 
2965 	/* sound hardware */
2966 	MDRV_SOUND_ADD(YM2610, ym2610_interface_crimec)
2967 MACHINE_DRIVER_END
2968 
2969 
2970 static MACHINE_DRIVER_START( qzshowby )
2971 
2972 	/* basic machine hardware */
2973 	MDRV_CPU_ADD(M68000, 16000000)	/* 16 MHz according to the readme*/
2974 	MDRV_CPU_MEMORY(qzshowby_readmem,qzshowby_writemem)
2975 	MDRV_CPU_VBLANK_INT(pbobble_interrupt,1)
2976 
2977 	MDRV_CPU_ADD(Z80, 4000000)	/* 4 MHz */
2978 	MDRV_CPU_MEMORY(sound_readmem,sound_writemem)
2979 
2980 	MDRV_FRAMES_PER_SECOND(60)
2981 	MDRV_VBLANK_DURATION(DEFAULT_60HZ_VBLANK_DURATION)
2982 	MDRV_INTERLEAVE(10)
2983 
2984 	MDRV_MACHINE_INIT(mb87078)
2985 	MDRV_NVRAM_HANDLER(taito_b)
2986 
2987 	/* video hardware */
2988 	MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER)
2989 	MDRV_SCREEN_SIZE(64*8, 32*8)
2990 	MDRV_VISIBLE_AREA(0*8, 40*8-1, 2*8, 30*8-1)
2991 	MDRV_GFXDECODE(gfxdecodeinfo)
2992 	MDRV_PALETTE_LENGTH(4096)
2993 
2994 	MDRV_VIDEO_START(taitob_color_order1)
2995 	MDRV_VIDEO_EOF(taitob)
2996 	MDRV_VIDEO_UPDATE(taitob)
2997 
2998 	/* sound hardware */
2999 	MDRV_SOUND_ADD(YM2610B, ym2610_interface_crimec)
3000 MACHINE_DRIVER_END
3001 
3002 
3003 static MACHINE_DRIVER_START( viofight )
3004 
3005 	/* basic machine hardware */
3006 	MDRV_CPU_ADD(M68000, 12000000)	/* 12 MHz */
3007 	MDRV_CPU_MEMORY(viofight_readmem,viofight_writemem)
3008 	MDRV_CPU_VBLANK_INT(viofight_interrupt,1)
3009 
3010 	MDRV_CPU_ADD(Z80, 6000000)	/* 6 MHz verified */
3011 	MDRV_CPU_MEMORY(hitice_sound_readmem, viofight_sound_writemem)
3012 
3013 	MDRV_FRAMES_PER_SECOND(60)
3014 	MDRV_VBLANK_DURATION(DEFAULT_60HZ_VBLANK_DURATION)
3015 	MDRV_INTERLEAVE(10)
3016 
3017 	/* video hardware */
3018 	MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER)
3019 	MDRV_SCREEN_SIZE(64*8, 32*8)
3020 	MDRV_VISIBLE_AREA(0*8, 40*8-1, 2*8, 30*8-1)
3021 	MDRV_GFXDECODE(gfxdecodeinfo)
3022 	MDRV_PALETTE_LENGTH(4096)
3023 
3024 	MDRV_VIDEO_START(taitob_color_order2)
3025 	MDRV_VIDEO_EOF(taitob)
3026 	MDRV_VIDEO_UPDATE(taitob)
3027 
3028 	/* sound hardware */
3029 	MDRV_SOUND_ADD(YM2203, ym2203_interface)
3030 	MDRV_SOUND_ADD(OKIM6295, okim6295_interface_viofight)
3031 MACHINE_DRIVER_END
3032 
3033 #if 0
3034 static void masterw_patch(void)
3035 {
3036 	data16_t *rom = (data16_t*)memory_region(REGION_CPU1);
3037 	rom[ 0x3fffe/2 ] = 2; /*US version*/
3038 }
3039 #endif
3040 
3041 static MACHINE_DRIVER_START( masterw )
3042 
3043 	/* basic machine hardware */
3044 	MDRV_CPU_ADD(M68000, 12000000)	/* 12 MHz */
3045 	MDRV_CPU_MEMORY(masterw_readmem,masterw_writemem)
3046 	MDRV_CPU_VBLANK_INT(masterw_interrupt,1)
3047 
3048 	MDRV_CPU_ADD(Z80, 4000000)	/* 4 MHz */
3049 	MDRV_CPU_MEMORY(masterw_sound_readmem,masterw_sound_writemem)
3050 
3051 	MDRV_FRAMES_PER_SECOND(60)
3052 	MDRV_VBLANK_DURATION(DEFAULT_60HZ_VBLANK_DURATION)
3053 	MDRV_INTERLEAVE(10)
3054 
3055 	/* video hardware */
3056 	MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER)
3057 	MDRV_SCREEN_SIZE(64*8, 32*8)
3058 	MDRV_VISIBLE_AREA(0*8, 40*8-1, 2*8, 30*8-1)
3059 	MDRV_GFXDECODE(gfxdecodeinfo)
3060 	MDRV_PALETTE_LENGTH(4096)
3061 
3062 	MDRV_VIDEO_START(taitob_color_order2)
3063 	MDRV_VIDEO_EOF(taitob)
3064 	MDRV_VIDEO_UPDATE(taitob)
3065 
3066 	/* sound hardware */
3067 	MDRV_SOUND_ADD(YM2203, ym2203_interface)
3068 MACHINE_DRIVER_END
3069 
3070 
3071 static MACHINE_DRIVER_START( silentd )
3072 
3073 	/* basic machine hardware */
3074 	MDRV_CPU_ADD(M68000, 16000000)	/* 16 MHz ??? */
3075 	MDRV_CPU_MEMORY(silentd_readmem,silentd_writemem)
3076 	MDRV_CPU_VBLANK_INT(silentd_interrupt,1)
3077 
3078 	MDRV_CPU_ADD(Z80, 4000000)	/* 4 MHz */
3079 	MDRV_CPU_MEMORY(sound_readmem,sound_writemem)
3080 
3081 	MDRV_FRAMES_PER_SECOND(60)
3082 	MDRV_VBLANK_DURATION(DEFAULT_60HZ_VBLANK_DURATION)
3083 	MDRV_INTERLEAVE(10)
3084 
3085 	/* video hardware */
3086 	MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER)
3087 	MDRV_SCREEN_SIZE(64*8, 32*8)
3088 	MDRV_VISIBLE_AREA(0*8, 40*8-1, 2*8, 30*8-1)
3089 	MDRV_GFXDECODE(gfxdecodeinfo)
3090 	MDRV_PALETTE_LENGTH(4096)
3091 
3092 	MDRV_VIDEO_START(taitob_color_order2)
3093 	MDRV_VIDEO_EOF(taitob)
3094 	MDRV_VIDEO_UPDATE(taitob)
3095 
3096 	/* sound hardware */
3097 	MDRV_SOUND_ADD(YM2610, ym2610_interface_rsaga2)
3098 MACHINE_DRIVER_END
3099 
3100 
3101 static MACHINE_DRIVER_START( selfeena )
3102 
3103 	/* basic machine hardware */
3104 	MDRV_CPU_ADD(M68000, 12000000)	/* 12 MHz */
3105 	MDRV_CPU_MEMORY(selfeena_readmem,selfeena_writemem)
3106 	MDRV_CPU_VBLANK_INT(selfeena_interrupt,1)
3107 
3108 	MDRV_CPU_ADD(Z80, 4000000)	/* 4 MHz */
3109 	MDRV_CPU_MEMORY(sound_readmem,sound_writemem)
3110 
3111 	MDRV_FRAMES_PER_SECOND(60)
3112 	MDRV_VBLANK_DURATION(DEFAULT_60HZ_VBLANK_DURATION)
3113 	MDRV_INTERLEAVE(10)
3114 
3115 	/* video hardware */
3116 	MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER)
3117 	MDRV_SCREEN_SIZE(64*8, 32*8)
3118 	MDRV_VISIBLE_AREA(0*8, 40*8-1, 2*8, 30*8-1)
3119 	MDRV_GFXDECODE(gfxdecodeinfo)
3120 	MDRV_PALETTE_LENGTH(4096)
3121 
3122 	MDRV_VIDEO_START(taitob_color_order2)
3123 	MDRV_VIDEO_EOF(taitob)
3124 	MDRV_VIDEO_UPDATE(taitob)
3125 
3126 	/* sound hardware */
3127 	MDRV_SOUND_ADD(YM2610, ym2610_interface_crimec)
3128 MACHINE_DRIVER_END
3129 
3130 #if 0
3131 static void ryujin_patch(void)
3132 {
3133 	data16_t *rom = (data16_t*)memory_region(REGION_CPU1);
3134 	rom[ 0x62/2 ] = 1;
3135 	/*0 (already in rom) - Taito Corporation 1993*/
3136 	/*1 - Taito America corp with blue FBI logo*/
3137 }
3138 #endif
3139 
3140 static MACHINE_DRIVER_START( ryujin )
3141 
3142 	/* basic machine hardware */
3143 	MDRV_CPU_ADD(M68000, 12000000)	/* 12 MHz */
3144 	MDRV_CPU_MEMORY(selfeena_readmem,selfeena_writemem)
3145 	MDRV_CPU_VBLANK_INT(selfeena_interrupt,1)
3146 
3147 	MDRV_CPU_ADD(Z80, 4000000)	/* 4 MHz */
3148 	MDRV_CPU_MEMORY(sound_readmem,sound_writemem)
3149 
3150 	MDRV_FRAMES_PER_SECOND(60)
3151 	MDRV_VBLANK_DURATION(DEFAULT_60HZ_VBLANK_DURATION)
3152 	MDRV_INTERLEAVE(10)
3153 
3154 	/* video hardware */
3155 	MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER)
3156 	MDRV_SCREEN_SIZE(64*8, 32*8)
3157 	MDRV_VISIBLE_AREA(0*8, 40*8-1, 2*8, 30*8-1)
3158 	MDRV_GFXDECODE(gfxdecodeinfo)
3159 	MDRV_PALETTE_LENGTH(4096)
3160 
3161 	MDRV_VIDEO_START(taitob_color_order2)
3162 	MDRV_VIDEO_EOF(taitob)
3163 	MDRV_VIDEO_UPDATE(taitob)
3164 
3165 	/* sound hardware */
3166 	MDRV_SOUND_ADD(YM2610, ym2610_interface_crimec)
3167 MACHINE_DRIVER_END
3168 
3169 #if 0
3170 static void sbm_patch(void)
3171 {
3172 	data16_t *rom = (data16_t*)memory_region(REGION_CPU1);
3173 	rom[ 0x7ffff/2 ] = 2; /*US version*/
3174 }
3175 #endif
3176 
3177 static MACHINE_DRIVER_START( sbm )
3178 
3179 	/* basic machine hardware */
3180 	MDRV_CPU_ADD(M68000, 12000000)	/* 12 MHz */
3181 	MDRV_CPU_MEMORY(sbm_readmem,sbm_writemem)
3182 	MDRV_CPU_VBLANK_INT(sbm_interrupt,1)
3183 
3184 	MDRV_CPU_ADD(Z80, 4000000)	/* 4 MHz */
3185 	MDRV_CPU_MEMORY(sound_readmem,sound_writemem)
3186 
3187 	MDRV_FRAMES_PER_SECOND(60)
3188 	MDRV_VBLANK_DURATION(DEFAULT_60HZ_VBLANK_DURATION)
3189 	MDRV_INTERLEAVE(10)
3190 
3191 	/* video hardware */
3192 	MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER)
3193 	MDRV_SCREEN_SIZE(64*8, 32*8)
3194 	MDRV_VISIBLE_AREA(0*8, 40*8-1, 2*8, 30*8-1)
3195 	MDRV_GFXDECODE(gfxdecodeinfo)
3196 	MDRV_PALETTE_LENGTH(4096)
3197 
3198 	MDRV_VIDEO_START(taitob_color_order0)
3199 	MDRV_VIDEO_EOF(taitob)
3200 	MDRV_VIDEO_UPDATE(taitob)
3201 
3202 	/* sound hardware */
3203 	MDRV_SOUND_ADD(YM2610B, ym2610_interface_crimec)
3204 MACHINE_DRIVER_END
3205 
3206 /***************************************************************************
3207 
3208   Game driver(s)
3209 
3210 ***************************************************************************/
3211 
3212 ROM_START( rastsag2 )
3213 	ROM_REGION( 0x80000, REGION_CPU1, 0 )     /* 512k for 68000 code */
3214 	ROM_LOAD16_BYTE( "b81-08.50" , 0x00000, 0x20000, CRC(d6da9169) SHA1(33d74315754576e6f879059de033f96f9003f819) )
3215 	ROM_LOAD16_BYTE( "b81-07.31" , 0x00001, 0x20000, CRC(8edf17d7) SHA1(b0c03002ed520abffefd55d4969d0ed4fcf3a3a4) )
3216 	ROM_LOAD16_BYTE( "b81-10.49" , 0x40000, 0x20000, CRC(53f34344) SHA1(9930c3fd9c17f7d9b654221da3896d0ff5778c97) )
3217 	ROM_LOAD16_BYTE( "b81-09.30" , 0x40001, 0x20000, CRC(630d34af) SHA1(42452111b10f1d543e03661012dda879218dea62) )
3218 
3219 	ROM_REGION( 0x1c000, REGION_CPU2, 0 )     /* 64k for Z80 code */
3220 	ROM_LOAD( "b81-11.37", 0x00000, 0x4000, CRC(3704bf09) SHA1(a0a37b23e3df482c5f5aa43825345ea8affbba34) )
3221 	ROM_CONTINUE(           0x10000, 0xc000 ) /* banked stuff */
3222 
3223 	ROM_REGION( 0x100000, REGION_GFX1, ROMREGION_DISPOSE )
3224 	ROM_LOAD( "b81-03.14", 0x000000, 0x080000, CRC(551b75e6) SHA1(5b8388ee2c6262f359c9e6d04c951ea8dc3901c9) )
3225 	ROM_LOAD( "b81-04.15", 0x080000, 0x080000, CRC(cf734e12) SHA1(4201a74468058761454515738fbf3a7b22a66e00) )
3226 
3227 	ROM_REGION( 0x80000, REGION_SOUND1, 0 )
3228 	ROM_LOAD( "b81-01.1", 0x00000, 0x80000, CRC(b33f796b) SHA1(6cdb32f56283acdf20eb46a1e658e3bd7c97978c) )
3229 
3230 	ROM_REGION( 0x80000, REGION_SOUND2, 0 )
3231 	ROM_LOAD( "b81-02.2", 0x00000, 0x80000, CRC(20ec3b86) SHA1(fcdcc7f0a09feb824d8d73b1af0aae7ec30fd1ed) )
3232 ROM_END
3233 
3234 ROM_START( nastarw )
3235 	ROM_REGION( 0x80000, REGION_CPU1, 0 )     /* 512k for 68000 code */
3236 	ROM_LOAD16_BYTE( "b81-08.50" , 0x00000, 0x20000, CRC(d6da9169) SHA1(33d74315754576e6f879059de033f96f9003f819) )
3237 	ROM_LOAD16_BYTE( "b81-12.31" , 0x00001, 0x20000, CRC(f9d82741) SHA1(f5f3a1101d92b6c241e819dcdcdcdc4b125140f7) )
3238 	ROM_LOAD16_BYTE( "b81-10.49" , 0x40000, 0x20000, CRC(53f34344) SHA1(9930c3fd9c17f7d9b654221da3896d0ff5778c97) )
3239 	ROM_LOAD16_BYTE( "b81-09.30" , 0x40001, 0x20000, CRC(630d34af) SHA1(42452111b10f1d543e03661012dda879218dea62) )
3240 
3241 	ROM_REGION( 0x1c000, REGION_CPU2, 0 )     /* 64k for Z80 code */
3242 	ROM_LOAD( "b81-11.37", 0x00000, 0x4000, CRC(3704bf09) SHA1(a0a37b23e3df482c5f5aa43825345ea8affbba34) )
3243 	ROM_CONTINUE(           0x10000, 0xc000 ) /* banked stuff */
3244 
3245 	ROM_REGION( 0x100000, REGION_GFX1, ROMREGION_DISPOSE )
3246 	ROM_LOAD( "b81-03.14", 0x000000, 0x080000, CRC(551b75e6) SHA1(5b8388ee2c6262f359c9e6d04c951ea8dc3901c9) )
3247 	ROM_LOAD( "b81-04.15", 0x080000, 0x080000, CRC(cf734e12) SHA1(4201a74468058761454515738fbf3a7b22a66e00) )
3248 
3249 	ROM_REGION( 0x80000, REGION_SOUND1, 0 )
3250 	ROM_LOAD( "b81-01.1", 0x00000, 0x80000, CRC(b33f796b) SHA1(6cdb32f56283acdf20eb46a1e658e3bd7c97978c) )
3251 
3252 	ROM_REGION( 0x80000, REGION_SOUND2, 0 )
3253 	ROM_LOAD( "b81-02.2", 0x00000, 0x80000, CRC(20ec3b86) SHA1(fcdcc7f0a09feb824d8d73b1af0aae7ec30fd1ed) )
3254 ROM_END
3255 
3256 ROM_START( nastar )
3257 	ROM_REGION( 0x80000, REGION_CPU1, 0 )     /* 512k for 68000 code */
3258 	ROM_LOAD16_BYTE( "b81-08.50" , 0x00000, 0x20000, CRC(d6da9169) SHA1(33d74315754576e6f879059de033f96f9003f819) )
3259 	ROM_LOAD16_BYTE( "b81-13.31" , 0x00001, 0x20000, CRC(60d176fb) SHA1(fbe3a0603bcd23e565b0d474a63742d20a3ce8cc) )
3260 	ROM_LOAD16_BYTE( "b81-10.49" , 0x40000, 0x20000, CRC(53f34344) SHA1(9930c3fd9c17f7d9b654221da3896d0ff5778c97) )
3261 	ROM_LOAD16_BYTE( "b81-09.30" , 0x40001, 0x20000, CRC(630d34af) SHA1(42452111b10f1d543e03661012dda879218dea62) )
3262 
3263 	ROM_REGION( 0x1c000, REGION_CPU2, 0 )     /* 64k for Z80 code */
3264 	ROM_LOAD( "b81-11.37", 0x00000, 0x4000, CRC(3704bf09) SHA1(a0a37b23e3df482c5f5aa43825345ea8affbba34) )
3265 	ROM_CONTINUE(           0x10000, 0xc000 ) /* banked stuff */
3266 
3267 	ROM_REGION( 0x100000, REGION_GFX1, ROMREGION_DISPOSE )
3268 	ROM_LOAD( "b81-03.14", 0x000000, 0x080000, CRC(551b75e6) SHA1(5b8388ee2c6262f359c9e6d04c951ea8dc3901c9) )
3269 	ROM_LOAD( "b81-04.15", 0x080000, 0x080000, CRC(cf734e12) SHA1(4201a74468058761454515738fbf3a7b22a66e00) )
3270 
3271 	ROM_REGION( 0x80000, REGION_SOUND1, 0 )
3272 	ROM_LOAD( "b81-01.1", 0x00000, 0x80000, CRC(b33f796b) SHA1(6cdb32f56283acdf20eb46a1e658e3bd7c97978c) )
3273 
3274 	ROM_REGION( 0x80000, REGION_SOUND2, 0 )
3275 	ROM_LOAD( "b81-02.2", 0x00000, 0x80000, CRC(20ec3b86) SHA1(fcdcc7f0a09feb824d8d73b1af0aae7ec30fd1ed) )
3276 
3277 /*	ROM_REGION( 0x1000, REGION_USER1)	 // PALs /*/
3278 /*	ROM_LOAD( "b81-05.21", 0x0000, 0x0001 )*/
3279 /*	ROM_LOAD( "b81-06.22", 0x0000, 0x0001 )*/
3280 
3281 ROM_END
3282 
3283 ROM_START( crimec )
3284 	ROM_REGION( 0x80000, REGION_CPU1, 0 )     /* 512k for 68000 code */
3285 	ROM_LOAD16_BYTE( "b99_07.40",    0x00000, 0x20000, CRC(26e886e6) SHA1(b7d0024a084216c1139eb6705f1b8143902cbed3) )
3286 	ROM_LOAD16_BYTE( "b99_05.29",    0x00001, 0x20000, CRC(ff7f9a9d) SHA1(c1897a141eea423879d2792640a9ee85636ed5be) )
3287 	ROM_LOAD16_BYTE( "b99_06.39",    0x40000, 0x20000, CRC(1f26aa92) SHA1(10ab253812db83204c136d01d865063a2210cb92) )
3288 	ROM_LOAD16_BYTE( "b99_14.28",    0x40001, 0x20000, CRC(71c8b4d7) SHA1(55068c9cac75200f564b10f98f322e30aaa6849e) )
3289 
3290 	ROM_REGION( 0x1c000, REGION_CPU2, 0 )     /* 64k for Z80 code */
3291 	ROM_LOAD( "b99_08.45", 0x00000, 0x4000, CRC(26135451) SHA1(651c77285eb12a13a2fe4069031c6f01150ecba4) )
3292 	ROM_CONTINUE(          0x10000, 0xc000 ) /* banked stuff */
3293 
3294 	ROM_REGION( 0x100000, REGION_GFX1, ROMREGION_DISPOSE )
3295 	ROM_LOAD( "b99_02.18", 0x000000, 0x080000, CRC(2a5d4a26) SHA1(94bdfca9365970a80a639027b195b71cebc5ab9c) )
3296 	ROM_LOAD( "b99_01.19", 0x080000, 0x080000, CRC(a19e373a) SHA1(2208c9142473dc2218fd8b97fd6d0c861aeba011) )
3297 
3298 	ROM_REGION( 0x80000, REGION_SOUND1, 0 )
3299 	ROM_LOAD( "b99_03.37", 0x000000, 0x080000, CRC(dda10df7) SHA1(ffbe1423794035e6f049fddb096b7282610b7cee) )
3300 ROM_END
3301 
3302 ROM_START( crimecu )
3303 	ROM_REGION( 0x80000, REGION_CPU1, 0 )     /* 512k for 68000 code */
3304 	ROM_LOAD16_BYTE( "b99_07.40",    0x00000, 0x20000, CRC(26e886e6) SHA1(b7d0024a084216c1139eb6705f1b8143902cbed3) )
3305 	ROM_LOAD16_BYTE( "b99_05.29",    0x00001, 0x20000, CRC(ff7f9a9d) SHA1(c1897a141eea423879d2792640a9ee85636ed5be) )
3306 	ROM_LOAD16_BYTE( "b99_06.39",    0x40000, 0x20000, CRC(1f26aa92) SHA1(10ab253812db83204c136d01d865063a2210cb92) )
3307 	ROM_LOAD16_BYTE( "b99_13.28",    0x40001, 0x20000, CRC(06cf8441) SHA1(0395fd1f38366bd56b4b53e435dc7c3676d9e9bf) )
3308 
3309 	ROM_REGION( 0x1c000, REGION_CPU2, 0 )     /* 64k for Z80 code */
3310 	ROM_LOAD( "b99_08.45", 0x00000, 0x4000, CRC(26135451) SHA1(651c77285eb12a13a2fe4069031c6f01150ecba4) )
3311 	ROM_CONTINUE(          0x10000, 0xc000 ) /* banked stuff */
3312 
3313 	ROM_REGION( 0x100000, REGION_GFX1, ROMREGION_DISPOSE )
3314 	ROM_LOAD( "b99_02.18", 0x000000, 0x080000, CRC(2a5d4a26) SHA1(94bdfca9365970a80a639027b195b71cebc5ab9c) )
3315 	ROM_LOAD( "b99_01.19", 0x080000, 0x080000, CRC(a19e373a) SHA1(2208c9142473dc2218fd8b97fd6d0c861aeba011) )
3316 
3317 	ROM_REGION( 0x80000, REGION_SOUND1, 0 )
3318 	ROM_LOAD( "b99_03.37", 0x000000, 0x080000, CRC(dda10df7) SHA1(ffbe1423794035e6f049fddb096b7282610b7cee) )
3319 ROM_END
3320 
3321 ROM_START( crimecj )
3322 	ROM_REGION( 0x80000, REGION_CPU1, 0 )     /* 512k for 68000 code */
3323 	ROM_LOAD16_BYTE( "b99_07.40", 0x00000, 0x20000, CRC(26e886e6) SHA1(b7d0024a084216c1139eb6705f1b8143902cbed3) )
3324 	ROM_LOAD16_BYTE( "b99_05.29", 0x00001, 0x20000, CRC(ff7f9a9d) SHA1(c1897a141eea423879d2792640a9ee85636ed5be) )
3325 	ROM_LOAD16_BYTE( "b99_06.39", 0x40000, 0x20000, CRC(1f26aa92) SHA1(10ab253812db83204c136d01d865063a2210cb92) )
3326 	ROM_LOAD16_BYTE( "b99_15.28", 0x40001, 0x20000, CRC(e8c1e56d) SHA1(ba0dc181db843e26676223f54cb121df738be987) )
3327 
3328 	ROM_REGION( 0x1c000, REGION_CPU2, 0 )     /* 64k for Z80 code */
3329 	ROM_LOAD( "b99_08.45", 0x00000, 0x4000, CRC(26135451) SHA1(651c77285eb12a13a2fe4069031c6f01150ecba4) )
3330 	ROM_CONTINUE(          0x10000, 0xc000 ) /* banked stuff */
3331 
3332 	ROM_REGION( 0x100000, REGION_GFX1, ROMREGION_DISPOSE )
3333 	ROM_LOAD( "b99_02.18", 0x000000, 0x080000, CRC(2a5d4a26) SHA1(94bdfca9365970a80a639027b195b71cebc5ab9c) )
3334 	ROM_LOAD( "b99_01.19", 0x080000, 0x080000, CRC(a19e373a) SHA1(2208c9142473dc2218fd8b97fd6d0c861aeba011) )
3335 
3336 	ROM_REGION( 0x80000, REGION_SOUND1, 0 )
3337 	ROM_LOAD( "b99_03.37", 0x000000, 0x080000, CRC(dda10df7) SHA1(ffbe1423794035e6f049fddb096b7282610b7cee) )
3338 ROM_END
3339 
3340 ROM_START( ashura )
3341 	ROM_REGION( 0x80000, REGION_CPU1, 0 )     /* 512k for 68000 code */
3342 	ROM_LOAD16_BYTE( "c4307-1.50", 0x00000, 0x20000, CRC(d5ceb20f) SHA1(59bc9468d7f43d3b1388c2915fafeba7e2cf13a5) )
3343 	ROM_LOAD16_BYTE( "c4305-1.31", 0x00001, 0x20000, CRC(a6f3bb37) SHA1(6959f3bcbcd2d5b13c95dcfd7a536541dcab49f8) )
3344 	ROM_LOAD16_BYTE( "c4306-1.49", 0x40000, 0x20000, CRC(0f331802) SHA1(e7ed01b0d664c4db6ea9acc54b57e674e10685aa) )
3345 	ROM_LOAD16_BYTE( "c4304-1.30", 0x40001, 0x20000, CRC(e06a2414) SHA1(77ebe1e61b6303f328757de2c90fae6588026414) )
3346 
3347 	ROM_REGION( 0x1c000, REGION_CPU2, 0 )     /* 64k for Z80 code */
3348 	ROM_LOAD( "c43-16",  0x00000, 0x4000, CRC(cb26fce1) SHA1(7cc60326455c7bb2ca543ddfd4002462cc079837) )
3349 	ROM_CONTINUE(        0x10000, 0xc000 ) /* banked stuff */
3350 
3351 	ROM_REGION( 0x100000, REGION_GFX1, ROMREGION_DISPOSE )
3352 	ROM_LOAD( "c43-02",  0x00000, 0x80000, CRC(105722ae) SHA1(1de5d396d2a4d5948544082c471a15ca1b8e756c) )
3353 	ROM_LOAD( "c43-03",  0x80000, 0x80000, CRC(426606ba) SHA1(961ec0a9dc18044adae433337bfa89d951c5207c) )
3354 
3355 	ROM_REGION( 0x80000, REGION_SOUND1, 0 )
3356 	ROM_LOAD( "c43-01",  0x00000, 0x80000, CRC(db953f37) SHA1(252591b676366d4828acb20c77aa9960ad9b367e) )
3357 ROM_END
3358 
3359 ROM_START( ashurau )
3360 	ROM_REGION( 0x80000, REGION_CPU1, 0 )     /* 512k for 68000 code */
3361 	ROM_LOAD16_BYTE( "c43-11", 0x00000, 0x20000, CRC(d5aefc9b) SHA1(0fdfa166942ea70a77f956d16fd3b31225044c54) )
3362 	ROM_LOAD16_BYTE( "c43-09", 0x00001, 0x20000, CRC(e91d0ab1) SHA1(992f63ebba538e624c695c1a868b14f4baa66ab9) )
3363 	ROM_LOAD16_BYTE( "c43-10", 0x40000, 0x20000, CRC(c218e7ea) SHA1(d9b19ad26206238f8417efe3b80c020fea0dd573) )
3364 	ROM_LOAD16_BYTE( "c43-08", 0x40001, 0x20000, CRC(5ef4f19f) SHA1(864e3a4a4e92adaa63249debad6292c528289fbe) )
3365 
3366 	ROM_REGION( 0x1c000, REGION_CPU2, 0 )     /* 64k for Z80 code */
3367 	ROM_LOAD( "c43-16",  0x00000, 0x4000, CRC(cb26fce1) SHA1(7cc60326455c7bb2ca543ddfd4002462cc079837) )
3368 	ROM_CONTINUE(        0x10000, 0xc000 ) /* banked stuff */
3369 
3370 	ROM_REGION( 0x100000, REGION_GFX1, ROMREGION_DISPOSE )
3371 	ROM_LOAD( "c43-02",  0x00000, 0x80000, CRC(105722ae) SHA1(1de5d396d2a4d5948544082c471a15ca1b8e756c) )
3372 	ROM_LOAD( "c43-03",  0x80000, 0x80000, CRC(426606ba) SHA1(961ec0a9dc18044adae433337bfa89d951c5207c) )
3373 
3374 	ROM_REGION( 0x80000, REGION_SOUND1, 0 )
3375 	ROM_LOAD( "c43-01",  0x00000, 0x80000, CRC(db953f37) SHA1(252591b676366d4828acb20c77aa9960ad9b367e) )
3376 ROM_END
3377 
3378 ROM_START( tetrist )
3379 	ROM_REGION( 0x80000, REGION_CPU1, 0 )     /* 512k for 68000 code */
3380 	ROM_LOAD16_BYTE( "c12-03.bin", 0x000000, 0x020000, CRC(38f1ed41) SHA1(d11194dd6686e6eba8c481bb0f9662041ca396ed) )
3381 	ROM_LOAD16_BYTE( "c12-02.bin", 0x000001, 0x020000, CRC(ed9530bc) SHA1(84c324e4ef0c5c3af04ea000ad3e9c319bd9f2a2) )
3382 	ROM_LOAD16_BYTE( "c12-05.bin", 0x040000, 0x020000, CRC(128e9927) SHA1(227b4a43074b66c9ba6f4497eb329fbcc5e3f52b) )
3383 	ROM_LOAD16_BYTE( "c12-04.bin", 0x040001, 0x020000, CRC(5da7a319) SHA1(0c903b3274f6eafe24c8b5ef476dc5e8e3131b20) )
3384 
3385 	ROM_REGION( 0x1c000, REGION_CPU2, 0 )     /* 64k for Z80 code */
3386 	ROM_LOAD( "c12-06.bin", 0x00000, 0x4000, CRC(f2814b38) SHA1(846d3cc7a6f1cfbfd5661d6942f24330d21f91f0) )
3387 	ROM_CONTINUE(           0x10000, 0xc000 ) /* banked stuff */
3388 
3389 	ROM_REGION( 0x100000, REGION_GFX1, ROMREGION_DISPOSE )
3390 	/* empty (uses only pixel layer) */
3391 
3392 	ROM_REGION( 0x80000, REGION_SOUND1, 0 )	/* adpcm samples */
3393 	/* empty */
3394 
3395 	ROM_REGION( 0x80000, REGION_SOUND2, 0 )	/* DELTA-T samples */
3396 	/* empty */
3397 ROM_END
3398 
3399 ROM_START( hitice )
3400 	ROM_REGION( 0x80000, REGION_CPU1, 0 )     /* 512k for 68000 code */
3401 	ROM_LOAD16_BYTE( "c59-10", 0x00000, 0x20000, CRC(e4ffad15) SHA1(87da85e1489fe57bd012177a70434152e5475009) )
3402 	ROM_LOAD16_BYTE( "c59-12", 0x00001, 0x20000, CRC(a080d7af) SHA1(9c68b78fbcc42a2f748d1b7f84f138be79f7c0c9) )
3403 	ROM_LOAD16_BYTE( "c59-09", 0x40000, 0x10000, CRC(e243e3b0) SHA1(a7daf96ef70e9a92bb3ee4a151ce674a187c15a2) )
3404 	ROM_LOAD16_BYTE( "c59-11", 0x40001, 0x10000, CRC(4d4dfa52) SHA1(8ecd62dc2a2f35850340469afa54862b46053ce0) )
3405 
3406 	ROM_REGION( 0x1c000, REGION_CPU2, 0 )     /* 64k for Z80 code */
3407 	ROM_LOAD( "c59-08",  0x00000, 0x4000, CRC(d3cbc10b) SHA1(75305e264300e0ebd15ada45a6d222fee75bd8e4) )
3408 	ROM_CONTINUE(        0x10000, 0xc000 ) /* banked stuff */
3409 
3410 	ROM_REGION( 0x100000, REGION_GFX1, ROMREGION_DISPOSE )
3411 	ROM_LOAD( "c59-03",  0x00000, 0x80000, CRC(9e513048) SHA1(4ffa63c01a25e912dd218b7b2deaf5ad1a53659a) )
3412 	ROM_LOAD( "c59-02",  0x80000, 0x80000, CRC(affb5e07) SHA1(afe92268c78ab5565d2913672e25f3136a15f534) )
3413 
3414 	ROM_REGION( 0x80000, REGION_SOUND1, 0 )
3415 	ROM_LOAD( "c59-01",  0x00000, 0x20000, CRC(46ae291d) SHA1(d36ab48cfa393a6a1eae5caa2a397087eb098f7f) )
3416 ROM_END
3417 
3418 ROM_START( rambo3 )
3419 	ROM_REGION( 0x80000, REGION_CPU1, 0 )     /* 512k for 68000 code */
3420 	ROM_LOAD16_BYTE( "r3-0e.rom",  0x00000, 0x10000, CRC(3efa4177) SHA1(5e4995e34b92f625f7825238dfbc9e76d4090871) )
3421 	ROM_LOAD16_BYTE( "r3-0o.rom",  0x00001, 0x10000, CRC(55c38d92) SHA1(4f712b4eb20ee176da83a5f1154d5890d1360398) )
3422 
3423 /*NOTE: there is a hole in address space here */
3424 
3425 	ROM_LOAD16_BYTE( "r3-1e.rom" , 0x40000, 0x20000, CRC(40e363c7) SHA1(9907def4736fbff15cf769a762bf1811f890d1c7) )
3426 	ROM_LOAD16_BYTE( "r3-1o.rom" , 0x40001, 0x20000, CRC(7f1fe6ab) SHA1(31231747982d9c42f693f650bc137794b438c2b7) )
3427 
3428 	ROM_REGION( 0x1c000, REGION_CPU2, 0 )     /* 64k for Z80 code */
3429 	ROM_LOAD( "r3-00.rom", 0x00000, 0x4000, CRC(df7a6ed6) SHA1(68f7f17c9ead6aee653b02de234ec54b519907d7) )
3430 	ROM_CONTINUE(          0x10000, 0xc000 ) /* banked stuff */
3431 
3432 	ROM_REGION( 0x200000, REGION_GFX1, ROMREGION_DISPOSE )
3433 	ROM_LOAD( "r3-ch1ll.rom", 0x000000, 0x020000, CRC(c86ea5fc) SHA1(daf89340bb5d6ae57ef6faedb3f86c944c68fc45) )
3434 	ROM_LOAD( "r3-ch1hl.rom", 0x020000, 0x020000, CRC(7525eb92) SHA1(f691a000580d078f207ea6e9bc8a527e74bc20e5) )
3435 	ROM_LOAD( "r3-ch3ll.rom", 0x040000, 0x020000, CRC(abe54b1e) SHA1(4b6d0c694d9c1fcdec87b70fbadee9fb3455b42c) )
3436 	ROM_LOAD( "r3-ch3hl.rom", 0x060000, 0x020000, CRC(80e5647e) SHA1(744e9dcc651b80ef4b3cc29ed0ebb223bb65f106) )
3437 
3438 	ROM_LOAD( "r3-ch1lh.rom", 0x080000, 0x020000, CRC(75568cf0) SHA1(78cb940fafb6e01a018d6823636b398a898e988a) )
3439 	ROM_LOAD( "r3-ch1hh.rom", 0x0a0000, 0x020000, CRC(e39cff37) SHA1(79680526759013f8641e82c27b3afc184c06f059) )
3440 	ROM_LOAD( "r3-ch3lh.rom", 0x0c0000, 0x020000, CRC(5a155c04) SHA1(9472ef6474275ac5993c2afb222cfbc8d848bd86) )
3441 	ROM_LOAD( "r3-ch3hh.rom", 0x0e0000, 0x020000, CRC(abe58fdb) SHA1(6429caa8680255c46457ab0ad6c0f610291d8a92) )
3442 
3443 	ROM_LOAD( "r3-ch0ll.rom", 0x100000, 0x020000, CRC(b416f1bf) SHA1(8ae546c8286d616a991766eb97c3d281dbafd944) )
3444 	ROM_LOAD( "r3-ch0hl.rom", 0x120000, 0x020000, CRC(a4cad36d) SHA1(f8327bcc490cb66703de9bbcd931d964609ae822) )
3445 	ROM_LOAD( "r3-ch2ll.rom", 0x140000, 0x020000, CRC(d0ce3051) SHA1(0dc57f53b82d8ae15106df8a08b404c076b9fcef) )
3446 	ROM_LOAD( "r3-ch2hl.rom", 0x160000, 0x020000, CRC(837d8677) SHA1(6a3b36399e89c8ff031b25bcf62704197d711a5b) )
3447 
3448 	ROM_LOAD( "r3-ch0lh.rom", 0x180000, 0x020000, CRC(76a330a2) SHA1(4324bceca7bf5155f7b2543748989e2d364a7e97) )
3449 	ROM_LOAD( "r3-ch0hh.rom", 0x1a0000, 0x020000, CRC(4dc69751) SHA1(2abf657dc951dc263b53a2c7a4ed2f4aaf5f9a98) )
3450 	ROM_LOAD( "r3-ch2lh.rom", 0x1c0000, 0x020000, CRC(df3bc48f) SHA1(6747a453da4bca0b837f4ef1f1bbe871f15332ed) )
3451 	ROM_LOAD( "r3-ch2hh.rom", 0x1e0000, 0x020000, CRC(bf37dfac) SHA1(27e825bd0a4d7ae65714fefeb6fedac501984ba9) )
3452 
3453 	ROM_REGION( 0x80000, REGION_SOUND1, 0 )
3454 	ROM_LOAD( "r3-a1.rom", 0x00000, 0x20000, CRC(4396fa19) SHA1(cb6d983f210249676c500723041d74fa3fdc517d) )
3455 	ROM_LOAD( "r3-a2.rom", 0x20000, 0x20000, CRC(41fe53a8) SHA1(1723046111d0115d3f64c3111c50d51306e88ad0) )
3456 	ROM_LOAD( "r3-a3.rom", 0x40000, 0x20000, CRC(e89249ba) SHA1(cd94492a0643e9e1e25b121160914822a6a7723e) )
3457 	ROM_LOAD( "r3-a4.rom", 0x60000, 0x20000, CRC(9cf4c21b) SHA1(756fc6bbc798a39a18eab3829e032cac8fe3f8ed) )
3458 ROM_END
3459 
3460 ROM_START( rambo3a )
3461 	ROM_REGION( 0x80000, REGION_CPU1, 0 )     /* 512k for 68000 code */
3462 	ROM_LOAD16_BYTE( "ramb3-11.bin",  0x00000, 0x20000, CRC(1cc42247) SHA1(e5a226a0016ec329fc23046c426c6303e452ef1d) )
3463 	ROM_LOAD16_BYTE( "ramb3-13.bin",  0x00001, 0x20000, CRC(0a964cb7) SHA1(332fe23c33b1400c628e0c491f3e00820bde6696) )
3464 	ROM_LOAD16_BYTE( "ramb3-07.bin",  0x40000, 0x20000, CRC(c973ff6f) SHA1(d11f289f8559602783d97b831182e8c37954980f) )
3465 	ROM_LOAD16_BYTE( "ramb3-06.bin",  0x40001, 0x20000, CRC(a83d3fd5) SHA1(4f07d969af3b25e4ab8d0f2c03e0c0c8ada02991) )
3466 
3467 	ROM_REGION( 0x1c000, REGION_CPU2, 0 )     /* 64k for Z80 code */
3468 	ROM_LOAD( "ramb3-10.bin", 0x00000, 0x4000, CRC(b18bc020) SHA1(5f3a108ad1f652103dda14672223529077a0924b) )
3469 	ROM_CONTINUE(             0x10000, 0xc000 ) /* banked stuff */
3470 
3471 	ROM_REGION( 0x200000, REGION_GFX1, ROMREGION_DISPOSE )
3472 	ROM_LOAD( "ramb3-03.bin",  0x000000, 0x80000, CRC(f5808c41) SHA1(73e129e87d7e240f96cb06d484fb19cd0ef49721) )
3473 	ROM_LOAD( "ramb3-04.bin",  0x080000, 0x80000, CRC(c57831ce) SHA1(85c203a858df34fe8663b2b16447d328cdb4145e) )
3474 	ROM_LOAD( "ramb3-01.bin",  0x100000, 0x80000, CRC(c55fcf54) SHA1(6a26ed2541be9e3341f20e74cc49b5366ce7d424) )
3475 	ROM_LOAD( "ramb3-02.bin",  0x180000, 0x80000, CRC(9dd014c6) SHA1(0f046d9de57db0272810adde7d49cc348b78f1f7) )
3476 
3477 	ROM_REGION( 0x80000, REGION_SOUND1, 0 )
3478 	ROM_LOAD( "ramb3-05.bin", 0x00000, 0x80000, CRC(0179dc40) SHA1(89feb708618ae7fa96883473d5c7a09dcc6f452a) )
3479 ROM_END
3480 
3481 ROM_START( rambo3ae )
3482 	ROM_REGION( 0x80000, REGION_CPU1, 0 )     /* 512k for 68000 code */
3483 	ROM_LOAD16_BYTE( "ramb3-11.bin",  0x00000, 0x20000, CRC(1cc42247) SHA1(e5a226a0016ec329fc23046c426c6303e452ef1d) )
3484 	ROM_LOAD16_BYTE( "ramb3-14.bin",  0x00001, 0x20000, CRC(7d917c21) SHA1(2850c46d6bdabfb76c40a7dc78ebc14b69ce95c9) )
3485 	ROM_LOAD16_BYTE( "ramb3-07.bin",  0x40000, 0x20000, CRC(c973ff6f) SHA1(d11f289f8559602783d97b831182e8c37954980f) )
3486 	ROM_LOAD16_BYTE( "ramb3-06.bin",  0x40001, 0x20000, CRC(a83d3fd5) SHA1(4f07d969af3b25e4ab8d0f2c03e0c0c8ada02991) )
3487 
3488 	ROM_REGION( 0x1c000, REGION_CPU2, 0 )     /* 64k for Z80 code */
3489 	ROM_LOAD( "ramb3-10.bin", 0x00000, 0x4000, CRC(b18bc020) SHA1(5f3a108ad1f652103dda14672223529077a0924b) )
3490 	ROM_CONTINUE(             0x10000, 0xc000 ) /* banked stuff */
3491 
3492 	ROM_REGION( 0x200000, REGION_GFX1, ROMREGION_DISPOSE )
3493 	ROM_LOAD( "ramb3-03.bin",  0x000000, 0x80000, CRC(f5808c41) SHA1(73e129e87d7e240f96cb06d484fb19cd0ef49721) )
3494 	ROM_LOAD( "ramb3-04.bin",  0x080000, 0x80000, CRC(c57831ce) SHA1(85c203a858df34fe8663b2b16447d328cdb4145e) )
3495 	ROM_LOAD( "ramb3-01.bin",  0x100000, 0x80000, CRC(c55fcf54) SHA1(6a26ed2541be9e3341f20e74cc49b5366ce7d424) )
3496 	ROM_LOAD( "ramb3-02.bin",  0x180000, 0x80000, CRC(9dd014c6) SHA1(0f046d9de57db0272810adde7d49cc348b78f1f7) )
3497 
3498 	ROM_REGION( 0x80000, REGION_SOUND1, 0 )
3499 	ROM_LOAD( "ramb3-05.bin", 0x00000, 0x80000, CRC(0179dc40) SHA1(89feb708618ae7fa96883473d5c7a09dcc6f452a) )
3500 ROM_END
3501 
3502 ROM_START( pbobble )
3503 	ROM_REGION( 0x80000, REGION_CPU1, 0 )     /* 512k for 68000 code */
3504 	ROM_LOAD16_BYTE( "pb-1c18.bin", 0x00000, 0x40000, CRC(5de14f49) SHA1(91d537748f26e19a5c32de4b8dad341750de39ef) )
3505 	ROM_LOAD16_BYTE( "pb-ic2.bin",  0x00001, 0x40000, CRC(2abe07d1) SHA1(2bb78b606a7341d74cced0447f8bd5ccc635cc4c) )
3506 
3507 	ROM_REGION( 0x2c000, REGION_CPU2, 0 )     /* 128k for Z80 code */
3508 	ROM_LOAD( "pb-ic27.bin", 0x00000, 0x04000, CRC(26efa4c4) SHA1(795af8f6d23c2cbe2c811ec9ab1f14a4eee3f99e) )
3509 	ROM_CONTINUE(            0x10000, 0x1c000 ) /* banked stuff */
3510 
3511 	ROM_REGION( 0x100000, REGION_GFX1, ROMREGION_DISPOSE )
3512 	ROM_LOAD( "pb-ic14.bin", 0x00000, 0x80000, CRC(55f90ea4) SHA1(793c79e5b72171124368ad09dd31235252c541f5) )
3513 	ROM_LOAD( "pb-ic9.bin",  0x80000, 0x80000, CRC(3253aac9) SHA1(916d85aa96e2914630833292a0655b0389b4a39b) )
3514 
3515 	ROM_REGION( 0x100000, REGION_SOUND1, 0 )
3516 	ROM_LOAD( "pb-ic15.bin", 0x000000, 0x100000, CRC(0840cbc4) SHA1(1adbd7aef44fa80832f63dfb8efdf69fd7256a57) )
3517 ROM_END
3518 
3519 ROM_START( spacedx )
3520 	ROM_REGION( 0x80000, REGION_CPU1, 0 )     /* 512k for 68000 code */
3521 	ROM_LOAD16_BYTE( "d89-06",       0x00000, 0x40000, CRC(7122751e) SHA1(4b4eb58af28f1988ff102251407449d0affbd4c2) )
3522 	ROM_LOAD16_BYTE( "si-dxusa.ic2", 0x00001, 0x40000, CRC(50a4b8d1) SHA1(a8feac97c03cc8dc303dd9f4dae28f3daf851181) )
3523 
3524 	ROM_REGION( 0x1c000, REGION_CPU2, 0 )     /* 64k for Z80 code */
3525 	ROM_LOAD( "d89-07.27", 0x00000, 0x4000, CRC(bd743401) SHA1(bf1ff2255bbd79be21855814d52daced71fbe198) )
3526 	ROM_CONTINUE(          0x10000, 0xc000 ) /* banked stuff */
3527 
3528 	ROM_REGION( 0x100000, REGION_GFX1, ROMREGION_DISPOSE )
3529 	ROM_LOAD( "d89-02.14", 0x00000, 0x80000, CRC(c36544b9) SHA1(6bd5257dfb27532621b75f43e31aa351ad2192a2) )
3530 	ROM_LOAD( "d89-01.9",  0x80000, 0x80000, CRC(fffa0660) SHA1(de1abe1b1e9d14405b5663103ea4a6119fce7cc5) )
3531 
3532 	ROM_REGION( 0x80000, REGION_SOUND1, 0 )	/* adpcm samples */
3533 	ROM_LOAD( "d89-03.15", 0x00000, 0x80000, CRC(218f31a4) SHA1(9f52b9fa8f02003888180524a6e9ee7c9230f55d) )
3534 ROM_END
3535 
3536 ROM_START( spacedxj )
3537 	ROM_REGION( 0x80000, REGION_CPU1, 0 )     /* 512k for 68000 code */
3538 	ROM_LOAD16_BYTE( "d89-06", 0x00000, 0x40000, CRC(7122751e) SHA1(4b4eb58af28f1988ff102251407449d0affbd4c2) )
3539 	ROM_LOAD16_BYTE( "d89-05", 0x00001, 0x40000, CRC(be1638af) SHA1(5d28af674dd355159602e323800419a33e0b77d2) )
3540 
3541 	ROM_REGION( 0x1c000, REGION_CPU2, 0 )     /* 64k for Z80 code */
3542 	ROM_LOAD( "d89-07.27", 0x00000, 0x4000, CRC(bd743401) SHA1(bf1ff2255bbd79be21855814d52daced71fbe198) )
3543 	ROM_CONTINUE(          0x10000, 0xc000 ) /* banked stuff */
3544 
3545 	ROM_REGION( 0x100000, REGION_GFX1, ROMREGION_DISPOSE )
3546 	ROM_LOAD( "d89-02.14", 0x00000, 0x80000, CRC(c36544b9) SHA1(6bd5257dfb27532621b75f43e31aa351ad2192a2) )
3547 	ROM_LOAD( "d89-01.9" , 0x80000, 0x80000, CRC(fffa0660) SHA1(de1abe1b1e9d14405b5663103ea4a6119fce7cc5) )
3548 
3549 	ROM_REGION( 0x80000, REGION_SOUND1, 0 )	/* adpcm samples */
3550 	ROM_LOAD( "d89-03.15", 0x00000, 0x80000, CRC(218f31a4) SHA1(9f52b9fa8f02003888180524a6e9ee7c9230f55d) )
3551 ROM_END
3552 
3553 ROM_START( spacedxo )
3554 	ROM_REGION( 0x80000, REGION_CPU1, 0 )     /* 256k for 68000 code */
3555 	ROM_LOAD16_BYTE( "d89-08.bin",  0x00000, 0x20000, CRC(0c2fe7f9) SHA1(a0773c059c8ff2c9e367e0fb460d7e5f9a762ab1) )
3556 	ROM_LOAD16_BYTE( "d89-09j.bin", 0x00001, 0x20000, CRC(7f0a0ba4) SHA1(479df027929201997aeebbea5901a0a494f2dd61) )
3557 
3558 	ROM_REGION( 0x1c000, REGION_CPU2, 0 )     /* 64k for Z80 code */
3559 	ROM_LOAD( "d89-07.27", 0x00000, 0x4000, CRC(bd743401) SHA1(bf1ff2255bbd79be21855814d52daced71fbe198) )
3560 	ROM_CONTINUE(          0x10000, 0xc000 ) /* banked stuff */
3561 
3562 	ROM_REGION( 0x100000, REGION_GFX1, ROMREGION_DISPOSE )
3563 	ROM_LOAD( "d89-12.bin",0x00000, 0x80000, CRC(53df86f1) SHA1(f03d77dd54eb455462133a29dd8fec007abedcfd) )
3564 	ROM_LOAD( "d89-13.bin",0x80000, 0x80000, CRC(c44c1352) SHA1(78a04fe0ade6e8f9e6bbda7652a54a79b6208fdd) )
3565 
3566 	ROM_REGION( 0x80000, REGION_SOUND1, 0 )	/* adpcm samples */
3567 	ROM_LOAD( "d89-03.15", 0x00000, 0x80000, CRC(218f31a4) SHA1(9f52b9fa8f02003888180524a6e9ee7c9230f55d) )
3568 ROM_END
3569 
3570 ROM_START( qzshowby )
3571 	ROM_REGION( 0x100000, REGION_CPU1, 0 )     /* 1M for 68000 code */
3572 	ROM_LOAD16_BYTE( "d72-13.bin", 0x00000, 0x80000, CRC(a867759f) SHA1(ab06f42d58ae099fe5c1f810786c2a3e5a667e8e) )
3573 	ROM_LOAD16_BYTE( "d72-12.bin", 0x00001, 0x80000, CRC(522c09a7) SHA1(2ceeb7ac24bb621630cc996381e57501f9ea672e) )
3574 
3575 	ROM_REGION( 0x2c000, REGION_CPU2, 0 )     /* 128k for Z80 code */
3576 	ROM_LOAD(  "d72-11.bin", 0x00000, 0x04000, CRC(2ca046e2) SHA1(983620e657d729e1441d509f18141bb3bb581855) )
3577 	ROM_CONTINUE(            0x10000, 0x1c000 ) /* banked stuff */
3578 
3579 	ROM_REGION( 0x400000, REGION_GFX1, ROMREGION_DISPOSE )
3580 	ROM_LOAD( "d72-03.bin", 0x000000, 0x200000, CRC(1de257d0) SHA1(df03b1fb5cd69e2d2eb2088f96f26b0ea9756fb7) )
3581 	ROM_LOAD( "d72-02.bin", 0x200000, 0x200000, CRC(bf0da640) SHA1(2b2493904ed0b94dc12b56dae71cc5c25701aef9) )
3582 
3583 	ROM_REGION( 0x200000, REGION_SOUND1, 0 )
3584 	ROM_LOAD( "d72-01.bin", 0x00000, 0x200000, CRC(b82b8830) SHA1(4b2dca16fe072a5ee51de5cf40637e3f1b39f695) )
3585 ROM_END
3586 
3587 ROM_START( viofight )
3588 	ROM_REGION( 0x080000, REGION_CPU1, 0 )     /* 1M for 68000 code */
3589 	ROM_LOAD16_BYTE( "c16-11.42", 0x00000, 0x10000, CRC(23dbd388) SHA1(488f928826d16b201dcc4b491b09955d0af91f19) )
3590 	ROM_LOAD16_BYTE( "c16-14.23", 0x00001, 0x10000, CRC(dc934f6a) SHA1(36d7b10478f2b97d0521edb84f1f4fa5a11f962b) )
3591 	ROM_LOAD16_BYTE( "c16-07.41", 0x40000, 0x20000, CRC(64d1d059) SHA1(643ac7fa5076147b24810a8e1b925dfe09f75864) )
3592 	ROM_LOAD16_BYTE( "c16-06.22", 0x40001, 0x20000, CRC(043761d8) SHA1(4587cadd73b628b4b9ac5c537cec20f90fb4959d) )
3593 
3594 	ROM_REGION( 0x1c000, REGION_CPU2, 0 )     /* 128k for Z80 code */
3595 	ROM_LOAD(  "c16-12.32", 0x00000, 0x04000, CRC(6fb028c7) SHA1(a808d82e872914f994652e95dca3fcad00ba02fc) )
3596 	ROM_CONTINUE(            0x10000, 0x0c000 ) /* banked stuff */
3597 
3598 	ROM_REGION( 0x200000, REGION_GFX1, ROMREGION_DISPOSE )
3599 	ROM_LOAD( "c16-01.1", 0x000000, 0x080000, CRC(7059ce83) SHA1(1e6825ab944254cd4ba6574762172245b3352319) )
3600 	ROM_LOAD( "c16-02.2", 0x080000, 0x080000, CRC(b458e905) SHA1(b712cbf4a4015e1fc2243871fe753e230f0172c2) )
3601 	ROM_LOAD( "c16-03.3", 0x100000, 0x080000, CRC(515a9431) SHA1(836be28614326d093be8841617cca83cef8d55cc) )
3602 	ROM_LOAD( "c16-04.4", 0x180000, 0x080000, CRC(ebf285e2) SHA1(0f806e42778e28e9687d85b2601ee08dd786869b) )
3603 
3604 	ROM_REGION( 0x80000, REGION_SOUND1, 0 )
3605 	ROM_LOAD( "c16-05.47", 0x000000, 0x80000, CRC(a49d064a) SHA1(f9ed675cfaae69b68c99c7dce7c2a457b5b5c293) )
3606 
3607 /*	ROM_REGION( 0x1000, REGION_USER1)	 // PALs /*/
3608 /*	ROM_LOAD( "c16-08.34", 0x0000, 0x0001 )*/
3609 /*	ROM_LOAD( "c16-09.35", 0x0000, 0x0001 )*/
3610 
3611 ROM_END
3612 
3613 ROM_START( masterw )
3614 	ROM_REGION( 0x80000, REGION_CPU1, 0 )     /* 512k for 68000 code */
3615 	ROM_LOAD16_BYTE( "b72-06.rom"   , 0x00000, 0x20000, CRC(ae848eff) SHA1(8715e64c5e03097aff5bf1a27e3809619a7731f0) )
3616 	ROM_LOAD16_BYTE( "b72-12.rom"   , 0x00001, 0x20000, CRC(7176ce70) SHA1(f3462ab9fe7e118b16fbe31d8caca27452280bf9) )
3617 	ROM_LOAD16_BYTE( "b72-04.rom"   , 0x40000, 0x20000, CRC(141e964c) SHA1(324e881317a3bf9885c81bb53cdc3de782ec2952) )
3618 	ROM_LOAD16_BYTE( "b72-03.rom"   , 0x40001, 0x20000, CRC(f4523496) SHA1(2c3e9d014ace1ae5127f432292f8d19c3a0ae1b0) )
3619 
3620 	ROM_REGION( 0x1c000, REGION_CPU2, 0 )     /* 64k for Z80 code */
3621 	ROM_LOAD( "b72-07.rom", 0x00000, 0x4000, CRC(2b1a946f) SHA1(cc9512e44bd92020ab5a53716b6399b7a6cde76d) )
3622 	ROM_CONTINUE(           0x10000, 0xc000 ) /* banked stuff */
3623 
3624 	ROM_REGION( 0x100000, REGION_GFX1, ROMREGION_DISPOSE )
3625 	ROM_LOAD( "mow-m02.rom", 0x000000, 0x080000, CRC(c519f65a) SHA1(f40cd7e09fa50abdafa95b7f9edf229e94e53d6f) )
3626 	ROM_LOAD( "mow-m01.rom", 0x080000, 0x080000, CRC(a24ac26e) SHA1(895715a2bb0cb15334cba2283bd228b4fc08cd0c) )
3627 ROM_END
3628 
3629 ROM_START( silentd )
3630 	ROM_REGION( 0x80000, REGION_CPU1, 0 )     /* 256k for 68000 code */
3631 	ROM_LOAD16_BYTE( "sr_12-1.rom", 0x00000, 0x20000, CRC(5883d362) SHA1(21c3af053fa92c26f119466ecd655697cc72ff3a) )
3632 	ROM_LOAD16_BYTE( "sr_15-1.rom", 0x00001, 0x20000, CRC(8c0a72ae) SHA1(2199c4d6b87913ffb24cdccd6ca5176a97132baa) )
3633 	ROM_LOAD16_BYTE( "sr_11.rom",   0x40000, 0x20000, CRC(35da4428) SHA1(5374bd97ad58aa2d67404cb05c862bb3aba40d6a) )
3634 	ROM_LOAD16_BYTE( "sr_09.rom",   0x40001, 0x20000, CRC(2f05b14a) SHA1(f9ae935612e95d8ac2596af1728a6062569e9a42) )
3635 
3636 	ROM_REGION( 0x1c000, REGION_CPU2, 0 )     /* 64k for Z80 code */
3637 	ROM_LOAD(  "sr_13.rom", 0x00000, 0x04000, CRC(651861ab) SHA1(f94a120b70a4d59e17a6e120ca461b1f37587c0c) )
3638 	ROM_CONTINUE(           0x10000, 0x0c000 ) /* banked stuff */
3639 
3640 	ROM_REGION( 0x400000, REGION_GFX1, ROMREGION_DISPOSE )
3641 	ROM_LOAD( "sd_m04.rom", 0x000000, 0x100000, CRC(53237217) SHA1(fec044c26b8c99235f88c8be0d9ac63b81a3a094) )
3642 	ROM_LOAD( "sd_m06.rom", 0x100000, 0x100000, CRC(e6e6dfa7) SHA1(913fa9a21cea175a1af87023144ebc98b3b0f33b) )
3643 	ROM_LOAD( "sd_m03.rom", 0x200000, 0x100000, CRC(1b9b2846) SHA1(d9c87e130bc3baa949d8a8738daad648fcf284df) )
3644 	ROM_LOAD( "sd_m05.rom", 0x300000, 0x100000, CRC(e02472c5) SHA1(35572610f6823ec980a928a75abd689197ebe207) )
3645 
3646 	ROM_REGION( 0x80000, REGION_SOUND1, 0 )
3647 	ROM_LOAD( "sd_m02.rom", 0x00000, 0x80000, CRC(e0de5c39) SHA1(75d0e193d882e67921c216c3293454e34304d25e) )
3648 
3649 	ROM_REGION( 0x80000, REGION_SOUND2, 0 )
3650 	ROM_LOAD( "sd_m01.rom", 0x00000, 0x80000, CRC(b41fff1a) SHA1(54920d13fa2b3000eedab9d0050a299ae743c663) )
3651 ROM_END
3652 
3653 ROM_START( silentdj )
3654 	ROM_REGION( 0x80000, REGION_CPU1, 0 )     /* 256k for 68000 code */
3655 	ROM_LOAD16_BYTE( "sr_12-1.rom", 0x00000, 0x20000, CRC(5883d362) SHA1(21c3af053fa92c26f119466ecd655697cc72ff3a) )
3656 	ROM_LOAD16_BYTE( "10-1.10",     0x00001, 0x20000, CRC(584306fc) SHA1(961cb6aaa426e3d83c499d101ef369b86a84c5d8) )
3657 	ROM_LOAD16_BYTE( "sr_11.rom",   0x40000, 0x20000, CRC(35da4428) SHA1(5374bd97ad58aa2d67404cb05c862bb3aba40d6a) )
3658 	ROM_LOAD16_BYTE( "sr_09.rom",   0x40001, 0x20000, CRC(2f05b14a) SHA1(f9ae935612e95d8ac2596af1728a6062569e9a42) )
3659 
3660 	ROM_REGION( 0x1c000, REGION_CPU2, 0 )     /* 64k for Z80 code */
3661 	ROM_LOAD(  "sr_13.rom", 0x00000, 0x04000, CRC(651861ab) SHA1(f94a120b70a4d59e17a6e120ca461b1f37587c0c) )
3662 	ROM_CONTINUE(           0x10000, 0x0c000 ) /* banked stuff */
3663 
3664 	ROM_REGION( 0x400000, REGION_GFX1, ROMREGION_DISPOSE )
3665 	ROM_LOAD( "sd_m04.rom", 0x000000, 0x100000, CRC(53237217) SHA1(fec044c26b8c99235f88c8be0d9ac63b81a3a094) )
3666 	ROM_LOAD( "sd_m06.rom", 0x100000, 0x100000, CRC(e6e6dfa7) SHA1(913fa9a21cea175a1af87023144ebc98b3b0f33b) )
3667 	ROM_LOAD( "sd_m03.rom", 0x200000, 0x100000, CRC(1b9b2846) SHA1(d9c87e130bc3baa949d8a8738daad648fcf284df) )
3668 	ROM_LOAD( "sd_m05.rom", 0x300000, 0x100000, CRC(e02472c5) SHA1(35572610f6823ec980a928a75abd689197ebe207) )
3669 
3670 	ROM_REGION( 0x80000, REGION_SOUND1, 0 )
3671 	ROM_LOAD( "sd_m02.rom", 0x00000, 0x80000, CRC(e0de5c39) SHA1(75d0e193d882e67921c216c3293454e34304d25e) )
3672 
3673 	ROM_REGION( 0x80000, REGION_SOUND2, 0 )
3674 	ROM_LOAD( "sd_m01.rom", 0x00000, 0x80000, CRC(b41fff1a) SHA1(54920d13fa2b3000eedab9d0050a299ae743c663) )
3675 ROM_END
3676 
3677 ROM_START( selfeena )
3678 	ROM_REGION( 0x80000, REGION_CPU1, 0 )     /* 256k for 68000 code */
3679 	ROM_LOAD16_BYTE( "se-02.27", 0x00000, 0x20000, CRC(08f0c8e3) SHA1(2279ebfcd0cd05eec9c7a01ca7db82fcdc3b7ca7) )
3680 	ROM_LOAD16_BYTE( "se-01.26", 0x00001, 0x20000, CRC(a06ca64b) SHA1(6bfd3c5faf169678ba9bb1c483901b6c06605faf) )
3681 
3682 	ROM_REGION( 0x1c000, REGION_CPU2, 0 )     /* 64k for Z80 code */
3683 	ROM_LOAD( "se-03.39",0x00000, 0x4000, CRC(675998be) SHA1(16e59a9b7dc46aeee0022cb73cf6feced6796c35) )
3684 	ROM_CONTINUE(        0x10000, 0xc000 ) /* banked stuff */
3685 
3686 	ROM_REGION( 0x100000, REGION_GFX1, ROMREGION_DISPOSE )
3687 	ROM_LOAD( "se-04.2",  0x000000, 0x80000, CRC(920ad100) SHA1(69cd2af6218db90632f09a131d2956ab69034643) )
3688 	ROM_LOAD( "se-05.1",  0x080000, 0x80000, CRC(d297c995) SHA1(e5ad5a8ce222621c9156c2949916bee6b3099c4e) )
3689 
3690 	ROM_REGION( 0x80000, REGION_SOUND1, 0 )	/* adpcm samples */
3691 	ROM_LOAD( "se-06.11", 0x00000, 0x80000, CRC(80d5e772) SHA1(bee4982a3d65210ff86495e36a0b656934b00c7d) )
3692 ROM_END
3693 
3694 ROM_START( ryujin )
3695 	ROM_REGION( 0x80000, REGION_CPU1, 0 )     /* 256k for 68000 code */
3696 	ROM_LOAD16_BYTE( "ruj02.27", 0x00000, 0x20000, CRC(0d223aee) SHA1(33f5498a650b244c5a4a22415408a269da597abf) )
3697 	ROM_LOAD16_BYTE( "ruj01.26", 0x00001, 0x20000, CRC(c6bcdd1e) SHA1(d8620995ad1bc256eab4ed7e1c549e8b6ec5c3fb) )
3698 	ROM_LOAD16_BYTE( "ruj04.29", 0x40000, 0x20000, CRC(0c153cab) SHA1(16fac3863c1394c9f41173174a4aca20cded6278) )
3699 	ROM_LOAD16_BYTE( "ruj03.28", 0x40001, 0x20000, CRC(7695f89c) SHA1(755eb7ef40da190d55de80ee5e0e0a537c22e5f1) )
3700 
3701 	ROM_REGION( 0x1c000, REGION_CPU2, 0 )     /* 64k for Z80 code */
3702 	ROM_LOAD( "ruj05.39",0x00000, 0x4000, CRC(95270b16) SHA1(c1ad76268679cf198e9f1514360f280b73e49ab5) )
3703 	ROM_CONTINUE(        0x10000, 0xc000 ) /* banked stuff */
3704 
3705 	ROM_REGION( 0x200000, REGION_GFX1, ROMREGION_DISPOSE )
3706 	ROM_LOAD( "ryujin07.2", 0x000000, 0x100000, CRC(34f50980) SHA1(432384bd283389bca17611602eb310726c9d78a4) )
3707 	ROM_LOAD( "ryujin06.1", 0x100000, 0x100000, CRC(1b85ff34) SHA1(5ad259e6f7aa4a0c08975da73bf41400495f2e61) )
3708 
3709 	ROM_REGION( 0x80000, REGION_SOUND1, 0 )	/* adpcm samples */
3710 	ROM_LOAD( "ryujin08.11", 0x00000, 0x80000, CRC(480d040d) SHA1(50add2f304ef34f7f45f25a2a2cf0568d58259ad) )
3711 ROM_END
3712 
3713 ROM_START( sbm )
3714 	ROM_REGION( 0x80000, REGION_CPU1, 0 )     /* 256k for 68000 code */
3715 	ROM_LOAD16_BYTE( "c69-20-1.10", 0x00000, 0x20000, CRC(b40e4910) SHA1(1436990b8c3c1d0763283133b2ce9d47cd65f825) )
3716 	ROM_LOAD16_BYTE( "c69-22-1.12", 0x00001, 0x20000, CRC(ecbcf830) SHA1(49f04a198d327866b26b978a302ddc7aea5ac6de) )
3717 	ROM_LOAD16_BYTE( "c69-19-1.9" , 0x40000, 0x20000, CRC(5719c158) SHA1(e1cdf89695e1dba75f92e449d08fa6df57e9b388) )
3718 	ROM_LOAD16_BYTE( "c69-21-1.11", 0x40001, 0x20000, CRC(73562394) SHA1(ef9cf4718db05d9b99d6e2630e8f6ad248f30b9a) )
3719 
3720 	ROM_REGION( 0x1c000, REGION_CPU2, 0 )     /* 64k for Z80 code */
3721 	ROM_LOAD( "c69-23.28",0x00000, 0x4000, CRC(b2fce13e) SHA1(ecdb08482af80fd04cc8b67157e11ca61ce06437) )
3722 	ROM_CONTINUE(         0x10000, 0xc000 ) /* banked stuff */
3723 
3724 	ROM_REGION( 0x400000, REGION_GFX1, ROMREGION_DISPOSE )
3725 	ROM_LOAD       ( "c69-01.ic5", 0x000000, 0x100000, CRC(521fabe3) SHA1(f81303688ac014145a7e9325affc4a0f86755ba9) )
3726 	ROM_LOAD16_BYTE( "c69-13.ic2", 0x100000, 0x020000, CRC(d1550884) SHA1(f3a65827c45959fe5ac4bfc92831a8bed76bf287) )
3727 	ROM_LOAD16_BYTE( "c69-12.ic1", 0x100001, 0x020000, CRC(eb56582c) SHA1(41b77704aeaecf3eaa3f87e97c0b59fd00e5349e) )
3728 	/* 140000-1fffff empty */
3729 	ROM_LOAD       ( "c69-02.ic6", 0x200000, 0x100000, CRC(f0e20d35) SHA1(af67f39498f68523ece4cd91045456092038e0a4) )
3730 	ROM_LOAD16_BYTE( "c69-15.ic4", 0x300000, 0x020000, CRC(9761d316) SHA1(f03216bbade96948ff433a925e8bffb8760b4101) )
3731 	ROM_LOAD16_BYTE( "c69-14.ic3", 0x300001, 0x020000, CRC(0ed0272a) SHA1(03b15654213ff71ffc96d3a87657bdeb724e9269) )
3732 	/* 340000-3fffff empty */
3733 
3734 	ROM_REGION( 0x80000, REGION_SOUND1, 0 )	/* adpcm samples */
3735 	ROM_LOAD( "c69-03.36", 0x00000, 0x80000, CRC(63e6b6e7) SHA1(72574ca7505eee15fabc4996f253505d9dd65898) )
3736 ROM_END
3737 
3738 
3739 GAME( 1989, masterw,  0,       masterw,  masterw,  0, ROT270, "Taito Corporation Japan", "Master of Weapon (World)" )
3740 GAME( 1988, nastar,   0,       rastsag2, nastar,   0, ROT0,   "Taito Corporation Japan", "Nastar (World)" )
3741 GAME( 1988, nastarw,  nastar,  rastsag2, nastarw,  0, ROT0,   "Taito America Corporation", "Nastar Warrior (US)" )
3742 GAME( 1988, rastsag2, nastar,  rastsag2, rastsag2, 0, ROT0,   "Taito Corporation", "Rastan Saga 2 (Japan)" )
3743 GAME( 1989, rambo3,   0,       rambo3,   rambo3,   0, ROT0,   "Taito Europe Corporation", "Rambo III (Europe set 1)" )
3744 GAME( 1989, rambo3ae, rambo3,  rambo3a,  rambo3a,  0, ROT0,   "Taito Europe Corporation", "Rambo III (Europe set 2)" )
3745 GAME( 1989, rambo3a,  rambo3,  rambo3a,  rambo3a,  0, ROT0,   "Taito America Corporation", "Rambo III (US)" )
3746 GAME( 1989, crimec,   0,       crimec,   crimec,   0, ROT0,   "Taito Corporation Japan", "Crime City (World)" )
3747 GAME( 1989, crimecu,  crimec,  crimec,   crimecu,  0, ROT0,   "Taito America Corporation", "Crime City (US)" )
3748 GAME( 1989, crimecj,  crimec,  crimec,   crimecj,  0, ROT0,   "Taito Corporation", "Crime City (Japan)" )
3749 GAME( 1989, tetrist,  tetris,  tetrist,  tetrist,  0, ROT0,   "Sega", "Tetris (Japan, B-System)" )
3750 GAME( 1989, viofight, 0,       viofight, viofight, 0, ROT0,   "Taito Corporation Japan", "Violence Fight (World)" )
3751 GAME( 1990, ashura,   0,       ashura,   ashura,   0, ROT270, "Taito Corporation", "Ashura Blaster (Japan)" )
3752 GAME( 1990, ashurau,  ashura,  ashura,   ashurau,  0, ROT270, "Taito America Corporation", "Ashura Blaster (US)" )
3753 GAME( 1990, hitice,   0,       hitice,   hitice,   0, ROT0,   "Williams", "Hit the Ice (US)" )
3754 GAME( 1991, selfeena, 0,       selfeena, selfeena, 0, ROT0,   "East Technology", "Sel Feena" )
3755 GAME( 1992, silentd,  0,       silentd,  silentd,  0, ROT0,   "Taito Corporation Japan", "Silent Dragon (World)" )
3756 GAME( 1992, silentdj, silentd, silentd,  silentdj, 0, ROT0,   "Taito Corporation", "Silent Dragon (Japan)" )
3757 GAME( 1993, ryujin,   0,       ryujin,   ryujin,   0, ROT270, "Taito Corporation", "Ryu Jin (Japan)" )
3758 GAME( 1993, qzshowby, 0,       qzshowby, qzshowby, 0, ROT0,   "Taito Corporation", "Quiz Sekai wa SHOW by shobai (Japan)" )
3759 GAME( 1994, pbobble,  0,       pbobble,  pbobble,  0, ROT0,   "Taito Corporation", "Puzzle Bobble (Japan, B-System)" )
3760 GAME( 1994, spacedx,  0,       spacedx,  pbobble,  0, ROT0,   "Taito Corporation", "Space Invaders DX (US) v2.1" )
3761 GAME( 1994, spacedxj, spacedx, spacedx,  pbobble,  0, ROT0,   "Taito Corporation", "Space Invaders DX (Japan) v2.1" )
3762 GAME( 1994, spacedxo, spacedx, spacedxo, spacedxo, 0, ROT0,   "Taito Corporation", "Space Invaders DX (Japan) v2.0" )
3763 /*
3764 	Sonic Blast Man is a ticket dispensing game.
3765 	(Japanese version however does not dispense them, only US does - try the "sbm_patch" in the machine_driver).
3766 	It is a bit different from other games running on this system,
3767 	in that it has a punching pad that player needs to punch to hit
3768  	the enemy.
3769 */
3770 GAME(  1990, sbm,      0,       sbm,      sbm,      0, ROT0,   "Taito Corporation", "Sonic Blast Man (Japan)" )
3771