metro.cpp: Fix loss of sound in games with uPD7810s other than daitorid, pururun & gunmast (nw)

This commit is contained in:
AJR 2020-03-13 23:16:16 -04:00
parent d1a38e9422
commit 475e834cdc

View File

@ -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;
}