From 3066f1e2c46528e47f44947d24a2652a51fcd72e Mon Sep 17 00:00:00 2001 From: Angelo Salese Date: Mon, 31 Mar 2014 20:03:05 +0000 Subject: [PATCH] Untangled Little Robin sound HW from video timings [Angelo Salese] --- src/mame/drivers/littlerb.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/src/mame/drivers/littlerb.c b/src/mame/drivers/littlerb.c index b3a94bb6f94..334a1139faa 100644 --- a/src/mame/drivers/littlerb.c +++ b/src/mame/drivers/littlerb.c @@ -100,7 +100,7 @@ public: DECLARE_WRITE16_MEMBER(littlerb_r_sound_w); UINT8 sound_data_shift(); - TIMER_DEVICE_CALLBACK_MEMBER(littlerb_scanline_unk); + TIMER_DEVICE_CALLBACK_MEMBER(littlerb_sound_step_cb); TIMER_DEVICE_CALLBACK_MEMBER(littlerb_sound_cb); }; @@ -230,14 +230,6 @@ static INPUT_PORTS_START( littlerb ) PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED ) INPUT_PORTS_END -TIMER_DEVICE_CALLBACK_MEMBER(littlerb_state::littlerb_scanline_unk) -{ - int scanline = param; - - if (scanline == 0) m_soundframe++; - -// printf("scanline %d\n", scanline); -} TIMER_DEVICE_CALLBACK_MEMBER(littlerb_state::littlerb_sound_cb) { @@ -254,6 +246,11 @@ TIMER_DEVICE_CALLBACK_MEMBER(littlerb_state::littlerb_sound_cb) m_sound_pointer_r&=0x3ff; } +TIMER_DEVICE_CALLBACK_MEMBER(littlerb_state::littlerb_sound_step_cb) +{ + m_soundframe++; +} + static MACHINE_CONFIG_START( littlerb, littlerb_state ) MCFG_CPU_ADD("maincpu", M68000, 12000000) MCFG_CPU_PROGRAM_MAP(littlerb_main) @@ -261,7 +258,7 @@ static MACHINE_CONFIG_START( littlerb, littlerb_state ) MCFG_INDER_VIDEO_ADD("inder_vid") // should probably be done with a timer rather than relying on screen(!) - MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", littlerb_state, littlerb_scanline_unk, "inder_vid:inder_screen", 0, 1) + MCFG_TIMER_DRIVER_ADD_PERIODIC("step_timer", littlerb_state, littlerb_sound_step_cb, attotime::from_hz(7500/150)) // TODO: not accurate MCFG_TIMER_DRIVER_ADD_PERIODIC("sound_timer", littlerb_state, littlerb_sound_cb, attotime::from_hz(7500)) // TODO: not accurate MCFG_SPEAKER_STANDARD_STEREO("lspeaker","rspeaker")