summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/ddenlovr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/ddenlovr.cpp')
-rw-r--r--src/mame/drivers/ddenlovr.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/mame/drivers/ddenlovr.cpp b/src/mame/drivers/ddenlovr.cpp
index 08cf58cde18..725411052d8 100644
--- a/src/mame/drivers/ddenlovr.cpp
+++ b/src/mame/drivers/ddenlovr.cpp
@@ -116,6 +116,7 @@ Notes:
#include "cpu/m68000/m68000.h"
#include "cpu/z80/z80.h"
#include "sound/ay8910.h"
+#include "machine/gen_latch.h"
#include "machine/msm6242.h"
#include "machine/nvram.h"
#include "includes/dynax.h"
@@ -160,13 +161,15 @@ public:
: dynax_state(mconfig, type, tag),
m_dsw_sel16(*this, "dsw_sel16"),
m_protection1(*this, "protection1"),
- m_protection2(*this, "protection2") { }
+ m_protection2(*this, "protection2"),
+ m_soundlatch(*this, "soundlatch") { }
optional_shared_ptr<UINT16> m_dsw_sel16;
optional_shared_ptr<UINT16> m_protection1;
optional_shared_ptr<UINT16> m_protection2;
+ optional_device<generic_latch_8_device> m_soundlatch;
std::unique_ptr<UINT8[]> m_ddenlovr_pixmap[8];
@@ -2415,7 +2418,7 @@ WRITE8_MEMBER(ddenlovr_state::mmpanic_rombank_w)
WRITE8_MEMBER(ddenlovr_state::mmpanic_soundlatch_w)
{
- soundlatch_byte_w(space, 0, data);
+ m_soundlatch->write(space, 0, data);
m_soundcpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
@@ -2524,7 +2527,7 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( mmpanic_sound_portmap, AS_IO, 8, ddenlovr_state )
ADDRESS_MAP_GLOBAL_MASK(0xff)
- AM_RANGE(0x00, 0x00) AM_READ(soundlatch_byte_r)
+ AM_RANGE(0x00, 0x00) AM_DEVREAD("soundlatch", generic_latch_8_device, read)
AM_RANGE(0x02, 0x02) AM_READNOP // read just before port 00
AM_RANGE(0x04, 0x04) AM_NOP // read only once at the start
AM_RANGE(0x06, 0x06) AM_WRITENOP // almost always 1, sometimes 0
@@ -2657,7 +2660,7 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( funkyfig_sound_portmap, AS_IO, 8, ddenlovr_state )
ADDRESS_MAP_GLOBAL_MASK(0xff)
- AM_RANGE(0x02, 0x02) AM_READ(soundlatch_byte_r)
+ AM_RANGE(0x02, 0x02) AM_DEVREAD("soundlatch", generic_latch_8_device, read)
AM_RANGE(0x04, 0x04) AM_READNOP // read only once at the start
ADDRESS_MAP_END
@@ -9953,6 +9956,8 @@ static MACHINE_CONFIG_START( mmpanic, ddenlovr_state )
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_GENERIC_LATCH_8_ADD("soundlatch")
+
MCFG_SOUND_ADD("ym2413", YM2413, 3579545)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80)