summaryrefslogtreecommitdiffstatshomepage
path: root/src/mess/drivers/px4.c
diff options
context:
space:
mode:
author Miodrag Milanovic <mmicko@gmail.com>2012-09-25 14:21:56 +0000
committer Miodrag Milanovic <mmicko@gmail.com>2012-09-25 14:21:56 +0000
commitd8bc866c4a7550ed1b596560125eb77edf618db3 (patch)
treefecc49ffd395261f3907b76d836e5bfba4d7e702 /src/mess/drivers/px4.c
parent6c40f0f2920a208ff456d8f34f3684367ef3fd8a (diff)
TIMER_CALLBACK_DEVICE_MEMBER modernization part 2 (no whatsnew)
Diffstat (limited to 'src/mess/drivers/px4.c')
-rw-r--r--src/mess/drivers/px4.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/mess/drivers/px4.c b/src/mess/drivers/px4.c
index 2534ade57ef..58c49dc3753 100644
--- a/src/mess/drivers/px4.c
+++ b/src/mess/drivers/px4.c
@@ -170,6 +170,8 @@ public:
TIMER_CALLBACK_MEMBER(ext_cassette_read);
TIMER_CALLBACK_MEMBER(transmit_data);
TIMER_CALLBACK_MEMBER(receive_data);
+ TIMER_DEVICE_CALLBACK_MEMBER(frc_tick);
+ TIMER_DEVICE_CALLBACK_MEMBER(upd7508_1sec_callback);
};
@@ -344,16 +346,15 @@ TIMER_CALLBACK_MEMBER(px4_state::ext_cassette_read)
}
/* free running counter */
-static TIMER_DEVICE_CALLBACK( frc_tick )
+TIMER_DEVICE_CALLBACK_MEMBER(px4_state::frc_tick)
{
- px4_state *px4 = timer.machine().driver_data<px4_state>();
- px4->m_frc_value++;
+ m_frc_value++;
- if (px4->m_frc_value == 0)
+ if (m_frc_value == 0)
{
- px4->m_isr |= INT3_OVF;
- gapnit_interrupt(timer.machine());
+ m_isr |= INT3_OVF;
+ gapnit_interrupt(machine());
}
}
@@ -919,18 +920,17 @@ WRITE8_MEMBER(px4_state::px4_ioctlr_w)
7508 RELATED
***************************************************************************/
-static TIMER_DEVICE_CALLBACK( upd7508_1sec_callback )
+TIMER_DEVICE_CALLBACK_MEMBER(px4_state::upd7508_1sec_callback)
{
- px4_state *px4 = timer.machine().driver_data<px4_state>();
/* adjust interrupt status */
- px4->m_interrupt_status |= UPD7508_INT_ONE_SECOND;
+ m_interrupt_status |= UPD7508_INT_ONE_SECOND;
/* are interrupts enabled? */
- if (px4->m_one_sec_int_enabled)
+ if (m_one_sec_int_enabled)
{
- px4->m_isr |= INT0_7508;
- gapnit_interrupt(timer.machine());
+ m_isr |= INT0_7508;
+ gapnit_interrupt(machine());
}
}
@@ -1376,8 +1376,8 @@ static MACHINE_CONFIG_START( px4, px4_state )
MCFG_PALETTE_LENGTH(2)
- MCFG_TIMER_ADD_PERIODIC("one_sec", upd7508_1sec_callback, attotime::from_seconds(1))
- MCFG_TIMER_ADD_PERIODIC("frc", frc_tick, attotime::from_hz(XTAL_7_3728MHz / 2 / 6))
+ MCFG_TIMER_DRIVER_ADD_PERIODIC("one_sec", px4_state, upd7508_1sec_callback, attotime::from_seconds(1))
+ MCFG_TIMER_DRIVER_ADD_PERIODIC("frc", px4_state, frc_tick, attotime::from_hz(XTAL_7_3728MHz / 2 / 6))
/* internal ram */
MCFG_RAM_ADD(RAM_TAG)