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.cpp59
1 files changed, 17 insertions, 42 deletions
diff --git a/src/mame/audio/irem.cpp b/src/mame/audio/irem.cpp
index 32e86ccf5a6..df53d80cdc6 100644
--- a/src/mame/audio/irem.cpp
+++ b/src/mame/audio/irem.cpp
@@ -23,8 +23,11 @@ irem_audio_device::irem_audio_device(const machine_config &mconfig, device_type
, m_port1(0)
, m_port2(0)
, m_soundlatch(0)
- //, m_ay_45L(*this, "ay_45l")
- //, m_ay_45M(*this, "ay_45m")
+ , m_cpu(*this, "iremsound")
+ , m_ay_45L(*this, "ay_45l")
+ , m_ay_45M(*this, "ay_45m")
+ , m_adpcm1(*this, "msm1")
+ , m_adpcm2(*this, "msm2")
, m_audio_BD(*this, "snd_nl:ibd")
, m_audio_SD(*this, "snd_nl:isd")
, m_audio_OH(*this, "snd_nl:ioh")
@@ -53,11 +56,6 @@ m52_large_audio_device::m52_large_audio_device(const machine_config &mconfig, co
void irem_audio_device::device_start()
{
- m_adpcm1 = subdevice<msm5205_device>("msm1");
- m_adpcm2 = subdevice<msm5205_device>("msm2");
- m_ay_45L = subdevice<ay8910_device>("ay_45l");
- m_ay_45M = subdevice<ay8910_device>("ay_45m");
-
m_audio_SINH = subdevice<netlist_mame_logic_input_device>("snd_nl:sinh");
save_item(NAME(m_port1));
@@ -74,12 +72,12 @@ void irem_audio_device::device_reset()
if (m_adpcm2) m_adpcm2->reset();
m_ay_45L->reset();
m_ay_45M->reset();
- subdevice("iremsound")->reset();
+ m_cpu->reset();
m_port1 = 0; // ?
m_port2 = 0; // ?
m_soundlatch = 0;
- subdevice("iremsound")->execute().set_input_line(0, ASSERT_LINE);
+ m_cpu->set_input_line(0, ASSERT_LINE);
}
/*************************************
@@ -93,7 +91,7 @@ WRITE8_MEMBER( irem_audio_device::cmd_w )
{
m_soundlatch = data;
if ((data & 0x80) == 0)
- subdevice("iremsound")->execute().set_input_line(0, ASSERT_LINE);
+ m_cpu->set_input_line(0, ASSERT_LINE);
}
@@ -226,7 +224,7 @@ WRITE8_MEMBER( irem_audio_device::ay8910_45L_porta_w )
WRITE8_MEMBER( irem_audio_device::sound_irq_ack_w )
{
if ((m_soundlatch & 0x80) != 0)
- subdevice("iremsound")->execute().set_input_line(0, CLEAR_LINE);
+ m_cpu->set_input_line(0, CLEAR_LINE);
}
@@ -261,7 +259,7 @@ WRITE8_MEMBER( irem_audio_device::m62_adpcm_w )
void irem_audio_device::adpcm_int(int st)
{
- subdevice("iremsound")->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
+ m_cpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
/* the first MSM5205 clocks the second */
if (m_adpcm2 != nullptr)
@@ -423,16 +421,15 @@ ADDRESS_MAP_END
*
*/
-/*************************************
- *
- * Machine drivers
- *
- *************************************/
+//-------------------------------------------------
+// device_add_mconfig - add device configuration
+//-------------------------------------------------
-static MACHINE_CONFIG_START( irem_audio_base )
+MACHINE_CONFIG_MEMBER( m62_audio_device::device_add_mconfig )
/* basic machine hardware */
MCFG_CPU_ADD("iremsound", M6803, XTAL_3_579545MHz) /* verified on pcb */
+ MCFG_CPU_PROGRAM_MAP(m62_sound_map)
MCFG_CPU_IO_MAP(irem_sound_portmap)
/* sound hardware */
@@ -497,7 +494,7 @@ static MACHINE_CONFIG_START( irem_audio_base )
MACHINE_CONFIG_END
-MACHINE_CONFIG_START( m52_sound_c_audio )
+MACHINE_CONFIG_MEMBER( m52_soundc_audio_device::device_add_mconfig )
/* basic machine hardware */
MCFG_CPU_ADD("iremsound", M6803, XTAL_3_579545MHz) /* verified on pcb */
@@ -531,7 +528,7 @@ MACHINE_CONFIG_START( m52_sound_c_audio )
MACHINE_CONFIG_END
-MACHINE_CONFIG_START( m52_large_audio) /* 10 yard fight */
+MACHINE_CONFIG_MEMBER( m52_large_audio_device::device_add_mconfig ) /* 10 yard fight */
/* basic machine hardware */
MCFG_CPU_ADD("iremsound", M6803, XTAL_3_579545MHz) /* verified on pcb */
@@ -565,25 +562,3 @@ MACHINE_CONFIG_START( m52_large_audio) /* 10 yard fight */
MACHINE_CONFIG_END
-
-MACHINE_CONFIG_DERIVED( m62_audio, irem_audio_base )
-
- /* basic machine hardware */
- MCFG_CPU_MODIFY("iremsound")
- MCFG_CPU_PROGRAM_MAP(m62_sound_map)
-MACHINE_CONFIG_END
-
-machine_config_constructor m62_audio_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME( m62_audio );
-}
-
-machine_config_constructor m52_soundc_audio_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME( m52_sound_c_audio );
-}
-
-machine_config_constructor m52_large_audio_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME( m52_large_audio );
-}