diff options
author | Aaron Giles <aaron@aarongiles.com> | 2008-08-28 08:53:17 +0000 |
---|---|---|
committer | Aaron Giles <aaron@aarongiles.com> | 2008-08-28 08:53:17 +0000 |
commit | b554d33448605bdae37423c39d8a6c4f7821fee2 (patch) | |
tree | 129bee1d1c755ce7433f93dba10b85a600f83e83 /src/mame/drivers/tsamurai.c | |
parent | f8f967838707a269a1302b378d7a92c4e580391c (diff) |
From: Fabio Priuli [mailto:doge.fabio@gmail.com]
Subject: few more patches
Hi,
enclosed please find a few patches:
TV_1.diff -> TV_4.diff: clean up of input ports for drivers starting with T,U,V
eeprom.diff: some remaining eeprom_bit_r made CUSTOM_PORT
stv_fix.diff: a small missing bit in my previous stv fix for bug 650. this patch assumes the previous has been applied and removes duplication of button 4 also from batmanfr (somehow I think I sent an outdated version of stv.diff previously)
That's all folks
Regards,
Fabio
Diffstat (limited to 'src/mame/drivers/tsamurai.c')
-rw-r--r-- | src/mame/drivers/tsamurai.c | 202 |
1 files changed, 92 insertions, 110 deletions
diff --git a/src/mame/drivers/tsamurai.c b/src/mame/drivers/tsamurai.c index aa69f83db7d..b41f1cb4716 100644 --- a/src/mame/drivers/tsamurai.c +++ b/src/mame/drivers/tsamurai.c @@ -145,11 +145,11 @@ static ADDRESS_MAP_START( readmem, ADDRESS_SPACE_PROGRAM, 8 ) AM_RANGE(0xe800, 0xefff) AM_READ(SMH_RAM) AM_RANGE(0xf000, 0xf3ff) AM_READ(SMH_RAM) - AM_RANGE(0xf800, 0xf800) AM_READ(input_port_0_r) - AM_RANGE(0xf801, 0xf801) AM_READ(input_port_1_r) - AM_RANGE(0xf802, 0xf802) AM_READ(input_port_2_r) - AM_RANGE(0xf804, 0xf804) AM_READ(input_port_3_r) - AM_RANGE(0xf805, 0xf805) AM_READ(input_port_4_r) + AM_RANGE(0xf800, 0xf800) AM_READ_PORT("P1") + AM_RANGE(0xf801, 0xf801) AM_READ_PORT("P2") + AM_RANGE(0xf802, 0xf802) AM_READ_PORT("SYSTEM") + AM_RANGE(0xf804, 0xf804) AM_READ_PORT("DSW1") + AM_RANGE(0xf805, 0xf805) AM_READ_PORT("DSW2") ADDRESS_MAP_END static ADDRESS_MAP_START( writemem, ADDRESS_SPACE_PROGRAM, 8 ) @@ -191,11 +191,11 @@ static ADDRESS_MAP_START( readmem_m660, ADDRESS_SPACE_PROGRAM, 8 ) AM_RANGE(0xe800, 0xefff) AM_READ(SMH_RAM) AM_RANGE(0xf000, 0xf3ff) AM_READ(SMH_RAM) - AM_RANGE(0xf800, 0xf800) AM_READ(input_port_0_r) - AM_RANGE(0xf801, 0xf801) AM_READ(input_port_1_r) - AM_RANGE(0xf802, 0xf802) AM_READ(input_port_2_r) - AM_RANGE(0xf804, 0xf804) AM_READ(input_port_3_r) - AM_RANGE(0xf805, 0xf805) AM_READ(input_port_4_r) + AM_RANGE(0xf800, 0xf800) AM_READ_PORT("P1") + AM_RANGE(0xf801, 0xf801) AM_READ_PORT("P2") + AM_RANGE(0xf802, 0xf802) AM_READ_PORT("SYSTEM") + AM_RANGE(0xf804, 0xf804) AM_READ_PORT("DSW1") + AM_RANGE(0xf805, 0xf805) AM_READ_PORT("DSW2") ADDRESS_MAP_END static ADDRESS_MAP_START( writemem_m660, ADDRESS_SPACE_PROGRAM, 8 ) @@ -395,11 +395,11 @@ static ADDRESS_MAP_START( readmem_vsgongf, ADDRESS_SPACE_PROGRAM, 8 ) AM_RANGE(0xa100, 0xa100) AM_READ(vsgongf_a100_r) /* protection */ AM_RANGE(0xc000, 0xc7ff) AM_READ(SMH_RAM) /* work ram */ AM_RANGE(0xe000, 0xe7ff) AM_READ(SMH_RAM) - AM_RANGE(0xf800, 0xf800) AM_READ(input_port_0_r) /* joy1 */ - AM_RANGE(0xf801, 0xf801) AM_READ(input_port_1_r) /* joy2 */ - AM_RANGE(0xf802, 0xf802) AM_READ(input_port_2_r) /* coin */ - AM_RANGE(0xf804, 0xf804) AM_READ(input_port_3_r) /* dsw1 */ - AM_RANGE(0xf805, 0xf805) AM_READ(input_port_4_r) /* dsw2 */ + AM_RANGE(0xf800, 0xf800) AM_READ_PORT("P1") + AM_RANGE(0xf801, 0xf801) AM_READ_PORT("P2") + AM_RANGE(0xf802, 0xf802) AM_READ_PORT("SYSTEM") + AM_RANGE(0xf804, 0xf804) AM_READ_PORT("DSW1") + AM_RANGE(0xf805, 0xf805) AM_READ_PORT("DSW2") AM_RANGE(0xfc00, 0xffff) AM_READ(SMH_RAM) ADDRESS_MAP_END @@ -437,72 +437,63 @@ ADDRESS_MAP_END /*******************************************************************************/ -#define TS_IN0\ - PORT_START("IN0")\ - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY\ - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_4WAY\ - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY\ - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_4WAY\ - PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 )\ - PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON2 )\ - PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN )\ +static INPUT_PORTS_START( tsamurai ) + PORT_START("P1") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_4WAY + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_4WAY + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON2 ) + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) -#define TS_IN1\ - PORT_START("IN1")\ - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_COCKTAIL\ - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_COCKTAIL\ - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY PORT_COCKTAIL\ - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_COCKTAIL\ - PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL\ - PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_COCKTAIL\ - PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN )\ + PORT_START("P2") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_COCKTAIL + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_COCKTAIL + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY PORT_COCKTAIL + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_COCKTAIL + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_COCKTAIL + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) -#define TS_IN2\ - PORT_START("IN2")\ - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 )\ - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 )\ - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SERVICE1 )\ - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED )\ - PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_START1 )\ - PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_START2 )\ - PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN )\ + PORT_START("SYSTEM") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 ) + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SERVICE1 ) + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED ) + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_START1 ) + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_START2 ) + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) -#define TS_DSW1\ - PORT_START("DSW1")\ - PORT_DIPNAME( 0x07, 0x00, DEF_STR( Coin_A ) )\ - PORT_DIPSETTING( 0x07, DEF_STR( 6C_1C ) )\ - PORT_DIPSETTING( 0x06, DEF_STR( 3C_1C ) )\ - PORT_DIPSETTING( 0x04, DEF_STR( 2C_1C ) )\ - PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) )\ - PORT_DIPSETTING( 0x05, DEF_STR( 2C_3C ) )\ - PORT_DIPSETTING( 0x01, DEF_STR( 1C_2C ) )\ - PORT_DIPSETTING( 0x02, DEF_STR( 1C_3C ) )\ - PORT_DIPSETTING( 0x03, DEF_STR( 1C_6C ) )\ - PORT_DIPNAME( 0x38, 0x00, DEF_STR( Coin_B ) )\ - PORT_DIPSETTING( 0x38, DEF_STR( 6C_1C ) )\ - PORT_DIPSETTING( 0x30, DEF_STR( 3C_1C ) )\ - PORT_DIPSETTING( 0x20, DEF_STR( 2C_1C ) )\ - PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) )\ - PORT_DIPSETTING( 0x28, DEF_STR( 2C_3C ) )\ - PORT_DIPSETTING( 0x08, DEF_STR( 1C_2C ) )\ - PORT_DIPSETTING( 0x10, DEF_STR( 1C_3C ) )\ - PORT_DIPSETTING( 0x18, DEF_STR( 1C_6C ) )\ - PORT_DIPNAME( 0x40, 0x00, "Freeze" )\ - PORT_DIPSETTING( 0x00, DEF_STR( Off ) )\ - PORT_DIPSETTING( 0x40, DEF_STR( On ) )\ - PORT_DIPNAME( 0x80, 0x00, DEF_STR( Cabinet ) )\ - PORT_DIPSETTING( 0x00, DEF_STR( Upright ) )\ + PORT_START("DSW1") + PORT_DIPNAME( 0x07, 0x00, DEF_STR( Coin_A ) ) + PORT_DIPSETTING( 0x07, DEF_STR( 6C_1C ) ) + PORT_DIPSETTING( 0x06, DEF_STR( 3C_1C ) ) + PORT_DIPSETTING( 0x04, DEF_STR( 2C_1C ) ) + PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) + PORT_DIPSETTING( 0x05, DEF_STR( 2C_3C ) ) + PORT_DIPSETTING( 0x01, DEF_STR( 1C_2C ) ) + PORT_DIPSETTING( 0x02, DEF_STR( 1C_3C ) ) + PORT_DIPSETTING( 0x03, DEF_STR( 1C_6C ) ) + PORT_DIPNAME( 0x38, 0x00, DEF_STR( Coin_B ) ) + PORT_DIPSETTING( 0x38, DEF_STR( 6C_1C ) ) + PORT_DIPSETTING( 0x30, DEF_STR( 3C_1C ) ) + PORT_DIPSETTING( 0x20, DEF_STR( 2C_1C ) ) + PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) + PORT_DIPSETTING( 0x28, DEF_STR( 2C_3C ) ) + PORT_DIPSETTING( 0x08, DEF_STR( 1C_2C ) ) + PORT_DIPSETTING( 0x10, DEF_STR( 1C_3C ) ) + PORT_DIPSETTING( 0x18, DEF_STR( 1C_6C ) ) + PORT_DIPNAME( 0x40, 0x00, "Freeze" ) + PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x40, DEF_STR( On ) ) + PORT_DIPNAME( 0x80, 0x00, DEF_STR( Cabinet ) ) + PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) PORT_DIPSETTING( 0x80, DEF_STR( Cocktail ) ) -static INPUT_PORTS_START( tsamurai ) -TS_IN0 -TS_IN1 -TS_IN2 -TS_DSW1 - PORT_START("DSW2") PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) ) PORT_DIPSETTING( 0x00, "3" ) @@ -528,12 +519,9 @@ TS_DSW1 INPUT_PORTS_END static INPUT_PORTS_START( nunchaku ) -TS_IN0 -TS_IN1 -TS_IN2 -TS_DSW1 + PORT_INCLUDE( tsamurai ) - PORT_START("DSW2") + PORT_MODIFY("DSW2") PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) ) PORT_DIPSETTING( 0x00, "3" ) PORT_DIPSETTING( 0x01, "5" ) @@ -558,12 +546,9 @@ TS_DSW1 INPUT_PORTS_END static INPUT_PORTS_START( vsgongf ) -TS_IN0 -TS_IN1 -TS_IN2 -TS_DSW1 + PORT_INCLUDE( tsamurai ) - PORT_START("DSW2") + PORT_MODIFY("DSW2") PORT_DIPNAME( 0x01, 0x00, DEF_STR( Unknown ) ) PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) PORT_DIPSETTING( 0x01, DEF_STR( On ) ) @@ -590,32 +575,30 @@ TS_DSW1 PORT_DIPSETTING( 0x80, DEF_STR( On ) ) INPUT_PORTS_END -#define YAMINS\ - PORT_START("IN0")\ - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY\ - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY\ - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY\ - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY\ - PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON2 )\ - PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON1 )\ - PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN )\ - PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )\ - PORT_START("IN1")\ - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL\ - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL\ - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL\ - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL\ - PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_COCKTAIL\ - PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL\ - PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN )\ +static INPUT_PORTS_START( yamagchi ) + PORT_INCLUDE( tsamurai ) + + PORT_MODIFY("P1") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON2 ) + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON1 ) + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) -static INPUT_PORTS_START( yamagchi ) - YAMINS - TS_IN2 - TS_DSW1 + PORT_MODIFY("P2") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_COCKTAIL + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - PORT_START("DSW2") + PORT_MODIFY("DSW2") PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) ) PORT_DIPSETTING( 0x00, "3" ) PORT_DIPSETTING( 0x01, "5" ) @@ -641,10 +624,9 @@ static INPUT_PORTS_START( yamagchi ) INPUT_PORTS_END static INPUT_PORTS_START( m660 ) - YAMINS - TS_IN2 + PORT_INCLUDE( yamagchi ) - PORT_START("DSW1") + PORT_MODIFY("DSW1") PORT_DIPNAME( 0x07, 0x00, DEF_STR( Coin_A ) ) PORT_DIPSETTING( 0x04, DEF_STR( 5C_1C ) ) PORT_DIPSETTING( 0x03, DEF_STR( 4C_1C ) ) @@ -670,7 +652,7 @@ static INPUT_PORTS_START( m660 ) PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) PORT_DIPSETTING( 0x80, DEF_STR( On ) ) - PORT_START("DSW2") + PORT_MODIFY("DSW2") PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) ) PORT_DIPSETTING( 0x00, "3" ) PORT_DIPSETTING( 0x01, "4" ) |