summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/scobra.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/scobra.cpp')
-rw-r--r--src/mame/drivers/scobra.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/mame/drivers/scobra.cpp b/src/mame/drivers/scobra.cpp
index dae7d2aa1e5..558ac585863 100644
--- a/src/mame/drivers/scobra.cpp
+++ b/src/mame/drivers/scobra.cpp
@@ -69,7 +69,7 @@ public:
void hustlerb(machine_config &config);
void rescuefe(machine_config &config);
- DECLARE_CUSTOM_INPUT_MEMBER(stratgyx_coinage_r);
+ template <int Mask> DECLARE_READ_LINE_MEMBER(stratgyx_coinage_r);
private:
DECLARE_READ8_MEMBER(scobra_soundram_r);
@@ -406,10 +406,10 @@ void scobra_state::hustlerb_sound_io_map(address_map &map)
/* stratgyx coinage DIPs are spread across two input ports */
-CUSTOM_INPUT_MEMBER(scobra_state::stratgyx_coinage_r)
+template <int Mask>
+READ_LINE_MEMBER(scobra_state::stratgyx_coinage_r)
{
- int bit_mask = (uintptr_t)param;
- return (ioport("IN4")->read() & bit_mask) ? 0x01 : 0x00;
+ return (ioport("IN4")->read() & Mask) ? 1 : 0;
}
@@ -439,8 +439,8 @@ static INPUT_PORTS_START( stratgyx )
PORT_START("IN2")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, scobra_state,stratgyx_coinage_r, (void *)0x01) /* lower 2 coinage DIPs */
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, scobra_state,stratgyx_coinage_r, (void *)0x02) /* lower 2 coinage DIPs */
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(scobra_state, stratgyx_coinage_r<0x01>) /* lower 2 coinage DIPs */
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(scobra_state, stratgyx_coinage_r<0x02>) /* lower 2 coinage DIPs */
PORT_DIPNAME( 0x08, 0x00, DEF_STR( Cabinet ) )
PORT_DIPSETTING( 0x00, DEF_STR( Upright ) )
PORT_DIPSETTING( 0x08, DEF_STR( Cocktail ) )
@@ -450,8 +450,8 @@ static INPUT_PORTS_START( stratgyx )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_COCKTAIL
PORT_START("IN3")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, scobra_state,stratgyx_coinage_r, (void *)0x04) /* upper 2 coinage DIPs */
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, scobra_state,stratgyx_coinage_r, (void *)0x08) /* upper 2 coinage DIPs */
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(scobra_state, stratgyx_coinage_r<0x04>) /* upper 2 coinage DIPs */
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(scobra_state, stratgyx_coinage_r<0x08>) /* upper 2 coinage DIPs */
PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) /* none of these appear to be used */
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
@@ -510,7 +510,7 @@ static INPUT_PORTS_START( darkplnt )
PORT_DIPNAME( 0x02, 0x00, DEF_STR( Lives ) )
PORT_DIPSETTING( 0x00, "3" )
PORT_DIPSETTING( 0x02, "5" )
- PORT_BIT( 0xfc, 0x00, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF,scobra_state, darkplnt_custom_r, "DIAL") /* scrambled dial */
+ PORT_BIT( 0xfc, 0x00, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(scobra_state, darkplnt_dial_r) // scrambled dial
PORT_START("IN2")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )