QuarterArcade Coin-Op Tech Net

Quick Nav: # A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Coin-Op : Arcade : Battle K-Road : VM Driver Source

Source Listing


     1: /***************************************************************************
     2: 
     3: 							-= Psikyo Games =-
     4: 
     5: 				driver by	Luca Elia (l.elia@tin.it)
     6: 
     7: 
     8: CPU:	68EC020 + PIC16C57 [Optional MCU]
     9: 
    10: Sound:	Z80A				+	YM2610
    11:    Or:	LZ8420M (Z80 core)	+	YMF286-K (YM2610 compatible)
    12: 
    13: Chips:	PS2001B
    14: 		PS3103
    15: 		PS3204
    16: 		PS3305
    17: 
    18: ---------------------------------------------------------------------------
    19: Name					Year	Board	       Notes
    20: ---------------------------------------------------------------------------
    21: Sengoku Ace 		(J)	1993	SH201B
    22: Gun Bird    		(J)	1994	KA302C
    23: Battle K-Road       (J) 1994	""
    24: Strikers 1945		(J)	1995	SH403/SH404    SH403 is similiar to KA302C
    25: Tengai      		(J)	1996	SH404          SH404 has MCU, ymf278-b for sound and gfx banking
    26: ---------------------------------------------------------------------------
    27: 
    28: To Do:
    29: 
    30: - Flip Screen support
    31: 
    32: ***************************************************************************/
    33: 
    34: /***** Gun Bird Japan Crash Notes
    35: 
    36: The Following Section of Code in Gunbird causes reads from the
    37: 0x080000 - 0x0fffff region
    38: 
    39: 002894: E2817000           asr.l   #1, D1
    40: 002896: 70001030           moveq   #$0, D0
    41: 002898: 10301804           move.b  ($4,A0,D1.l), D0   <-- *
    42: 00289C: 60183202           bra     28b6
    43: 00289E: 3202C2C7           move.w  D2, D1
    44: 0028A0: C2C77000           mulu.w  D7, D1
    45: 0028A2: 70003005           moveq   #$0, D0
    46: 0028A4: 3005D280           move.w  D5, D0
    47: 0028A6: D280E281           add.l   D0, D1
    48: 0028A8: E2812071           asr.l   #1, D1
    49: 0028AA: 20713515           movea.l ([A1],D3.w*4), A0
    50: 0028AE: 70001030           moveq   #$0, D0
    51: 0028B0: 10301804           move.b  ($4,A0,D1.l), D0   <-- *
    52: 0028B4: E880720F           asr.l   #4, D0
    53: 0028B6: 720FC041           moveq   #$f, D1
    54: 
    55: This causes Gunbird to crash if the ROM Region Size
    56: allocated during loading is smaller than the MRA32_ROM
    57: region as it trys to read beyond the allocated rom region
    58: 
    59: This was pointed out by Bart Puype
    60: 
    61: *****/
    62: 
    63: #include "driver.h" 
    64: #include "vidhrdw/generic.h" 
    65: 
    66: 
    67: /* Variables defined in vidhrdw */
    68: 
    69: extern data32_t *psikyo_vram_0, *psikyo_vram_1, *psikyo_vregs;
    70: extern int psikyo_ka302c_banking;
    71: 
    72: /* Functions defined in vidhrdw */
    73: 
    74: WRITE32_HANDLER( psikyo_vram_0_w );
    75: WRITE32_HANDLER( psikyo_vram_1_w );
    76: 
    77: VIDEO_START( psikyo );
    78: VIDEO_EOF( psikyo );
    79: VIDEO_UPDATE( psikyo );
    80: 
    81: extern void psikyo_switch_banks( int tilemap, int bank );
    82: 
    83: /* Variables only used here */
    84: 
    85: static int ack_latch;
    86: 
    87: 
    88: /***************************************************************************
    89: 
    90: 
    91: 								Main CPU
    92: 
    93: 
    94: ***************************************************************************/
    95: 
    96: READ32_HANDLER( sngkace_input_r )
    97: {
    98: 	switch(offset)
    99: 	{
   100: 		case 0x0:	return (readinputport(0) << 16) | 0xffff;
   101: 		case 0x1:	return (readinputport(2) << 16) | readinputport(4);
   102: 		case 0x2:
   103: 		{
   104: 					const int bit = 0x80;
   105: 					int ret = ack_latch ? bit : 0;
   106: 					if (Machine->sample_rate == 0)	ret = 0;
   107: 					return (((readinputport(1) & ~bit) | ret) << 16) | readinputport(3);
   108: 		}
   109: 		default:	logerror("PC %06X - Read input %02X !\n", activecpu_get_pc(), offset*2);
   110: 					return 0;
   111: 	}
   112: }
   113: 
   114: READ32_HANDLER( gunbird_input_r )
   115: {
   116: 	switch(offset)
   117: 	{
   118: 		case 0x0:
   119: 		{
   120: 					const int bit = 0x80;
   121: 					int ret = ack_latch ? bit : 0;
   122: 
   123: 					if (Machine->sample_rate == 0)	ret = 0;
   124: 					return (readinputport(0) << 16) | (readinputport(1) & ~bit) | ret;
   125: 		}
   126: 		case 0x1:	return (readinputport(2) << 16) | readinputport(3);
   127: 		default:	logerror("PC %06X - Read input %02X !\n", activecpu_get_pc(), offset*2);
   128: 					return 0;
   129: 	}
   130: }
   131: 
   132: 
   133: WRITE32_HANDLER( psikyo_soundlatch_w )
   134: {
   135: 	if (ACCESSING_LSB32)
   136: 	{
   137: 		if (Machine->sample_rate == 0)		return;
   138: 
   139: 		ack_latch = 1;
   140: 		soundlatch_w(0, data & 0xff);
   141: 		cpu_set_nmi_line(1,PULSE_LINE);
   142: 		cpu_spinuntil_time(TIME_IN_USEC(50));	// Allow the other cpu to reply
   143: 	}
   144: }
   145: 
   146: /***************************************************************************
   147: 						Strikers 1945 / Tengai
   148: ***************************************************************************/
   149: 
   150: WRITE32_HANDLER( s1945_soundlatch_w )
   151: {
   152: 	if (!(mem_mask & 0x00ff0000))
   153: 	{
   154: 		if (Machine->sample_rate == 0)		return;
   155: 
   156: 		ack_latch = 1;
   157: 		soundlatch_w(0, (data >> 16) & 0xff);
   158: 		cpu_set_nmi_line(1,PULSE_LINE);
   159: 		cpu_spinuntil_time(TIME_IN_USEC(50));	// Allow the other cpu to reply
   160: 	}
   161: }
   162: 
   163: static UINT8 s1945_table[256] = {
   164: 	0x00, 0x00, 0x64, 0xae, 0x00, 0x00, 0x26, 0x2c, 0x00, 0x00, 0x2c, 0xda, 0x00, 0x00, 0x2c, 0xbc,
   165: 	0x00, 0x00, 0x2c, 0x9e, 0x00, 0x00, 0x2f, 0x0e, 0x00, 0x00, 0x31, 0x10, 0x00, 0x00, 0xc5, 0x1e,
   166: 	0x00, 0x00, 0x32, 0x90, 0x00, 0x00, 0xac, 0x5c, 0x00, 0x00, 0x2b, 0xc0
   167: };
   168: 
   169: static UINT8 s1945j_table[256] = {
   170: 	0x00, 0x00, 0x64, 0xb6, 0x00, 0x00, 0x26, 0x2c, 0x00, 0x00, 0x2c, 0xda, 0x00, 0x00, 0x2c, 0xbc,
   171: 	0x00, 0x00, 0x2c, 0x9e, 0x00, 0x00, 0x2f, 0x0e, 0x00, 0x00, 0x31, 0x10, 0x00, 0x00, 0xc5, 0x92,
   172: 	0x00, 0x00, 0x32, 0x90, 0x00, 0x00, 0xac, 0x64, 0x00, 0x00, 0x2b, 0xc0
   173: };
   174: 
   175: static UINT8 s1945_mcu_direction, s1945_mcu_latch1, s1945_mcu_latch2, s1945_mcu_inlatch, s1945_mcu_index;
   176: static UINT8 s1945_mcu_latching, s1945_mcu_mode, s1945_mcu_direction, s1945_mcu_control, s1945_mcu_bctrl;
   177: static const UINT8 *s1945_mcu_table;
   178: 
   179: static void s1945_mcu_init(const UINT8 *mcu_table)
   180: {
   181: 	s1945_mcu_direction = 0x00;
   182: 	s1945_mcu_inlatch = 0xff;
   183: 	s1945_mcu_latch1 = 0xff;
   184: 	s1945_mcu_latch2 = 0xff;
   185: 	s1945_mcu_latching = 0x5;
   186: 	s1945_mcu_control = 0xff;
   187: 	s1945_mcu_index = 0;
   188: 	s1945_mcu_mode = 0;
   189: 	s1945_mcu_table = mcu_table;
   190: 	s1945_mcu_bctrl = 0x00;
   191: }
   192: 
   193: WRITE32_HANDLER( s1945_mcu_w )
   194: {
   195: 	// Accesses are always bytes, so resolve it
   196: 	int suboff;
   197: 	for(suboff=0; suboff < 3; suboff++)
   198: 		if(!((0xff << (8*suboff)) & mem_mask))
   199: 			break;
   200: 	data >>= 8*suboff;
   201: 	offset = offset*4+4+(3-suboff);
   202: 
   203: 	switch(offset) {
   204: 	case 0x06:
   205: 		s1945_mcu_inlatch = data;
   206: 		break;
   207: 	case 0x08:
   208: 		s1945_mcu_control = data;
   209: 		break;
   210: 	case 0x09:
   211: 		s1945_mcu_direction = data;
   212: 		break;
   213: 	case 0x07:
   214: 		psikyo_switch_banks(1, (data >> 6) & 3);
   215: 		psikyo_switch_banks(0, (data >> 4) & 3);
   216: 		s1945_mcu_bctrl = data;
   217: 		break;
   218: 	case 0x0b:
   219: 		switch(data | (s1945_mcu_direction ? 0x100 : 0)) {
   220: 		case 0x11c:
   221: 			s1945_mcu_latching = 5;
   222: 			s1945_mcu_index = s1945_mcu_inlatch;
   223: 			break;
   224: 		case 0x013:
   225: //			logerror("MCU: Table read index %02x\n", s1945_mcu_index);
   226: 			s1945_mcu_latching = 1;
   227: 			s1945_mcu_latch1 = s1945_mcu_table[s1945_mcu_index];
   228: 			break;
   229: 		case 0x113:
   230: 			s1945_mcu_mode = s1945_mcu_inlatch;
   231: 			if(s1945_mcu_mode == 1) {
   232: 				s1945_mcu_latching &= ~1;
   233: 				s1945_mcu_latch2 = 0x55;
   234: 			} else {
   235: 				// Go figure.
   236: 				s1945_mcu_latching &= ~1;
   237: 				s1945_mcu_latching |= 2;
   238: 			}
   239: 			s1945_mcu_latching &= ~4;
   240: 			s1945_mcu_latch1 = s1945_mcu_inlatch;
   241: 			break;
   242: 		case 0x010:
   243: 		case 0x110:
   244: 			s1945_mcu_latching |= 4;
   245: 			break;
   246: 		default:
   247: //			logerror("MCU: function %02x, direction %02x, latch1 %02x, latch2 %02x (%x)\n", data, s1945_mcu_direction, s1945_mcu_latch1, s1945_mcu_latch2, activecpu_get_pc());
   248: 			break;
   249: 		}
   250: 		break;
   251: 	default:
   252: //		logerror("MCU.w %x, %02x (%x)\n", offset, data, activecpu_get_pc());
   253: 		;
   254: 	}
   255: }
   256: 
   257: READ32_HANDLER( s1945_mcu_r )
   258: {
   259: 	switch(offset) {
   260: 	case 0: {
   261: 		UINT32 res;
   262: 		if(s1945_mcu_control & 16) {
   263: 			res = s1945_mcu_latching & 4 ? 0x0000ff00 : s1945_mcu_latch1 << 8;
   264: 			s1945_mcu_latching |= 4;
   265: 		} else {
   266: 			res = s1945_mcu_latching & 1 ? 0x0000ff00 : s1945_mcu_latch2 << 8;
   267: 			s1945_mcu_latching |= 1;
   268: 		}
   269: 		res |= s1945_mcu_bctrl & 0xf0;
   270: 		return res;
   271: 	}
   272: 	case 1:
   273: 		return (s1945_mcu_latching << 24) | 0x08000000;
   274: 	}
   275: 	return 0;
   276: }
   277: 
   278: READ32_HANDLER( s1945_input_r )
   279: {
   280: 	switch(offset)
   281: 	{
   282: 		case 0x0:
   283: 		{
   284: 					const int bit = 0x04;
   285: 					int ret = ack_latch ? bit : 0;
   286: 					if (Machine->sample_rate == 0)	ret = 0;
   287: 					return (readinputport(0) << 16) | (readinputport(1) & ~bit) | ret;
   288: 		}
   289: 		case 0x1:	return (((readinputport(2) << 16) | readinputport(3)) & 0xffff000f) | s1945_mcu_r(offset-1, mem_mask);
   290: 		case 0x2:	return s1945_mcu_r(offset-1, mem_mask);
   291: 		default:	logerror("PC %06X - Read input %02X !\n", activecpu_get_pc(), offset*2);
   292: 					return 0;
   293: 	}
   294: }
   295: 
   296: 
   297: /***************************************************************************
   298: 
   299: 
   300: 								Memory Map
   301: 
   302: 
   303: ***************************************************************************/
   304: 
   305: static WRITE32_HANDLER( paletteram32_xRRRRRGGGGGBBBBB_dword_w )
   306: {
   307: 	paletteram16 = (data16_t *)paletteram32;
   308: 	if (ACCESSING_MSW32)
   309: 		paletteram16_xRRRRRGGGGGBBBBB_word_w(offset*2, data >> 16, mem_mask >> 16);
   310: 	if (ACCESSING_LSW32)
   311: 		paletteram16_xRRRRRGGGGGBBBBB_word_w(offset*2+1, data, mem_mask);
   312: }
   313: 
   314: static MEMORY_READ32_START( psikyo_readmem )
   315: 	{ 0x000000, 0x0fffff, MRA32_ROM			},	// ROM (not all used)
   316: 	{ 0x400000, 0x401fff, MRA32_RAM			},	// Sprites Data
   317: 	{ 0x600000, 0x601fff, MRA32_RAM			},	// Palette
   318: 	{ 0x800000, 0x801fff, MRA32_RAM			},	// Layer 0
   319: 	{ 0x802000, 0x803fff, MRA32_RAM			},	// Layer 1
   320: 	{ 0x804000, 0x807fff, MRA32_RAM			},	// RAM + Vregs
   321: //	{ 0xc00000, 0xc0000b, psikyo_input_r	},	Depends on board, see DRIVER_INIT
   322: 	{ 0xfe0000, 0xffffff, MRA32_RAM			},	// RAM
   323: MEMORY_END
   324: 
   325: static MEMORY_WRITE32_START( psikyo_writemem )
   326: 	{ 0x000000, 0x0fffff, MWA32_ROM							},	// ROM (not all used)
   327: 	{ 0x400000, 0x401fff, MWA32_RAM, &spriteram32, &spriteram_size },	// Sprites, buffered by two frames (list buffered + fb buffered)
   328: 	{ 0x600000, 0x601fff, paletteram32_xRRRRRGGGGGBBBBB_dword_w, &paletteram32	},	// Palette
   329: 	{ 0x800000, 0x801fff, psikyo_vram_0_w, &psikyo_vram_0	},	// Layer 0
   330: 	{ 0x802000, 0x803fff, psikyo_vram_1_w, &psikyo_vram_1	},	// Layer 1
   331: 	{ 0x804000, 0x807fff, MWA32_RAM, &psikyo_vregs			},	// RAM + Vregs
   332: //	{ 0xc00004, 0xc0000b, s1945_mcu_w						},	MCU on sh404, see DRIVER_INIT
   333: //	{ 0xc00010, 0xc00013, psikyo_soundlatch_w				},	Depends on board, see DRIVER_INIT
   334: 	{ 0xfe0000, 0xffffff, MWA32_RAM							},	// RAM
   335: MEMORY_END
   336: 
   337: 
   338: 
   339: /***************************************************************************
   340: 
   341: 
   342: 								Sound CPU
   343: 
   344: 
   345: ***************************************************************************/
   346: 
   347: static void sound_irq( int irq )
   348: {
   349: 	cpu_set_irq_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE);
   350: }
   351: 
   352: WRITE_HANDLER( psikyo_ack_latch_w )
   353: {
   354: 	ack_latch = 0;
   355: }
   356: 
   357: /***************************************************************************
   358: 						Sengoku Ace / Samurai Aces
   359: ***************************************************************************/
   360: 
   361: WRITE_HANDLER( sngkace_sound_bankswitch_w )
   362: {
   363: 	unsigned char *RAM = memory_region(REGION_CPU2);
   364: 	int bank = data & 3;
   365: 	cpu_setbank(1, &RAM[bank * 0x8000 + 0x10000]);
   366: }
   367: 
   368: static MEMORY_READ_START( sngkace_sound_readmem )
   369: 	{ 0x0000, 0x77ff, MRA_ROM		},	// ROM
   370: 	{ 0x7800, 0x7fff, MRA_RAM		},	// RAM
   371: 	{ 0x8000, 0xffff, MRA_BANK1		},	// Banked ROM
   372: MEMORY_END
   373: 
   374: static MEMORY_WRITE_START( sngkace_sound_writemem )
   375: 	{ 0x0000, 0x77ff, MWA_ROM		},	// ROM
   376: 	{ 0x7800, 0x7fff, MWA_RAM		},	// RAM
   377: 	{ 0x8000, 0xffff, MWA_ROM		},	// Banked ROM
   378: MEMORY_END
   379: 
   380: 
   381: static PORT_READ_START( sngkace_sound_readport )
   382: 	{ 0x00, 0x00, YM2610_status_port_0_A_r		},
   383: 	{ 0x02, 0x02, YM2610_status_port_0_B_r		},
   384: 	{ 0x08, 0x08, soundlatch_r					},
   385: PORT_END
   386: 
   387: static PORT_WRITE_START( sngkace_sound_writeport )
   388: 	{ 0x00, 0x00, YM2610_control_port_0_A_w		},
   389: 	{ 0x01, 0x01, YM2610_data_port_0_A_w		},
   390: 	{ 0x02, 0x02, YM2610_control_port_0_B_w		},
   391: 	{ 0x03, 0x03, YM2610_data_port_0_B_w		},
   392: 	{ 0x04, 0x04, sngkace_sound_bankswitch_w	},
   393: 	{ 0x0c, 0x0c, psikyo_ack_latch_w			},
   394: PORT_END
   395: 
   396: 
   397: /***************************************************************************
   398: 								Gun Bird
   399: ***************************************************************************/
   400: 
   401: WRITE_HANDLER( gunbird_sound_bankswitch_w )
   402: {
   403: 	unsigned char *RAM = memory_region(REGION_CPU2);
   404: 	int bank = (data >> 4) & 3;
   405: 
   406: 	/* The banked rom is seen at 8200-ffff, so the last 0x200 bytes
   407: 	   of the rom not reachable. */
   408: 
   409: 	cpu_setbank(1, &RAM[bank * 0x8000 + 0x10000 + 0x200]);
   410: }
   411: 
   412: static MEMORY_READ_START( gunbird_sound_readmem )
   413: 	{ 0x0000, 0x7fff, MRA_ROM		},	// ROM
   414: 	{ 0x8000, 0x81ff, MRA_RAM		},	// RAM
   415: 	{ 0x8200, 0xffff, MRA_BANK1		},	// Banked ROM
   416: MEMORY_END
   417: 
   418: static MEMORY_WRITE_START( gunbird_sound_writemem )
   419: 	{ 0x0000, 0x7fff, MWA_ROM		},	// ROM
   420: 	{ 0x8000, 0x81ff, MWA_RAM		},	// RAM
   421: 	{ 0x8200, 0xffff, MWA_ROM		},	// Banked ROM
   422: MEMORY_END
   423: 
   424: 
   425: static PORT_READ_START( gunbird_sound_readport )
   426: 	{ 0x04, 0x04, YM2610_status_port_0_A_r		},
   427: 	{ 0x06, 0x06, YM2610_status_port_0_B_r		},
   428: 	{ 0x08, 0x08, soundlatch_r					},
   429: PORT_END
   430: 
   431: static PORT_WRITE_START( gunbird_sound_writeport )
   432: 	{ 0x00, 0x00, gunbird_sound_bankswitch_w	},
   433: 	{ 0x04, 0x04, YM2610_control_port_0_A_w		},
   434: 	{ 0x05, 0x05, YM2610_data_port_0_A_w		},
   435: 	{ 0x06, 0x06, YM2610_control_port_0_B_w		},
   436: 	{ 0x07, 0x07, YM2610_data_port_0_B_w		},
   437: 	{ 0x0c, 0x0c, psikyo_ack_latch_w			},
   438: PORT_END
   439: 
   440: 
   441: 
   442: /***************************************************************************
   443: 						Strikers 1945 / Tengai
   444: ***************************************************************************/
   445: 
   446: static PORT_READ_START( s1945_sound_readport )
   447: 	{ 0x08, 0x08, YMF278B_status_port_0_r		},
   448: 	{ 0x10, 0x10, soundlatch_r					},
   449: PORT_END
   450: 
   451: static PORT_WRITE_START( s1945_sound_writeport )
   452: 	{ 0x00, 0x00, gunbird_sound_bankswitch_w	},
   453: 	{ 0x02, 0x03, IOWP_NOP						},
   454: 	{ 0x08, 0x08, YMF278B_control_port_0_A_w	},
   455: 	{ 0x09, 0x09, YMF278B_data_port_0_A_w		},
   456: 	{ 0x0a, 0x0a, YMF278B_control_port_0_B_w	},
   457: 	{ 0x0b, 0x0b, YMF278B_data_port_0_B_w		},
   458: 	{ 0x0c, 0x0c, YMF278B_control_port_0_C_w	},
   459: 	{ 0x0d, 0x0d, YMF278B_data_port_0_C_w		},
   460: 	{ 0x18, 0x18, psikyo_ack_latch_w			},
   461: PORT_END
   462: 
   463: 
   464: /***************************************************************************
   465: 
   466: 
   467: 								Input Ports
   468: 
   469: 
   470: ***************************************************************************/
   471: 
   472: #define PSIKYO_PORT_PLAYER1 \ 
   473: 	PORT_BIT(  0x0100, IP_ACTIVE_LOW, IPT_START1                       ) \
   474: 	PORT_BIT(  0x0200, IP_ACTIVE_LOW, IPT_BUTTON3        | IPF_PLAYER1 ) \
   475: 	PORT_BIT(  0x0400, IP_ACTIVE_LOW, IPT_BUTTON2        | IPF_PLAYER1 ) \
   476: 	PORT_BIT(  0x0800, IP_ACTIVE_LOW, IPT_BUTTON1        | IPF_PLAYER1 ) \
   477: 	PORT_BIT(  0x1000, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_PLAYER1 ) \
   478: 	PORT_BIT(  0x2000, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_PLAYER1 ) \
   479: 	PORT_BIT(  0x4000, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_PLAYER1 ) \
   480: 	PORT_BIT(  0x8000, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_PLAYER1 )
   481: 
   482: #define PSIKYO_PORT_PLAYER2 \ 
   483: 	PORT_BIT(  0x0001, IP_ACTIVE_LOW, IPT_START2                       ) \
   484: 	PORT_BIT(  0x0002, IP_ACTIVE_LOW, IPT_BUTTON3        | IPF_PLAYER2 ) \
   485: 	PORT_BIT(  0x0004, IP_ACTIVE_LOW, IPT_BUTTON2        | IPF_PLAYER2 ) \
   486: 	PORT_BIT(  0x0008, IP_ACTIVE_LOW, IPT_BUTTON1        | IPF_PLAYER2 ) \
   487: 	PORT_BIT(  0x0010, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_PLAYER2 ) \
   488: 	PORT_BIT(  0x0020, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_PLAYER2 ) \
   489: 	PORT_BIT(  0x0040, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_PLAYER2 ) \
   490: 	PORT_BIT(  0x0080, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_PLAYER2 )
   491: 
   492: #define PSIKYO_PORT_COIN \ 
   493: 	PORT_BIT( 0x0001, IP_ACTIVE_LOW,  IPT_COIN1    ) \
   494: 	PORT_BIT( 0x0002, IP_ACTIVE_LOW,  IPT_COIN2    ) \
   495: 	PORT_BIT( 0x0004, IP_ACTIVE_LOW,  IPT_UNKNOWN  ) \
   496: 	PORT_BIT( 0x0008, IP_ACTIVE_LOW,  IPT_UNKNOWN  ) \
   497: 	PORT_BIT( 0x0010, IP_ACTIVE_LOW,  IPT_SERVICE1 ) \
   498: 	PORT_BITX(0x0020, IP_ACTIVE_LOW,  IPT_SERVICE, DEF_STR( Service_Mode ), KEYCODE_F2, IP_JOY_NONE ) \
   499: 	PORT_BIT( 0x0040, IP_ACTIVE_LOW,  IPT_TILT     ) \
   500: 	PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_SPECIAL  )	// From Sound CPU
   501: 
   502: 
   503: /***************************************************************************
   504: 						Samurai Aces / Sengoku Ace (Japan)
   505: ***************************************************************************/
   506: 
   507: INPUT_PORTS_START( samuraia )
   508: 
   509: 	PORT_START	// IN0 - c00000&1
   510: 	PSIKYO_PORT_PLAYER2
   511: 
   512: 	PSIKYO_PORT_PLAYER1
   513: 
   514: 	PORT_START	// IN1 - c00008&9
   515: 	PSIKYO_PORT_COIN
   516: 
   517: 	PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_UNKNOWN )	// unused?
   518: 	PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_UNKNOWN )
   519: 	PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN )
   520: 	PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN )
   521: 	PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN )
   522: 	PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN )
   523: 	PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN )
   524: 	PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN )
   525: 
   526: 	PORT_START	// IN2 - c00004&5
   527: 	PORT_DIPNAME( 0x0001, 0x0001, DEF_STR( Flip_Screen ) )
   528: 	PORT_DIPSETTING(      0x0001, DEF_STR( Off ) )
   529: 	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
   530: 	PORT_DIPNAME( 0x0002, 0x0000, DEF_STR( Demo_Sounds ) )
   531: 	PORT_DIPSETTING(      0x0002, DEF_STR( Off ) )
   532: 	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
   533: 	PORT_DIPNAME( 0x000c, 0x000c, DEF_STR( Difficulty ) )
   534: 	PORT_DIPSETTING(      0x0008, "Easy" )
   535: 	PORT_DIPSETTING(      0x000c, "Normal" )
   536: 	PORT_DIPSETTING(      0x0004, "Hard" )
   537: 	PORT_DIPSETTING(      0x0000, "Hardest" )
   538: 	PORT_DIPNAME( 0x0030, 0x0030, DEF_STR( Lives ) )
   539: 	PORT_DIPSETTING(      0x0020, "1" )
   540: 	PORT_DIPSETTING(      0x0010, "2" )
   541: 	PORT_DIPSETTING(      0x0030, "3" )
   542: 	PORT_DIPSETTING(      0x0000, "4" )
   543: 	PORT_DIPNAME( 0x0040, 0x0040, DEF_STR( Bonus_Life ) )
   544: 	PORT_DIPSETTING(      0x0040, "400K" )
   545: 	PORT_DIPSETTING(      0x0000, "600K" )
   546: 	PORT_SERVICE( 0x0080, IP_ACTIVE_LOW )
   547: 
   548: 	PORT_DIPNAME( 0x0100, 0x0100, "Credits/Coinage" )	// [Free Play] on all for free play
   549: 	PORT_DIPSETTING(      0x0100, "A+B/A&B" )
   550: 	PORT_DIPSETTING(      0x0000, "A&B/A [Free Play]" )
   551: 	PORT_DIPNAME( 0x0e00, 0x0e00, DEF_STR( Coin_A ) )
   552: 	PORT_DIPSETTING(      0x0a00, DEF_STR( 3C_1C ) )
   553: 	PORT_DIPSETTING(      0x0c00, DEF_STR( 2C_1C ) )
   554: 	PORT_DIPSETTING(      0x0e00, DEF_STR( 1C_1C ) )
   555: 	PORT_DIPSETTING(      0x0800, DEF_STR( 1C_2C ) )
   556: 	PORT_DIPSETTING(      0x0600, DEF_STR( 1C_3C ) )
   557: 	PORT_DIPSETTING(      0x0400, DEF_STR( 1C_4C ) )
   558: 	PORT_DIPSETTING(      0x0200, DEF_STR( 1C_5C ) )
   559: 	PORT_DIPSETTING(      0x0000, "1C 6C [Free Play]" )
   560: 	PORT_DIPNAME( 0x7000, 0x7000, DEF_STR( Coin_B ) )
   561: 	PORT_DIPSETTING(      0x5000, DEF_STR( 3C_1C ) )
   562: 	PORT_DIPSETTING(      0x6000, DEF_STR( 2C_1C ) )
   563: 	PORT_DIPSETTING(      0x7000, DEF_STR( 1C_1C ) )
   564: 	PORT_DIPSETTING(      0x4000, DEF_STR( 1C_2C ) )
   565: 	PORT_DIPSETTING(      0x3000, DEF_STR( 1C_3C ) )
   566: 	PORT_DIPSETTING(      0x2000, DEF_STR( 1C_4C ) )
   567: 	PORT_DIPSETTING(      0x1000, DEF_STR( 1C_5C ) )
   568: 	PORT_DIPSETTING(      0x0000, "1C 6C [Free Play]" )
   569: 	PORT_DIPNAME( 0x8000, 0x8000, "2C Start, 1C Continue" )
   570: 	PORT_DIPSETTING(      0x8000, DEF_STR( Off ) )
   571: 	PORT_DIPSETTING(      0x0000, "On [Free Play]" ) // Forces 1C_1C
   572: 
   573: 	PORT_START	// IN3 - c00002&3
   574: 	PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_VBLANK  )	// vblank
   575: 	PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_UNKNOWN )	// unused?
   576: 	PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN )
   577: 	PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN )
   578: 	PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN )
   579: 	PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN )
   580: 	PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN )
   581: 	PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN )
   582: 
   583: 	PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_UNKNOWN )	// unused?
   584: 	PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_UNKNOWN )
   585: 	PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN )
   586: 	PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN )
   587: 	PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN )
   588: 	PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN )
   589: 	PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN )
   590: 	PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN )
   591: 
   592: 	PORT_START	// IN4 - c00006&7
   593: 
   594: 	/***********************************************
   595: 
   596: 	This Dip port is bit based:
   597: 
   598: 	Bit 0 1 2 3
   599: 		1 1 1 1 World
   600: 
   601: 		0 1 1 1 USA With FBI logo
   602: 		1 0 1 1 Korea With FBI logo??
   603: 		1 1 0 1 Hong Kong With FBI logo??
   604: 		1 1 1 0 Taiwan With FBI logo??
   605: 
   606: 	************************************************/
   607: 
   608: 	PORT_DIPNAME( 0x00ff, 0x00ff, "Country" )
   609: 	PORT_DIPSETTING(      0x00ff, "World" )
   610: 	PORT_DIPSETTING(      0x00ef, "USA & Canada" )
   611: 	PORT_DIPSETTING(      0x00df, "Korea" )
   612: 	PORT_DIPSETTING(      0x00bf, "Hong Kong" )
   613: 	PORT_DIPSETTING(      0x007f, "Taiwan" )
   614: 
   615: 	PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_UNKNOWN )	// unused?
   616: 	PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_UNKNOWN )
   617: 	PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN )
   618: 	PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN )
   619: 	PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN )
   620: 	PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN )
   621: 	PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN )
   622: 	PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN )
   623: 
   624: INPUT_PORTS_END
   625: 
   626: INPUT_PORTS_START( sngkace )
   627: 
   628: 	PORT_START	// IN0 - c00000&1
   629: 	PSIKYO_PORT_PLAYER2
   630: 
   631: 	PSIKYO_PORT_PLAYER1
   632: 
   633: 	PORT_START	// IN1 - c00008&9
   634: 	PSIKYO_PORT_COIN
   635: 
   636: 	PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_UNKNOWN )	// unused?
   637: 	PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_UNKNOWN )
   638: 	PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN )
   639: 	PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN )
   640: 	PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN )
   641: 	PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN )
   642: 	PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN )
   643: 	PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN )
   644: 
   645: 	PORT_START	// IN2 - c00004&5
   646: 	PORT_DIPNAME( 0x0001, 0x0001, DEF_STR( Flip_Screen ) )
   647: 	PORT_DIPSETTING(      0x0001, DEF_STR( Off ) )
   648: 	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
   649: 	PORT_DIPNAME( 0x0002, 0x0000, DEF_STR( Demo_Sounds ) )
   650: 	PORT_DIPSETTING(      0x0002, DEF_STR( Off ) )
   651: 	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
   652: 	PORT_DIPNAME( 0x000c, 0x000c, DEF_STR( Difficulty ) )
   653: 	PORT_DIPSETTING(      0x0008, "Easy" )
   654: 	PORT_DIPSETTING(      0x000c, "Normal" )
   655: 	PORT_DIPSETTING(      0x0004, "Hard" )
   656: 	PORT_DIPSETTING(      0x0000, "Hardest" )
   657: 	PORT_DIPNAME( 0x0030, 0x0030, DEF_STR( Lives ) )
   658: 	PORT_DIPSETTING(      0x0020, "1" )
   659: 	PORT_DIPSETTING(      0x0010, "2" )
   660: 	PORT_DIPSETTING(      0x0030, "3" )
   661: 	PORT_DIPSETTING(      0x0000, "4" )
   662: 	PORT_DIPNAME( 0x0040, 0x0040, DEF_STR( Bonus_Life ) )
   663: 	PORT_DIPSETTING(      0x0040, "400K" )
   664: 	PORT_DIPSETTING(      0x0000, "600K" )
   665: 	PORT_SERVICE( 0x0080, IP_ACTIVE_LOW )
   666: 
   667: 	PORT_DIPNAME( 0x0100, 0x0100, "Credits/Coinage" )	// [Free Play] on all for free play
   668: 	PORT_DIPSETTING(      0x0100, "A+B/A&B" )
   669: 	PORT_DIPSETTING(      0x0000, "A&B/A [Free Play]" )
   670: 	PORT_DIPNAME( 0x0e00, 0x0e00, DEF_STR( Coin_A ) )
   671: 	PORT_DIPSETTING(      0x0a00, DEF_STR( 3C_1C ) )
   672: 	PORT_DIPSETTING(      0x0c00, DEF_STR( 2C_1C ) )
   673: 	PORT_DIPSETTING(      0x0e00, DEF_STR( 1C_1C ) )
   674: 	PORT_DIPSETTING(      0x0800, DEF_STR( 1C_2C ) )
   675: 	PORT_DIPSETTING(      0x0600, DEF_STR( 1C_3C ) )
   676: 	PORT_DIPSETTING(      0x0400, DEF_STR( 1C_4C ) )
   677: 	PORT_DIPSETTING(      0x0200, DEF_STR( 1C_5C ) )
   678: 	PORT_DIPSETTING(      0x0000, "1C 6C [Free Play]" )
   679: 	PORT_DIPNAME( 0x7000, 0x7000, DEF_STR( Coin_B ) )
   680: 	PORT_DIPSETTING(      0x5000, DEF_STR( 3C_1C ) )
   681: 	PORT_DIPSETTING(      0x6000, DEF_STR( 2C_1C ) )
   682: 	PORT_DIPSETTING(      0x7000, DEF_STR( 1C_1C ) )
   683: 	PORT_DIPSETTING(      0x4000, DEF_STR( 1C_2C ) )
   684: 	PORT_DIPSETTING(      0x3000, DEF_STR( 1C_3C ) )
   685: 	PORT_DIPSETTING(      0x2000, DEF_STR( 1C_4C ) )
   686: 	PORT_DIPSETTING(      0x1000, DEF_STR( 1C_5C ) )
   687: 	PORT_DIPSETTING(      0x0000, "1C 6C [Free Play]" )
   688: 	PORT_DIPNAME( 0x8000, 0x8000, "2C Start, 1C Continue" )
   689: 	PORT_DIPSETTING(      0x8000, DEF_STR( Off ) )
   690: 	PORT_DIPSETTING(      0x0000, "On [Free Play]" ) // Forces 1C_1C
   691: 
   692: 	PORT_START	// IN3 - c00002&3
   693: 	PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_VBLANK  )	// vblank
   694: 	PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_UNKNOWN )	// unused?
   695: 	PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN )
   696: 	PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN )
   697: 	PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN )
   698: 	PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN )
   699: 	PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN )
   700: 	PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN )
   701: 
   702: 	PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_UNKNOWN )	// unused?
   703: 	PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_UNKNOWN )
   704: 	PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN )
   705: 	PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN )
   706: 	PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN )
   707: 	PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN )
   708: 	PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN )
   709: 	PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN )
   710: 
   711: 	PORT_START	// IN4 - c00006&7
   712: 
   713: 	/***********************************************
   714: 
   715: 	This Dip port is bit based:
   716: 
   717: 	Bit 0 1 2 3
   718: 		1 1 1 1 Japan
   719: 
   720: 		0 1 1 1 USA With FBI logo
   721: 		1 0 1 1 Korea
   722: 		1 1 0 1 Hong Kong
   723: 		1 1 1 0 Taiwan
   724: 
   725: 	************************************************/
   726: 
   727: #if 0 // See Patch in MACHINE_INIT, only text not logo 
   728: 	PORT_DIPNAME( 0x00ff, 0x00ff, "Country" )
   729: 	PORT_DIPSETTING(      0x00ff, "Japan" )
   730: 	PORT_DIPSETTING(      0x00ef, "USA & Canada" )
   731: 	PORT_DIPSETTING(      0x00df, "Korea" )
   732: 	PORT_DIPSETTING(      0x00bf, "Hong Kong" )
   733: 	PORT_DIPSETTING(      0x007f, "Taiwan" )
   734: #endif 
   735: 	PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_UNKNOWN )	// unused?
   736: 	PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_UNKNOWN )
   737: 	PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN )
   738: 	PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN )
   739: 	PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN )
   740: 	PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN )
   741: 	PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN )
   742: 	PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN )
   743: 
   744: INPUT_PORTS_END
   745: 
   746: 
   747: /***************************************************************************
   748: 								Battle K-Road
   749: ***************************************************************************/
   750: 
   751: INPUT_PORTS_START( btlkroad )
   752: 
   753: 	PORT_START	// IN0 - c00000&1
   754: 	PSIKYO_PORT_PLAYER2
   755: 
   756: 	PSIKYO_PORT_PLAYER1
   757: 
   758: 	PORT_START	// IN1 - c00002&3
   759: 	PSIKYO_PORT_COIN
   760: 
   761: 	PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_UNKNOWN               )
   762: 	PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_BUTTON6 | IPF_PLAYER2 )
   763: 	PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_BUTTON5 | IPF_PLAYER2 )
   764: 	PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_BUTTON4 | IPF_PLAYER2 )
   765: 	PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN               )
   766: 	PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON6 | IPF_PLAYER1 )
   767: 	PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON5 | IPF_PLAYER1 )
   768: 	PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_BUTTON4 | IPF_PLAYER1 )
   769: 
   770: 	PORT_START	// IN2 - c00004&5
   771: 	PORT_DIPNAME( 0x0001, 0x0001, DEF_STR( Flip_Screen ) )
   772: 	PORT_DIPSETTING(      0x0001, DEF_STR( Off ) )
   773: 	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
   774: 	PORT_DIPNAME( 0x0002, 0x0000, DEF_STR( Demo_Sounds ) )
   775: 	PORT_DIPSETTING(      0x0002, DEF_STR( Off ) )
   776: 	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
   777: 	PORT_DIPNAME( 0x000c, 0x000c, DEF_STR( Difficulty ) )
   778: 	PORT_DIPSETTING(      0x0008, "Easy" )
   779: 	PORT_DIPSETTING(      0x000c, "Normal" )
   780: 	PORT_DIPSETTING(      0x0004, "Hard" )
   781: 	PORT_DIPSETTING(      0x0000, "Hardest" )
   782: 	PORT_DIPNAME( 0x0010, 0x0010, "Unknown 2-4" )	// used
   783: 	PORT_DIPSETTING(      0x0010, DEF_STR( Off ) )
   784: 	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
   785: 	PORT_DIPNAME( 0x0020, 0x0020, "Unknown 2-5" )	// used (energy lost?)
   786: 	PORT_DIPSETTING(      0x0020, DEF_STR( Off ) )
   787: 	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
   788: 	PORT_DIPNAME( 0x0040, 0x0040, "Use DSW 3 (Debug)" )
   789: 	PORT_DIPSETTING(      0x0040, DEF_STR( Off ) )
   790: 	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
   791: 	PORT_SERVICE( 0x0080, IP_ACTIVE_LOW )
   792: 
   793: 	PORT_DIPNAME( 0x0100, 0x0100, "Credits/Coinage" )	// [Free Play] on all for free play
   794: 	PORT_DIPSETTING(      0x0100, "A+B/A&B" )
   795: 	PORT_DIPSETTING(      0x0000, "A&B/A [Free Play]" )
   796: 	PORT_DIPNAME( 0x0e00, 0x0e00, DEF_STR( Coin_A ) )
   797: 	PORT_DIPSETTING(      0x0a00, DEF_STR( 3C_1C ) )
   798: 	PORT_DIPSETTING(      0x0c00, DEF_STR( 2C_1C ) )
   799: 	PORT_DIPSETTING(      0x0e00, DEF_STR( 1C_1C ) )
   800: 	PORT_DIPSETTING(      0x0800, DEF_STR( 1C_2C ) )
   801: 	PORT_DIPSETTING(      0x0600, DEF_STR( 1C_3C ) )
   802: 	PORT_DIPSETTING(      0x0400, DEF_STR( 1C_4C ) )
   803: 	PORT_DIPSETTING(      0x0200, DEF_STR( 1C_5C ) )
   804: 	PORT_DIPSETTING(      0x0000, "1C 6C [Free Play]" )
   805: 	PORT_DIPNAME( 0x7000, 0x7000, DEF_STR( Coin_B ) )
   806: 	PORT_DIPSETTING(      0x5000, DEF_STR( 3C_1C ) )
   807: 	PORT_DIPSETTING(      0x6000, DEF_STR( 2C_1C ) )
   808: 	PORT_DIPSETTING(      0x7000, DEF_STR( 1C_1C ) )
   809: 	PORT_DIPSETTING(      0x4000, DEF_STR( 1C_2C ) )
   810: 	PORT_DIPSETTING(      0x3000, DEF_STR( 1C_3C ) )
   811: 	PORT_DIPSETTING(      0x2000, DEF_STR( 1C_4C ) )
   812: 	PORT_DIPSETTING(      0x1000, DEF_STR( 1C_5C ) )
   813: 	PORT_DIPSETTING(      0x0000, "1C 6C [Free Play]" )
   814: 	PORT_DIPNAME( 0x8000, 0x8000, "2C Start, 1C Continue" )
   815: 	PORT_DIPSETTING(      0x8000, DEF_STR( Off ) )
   816: 	PORT_DIPSETTING(      0x0000, "On [Free Play]" ) // Forces 1C_1C
   817: 
   818: 	/***********************************************
   819: 
   820: 	Bit 0 1 2 3
   821: 		1 1 1 1 Japan
   822: 
   823: 		0 1 1 1 USA & Canada
   824: 		0 0 1 1 Korea
   825: 		0 1 0 1 Hong Kong
   826: 		0 1 1 0 Taiwan
   827: 		Other   World
   828: 
   829: 	************************************************/
   830: 
   831: 	PORT_START	// IN3 - c00006&7
   832: 	PORT_DIPNAME( 0x000f, 0x0000, "Copyright (Country)" )
   833: 	PORT_DIPSETTING(      0x000f, "Psikyo (Japan)" )
   834: 	PORT_DIPSETTING(      0x000e, "Jaleco+Psikyo (USA & Canada)" )
   835: 	PORT_DIPSETTING(      0x000c, "Psikyo (Korea)" )
   836: 	PORT_DIPSETTING(      0x000a, "Psikyo (Hong Kong)" )
   837: 	PORT_DIPSETTING(      0x0006, "Psikyo (Taiwan)" )
   838: 	PORT_DIPSETTING(      0x0000, "Psikyo (World)" )
   839: 
   840: 	PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN )
   841: 	PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN )
   842: 	PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN )
   843: 	PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_VBLANK  )	// vblank
   844: 
   845: 	// This DSW is used for debugging the game
   846: 	PORT_DIPNAME( 0x0100, 0x0100, "Unknown 3-0" )	// tested!
   847: 	PORT_DIPSETTING(      0x0100, DEF_STR( Off ) )
   848: 	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
   849: 	PORT_DIPNAME( 0x0200, 0x0200, "Unknown 3-1" )	// tested!
   850: 	PORT_DIPSETTING(      0x0200, DEF_STR( Off ) )
   851: 	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
   852: 	PORT_DIPNAME( 0x0400, 0x0400, "Unknown 3-2" )
   853: 	PORT_DIPSETTING(      0x0400, DEF_STR( Off ) )
   854: 	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
   855: 	PORT_DIPNAME( 0x0800, 0x0800, "Unknown 3-3" )
   856: 	PORT_DIPSETTING(      0x0800, DEF_STR( Off ) )
   857: 	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
   858: 	PORT_DIPNAME( 0x1000, 0x1000, "Unknown 3-4" )	// tested!
   859: 	PORT_DIPSETTING(      0x1000, DEF_STR( Off ) )
   860: 	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
   861: 	PORT_DIPNAME( 0x2000, 0x2000, "Unknown 3-5" )
   862: 	PORT_DIPSETTING(      0x2000, DEF_STR( Off ) )
   863: 	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
   864: 	PORT_DIPNAME( 0x4000, 0x4000, "Unknown 3-6" )
   865: 	PORT_DIPSETTING(      0x4000, DEF_STR( Off ) )
   866: 	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
   867: 	PORT_DIPNAME( 0x8000, 0x8000, "Unknown 3-7" )	// tested!
   868: 	PORT_DIPSETTING(      0x8000, DEF_STR( Off ) )
   869: 	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
   870: 
   871: INPUT_PORTS_END
   872: 
   873: 
   874: /***************************************************************************
   875: 								Gun Bird
   876: ***************************************************************************/
   877: 
   878: INPUT_PORTS_START( gunbird )
   879: 
   880: 	PORT_START	// IN0 - c00000&1
   881: 	PSIKYO_PORT_PLAYER2
   882: 
   883: 	PSIKYO_PORT_PLAYER1
   884: 
   885: 	PORT_START	// IN1 - c00002&3
   886: 	PSIKYO_PORT_COIN
   887: 
   888: 	PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_UNKNOWN )
   889: 	PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_UNKNOWN )
   890: 	PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN )
   891: 	PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN )
   892: 	PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN )
   893: 	PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN )
   894: 	PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN )
   895: 	PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN )
   896: 
   897: 	PORT_START	// IN2 - c00004&5
   898: 	PORT_DIPNAME( 0x0001, 0x0001, DEF_STR( Flip_Screen ) )
   899: 	PORT_DIPSETTING(      0x0001, DEF_STR( Off ) )
   900: 	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
   901: 	PORT_DIPNAME( 0x0002, 0x0000, DEF_STR( Demo_Sounds ) )
   902: 	PORT_DIPSETTING(      0x0002, DEF_STR( Off ) )
   903: 	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
   904: 	PORT_DIPNAME( 0x000c, 0x000c, DEF_STR( Difficulty ) )
   905: 	PORT_DIPSETTING(      0x0008, "Easy" )
   906: 	PORT_DIPSETTING(      0x000c, "Normal" )
   907: 	PORT_DIPSETTING(      0x0004, "Hard" )
   908: 	PORT_DIPSETTING(      0x0000, "Hardest" )
   909: 	PORT_DIPNAME( 0x0030, 0x0030, DEF_STR( Lives ) )
   910: 	PORT_DIPSETTING(      0x0020, "1" )
   911: 	PORT_DIPSETTING(      0x0010, "2" )
   912: 	PORT_DIPSETTING(      0x0030, "3" )
   913: 	PORT_DIPSETTING(      0x0000, "4" )
   914: 	PORT_DIPNAME( 0x0040, 0x0040, DEF_STR( Bonus_Life ) )
   915: 	PORT_DIPSETTING(      0x0040, "400K" )
   916: 	PORT_DIPSETTING(      0x0000, "600K" )
   917: 	PORT_SERVICE( 0x0080, IP_ACTIVE_LOW )
   918: 
   919: 	PORT_DIPNAME( 0x0100, 0x0100, "Credits/Coinage" )	// [Free Play] on all for free play
   920: 	PORT_DIPSETTING(      0x0100, "A+B/A&B" )
   921: 	PORT_DIPSETTING(      0x0000, "A&B/A [Free Play]" )
   922: 	PORT_DIPNAME( 0x0e00, 0x0e00, DEF_STR( Coin_A ) )
   923: 	PORT_DIPSETTING(      0x0a00, DEF_STR( 3C_1C ) )
   924: 	PORT_DIPSETTING(      0x0c00, DEF_STR( 2C_1C ) )
   925: 	PORT_DIPSETTING(      0x0e00, DEF_STR( 1C_1C ) )
   926: 	PORT_DIPSETTING(      0x0800, DEF_STR( 1C_2C ) )
   927: 	PORT_DIPSETTING(      0x0600, DEF_STR( 1C_3C ) )
   928: 	PORT_DIPSETTING(      0x0400, DEF_STR( 1C_4C ) )
   929: 	PORT_DIPSETTING(      0x0200, DEF_STR( 1C_5C ) )
   930: 	PORT_DIPSETTING(      0x0000, "1C 6C [Free Play]" )
   931: 	PORT_DIPNAME( 0x7000, 0x7000, DEF_STR( Coin_B ) )
   932: 	PORT_DIPSETTING(      0x5000, DEF_STR( 3C_1C ) )
   933: 	PORT_DIPSETTING(      0x6000, DEF_STR( 2C_1C ) )
   934: 	PORT_DIPSETTING(      0x7000, DEF_STR( 1C_1C ) )
   935: 	PORT_DIPSETTING(      0x4000, DEF_STR( 1C_2C ) )
   936: 	PORT_DIPSETTING(      0x3000, DEF_STR( 1C_3C ) )
   937: 	PORT_DIPSETTING(      0x2000, DEF_STR( 1C_4C ) )
   938: 	PORT_DIPSETTING(      0x1000, DEF_STR( 1C_5C ) )
   939: 	PORT_DIPSETTING(      0x0000, "1C 6C [Free Play]" )
   940: 	PORT_DIPNAME( 0x8000, 0x8000, "2C Start, 1C Continue" )
   941: 	PORT_DIPSETTING(      0x8000, DEF_STR( Off ) )
   942: 	PORT_DIPSETTING(      0x0000, "On [Free Play]" ) // Forces 1C_1C
   943: 
   944: 	PORT_START	// IN3 - c00006&7
   945: 
   946: 	/***********************************************
   947: 
   948: 	This Dip port is bit based:
   949: 
   950: 	Bit 0 1 2 3
   951: 		1 1 1 1 World (No "For use in ...." screen)
   952: 
   953: 		0 x x x USA With FBI logo
   954: 		1 0 x x Korea
   955: 		1 1 0 x Hong Kong
   956: 		1 1 1 0 Taiwan
   957: 
   958: 		x = Doesn't Matter, see routine starting at 0108A4:
   959: 
   960: 	Japan is listed in the code but how do you activate it?
   961: 
   962: 	Has no effects on Japan or Korea versions.
   963: 
   964: 	************************************************/
   965: 
   966: 	PORT_DIPNAME( 0x000f, 0x000f, "Country" )
   967: 	PORT_DIPSETTING(      0x000f, "World" )
   968: 	PORT_DIPSETTING(      0x000e, "USA" )
   969: 	PORT_DIPSETTING(      0x000d, "Korea" )
   970: 	PORT_DIPSETTING(      0x000b, "Hong Kong" )
   971: 	PORT_DIPSETTING(      0x0007, "Taiwan" )
   972: 	PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN )
   973: 	PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN )
   974: 	PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN )
   975: 	PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_VBLANK  )	// vblank
   976: 
   977: 	PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_UNKNOWN )
   978: 	PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_UNKNOWN )
   979: 	PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN )	// tested!
   980: 	PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN )
   981: 	PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN )
   982: 	PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN )
   983: 	PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN )
   984: 	PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN )	// tested!
   985: 
   986: INPUT_PORTS_END
   987: 
   988: INPUT_PORTS_START( gunbirdj )
   989: 
   990: 	PORT_START	// IN0 - c00000&1
   991: 	PSIKYO_PORT_PLAYER2
   992: 
   993: 	PSIKYO_PORT_PLAYER1
   994: 
   995: 	PORT_START	// IN1 - c00002&3
   996: 	PSIKYO_PORT_COIN
   997: 
   998: 	PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_UNKNOWN )
   999: 	PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1000: 	PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1001: 	PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1002: 	PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1003: 	PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1004: 	PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1005: 	PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1006: 
  1007: 	PORT_START	// IN2 - c00004&5
  1008: 	PORT_DIPNAME( 0x0001, 0x0001, DEF_STR( Flip_Screen ) )
  1009: 	PORT_DIPSETTING(      0x0001, DEF_STR( Off ) )
  1010: 	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
  1011: 	PORT_DIPNAME( 0x0002, 0x0000, DEF_STR( Demo_Sounds ) )
  1012: 	PORT_DIPSETTING(      0x0002, DEF_STR( Off ) )
  1013: 	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
  1014: 	PORT_DIPNAME( 0x000c, 0x000c, DEF_STR( Difficulty ) )
  1015: 	PORT_DIPSETTING(      0x0008, "Easy" )
  1016: 	PORT_DIPSETTING(      0x000c, "Normal" )
  1017: 	PORT_DIPSETTING(      0x0004, "Hard" )
  1018: 	PORT_DIPSETTING(      0x0000, "Hardest" )
  1019: 	PORT_DIPNAME( 0x0030, 0x0030, DEF_STR( Lives ) )
  1020: 	PORT_DIPSETTING(      0x0020, "1" )
  1021: 	PORT_DIPSETTING(      0x0010, "2" )
  1022: 	PORT_DIPSETTING(      0x0030, "3" )
  1023: 	PORT_DIPSETTING(      0x0000, "4" )
  1024: 	PORT_DIPNAME( 0x0040, 0x0040, DEF_STR( Bonus_Life ) )
  1025: 	PORT_DIPSETTING(      0x0040, "400K" )
  1026: 	PORT_DIPSETTING(      0x0000, "600K" )
  1027: 	PORT_SERVICE( 0x0080, IP_ACTIVE_LOW )
  1028: 
  1029: 	PORT_DIPNAME( 0x0100, 0x0100, "Credits/Coinage" )	// [Free Play] on all for free play
  1030: 	PORT_DIPSETTING(      0x0100, "A+B/A&B" )
  1031: 	PORT_DIPSETTING(      0x0000, "A&B/A [Free Play]" )
  1032: 	PORT_DIPNAME( 0x0e00, 0x0e00, DEF_STR( Coin_A ) )
  1033: 	PORT_DIPSETTING(      0x0a00, DEF_STR( 3C_1C ) )
  1034: 	PORT_DIPSETTING(      0x0c00, DEF_STR( 2C_1C ) )
  1035: 	PORT_DIPSETTING(      0x0e00, DEF_STR( 1C_1C ) )
  1036: 	PORT_DIPSETTING(      0x0800, DEF_STR( 1C_2C ) )
  1037: 	PORT_DIPSETTING(      0x0600, DEF_STR( 1C_3C ) )
  1038: 	PORT_DIPSETTING(      0x0400, DEF_STR( 1C_4C ) )
  1039: 	PORT_DIPSETTING(      0x0200, DEF_STR( 1C_5C ) )
  1040: 	PORT_DIPSETTING(      0x0000, "1C 6C [Free Play]" )
  1041: 	PORT_DIPNAME( 0x7000, 0x7000, DEF_STR( Coin_B ) )
  1042: 	PORT_DIPSETTING(      0x5000, DEF_STR( 3C_1C ) )
  1043: 	PORT_DIPSETTING(      0x6000, DEF_STR( 2C_1C ) )
  1044: 	PORT_DIPSETTING(      0x7000, DEF_STR( 1C_1C ) )
  1045: 	PORT_DIPSETTING(      0x4000, DEF_STR( 1C_2C ) )
  1046: 	PORT_DIPSETTING(      0x3000, DEF_STR( 1C_3C ) )
  1047: 	PORT_DIPSETTING(      0x2000, DEF_STR( 1C_4C ) )
  1048: 	PORT_DIPSETTING(      0x1000, DEF_STR( 1C_5C ) )
  1049: 	PORT_DIPSETTING(      0x0000, "1C 6C [Free Play]" )
  1050: 	PORT_DIPNAME( 0x8000, 0x8000, "2C Start, 1C Continue" )
  1051: 	PORT_DIPSETTING(      0x8000, DEF_STR( Off ) )
  1052: 	PORT_DIPSETTING(      0x0000, "On [Free Play]" ) // Forces 1C_1C
  1053: 
  1054: 	PORT_START	// IN3 - c00006&7
  1055: 
  1056: 	PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1057: 	PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1058: 	PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1059: 	PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1060: 	PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1061: 	PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1062: 	PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1063: 	PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_VBLANK  )	// vblank
  1064: 
  1065: 	PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1066: 	PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1067: 	PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN )	// tested!
  1068: 	PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1069: 	PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1070: 	PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1071: 	PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1072: 	PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN )	// tested!
  1073: 
  1074: INPUT_PORTS_END
  1075: 
  1076: 
  1077: /***************************************************************************
  1078: 								Strikers 1945
  1079: ***************************************************************************/
  1080: 
  1081: INPUT_PORTS_START( s1945 )
  1082: 
  1083: 	PORT_START	// IN0 - c00000&1
  1084: 	PSIKYO_PORT_PLAYER2
  1085: 
  1086: 	PSIKYO_PORT_PLAYER1
  1087: 
  1088: 	PORT_START	// IN1 - c00002&3
  1089: 	PSIKYO_PORT_COIN
  1090: 
  1091: 	PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1092: 	PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1093: 	PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1094: 	PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1095: 	PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1096: 	PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1097: 	PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1098: 	PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1099: 
  1100: 	PORT_START	// IN2 - c00004&5
  1101: 	PORT_DIPNAME( 0x0001, 0x0001, DEF_STR( Flip_Screen ) )
  1102: 	PORT_DIPSETTING(      0x0001, DEF_STR( Off ) )
  1103: 	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
  1104: 	PORT_DIPNAME( 0x0002, 0x0000, DEF_STR( Demo_Sounds ) )
  1105: 	PORT_DIPSETTING(      0x0002, DEF_STR( Off ) )
  1106: 	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
  1107: 	PORT_DIPNAME( 0x000c, 0x000c, DEF_STR( Difficulty ) )
  1108: 	PORT_DIPSETTING(      0x0008, "Easy" )
  1109: 	PORT_DIPSETTING(      0x000c, "Normal" )
  1110: 	PORT_DIPSETTING(      0x0004, "Hard" )
  1111: 	PORT_DIPSETTING(      0x0000, "Hardest" )
  1112: 	PORT_DIPNAME( 0x0030, 0x0030, DEF_STR( Lives ) )
  1113: 	PORT_DIPSETTING(      0x0020, "1" )
  1114: 	PORT_DIPSETTING(      0x0010, "2" )
  1115: 	PORT_DIPSETTING(      0x0030, "3" )
  1116: 	PORT_DIPSETTING(      0x0000, "4" )
  1117: 	PORT_DIPNAME( 0x0040, 0x0040, DEF_STR( Bonus_Life ) )
  1118: 	PORT_DIPSETTING(      0x0040, "600K" )
  1119: 	PORT_DIPSETTING(      0x0000, "800K" )
  1120: 	PORT_SERVICE( 0x0080, IP_ACTIVE_LOW )
  1121: 
  1122: 	PORT_DIPNAME( 0x0100, 0x0100, "Credits/Coinage" )	// No freeplay for s1945
  1123: 	PORT_DIPSETTING(      0x0100, "A+B/A&B" )
  1124: 	PORT_DIPSETTING(      0x0000, "A&B/A" )
  1125: 	PORT_DIPNAME( 0x0e00, 0x0e00, DEF_STR( Coin_A ) )
  1126: 	PORT_DIPSETTING(      0x0a00, DEF_STR( 3C_1C ) )
  1127: 	PORT_DIPSETTING(      0x0c00, DEF_STR( 2C_1C ) )
  1128: 	PORT_DIPSETTING(      0x0e00, DEF_STR( 1C_1C ) )
  1129: 	PORT_DIPSETTING(      0x0800, DEF_STR( 1C_2C ) )
  1130: 	PORT_DIPSETTING(      0x0600, DEF_STR( 1C_3C ) )
  1131: 	PORT_DIPSETTING(      0x0400, DEF_STR( 1C_4C ) )
  1132: 	PORT_DIPSETTING(      0x0200, DEF_STR( 1C_5C ) )
  1133: 	PORT_DIPSETTING(      0x0000, DEF_STR( 1C_6C ) )
  1134: 	PORT_DIPNAME( 0x7000, 0x7000, DEF_STR( Coin_B ) )
  1135: 	PORT_DIPSETTING(      0x5000, DEF_STR( 3C_1C ) )
  1136: 	PORT_DIPSETTING(      0x6000, DEF_STR( 2C_1C ) )
  1137: 	PORT_DIPSETTING(      0x7000, DEF_STR( 1C_1C ) )
  1138: 	PORT_DIPSETTING(      0x4000, DEF_STR( 1C_2C ) )
  1139: 	PORT_DIPSETTING(      0x3000, DEF_STR( 1C_3C ) )
  1140: 	PORT_DIPSETTING(      0x2000, DEF_STR( 1C_4C ) )
  1141: 	PORT_DIPSETTING(      0x1000, DEF_STR( 1C_5C ) )
  1142: 	PORT_DIPSETTING(      0x0000, DEF_STR( 1C_6C ) )
  1143: 	PORT_DIPNAME( 0x8000, 0x8000, "2C Start, 1C Continue" )
  1144: 	PORT_DIPSETTING(      0x8000, DEF_STR( Off ) )
  1145: 	PORT_DIPSETTING(      0x0000, DEF_STR( On ) ) // Forces 1C_1C
  1146: 
  1147: 	PORT_START	// IN3 - c00006&7
  1148: 
  1149: 	/***********************************************
  1150: 
  1151: 	This Dip port is bit based:
  1152: 
  1153: 	Bit 0 1 2 3
  1154: 		1 1 1 1 World (No "For use in ...." screen), see:
  1155: 						0149B8: tst.w   $fffe58a0.l
  1156: 
  1157: 		0 1 1 1 USA & Canada
  1158: 		1 0 1 1 Korea
  1159: 		1 1 0 1 Hong Kong
  1160: 		1 1 1 0 Taiwan
  1161: 					Other regions check see:
  1162: 						005594: move.w  $fffe58a0.l, D0
  1163: 
  1164: 	Came from a Japan board apparently!!!
  1165: 	Japan is listed in the code but how do you activate it?
  1166: 	No effect on set s1945
  1167: 
  1168: 	************************************************/
  1169: 
  1170: 	PORT_DIPNAME( 0x000f, 0x000f, "Country" )
  1171: 	PORT_DIPSETTING(      0x000f, "World" )
  1172: 	PORT_DIPSETTING(      0x000e, "U.S.A & Canada" )
  1173: 	PORT_DIPSETTING(      0x000d, "Korea" )
  1174: 	PORT_DIPSETTING(      0x000b, "Hong Kong" )
  1175: 	PORT_DIPSETTING(      0x0007, "Taiwan" )
  1176: 	PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1177: 	PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1178: 	PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1179: 	PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_VBLANK  )	// vblank
  1180: 
  1181: 	PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1182: 	PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1183: 	PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN )	// tested!
  1184: 	PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1185: 	PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1186: 	PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1187: 	PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1188: 	PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN )	// tested!
  1189: 
  1190: INPUT_PORTS_END
  1191: 
  1192: INPUT_PORTS_START( s1945j )
  1193: 
  1194: 	PORT_START	// IN0 - c00000&1
  1195: 	PSIKYO_PORT_PLAYER2
  1196: 
  1197: 	PSIKYO_PORT_PLAYER1
  1198: 
  1199: 	PORT_START	// IN1 - c00002&3
  1200: 	PSIKYO_PORT_COIN
  1201: 
  1202: 	PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1203: 	PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1204: 	PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1205: 	PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1206: 	PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1207: 	PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1208: 	PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1209: 	PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1210: 
  1211: 	PORT_START	// IN2 - c00004&5
  1212: 	PORT_DIPNAME( 0x0001, 0x0001, DEF_STR( Flip_Screen ) )
  1213: 	PORT_DIPSETTING(      0x0001, DEF_STR( Off ) )
  1214: 	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
  1215: 	PORT_DIPNAME( 0x0002, 0x0000, DEF_STR( Demo_Sounds ) )
  1216: 	PORT_DIPSETTING(      0x0002, DEF_STR( Off ) )
  1217: 	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
  1218: 	PORT_DIPNAME( 0x000c, 0x000c, DEF_STR( Difficulty ) )
  1219: 	PORT_DIPSETTING(      0x0008, "Easy" )
  1220: 	PORT_DIPSETTING(      0x000c, "Normal" )
  1221: 	PORT_DIPSETTING(      0x0004, "Hard" )
  1222: 	PORT_DIPSETTING(      0x0000, "Hardest" )
  1223: 	PORT_DIPNAME( 0x0030, 0x0030, DEF_STR( Lives ) )
  1224: 	PORT_DIPSETTING(      0x0020, "1" )
  1225: 	PORT_DIPSETTING(      0x0010, "2" )
  1226: 	PORT_DIPSETTING(      0x0030, "3" )
  1227: 	PORT_DIPSETTING(      0x0000, "4" )
  1228: 	PORT_DIPNAME( 0x0040, 0x0040, DEF_STR( Bonus_Life ) )
  1229: 	PORT_DIPSETTING(      0x0040, "600K" )
  1230: 	PORT_DIPSETTING(      0x0000, "800K" )
  1231: 	PORT_SERVICE( 0x0080, IP_ACTIVE_LOW )
  1232: 
  1233: 	PORT_DIPNAME( 0x0100, 0x0100, "Credits/Coinage" )	// No freeplay for s1945?
  1234: 	PORT_DIPSETTING(      0x0100, "A+B/A&B" )
  1235: 	PORT_DIPSETTING(      0x0000, "A&B/A" )
  1236: 	PORT_DIPNAME( 0x0e00, 0x0e00, DEF_STR( Coin_A ) )
  1237: 	PORT_DIPSETTING(      0x0a00, DEF_STR( 3C_1C ) )
  1238: 	PORT_DIPSETTING(      0x0c00, DEF_STR( 2C_1C ) )
  1239: 	PORT_DIPSETTING(      0x0e00, DEF_STR( 1C_1C ) )
  1240: 	PORT_DIPSETTING(      0x0800, DEF_STR( 1C_2C ) )
  1241: 	PORT_DIPSETTING(      0x0600, DEF_STR( 1C_3C ) )
  1242: 	PORT_DIPSETTING(      0x0400, DEF_STR( 1C_4C ) )
  1243: 	PORT_DIPSETTING(      0x0200, DEF_STR( 1C_5C ) )
  1244: 	PORT_DIPSETTING(      0x0000, DEF_STR( 1C_6C ) )
  1245: 	PORT_DIPNAME( 0x7000, 0x7000, DEF_STR( Coin_B ) )
  1246: 	PORT_DIPSETTING(      0x5000, DEF_STR( 3C_1C ) )
  1247: 	PORT_DIPSETTING(      0x6000, DEF_STR( 2C_1C ) )
  1248: 	PORT_DIPSETTING(      0x7000, DEF_STR( 1C_1C ) )
  1249: 	PORT_DIPSETTING(      0x4000, DEF_STR( 1C_2C ) )
  1250: 	PORT_DIPSETTING(      0x3000, DEF_STR( 1C_3C ) )
  1251: 	PORT_DIPSETTING(      0x2000, DEF_STR( 1C_4C ) )
  1252: 	PORT_DIPSETTING(      0x1000, DEF_STR( 1C_5C ) )
  1253: 	PORT_DIPSETTING(      0x0000, DEF_STR( 1C_6C ) )
  1254: 	PORT_DIPNAME( 0x8000, 0x8000, "2C Start, 1C Continue" )
  1255: 	PORT_DIPSETTING(      0x8000, DEF_STR( Off ) )
  1256: 	PORT_DIPSETTING(      0x0000, DEF_STR( On ) ) // Forces 1C_1C
  1257: 
  1258: 	PORT_START	// IN3 - c00006&7
  1259: 
  1260: 	PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1261: 	PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1262: 	PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1263: 	PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1264: 	PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1265: 	PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1266: 	PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1267: 	PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_VBLANK  )	// vblank
  1268: 
  1269: 	PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1270: 	PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1271: 	PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN )	// tested!
  1272: 	PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1273: 	PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1274: 	PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1275: 	PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1276: 	PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN )	// tested!
  1277: 
  1278: INPUT_PORTS_END
  1279: 
  1280: 
  1281: /***************************************************************************
  1282: 								Tengai
  1283: ***************************************************************************/
  1284: 
  1285: INPUT_PORTS_START( tengai )
  1286: 
  1287: 	PORT_START	// IN0 - c00000&1
  1288: 	PSIKYO_PORT_PLAYER2
  1289: 
  1290: 	PSIKYO_PORT_PLAYER1
  1291: 
  1292: 	PORT_START	// IN1 - c00002&3
  1293: 	PSIKYO_PORT_COIN
  1294: 
  1295: 	PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1296: 	PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1297: 	PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1298: 	PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1299: 	PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1300: 	PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1301: 	PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1302: 	PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1303: 
  1304: 	PORT_START	// IN2 - c00004&5
  1305: 	PORT_DIPNAME( 0x0001, 0x0001, DEF_STR( Flip_Screen ) )
  1306: 	PORT_DIPSETTING(      0x0001, DEF_STR( Off ) )
  1307: 	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
  1308: 	PORT_DIPNAME( 0x0002, 0x0000, DEF_STR( Demo_Sounds ) )
  1309: 	PORT_DIPSETTING(      0x0002, DEF_STR( Off ) )
  1310: 	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
  1311: 	PORT_DIPNAME( 0x000c, 0x000c, DEF_STR( Difficulty ) )
  1312: 	PORT_DIPSETTING(      0x0008, "Easy" )
  1313: 	PORT_DIPSETTING(      0x000c, "Normal" )
  1314: 	PORT_DIPSETTING(      0x0004, "Hard" )
  1315: 	PORT_DIPSETTING(      0x0000, "Hardest" )
  1316: 	PORT_DIPNAME( 0x0030, 0x0030, DEF_STR( Lives ) )
  1317: 	PORT_DIPSETTING(      0x0020, "1" )
  1318: 	PORT_DIPSETTING(      0x0010, "2" )
  1319: 	PORT_DIPSETTING(      0x0030, "3" )
  1320: 	PORT_DIPSETTING(      0x0000, "4" )
  1321: 	PORT_DIPNAME( 0x0040, 0x0040, DEF_STR( Bonus_Life ) )
  1322: 	PORT_DIPSETTING(      0x0040, "600K" )
  1323: 	PORT_DIPSETTING(      0x0000, "800K" )
  1324: 	PORT_SERVICE( 0x0080, IP_ACTIVE_LOW )
  1325: 
  1326: 	PORT_DIPNAME( 0x0100, 0x0100, "Credits/Coinage" )	// [Free Play] on all for free play
  1327: 	PORT_DIPSETTING(      0x0100, "A+B/A&B" )
  1328: 	PORT_DIPSETTING(      0x0000, "A&B/A [Free Play]" )
  1329: 	PORT_DIPNAME( 0x0e00, 0x0e00, DEF_STR( Coin_A ) )
  1330: 	PORT_DIPSETTING(      0x0a00, DEF_STR( 3C_1C ) )
  1331: 	PORT_DIPSETTING(      0x0c00, DEF_STR( 2C_1C ) )
  1332: 	PORT_DIPSETTING(      0x0e00, DEF_STR( 1C_1C ) )
  1333: 	PORT_DIPSETTING(      0x0800, DEF_STR( 1C_2C ) )
  1334: 	PORT_DIPSETTING(      0x0600, DEF_STR( 1C_3C ) )
  1335: 	PORT_DIPSETTING(      0x0400, DEF_STR( 1C_4C ) )
  1336: 	PORT_DIPSETTING(      0x0200, DEF_STR( 1C_5C ) )
  1337: 	PORT_DIPSETTING(      0x0000, "1C 6C [Free Play]" )
  1338: 	PORT_DIPNAME( 0x7000, 0x7000, DEF_STR( Coin_B ) )
  1339: 	PORT_DIPSETTING(      0x5000, DEF_STR( 3C_1C ) )
  1340: 	PORT_DIPSETTING(      0x6000, DEF_STR( 2C_1C ) )
  1341: 	PORT_DIPSETTING(      0x7000, DEF_STR( 1C_1C ) )
  1342: 	PORT_DIPSETTING(      0x4000, DEF_STR( 1C_2C ) )
  1343: 	PORT_DIPSETTING(      0x3000, DEF_STR( 1C_3C ) )
  1344: 	PORT_DIPSETTING(      0x2000, DEF_STR( 1C_4C ) )
  1345: 	PORT_DIPSETTING(      0x1000, DEF_STR( 1C_5C ) )
  1346: 	PORT_DIPSETTING(      0x0000, "1C 6C [Free Play]" )
  1347: 	PORT_DIPNAME( 0x8000, 0x8000, "2C Start, 1C Continue" )
  1348: 	PORT_DIPSETTING(      0x8000, DEF_STR( Off ) )
  1349: 	PORT_DIPSETTING(      0x0000, "On [Free Play]" ) // Forces 1C_1C
  1350: 
  1351: 	PORT_START	// IN3 - c00006&7
  1352: 
  1353: 	/***********************************************
  1354: 
  1355: 	This Dip port is bit based:
  1356: 
  1357: 	If any of the bits are set it becomes World.
  1358: 	Text for other regions is present though.
  1359: 
  1360: 	************************************************/
  1361: 
  1362: 	PORT_DIPNAME( 0x000f, 0x000e, "Country" )
  1363: 	PORT_DIPSETTING(      0x000f, "Japan" )
  1364: 	PORT_DIPSETTING(      0x000e, "World" )
  1365: 
  1366: 	PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1367: 	PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1368: 	PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1369: 	PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_VBLANK  )	// vblank
  1370: 
  1371: 	PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1372: 	PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1373: 	PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN )	// tested!
  1374: 	PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1375: 	PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1376: 	PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1377: 	PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1378: 	PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN )	// tested!
  1379: 
  1380: INPUT_PORTS_END
  1381: 
  1382: 
  1383: /***************************************************************************
  1384: 
  1385: 
  1386: 								Gfx Layouts
  1387: 
  1388: 
  1389: ***************************************************************************/
  1390: 
  1391: static struct GfxLayout layout_16x16x4 =
  1392: {
  1393: 	16,16,
  1394: 	RGN_FRAC(1,1),
  1395: 	4,
  1396: 	{0,1,2,3},
  1397: 	{2*4,3*4,0*4,1*4,6*4,7*4,4*4,5*4,
  1398: 	 10*4,11*4,8*4,9*4,14*4,15*4,12*4,13*4},
  1399: 	{0*64,1*64,2*64,3*64,4*64,5*64,6*64,7*64,
  1400: 	 8*64,9*64,10*64,11*64,12*64,13*64,14*64,15*64},
  1401: 	16*16*4
  1402: };
  1403: 
  1404: static struct GfxDecodeInfo psikyo_gfxdecodeinfo[] =
  1405: {
  1406: 	{ REGION_GFX1, 0, &layout_16x16x4, 0x000, 0x20 }, // [0] Sprites
  1407: 	{ REGION_GFX2, 0, &layout_16x16x4, 0x800, 0x48 }, // [1] Layer 0 + 1
  1408: 	{ -1 }
  1409: };
  1410: 
  1411: 
  1412: 
  1413: /***************************************************************************
  1414: 
  1415: 
  1416: 								Machine Drivers
  1417: 
  1418: 
  1419: ***************************************************************************/
  1420: 
  1421: /***************************************************************************
  1422: 							Samurai Ace / Sengoku Aces
  1423: ***************************************************************************/
  1424: 
  1425: 
  1426: struct YM2610interface sngkace_ym2610_interface =
  1427: {
  1428: 	1,
  1429: 	8000000,	/* ? */
  1430: 	{ MIXERG(30,MIXER_GAIN_4x,MIXER_PAN_CENTER) },
  1431: 	{ 0 },	/* A_r */
  1432: 	{ 0 },	/* B_r */
  1433: 	{ 0 },	/* A_w */
  1434: 	{ 0 },	/* B_w */
  1435: 	{ sound_irq },	/* irq */
  1436: 	{ REGION_SOUND1 },	/* delta_t */
  1437: 	{ REGION_SOUND1 },	/* adpcm */
  1438: 	{ YM3012_VOL(100,MIXER_PAN_LEFT,100,MIXER_PAN_RIGHT) }
  1439: };
  1440: 
  1441: static MACHINE_DRIVER_START( sngkace )
  1442: 
  1443: 	/* basic machine hardware */
  1444: 	MDRV_CPU_ADD(M68EC020, 16000000)
  1445: 	MDRV_CPU_MEMORY(psikyo_readmem,psikyo_writemem)
  1446: 	MDRV_CPU_VBLANK_INT(irq1_line_hold,1)
  1447: 
  1448: 	MDRV_CPU_ADD(Z80, 4000000)
  1449: 	MDRV_CPU_FLAGS(CPU_AUDIO_CPU)	/* ? */
  1450: 	MDRV_CPU_MEMORY(sngkace_sound_readmem,sngkace_sound_writemem)
  1451: 	MDRV_CPU_PORTS(sngkace_sound_readport,sngkace_sound_writeport)
  1452: 
  1453: 	MDRV_FRAMES_PER_SECOND(59.3)
  1454: 	MDRV_VBLANK_DURATION(DEFAULT_REAL_60HZ_VBLANK_DURATION)	// we're using IPT_VBLANK
  1455: 
  1456: 	/* video hardware */
  1457: 	MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER)
  1458: 	MDRV_SCREEN_SIZE(320, 256)
  1459: 	MDRV_VISIBLE_AREA(0, 320-1, 0, 256-32-1)
  1460: 	MDRV_GFXDECODE(psikyo_gfxdecodeinfo)
  1461: 	MDRV_PALETTE_LENGTH(0x1000)
  1462: 
  1463: 	MDRV_VIDEO_START(psikyo)
  1464: 	MDRV_VIDEO_EOF(psikyo)
  1465: 	MDRV_VIDEO_UPDATE(psikyo)
  1466: 
  1467: 	/* sound hardware */
  1468: 	MDRV_SOUND_ATTRIBUTES(SOUND_SUPPORTS_STEREO)
  1469: 	MDRV_SOUND_ADD(YM2610, sngkace_ym2610_interface)
  1470: MACHINE_DRIVER_END
  1471: 
  1472: 
  1473: 
  1474: /***************************************************************************
  1475: 		Gun Bird / Battle K-Road / Strikers 1945 (Japan, unprotected)
  1476: ***************************************************************************/
  1477: 
  1478: 
  1479: struct YM2610interface gunbird_ym2610_interface =
  1480: {
  1481: 	1,
  1482: 	8000000,	/* ? */
  1483: 	{ MIXERG(30,MIXER_GAIN_4x,MIXER_PAN_CENTER) },
  1484: 	{ 0 },	/* A_r */
  1485: 	{ 0 },	/* B_r */
  1486: 	{ 0 },	/* A_w */
  1487: 	{ 0 },	/* B_w */
  1488: 	{ sound_irq },	/* irq */
  1489: 	{ REGION_SOUND1 },	/* delta_t */
  1490: 	{ REGION_SOUND2 },	/* adpcm */
  1491: 	{ YM3012_VOL(100,MIXER_PAN_LEFT,100,MIXER_PAN_RIGHT) }
  1492: };
  1493: 
  1494: static MACHINE_DRIVER_START( gunbird )
  1495: 
  1496: 	/* basic machine hardware */
  1497: 	MDRV_CPU_ADD(M68EC020, 16000000)
  1498: 	MDRV_CPU_MEMORY(psikyo_readmem,psikyo_writemem)
  1499: 	MDRV_CPU_VBLANK_INT(irq1_line_hold,1)
  1500: 
  1501: 	MDRV_CPU_ADD(Z80, 4000000)	/* ! LZ8420M (Z80 core) ! */
  1502: 	MDRV_CPU_FLAGS(CPU_AUDIO_CPU)
  1503: 	MDRV_CPU_MEMORY(gunbird_sound_readmem,gunbird_sound_writemem)
  1504: 	MDRV_CPU_PORTS(gunbird_sound_readport,gunbird_sound_writeport)
  1505: 
  1506: 	MDRV_FRAMES_PER_SECOND(59.3)
  1507: 	MDRV_VBLANK_DURATION(DEFAULT_REAL_60HZ_VBLANK_DURATION)	// we're using IPT_VBLANK
  1508: 
  1509: 	/* video hardware */
  1510: 	MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER)
  1511: 	MDRV_SCREEN_SIZE(320, 256)
  1512: 	MDRV_VISIBLE_AREA(0, 320-1, 0, 256-32-1)
  1513: 	MDRV_GFXDECODE(psikyo_gfxdecodeinfo)
  1514: 	MDRV_PALETTE_LENGTH(0x1000)
  1515: 
  1516: 	MDRV_VIDEO_START(psikyo)
  1517: 	MDRV_VIDEO_EOF(psikyo)
  1518: 	MDRV_VIDEO_UPDATE(psikyo)
  1519: 
  1520: 	/* sound hardware */
  1521: 	MDRV_SOUND_ATTRIBUTES(SOUND_SUPPORTS_STEREO)
  1522: 	MDRV_SOUND_ADD(YM2610, gunbird_ym2610_interface)
  1523: MACHINE_DRIVER_END
  1524: 
  1525: 
  1526: 
  1527: 
  1528: /***************************************************************************
  1529: 						Strikers 1945 / Tengai
  1530: ***************************************************************************/
  1531: 
  1532: 
  1533: static void irqhandler(int linestate)
  1534: {
  1535: 	if (linestate)
  1536: 		cpu_set_irq_line(1, 0, ASSERT_LINE);
  1537: 	else
  1538: 		cpu_set_irq_line(1, 0, CLEAR_LINE);
  1539: }
  1540: 
  1541: static struct YMF278B_interface ymf278b_interface =
  1542: {
  1543: 	1,
  1544: 	{ YMF278B_STD_CLOCK },
  1545: 	{ REGION_SOUND1 },
  1546: 	{ YM3012_VOL(100, MIXER_PAN_CENTER, 100, MIXER_PAN_CENTER) },
  1547: 	{ irqhandler }
  1548: };
  1549: 
  1550: static MACHINE_DRIVER_START( s1945 )
  1551: 
  1552: 	/* basic machine hardware */
  1553: 	MDRV_CPU_ADD(M68EC020, 16000000)
  1554: 	MDRV_CPU_MEMORY(psikyo_readmem,psikyo_writemem)
  1555: 	MDRV_CPU_VBLANK_INT(irq1_line_hold,1)
  1556: 
  1557: 	MDRV_CPU_ADD(Z80, 4000000)	/* ! LZ8420M (Z80 core) ! */
  1558: 	MDRV_CPU_FLAGS(CPU_AUDIO_CPU)
  1559: 	MDRV_CPU_MEMORY(gunbird_sound_readmem,gunbird_sound_writemem)
  1560: 	MDRV_CPU_PORTS(s1945_sound_readport,s1945_sound_writeport)
  1561: 
  1562: 	/* MCU should go here */
  1563: 
  1564: 	MDRV_FRAMES_PER_SECOND(59.3)
  1565: 	MDRV_VBLANK_DURATION(DEFAULT_REAL_60HZ_VBLANK_DURATION)	// we're using IPT_VBLANK
  1566: 
  1567: 	/* video hardware */
  1568: 	MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER)
  1569: 	MDRV_SCREEN_SIZE(320, 256)
  1570: 	MDRV_VISIBLE_AREA(0, 320-1, 0, 256-32-1)
  1571: 	MDRV_GFXDECODE(psikyo_gfxdecodeinfo)
  1572: 	MDRV_PALETTE_LENGTH(0x1000)
  1573: 
  1574: 	MDRV_VIDEO_START(psikyo)
  1575: 	MDRV_VIDEO_EOF(psikyo)
  1576: 	MDRV_VIDEO_UPDATE(psikyo)
  1577: 
  1578: 	/* sound hardware */
  1579: 	MDRV_SOUND_ATTRIBUTES(SOUND_SUPPORTS_STEREO)
  1580: 	MDRV_SOUND_ADD(YMF278B, ymf278b_interface)
  1581: MACHINE_DRIVER_END
  1582: 
  1583: 
  1584: 
  1585: 
  1586: 
  1587: /***************************************************************************
  1588: 
  1589: 
  1590: 								ROMs Loading
  1591: 
  1592: 
  1593: ***************************************************************************/
  1594: 
  1595: 
  1596: /***************************************************************************
  1597: 
  1598: 								Samurai Aces
  1599: 						  ( WORLD/USA/HK/KOREA/TAIWAN Ver.)
  1600: 
  1601: 								Sengoku Ace
  1602: 						  (Samurai Aces JPN Ver.)
  1603: 
  1604: Board:	SH201B
  1605: CPU:	TMP68EC020F-16
  1606: Sound:	Z80A + YM2610
  1607: OSC:	32.000, 14.31818 MHz
  1608: 
  1609: ***************************************************************************/
  1610: 
  1611: ROM_START( samuraia )
  1612: 
  1613: 	ROM_REGION( 0x100000, REGION_CPU1, 0 )		/* Main CPU Code */
  1614: 	ROM_LOAD32_WORD_SWAP( "4-u127.bin", 0x000000, 0x040000, CRC(8c9911ca) SHA1(821ba648b9a1d495c600cbf4606f2dbddc6f9e6f) ) // 1&0
  1615: 	ROM_LOAD32_WORD_SWAP( "5-u126.bin", 0x000002, 0x040000, CRC(d20c3ef0) SHA1(264e5a7e45e130a9e7152468733337668dc5b65f) ) // 3&2
  1616: 
  1617: 	ROM_REGION( 0x030000, REGION_CPU2, 0 )		/* Sound CPU Code */
  1618: 	ROM_LOAD( "3-u58.bin", 0x00000, 0x20000, CRC(310f5c76) SHA1(dbfd1c5a7a514bccd89fc4f7191744cf76bb745d) )
  1619: 	ROM_RELOAD(            0x10000, 0x20000             )
  1620: 
  1621: 	ROM_REGION( 0x200000, REGION_GFX1, ROMREGION_DISPOSE )	/* Sprites */
  1622: 	ROM_LOAD( "u14.bin",  0x000000, 0x200000, CRC(00a546cb) SHA1(30a8679b49928d5fcbe58b5eecc2ebd08173adf8) )
  1623: 
  1624: 	ROM_REGION( 0x200000, REGION_GFX2, ROMREGION_DISPOSE )	/* Layers 0 + 1 */
  1625: 	ROM_LOAD( "u34.bin",  0x000000, 0x100000, CRC(e6a75bd8) SHA1(1aa84ea54584b6c8b2846194b48bf6d2afa67fee) )
  1626: 	ROM_LOAD( "u35.bin",  0x100000, 0x100000, CRC(c4ca0164) SHA1(c75422de2e0127cdc23d8c223b674a5bd85b00fb) )
  1627: 
  1628: //	ROM_REGION( 0x100000, REGION_SOUND1, ROMREGION_SOUNDONLY )	/* Samples */
  1629: 	ROM_REGION( 0x100000, REGION_SOUND1, 0 )	/* Samples */
  1630: 	ROM_LOAD( "u68.bin",  0x000000, 0x100000, CRC(9a7f6c34) SHA1(c549b209bce1d2c6eeb512db198ad20c3f5fb0ea) )
  1631: 
  1632: 	ROM_REGION( 0x040000, REGION_USER1, 0 )	/* Sprites LUT */
  1633: 	ROM_LOAD( "u11.bin",  0x000000, 0x040000, CRC(11a04d91) SHA1(5d146a9a39a70f2ee212ceab9a5469598432449e) ) // x1xxxxxxxxxxxxxxxx = 0xFF
  1634: 
  1635: ROM_END
  1636: 
  1637: ROM_START( sngkace )
  1638: 
  1639: 	ROM_REGION( 0x100000, REGION_CPU1, 0 )		/* Main CPU Code */
  1640: 	ROM_LOAD32_WORD_SWAP( "1-u127.bin", 0x000000, 0x040000, CRC(6c45b2f8) SHA1(08473297e174f3a6d67043f3b16f4e6b9c68b826) ) // 1&0
  1641: 	ROM_LOAD32_WORD_SWAP( "2-u126.bin", 0x000002, 0x040000, CRC(845a6760) SHA1(3b8fed294e28d9d8ef5cb5ec88b9ade396146a48) ) // 3&2
  1642: 
  1643: 	ROM_REGION( 0x030000, REGION_CPU2, 0 )		/* Sound CPU Code */
  1644: 	ROM_LOAD( "3-u58.bin", 0x00000, 0x20000, CRC(310f5c76) SHA1(dbfd1c5a7a514bccd89fc4f7191744cf76bb745d) )
  1645: 	ROM_RELOAD(            0x10000, 0x20000             )
  1646: 
  1647: 	ROM_REGION( 0x200000, REGION_GFX1, ROMREGION_DISPOSE )	/* Sprites */
  1648: 	ROM_LOAD( "u14.bin",  0x000000, 0x200000, CRC(00a546cb) SHA1(30a8679b49928d5fcbe58b5eecc2ebd08173adf8) )
  1649: 
  1650: 	ROM_REGION( 0x200000, REGION_GFX2, ROMREGION_DISPOSE )	/* Layers 0 + 1 */
  1651: 	ROM_LOAD( "u34.bin",  0x000000, 0x100000, CRC(e6a75bd8) SHA1(1aa84ea54584b6c8b2846194b48bf6d2afa67fee) )
  1652: 	ROM_LOAD( "u35.bin",  0x100000, 0x100000, CRC(c4ca0164) SHA1(c75422de2e0127cdc23d8c223b674a5bd85b00fb) )
  1653: 
  1654: //	ROM_REGION( 0x100000, REGION_SOUND1, ROMREGION_SOUNDONLY )	/* Samples */
  1655: 	ROM_REGION( 0x100000, REGION_SOUND1, 0 )	/* Samples */
  1656: 	ROM_LOAD( "u68.bin",  0x000000, 0x100000, CRC(9a7f6c34) SHA1(c549b209bce1d2c6eeb512db198ad20c3f5fb0ea) )
  1657: 
  1658: 	ROM_REGION( 0x040000, REGION_USER1, 0 )	/* Sprites LUT */
  1659: 	ROM_LOAD( "u11.bin",  0x000000, 0x040000, CRC(11a04d91) SHA1(5d146a9a39a70f2ee212ceab9a5469598432449e) ) // x1xxxxxxxxxxxxxxxx = 0xFF
  1660: 
  1661: ROM_END
  1662: 
  1663: DRIVER_INIT( sngkace )
  1664: {
  1665: 	{
  1666: 		unsigned char *RAM	=	memory_region(REGION_SOUND1);
  1667: 		int len				=	memory_region_length(REGION_SOUND1);
  1668: 		int i;
  1669: 
  1670: 		/* Bit 6&7 of the samples are swapped. Naughty, naughty... */
  1671: 		for (i=0;i<len;i++)
  1672: 		{
  1673: 			int x = RAM[i];
  1674: 			RAM[i] = ((x & 0x40) << 1) | ((x & 0x80) >> 1) | (x & 0x3f);
  1675: 		}
  1676: 	}
  1677: 
  1678: 	/* input ports */
  1679: 	install_mem_read32_handler(0, 0xc00000, 0xc0000b, sngkace_input_r);
  1680: 
  1681: 	/* sound latch */
  1682: 	install_mem_write32_handler(0, 0xc00010, 0xc00013, psikyo_soundlatch_w);
  1683: 
  1684: 	psikyo_ka302c_banking = 0; // SH201B doesn't have any gfx banking
  1685: 	psikyo_switch_banks(0, 0); // sngkace / samuraia don't use banking
  1686: 	psikyo_switch_banks(1, 1); // They share REGION_GFX2 to save memory on other boards
  1687: 
  1688: 	/* Enable other regions */
  1689: #if 0 
  1690: 	if (!strcmp(Machine->gamedrv->name,"sngkace"))
  1691: 	{
  1692: 		unsigned char *ROM	=	memory_region(REGION_CPU1);
  1693: 		ROM[0x995] = 0x4e;
  1694: 		ROM[0x994] = 0x71;
  1695: 		ROM[0x997] = 0x4e;
  1696: 		ROM[0x996] = 0x71;
  1697: 
  1698: 	}
  1699: #endif 
  1700: }
  1701: 
  1702: 
  1703: /***************************************************************************
  1704: 
  1705: 								Gun Bird (Korea)
  1706: 								Gun Bird (Japan)
  1707: 							Battle K-Road (Japan)
  1708: 
  1709: Board:	KA302C
  1710: CPU:	MC68EC020FG16
  1711: Sound:	LZ8420M (Z80 core) + YMF286-K
  1712: OSC:	16.000,	14.31818 MHz
  1713: 
  1714: Chips:	PS2001B
  1715: 		PS3103
  1716: 		PS3204
  1717: 		PS3305
  1718: 
  1719: ***************************************************************************/
  1720: 
  1721: ROM_START( gunbird )
  1722: 
  1723: 	ROM_REGION( 0x100000, REGION_CPU1, 0 )		/* Main CPU Code */
  1724: 	ROM_LOAD32_WORD_SWAP( "4-u46.bin", 0x000000, 0x040000, CRC(b78ec99d) SHA1(399b79931652d9df1632cd4d7ec3d214e473a5c3) ) // 1&0
  1725: 	ROM_LOAD32_WORD_SWAP( "5-u39.bin", 0x000002, 0x040000, CRC(925f095d) SHA1(301a536119a0320a756e9c6e51fb10e36b90ef16) ) // 3&2
  1726: 
  1727: 	ROM_REGION( 0x030000, REGION_CPU2, 0 )		/* Sound CPU Code */
  1728: 	ROM_LOAD( "3-u71.bin", 0x00000, 0x20000, CRC(2168e4ba) SHA1(ca7ad6acb5f806ce2528e7b52c19e8cceecb8543) )
  1729: 	ROM_RELOAD(            0x10000, 0x20000             )
  1730: 
  1731: 	ROM_REGION( 0x700000, REGION_GFX1, ROMREGION_DISPOSE )	/* Sprites */
  1732: 	ROM_LOAD( "u14.bin",  0x000000, 0x200000, CRC(7d7e8a00) SHA1(9f35f5b54ae928e9bf2aa6ad4604f669857955ec) )
  1733: 	ROM_LOAD( "u24.bin",  0x200000, 0x200000, CRC(5e3ffc9d) SHA1(c284eb9ef56c8e6261fe11f91a10c5c5a56c9803) )
  1734: 	ROM_LOAD( "u15.bin",  0x400000, 0x200000, CRC(a827bfb5) SHA1(6e02436e12085016cf1982c9ae07b6c6dec82f1b) )
  1735: 	ROM_LOAD( "u25.bin",  0x600000, 0x100000, CRC(ef652e0c) SHA1(6dd994a15ced31d1bbd1a3b0e9d8d86eca33e217) )
  1736: 
  1737: 	ROM_REGION( 0x200000, REGION_GFX2, ROMREGION_DISPOSE )	/* Layers 0 + 1 */
  1738: 	ROM_LOAD( "u33.bin",  0x000000, 0x200000, CRC(54494e6b) SHA1(f5d090d2d34d908b56b53a246def194929eba990) )
  1739: 
  1740: 	ROM_REGION( 0x080000, REGION_SOUND1, ROMREGION_SOUNDONLY )	/* DELTA-T Samples */
  1741: 	ROM_LOAD( "u64.bin",  0x000000, 0x080000, CRC(e187ed4f) SHA1(05060723d89b1d05714447a14b5f5888ff3c2306) )
  1742: 
  1743: 	ROM_REGION( 0x100000, REGION_SOUND2, ROMREGION_SOUNDONLY )	/* ADPCM Samples */
  1744: 	ROM_LOAD( "u56.bin",  0x000000, 0x100000, CRC(9e07104d) SHA1(3bc54cb755bb3194197706965b532d62b48c4d12) )
  1745: 
  1746: 	ROM_REGION( 0x040000, REGION_USER1, 0 )	/* Sprites LUT */
  1747: 	ROM_LOAD( "u3.bin",  0x000000, 0x040000, CRC(0905aeb2) SHA1(8cca09f7dfe3f804e77515f7b1b1bdbeb7bb3d80) )
  1748: 
  1749: ROM_END
  1750: 
  1751: ROM_START( gunbirdk )
  1752: 
  1753: 	ROM_REGION( 0x100000, REGION_CPU1, 0 )		/* Main CPU Code */
  1754: 	ROM_LOAD32_WORD_SWAP( "1k-u46.bin", 0x000000, 0x080000, CRC(745cee52) SHA1(6c5bb92c92c55f882484417bc1aa580684019610) ) // 1&0
  1755: 	ROM_LOAD32_WORD_SWAP( "2k-u39.bin", 0x000002, 0x080000, CRC(669632fb) SHA1(885dea42e6da35e9166a208b18dbd930642c26cd) ) // 3&2
  1756: 
  1757: 	ROM_REGION( 0x030000, REGION_CPU2, 0 )		/* Sound CPU Code */
  1758: 	ROM_LOAD( "k3-u71.bin", 0x00000, 0x20000, CRC(11994055) SHA1(619776c178361f23de37ff14e87284ec0f1f4f10) )
  1759: 	ROM_RELOAD(            0x10000, 0x20000             )
  1760: 
  1761: 	ROM_REGION( 0x700000, REGION_GFX1, ROMREGION_DISPOSE )	/* Sprites */
  1762: 	ROM_LOAD( "u14.bin",  0x000000, 0x200000, CRC(7d7e8a00) SHA1(9f35f5b54ae928e9bf2aa6ad4604f669857955ec) )
  1763: 	ROM_LOAD( "u24.bin",  0x200000, 0x200000, CRC(5e3ffc9d) SHA1(c284eb9ef56c8e6261fe11f91a10c5c5a56c9803) )
  1764: 	ROM_LOAD( "u15.bin",  0x400000, 0x200000, CRC(a827bfb5) SHA1(6e02436e12085016cf1982c9ae07b6c6dec82f1b) )
  1765: 	ROM_LOAD( "u25.bin",  0x600000, 0x100000, CRC(ef652e0c) SHA1(6dd994a15ced31d1bbd1a3b0e9d8d86eca33e217) )
  1766: 
  1767: 	ROM_REGION( 0x200000, REGION_GFX2, ROMREGION_DISPOSE )	/* Layers 0 + 1 */
  1768: 	ROM_LOAD( "u33.bin",  0x000000, 0x200000, CRC(54494e6b) SHA1(f5d090d2d34d908b56b53a246def194929eba990) )
  1769: 
  1770: 	ROM_REGION( 0x080000, REGION_SOUND1, ROMREGION_SOUNDONLY )	/* DELTA-T Samples */
  1771: 	ROM_LOAD( "u64.bin",  0x000000, 0x080000, CRC(e187ed4f) SHA1(05060723d89b1d05714447a14b5f5888ff3c2306) )
  1772: 
  1773: 	ROM_REGION( 0x100000, REGION_SOUND2, ROMREGION_SOUNDONLY )	/* ADPCM Samples */
  1774: 	ROM_LOAD( "u56.bin",  0x000000, 0x100000, CRC(9e07104d) SHA1(3bc54cb755bb3194197706965b532d62b48c4d12) )
  1775: 
  1776: 	ROM_REGION( 0x040000, REGION_USER1, 0 )	/* Sprites LUT */
  1777: 	ROM_LOAD( "u3.bin",  0x000000, 0x040000, CRC(0905aeb2) SHA1(8cca09f7dfe3f804e77515f7b1b1bdbeb7bb3d80) )
  1778: 
  1779: ROM_END
  1780: 
  1781: ROM_START( gunbirdj )
  1782: 
  1783: 	ROM_REGION( 0x100000, REGION_CPU1, 0 )		/* Main CPU Code */
  1784: 	ROM_LOAD32_WORD_SWAP( "1-u46.bin", 0x000000, 0x040000, CRC(474abd69) SHA1(27f37333075f9c92849101aad4875e69004d747b) ) // 1&0
  1785: 	ROM_LOAD32_WORD_SWAP( "2-u39.bin", 0x000002, 0x040000, CRC(3e3e661f) SHA1(b5648546f390539b0f727a9a62d1b9516254ae21) ) // 3&2
  1786: 
  1787: 	ROM_REGION( 0x030000, REGION_CPU2, 0 )		/* Sound CPU Code */
  1788: 	ROM_LOAD( "3-u71.bin", 0x00000, 0x20000, CRC(2168e4ba) SHA1(ca7ad6acb5f806ce2528e7b52c19e8cceecb8543) )
  1789: 	ROM_RELOAD(            0x10000, 0x20000             )
  1790: 
  1791: 	ROM_REGION( 0x700000, REGION_GFX1, ROMREGION_DISPOSE )	/* Sprites */
  1792: 	ROM_LOAD( "u14.bin",  0x000000, 0x200000, CRC(7d7e8a00) SHA1(9f35f5b54ae928e9bf2aa6ad4604f669857955ec) )
  1793: 	ROM_LOAD( "u24.bin",  0x200000, 0x200000, CRC(5e3ffc9d) SHA1(c284eb9ef56c8e6261fe11f91a10c5c5a56c9803) )
  1794: 	ROM_LOAD( "u15.bin",  0x400000, 0x200000, CRC(a827bfb5) SHA1(6e02436e12085016cf1982c9ae07b6c6dec82f1b) )
  1795: 	ROM_LOAD( "u25.bin",  0x600000, 0x100000, CRC(ef652e0c) SHA1(6dd994a15ced31d1bbd1a3b0e9d8d86eca33e217) )
  1796: 
  1797: 	ROM_REGION( 0x200000, REGION_GFX2, ROMREGION_DISPOSE )	/* Layers 0 + 1 */
  1798: 	ROM_LOAD( "u33.bin",  0x000000, 0x200000, CRC(54494e6b) SHA1(f5d090d2d34d908b56b53a246def194929eba990) )
  1799: 
  1800: 	ROM_REGION( 0x080000, REGION_SOUND1, ROMREGION_SOUNDONLY )	/* DELTA-T Samples */
  1801: 	ROM_LOAD( "u64.bin",  0x000000, 0x080000, CRC(e187ed4f) SHA1(05060723d89b1d05714447a14b5f5888ff3c2306) )
  1802: 
  1803: 	ROM_REGION( 0x100000, REGION_SOUND2, ROMREGION_SOUNDONLY )	/* ADPCM Samples */
  1804: 	ROM_LOAD( "u56.bin",  0x000000, 0x100000, CRC(9e07104d) SHA1(3bc54cb755bb3194197706965b532d62b48c4d12) )
  1805: 
  1806: 	ROM_REGION( 0x040000, REGION_USER1, 0 )	/* Sprites LUT */
  1807: 	ROM_LOAD( "u3.bin",  0x000000, 0x040000, CRC(0905aeb2) SHA1(8cca09f7dfe3f804e77515f7b1b1bdbeb7bb3d80) )
  1808: 
  1809: ROM_END
  1810: 
  1811: 
  1812: ROM_START( btlkroad )
  1813: 
  1814: 	ROM_REGION( 0x100000, REGION_CPU1, 0 )		/* Main CPU Code */
  1815: 	ROM_LOAD32_WORD_SWAP( "4-u46.bin", 0x000000, 0x040000, CRC(8a7a28b4) SHA1(f7197be673dfd0ddf46998af81792b81d8fe9fbf) ) // 1&0
  1816: 	ROM_LOAD32_WORD_SWAP( "5-u39.bin", 0x000002, 0x040000, CRC(933561fa) SHA1(f6f3b1e14b1cfeca26ef8260ac4771dc1531c357) ) // 3&2
  1817: 
  1818: 	ROM_REGION( 0x030000, REGION_CPU2, 0 )		/* Sound CPU Code */
  1819: 	ROM_LOAD( "3-u71.bin", 0x00000, 0x20000, CRC(22411fab) SHA1(1094cb51712e40ae65d0082b408572bdec06ae8b) )
  1820: 	ROM_RELOAD(            0x10000, 0x20000             )
  1821: 
  1822: 	ROM_REGION( 0x700000, REGION_GFX1, ROMREGION_DISPOSE )	/* Sprites */
  1823: 	ROM_LOAD( "u14.bin",  0x000000, 0x200000, CRC(282d89c3) SHA1(3b4b17f4a37efa2f7e232488aaba7c77d10c84d2) )
  1824: 	ROM_LOAD( "u24.bin",  0x200000, 0x200000, CRC(bbe9d3d1) SHA1(9da0b0b993e8271a8119e9c2f602e52325983f79) )
  1825: 	ROM_LOAD( "u15.bin",  0x400000, 0x200000, CRC(d4d1b07c) SHA1(232109db8f6e137fbc8826f38a96057067cb19dc) )
  1826: //	ROM_LOAD( "u25.bin",  CRC(00600000) , 0x100000	NOT PRESENT
  1827: 
  1828: 	ROM_REGION( 0x200000, REGION_GFX2, ROMREGION_DISPOSE )	/* Layers 0 + 1 */
  1829: 	ROM_LOAD( "u33.bin",  0x000000, 0x200000, CRC(4c8577f1) SHA1(d27043514632954a06667ac63f4a4e4a31870511) )
  1830: 
  1831: 	ROM_REGION( 0x080000, REGION_SOUND1, ROMREGION_SOUNDONLY )	/* DELTA-T Samples */
  1832: 	ROM_LOAD( "u64.bin",  0x000000, 0x080000, CRC(0f33049f) SHA1(ca4fd5f3906685ace1af40b75f5678231d7324e8) )
  1833: 
  1834: 	ROM_REGION( 0x100000, REGION_SOUND2, ROMREGION_SOUNDONLY )	/* ADPCM Samples */
  1835: 	ROM_LOAD( "u56.bin",  0x000000, 0x100000, CRC(51d73682) SHA1(562038d08e9a4389ffa39f3a659b2a29b94dc156) )
  1836: 
  1837: 	ROM_REGION( 0x040000, REGION_USER1, 0 )	/* Sprites LUT */
  1838: 	ROM_LOAD( "u3.bin",  0x000000, 0x040000, CRC(30d541ed) SHA1(6f7fb5f5ecbce7c086185392de164ebb6887e780) )
  1839: 
  1840: ROM_END
  1841: 
  1842: 
  1843: 
  1844: DRIVER_INIT( gunbird )
  1845: {
  1846: 	/* input ports */
  1847: 	install_mem_read32_handler(0, 0xc00000, 0xc0000b, gunbird_input_r);
  1848: 
  1849: 	/* sound latch */
  1850: 	install_mem_write32_handler(0, 0xc00010, 0xc00013, psikyo_soundlatch_w);
  1851: 
  1852: 	psikyo_ka302c_banking = 1;
  1853: }
  1854: 
  1855: 
  1856: /***************************************************************************
  1857: 
  1858: 							Strikers 1945 (Japan, unprotected)
  1859: 
  1860: Board:	SH403 (Similiar to KA302C)
  1861: CPU:	MC68EC020FG16
  1862: Sound:	LZ8420M (Z80 core) + YMF286-K?
  1863: OSC:	16.000,	14.31818 MHz
  1864: 
  1865: Chips:	PS2001B
  1866: 		PS3103
  1867: 		PS3204
  1868: 		PS3305
  1869: 
  1870: ***************************************************************************/
  1871: 
  1872: ROM_START( s1945jn )
  1873: 
  1874: 	ROM_REGION( 0x100000, REGION_CPU1, 0 )		/* Main CPU Code */
  1875: 	ROM_LOAD32_WORD_SWAP( "1-u46.bin", 0x000000, 0x080000, CRC(45fa8086) SHA1(f1753b9420596f4b828c77e877a044ba5fb01b28) ) // 1&0
  1876: 	ROM_LOAD32_WORD_SWAP( "2-u39.bin", 0x000002, 0x080000, CRC(0152ab8c) SHA1(2aef4cb88341b35f20bb551716f1e5ac2731e9ba) ) // 3&2
  1877: 
  1878: 	ROM_REGION( 0x030000, REGION_CPU2, 0 )		/* Sound CPU Code */
  1879: 	ROM_LOAD( "3-u71.bin", 0x00000, 0x20000, CRC(e3e366bd) SHA1(1f5b5909745802e263a896265ea365df76d3eaa5) )
  1880: 	ROM_RELOAD(            0x10000, 0x20000             )
  1881: 
  1882: 	ROM_REGION( 0x800000, REGION_GFX1, ROMREGION_DISPOSE )	/* Sprites */
  1883: 	ROM_LOAD( "u20.bin",  0x000000, 0x200000, CRC(28a27fee) SHA1(913f3bc4d0c6fb6b776a020c8099bf96f16fd06f) )
  1884: 	ROM_LOAD( "u22.bin",  0x200000, 0x200000, CRC(ca152a32) SHA1(63efee83cb5982c77ca473288b3d1a96b89e6388) )
  1885: 	ROM_LOAD( "u21.bin",  0x400000, 0x200000, CRC(c5d60ea9) SHA1(e5ce90788211c856172e5323b01b2c7ab3d3fe50) )
  1886: 	ROM_LOAD( "u23.bin",  0x600000, 0x200000, CRC(48710332) SHA1(db38b732a09b31ce55a96ec62987baae9b7a00c1) )
  1887: 
  1888: 	ROM_REGION( 0x200000, REGION_GFX2, ROMREGION_DISPOSE )	/* Layer 0 + 1 */
  1889: 	ROM_LOAD( "u34.bin",  0x000000, 0x200000, CRC(aaf83e23) SHA1(1c75d09ff42c0c215f8c66c699ca75688c95a05e) )
  1890: 
  1891: 	ROM_REGION( 0x080000, REGION_SOUND1, ROMREGION_SOUNDONLY )	/* DELTA-T Samples */
  1892: 	ROM_LOAD( "u64.bin",  0x000000, 0x080000, CRC(a44a4a9b) SHA1(5378256752d709daed0b5f4199deebbcffe84e10) )
  1893: 
  1894: 	ROM_REGION( 0x100000, REGION_SOUND2, ROMREGION_SOUNDONLY )	/* ADPCM Samples */
  1895: 	ROM_LOAD( "u56.bin",  0x000000, 0x100000, CRC(fe1312c2) SHA1(8339a96a0885518d6e22cb3bdb9c2f82d011d86d) )
  1896: 
  1897: 	ROM_REGION( 0x040000, REGION_USER1, 0 )	/* */
  1898: 	ROM_LOAD( "u1.bin",  0x000000, 0x040000, CRC(dee22654) SHA1(5df05b0029ff7b1f7f04b41da7823d2aa8034bd2) )
  1899: 
  1900: ROM_END
  1901: 
  1902: DRIVER_INIT( s1945jn )
  1903: {
  1904: 	/* input ports */
  1905: 	install_mem_read32_handler(0, 0xc00000, 0xc0000b, gunbird_input_r);
  1906: 
  1907: 	/* sound latch */
  1908: 	install_mem_write32_handler(0, 0xc00010, 0xc00013, s1945_soundlatch_w);
  1909: 
  1910: 	psikyo_ka302c_banking = 1;
  1911: }
  1912: 
  1913: 
  1914: /***************************************************************************
  1915: 
  1916: 							Strikers 1945 (Japan)
  1917: 
  1918: Board:	SH404
  1919: CPU:	MC68EC020FG16
  1920: Sound:	LZ8420M (Z80 core)
  1921: 		YMF278B-F
  1922: OSC:	16.000MHz
  1923: 		14.3181MHz
  1924: 		33.8688MHz (YMF)
  1925: 		4.000MHz (PIC)
  1926: 
  1927: Chips:	PS2001B
  1928: 		PS3103
  1929: 		PS3204
  1930: 		PS3305
  1931: 
  1932: 
  1933: 1-U59      security (PIC16C57; not dumped)
  1934: 
  1935: ***************************************************************************/
  1936: 
  1937: ROM_START( s1945 )
  1938: 
  1939: 	ROM_REGION( 0x100000, REGION_CPU1, 0 )		/* Main CPU Code */
  1940: 	ROM_LOAD32_WORD_SWAP( "2s.u40", 0x000000, 0x040000, CRC(9b10062a) SHA1(cf963bba157422b659d8d64b4493eb7d69cd07b7) ) // 1&0
  1941: 	ROM_LOAD32_WORD_SWAP( "3s.u41", 0x000002, 0x040000, CRC(f87e871a) SHA1(567167c7fcfb622f78e211d74b04060c3d29d6b7) ) // 3&2
  1942: 
  1943: 	ROM_REGION( 0x030000, REGION_CPU2, 0 )		/* Sound CPU Code */
  1944: 	ROM_LOAD( "3-u63.bin", 0x00000, 0x20000, CRC(42d40ae1) SHA1(530a5a3f78ac489b84a631ea6ce21010a4f4d31b) )
  1945: 	ROM_RELOAD(            0x10000, 0x20000             )
  1946: 
  1947: 	ROM_REGION( 0x000100, REGION_CPU3, 0 )		/* MCU? */
  1948: 	 //	ROM_LOAD( "4-u59.bin", 0x00000, 0x00100, NO_DUMP )
  1949: 
  1950: 	ROM_REGION( 0x800000, REGION_GFX1, ROMREGION_DISPOSE )	/* Sprites */
  1951: 	ROM_LOAD( "u20.bin",  0x000000, 0x200000, CRC(28a27fee) SHA1(913f3bc4d0c6fb6b776a020c8099bf96f16fd06f) )
  1952: 	ROM_LOAD( "u22.bin",  0x200000, 0x200000, CRC(ca152a32) SHA1(63efee83cb5982c77ca473288b3d1a96b89e6388) )
  1953: 	ROM_LOAD( "u21.bin",  0x400000, 0x200000, CRC(c5d60ea9) SHA1(e5ce90788211c856172e5323b01b2c7ab3d3fe50) )
  1954: 	ROM_LOAD( "u23.bin",  0x600000, 0x200000, CRC(48710332) SHA1(db38b732a09b31ce55a96ec62987baae9b7a00c1) )
  1955: 
  1956: 	ROM_REGION( 0x200000, REGION_GFX2, ROMREGION_DISPOSE )	/* Layer 0 + 1 */
  1957: 	ROM_LOAD( "u34.bin",  0x000000, 0x200000, CRC(aaf83e23) SHA1(1c75d09ff42c0c215f8c66c699ca75688c95a05e) )
  1958: 
  1959: 	ROM_REGION( 0x200000, REGION_SOUND1, ROMREGION_SOUNDONLY )	/* Samples */
  1960: 	ROM_LOAD( "u61.bin",  0x000000, 0x200000, CRC(a839cf47) SHA1(e179eb505c80d5bb3ccd9e228f2cf428c62b72ee) )	// 8 bit signed pcm (16KHz)
  1961: 
  1962: 	ROM_REGION( 0x040000, REGION_USER1, 0 )	/* */
  1963: 	ROM_LOAD( "u1.bin",  0x000000, 0x040000, CRC(dee22654) SHA1(5df05b0029ff7b1f7f04b41da7823d2aa8034bd2) )
  1964: 
  1965: ROM_END
  1966: 
  1967: ROM_START( s1945j )
  1968: 
  1969: 	ROM_REGION( 0x100000, REGION_CPU1, 0 )		/* Main CPU Code */
  1970: 	ROM_LOAD32_WORD_SWAP( "1-u40.bin", 0x000000, 0x040000, CRC(c00eb012) SHA1(080dae010ca83548ebdb3324585d15e48baf0541) ) // 1&0
  1971: 	ROM_LOAD32_WORD_SWAP( "2-u41.bin", 0x000002, 0x040000, CRC(3f5a134b) SHA1(18bb3bb1e1adadcf522795f5cf7d4dc5a5dd1f30) ) // 3&2
  1972: 
  1973: 	ROM_REGION( 0x030000, REGION_CPU2, 0 )		/* Sound CPU Code */
  1974: 	ROM_LOAD( "3-u63.bin", 0x00000, 0x20000, CRC(42d40ae1) SHA1(530a5a3f78ac489b84a631ea6ce21010a4f4d31b) )
  1975: 	ROM_RELOAD(            0x10000, 0x20000             )
  1976: 
  1977: 	ROM_REGION( 0x000100, REGION_CPU3, 0 )		/* MCU */
  1978: 	 //	ROM_LOAD( "4-u59.bin", 0x00000, 0x00100, NO_DUMP )
  1979: 
  1980: 	ROM_REGION( 0x800000, REGION_GFX1, ROMREGION_DISPOSE )	/* Sprites */
  1981: 	ROM_LOAD( "u20.bin",  0x000000, 0x200000, CRC(28a27fee) SHA1(913f3bc4d0c6fb6b776a020c8099bf96f16fd06f) )
  1982: 	ROM_LOAD( "u22.bin",  0x200000, 0x200000, CRC(ca152a32) SHA1(63efee83cb5982c77ca473288b3d1a96b89e6388) )
  1983: 	ROM_LOAD( "u21.bin",  0x400000, 0x200000, CRC(c5d60ea9) SHA1(e5ce90788211c856172e5323b01b2c7ab3d3fe50) )
  1984: 	ROM_LOAD( "u23.bin",  0x600000, 0x200000, CRC(48710332) SHA1(db38b732a09b31ce55a96ec62987baae9b7a00c1) )
  1985: 
  1986: 	ROM_REGION( 0x200000, REGION_GFX2, ROMREGION_DISPOSE )	/* Layer 0 + 1 */
  1987: 	ROM_LOAD( "u34.bin",  0x000000, 0x200000, CRC(aaf83e23) SHA1(1c75d09ff42c0c215f8c66c699ca75688c95a05e) )
  1988: 
  1989: 	ROM_REGION( 0x200000, REGION_SOUND1, ROMREGION_SOUNDONLY )	/* Samples */
  1990: 	ROM_LOAD( "u61.bin",  0x000000, 0x200000, CRC(a839cf47) SHA1(e179eb505c80d5bb3ccd9e228f2cf428c62b72ee) )	// 8 bit signed pcm (16KHz)
  1991: 
  1992: 	ROM_REGION( 0x040000, REGION_USER1, 0 )	/* */
  1993: 	ROM_LOAD( "u1.bin",  0x000000, 0x040000, CRC(dee22654) SHA1(5df05b0029ff7b1f7f04b41da7823d2aa8034bd2) )
  1994: 
  1995: ROM_END
  1996: 
  1997: DRIVER_INIT( s1945 )
  1998: {
  1999: 	/* input ports */
  2000: 	install_mem_read32_handler(0, 0xc00000, 0xc0000b, s1945_input_r);
  2001: 
  2002: 	/* sound latch */
  2003: 	install_mem_write32_handler(0, 0xc00010, 0xc00013, s1945_soundlatch_w);
  2004: 
  2005: 	/* protection and tile bank switching */
  2006: 	install_mem_write32_handler(0, 0xc00004, 0xc0000b, s1945_mcu_w);
  2007: 	s1945_mcu_init(s1945_table);
  2008: 
  2009: 	psikyo_ka302c_banking = 0; // Banking is controlled by mcu
  2010: }
  2011: 
  2012: DRIVER_INIT( s1945j )
  2013: {
  2014: 	/* input ports*/
  2015: 	install_mem_read32_handler(0, 0xc00000, 0xc0000b, s1945_input_r);
  2016: 
  2017: 	/* sound latch */
  2018: 	install_mem_write32_handler(0, 0xc00010, 0xc00013, s1945_soundlatch_w);
  2019: 
  2020: 	/* protection and tile bank switching */
  2021: 	install_mem_write32_handler(0, 0xc00004, 0xc0000b, s1945_mcu_w);
  2022: 	s1945_mcu_init(s1945j_table);
  2023: 
  2024: 	psikyo_ka302c_banking = 0; // Banking is controlled by mcu
  2025: }
  2026: 
  2027: /***************************************************************************
  2028: 
  2029: 								Tengai (World) / Sengoku Blade (Japan)
  2030: 
  2031: Board:	SH404
  2032: CPU:	MC68EC020FG16
  2033: Sound:	LZ8420M (Z80 core)
  2034: 		YMF278B-F
  2035: OSC:	16.000MHz
  2036: 		14.3181MHz
  2037: 		33.8688MHz (YMF)
  2038: 		4.000MHz (PIC)
  2039: Chips:	PS2001B
  2040: 		PS3103
  2041: 		PS3204
  2042: 		PS3305
  2043: 
  2044: 4-U59      security (PIC16C57; not dumped)
  2045: 
  2046: ***************************************************************************/
  2047: 
  2048: ROM_START( tengai )
  2049: 
  2050: 	ROM_REGION( 0x100000, REGION_CPU1, 0 )		/* Main CPU Code */
  2051: 	ROM_LOAD32_WORD_SWAP( "2-u40.bin", 0x000000, 0x080000, CRC(ab6fe58a) SHA1(6687a3af192b3eab60d75ca286ebb8e0636297b5) ) // 1&0
  2052: 	ROM_LOAD32_WORD_SWAP( "3-u41.bin", 0x000002, 0x080000, CRC(02e42e39) SHA1(6cdb7b1cebab50c0a44cd60cd437f0e878ccac5c) ) // 3&2
  2053: 
  2054: 	ROM_REGION( 0x030000, REGION_CPU2, 0 )		/* Sound CPU Code */
  2055: 	ROM_LOAD( "1-u63.bin", 0x00000, 0x20000, CRC(2025e387) SHA1(334b0eb3b416d46ccaadff3eee6f1abba63285fb) )
  2056: 	ROM_RELOAD(            0x10000, 0x20000             )
  2057: 
  2058: 	ROM_REGION( 0x000100, REGION_CPU3, 0 )		/* MCU */
  2059: 	//	ROM_LOAD( "4-u59.bin", 0x00000, 0x00100, NO_DUMP )
  2060: 
  2061: 	ROM_REGION( 0x600000, REGION_GFX1, ROMREGION_DISPOSE )	/* Sprites */
  2062: 	ROM_LOAD16_WORD_SWAP( "u20.bin",  0x000000, 0x200000, CRC(ed42ef73) SHA1(74693fcc83a2654ddb18fd513d528033863d6116) )
  2063: 	ROM_LOAD16_WORD_SWAP( "u22.bin",  0x200000, 0x200000, CRC(8d21caee) SHA1(2a68af8b2be2158dcb152c434e91a75871478d41) )
  2064: 	ROM_LOAD16_WORD_SWAP( "u21.bin",  0x400000, 0x200000, CRC(efe34eed) SHA1(7891495b443a5acc7b2f17fe694584f6cb0afacc) )
  2065: 
  2066: 	ROM_REGION( 0x400000, REGION_GFX2, ROMREGION_DISPOSE )	/* Layer 0 + 1 */
  2067: 	ROM_LOAD16_WORD_SWAP( "u34.bin",  0x000000, 0x400000, CRC(2a2e2eeb) SHA1(f1d99353c0affc5c908985e6f2a5724e5223cccc) ) /* four banks of 0x100000 */
  2068: 
  2069: 	ROM_REGION( 0x400000, REGION_SOUND1, ROMREGION_SOUNDONLY )	/* Samples */
  2070: 	ROM_LOAD( "u61.bin",  0x000000, 0x200000, CRC(a63633c5) SHA1(89e75a40518926ebcc7d88dea86c01ba0bb496e5) )	// 8 bit signed pcm (16KHz)
  2071: 	ROM_LOAD( "u62.bin",  0x200000, 0x200000, CRC(3ad0c357) SHA1(35f78cfa2eafa93ab96b24e336f569ee84af06b6) )
  2072: 
  2073: 	ROM_REGION( 0x040000, REGION_USER1, 0 )	/* Sprites LUT */
  2074: 	ROM_LOAD( "u1.bin",  0x000000, 0x040000, CRC(681d7d55) SHA1(b0b28471440d747adbc4d22d1918f89f6ede1615) )
  2075: 
  2076: ROM_END
  2077: 
  2078: DRIVER_INIT( tengai )
  2079: {
  2080: 	/* input ports */
  2081: 	install_mem_read32_handler(0, 0xc00000, 0xc0000b, s1945_input_r);
  2082: 
  2083: 	/* sound latch */
  2084: 	install_mem_write32_handler(0, 0xc00010, 0xc00013, s1945_soundlatch_w);
  2085: 
  2086: 	/* protection */
  2087: 	install_mem_write32_handler(0, 0xc00004, 0xc0000b, s1945_mcu_w);
  2088: 	s1945_mcu_init(0);
  2089: 
  2090: 	psikyo_ka302c_banking = 0; // Banking is controlled by mcu
  2091: }
  2092: 
  2093: 
  2094: /***************************************************************************
  2095: 
  2096: 
  2097: 								Game Drivers
  2098: 
  2099: 
  2100: ***************************************************************************/
  2101: 
  2102: /* Working Games */
  2103: GAME ( 1993, samuraia, 0,        sngkace,  samuraia, sngkace,  ROT270, "Psikyo", "Samurai Aces (World)"  ) // Banpresto?
  2104: GAME ( 1993, sngkace,  samuraia, sngkace,  sngkace,  sngkace,  ROT270, "Psikyo", "Sengoku Ace (Japan)"   ) // Banpresto?
  2105: GAME ( 1994, gunbird,  0,        gunbird,  gunbird,  gunbird,  ROT270, "Psikyo", "Gunbird (World)"      )
  2106: GAME ( 1994, gunbirdk, gunbird,  gunbird,  gunbirdj, gunbird,  ROT270, "Psikyo", "Gunbird (Korea)"      )
  2107: GAME ( 1994, gunbirdj, gunbird,  gunbird,  gunbirdj, gunbird,  ROT270, "Psikyo", "Gunbird (Japan)"      )
  2108: GAME ( 1994, btlkroad, 0,        gunbird,  btlkroad, gunbird,  ROT0,   "Psikyo", "Battle K-Road" )
  2109: GAME ( 1995, s1945,    0,        s1945,    s1945,    s1945,    ROT270, "Psikyo", "Strikers 1945" )
  2110: GAME ( 1995, s1945j,   s1945,    s1945,    s1945j,   s1945j,   ROT270, "Psikyo", "Strikers 1945 (Japan)" )
  2111: GAME ( 1995, s1945jn,  s1945,    gunbird,  s1945j,   s1945jn,  ROT270, "Psikyo", "Strikers 1945 (Japan, unprotected)" )
  2112: GAME ( 1996, tengai,   0,        s1945,    tengai,   tengai,   ROT0,   "Psikyo", "Tengai / Sengoku Blade: Sengoku Ace Episode II" )
  2113: 




powered by ggdb.com this page took approx. 0.018s