summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/1942.c
diff options
context:
space:
mode:
author Miodrag Milanovic <mmicko@gmail.com>2012-09-25 13:39:59 +0000
committer Miodrag Milanovic <mmicko@gmail.com>2012-09-25 13:39:59 +0000
commit6c40f0f2920a208ff456d8f34f3684367ef3fd8a (patch)
tree8f6a39a908e561191d898f9dafbcb9a74967d784 /src/mame/drivers/1942.c
parentb29b84dd779070e753d8e5eff6f2f548e616ef6a (diff)
TIMER_CALLBACK_DEVICE_MEMBER modernization part 1 (no whatsnew)
Diffstat (limited to 'src/mame/drivers/1942.c')
-rw-r--r--src/mame/drivers/1942.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mame/drivers/1942.c b/src/mame/drivers/1942.c
index 7fb2ad805d6..897096443f4 100644
--- a/src/mame/drivers/1942.c
+++ b/src/mame/drivers/1942.c
@@ -74,15 +74,15 @@ WRITE8_MEMBER(_1942_state::c1942_bankswitch_w)
membank("bank1")->set_entry(data & 0x03);
}
-static TIMER_DEVICE_CALLBACK( c1942_scanline )
+TIMER_DEVICE_CALLBACK_MEMBER(_1942_state::c1942_scanline)
{
int scanline = param;
if(scanline == 240) // vblank-out irq
- timer.machine().device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE, 0xd7); /* RST 10h - vblank */
+ machine().device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE, 0xd7); /* RST 10h - vblank */
if(scanline == 0) // unknown irq event, presumably vblank-in or a periodic one (writes to the soundlatch and drives freeze dip-switch)
- timer.machine().device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE, 0xcf); /* RST 08h */
+ machine().device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE, 0xcf); /* RST 08h */
}
@@ -258,7 +258,7 @@ static MACHINE_CONFIG_START( 1942, _1942_state )
/* basic machine hardware */
MCFG_CPU_ADD("maincpu", Z80, MAIN_CPU_CLOCK) /* 4 MHz ??? */
MCFG_CPU_PROGRAM_MAP(c1942_map)
- MCFG_TIMER_ADD_SCANLINE("scantimer", c1942_scanline, "screen", 0, 1)
+ MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", _1942_state, c1942_scanline, "screen", 0, 1)
MCFG_CPU_ADD("audiocpu", Z80, SOUND_CPU_CLOCK) /* 3 MHz ??? */
MCFG_CPU_PROGRAM_MAP(sound_map)