summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/fantland.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/fantland.cpp')
-rw-r--r--src/mame/drivers/fantland.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mame/drivers/fantland.cpp b/src/mame/drivers/fantland.cpp
index 77cf05ff9bb..21fce64c7a3 100644
--- a/src/mame/drivers/fantland.cpp
+++ b/src/mame/drivers/fantland.cpp
@@ -689,10 +689,10 @@ INPUT_PORTS_END
Wheels Runner
***************************************************************************/
+template <int Player>
CUSTOM_INPUT_MEMBER(fantland_state::wheelrun_wheel_r)
{
- int player = (uintptr_t)param;
- int delta = ioport(player ? "WHEEL1" : "WHEEL0")->read();
+ int delta = m_wheel[Player]->read();
delta = (delta & 0x7f) - (delta & 0x80) + 4;
if (delta > 7) delta = 7;
@@ -708,7 +708,7 @@ static INPUT_PORTS_START( wheelrun )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, fantland_state,wheelrun_wheel_r, (void *)0)
+ PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(fantland_state, wheelrun_wheel_r<0>)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("53001") /* 53001 */
@@ -716,7 +716,7 @@ static INPUT_PORTS_START( wheelrun )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, fantland_state,wheelrun_wheel_r, (void *)1)
+ PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(fantland_state, wheelrun_wheel_r<1>)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("53002") /* 53002 */