From c747da873611fd90d4a58d3dc5045fbfd86abb93 Mon Sep 17 00:00:00 2001 From: hap Date: Sat, 27 Aug 2022 13:13:04 +0200 Subject: redclash: remove duplicate input ports --- src/mame/universal/redclash.cpp | 36 +++--------------------------------- 1 file changed, 3 insertions(+), 33 deletions(-) diff --git a/src/mame/universal/redclash.cpp b/src/mame/universal/redclash.cpp index 81752ffdc70..d59e7cf45f6 100644 --- a/src/mame/universal/redclash.cpp +++ b/src/mame/universal/redclash.cpp @@ -218,30 +218,9 @@ static INPUT_PORTS_START( redclash ) INPUT_PORTS_END static INPUT_PORTS_START( zerohour ) - PORT_START("IN0") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START1 ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START2 ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_INCLUDE( redclash ) - PORT_START("IN1") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) 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_RIGHT ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) - /* Note that there are TWO VBlank inputs, one is active low, the other active */ - /* high. There are probably other differences in the hardware, but emulating */ - /* them this way is enough to get the game running. */ - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") - PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") - - PORT_START("DSW1") + PORT_MODIFY("DSW1") PORT_DIPUNUSED_DIPLOC( 0x01, 0x01, "SW1:8" ) /* Switches 6-8 are not used */ PORT_DIPUNUSED_DIPLOC( 0x02, 0x02, "SW1:7" ) PORT_DIPUNUSED_DIPLOC( 0x04, 0x04, "SW1:6" ) @@ -259,7 +238,7 @@ static INPUT_PORTS_START( zerohour ) PORT_DIPSETTING( 0x80, "4" ) PORT_DIPSETTING( 0x40, "5" ) - PORT_START("DSW2") + PORT_MODIFY("DSW2") PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW2:4,3,2,1") PORT_DIPSETTING( 0x06, DEF_STR( 4C_1C ) ) PORT_DIPSETTING( 0x08, DEF_STR( 3C_1C ) ) @@ -282,15 +261,6 @@ static INPUT_PORTS_START( zerohour ) PORT_DIPSETTING( 0xd0, DEF_STR( 1C_3C ) ) PORT_DIPSETTING( 0xc0, DEF_STR( 1C_4C ) ) PORT_DIPSETTING( 0xb0, DEF_STR( 1C_5C ) ) - - PORT_START("FAKE") - /* The coin slots are not memory mapped. Coin Left causes a NMI, */ - /* Coin Right an IRQ. This fake input port is used by the interrupt */ - /* handler to be notified of coin insertions. We use IMPULSE to */ - /* trigger exactly one interrupt, without having to check when the */ - /* user releases the key. */ - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_IMPULSE(1) PORT_CHANGED_MEMBER(DEVICE_SELF, redclash_state, left_coin_inserted, 0) - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 ) PORT_IMPULSE(1) PORT_CHANGED_MEMBER(DEVICE_SELF, redclash_state, right_coin_inserted, 0) INPUT_PORTS_END static const gfx_layout charlayout = -- cgit v1.2.3