battlera: Hopefully fix audio regression, nw

This commit is contained in:
mooglyguy 2019-01-03 23:13:42 +01:00
parent 0627c0a94c
commit 6327ec1330
2 changed files with 5 additions and 2 deletions

View File

@ -108,6 +108,7 @@ void battlera_state::machine_reset()
{ {
m_control_port_select = 0; m_control_port_select = 0;
m_msm5205next = 0; m_msm5205next = 0;
m_toggle = 0;
} }
/******************************************************************************/ /******************************************************************************/
@ -156,7 +157,8 @@ WRITE_LINE_MEMBER(battlera_state::adpcm_int)
m_msm->write_data(m_msm5205next >> 4); m_msm->write_data(m_msm5205next >> 4);
m_msm5205next <<= 4; m_msm5205next <<= 4;
if (state) m_toggle = 1 - m_toggle;
if (m_toggle)
m_audiocpu->set_input_line(1, HOLD_LINE); m_audiocpu->set_input_line(1, HOLD_LINE);
} }
@ -295,7 +297,7 @@ void battlera_state::battlera(machine_config &config)
YM2203(config, "ymsnd", 12000000 / 8).add_route(ALL_OUTPUTS, "mono", 0.40); YM2203(config, "ymsnd", 12000000 / 8).add_route(ALL_OUTPUTS, "mono", 0.40);
MSM5205(config, m_msm, 384000); MSM5205(config, m_msm, 384000);
m_msm->vck_callback().set(FUNC(battlera_state::adpcm_int)); m_msm->vck_legacy_callback().set(FUNC(battlera_state::adpcm_int));
m_msm->set_prescaler_selector(msm5205_device::S48_4B); /* 8KHz */ m_msm->set_prescaler_selector(msm5205_device::S48_4B); /* 8KHz */
m_msm->add_route(ALL_OUTPUTS, "mono", 0.85); m_msm->add_route(ALL_OUTPUTS, "mono", 0.85);
} }

View File

@ -32,6 +32,7 @@ public:
int m_control_port_select; int m_control_port_select;
int m_msm5205next; int m_msm5205next;
int m_toggle;
DECLARE_WRITE8_MEMBER(control_data_w); DECLARE_WRITE8_MEMBER(control_data_w);
DECLARE_READ8_MEMBER(control_data_r); DECLARE_READ8_MEMBER(control_data_r);