Fixed Dip Switches and Inputs for 'jcross' and 'sgladiat'.

There's a remaining unknown Dip Switch in 'sgladiat' though (DSW2:7).
This commit is contained in:
stephh 2008-08-28 00:36:59 +00:00
parent dfdc8efc09
commit 375ccafb6c

View File

@ -1,4 +1,5 @@
/*
snk.c
various SNK triple Z80 games
@ -45,7 +46,7 @@ Notes:
------
- How to enter test mode:
1984 jcross: n/a
1984 sgladiat: n/a
1984 sgladiat: keep F2 pressed during boot
1985 tnk3: keep 1 pressed during boot
1985 aso: keep 1 pressed during boot
1986 athena: keep 1 pressed during boot
@ -68,6 +69,8 @@ Notes:
- the original sgladiat pcb is verified to have huge sprite lag.
- RAM test fails in sgladiat when "Debug" Dip Switch is ON. Correct behaviour ?
- there are two versions of the Ikari Warriors board, one has the standard JAMMA
connector while the other has the custom SNK connector. The video and audio
PCBs are the same, only the CPU PCB changes.
@ -714,6 +717,42 @@ static CUSTOM_INPUT( countryc_trackball_y )
}
/************************************************************************/
static CUSTOM_INPUT( snk_older_bonus_r )
{
int bit_mask = (FPTR)param;
switch (bit_mask)
{
case 0x01:
return ((input_port_read(field->port->machine, "BONUS") & bit_mask) >> 0);
case 0xc0:
return ((input_port_read(field->port->machine, "BONUS") & bit_mask) >> 6);
default:
logerror("snk_older_bonus_r : invalid %02X bit_mask\n",bit_mask);
return 0;
}
}
#if 0
static CUSTOM_INPUT( snk_later_bonus_r )
{
int bit_mask = (FPTR)param;
switch (bit_mask)
{
case 0x04:
return ((input_port_read(field->port->machine, "BONUS") & bit_mask) >> 2);
case 0x30:
return ((input_port_read(field->port->machine, "BONUS") & bit_mask) >> 4);
default:
logerror("snk_later_bonus_r : invalid %02X bit_mask\n",bit_mask);
return 0;
}
}
#endif
/************************************************************************/
static ADDRESS_MAP_START( jcross_cpuA_map, ADDRESS_SPACE_PROGRAM, 8 )
@ -1202,6 +1241,89 @@ static INPUT_PORTS_START( jcross )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("IN1")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("IN2")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("DSW1")
PORT_DIPNAME( 0x03, 0x03, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("DSW1:1,2")
PORT_DIPSETTING( 0x03, "Upright, Single Controls" )
// PORT_DIPSETTING( 0x01, "Upright, Single Controls" ) /* duplicated setting + unknown additional stuff (code at 0x03ff) */
PORT_DIPSETTING( 0x00, "Upright, Dual Controls" )
PORT_DIPSETTING( 0x02, DEF_STR( Cocktail ) )
PORT_DIPNAME( 0x04, 0x04, DEF_STR( Lives ) ) PORT_DIPLOCATION("DSW1:3")
PORT_DIPSETTING( 0x04, "3" )
PORT_DIPSETTING( 0x00, "5" )
PORT_DIPNAME( 0x38, 0x38, DEF_STR( Coinage ) ) PORT_DIPLOCATION("DSW1:4,5,6")
PORT_DIPSETTING( 0x28, DEF_STR( 3C_1C ) )
PORT_DIPSETTING( 0x30, DEF_STR( 2C_1C ) )
PORT_DIPSETTING( 0x38, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x18, DEF_STR( 1C_2C ) )
PORT_DIPSETTING( 0x20, DEF_STR( 1C_3C ) )
PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) )
// PORT_DIPSETTING( 0x10, "INVALID !" ) /* settings table at 0x0378 is only 5 bytes wide */
// PORT_DIPSETTING( 0x08, "INVALID !" ) /* settings table at 0x0378 is only 5 bytes wide */
PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(snk_older_bonus_r, (void *)0xc0)
PORT_START("DSW2")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(snk_older_bonus_r, (void *)0x01)
PORT_DIPNAME( 0x06, 0x06, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("DSW2:2,3")
PORT_DIPSETTING( 0x06, DEF_STR( Easy ) )
PORT_DIPSETTING( 0x04, DEF_STR( Normal ) )
PORT_DIPSETTING( 0x02, DEF_STR( Hard ) )
PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) )
PORT_DIPNAME( 0x18, 0x10, "Game mode" ) PORT_DIPLOCATION("DSW2:4,5")
PORT_DIPSETTING( 0x18, "Demo Sounds Off" )
PORT_DIPSETTING( 0x10, "Demo Sounds On" )
PORT_DIPSETTING( 0x00, "Freeze" )
PORT_DIPSETTING( 0x08, "Infinite Lives (Cheat)" )
PORT_DIPNAME( 0x20, 0x20, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("DSW2:6")
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPUNUSED_DIPLOC( 0x40, 0x40, "DSW2:7" )
PORT_DIPNAME( 0x80, 0x80, "Debug Mode (No BG Collision)" ) PORT_DIPLOCATION("DSW2:8")
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("BONUS") /* fake port to handle bonus lives settings via multiple input ports */
PORT_DIPNAME( 0xc1, 0xc1, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("DSW2:1,DSW1:7,8")
PORT_DIPSETTING( 0xc1, "20k 60k 40k+" )
PORT_DIPSETTING( 0x81, "40k 120k 80k+" )
PORT_DIPSETTING( 0x41, "60k 160k 100k+" )
PORT_DIPSETTING( 0xc0, "20k" )
PORT_DIPSETTING( 0x80, "40k" )
PORT_DIPSETTING( 0x40, "60k" )
// PORT_DIPSETTING( 0x01, DEF_STR( None ) ) /* duplicated setting */
PORT_DIPSETTING( 0x00, DEF_STR( None ) )
INPUT_PORTS_END
static INPUT_PORTS_START( sgladiat )
PORT_START("IN0")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(snk_sound_busy, 0)
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE ) /* code at 0x054e */
PORT_START("IN1")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY
@ -1224,118 +1346,30 @@ static INPUT_PORTS_START( jcross )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("DSW1")
PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW1:1")
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x02, 0x02, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("DSW1:2")
PORT_DIPSETTING( 0x02, DEF_STR( Upright ) )
PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) )
PORT_DIPNAME( 0x04, 0x04, DEF_STR( Lives ) ) PORT_DIPLOCATION("DSW1:3")
PORT_DIPSETTING( 0x04, "3" )
PORT_DIPSETTING( 0x00, "5" )
PORT_DIPNAME( 0x38, 0x38, DEF_STR( Coinage ) ) PORT_DIPLOCATION("DSW1:4,5,6")
/* PORT_DIPSETTING( 0x10, ) ???? 'insert more coin'*/
PORT_DIPSETTING( 0x28, DEF_STR( 3C_1C ) )
PORT_DIPSETTING( 0x30, DEF_STR( 2C_1C ) )
PORT_DIPSETTING( 0x38, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x18, DEF_STR( 1C_2C ) )
PORT_DIPSETTING( 0x20, DEF_STR( 1C_3C ) )
PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) )
PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("DSW1:7,8")
PORT_DIPSETTING( 0xc0, "20000 60000" )
PORT_DIPSETTING( 0x80, "40000 90000" )
PORT_DIPSETTING( 0x40, "50000 120000" )
PORT_DIPSETTING( 0x00, DEF_STR( None ) )
PORT_START("DSW2")
PORT_DIPNAME( 0x01, 0x00, "Bonus Life Occurence?" ) PORT_DIPLOCATION("DSW2:1") /* not verified */
PORT_DIPSETTING( 0x01, "1st, 2nd, then every 2nd?" )
PORT_DIPSETTING( 0x00, "1st and 2nd only?" )
PORT_DIPNAME( 0x06, 0x04, "Scrolling Speed" ) PORT_DIPLOCATION("DSW2:2,3")
PORT_DIPSETTING( 0x06, "Slow" )
PORT_DIPSETTING( 0x04, DEF_STR( Normal ) )
PORT_DIPSETTING( 0x02, "Fast" )
PORT_DIPSETTING( 0x00, "Fastest" )
PORT_DIPNAME( 0x18, 0x10, "Game mode" ) PORT_DIPLOCATION("DSW2:4,5")
PORT_DIPSETTING( 0x18, "Demo Sounds Off" )
PORT_DIPSETTING( 0x10, "Demo Sounds On" )
PORT_DIPSETTING( 0x08, "Infinite Lives (Cheat)" )
PORT_DIPSETTING( 0x00, "Freeze" )
PORT_DIPNAME( 0x20, 0x20, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("DSW2:6")
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x40, 0x40, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("DSW2:7")
PORT_DIPSETTING( 0x40, DEF_STR( Easy ) )
PORT_DIPSETTING( 0x00, DEF_STR( Hard ) )
PORT_DIPNAME( 0x80, 0x80, "Disable BG Collisions (Cheat)" ) PORT_DIPLOCATION("DSW2:8")
PORT_DIPSETTING( 0x80, DEF_STR( No ) )
PORT_DIPSETTING( 0x00, DEF_STR( Yes ) )
INPUT_PORTS_END
static INPUT_PORTS_START( sgladiat )
PORT_START("IN0")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(snk_sound_busy, 0)
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("IN1")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("IN2")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_COCKTAIL
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_COCKTAIL
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_COCKTAIL
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_COCKTAIL
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("DSW1")
PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW1:1")
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPUNUSED_DIPLOC( 0x01, 0x01, "DSW1:1" )
PORT_DIPNAME( 0x02, 0x00, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("DSW1:2")
PORT_DIPSETTING( 0x00, DEF_STR( Upright ) )
PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) /* Single Controls */
PORT_DIPSETTING( 0x02, DEF_STR( Cocktail ) )
PORT_DIPNAME( 0x04, 0x04, DEF_STR( Lives ) ) PORT_DIPLOCATION("DSW1:3")
PORT_DIPSETTING( 0x04, "3" )
PORT_DIPSETTING( 0x00, "5" )
PORT_DIPNAME( 0x38, 0x38, DEF_STR( Coinage ) ) PORT_DIPLOCATION("DSW1:4,5,6")
PORT_DIPSETTING( 0x10, DEF_STR( 5C_1C ) )
// PORT_DIPSETTING( 0x08, DEF_STR( 5C_1C ) ) /* duplicated setting */
PORT_DIPSETTING( 0x20, DEF_STR( 3C_1C ) )
PORT_DIPSETTING( 0x18, DEF_STR( 2C_1C ) )
PORT_DIPSETTING( 0x38, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x30, DEF_STR( 1C_2C ) )
PORT_DIPSETTING( 0x28, DEF_STR( 1C_3C ) )
PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) )
PORT_DIPNAME( 0xc0, 0xc0, "Bonus_Life?" ) PORT_DIPLOCATION("DSW1:7,8")
PORT_DIPSETTING( 0xc0, "20k 60k?" )
PORT_DIPSETTING( 0x80, "40k 90k?" )
PORT_DIPSETTING( 0x40, "50k 120k?" )
PORT_DIPSETTING( 0x00, "None?" )
PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(snk_older_bonus_r, (void *)0xc0)
PORT_START("DSW2")
PORT_DIPNAME( 0x01, 0x01, "Bonus Occurrence?" ) PORT_DIPLOCATION("DSW2:1")
PORT_DIPSETTING( 0x01, "1st & every 2nd?" )
PORT_DIPSETTING( 0x00, "1st & 2nd only?" )
PORT_DIPNAME( 0x06, 0x06, "Difficulty?" ) PORT_DIPLOCATION("DSW2:2,3")
PORT_DIPSETTING( 0x06, "Easy?" )
PORT_DIPSETTING( 0x04, "Normal?" )
PORT_DIPSETTING( 0x02, "Hard?" )
PORT_DIPSETTING( 0x00, "Hardest?" )
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(snk_older_bonus_r, (void *)0x01)
PORT_DIPNAME( 0x02, 0x02, "Time" ) PORT_DIPLOCATION("DSW2:2")
PORT_DIPSETTING( 0x02, "More" ) /* Hazard race 2:30 / Chariot race 3:30 */
PORT_DIPSETTING( 0x00, "Less" ) /* Hazard race 2:00 / Chariot race 3:00 */
PORT_DIPUNUSED_DIPLOC( 0x04, 0x04, "DSW2:3" )
PORT_DIPNAME( 0x18, 0x10, "Game Mode" ) PORT_DIPLOCATION("DSW2:4,5")
PORT_DIPSETTING( 0x18, "Demo Sounds Off" )
PORT_DIPSETTING( 0x10, "Demo Sounds On" )
@ -1344,12 +1378,23 @@ static INPUT_PORTS_START( sgladiat )
PORT_DIPNAME( 0x20, 0x20, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("DSW2:6")
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW2:7")
PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW2:7") /* code at 0x4169 */
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x80, 0x80, "Debug Mode (No Adversaries)" ) PORT_DIPLOCATION("DSW2:8")
PORT_DIPNAME( 0x80, 0x80, "Debug Mode (No Opponents)" ) PORT_DIPLOCATION("DSW2:8")
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("BONUS") /* fake port to handle bonus lives settings via multiple input ports */
PORT_DIPNAME( 0xc1, 0xc1, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("DSW2:1,DSW1:7,8")
PORT_DIPSETTING( 0xc1, "20k 60k 60k+" )
PORT_DIPSETTING( 0x81, "40k 90k 90k+" )
PORT_DIPSETTING( 0x41, "50k 120k 120k+" )
PORT_DIPSETTING( 0xc0, "20k" )
PORT_DIPSETTING( 0x80, "40k" )
PORT_DIPSETTING( 0x40, "50k" )
// PORT_DIPSETTING( 0x01, DEF_STR( None ) ) /* duplicated setting */
PORT_DIPSETTING( 0x00, DEF_STR( None ) )
INPUT_PORTS_END