From 475e834cdc393b966ce029676d5c770292baf3f4 Mon Sep 17 00:00:00 2001 From: AJR Date: Fri, 13 Mar 2020 23:16:16 -0400 Subject: metro.cpp: Fix loss of sound in games with uPD7810s other than daitorid, pururun & gunmast (nw) --- src/mame/drivers/metro.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/mame/drivers/metro.cpp b/src/mame/drivers/metro.cpp index 37acb9c31e3..2ef77b5a178 100644 --- a/src/mame/drivers/metro.cpp +++ b/src/mame/drivers/metro.cpp @@ -314,13 +314,12 @@ WRITE8_MEMBER(metro_state::sound_data_w) { machine().scheduler().synchronize(timer_expired_delegate(FUNC(metro_state::sound_data_sync), this), data); m_audiocpu->pulse_input_line(INPUT_LINE_NMI, attotime::zero); // seen rxd_r - m_maincpu->spin_until_interrupt(); - m_busy_sndcpu = 1; } TIMER_CALLBACK_MEMBER(metro_state::sound_data_sync) { m_sound_data = param; + m_busy_sndcpu = 1; } @@ -363,7 +362,7 @@ WRITE8_MEMBER(metro_state::upd7810_portb_w) 6 5 !clock YM2413 I/O 4 !clock MSM6295 I/O - 3 + 3 !enable read from 6295 2 !enable write to YM2413/6295 1 select YM2413 register or data port 0 @@ -394,6 +393,13 @@ WRITE8_MEMBER(metro_state::upd7810_portb_w) m_oki->write(m_porta); } + if (BIT(m_portb, 3) && !BIT(data, 3)) /* clock 1->0 */ + { + /* read */ + if (!BIT(data, 4)) + m_porta = m_oki->read(); + } + m_portb = data; } -- cgit v1.2.3