summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author AJR <ajrhacker@users.noreply.github.com>2017-06-21 22:33:02 -0400
committer AJR <ajrhacker@users.noreply.github.com>2017-06-21 22:33:02 -0400
commit58823febb702e46ace51098084211c2c95e8cbcf (patch)
treec02553d18649359379eb60890eae321affc7e0e5
parent90cf93ac4d86bab9703efae187157873a12124f4 (diff)
renegade, spdodgeb: Soundlatch modernization (nw)
-rw-r--r--src/mame/drivers/renegade.cpp9
-rw-r--r--src/mame/drivers/spdodgeb.cpp9
-rw-r--r--src/mame/includes/renegade.h1
-rw-r--r--src/mame/includes/spdodgeb.h1
4 files changed, 4 insertions, 16 deletions
diff --git a/src/mame/drivers/renegade.cpp b/src/mame/drivers/renegade.cpp
index f41f2be449e..5e08ffce6ea 100644
--- a/src/mame/drivers/renegade.cpp
+++ b/src/mame/drivers/renegade.cpp
@@ -169,12 +169,6 @@ WRITE_LINE_MEMBER(renegade_state::adpcm_int)
}
}
-WRITE8_MEMBER(renegade_state::sound_w)
-{
- m_soundlatch->write(space, offset, data);
- m_audiocpu->set_input_line(M6809_IRQ_LINE, HOLD_LINE);
-}
-
void renegade_state::machine_start()
{
m_rombank->configure_entries(0, 2, memregion("maincpu")->base(), 0x4000);
@@ -245,7 +239,7 @@ static ADDRESS_MAP_START( renegade_nomcu_map, AS_PROGRAM, 8, renegade_state )
AM_RANGE(0x3100, 0x31ff) AM_RAM_DEVWRITE("palette", palette_device, write_ext) AM_SHARE("palette_ext")
AM_RANGE(0x3800, 0x3800) AM_READ_PORT("IN0") AM_WRITE(scroll_lsb_w) /* Player#1 controls, P1,P2 start */
AM_RANGE(0x3801, 0x3801) AM_READ_PORT("IN1") AM_WRITE(scroll_msb_w) /* Player#2 controls, coin triggers */
- AM_RANGE(0x3802, 0x3802) AM_READ_PORT("DSW2") AM_WRITE(sound_w) /* DIP2 various IO ports */
+ AM_RANGE(0x3802, 0x3802) AM_READ_PORT("DSW2") AM_DEVWRITE("soundlatch", generic_latch_8_device, write) /* DIP2 various IO ports */
AM_RANGE(0x3803, 0x3803) AM_READ_PORT("DSW1") AM_WRITE(flipscreen_w) /* DIP1 */
AM_RANGE(0x3805, 0x3805) AM_READNOP AM_WRITE(bankswitch_w)
AM_RANGE(0x3806, 0x3806) AM_WRITENOP // ?? watchdog
@@ -498,6 +492,7 @@ static MACHINE_CONFIG_START( renegade )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_GENERIC_LATCH_8_ADD("soundlatch")
+ MCFG_GENERIC_LATCH_DATA_PENDING_CB(INPUTLINE("audiocpu", M6809_IRQ_LINE))
MCFG_SOUND_ADD("ymsnd", YM3526, 12000000/4)
MCFG_YM3526_IRQ_HANDLER(INPUTLINE("audiocpu", M6809_FIRQ_LINE))
diff --git a/src/mame/drivers/spdodgeb.cpp b/src/mame/drivers/spdodgeb.cpp
index df965abe70d..3190bdc168d 100644
--- a/src/mame/drivers/spdodgeb.cpp
+++ b/src/mame/drivers/spdodgeb.cpp
@@ -32,12 +32,6 @@ Notes:
#include "speaker.h"
-WRITE8_MEMBER(spdodgeb_state::sound_command_w)
-{
- m_soundlatch->write(space, offset, data);
- m_audiocpu->set_input_line(M6809_IRQ_LINE, HOLD_LINE);
-}
-
WRITE8_MEMBER(spdodgeb_state::spd_adpcm_w)
{
int chip = offset & 1;
@@ -248,7 +242,7 @@ static ADDRESS_MAP_START( spdodgeb_map, AS_PROGRAM, 8, spdodgeb_state )
AM_RANGE(0x2000, 0x2fff) AM_RAM_WRITE(videoram_w) AM_SHARE("videoram")
AM_RANGE(0x3000, 0x3000) AM_READ_PORT("IN0") //AM_WRITENOP
AM_RANGE(0x3001, 0x3001) AM_READ_PORT("DSW") //AM_WRITENOP
- AM_RANGE(0x3002, 0x3002) AM_WRITE(sound_command_w)
+ AM_RANGE(0x3002, 0x3002) AM_DEVWRITE("soundlatch", generic_latch_8_device, write)
// AM_RANGE(0x3003, 0x3003) AM_WRITENOP
AM_RANGE(0x3004, 0x3004) AM_WRITE(scrollx_lo_w)
// AM_RANGE(0x3005, 0x3005) AM_WRITENOP /* mcu63701_output_w */
@@ -433,6 +427,7 @@ static MACHINE_CONFIG_START( spdodgeb )
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
MCFG_GENERIC_LATCH_8_ADD("soundlatch")
+ MCFG_GENERIC_LATCH_DATA_PENDING_CB(INPUTLINE("audiocpu", M6809_IRQ_LINE))
MCFG_SOUND_ADD("ymsnd", YM3812, XTAL_12MHz/4)
MCFG_YM3812_IRQ_HANDLER(INPUTLINE("audiocpu", M6809_FIRQ_LINE))
diff --git a/src/mame/includes/renegade.h b/src/mame/includes/renegade.h
index 44f156b3cbf..dd5e477e715 100644
--- a/src/mame/includes/renegade.h
+++ b/src/mame/includes/renegade.h
@@ -48,7 +48,6 @@ public:
tilemap_t *m_bg_tilemap;
tilemap_t *m_fg_tilemap;
- DECLARE_WRITE8_MEMBER(sound_w);
DECLARE_READ8_MEMBER(mcu_reset_r);
DECLARE_WRITE8_MEMBER(bankswitch_w);
DECLARE_WRITE8_MEMBER(coincounter_w);
diff --git a/src/mame/includes/spdodgeb.h b/src/mame/includes/spdodgeb.h
index 3139e0f428e..1f97cf91465 100644
--- a/src/mame/includes/spdodgeb.h
+++ b/src/mame/includes/spdodgeb.h
@@ -61,7 +61,6 @@ public:
tilemap_t *m_bg_tilemap;
int m_lastscroll;
- DECLARE_WRITE8_MEMBER(sound_command_w);
DECLARE_WRITE8_MEMBER(spd_adpcm_w);
DECLARE_READ8_MEMBER(mcu63701_r);
DECLARE_WRITE8_MEMBER(mcu63701_w);