summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/audio/irem.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/audio/irem.cpp')
-rw-r--r--src/mame/audio/irem.cpp18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/mame/audio/irem.cpp b/src/mame/audio/irem.cpp
index 99f88d2e45b..57c28493622 100644
--- a/src/mame/audio/irem.cpp
+++ b/src/mame/audio/irem.cpp
@@ -19,7 +19,8 @@ const device_type IREM_M52_LARGE_AUDIO = &device_creator<m52_large_audio_device>
irem_audio_device::irem_audio_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
: device_t(mconfig, type, name, tag, owner, clock, shortname, source),
m_port1(0),
- m_port2(0)
+ m_port2(0),
+ m_soundlatch(*this, "soundlatch")
//m_ay_45L(*this, "ay_45l"),
//m_ay_45M(*this, "ay_45m")
{
@@ -83,9 +84,8 @@ void irem_audio_device::device_start()
WRITE8_MEMBER( irem_audio_device::cmd_w )
{
- driver_device *drvstate = space.machine().driver_data<driver_device>();
if ((data & 0x80) == 0)
- drvstate->soundlatch_byte_w(space, 0, data & 0x7f);
+ m_soundlatch->write(space, 0, data & 0x7f);
else
subdevice("iremsound")->execute().set_input_line(0, ASSERT_LINE);
}
@@ -421,10 +421,12 @@ static MACHINE_CONFIG_FRAGMENT( irem_audio_base )
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_GENERIC_LATCH_8_ADD("soundlatch")
+
MCFG_SOUND_ADD("ay_45m", AY8910, XTAL_3_579545MHz/4) /* verified on pcb */
MCFG_AY8910_OUTPUT_TYPE(AY8910_RESISTOR_OUTPUT)
MCFG_AY8910_RES_LOADS(2000.0, 2000.0, 2000.0)
- MCFG_AY8910_PORT_A_READ_CB(DEVREAD8(":", driver_device, soundlatch_byte_r))
+ MCFG_AY8910_PORT_A_READ_CB(DEVREAD8("soundlatch", generic_latch_8_device, read))
MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(irem_audio_device, ay8910_45M_portb_w))
MCFG_SOUND_ROUTE_EX(0, "snd_nl", 1.0, 0)
MCFG_SOUND_ROUTE_EX(1, "snd_nl", 1.0, 1)
@@ -490,10 +492,12 @@ MACHINE_CONFIG_FRAGMENT( m52_sound_c_audio )
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_GENERIC_LATCH_8_ADD("soundlatch")
+
MCFG_SOUND_ADD("ay_45m", AY8910, XTAL_3_579545MHz/4) /* verified on pcb */
MCFG_AY8910_OUTPUT_TYPE(AY8910_SINGLE_OUTPUT | AY8910_DISCRETE_OUTPUT)
MCFG_AY8910_RES_LOADS(470, 0, 0)
- MCFG_AY8910_PORT_A_READ_CB(DEVREAD8(":", driver_device, soundlatch_byte_r))
+ MCFG_AY8910_PORT_A_READ_CB(DEVREAD8("soundlatch", generic_latch_8_device, read))
MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(irem_audio_device, ay8910_45M_portb_w))
MCFG_SOUND_ROUTE_EX(0, "filtermix", 1.0, 0)
@@ -524,10 +528,12 @@ MACHINE_CONFIG_FRAGMENT( m52_large_audio) /* 10 yard fight */
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_GENERIC_LATCH_8_ADD("soundlatch")
+
MCFG_SOUND_ADD("ay_45m", AY8910, XTAL_3_579545MHz/4) /* verified on pcb */
MCFG_AY8910_OUTPUT_TYPE(AY8910_SINGLE_OUTPUT | AY8910_DISCRETE_OUTPUT)
MCFG_AY8910_RES_LOADS(470, 0, 0)
- MCFG_AY8910_PORT_A_READ_CB(DEVREAD8(":", driver_device, soundlatch_byte_r))
+ MCFG_AY8910_PORT_A_READ_CB(DEVREAD8("soundlatch", generic_latch_8_device, read))
MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(irem_audio_device, ay8910_45M_portb_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80)