summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/exidy.c
diff options
context:
space:
mode:
author Miodrag Milanovic <mmicko@gmail.com>2012-04-09 12:55:12 +0000
committer Miodrag Milanovic <mmicko@gmail.com>2012-04-09 12:55:12 +0000
commitd1bd5be0559c97c8a074ee30a3690578eb645259 (patch)
tree140074b31571fd87266cf2eb2156fadaf73c3bb6 /src/mame/drivers/exidy.c
parentaee1fd4cbe66e84b1a2bf9170610c8ade4eb59be (diff)
modernization of some CUSTOM_INPUT's part 3 (no whatsnew)
Diffstat (limited to 'src/mame/drivers/exidy.c')
-rw-r--r--src/mame/drivers/exidy.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/mame/drivers/exidy.c b/src/mame/drivers/exidy.c
index d52c0ddcaa4..4389ef63860 100644
--- a/src/mame/drivers/exidy.c
+++ b/src/mame/drivers/exidy.c
@@ -155,22 +155,21 @@ Fax 1982 6502 FXL, FLA
*
*************************************/
-static CUSTOM_INPUT( teetert_input_r )
+CUSTOM_INPUT_MEMBER(exidy_state::teetert_input_r)
{
- exidy_state *state = field.machine().driver_data<exidy_state>();
- UINT8 dial = input_port_read(field.machine(), "DIAL");
+ UINT8 dial = input_port_read(machine(), "DIAL");
int result = 0;
- result = (dial != state->m_last_dial) << 4;
+ result = (dial != m_last_dial) << 4;
if (result != 0)
{
- if (((dial - state->m_last_dial) & 0xff) < 0x80)
+ if (((dial - m_last_dial) & 0xff) < 0x80)
{
result |= 1;
- state->m_last_dial++;
+ m_last_dial++;
}
else
- state->m_last_dial--;
+ m_last_dial--;
}
return result;
@@ -603,7 +602,7 @@ static INPUT_PORTS_START( teetert )
PORT_START("IN0")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 )
- PORT_BIT( 0x44, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(teetert_input_r, NULL)
+ PORT_BIT( 0x44, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy_state,teetert_input_r, NULL)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )