bladestl.cpp: Soundlatch modernization (nw)

This commit is contained in:
AJR 2018-04-09 00:15:00 -04:00
parent 938bfbee61
commit 1763d95881
2 changed files with 7 additions and 11 deletions

View File

@ -86,13 +86,6 @@ WRITE8_MEMBER(bladestl_state::bladestl_bankswitch_w)
} }
WRITE8_MEMBER(bladestl_state::bladestl_sh_irqtrigger_w)
{
m_soundlatch->write(space, offset, data);
m_audiocpu->set_input_line(M6809_IRQ_LINE, HOLD_LINE);
//logerror("(sound) write %02x\n", data);
}
WRITE8_MEMBER(bladestl_state::bladestl_port_B_w) WRITE8_MEMBER(bladestl_state::bladestl_port_B_w)
{ {
// bits 3-5 = ROM bank select // bits 3-5 = ROM bank select
@ -137,7 +130,7 @@ void bladestl_state::main_map(address_map &map)
map(0x2e02, 0x2e02).portr("P2"); /* 2P controls */ map(0x2e02, 0x2e02).portr("P2"); /* 2P controls */
map(0x2e03, 0x2e03).portr("DSW2"); /* DISPW #2 */ map(0x2e03, 0x2e03).portr("DSW2"); /* DISPW #2 */
map(0x2e40, 0x2e40).portr("DSW1"); /* DIPSW #1 */ map(0x2e40, 0x2e40).portr("DSW1"); /* DIPSW #1 */
map(0x2e80, 0x2e80).w(this, FUNC(bladestl_state::bladestl_sh_irqtrigger_w)); /* cause interrupt on audio CPU */ map(0x2e80, 0x2e80).w("soundlatch", FUNC(generic_latch_8_device::write)); /* cause interrupt on audio CPU */
map(0x2ec0, 0x2ec0).w("watchdog", FUNC(watchdog_timer_device::reset_w)); map(0x2ec0, 0x2ec0).w("watchdog", FUNC(watchdog_timer_device::reset_w));
map(0x2f00, 0x2f03).r(this, FUNC(bladestl_state::trackball_r)); /* Trackballs */ map(0x2f00, 0x2f03).r(this, FUNC(bladestl_state::trackball_r)); /* Trackballs */
map(0x2f40, 0x2f40).w(this, FUNC(bladestl_state::bladestl_bankswitch_w)); /* bankswitch control */ map(0x2f40, 0x2f40).w(this, FUNC(bladestl_state::bladestl_bankswitch_w)); /* bankswitch control */
@ -154,8 +147,8 @@ void bladestl_state::sound_map(address_map &map)
map(0x1000, 0x1001).rw("ymsnd", FUNC(ym2203_device::read), FUNC(ym2203_device::write)); /* YM2203 */ map(0x1000, 0x1001).rw("ymsnd", FUNC(ym2203_device::read), FUNC(ym2203_device::write)); /* YM2203 */
map(0x3000, 0x3000).w(this, FUNC(bladestl_state::bladestl_speech_ctrl_w)); /* UPD7759 */ map(0x3000, 0x3000).w(this, FUNC(bladestl_state::bladestl_speech_ctrl_w)); /* UPD7759 */
map(0x4000, 0x4000).r(this, FUNC(bladestl_state::bladestl_speech_busy_r)); /* UPD7759 */ map(0x4000, 0x4000).r(this, FUNC(bladestl_state::bladestl_speech_busy_r)); /* UPD7759 */
map(0x5000, 0x5000).nopw(); /* ??? */ map(0x5000, 0x5000).w("soundlatch", FUNC(generic_latch_8_device::acknowledge_w));
map(0x6000, 0x6000).r(m_soundlatch, FUNC(generic_latch_8_device::read)); map(0x6000, 0x6000).r("soundlatch", FUNC(generic_latch_8_device::read));
map(0x8000, 0xffff).rom(); map(0x8000, 0xffff).rom();
} }
@ -305,6 +298,8 @@ void bladestl_state::machine_reset()
for (i = 0; i < 4 ; i++) for (i = 0; i < 4 ; i++)
m_last_track[i] = 0; m_last_track[i] = 0;
m_soundlatch->acknowledge_w(machine().dummy_space(), 0, 0);
} }
MACHINE_CONFIG_START(bladestl_state::bladestl) MACHINE_CONFIG_START(bladestl_state::bladestl)
@ -354,6 +349,8 @@ MACHINE_CONFIG_START(bladestl_state::bladestl)
MCFG_SPEAKER_STANDARD_MONO("mono") MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_GENERIC_LATCH_8_ADD("soundlatch") MCFG_GENERIC_LATCH_8_ADD("soundlatch")
MCFG_GENERIC_LATCH_DATA_PENDING_CB(INPUTLINE("audiocpu", M6809_IRQ_LINE))
MCFG_GENERIC_LATCH_SEPARATE_ACKNOWLEDGE(true)
MCFG_SOUND_ADD("upd", UPD7759, XTAL(640'000)) MCFG_SOUND_ADD("upd", UPD7759, XTAL(640'000))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.60) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.60)

View File

@ -57,7 +57,6 @@ public:
/* devices */ /* devices */
DECLARE_READ8_MEMBER(trackball_r); DECLARE_READ8_MEMBER(trackball_r);
DECLARE_WRITE8_MEMBER(bladestl_bankswitch_w); DECLARE_WRITE8_MEMBER(bladestl_bankswitch_w);
DECLARE_WRITE8_MEMBER(bladestl_sh_irqtrigger_w);
DECLARE_WRITE8_MEMBER(bladestl_port_B_w); DECLARE_WRITE8_MEMBER(bladestl_port_B_w);
DECLARE_READ8_MEMBER(bladestl_speech_busy_r); DECLARE_READ8_MEMBER(bladestl_speech_busy_r);
DECLARE_WRITE8_MEMBER(bladestl_speech_ctrl_w); DECLARE_WRITE8_MEMBER(bladestl_speech_ctrl_w);