summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/cop01.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/cop01.cpp')
-rw-r--r--src/mame/drivers/cop01.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mame/drivers/cop01.cpp b/src/mame/drivers/cop01.cpp
index 06a8329f43a..23b78715bdd 100644
--- a/src/mame/drivers/cop01.cpp
+++ b/src/mame/drivers/cop01.cpp
@@ -102,10 +102,10 @@ READ8_MEMBER(cop01_state::cop01_sound_command_r)
}
-CUSTOM_INPUT_MEMBER(cop01_state::mightguy_area_r)
+template <int Mask>
+READ_LINE_MEMBER(cop01_state::mightguy_area_r)
{
- int bit_mask = (uintptr_t)param;
- return (ioport("FAKE")->read() & bit_mask) ? 0x01 : 0x00;
+ return (ioport("FAKE")->read() & Mask) ? 1 : 0;
}
WRITE8_MEMBER(cop01_state::cop01_irq_ack_w)
@@ -329,7 +329,7 @@ static INPUT_PORTS_START( mightguy )
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_SERVICE( 0x40, IP_ACTIVE_LOW )
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, cop01_state,mightguy_area_r, (void *)0x04) // "Start Area" - see fake Dip Switch
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(cop01_state, mightguy_area_r<0x04>) // "Start Area" - see fake Dip Switch
PORT_START("DSW2")
PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coin_A ) )
@@ -347,8 +347,8 @@ static INPUT_PORTS_START( mightguy )
PORT_DIPSETTING( 0x20, DEF_STR( Normal ) )
PORT_DIPSETTING( 0x10, DEF_STR( Hard ) )
PORT_DIPSETTING( 0x00, "Invincibility")
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, cop01_state,mightguy_area_r, (void *)0x01) // "Start Area" - see fake Dip Switch
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, cop01_state,mightguy_area_r, (void *)0x02) // "Start Area" - see fake Dip Switch
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(cop01_state, mightguy_area_r<0x01>) // "Start Area" - see fake Dip Switch
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(cop01_state, mightguy_area_r<0x02>) // "Start Area" - see fake Dip Switch
PORT_START("FAKE") /* FAKE Dip Switch */
PORT_DIPNAME( 0x07, 0x07, "Starting Area" )