Fixed dip-switches in Street Fight driver [Angelo Salese]

This commit is contained in:
Angelo Salese 2013-07-20 17:55:45 +00:00
parent 8b57529eb9
commit 255430c2d9
3 changed files with 47 additions and 55 deletions

View File

@ -245,7 +245,8 @@ static ADDRESS_MAP_START( cpu1_map, AS_PROGRAM, 8, stfight_state )
AM_RANGE(0xc200, 0xc200) AM_READ_PORT("P1") /* IN1 */
AM_RANGE(0xc201, 0xc201) AM_READ_PORT("P2") /* IN2 */
AM_RANGE(0xc202, 0xc202) AM_READ_PORT("START") /* IN3 */
AM_RANGE(0xc203, 0xc204) AM_READ(stfight_dsw_r) /* DS0,1 */
AM_RANGE(0xc203, 0xc203) AM_READ_PORT("DSW0")
AM_RANGE(0xc204, 0xc204) AM_READ_PORT("DSW1")
AM_RANGE(0xc205, 0xc205) AM_READ(stfight_coin_r) /* coin mech */
AM_RANGE(0xc500, 0xc500) AM_WRITE(stfight_fm_w) /* play fm sound */
AM_RANGE(0xc600, 0xc600) AM_WRITE(stfight_adpcm_control_w) /* voice control */
@ -262,8 +263,6 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( cshooter_cpu1_map, AS_PROGRAM, 8, stfight_state )
/* wants 0xff at PC=0x9a otherwise it won't boot, MCU related? */
AM_RANGE(0x0007, 0x0007) AM_READ(cshooter_mcu_unk1_r)
AM_RANGE(0xc203, 0xc203) AM_READ_PORT("DSW1")
AM_RANGE(0xc204, 0xc204) AM_READ_PORT("DSW0")
AM_RANGE(0xc801, 0xc801) AM_WRITE(stfight_bank_w)
AM_RANGE(0xd000, 0xd7ff) AM_RAM_WRITE(cshooter_text_w) AM_SHARE("tx_vram")
AM_RANGE(0xe000, 0xfdff) AM_RAM
@ -320,50 +319,50 @@ static INPUT_PORTS_START( stfight )
PORT_BIT( 0xe7, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("DSW0") /* DSW0 */
PORT_DIPNAME( 0x07, 0x00, DEF_STR( Coin_A ) )
PORT_DIPSETTING( 0x07, DEF_STR( 5C_1C ) )
PORT_DIPSETTING( 0x03, DEF_STR( 4C_1C ) )
PORT_DIPSETTING( 0x05, DEF_STR( 3C_1C ) )
PORT_DIPSETTING( 0x01, DEF_STR( 2C_1C ) )
PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x04, DEF_STR( 1C_2C ) )
PORT_DIPSETTING( 0x02, DEF_STR( 1C_3C ) )
PORT_DIPSETTING( 0x06, DEF_STR( 1C_5C ) )
PORT_DIPNAME( 0x18, 0x00, DEF_STR( Coin_B ) )
PORT_DIPSETTING( 0x08, DEF_STR( 2C_1C ) )
PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x18, DEF_STR( 2C_3C ) )
PORT_DIPSETTING( 0x10, DEF_STR( 1C_2C ) )
PORT_SERVICE( 0x20, IP_ACTIVE_HIGH )
PORT_DIPNAME( 0x40, 0x40, DEF_STR( Allow_Continue ) )
PORT_DIPSETTING( 0x00, DEF_STR( No ) )
PORT_DIPSETTING( 0x40, DEF_STR( Yes ) )
PORT_DIPNAME( 0x80, 0x80, "Bullet Colour" )
PORT_DIPSETTING( 0x80, "Red" )
PORT_DIPSETTING( 0x00, "Blue" )
PORT_DIPNAME( 0x07, 0x07, DEF_STR( Coin_A ) )
PORT_DIPSETTING( 0x00, DEF_STR( 5C_1C ) )
PORT_DIPSETTING( 0x04, DEF_STR( 4C_1C ) )
PORT_DIPSETTING( 0x02, DEF_STR( 3C_1C ) )
PORT_DIPSETTING( 0x06, DEF_STR( 2C_1C ) )
PORT_DIPSETTING( 0x07, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x03, DEF_STR( 1C_2C ) )
PORT_DIPSETTING( 0x05, DEF_STR( 1C_3C ) )
PORT_DIPSETTING( 0x01, DEF_STR( 1C_5C ) )
PORT_DIPNAME( 0x18, 0x18, DEF_STR( Coin_B ) )
PORT_DIPSETTING( 0x10, DEF_STR( 2C_1C ) )
PORT_DIPSETTING( 0x18, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x00, DEF_STR( 2C_3C ) )
PORT_DIPSETTING( 0x08, DEF_STR( 1C_2C ) )
PORT_SERVICE( 0x20, IP_ACTIVE_LOW )
PORT_DIPNAME( 0x40, 0x00, DEF_STR( Allow_Continue ) )
PORT_DIPSETTING( 0x40, DEF_STR( No ) )
PORT_DIPSETTING( 0x00, DEF_STR( Yes ) )
PORT_DIPNAME( 0x80, 0x00, "Bullet Colour" )
PORT_DIPSETTING( 0x00, "Red" )
PORT_DIPSETTING( 0x80, "Blue" )
PORT_START("DSW1") /* DSW1 */
PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) )
PORT_DIPSETTING( 0x00, DEF_STR( Upright ) )
PORT_DIPSETTING( 0x01, DEF_STR( Cocktail ) )
PORT_DIPNAME( 0x06, 0x02, DEF_STR( Difficulty ) )
PORT_DIPSETTING( 0x00, DEF_STR( Easy ) )
PORT_DIPSETTING( 0x02, DEF_STR( Normal ) )
PORT_DIPSETTING( 0x04, DEF_STR( Hard ) )
PORT_DIPSETTING( 0x06, DEF_STR( Hardest ) )
PORT_DIPNAME( 0x18, 0x10, DEF_STR( Lives ) )
PORT_DIPSETTING( 0x00, "1" )
PORT_DIPSETTING( 0x08, "2" )
PORT_DIPSETTING( 0x10, "3" )
PORT_DIPSETTING( 0x18, "4" )
PORT_DIPNAME( 0x60, 0x20, DEF_STR( Bonus_Life ) )
PORT_DIPSETTING( 0x00, "10000 30000" )
PORT_DIPSETTING( 0x20, "20000 40000" )
PORT_DIPSETTING( 0x40, "30000 60000" )
PORT_DIPSETTING( 0x60, "40000 80000" )
PORT_DIPNAME( 0x80, 0x80, DEF_STR( Demo_Sounds ) )
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x80, DEF_STR( On ) )
PORT_DIPNAME( 0x01, 0x01, DEF_STR( Cabinet ) )
PORT_DIPSETTING( 0x01, DEF_STR( Upright ) )
PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) )
PORT_DIPNAME( 0x06, 0x04, DEF_STR( Difficulty ) )
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, 0x08, DEF_STR( Lives ) )
PORT_DIPSETTING( 0x18, "1" )
PORT_DIPSETTING( 0x10, "2" )
PORT_DIPSETTING( 0x08, "3" )
PORT_DIPSETTING( 0x00, "4" )
PORT_DIPNAME( 0x60, 0x40, DEF_STR( Bonus_Life ) )
PORT_DIPSETTING( 0x60, "10000 30000" )
PORT_DIPSETTING( 0x40, "20000 40000" )
PORT_DIPSETTING( 0x20, "30000 60000" )
PORT_DIPSETTING( 0x00, "40000 80000" )
PORT_DIPNAME( 0x80, 0x00, DEF_STR( Demo_Sounds ) )
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("COIN") /* COIN MECH */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(1)
@ -372,7 +371,7 @@ INPUT_PORTS_END
static INPUT_PORTS_START( cshooter )
PORT_INCLUDE(stfight)
PORT_MODIFY("DSW1") /* DSW2 (0xc203) */
PORT_MODIFY("DSW0") /* DSW2 (0xc203) */
PORT_DIPNAME( 0x03, 0x03, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW2:1,2")
PORT_DIPSETTING( 0x03, DEF_STR( Easy ) )
PORT_DIPSETTING( 0x02, DEF_STR( Medium ) )
@ -391,7 +390,7 @@ static INPUT_PORTS_START( cshooter )
PORT_DIPUNUSED_DIPLOC( 0x40, 0x40, "SW2:7" )
PORT_DIPUNUSED_DIPLOC( 0x80, 0x80, "SW2:8" )
PORT_MODIFY("DSW0") /* DSW1 (0xc204) */
PORT_MODIFY("DSW1") /* DSW1 (0xc204) */
PORT_DIPNAME( 0x01, 0x01, "Coin Slots" ) PORT_DIPLOCATION("SW1:1")
PORT_DIPSETTING( 0x01, "1" )
PORT_DIPSETTING( 0x00, "2" )

View File

@ -39,7 +39,6 @@ public:
tilemap_t *m_bg_tilemap;
tilemap_t *m_tx_tilemap;
int m_sprite_base;
DECLARE_READ8_MEMBER(stfight_dsw_r);
DECLARE_READ8_MEMBER(stfight_coin_r);
DECLARE_WRITE8_MEMBER(stfight_coin_w);
DECLARE_WRITE8_MEMBER(stfight_e800_w);
@ -75,7 +74,7 @@ public:
DECLARE_WRITE_LINE_MEMBER(stfight_adpcm_int);
/*
Cross Shooter MCU specifics
MCU specifics
*/
DECLARE_READ8_MEMBER(cshooter_68705_port_a_r);

View File

@ -150,12 +150,6 @@ INTERRUPT_GEN_MEMBER(stfight_state::stfight_vb_interrupt)
* Hardware handlers
*/
// Perhaps define dipswitches as active low?
READ8_MEMBER(stfight_state::stfight_dsw_r)
{
return( ~ioport(offset ? "DSW1" : "DSW0")->read() );
}
READ8_MEMBER(stfight_state::stfight_coin_r)
{
int coin_mech_data;