diff options
author | 2017-08-14 18:58:18 -0400 | |
---|---|---|
committer | 2017-08-14 18:58:18 -0400 | |
commit | 7cf5bbd45c7d0873880044ea5345dc0b3f9aaa77 (patch) | |
tree | 7502459be28f247c92ccfa155fc0d6686b3c9d34 | |
parent | d4780a013583b212ae3faf6e8e78f3b378a4df52 (diff) |
audio/irem.cpp: VCK modernization; remove unnecessary subdevice resets (nw)
-rw-r--r-- | src/devices/sound/msm5205.cpp | 9 | ||||
-rw-r--r-- | src/mame/audio/irem.cpp | 35 | ||||
-rw-r--r-- | src/mame/audio/irem.h | 1 |
3 files changed, 9 insertions, 36 deletions
diff --git a/src/devices/sound/msm5205.cpp b/src/devices/sound/msm5205.cpp index 2730ff9e3dd..1a3498cdf89 100644 --- a/src/devices/sound/msm5205.cpp +++ b/src/devices/sound/msm5205.cpp @@ -255,12 +255,9 @@ WRITE_LINE_MEMBER(msm5205_device::vclk_w) logerror("Error: vclk_w() called but VCK selected master mode\n"); else { - if (m_vck != state) - { - m_vck = state; - if (!state) - update_adpcm(); - } + if (m_vck && !state) + m_capture_timer->adjust(attotime::from_nsec(15600)); + m_vck = state; } } diff --git a/src/mame/audio/irem.cpp b/src/mame/audio/irem.cpp index 7a9a0987e91..f917796c03c 100644 --- a/src/mame/audio/irem.cpp +++ b/src/mame/audio/irem.cpp @@ -66,14 +66,9 @@ void irem_audio_device::device_start() //------------------------------------------------- // device_reset - device-specific reset //------------------------------------------------- + void irem_audio_device::device_reset() { - m_adpcm1->reset(); - if (m_adpcm2) m_adpcm2->reset(); - m_ay_45L->reset(); - m_ay_45M->reset(); - m_cpu->reset(); - m_port1 = 0; // ? m_port2 = 0; // ? m_soundlatch = 0; @@ -253,26 +248,6 @@ WRITE8_MEMBER( irem_audio_device::m62_adpcm_w ) /************************************* * - * MSM5205 data ready signals - * - *************************************/ - -void irem_audio_device::adpcm_int(int st) -{ - m_cpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE); - - /* the first MSM5205 clocks the second */ - if (m_adpcm2 != nullptr) - { - m_adpcm2->vclk_w(1); - m_adpcm2->vclk_w(0); - } -} - - - -/************************************* - * * Sound interfaces * *************************************/ @@ -453,7 +428,8 @@ MACHINE_CONFIG_MEMBER( m62_audio_device::device_add_mconfig ) MCFG_SOUND_ROUTE_EX(2, "snd_nl", 1.0, 5) MCFG_SOUND_ADD("msm1", MSM5205, XTAL_384kHz) /* verified on pcb */ - MCFG_MSM5205_VCLK_CB(WRITELINE(irem_audio_device, adpcm_int)) /* interrupt function */ + MCFG_MSM5205_VCK_CALLBACK(INPUTLINE("iremsound", INPUT_LINE_NMI)) // driven through NPN inverter + MCFG_DEVCB_CHAIN_OUTPUT(DEVWRITELINE("msm2", msm5205_device, vclk_w)) // the first MSM5205 clocks the second MCFG_MSM5205_PRESCALER_SELECTOR(S96_4B) /* default to 4KHz, but can be changed at run time */ MCFG_SOUND_ROUTE_EX(0, "snd_nl", 1.0, 6) @@ -518,7 +494,7 @@ MACHINE_CONFIG_MEMBER( m52_soundc_audio_device::device_add_mconfig ) MCFG_SOUND_ROUTE_EX(0, "filtermix", 1.0, 1) MCFG_SOUND_ADD("msm1", MSM5205, XTAL_384kHz) /* verified on pcb */ - MCFG_MSM5205_VCLK_CB(WRITELINE(irem_audio_device, adpcm_int)) /* interrupt function */ + MCFG_MSM5205_VCK_CALLBACK(INPUTLINE("iremsound", INPUT_LINE_NMI)) // driven through NPN inverter MCFG_MSM5205_PRESCALER_SELECTOR(S96_4B) /* default to 4KHz, but can be changed at run time */ MCFG_SOUND_ROUTE_EX(0, "filtermix", 1.0, 2) @@ -552,7 +528,8 @@ MACHINE_CONFIG_MEMBER( m52_large_audio_device::device_add_mconfig ) /* 10 yard MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80) MCFG_SOUND_ADD("msm1", MSM5205, XTAL_384kHz) /* verified on pcb */ - MCFG_MSM5205_VCLK_CB(WRITELINE(irem_audio_device, adpcm_int)) /* interrupt function */ + MCFG_MSM5205_VCK_CALLBACK(INPUTLINE("iremsound", INPUT_LINE_NMI)) // driven through NPN inverter + MCFG_DEVCB_CHAIN_OUTPUT(DEVWRITELINE("msm2", msm5205_device, vclk_w)) // the first MSM5205 clocks the second MCFG_MSM5205_PRESCALER_SELECTOR(S96_4B) /* default to 4KHz, but can be changed at run time */ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80) diff --git a/src/mame/audio/irem.h b/src/mame/audio/irem.h index 657176ab1ea..7f16f5b95c4 100644 --- a/src/mame/audio/irem.h +++ b/src/mame/audio/irem.h @@ -27,7 +27,6 @@ public: DECLARE_READ8_MEMBER( soundlatch_r ); DECLARE_WRITE8_MEMBER( ay8910_45M_portb_w ); DECLARE_WRITE8_MEMBER( ay8910_45L_porta_w ); - void adpcm_int(int st); protected: irem_audio_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); |