summaryrefslogtreecommitdiffstats
path: root/src/mame/drivers/wolfpack.cpp
diff options
context:
space:
mode:
authorGravatarGravatar AJR <ajrhacker@users.noreply.github.com>2019-09-14 15:27:30 -0400
committerGravatarGravatar AJR <ajrhacker@users.noreply.github.com>2019-09-14 15:37:04 -0400
commit6fab7692981d7956fe400995e4774c9d007b215f (patch)
tree33db51072448e42875ab5874549ca538a9add521 /src/mame/drivers/wolfpack.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/wolfpack.cpp')
-rw-r--r--src/mame/drivers/wolfpack.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mame/drivers/wolfpack.cpp b/src/mame/drivers/wolfpack.cpp
index 611f453464f..21d6d76776d 100644
--- a/src/mame/drivers/wolfpack.cpp
+++ b/src/mame/drivers/wolfpack.cpp
@@ -53,10 +53,10 @@ void wolfpack_state::machine_reset()
}
-CUSTOM_INPUT_MEMBER(wolfpack_state::dial_r)
+template <int Bit>
+READ_LINE_MEMBER(wolfpack_state::dial_r)
{
- int bit = (uintptr_t)param;
- return ((ioport("DIAL")->read() + bit) / 2) & 0x01;
+ return ((ioport("DIAL")->read() + Bit) / 2) & 0x01;
}
@@ -171,8 +171,8 @@ void wolfpack_state::main_map(address_map &map)
static INPUT_PORTS_START( wolfpack )
PORT_START("INPUTS")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, wolfpack_state, dial_r, (void *)0) /* dial connects here */
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, wolfpack_state, dial_r, (void *)1) /* dial connects here */
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(wolfpack_state, dial_r<0>) // dial connects here
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(wolfpack_state, dial_r<1>) // dial connects here
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_TILT )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON1 )
PORT_SERVICE( 0x10, IP_ACTIVE_HIGH )