diff options
author | AJR <ajrhacker@users.noreply.github.com> | 2017-06-14 08:32:15 -0400 |
---|---|---|
committer | AJR <ajrhacker@users.noreply.github.com> | 2017-06-14 08:32:15 -0400 |
commit | 7e576981d34c1b59721c4dea8c1b30a809d6501d (patch) | |
tree | b2f9045b3c2214be184f2fc479f1bf8385433b48 | |
parent | 8dbb963e1c2ff5cc96f678edb14119a608761b3f (diff) |
taotaido: Soundlatch modernization (nw)
-rw-r--r-- | src/mame/drivers/taotaido.cpp | 22 | ||||
-rw-r--r-- | src/mame/includes/taotaido.h | 3 |
2 files changed, 5 insertions, 20 deletions
diff --git a/src/mame/drivers/taotaido.cpp b/src/mame/drivers/taotaido.cpp index 25fd91b47f9..307920a57cd 100644 --- a/src/mame/drivers/taotaido.cpp +++ b/src/mame/drivers/taotaido.cpp @@ -80,22 +80,13 @@ zooming might be wrong void taotaido_state::machine_start() { membank("soundbank")->configure_entries(0, 4, memregion("audiocpu")->base(), 0x8000); - - save_item(NAME(m_pending_command)); } READ16_MEMBER(taotaido_state::pending_command_r) { /* Only bit 0 is tested */ - return m_pending_command; -} - -WRITE8_MEMBER(taotaido_state::sound_command_w) -{ - m_pending_command = 1; - m_soundlatch->write(space, offset, data); - m_audiocpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE); + return m_soundlatch->pending_r(); } WRITE8_MEMBER(taotaido_state::unknown_output_w) @@ -117,18 +108,13 @@ static ADDRESS_MAP_START( main_map, AS_PROGRAM, 16, taotaido_state ) AM_RANGE(0xffff10, 0xffff11) AM_WRITENOP // unknown AM_RANGE(0xffff20, 0xffff21) AM_WRITENOP // unknown - flip screen related AM_RANGE(0xffff40, 0xffff47) AM_WRITE(sprite_character_bank_select_w) - AM_RANGE(0xffffc0, 0xffffc1) AM_WRITE8(sound_command_w, 0x00ff) // seems right + AM_RANGE(0xffffc0, 0xffffc1) AM_DEVWRITE8("soundlatch", generic_latch_8_device, write, 0x00ff) // seems right AM_RANGE(0xffffe0, 0xffffe1) AM_READ(pending_command_r) // guess - seems to be needed for all the sounds to work ADDRESS_MAP_END /* sound cpu - same as aerofgt */ -WRITE8_MEMBER(taotaido_state::pending_command_clear_w) -{ - m_pending_command = 0; -} - WRITE8_MEMBER(taotaido_state::sh_bankswitch_w) { membank("soundbank")->set_entry(data & 0x03); @@ -144,7 +130,7 @@ static ADDRESS_MAP_START( sound_port_map, AS_IO, 8, taotaido_state ) ADDRESS_MAP_GLOBAL_MASK(0xff) AM_RANGE(0x00, 0x03) AM_DEVREADWRITE("ymsnd", ym2610_device, read, write) AM_RANGE(0x04, 0x04) AM_WRITE(sh_bankswitch_w) - AM_RANGE(0x08, 0x08) AM_WRITE(pending_command_clear_w) + AM_RANGE(0x08, 0x08) AM_DEVWRITE("soundlatch", generic_latch_8_device, acknowledge_w) AM_RANGE(0x0c, 0x0c) AM_DEVREAD("soundlatch", generic_latch_8_device, read) ADDRESS_MAP_END @@ -403,6 +389,8 @@ static MACHINE_CONFIG_START( taotaido ) MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker") MCFG_GENERIC_LATCH_8_ADD("soundlatch") + MCFG_GENERIC_LATCH_DATA_PENDING_CB(INPUTLINE("audiocpu", INPUT_LINE_NMI)) + MCFG_GENERIC_LATCH_SEPARATE_ACKNOWLEDGE(true) MCFG_SOUND_ADD("ymsnd", YM2610, 8000000) MCFG_YM2610_IRQ_HANDLER(INPUTLINE("audiocpu", 0)) diff --git a/src/mame/includes/taotaido.h b/src/mame/includes/taotaido.h index b65b2748004..4f58a76aeea 100644 --- a/src/mame/includes/taotaido.h +++ b/src/mame/includes/taotaido.h @@ -32,7 +32,6 @@ public: required_shared_ptr<uint16_t> m_scrollram; required_shared_ptr<uint16_t> m_bgram; - int m_pending_command; uint16_t m_sprite_character_bank_select[8]; uint16_t m_video_bank_select[8]; tilemap_t *m_bg_tilemap; @@ -42,9 +41,7 @@ public: std::unique_ptr<uint16_t[]> m_spriteram2_older; DECLARE_READ16_MEMBER(pending_command_r); - DECLARE_WRITE8_MEMBER(sound_command_w); DECLARE_WRITE8_MEMBER(unknown_output_w); - DECLARE_WRITE8_MEMBER(pending_command_clear_w); DECLARE_WRITE8_MEMBER(sh_bankswitch_w); DECLARE_WRITE16_MEMBER(sprite_character_bank_select_w); DECLARE_WRITE16_MEMBER(tileregs_w); |