diff options
Diffstat (limited to 'src/mame/drivers/mainsnk.c')
-rw-r--r-- | src/mame/drivers/mainsnk.c | 36 |
1 files changed, 19 insertions, 17 deletions
diff --git a/src/mame/drivers/mainsnk.c b/src/mame/drivers/mainsnk.c index 7903f7cba22..9bed8289cbe 100644 --- a/src/mame/drivers/mainsnk.c +++ b/src/mame/drivers/mainsnk.c @@ -114,7 +114,7 @@ static READ8_HANDLER( sound_ack_r ) static READ8_HANDLER( mainsnk_port_0_r ) { - int result = input_port_read_indexed( machine, 0 ); + int result = input_port_read( machine, "IN0"); if( !sound_cpu_ready ) result |= 0x20; return result; } @@ -122,11 +122,11 @@ static READ8_HANDLER( mainsnk_port_0_r ) static ADDRESS_MAP_START( main_map, ADDRESS_SPACE_PROGRAM, 8 ) AM_RANGE(0x0000, 0xbfff) AM_ROM AM_RANGE(0xc000, 0xc000) AM_READ(mainsnk_port_0_r) - AM_RANGE(0xc100, 0xc100) AM_READ(input_port_1_r) - AM_RANGE(0xc200, 0xc200) AM_READ(input_port_2_r) - AM_RANGE(0xc300, 0xc300) AM_READ(input_port_3_r) - AM_RANGE(0xc400, 0xc400) AM_READ(input_port_5_r) - AM_RANGE(0xc500, 0xc500) AM_READ(input_port_4_r) + AM_RANGE(0xc100, 0xc100) AM_READ_PORT("IN1") + AM_RANGE(0xc200, 0xc200) AM_READ_PORT("IN2") + AM_RANGE(0xc300, 0xc300) AM_READ_PORT("IN3") + AM_RANGE(0xc400, 0xc400) AM_READ_PORT("IN5") + AM_RANGE(0xc500, 0xc500) AM_READ_PORT("IN4") AM_RANGE(0xc600, 0xc600) AM_WRITE(mainsnk_c600_w) AM_RANGE(0xc700, 0xc700) AM_WRITE(sound_command_w) AM_RANGE(0xd800, 0xdbff) AM_RAM_WRITE(mainsnk_bgram_w) AM_BASE(&mainsnk_bgram) @@ -154,7 +154,7 @@ static ADDRESS_MAP_START( sound_portmap, ADDRESS_SPACE_IO, 8 ) ADDRESS_MAP_END static INPUT_PORTS_START( mainsnk ) - PORT_START + PORT_START_TAG("IN0") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 ) PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_COIN3 ) @@ -163,22 +163,22 @@ static INPUT_PORTS_START( mainsnk ) PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* sound CPU status */ PORT_SERVICE( 0x80, IP_ACTIVE_LOW ) - PORT_START + PORT_START_TAG("IN1") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) - PORT_START + PORT_START_TAG("IN2") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(2) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2) PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2) - PORT_START + PORT_START_TAG("IN3") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) /* ?? */ - PORT_START + PORT_START_TAG("IN4") PORT_DIPNAME( 0x07, 0x07, DEF_STR( Coinage ) ) PORT_DIPSETTING( 0x01, DEF_STR( 3C_1C ) ) /* also 02,04 */ PORT_DIPSETTING( 0x06, DEF_STR( 2C_1C ) ) @@ -200,10 +200,12 @@ static INPUT_PORTS_START( mainsnk ) PORT_DIPNAME( 0x80, 0x00, "SW 2-7" ) PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + + PORT_START_TAG("IN5") INPUT_PORTS_END static INPUT_PORTS_START( canvas ) - PORT_START + PORT_START_TAG("IN0") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 ) PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_COIN3 ) @@ -212,7 +214,7 @@ static INPUT_PORTS_START( canvas ) PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* sound CPU status? or vbl? */ PORT_SERVICE( 0x80, IP_ACTIVE_LOW ) - PORT_START + PORT_START_TAG("IN1") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) @@ -226,7 +228,7 @@ static INPUT_PORTS_START( canvas ) PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_START /* 8bit */ + PORT_START_TAG("IN2") /* 8bit */ PORT_DIPNAME( 0x01, 0x01, "2" ) PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) @@ -252,7 +254,7 @@ static INPUT_PORTS_START( canvas ) PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_START /* 8bit */ + PORT_START_TAG("IN3") /* 8bit */ PORT_DIPNAME( 0x01, 0x01, "3" ) PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) @@ -278,7 +280,7 @@ static INPUT_PORTS_START( canvas ) PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_START /* 8bit */ + PORT_START_TAG("IN4") /* 8bit */ PORT_DIPNAME( 0x01, 0x01, "4" ) PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) @@ -304,7 +306,7 @@ static INPUT_PORTS_START( canvas ) PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_START /* 8bit */ + PORT_START_TAG("IN5") /* 8bit */ PORT_DIPNAME( 0x01, 0x01, "5" ) PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |