summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/namcos22.cpp
diff options
context:
space:
mode:
author AJR <ajrhacker@users.noreply.github.com>2019-09-14 15:27:30 -0400
committer AJR <ajrhacker@users.noreply.github.com>2019-09-14 15:37:04 -0400
commit6fab7692981d7956fe400995e4774c9d007b215f (patch)
tree33db51072448e42875ab5874549ca538a9add521 /src/mame/drivers/namcos22.cpp
parent2f39181ac1e093b42a6ff17b49013cfadb02e7a9 (diff)
PORT_CUSTOM simplification (nw)
- Remove both arguments from CUSTOM_INPUT_MEMBER (adding template parameters as necessary) - Remove 'param' from PORT_CUSTOM_MEMBER and assume 'device' is DEVICE_SELF (use PORT_CUSTOM_DEVICE_MEMBER if it isn't) - Replace PORT_CUSTOM_MEMBER with PORT_READ_LINE_MEMBER where applicable Add implicit DEVICE_SELF variants of PORT_READ_LINE_DEVICE_MEMBER and PORT_WRITE_LINE_DEVICE_MEMBER (nw) Remove ioport_field argument from PORT_CROSSHAIR_MAPPER (nw) captflag, gmgalax: Separate driver classes from base (nw)
Diffstat (limited to 'src/mame/drivers/namcos22.cpp')
-rw-r--r--src/mame/drivers/namcos22.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/mame/drivers/namcos22.cpp b/src/mame/drivers/namcos22.cpp
index 8ad1f1d5f50..23e472cadd2 100644
--- a/src/mame/drivers/namcos22.cpp
+++ b/src/mame/drivers/namcos22.cpp
@@ -3335,9 +3335,10 @@ INPUT_PORTS_END
/*********************************************************************************************/
-CUSTOM_INPUT_MEMBER(namcos22s_state::alpine_motor_read)
+template <int N>
+READ_LINE_MEMBER(namcos22s_state::alpine_motor_r)
{
- return m_motor_status >> (uintptr_t)param & 1;
+ return BIT(m_motor_status, N);
}
static INPUT_PORTS_START( alpiner )
@@ -3349,8 +3350,8 @@ static INPUT_PORTS_START( alpiner )
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_START1 ) // Decision / View Change
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_16WAY // L Selection
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT) PORT_16WAY // R Selection
- PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, namcos22s_state, alpine_motor_read, 0) // steps are free
- PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, namcos22s_state, alpine_motor_read, 1) // steps are locked
+ PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(namcos22s_state, alpine_motor_r<0>) // steps are free
+ PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(namcos22s_state, alpine_motor_r<1>) // steps are locked
PORT_BIT( 0xfe00, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("ADC.0")