summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/by35.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/by35.cpp')
-rw-r--r--src/mame/drivers/by35.cpp41
1 files changed, 22 insertions, 19 deletions
diff --git a/src/mame/drivers/by35.cpp b/src/mame/drivers/by35.cpp
index 9b71ad328e7..29d765c531b 100644
--- a/src/mame/drivers/by35.cpp
+++ b/src/mame/drivers/by35.cpp
@@ -95,9 +95,9 @@ public:
DECLARE_INPUT_CHANGED_MEMBER(activity_button);
DECLARE_INPUT_CHANGED_MEMBER(self_test);
- DECLARE_CUSTOM_INPUT_MEMBER(outhole_x0);
- DECLARE_CUSTOM_INPUT_MEMBER(drop_target_x0);
- DECLARE_CUSTOM_INPUT_MEMBER(kickback_x3);
+ template <int Param> DECLARE_READ_LINE_MEMBER(outhole_x0);
+ template <int Param> DECLARE_READ_LINE_MEMBER(drop_target_x0);
+ template <int Param> DECLARE_READ_LINE_MEMBER(kickback_x3);
void by35(machine_config &config);
void nuovo(machine_config &config);
@@ -402,7 +402,7 @@ static INPUT_PORTS_START( by35 )
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_START1 )
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_TILT )
// PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Outhole") PORT_CODE(KEYCODE_BACKSPACE)
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by35_state, outhole_x0, (void *)0x07) // PORT_CODE(KEYCODE_BACKSPACE)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(by35_state, outhole_x0<0x07>) // PORT_CODE(KEYCODE_BACKSPACE)
PORT_START("X1")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN3 )
@@ -843,14 +843,14 @@ static INPUT_PORTS_START( playboy )
PORT_DIPSETTING( 0x40, "Extra Ball or Special Held Until Collected")
PORT_MODIFY("X0") /* Drop Target switches */
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by35_state, drop_target_x0, (void *)0x00) // PORT_CODE(KEYCODE_STOP)
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by35_state, drop_target_x0, (void *)0x01) // PORT_CODE(KEYCODE_SLASH)
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by35_state, drop_target_x0, (void *)0x02) // PORT_CODE(KEYCODE_OPENBRACE)
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by35_state, drop_target_x0, (void *)0x03) // PORT_CODE(KEYCODE_CLOSEBRACE)
- PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by35_state, drop_target_x0, (void *)0x04) // PORT_CODE(KEYCODE_BACKSLASH)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(by35_state, drop_target_x0<0x00>) // PORT_CODE(KEYCODE_STOP)
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(by35_state, drop_target_x0<0x01>) // PORT_CODE(KEYCODE_SLASH)
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(by35_state, drop_target_x0<0x02>) // PORT_CODE(KEYCODE_OPENBRACE)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(by35_state, drop_target_x0<0x03>) // PORT_CODE(KEYCODE_CLOSEBRACE)
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(by35_state, drop_target_x0<0x04>) // PORT_CODE(KEYCODE_BACKSLASH)
PORT_MODIFY("X3")
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by35_state, kickback_x3, (void *)0x37) // PORT_CODE(KEYCODE_Q)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(by35_state, kickback_x3<0x37>) // PORT_CODE(KEYCODE_Q)
PORT_START("RT2")
PORT_ADJUSTER( 50, "RT2 - Tone Sustain" )
@@ -952,10 +952,11 @@ static INPUT_PORTS_START( frontier )
INPUT_PORTS_END
-CUSTOM_INPUT_MEMBER( by35_state::outhole_x0 )
+template <int Param>
+READ_LINE_MEMBER( by35_state::outhole_x0 )
{
- int bit_shift = ((uintptr_t)param & 0x07);
- int port = (((uintptr_t)param >> 4) & 0x07);
+ int bit_shift = (Param & 0x07);
+ int port = ((Param >> 4) & 0x07);
/* Here we simulate the ball sitting in the Outhole so the Outhole Solenoid can release it */
@@ -965,10 +966,11 @@ CUSTOM_INPUT_MEMBER( by35_state::outhole_x0 )
return ((m_io_hold_x[port] >> bit_shift) & 1);
}
-CUSTOM_INPUT_MEMBER( by35_state::kickback_x3 )
+template <int Param>
+READ_LINE_MEMBER( by35_state::kickback_x3 )
{
- int bit_shift = ((uintptr_t)param & 0x07);
- int port = (((uintptr_t)param >> 4) & 0x07);
+ int bit_shift = (Param & 0x07);
+ int port = ((Param >> 4) & 0x07);
/* Here we simulate the ball sitting in a Saucer so the Saucer Solenoid can release it */
@@ -978,12 +980,13 @@ CUSTOM_INPUT_MEMBER( by35_state::kickback_x3 )
return ((m_io_hold_x[port] >> bit_shift) & 1);
}
-CUSTOM_INPUT_MEMBER( by35_state::drop_target_x0 )
+template <int Param>
+READ_LINE_MEMBER( by35_state::drop_target_x0 )
{
/* Here we simulate the Drop Target switch states so the Drop Target Reset Solenoid can also release the switches */
- int bit_shift = ((uintptr_t)param & 0x07);
- int port = (((uintptr_t)param >> 4) & 0x07);
+ int bit_shift = (Param & 0x07);
+ int port = ((Param >> 4) & 0x07);
switch (bit_shift)
{