summaryrefslogtreecommitdiffstats
path: root/src/mame/audio
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/audio')
-rw-r--r--src/mame/audio/alesis.cpp12
-rw-r--r--src/mame/audio/asteroid.cpp16
-rw-r--r--src/mame/audio/astrof.cpp5
-rw-r--r--src/mame/audio/atarijsa.cpp30
-rw-r--r--src/mame/audio/avalnche.cpp22
-rw-r--r--src/mame/audio/bwidow.cpp2
-rw-r--r--src/mame/audio/cage.cpp41
-rw-r--r--src/mame/audio/cage.h3
-rw-r--r--src/mame/audio/carnival.cpp4
-rw-r--r--src/mame/audio/cmi01a.cpp32
-rw-r--r--src/mame/audio/cmi01a.h12
-rw-r--r--src/mame/audio/csd.cpp20
-rw-r--r--src/mame/audio/csd.h4
-rw-r--r--src/mame/audio/exidy.cpp47
-rw-r--r--src/mame/audio/exidy440.cpp21
-rw-r--r--src/mame/audio/gottlieb.cpp79
-rw-r--r--src/mame/audio/harddriv.cpp15
-rw-r--r--src/mame/audio/irem.cpp12
-rw-r--r--src/mame/audio/leland.cpp30
-rw-r--r--src/mame/audio/llander.cpp8
-rw-r--r--src/mame/audio/midway.cpp44
-rw-r--r--src/mame/audio/n8080.cpp3
-rw-r--r--src/mame/audio/nichisnd.cpp18
-rw-r--r--src/mame/audio/nl_kidniki.cpp31
-rw-r--r--src/mame/audio/nl_zac1b11142.cpp2
-rw-r--r--src/mame/audio/redalert.cpp16
-rw-r--r--src/mame/audio/s11c_bg.cpp25
-rw-r--r--src/mame/audio/segag80r.cpp1
-rw-r--r--src/mame/audio/snk6502.cpp1
-rw-r--r--src/mame/audio/spacefb.cpp1
-rw-r--r--src/mame/audio/spiders.cpp9
-rw-r--r--src/mame/audio/sprint8.cpp37
-rw-r--r--src/mame/audio/t5182.cpp12
-rw-r--r--src/mame/audio/taito_en.cpp15
-rw-r--r--src/mame/audio/taito_en.h1
-rw-r--r--src/mame/audio/targ.cpp2
-rw-r--r--src/mame/audio/timeplt.cpp8
-rw-r--r--src/mame/audio/timeplt.h3
-rw-r--r--src/mame/audio/tx1.cpp38
-rw-r--r--src/mame/audio/williams.cpp132
-rw-r--r--src/mame/audio/williams.h70
-rw-r--r--src/mame/audio/wpcsnd.cpp21
-rw-r--r--src/mame/audio/wswan.cpp2
-rw-r--r--src/mame/audio/wswan.h2
-rw-r--r--src/mame/audio/zaccaria.cpp13
45 files changed, 476 insertions, 446 deletions
diff --git a/src/mame/audio/alesis.cpp b/src/mame/audio/alesis.cpp
index 39fb0609fb6..135a301dae7 100644
--- a/src/mame/audio/alesis.cpp
+++ b/src/mame/audio/alesis.cpp
@@ -41,15 +41,17 @@ alesis_dm3ag_device::alesis_dm3ag_device(const machine_config &mconfig, const ch
// device_add_mconfig
//-------------------------------------------------
-MACHINE_CONFIG_START(alesis_dm3ag_device::device_add_mconfig)
+void alesis_dm3ag_device::device_add_mconfig(machine_config &config)
+{
SPEAKER(config, "lspeaker1").front_left();
SPEAKER(config, "rspeaker1").front_right();
SPEAKER(config, "lspeaker2").front_left();
SPEAKER(config, "rspeaker2").front_right();
- MCFG_DEVICE_ADD("dac", PCM54HP, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker1", 1.0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker1", 1.0) // PCM54HP DAC + R63/R73-75 + Sample and hold
- MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
- MCFG_SOUND_ROUTE(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
-MACHINE_CONFIG_END
+ PCM54HP(config, m_dac, 0).add_route(ALL_OUTPUTS, "lspeaker1", 1.0).add_route(ALL_OUTPUTS, "rspeaker1", 1.0); // PCM54HP DAC + R63/R73-75 + Sample and hold
+ voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref"));
+ vref.add_route(0, "dac", 1.0, DAC_VREF_POS_INPUT);
+ vref.add_route(0, "dac", -1.0, DAC_VREF_NEG_INPUT);
+}
//-------------------------------------------------
// device_start - device-specific startup
diff --git a/src/mame/audio/asteroid.cpp b/src/mame/audio/asteroid.cpp
index bfc5bb773f7..cbae5ac9efb 100644
--- a/src/mame/audio/asteroid.cpp
+++ b/src/mame/audio/asteroid.cpp
@@ -315,11 +315,11 @@ WRITE8_MEMBER(asteroid_state::asteroid_noise_reset_w)
}
-MACHINE_CONFIG_START(asteroid_state::asteroid_sound)
+void asteroid_state::asteroid_sound(machine_config &config)
+{
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD("discrete", DISCRETE, asteroid_discrete)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.4)
+ DISCRETE(config, m_discrete, asteroid_discrete).add_route(ALL_OUTPUTS, "mono", 1.4);
ls259_device &audiolatch(LS259(config, "audiolatch")); // M10
audiolatch.q_out_cb<0>().set("discrete", FUNC(discrete_device::write_line<ASTEROID_SAUCER_SND_EN>));
@@ -328,15 +328,15 @@ MACHINE_CONFIG_START(asteroid_state::asteroid_sound)
audiolatch.q_out_cb<3>().set("discrete", FUNC(discrete_device::write_line<ASTEROID_THRUST_EN>));
audiolatch.q_out_cb<4>().set("discrete", FUNC(discrete_device::write_line<ASTEROID_SHIP_FIRE_EN>));
audiolatch.q_out_cb<5>().set("discrete", FUNC(discrete_device::write_line<ASTEROID_LIFE_EN>));
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(asteroid_state::astdelux_sound)
+void asteroid_state::astdelux_sound(machine_config &config)
+{
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD("discrete", DISCRETE, astdelux_discrete)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ DISCRETE(config, m_discrete, astdelux_discrete).add_route(ALL_OUTPUTS, "mono", 1.0);
ls259_device &audiolatch(LS259(config, "audiolatch")); // M10
audiolatch.q_out_cb<3>().set("discrete", FUNC(discrete_device::write_line<ASTEROID_THRUST_EN>));
-MACHINE_CONFIG_END
+}
diff --git a/src/mame/audio/astrof.cpp b/src/mame/audio/astrof.cpp
index 89e334a6672..663013e1bc8 100644
--- a/src/mame/audio/astrof.cpp
+++ b/src/mame/audio/astrof.cpp
@@ -162,9 +162,10 @@ WRITE8_MEMBER(astrof_state::spfghmk2_audio_w)
}
-MACHINE_CONFIG_START(astrof_state::spfghmk2_audio)
+void astrof_state::spfghmk2_audio(machine_config &config)
+{
/* nothing yet */
-MACHINE_CONFIG_END
+}
diff --git a/src/mame/audio/atarijsa.cpp b/src/mame/audio/atarijsa.cpp
index 23b8dacbf5e..51869806fe1 100644
--- a/src/mame/audio/atarijsa.cpp
+++ b/src/mame/audio/atarijsa.cpp
@@ -364,11 +364,11 @@ READ8_MEMBER( atari_jsa_oki_base_device::oki_r )
{
// JSA IIIs selects the 2nd OKI via the low bit, so select it
if (m_oki2 != nullptr && offset == 1)
- return m_oki2->read(space, offset);
+ return m_oki2->read();
// OKI may not be populated at all
else if (m_oki1 != nullptr)
- return m_oki1->read(space, offset);
+ return m_oki1->read();
// if not present, return all 0xff
return 0xff;
@@ -384,11 +384,11 @@ WRITE8_MEMBER( atari_jsa_oki_base_device::oki_w )
{
// JSA IIIs selects the 2nd OKI via the low bit, so select it
if (m_oki2 != nullptr && offset == 1)
- m_oki2->write(space, offset, data);
+ m_oki2->write(data);
// OKI may not be populated at all
else if (m_oki1 != nullptr)
- m_oki1->write(space, offset, data);
+ m_oki1->write(data);
}
@@ -676,7 +676,7 @@ WRITE8_MEMBER( atari_jsa_i_device::tms5220_voice )
READ8_MEMBER( atari_jsa_i_device::pokey_r )
{
if (m_pokey != nullptr)
- return m_pokey->read(space, offset);
+ return m_pokey->read(offset);
return 0xff;
}
@@ -689,7 +689,7 @@ READ8_MEMBER( atari_jsa_i_device::pokey_r )
WRITE8_MEMBER( atari_jsa_i_device::pokey_w )
{
if (m_pokey != nullptr)
- m_pokey->write(space, offset, data);
+ m_pokey->write(offset, data);
}
@@ -698,8 +698,8 @@ WRITE8_MEMBER( atari_jsa_i_device::pokey_w )
//-------------------------------------------------
// Fully populated JSA-I, not used by anyone
-MACHINE_CONFIG_START(atari_jsa_i_device::device_add_mconfig)
-
+void atari_jsa_i_device::device_add_mconfig(machine_config &config)
+{
// basic machine hardware
M6502(config, m_jsacpu, JSA_MASTER_CLOCK/2);
m_jsacpu->set_addrmap(AS_PROGRAM, &atari_jsa_i_device::atarijsa1_map);
@@ -715,14 +715,14 @@ MACHINE_CONFIG_START(atari_jsa_i_device::device_add_mconfig)
m_ym2151->add_route(0, *this, 0.60, AUTO_ALLOC_INPUT, 0);
m_ym2151->add_route(1, *this, 0.60, AUTO_ALLOC_INPUT, 1);
- MCFG_DEVICE_ADD("pokey", POKEY, JSA_MASTER_CLOCK/2)
- MCFG_MIXER_ROUTE(ALL_OUTPUTS, *this, 0.40, 0)
- MCFG_MIXER_ROUTE(ALL_OUTPUTS, *this, 0.40, 1)
+ POKEY(config, m_pokey, JSA_MASTER_CLOCK/2);
+ m_pokey->add_route(ALL_OUTPUTS, *this, 0.40, AUTO_ALLOC_INPUT, 0);
+ m_pokey->add_route(ALL_OUTPUTS, *this, 0.40, AUTO_ALLOC_INPUT, 1);
- MCFG_DEVICE_ADD("tms", TMS5220C, JSA_MASTER_CLOCK*2/11) // potentially JSA_MASTER_CLOCK/9 as well
- MCFG_MIXER_ROUTE(ALL_OUTPUTS, *this, 1.0, 0)
- MCFG_MIXER_ROUTE(ALL_OUTPUTS, *this, 1.0, 1)
-MACHINE_CONFIG_END
+ TMS5220C(config, m_tms5220, JSA_MASTER_CLOCK*2/11); // potentially JSA_MASTER_CLOCK/9 as well
+ m_tms5220->add_route(ALL_OUTPUTS, *this, 1.0, AUTO_ALLOC_INPUT, 0);
+ m_tms5220->add_route(ALL_OUTPUTS, *this, 1.0, AUTO_ALLOC_INPUT, 1);
+}
//-------------------------------------------------
diff --git a/src/mame/audio/avalnche.cpp b/src/mame/audio/avalnche.cpp
index 3200bd8576f..471c73a8e5c 100644
--- a/src/mame/audio/avalnche.cpp
+++ b/src/mame/audio/avalnche.cpp
@@ -102,25 +102,27 @@ static DISCRETE_SOUND_START(avalnche_discrete)
DISCRETE_SOUND_END
-MACHINE_CONFIG_START(avalnche_state::avalnche_sound)
+void avalnche_state::avalnche_sound(machine_config &config)
+{
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD("discrete", DISCRETE, avalnche_discrete)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ DISCRETE(config, m_discrete, avalnche_discrete).add_route(ALL_OUTPUTS, "mono", 1.0);
- m_latch->q_out_cb<1>().set("discrete", FUNC(discrete_device::write_line<AVALNCHE_ATTRACT_EN>));
- m_latch->q_out_cb<4>().set("discrete", FUNC(discrete_device::write_line<AVALNCHE_AUD0_EN>));
- m_latch->q_out_cb<5>().set("discrete", FUNC(discrete_device::write_line<AVALNCHE_AUD1_EN>));
- m_latch->q_out_cb<6>().set("discrete", FUNC(discrete_device::write_line<AVALNCHE_AUD2_EN>));
-MACHINE_CONFIG_END
+ m_latch->q_out_cb<1>().set(m_discrete, FUNC(discrete_device::write_line<AVALNCHE_ATTRACT_EN>));
+ m_latch->q_out_cb<4>().set(m_discrete, FUNC(discrete_device::write_line<AVALNCHE_AUD0_EN>));
+ m_latch->q_out_cb<5>().set(m_discrete, FUNC(discrete_device::write_line<AVALNCHE_AUD1_EN>));
+ m_latch->q_out_cb<6>().set(m_discrete, FUNC(discrete_device::write_line<AVALNCHE_AUD2_EN>));
+}
-MACHINE_CONFIG_START(avalnche_state::acatch_sound) // just a stub here...
+void avalnche_state::acatch_sound(machine_config &config)
+{
+ // just a stub here...
m_latch->q_out_cb<1>().set_nop(); // It is attract_enable just like avalnche, but not hooked up yet.
m_latch->q_out_cb<4>().set(FUNC(avalnche_state::catch_aud0_w));
m_latch->q_out_cb<5>().set(FUNC(avalnche_state::catch_aud1_w));
m_latch->q_out_cb<6>().set(FUNC(avalnche_state::catch_aud2_w));
-MACHINE_CONFIG_END
+}
/***************************************************************************
diff --git a/src/mame/audio/bwidow.cpp b/src/mame/audio/bwidow.cpp
index 0384035ff91..e2d2d6c6b2c 100644
--- a/src/mame/audio/bwidow.cpp
+++ b/src/mame/audio/bwidow.cpp
@@ -165,7 +165,7 @@ void bwidow_state::bwidow_audio(machine_config &config)
DISCRETE(config, "discrete", bwidow_discrete).add_route(ALL_OUTPUTS, "mono", 1.0);
- //MCFG_QUANTUM_PERFECT_CPU("pokey1")
+ //config.m_perfect_cpu_quantum = subtag("pokey1");
}
void bwidow_state::gravitar_audio(machine_config &config)
diff --git a/src/mame/audio/cage.cpp b/src/mame/audio/cage.cpp
index 6d4167b254f..71be3313f6a 100644
--- a/src/mame/audio/cage.cpp
+++ b/src/mame/audio/cage.cpp
@@ -119,8 +119,8 @@ atari_cage_device::atari_cage_device(const machine_config &mconfig, const char *
atari_cage_device::atari_cage_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) :
device_t(mconfig, type, tag, owner, clock),
- m_cageram(*this, "cageram"),
m_cpu(*this, "cpu"),
+ m_cageram(*this, "cageram"),
m_soundlatch(*this, "soundlatch"),
m_dma_timer(*this, "cage_dma_timer"),
m_timer(*this, "cage_timer%u", 0U),
@@ -612,16 +612,16 @@ void atari_cage_seattle_device::cage_map_seattle(address_map &map)
// machine_add_config - add device configuration
//-------------------------------------------------
-MACHINE_CONFIG_START(atari_cage_device::device_add_mconfig)
-
+void atari_cage_device::device_add_mconfig(machine_config &config)
+{
/* basic machine hardware */
TMS32031(config, m_cpu, 33868800);
m_cpu->set_addrmap(AS_PROGRAM, &atari_cage_device::cage_map);
m_cpu->set_mcbl_mode(true);
- MCFG_TIMER_DEVICE_ADD("cage_dma_timer", DEVICE_SELF, atari_cage_device, dma_timer_callback)
- MCFG_TIMER_DEVICE_ADD("cage_timer0", DEVICE_SELF, atari_cage_device, cage_timer_callback)
- MCFG_TIMER_DEVICE_ADD("cage_timer1", DEVICE_SELF, atari_cage_device, cage_timer_callback)
+ TIMER(config, m_dma_timer).configure_generic(DEVICE_SELF, FUNC(atari_cage_device::dma_timer_callback));
+ TIMER(config, m_timer[0]).configure_generic(DEVICE_SELF, FUNC(atari_cage_device::cage_timer_callback));
+ TIMER(config, m_timer[1]).configure_generic(DEVICE_SELF, FUNC(atari_cage_device::cage_timer_callback));
/* sound hardware */
SPEAKER(config, "lspeaker").front_left();
@@ -630,25 +630,19 @@ MACHINE_CONFIG_START(atari_cage_device::device_add_mconfig)
GENERIC_LATCH_16(config, m_soundlatch);
#if (DAC_BUFFER_CHANNELS == 4)
- MCFG_DEVICE_ADD("dac1", DMADAC)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.50)
+ DMADAC(config, m_dmadac[0]).add_route(ALL_OUTPUTS, "rspeaker", 0.50);
- MCFG_DEVICE_ADD("dac2", DMADAC)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.50)
+ DMADAC(config, m_dmadac[1]).add_route(ALL_OUTPUTS, "lspeaker", 0.50);
- MCFG_DEVICE_ADD("dac3", DMADAC)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.50)
+ DMADAC(config, m_dmadac[2]).add_route(ALL_OUTPUTS, "lspeaker", 0.50);
- MCFG_DEVICE_ADD("dac4", DMADAC)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.50)
+ DMADAC(config, m_dmadac[3]).add_route(ALL_OUTPUTS, "rspeaker", 0.50);
#else
- MCFG_DEVICE_ADD("dac1", DMADAC)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0)
+ DMADAC(config, m_dmadac[0]).add_route(ALL_OUTPUTS, "lspeaker", 1.0);
- MCFG_DEVICE_ADD("dac2", DMADAC)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0)
+ DMADAC(config, m_dmadac[1]).add_route(ALL_OUTPUTS, "rspeaker", 1.0);
#endif
-MACHINE_CONFIG_END
+}
DEFINE_DEVICE_TYPE(ATARI_CAGE_SEATTLE, atari_cage_seattle_device, "atari_cage_seattle", "Atari CAGE Seattle")
@@ -669,10 +663,9 @@ atari_cage_seattle_device::atari_cage_seattle_device(const machine_config &mconf
//-------------------------------------------------
-MACHINE_CONFIG_START(atari_cage_seattle_device::device_add_mconfig)
-
+void atari_cage_seattle_device::device_add_mconfig(machine_config &config)
+{
atari_cage_device::device_add_mconfig(config);
- MCFG_DEVICE_MODIFY("cpu")
- MCFG_DEVICE_PROGRAM_MAP(cage_map_seattle)
-MACHINE_CONFIG_END
+ m_cpu->set_addrmap(AS_PROGRAM, &atari_cage_seattle_device::cage_map_seattle);
+}
diff --git a/src/mame/audio/cage.h b/src/mame/audio/cage.h
index e8230aae377..66c86f06cba 100644
--- a/src/mame/audio/cage.h
+++ b/src/mame/audio/cage.h
@@ -64,9 +64,10 @@ protected:
TIMER_DEVICE_CALLBACK_MEMBER( dma_timer_callback );
TIMER_DEVICE_CALLBACK_MEMBER( cage_timer_callback );
+ required_device<tms32031_device> m_cpu;
+
private:
required_shared_ptr<uint32_t> m_cageram;
- required_device<tms32031_device> m_cpu;
required_device<generic_latch_16_device> m_soundlatch;
required_device<timer_device> m_dma_timer;
required_device_array<timer_device, 2> m_timer;
diff --git a/src/mame/audio/carnival.cpp b/src/mame/audio/carnival.cpp
index d3bc5db7cc7..4709c274de4 100644
--- a/src/mame/audio/carnival.cpp
+++ b/src/mame/audio/carnival.cpp
@@ -162,9 +162,9 @@ void vicdual_state::carnival_psg_latch(address_space &space)
{
// BDIR W, BC1 selects address or data
if (m_psgBus & 2)
- m_psg->address_w(space, 0, m_psgData);
+ m_psg->address_w(m_psgData);
else
- m_psg->data_w(space, 0, m_psgData);
+ m_psg->data_w(m_psgData);
}
}
diff --git a/src/mame/audio/cmi01a.cpp b/src/mame/audio/cmi01a.cpp
index ad3899ac48a..0ec40b75a69 100644
--- a/src/mame/audio/cmi01a.cpp
+++ b/src/mame/audio/cmi01a.cpp
@@ -26,7 +26,8 @@ cmi01a_device::cmi01a_device(const machine_config &mconfig, const char *tag, dev
{
}
-MACHINE_CONFIG_START(cmi01a_device::device_add_mconfig)
+void cmi01a_device::device_add_mconfig(machine_config &config)
+{
PIA6821(config, m_pia[0], 0); // pia_cmi01a_1_config
m_pia[0]->readcb1_handler().set(FUNC(cmi01a_device::tri_r));
m_pia[0]->writepa_handler().set(FUNC(cmi01a_device::ws_dir_w));
@@ -49,9 +50,8 @@ MACHINE_CONFIG_START(cmi01a_device::device_add_mconfig)
m_ptm->o1_callback().set(FUNC(cmi01a_device::ptm_o1));
m_ptm->irq_callback().set("cmi01a_irq", FUNC(input_merger_device::in_w<4>));
- MCFG_INPUT_MERGER_ANY_HIGH("cmi01a_irq")
- MCFG_INPUT_MERGER_OUTPUT_HANDLER(WRITELINE(*this, cmi01a_device, cmi01a_irq))
-MACHINE_CONFIG_END
+ INPUT_MERGER_ANY_HIGH(config, "cmi01a_irq").output_handler().set(FUNC(cmi01a_device::cmi01a_irq));
+}
void cmi01a_device::sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples)
@@ -124,21 +124,21 @@ WRITE_LINE_MEMBER( cmi01a_device::pia_0_ca2_w )
}
}
-WRITE8_MEMBER( cmi01a_device::pia_1_a_w )
+void cmi01a_device::pia_1_a_w(uint8_t data)
{
// top two
}
-WRITE8_MEMBER( cmi01a_device::pia_1_b_w )
+void cmi01a_device::pia_1_b_w(uint8_t data)
{
}
-WRITE8_MEMBER( cmi01a_device::rp_w )
+void cmi01a_device::rp_w(uint8_t data)
{
m_rp = data;
}
-WRITE8_MEMBER( cmi01a_device::ws_dir_w )
+void cmi01a_device::ws_dir_w(uint8_t data)
{
m_ws = data & 0x7f;
m_dir = (data >> 7) & 1;
@@ -304,7 +304,7 @@ READ_LINE_MEMBER( cmi01a_device::zx_r )
return m_segment_cnt & 0x40;
}
-WRITE8_MEMBER( cmi01a_device::write )
+void cmi01a_device::write(offs_t offset, uint8_t data)
{
//printf("C%d W: %02x = %02x\n", m_channel, offset, data);
@@ -335,11 +335,11 @@ WRITE8_MEMBER( cmi01a_device::write )
break;
case 0x8: case 0x9: case 0xa: case 0xb:
- m_pia[0]->write(space, offset & 3, data);
+ m_pia[0]->write(offset & 3, data);
break;
case 0xc: case 0xd: case 0xe: case 0xf:
- m_pia[1]->write(space, (BIT(offset, 0) << 1) | BIT(offset, 1), data);
+ m_pia[1]->write((BIT(offset, 0) << 1) | BIT(offset, 1), data);
break;
case 0x10: case 0x11: case 0x12: case 0x13: case 0x14: case 0x15: case 0x16: case 0x17:
@@ -350,7 +350,7 @@ WRITE8_MEMBER( cmi01a_device::write )
int a2 = BIT(offset, 1);
//printf("CH%d PTM W: [%x] = %02x\n", m_channel, (a2 << 2) | (a1 << 1) | a0, data);
- m_ptm->write(space, (a2 << 2) | (a1 << 1) | a0, data);
+ m_ptm->write((a2 << 2) | (a1 << 1) | a0, data);
break;
}
@@ -360,7 +360,7 @@ WRITE8_MEMBER( cmi01a_device::write )
}
}
-READ8_MEMBER( cmi01a_device::read )
+uint8_t cmi01a_device::read(offs_t offset)
{
if (machine().side_effects_disabled())
return 0;
@@ -392,11 +392,11 @@ READ8_MEMBER( cmi01a_device::read )
break;
case 0x8: case 0x9: case 0xa: case 0xb:
- data = m_pia[0]->read(space, offset & 3);
+ data = m_pia[0]->read(offset & 3);
break;
case 0xc: case 0xd: case 0xe: case 0xf:
- data = m_pia[1]->read(space, (BIT(offset, 0) << 1) | BIT(offset, 1));
+ data = m_pia[1]->read((BIT(offset, 0) << 1) | BIT(offset, 1));
break;
case 0x10: case 0x11: case 0x12: case 0x13: case 0x14: case 0x15: case 0x16: case 0x17:
@@ -405,7 +405,7 @@ READ8_MEMBER( cmi01a_device::read )
int a1 = (m_ptm_o1 && BIT(offset, 3)) || (!BIT(offset, 3) && BIT(offset, 2));
int a2 = BIT(offset, 1);
- data = m_ptm->read(space, (a2 << 2) | (a1 << 1) | a0);
+ data = m_ptm->read((a2 << 2) | (a1 << 1) | a0);
//printf("CH%d PTM R: [%x] %02x\n", m_channel, (a2 << 2) | (a1 << 1) | a0, data);
break;
diff --git a/src/mame/audio/cmi01a.h b/src/mame/audio/cmi01a.h
index 97685b7f624..a0bfb603418 100644
--- a/src/mame/audio/cmi01a.h
+++ b/src/mame/audio/cmi01a.h
@@ -22,8 +22,8 @@ public:
auto irq_callback() { return m_irq_cb.bind(); }
- DECLARE_WRITE8_MEMBER( write );
- DECLARE_READ8_MEMBER( read );
+ void write(offs_t offset, uint8_t data);
+ uint8_t read(offs_t offset);
virtual void sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples) override;
@@ -71,16 +71,16 @@ private:
devcb_write_line m_irq_cb;
- DECLARE_WRITE8_MEMBER( rp_w );
- DECLARE_WRITE8_MEMBER( ws_dir_w );
+ void rp_w(uint8_t data);
+ void ws_dir_w(uint8_t data);
DECLARE_READ_LINE_MEMBER( tri_r );
DECLARE_WRITE_LINE_MEMBER( pia_0_ca2_w );
DECLARE_WRITE_LINE_MEMBER( pia_0_cb2_w );
DECLARE_READ_LINE_MEMBER( eosi_r );
DECLARE_READ_LINE_MEMBER( zx_r );
- DECLARE_WRITE8_MEMBER( pia_1_a_w );
- DECLARE_WRITE8_MEMBER( pia_1_b_w );
+ void pia_1_a_w(uint8_t data);
+ void pia_1_b_w(uint8_t data);
DECLARE_WRITE_LINE_MEMBER( ptm_o1 );
};
diff --git a/src/mame/audio/csd.cpp b/src/mame/audio/csd.cpp
index 416c3143353..9baf3792fed 100644
--- a/src/mame/audio/csd.cpp
+++ b/src/mame/audio/csd.cpp
@@ -36,9 +36,10 @@ void midway_cheap_squeak_deluxe_device::csdeluxe_map(address_map &map)
// machine configuration
//-------------------------------------------------
-MACHINE_CONFIG_START(midway_cheap_squeak_deluxe_device::device_add_mconfig)
- MCFG_DEVICE_ADD("cpu", M68000, DERIVED_CLOCK(1, 2))
- MCFG_DEVICE_PROGRAM_MAP(csdeluxe_map)
+void midway_cheap_squeak_deluxe_device::device_add_mconfig(machine_config &config)
+{
+ M68000(config, m_cpu, DERIVED_CLOCK(1, 2));
+ m_cpu->set_addrmap(AS_PROGRAM, &midway_cheap_squeak_deluxe_device::csdeluxe_map);
PIA6821(config, m_pia, 0);
m_pia->writepa_handler().set(FUNC(midway_cheap_squeak_deluxe_device::porta_w));
@@ -46,10 +47,11 @@ MACHINE_CONFIG_START(midway_cheap_squeak_deluxe_device::device_add_mconfig)
m_pia->irqa_handler().set(FUNC(midway_cheap_squeak_deluxe_device::irq_w));
m_pia->irqb_handler().set(FUNC(midway_cheap_squeak_deluxe_device::irq_w));
- MCFG_DEVICE_ADD("dac", AD7533, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, *this, 1.0)
- MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
- MCFG_SOUND_ROUTE(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
-MACHINE_CONFIG_END
+ AD7533(config, m_dac, 0).add_route(ALL_OUTPUTS, *this, 1.0);
+ voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref"));
+ vref.add_route(0, "dac", 1.0, DAC_VREF_POS_INPUT);
+ vref.add_route(0, "dac", -1.0, DAC_VREF_NEG_INPUT);
+}
//-------------------------------------------------
// rom_region - device-specific ROM region
@@ -116,7 +118,7 @@ void midway_cheap_squeak_deluxe_device::suspend_cpu()
// stat_r - return the status value
//-------------------------------------------------
-READ8_MEMBER( midway_cheap_squeak_deluxe_device::stat_r )
+u8 midway_cheap_squeak_deluxe_device::stat_r()
{
return m_status;
}
@@ -125,7 +127,7 @@ READ8_MEMBER( midway_cheap_squeak_deluxe_device::stat_r )
// sr_w - external 4-bit write to the input latch
//-------------------------------------------------
-WRITE8_MEMBER( midway_cheap_squeak_deluxe_device::sr_w )
+void midway_cheap_squeak_deluxe_device::sr_w(u8 data)
{
m_pia->write_portb(data & 0x0f);
}
diff --git a/src/mame/audio/csd.h b/src/mame/audio/csd.h
index 0fb5a2f16a7..c532863e151 100644
--- a/src/mame/audio/csd.h
+++ b/src/mame/audio/csd.h
@@ -32,8 +32,8 @@ public:
void suspend_cpu();
// read/write
- DECLARE_READ8_MEMBER(stat_r);
- DECLARE_WRITE8_MEMBER(sr_w);
+ u8 stat_r();
+ void sr_w(u8 data);
DECLARE_WRITE_LINE_MEMBER(sirq_w);
DECLARE_WRITE_LINE_MEMBER(reset_w);
diff --git a/src/mame/audio/exidy.cpp b/src/mame/audio/exidy.cpp
index 99511cfe215..df55e898700 100644
--- a/src/mame/audio/exidy.cpp
+++ b/src/mame/audio/exidy.cpp
@@ -750,9 +750,10 @@ void venture_sound_device::venture_audio_map(address_map &map)
}
-MACHINE_CONFIG_START(venture_sound_device::device_add_mconfig)
- MCFG_DEVICE_ADD("audiocpu", M6502, 3579545/4)
- MCFG_DEVICE_PROGRAM_MAP(venture_audio_map)
+void venture_sound_device::device_add_mconfig(machine_config &config)
+{
+ m6502_device &audiocpu(M6502(config, "audiocpu", 3579545/4));
+ audiocpu.set_addrmap(AS_PROGRAM, &venture_sound_device::venture_audio_map);
RIOT6532(config, m_riot, SH6532_CLOCK);
m_riot->in_pa_callback().set(FUNC(venture_sound_device::r6532_porta_r));
@@ -768,14 +769,12 @@ MACHINE_CONFIG_START(venture_sound_device::device_add_mconfig)
m_pia->cb2_handler().set(FUNC(venture_sound_device::pia_cb2_w));
m_pia->irqb_handler().set("audioirq", FUNC(input_merger_device::in_w<1>));
- MCFG_INPUT_MERGER_ANY_HIGH("audioirq") // open collector
- MCFG_INPUT_MERGER_OUTPUT_HANDLER(INPUTLINE("audiocpu", m6502_device::IRQ_LINE))
+ INPUT_MERGER_ANY_HIGH(config, "audioirq").output_handler().set_inputline("audiocpu", m6502_device::IRQ_LINE); // open collector
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_MODIFY(DEVICE_SELF)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
-MACHINE_CONFIG_END
+ this->add_route(ALL_OUTPUTS, "mono", 0.50);
+}
@@ -834,17 +833,17 @@ void mtrap_sound_device::cvsd_iomap(address_map &map)
}
-MACHINE_CONFIG_START(mtrap_sound_device::device_add_mconfig)
+void mtrap_sound_device::device_add_mconfig(machine_config &config)
+{
venture_sound_device::device_add_mconfig(config);
- MCFG_DEVICE_ADD("cvsdcpu", Z80, CVSD_Z80_CLOCK)
- MCFG_DEVICE_PROGRAM_MAP(cvsd_map)
- MCFG_DEVICE_IO_MAP(cvsd_iomap)
+ Z80(config, m_cvsdcpu, CVSD_Z80_CLOCK);
+ m_cvsdcpu->set_addrmap(AS_PROGRAM, &mtrap_sound_device::cvsd_map);
+ m_cvsdcpu->set_addrmap(AS_IO, &mtrap_sound_device::cvsd_iomap);
/* audio hardware */
- MCFG_DEVICE_ADD("cvsd", MC3417, CVSD_CLOCK)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80)
-MACHINE_CONFIG_END
+ MC3417(config, m_cvsd, CVSD_CLOCK).add_route(ALL_OUTPUTS, "mono", 0.80);
+}
/*************************************
@@ -981,9 +980,10 @@ void victory_sound_device::victory_audio_map(address_map &map)
}
-MACHINE_CONFIG_START(victory_sound_device::device_add_mconfig)
- MCFG_DEVICE_ADD("audiocpu", M6502, VICTORY_AUDIO_CPU_CLOCK)
- MCFG_DEVICE_PROGRAM_MAP(victory_audio_map)
+void victory_sound_device::device_add_mconfig(machine_config &config)
+{
+ m6502_device &audiocpu(M6502(config, "audiocpu", VICTORY_AUDIO_CPU_CLOCK));
+ audiocpu.set_addrmap(AS_PROGRAM, &victory_sound_device::victory_audio_map);
RIOT6532(config, m_riot, SH6532_CLOCK);
m_riot->in_pa_callback().set(FUNC(victory_sound_device::r6532_porta_r));
@@ -997,14 +997,11 @@ MACHINE_CONFIG_START(victory_sound_device::device_add_mconfig)
m_pia->cb2_handler().set(FUNC(victory_sound_device::main_ack_w));
m_pia->irqb_handler().set("audioirq", FUNC(input_merger_device::in_w<1>));
- MCFG_INPUT_MERGER_ANY_HIGH("audioirq") // open collector
- MCFG_INPUT_MERGER_OUTPUT_HANDLER(INPUTLINE("audiocpu", m6502_device::IRQ_LINE))
+ INPUT_MERGER_ANY_HIGH(config, "audioirq").output_handler().set_inputline("audiocpu", m6502_device::IRQ_LINE); // open collector
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_MODIFY(DEVICE_SELF)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ this->add_route(ALL_OUTPUTS, "mono", 1.0);
- MCFG_DEVICE_ADD("tms", TMS5220, 640000)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
-MACHINE_CONFIG_END
+ TMS5220(config, m_tms, 640000).add_route(ALL_OUTPUTS, "mono", 1.0);
+}
diff --git a/src/mame/audio/exidy440.cpp b/src/mame/audio/exidy440.cpp
index 59920448465..df7c35fb084 100644
--- a/src/mame/audio/exidy440.cpp
+++ b/src/mame/audio/exidy440.cpp
@@ -98,22 +98,19 @@ exidy440_sound_device::exidy440_sound_device(const machine_config &mconfig, cons
// device_add_mconfig - add device configuration
//-------------------------------------------------
-MACHINE_CONFIG_START(exidy440_sound_device::device_add_mconfig)
- MCFG_DEVICE_ADD("audiocpu", MC6809, EXIDY440_AUDIO_CLOCK)
- MCFG_DEVICE_PROGRAM_MAP(exidy440_audio_map)
+void exidy440_sound_device::device_add_mconfig(machine_config &config)
+{
+ MC6809(config, m_audiocpu, EXIDY440_AUDIO_CLOCK);
+ m_audiocpu->set_addrmap(AS_PROGRAM, &exidy440_sound_device::exidy440_audio_map);
-// MCFG_DEVICE_ADD("cvsd1", MC3418, EXIDY440_MC3418_CLOCK)
-// MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0)
+// MC3418(config, "cvsd1", EXIDY440_MC3418_CLOCK).add_route(ALL_OUTPUTS, "lspeaker", 1.0);
-// MCFG_DEVICE_ADD("cvsd2", MC3418, EXIDY440_MC3418_CLOCK)
-// MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0)
+// MC3418(config, "cvsd2", EXIDY440_MC3418_CLOCK).add_route(ALL_OUTPUTS, "rspeaker", 1.0);
-// MCFG_DEVICE_ADD("cvsd3", MC3417, EXIDY440_MC3417_CLOCK)
-// MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0)
+// MC3417(config, "cvsd3", EXIDY440_MC3417_CLOCK).add_route(ALL_OUTPUTS, "lspeaker", 1.0);
-// MCFG_DEVICE_ADD("cvsd4", MC3417, EXIDY440_MC3417_CLOCK)
-// MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0)
-MACHINE_CONFIG_END
+// MC3417(config, "cvsd4", EXIDY440_MC3417_CLOCK).add_route(ALL_OUTPUTS, "rspeaker", 1.0);
+}
//-------------------------------------------------
// device_start - device-specific startup
diff --git a/src/mame/audio/gottlieb.cpp b/src/mame/audio/gottlieb.cpp
index 4b448f28c6d..8eab2d6b027 100644
--- a/src/mame/audio/gottlieb.cpp
+++ b/src/mame/audio/gottlieb.cpp
@@ -2,7 +2,7 @@
// copyright-holders:Aaron Giles
/***************************************************************************
- gottlieb.c
+ gottlieb.cpp
Gottlieb 6502-based sound hardware implementations.
@@ -87,7 +87,7 @@ void gottlieb_sound_r0_device::gottlieb_sound_r0_map(address_map &map)
{
map.global_mask(0x0fff);
map(0x0000, 0x003f).ram().mirror(0x1c0);
- map(0x0200, 0x020f).rw("r6530", FUNC(mos6530_device::read), FUNC(mos6530_device::write));
+ map(0x0200, 0x020f).rw(m_r6530, FUNC(mos6530_device::read), FUNC(mos6530_device::write));
map(0x0400, 0x0fff).rom();
}
@@ -115,21 +115,23 @@ INPUT_CHANGED_MEMBER( gottlieb_sound_r0_device::audio_nmi )
// device_add_mconfig - add device configuration
//-------------------------------------------------
-MACHINE_CONFIG_START(gottlieb_sound_r0_device::device_add_mconfig)
+void gottlieb_sound_r0_device::device_add_mconfig(machine_config &config)
+{
// audio CPU
- MCFG_DEVICE_ADD("audiocpu", M6502, SOUND1_CLOCK/4) // M6503 - clock is a gate, a resistor and a capacitor. Freq unknown.
- MCFG_DEVICE_PROGRAM_MAP(gottlieb_sound_r0_map)
+ M6502(config, m_audiocpu, SOUND1_CLOCK/4); // M6503 - clock is a gate, a resistor and a capacitor. Freq unknown.
+ m_audiocpu->set_addrmap(AS_PROGRAM, &gottlieb_sound_r0_device::gottlieb_sound_r0_map);
// I/O configuration
- MCFG_DEVICE_ADD("r6530", MOS6530, SOUND1_CLOCK/4) // unknown - same as cpu
- MCFG_MOS6530_OUT_PA_CB(WRITE8("dac", dac_byte_interface, data_w))
- MCFG_MOS6530_IN_PB_CB(READ8(*this, gottlieb_sound_r0_device, r6530b_r))
+ MOS6530(config, m_r6530, SOUND1_CLOCK/4); // unknown - same as cpu
+ m_r6530->out_pa_callback().set("dac", FUNC(dac_byte_interface::data_w));
+ m_r6530->in_pb_callback().set(FUNC(gottlieb_sound_r0_device::r6530b_r));
// sound devices
- MCFG_DEVICE_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, *this, 0.25) // unknown DAC
- MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
- MCFG_SOUND_ROUTE(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
-MACHINE_CONFIG_END
+ DAC_8BIT_R2R(config, "dac", 0).add_route(ALL_OUTPUTS, *this, 0.25); // unknown DAC
+ voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref"));
+ vref.add_route(0, "dac", 1.0, DAC_VREF_POS_INPUT);
+ vref.add_route(0, "dac", -1.0, DAC_VREF_NEG_INPUT);
+}
//-------------------------------------------------
@@ -243,10 +245,11 @@ INPUT_PORTS_END
// device_add_mconfig - add device configuration
//-------------------------------------------------
-MACHINE_CONFIG_START(gottlieb_sound_r1_device::device_add_mconfig)
+void gottlieb_sound_r1_device::device_add_mconfig(machine_config &config)
+{
// audio CPU
- MCFG_DEVICE_ADD("audiocpu", M6502, SOUND1_CLOCK/4) // the board can be set to /2 as well
- MCFG_DEVICE_PROGRAM_MAP(gottlieb_sound_r1_map)
+ m6502_device &audiocpu(M6502(config, "audiocpu", SOUND1_CLOCK/4)); // the board can be set to /2 as well
+ audiocpu.set_addrmap(AS_PROGRAM, &gottlieb_sound_r1_device::gottlieb_sound_r1_map);
INPUT_MERGER_ANY_HIGH(config, "nmi").output_handler().set_inputline("audiocpu", INPUT_LINE_NMI);
@@ -257,10 +260,11 @@ MACHINE_CONFIG_START(gottlieb_sound_r1_device::device_add_mconfig)
m_riot->irq_callback().set_inputline("audiocpu", M6502_IRQ_LINE);
// sound devices
- MCFG_DEVICE_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, *this, 0.25) // unknown DAC
- MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
- MCFG_SOUND_ROUTE(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
-MACHINE_CONFIG_END
+ DAC_8BIT_R2R(config, "dac", 0).add_route(ALL_OUTPUTS, *this, 0.25); // unknown DAC
+ voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref"));
+ vref.add_route(0, "dac", 1.0, DAC_VREF_POS_INPUT);
+ vref.add_route(0, "dac", -1.0, DAC_VREF_NEG_INPUT);
+}
//-------------------------------------------------
@@ -354,8 +358,8 @@ void gottlieb_sound_r1_with_votrax_device::device_post_load()
WRITE8_MEMBER( gottlieb_sound_r1_with_votrax_device::votrax_data_w )
{
- m_votrax->inflection_w(space, offset, data >> 6);
- m_votrax->write(space, offset, ~data & 0x3f);
+ m_votrax->inflection_w(data >> 6);
+ m_votrax->write(~data & 0x3f);
}
@@ -543,9 +547,9 @@ WRITE8_MEMBER( gottlieb_sound_r2_device::speech_control_w )
// bit 3 selects which of the two 8913 to enable
// bit 4 goes to the 8913 BC1 pin
if ((data & 0x08) != 0)
- m_ay1->data_address_w(space, data >> 4, m_psg_latch);
+ m_ay1->data_address_w(data >> 4, m_psg_latch);
else
- m_ay2->data_address_w(space, data >> 4, m_psg_latch);
+ m_ay2->data_address_w(data >> 4, m_psg_latch);
}
}
else
@@ -557,8 +561,8 @@ WRITE8_MEMBER( gottlieb_sound_r2_device::speech_control_w )
else
{
ay8913_device *ay = (data & 0x08) ? m_ay1 : m_ay2;
- ay->address_w(space, 0, m_psg_latch);
- ay->data_w(space, 0, m_psg_data_latch);
+ ay->address_w(m_psg_latch);
+ ay->data_w(m_psg_data_latch);
}
}
@@ -651,28 +655,27 @@ INPUT_PORTS_END
// device_add_mconfig - add device configuration
//-------------------------------------------------
-MACHINE_CONFIG_START(gottlieb_sound_r2_device::device_add_mconfig)
+void gottlieb_sound_r2_device::device_add_mconfig(machine_config &config)
+{
// audio CPUs
- MCFG_DEVICE_ADD("audiocpu", M6502, SOUND2_CLOCK/4)
- MCFG_DEVICE_PROGRAM_MAP(gottlieb_sound_r2_map)
+ M6502(config, m_audiocpu, SOUND2_CLOCK/4);
+ m_audiocpu->set_addrmap(AS_PROGRAM, &gottlieb_sound_r2_device::gottlieb_sound_r2_map);
- MCFG_DEVICE_ADD("speechcpu", M6502, SOUND2_CLOCK/4)
- MCFG_DEVICE_PROGRAM_MAP(gottlieb_speech_r2_map)
+ M6502(config, m_speechcpu, SOUND2_CLOCK/4);
+ m_speechcpu->set_addrmap(AS_PROGRAM, &gottlieb_sound_r2_device::gottlieb_speech_r2_map);
// sound hardware
- MCFG_DEVICE_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, *this, 0.075) // unknown DAC
- MCFG_DEVICE_ADD("dacvol", DAC_8BIT_R2R, 0) // unknown DAC
- MCFG_SOUND_ROUTE(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
- MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
- MCFG_SOUND_ROUTE(0, "dacvol", 1.0, DAC_VREF_POS_INPUT)
+ DAC_8BIT_R2R(config, "dac", 0).add_route(ALL_OUTPUTS, *this, 0.075); // unknown DAC
+ DAC_8BIT_R2R(config, "dacvol", 0).add_route(0, "dac", 1.0, DAC_VREF_POS_INPUT).add_route(0, "dac", -1.0, DAC_VREF_NEG_INPUT); // unknown DAC
+ voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref"));
+ vref.add_route(0, "dacvol", 1.0, DAC_VREF_POS_INPUT);
AY8913(config, m_ay1, SOUND2_CLOCK/2).add_route(ALL_OUTPUTS, *this, 0.15);
AY8913(config, m_ay2, SOUND2_CLOCK/2).add_route(ALL_OUTPUTS, *this, 0.15);
- MCFG_DEVICE_ADD("spsnd", SP0250, SOUND2_SPEECH_CLOCK)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, *this, 1.0)
-MACHINE_CONFIG_END
+ SP0250(config, m_sp0250, SOUND2_SPEECH_CLOCK).add_route(ALL_OUTPUTS, *this, 1.0);
+}
//-------------------------------------------------
diff --git a/src/mame/audio/harddriv.cpp b/src/mame/audio/harddriv.cpp
index 598ff034ea9..6f14ca96460 100644
--- a/src/mame/audio/harddriv.cpp
+++ b/src/mame/audio/harddriv.cpp
@@ -179,7 +179,7 @@ READ16_MEMBER(harddriv_sound_board_device::hdsnd68k_status_r)
// D14 = 'Sound Flag'
// D13 = Test Switch
// D12 = 5220 Ready Flag (0=Ready)
- logerror("%s:hdsnd68k_status_r(%04X)\n", machine().describe_context(), offset);
+ //logerror("%s:hdsnd68k_status_r(%04X)\n", machine().describe_context(), offset);
return (m_mainflag << 15) | (m_soundflag << 14) | 0x2000 | 0;//((ioport("IN0")->read() & 0x0020) << 8) | 0;
}
@@ -432,8 +432,8 @@ void harddriv_sound_board_device::driversnd_dsp_io_map(address_map &map)
// device_add_mconfig - add device configuration
//-------------------------------------------------
-MACHINE_CONFIG_START(harddriv_sound_board_device::device_add_mconfig)
-
+void harddriv_sound_board_device::device_add_mconfig(machine_config &config)
+{
/* basic machine hardware */
M68000(config, m_soundcpu, 16_MHz_XTAL/2);
m_soundcpu->set_addrmap(AS_PROGRAM, &harddriv_sound_board_device::driversnd_68k_map);
@@ -455,7 +455,8 @@ MACHINE_CONFIG_START(harddriv_sound_board_device::device_add_mconfig)
/* sound hardware */
SPEAKER(config, "speaker").front_center();
- MCFG_DEVICE_ADD("dac", AM6012, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5) // ls374d.75e + ls374d.90e + am6012
- MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
- MCFG_SOUND_ROUTE(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
-MACHINE_CONFIG_END
+ AM6012(config, m_dac, 0).add_route(ALL_OUTPUTS, "speaker", 0.5); // ls374d.75e + ls374d.90e + am6012
+ voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref"));
+ vref.add_route(0, "dac", 1.0, DAC_VREF_POS_INPUT);
+ vref.add_route(0, "dac", -1.0, DAC_VREF_NEG_INPUT);
+}
diff --git a/src/mame/audio/irem.cpp b/src/mame/audio/irem.cpp
index 066296d4088..0786ccb2c0a 100644
--- a/src/mame/audio/irem.cpp
+++ b/src/mame/audio/irem.cpp
@@ -123,17 +123,17 @@ WRITE8_MEMBER( irem_audio_device::m6803_port2_w )
{
/* PSG 0 or 1? */
if (m_port2 & 0x08)
- m_ay_45M->address_w(space, 0, m_port1);
+ m_ay_45M->address_w(m_port1);
if (m_port2 & 0x10)
- m_ay_45L->address_w(space, 0, m_port1);
+ m_ay_45L->address_w(m_port1);
}
else
{
/* PSG 0 or 1? */
if (m_port2 & 0x08)
- m_ay_45M->data_w(space, 0, m_port1);
+ m_ay_45M->data_w(m_port1);
if (m_port2 & 0x10)
- m_ay_45L->data_w(space, 0, m_port1);
+ m_ay_45L->data_w(m_port1);
}
}
m_port2 = data;
@@ -151,9 +151,9 @@ READ8_MEMBER( irem_audio_device::m6803_port1_r )
{
/* PSG 0 or 1? */
if (m_port2 & 0x08)
- return m_ay_45M->data_r(space, 0);
+ return m_ay_45M->data_r();
if (m_port2 & 0x10)
- return m_ay_45L->data_r(space, 0);
+ return m_ay_45L->data_r();
return 0xff;
}
diff --git a/src/mame/audio/leland.cpp b/src/mame/audio/leland.cpp
index fd46dfb7714..3d44fd2a539 100644
--- a/src/mame/audio/leland.cpp
+++ b/src/mame/audio/leland.cpp
@@ -163,7 +163,6 @@ void leland_80186_sound_device::device_add_mconfig(machine_config &config)
m_dacvol[5]->add_route(0, "dac6", -1.0, DAC_VREF_NEG_INPUT);
voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref", 0));
- vref.set_output(5.0);
vref.add_route(0, "dac1vol", 1.0, DAC_VREF_POS_INPUT);
vref.add_route(0, "dac2vol", 1.0, DAC_VREF_POS_INPUT);
vref.add_route(0, "dac3vol", 1.0, DAC_VREF_POS_INPUT);
@@ -224,7 +223,6 @@ void redline_80186_sound_device::device_add_mconfig(machine_config &config)
m_dacvol[7]->add_route(0, "dac8", -1.0, DAC_VREF_NEG_INPUT); // unknown DAC
voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref", 0));
- vref.set_output(5.0);
vref.add_route(0, "dac1vol", 1.0, DAC_VREF_POS_INPUT);
vref.add_route(0, "dac2vol", 1.0, DAC_VREF_POS_INPUT);
vref.add_route(0, "dac3vol", 1.0, DAC_VREF_POS_INPUT);
@@ -284,7 +282,6 @@ void ataxx_80186_sound_device::device_add_mconfig(machine_config &config)
m_dacvol[3]->add_route(0, "dac4", -1.0, DAC_VREF_NEG_INPUT);
voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref", 0));
- vref.set_output(5.0);
vref.add_route(0, "dac1vol", 1.0, DAC_VREF_POS_INPUT);
vref.add_route(0, "dac2vol", 1.0, DAC_VREF_POS_INPUT);
vref.add_route(0, "dac3vol", 1.0, DAC_VREF_POS_INPUT);
@@ -330,7 +327,6 @@ void wsf_80186_sound_device::device_add_mconfig(machine_config &config)
m_dacvol[3]->add_route(0, "dac4", -1.0, DAC_VREF_NEG_INPUT); // unknown DAC
voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref", 0));
- vref.set_output(5.0);
vref.add_route(0, "dac1vol", 1.0, DAC_VREF_POS_INPUT);
vref.add_route(0, "dac2vol", 1.0, DAC_VREF_POS_INPUT);
vref.add_route(0, "dac3vol", 1.0, DAC_VREF_POS_INPUT);
@@ -420,6 +416,8 @@ void leland_80186_sound_device::device_reset()
m_ext_start = 0;
m_ext_stop = 0;
m_ext_active = 0;
+ if (m_type == TYPE_WSF)
+ m_dacvol[3]->write(0xff); //TODO: determine how to set this if at all
}
DEFINE_DEVICE_TYPE(LELAND_80186, leland_80186_sound_device, "leland_80186_sound", "80186 DAC (Leland)")
@@ -622,6 +620,11 @@ WRITE16_MEMBER( leland_80186_sound_device::dac_w )
/* handle value changes */
if (ACCESSING_BITS_0_7)
{
+ if ((offset & 0x60) == 0x40)
+ m_audiocpu->drq0_w(CLEAR_LINE);
+ else if ((offset & 0x60) == 0x60)
+ m_audiocpu->drq1_w(CLEAR_LINE);
+
m_dac[dac]->write(data & 0xff);
set_clock_line(dac, 0);
@@ -637,7 +640,9 @@ WRITE16_MEMBER( leland_80186_sound_device::dac_w )
WRITE16_MEMBER( redline_80186_sound_device::redline_dac_w )
{
- dac_w(space, (offset >> 8) & 7, (data & 0xff) | (offset << 8), 0xffff);
+ data = (data & 0xff) | (offset << 8);
+ offset = ((offset >> 8) & 7) | ((offset & 0x2000) ? 0x40 : 0) | ((offset & 0x800) ? 0x20 : 0);
+ dac_w(space, offset, data, 0xffff);
}
WRITE16_MEMBER( leland_80186_sound_device::ataxx_dac_control )
@@ -645,21 +650,22 @@ WRITE16_MEMBER( leland_80186_sound_device::ataxx_dac_control )
if (ACCESSING_BITS_0_7)
{
/* handle common offsets */
- switch (offset)
+ switch (offset & 0x1f)
{
case 0x00:
+ dac_w(space, 0x40, data, 0x00ff);
+ return;
case 0x01:
+ dac_w(space, 0x61, data, 0x00ff);
+ return;
case 0x02:
- dac_w(space, offset, data, 0x00ff);
+ dac_w(space, 2, data, 0x00ff);
return;
case 0x03:
m_dacvol[0]->write((data & 7) << 5);
m_dacvol[1]->write(((data >> 3) & 7) << 5);
m_dacvol[2]->write(((data >> 6) & 3) << 6);
return;
- case 0x21:
- dac_w(space, 3, data, mem_mask);
- return;
}
}
@@ -739,7 +745,7 @@ READ16_MEMBER( leland_80186_sound_device::peripheral_r )
return m_pit[1]->read(offset & 3);
}
else if (m_type == TYPE_WSF)
- return m_ymsnd->read(space, offset);
+ return m_ymsnd->read(offset);
break;
case 4:
@@ -784,7 +790,7 @@ WRITE16_MEMBER( leland_80186_sound_device::peripheral_w )
m_pit[1]->write(offset & 3, data);
}
else if(m_type == TYPE_WSF)
- m_ymsnd->write(space, offset, data);
+ m_ymsnd->write(offset, data);
break;
case 4:
diff --git a/src/mame/audio/llander.cpp b/src/mame/audio/llander.cpp
index 4c216f3679b..80429f032f4 100644
--- a/src/mame/audio/llander.cpp
+++ b/src/mame/audio/llander.cpp
@@ -98,9 +98,9 @@ WRITE8_MEMBER(asteroid_state::llander_sounds_w)
}
-MACHINE_CONFIG_START(asteroid_state::llander_sound)
+void asteroid_state::llander_sound(machine_config &config)
+{
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD("discrete", DISCRETE, llander_discrete)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
-MACHINE_CONFIG_END
+ DISCRETE(config, m_discrete, llander_discrete).add_route(ALL_OUTPUTS, "mono", 1.0);
+}
diff --git a/src/mame/audio/midway.cpp b/src/mame/audio/midway.cpp
index f25b82f69b8..2fc660bd094 100644
--- a/src/mame/audio/midway.cpp
+++ b/src/mame/audio/midway.cpp
@@ -590,9 +590,10 @@ void midway_sounds_good_device::soundsgood_map(address_map &map)
// device_add_mconfig - add device configuration
//-------------------------------------------------
-MACHINE_CONFIG_START(midway_sounds_good_device::device_add_mconfig)
- MCFG_DEVICE_ADD("cpu", M68000, DERIVED_CLOCK(1, 2))
- MCFG_DEVICE_PROGRAM_MAP(soundsgood_map)
+void midway_sounds_good_device::device_add_mconfig(machine_config &config)
+{
+ M68000(config, m_cpu, DERIVED_CLOCK(1, 2));
+ m_cpu->set_addrmap(AS_PROGRAM, &midway_sounds_good_device::soundsgood_map);
PIA6821(config, m_pia, 0);
m_pia->writepa_handler().set(FUNC(midway_sounds_good_device::porta_w));
@@ -600,10 +601,11 @@ MACHINE_CONFIG_START(midway_sounds_good_device::device_add_mconfig)
m_pia->irqa_handler().set(FUNC(midway_sounds_good_device::irq_w));
m_pia->irqb_handler().set(FUNC(midway_sounds_good_device::irq_w));
- MCFG_DEVICE_ADD("dac", AD7533, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, *this, 1.0) /// ad7533jn.u10
- MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
- MCFG_SOUND_ROUTE(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
-MACHINE_CONFIG_END
+ AD7533(config, m_dac, 0).add_route(ALL_OUTPUTS, *this, 1.0); /// ad7533jn.u10
+ voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref"));
+ vref.add_route(0, "dac", 1.0, DAC_VREF_POS_INPUT);
+ vref.add_route(0, "dac", -1.0, DAC_VREF_NEG_INPUT);
+}
//-------------------------------------------------
@@ -745,9 +747,10 @@ void midway_turbo_cheap_squeak_device::turbocs_map(address_map &map)
// device_add_mconfig - add device configuration
//-------------------------------------------------
-MACHINE_CONFIG_START(midway_turbo_cheap_squeak_device::device_add_mconfig)
- MCFG_DEVICE_ADD("cpu", MC6809E, DERIVED_CLOCK(1, 4))
- MCFG_DEVICE_PROGRAM_MAP(turbocs_map)
+void midway_turbo_cheap_squeak_device::device_add_mconfig(machine_config &config)
+{
+ MC6809E(config, m_cpu, DERIVED_CLOCK(1, 4));
+ m_cpu->set_addrmap(AS_PROGRAM, &midway_turbo_cheap_squeak_device::turbocs_map);
PIA6821(config, m_pia, 0);
m_pia->writepa_handler().set(FUNC(midway_turbo_cheap_squeak_device::porta_w));
@@ -755,10 +758,11 @@ MACHINE_CONFIG_START(midway_turbo_cheap_squeak_device::device_add_mconfig)
m_pia->irqa_handler().set(FUNC(midway_turbo_cheap_squeak_device::irq_w));
m_pia->irqb_handler().set(FUNC(midway_turbo_cheap_squeak_device::irq_w));
- MCFG_DEVICE_ADD("dac", AD7533, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, *this, 1.0)
- MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
- MCFG_SOUND_ROUTE(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
-MACHINE_CONFIG_END
+ AD7533(config, m_dac, 0).add_route(ALL_OUTPUTS, *this, 1.0);
+ voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref"));
+ vref.add_route(0, "dac", 1.0, DAC_VREF_POS_INPUT);
+ vref.add_route(0, "dac", -1.0, DAC_VREF_NEG_INPUT);
+}
//-------------------------------------------------
@@ -949,9 +953,10 @@ void midway_squawk_n_talk_device::squawkntalk_alt_map(address_map &map)
// device_add_mconfig - add device configuration
//-------------------------------------------------
-MACHINE_CONFIG_START(midway_squawk_n_talk_device::device_add_mconfig)
- MCFG_DEVICE_ADD("cpu", M6802, DERIVED_CLOCK(1, 1))
- MCFG_DEVICE_PROGRAM_MAP(squawkntalk_map)
+void midway_squawk_n_talk_device::device_add_mconfig(machine_config &config)
+{
+ M6802(config, m_cpu, DERIVED_CLOCK(1, 1));
+ m_cpu->set_addrmap(AS_PROGRAM, &midway_squawk_n_talk_device::squawkntalk_map);
PIA6821(config, m_pia0, 0);
m_pia0->writepa_handler().set(FUNC(midway_squawk_n_talk_device::porta1_w));
@@ -965,12 +970,11 @@ MACHINE_CONFIG_START(midway_squawk_n_talk_device::device_add_mconfig)
m_pia1->irqb_handler().set(FUNC(midway_squawk_n_talk_device::irq_w));
// only used on Discs of Tron, which is stereo
- MCFG_DEVICE_ADD("tms5200", TMS5200, 640000)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, *this, 0.60)
+ TMS5200(config, m_tms5200, 640000).add_route(ALL_OUTPUTS, *this, 0.60);
// the board also supports an AY-8912 and/or an 8-bit DAC, neither of
// which are populated on the Discs of Tron board
-MACHINE_CONFIG_END
+}
//-------------------------------------------------
diff --git a/src/mame/audio/n8080.cpp b/src/mame/audio/n8080.cpp
index 90557f27c3c..9d135e89433 100644
--- a/src/mame/audio/n8080.cpp
+++ b/src/mame/audio/n8080.cpp
@@ -491,7 +491,6 @@ void n8080_state::spacefev_sound(machine_config &config)
DAC_1BIT(config, m_n8080_dac, 0).add_route(ALL_OUTPUTS, "speaker", 0.15);
voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref", 0));
- vref.set_output(5.0);
vref.add_route(0, "n8080_dac", 1.0, DAC_VREF_POS_INPUT);
SN76477(config, m_sn);
@@ -529,7 +528,6 @@ void n8080_state::sheriff_sound(machine_config &config)
DAC_1BIT(config, m_n8080_dac, 0).add_route(ALL_OUTPUTS, "speaker", 0.15);
voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref", 0));
- vref.set_output(5.0);
vref.add_route(0, "n8080_dac", 1.0, DAC_VREF_POS_INPUT);
SN76477(config, m_sn);
@@ -570,7 +568,6 @@ void n8080_state::helifire_sound(machine_config &config)
SPEAKER(config, "speaker").front_center();
DAC_8BIT_R2R(config, m_helifire_dac, 0).add_route(ALL_OUTPUTS, "speaker", 0.15); // unknown DAC
voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref", 0));
- vref.set_output(5.0);
vref.add_route(0, "helifire_dac", 1.0, DAC_VREF_POS_INPUT);
vref.add_route(0, "helifire_dac", -1.0, DAC_VREF_NEG_INPUT);
}
diff --git a/src/mame/audio/nichisnd.cpp b/src/mame/audio/nichisnd.cpp
index 747a543e846..f6dd3030111 100644
--- a/src/mame/audio/nichisnd.cpp
+++ b/src/mame/audio/nichisnd.cpp
@@ -78,7 +78,8 @@ static const z80_daisy_config daisy_chain[] =
-MACHINE_CONFIG_START(nichisnd_device::device_add_mconfig)
+void nichisnd_device::device_add_mconfig(machine_config &config)
+{
tmpz84c011_device& audiocpu(TMPZ84C011(config, "audiocpu", 8000000)); /* TMPZ84C011, 8.00 MHz */
audiocpu.set_daisy_config(daisy_chain);
audiocpu.set_addrmap(AS_PROGRAM, &nichisnd_device::nichisnd_map);
@@ -95,15 +96,14 @@ MACHINE_CONFIG_START(nichisnd_device::device_add_mconfig)
GENERIC_LATCH_8(config, m_soundlatch);
- MCFG_DEVICE_ADD("ymsnd", YM3812, 4000000)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
+ YM3812(config, "ymsnd", 4000000).add_route(ALL_OUTPUTS, "speaker", 1.0);
- MCFG_DEVICE_ADD("dac1", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.37) // unknown DAC
- MCFG_DEVICE_ADD("dac2", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.37) // unknown DAC
- MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
- MCFG_SOUND_ROUTE(0, "dac1", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE(0, "dac1", -1.0, DAC_VREF_NEG_INPUT)
- MCFG_SOUND_ROUTE(0, "dac2", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE(0, "dac2", -1.0, DAC_VREF_NEG_INPUT)
-MACHINE_CONFIG_END
+ DAC_8BIT_R2R(config, "dac1", 0).add_route(ALL_OUTPUTS, "speaker", 0.37); // unknown DAC
+ DAC_8BIT_R2R(config, "dac2", 0).add_route(ALL_OUTPUTS, "speaker", 0.37); // unknown DAC
+ voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref"));
+ vref.add_route(0, "dac1", 1.0, DAC_VREF_POS_INPUT).add_route(0, "dac1", -1.0, DAC_VREF_NEG_INPUT);
+ vref.add_route(0, "dac2", 1.0, DAC_VREF_POS_INPUT).add_route(0, "dac2", -1.0, DAC_VREF_NEG_INPUT);
+}
//-------------------------------------------------
diff --git a/src/mame/audio/nl_kidniki.cpp b/src/mame/audio/nl_kidniki.cpp
index af9fc061c8c..380059740d7 100644
--- a/src/mame/audio/nl_kidniki.cpp
+++ b/src/mame/audio/nl_kidniki.cpp
@@ -2,8 +2,17 @@
// copyright-holders:Andrew Gardner, Couriersud
#include "netlist/devices/net_lib.h"
+#ifdef NLBASE_H_
+#error Somehow nl_base.h made it into the include chain.
+#endif
+
+#ifndef NLTOOL_VERSION
#define USE_FRONTIERS 1
#define USE_FIXED_STV 1
+#else
+#define USE_FRONTIERS 0
+#define USE_FIXED_STV 1
+#endif
/* ----------------------------------------------------------------------------
* Library section header START
@@ -308,7 +317,7 @@ NETLIST_END()
NETLIST_START(kidniki)
-#if (1 || USE_FRONTIERS)
+#if (0 || USE_FRONTIERS)
SOLVER(Solver, 18000)
PARAM(Solver.ACCURACY, 1e-7)
PARAM(Solver.NR_LOOPS, 100)
@@ -317,16 +326,19 @@ NETLIST_START(kidniki)
PARAM(Solver.METHOD, "MAT_CR")
//PARAM(Solver.METHOD, "MAT")
//PARAM(Solver.METHOD, "GMRES")
- PARAM(Solver.SOR_FACTOR, 1.00)
+ PARAM(Solver.SOR_FACTOR, 1.313)
PARAM(Solver.DYNAMIC_TS, 0)
PARAM(Solver.DYNAMIC_LTE, 5e-4)
PARAM(Solver.DYNAMIC_MIN_TIMESTEP, 20e-6)
#else
- SOLVER(Solver, 12000)
- PARAM(Solver.ACCURACY, 1e-8)
- PARAM(Solver.NR_LOOPS, 300)
- PARAM(Solver.GS_LOOPS, 20)
+ SOLVER(Solver, 18000)
+ PARAM(Solver.ACCURACY, 1e-7)
+ PARAM(Solver.NR_LOOPS, 100)
+ PARAM(Solver.GS_LOOPS, 300)
+ //PARAM(Solver.METHOD, "MAT_CR")
PARAM(Solver.METHOD, "GMRES")
+ //PARAM(Solver.SOR_FACTOR, 1.73)
+ //PARAM(Solver.METHOD, "SOR")
#endif
#if (USE_FRONTIERS)
@@ -372,16 +384,13 @@ NETLIST_START(kidniki)
ALIAS(I_SINH0, SINH_DUMMY.2)
#endif
- NET_MODEL("AY8910PORT FAMILY(OVL=0.05 OVH=4.95 ORL=100.0 ORH=0.5k)")
+ NET_MODEL("AY8910PORT FAMILY(OVL=0.05 OVH=0.05 ORL=100.0 ORH=0.5k)")
LOGIC_INPUT(I_SD0, 1, "AY8910PORT")
- //CLOCK(I_SD0, 5)
LOGIC_INPUT(I_BD0, 1, "AY8910PORT")
- //CLOCK(I_BD0, 5)
LOGIC_INPUT(I_CH0, 1, "AY8910PORT")
- //CLOCK(I_CH0, 2.2 )
LOGIC_INPUT(I_OH0, 1, "AY8910PORT")
- //CLOCK(I_OH0, 1.0)
+
ANALOG_INPUT(I_MSM2K0, 0)
ANALOG_INPUT(I_MSM3K0, 0)
diff --git a/src/mame/audio/nl_zac1b11142.cpp b/src/mame/audio/nl_zac1b11142.cpp
index 7172603f816..7f1aac03f70 100644
--- a/src/mame/audio/nl_zac1b11142.cpp
+++ b/src/mame/audio/nl_zac1b11142.cpp
@@ -297,7 +297,7 @@ NETLIST_START(zac1b11142)
ALIAS(VCC, I_P5.Q)
ALIAS(I_V0.Q, GND)
- NET_MODEL("AY8910PORT FAMILY(OVL=0.05 OVH=4.95 ORL=100.0 ORH=0.5k)")
+ NET_MODEL("AY8910PORT FAMILY(OVL=0.05 OVH=0.05 ORL=100.0 ORH=0.5k)")
// AY-3-8910 4G/4H digital outputs
LOGIC_INPUT(I_IOA0, 1, "AY8910PORT")
diff --git a/src/mame/audio/redalert.cpp b/src/mame/audio/redalert.cpp
index 1fa0b1c33b0..a962dffd207 100644
--- a/src/mame/audio/redalert.cpp
+++ b/src/mame/audio/redalert.cpp
@@ -86,7 +86,7 @@ WRITE8_MEMBER(redalert_state::redalert_AY8910_w)
/* BC1=1, BDIR=0 : read from PSG */
case 0x01:
- m_ay8910_latch_1 = m_ay8910->data_r(space, 0);
+ m_ay8910_latch_1 = m_ay8910->data_r();
break;
/* BC1=0, BDIR=1 : write to PSG */
@@ -94,7 +94,7 @@ WRITE8_MEMBER(redalert_state::redalert_AY8910_w)
case 0x02:
case 0x03:
default:
- m_ay8910->data_address_w(space, data, m_ay8910_latch_2);
+ m_ay8910->data_address_w(data, m_ay8910_latch_2);
break;
}
}
@@ -269,28 +269,28 @@ WRITE8_MEMBER(redalert_state::demoneye_ay8910_data_w)
{
case 0x00:
if (m_ay8910_latch_1 & 0x10)
- m_ay[0]->data_w(space, 0, data);
+ m_ay[0]->data_w(data);
if (m_ay8910_latch_1 & 0x20)
- m_ay[1]->data_w(space, 0, data);
+ m_ay[1]->data_w(data);
break;
case 0x01:
if (m_ay8910_latch_1 & 0x10)
- m_ay8910_latch_2 = m_ay[0]->data_r(space, 0);
+ m_ay8910_latch_2 = m_ay[0]->data_r();
if (m_ay8910_latch_1 & 0x20)
- m_ay8910_latch_2 = m_ay[1]->data_r(space, 0);
+ m_ay8910_latch_2 = m_ay[1]->data_r();
break;
case 0x03:
if (m_ay8910_latch_1 & 0x10)
- m_ay[0]->address_w(space, 0, data);
+ m_ay[0]->address_w(data);
if (m_ay8910_latch_1 & 0x20)
- m_ay[1]->address_w(space, 0, data);
+ m_ay[1]->address_w(data);
break;
diff --git a/src/mame/audio/s11c_bg.cpp b/src/mame/audio/s11c_bg.cpp
index 7ababf96d48..cdcbb701a76 100644
--- a/src/mame/audio/s11c_bg.cpp
+++ b/src/mame/audio/s11c_bg.cpp
@@ -58,30 +58,31 @@ void s11c_bg_device::data_w(uint8_t data)
m_pia40->write_portb(data);
}
-MACHINE_CONFIG_START(s11c_bg_device::device_add_mconfig)
- MCFG_DEVICE_ADD("bgcpu", MC6809E, XTAL(8'000'000) / 4) // MC68B09E
- MCFG_DEVICE_PROGRAM_MAP(s11c_bg_map)
- MCFG_QUANTUM_TIME(attotime::from_hz(50))
+void s11c_bg_device::device_add_mconfig(machine_config &config)
+{
+ MC6809E(config, m_cpu, XTAL(8'000'000) / 4); // MC68B09E
+ m_cpu->set_addrmap(AS_PROGRAM, &s11c_bg_device::s11c_bg_map);
+ config.m_minimum_quantum = attotime::from_hz(50);
YM2151(config, m_ym2151, XTAL(3'579'545)); // "3.58 MHz" on schematics and parts list
m_ym2151->irq_handler().set(FUNC(s11c_bg_device::ym2151_irq_w));
m_ym2151->add_route(ALL_OUTPUTS, *this, 0.25);
- MCFG_DEVICE_ADD("dac", MC1408, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, *this, 0.25)
- MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
- MCFG_SOUND_ROUTE(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
+ MC1408(config, "dac", 0).add_route(ALL_OUTPUTS, *this, 0.25);
+ voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref"));
+ vref.add_route(0, "dac", 1.0, DAC_VREF_POS_INPUT);
+ vref.add_route(0, "dac", -1.0, DAC_VREF_NEG_INPUT);
- MCFG_DEVICE_ADD("hc55516_bg", HC55516, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, *this, 0.5)
+ HC55516(config, m_hc55516, 0).add_route(ALL_OUTPUTS, *this, 0.5);
PIA6821(config, m_pia40, 0);
m_pia40->writepa_handler().set("dac", FUNC(dac_byte_interface::data_w));
m_pia40->writepb_handler().set(FUNC(s11c_bg_device::pia40_pb_w));
m_pia40->ca2_handler().set(m_ym2151, FUNC(ym2151_device::reset_w));
m_pia40->cb2_handler().set(FUNC(s11c_bg_device::pia40_cb2_w));
- m_pia40->irqa_handler().set_inputline("bgcpu", M6809_FIRQ_LINE);
- m_pia40->irqb_handler().set_inputline("bgcpu", INPUT_LINE_NMI);
-MACHINE_CONFIG_END
+ m_pia40->irqa_handler().set_inputline(m_cpu, M6809_FIRQ_LINE);
+ m_pia40->irqb_handler().set_inputline(m_cpu, INPUT_LINE_NMI);
+}
void s11c_bg_device::device_start()
{
diff --git a/src/mame/audio/segag80r.cpp b/src/mame/audio/segag80r.cpp
index e1cda7c68be..22fa9137274 100644
--- a/src/mame/audio/segag80r.cpp
+++ b/src/mame/audio/segag80r.cpp
@@ -838,7 +838,6 @@ void monsterb_sound_device::device_add_mconfig(machine_config &config)
DAC_8BIT_R2R(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 0.5); // 50K (R91-97)/100K (R98-106) ladder network
voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref", 0));
- vref.set_output(5.0);
vref.add_route(0, "dac", 1.0, DAC_VREF_POS_INPUT);
vref.add_route(0, "dac", -1.0, DAC_VREF_NEG_INPUT);
diff --git a/src/mame/audio/snk6502.cpp b/src/mame/audio/snk6502.cpp
index c714fe23c0e..091186b79a2 100644
--- a/src/mame/audio/snk6502.cpp
+++ b/src/mame/audio/snk6502.cpp
@@ -339,7 +339,6 @@ void snk6502_sound_device::mute_channel(int channel)
void snk6502_sound_device::unmute_channel(int channel)
{
m_tone_channels[channel].mute = 0;
- m_tone_channels[channel].offset = 0;
}
diff --git a/src/mame/audio/spacefb.cpp b/src/mame/audio/spacefb.cpp
index a6e3055d130..c8e139ac583 100644
--- a/src/mame/audio/spacefb.cpp
+++ b/src/mame/audio/spacefb.cpp
@@ -82,7 +82,6 @@ void spacefb_state::spacefb_audio(machine_config &config)
SPEAKER(config, "speaker").front_center();
DAC_8BIT_R2R(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 0.25); // unknown DAC
voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref", 0));
- vref.set_output(5.0);
vref.add_route(0, "dac", 1.0, DAC_VREF_POS_INPUT);
vref.add_route(0, "dac", -1.0, DAC_VREF_NEG_INPUT);
diff --git a/src/mame/audio/spiders.cpp b/src/mame/audio/spiders.cpp
index 93c03844447..3a50b0556c0 100644
--- a/src/mame/audio/spiders.cpp
+++ b/src/mame/audio/spiders.cpp
@@ -204,9 +204,8 @@ WRITE8_MEMBER(spiders_state::spiders_audio_ctrl_w)
}
-MACHINE_CONFIG_START(spiders_state::spiders_audio)
-
+void spiders_state::spiders_audio(machine_config &config)
+{
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD("discrete", DISCRETE, spiders_discrete)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
-MACHINE_CONFIG_END
+ DISCRETE(config, m_discrete, spiders_discrete).add_route(ALL_OUTPUTS, "mono", 1.0);
+}
diff --git a/src/mame/audio/sprint8.cpp b/src/mame/audio/sprint8.cpp
index e187173cbcd..c05a83bc890 100644
--- a/src/mame/audio/sprint8.cpp
+++ b/src/mame/audio/sprint8.cpp
@@ -296,7 +296,8 @@ DISCRETE_SOUND_START( sprint8_discrete )
DISCRETE_TASK_END()
DISCRETE_SOUND_END
-MACHINE_CONFIG_START(sprint8_state::sprint8_audio)
+void sprint8_state::sprint8_audio(machine_config &config)
+{
/* sound hardware */
/* the proper way is to hook up 4 speakers, but they are not really
* F/R/L/R speakers. Though you can pretend the 1-2 mix is the front. */
@@ -305,30 +306,30 @@ MACHINE_CONFIG_START(sprint8_state::sprint8_audio)
SPEAKER(config, "speaker_5_6", 0.0, 0.0, -0.5); // back
SPEAKER(config, "speaker_4_8", 0.2, 0.0, 1.0); // right
- MCFG_DEVICE_ADD("discrete", DISCRETE, sprint8_discrete)
- MCFG_SOUND_ROUTE(0, "speaker_1_2", 1.0)
+ DISCRETE(config, m_discrete, sprint8_discrete);
+ m_discrete->add_route(0, "speaker_1_2", 1.0);
/* volumes on other channels defaulted to off, */
/* user can turn them up if needed. */
/* The game does not sound good with all channels mixed to stereo. */
- MCFG_SOUND_ROUTE(1, "speaker_3_7", 0.0)
- MCFG_SOUND_ROUTE(2, "speaker_5_6", 0.0)
- MCFG_SOUND_ROUTE(3, "speaker_4_8", 0.0)
+ m_discrete->add_route(1, "speaker_3_7", 0.0);
+ m_discrete->add_route(2, "speaker_5_6", 0.0);
+ m_discrete->add_route(3, "speaker_4_8", 0.0);
f9334_device &latch(F9334(config, "latch"));
latch.q_out_cb<0>().set(FUNC(sprint8_state::int_reset_w));
- latch.q_out_cb<1>().set("discrete", FUNC(discrete_device::write_line<SPRINT8_CRASH_EN>));
- latch.q_out_cb<2>().set("discrete", FUNC(discrete_device::write_line<SPRINT8_SCREECH_EN>));
+ latch.q_out_cb<1>().set(m_discrete, FUNC(discrete_device::write_line<SPRINT8_CRASH_EN>));
+ latch.q_out_cb<2>().set(m_discrete, FUNC(discrete_device::write_line<SPRINT8_SCREECH_EN>));
latch.q_out_cb<5>().set(FUNC(sprint8_state::team_w));
- latch.q_out_cb<6>().set("discrete", FUNC(discrete_device::write_line<SPRINT8_ATTRACT_EN>));
+ latch.q_out_cb<6>().set(m_discrete, FUNC(discrete_device::write_line<SPRINT8_ATTRACT_EN>));
f9334_device &motor(F9334(config, "motor"));
- motor.q_out_cb<0>().set("discrete", FUNC(discrete_device::write_line<SPRINT8_MOTOR1_EN>));
- motor.q_out_cb<1>().set("discrete", FUNC(discrete_device::write_line<SPRINT8_MOTOR2_EN>));
- motor.q_out_cb<2>().set("discrete", FUNC(discrete_device::write_line<SPRINT8_MOTOR3_EN>));
- motor.q_out_cb<3>().set("discrete", FUNC(discrete_device::write_line<SPRINT8_MOTOR4_EN>));
- motor.q_out_cb<4>().set("discrete", FUNC(discrete_device::write_line<SPRINT8_MOTOR5_EN>));
- motor.q_out_cb<5>().set("discrete", FUNC(discrete_device::write_line<SPRINT8_MOTOR6_EN>));
- motor.q_out_cb<6>().set("discrete", FUNC(discrete_device::write_line<SPRINT8_MOTOR7_EN>));
- motor.q_out_cb<7>().set("discrete", FUNC(discrete_device::write_line<SPRINT8_MOTOR8_EN>));
-MACHINE_CONFIG_END
+ motor.q_out_cb<0>().set(m_discrete, FUNC(discrete_device::write_line<SPRINT8_MOTOR1_EN>));
+ motor.q_out_cb<1>().set(m_discrete, FUNC(discrete_device::write_line<SPRINT8_MOTOR2_EN>));
+ motor.q_out_cb<2>().set(m_discrete, FUNC(discrete_device::write_line<SPRINT8_MOTOR3_EN>));
+ motor.q_out_cb<3>().set(m_discrete, FUNC(discrete_device::write_line<SPRINT8_MOTOR4_EN>));
+ motor.q_out_cb<4>().set(m_discrete, FUNC(discrete_device::write_line<SPRINT8_MOTOR5_EN>));
+ motor.q_out_cb<5>().set(m_discrete, FUNC(discrete_device::write_line<SPRINT8_MOTOR6_EN>));
+ motor.q_out_cb<6>().set(m_discrete, FUNC(discrete_device::write_line<SPRINT8_MOTOR7_EN>));
+ motor.q_out_cb<7>().set(m_discrete, FUNC(discrete_device::write_line<SPRINT8_MOTOR8_EN>));
+}
;
diff --git a/src/mame/audio/t5182.cpp b/src/mame/audio/t5182.cpp
index 93726634dcb..2cc831bf63d 100644
--- a/src/mame/audio/t5182.cpp
+++ b/src/mame/audio/t5182.cpp
@@ -371,9 +371,9 @@ void t5182_device::t5182_io(address_map &map)
// device_add_mconfig - add device configuration
//-------------------------------------------------
-MACHINE_CONFIG_START(t5182_device::device_add_mconfig)
- MCFG_DEVICE_ADD("t5182_z80", Z80, T5182_CLOCK)
- MCFG_DEVICE_PROGRAM_MAP(t5182_map)
- MCFG_DEVICE_IO_MAP(t5182_io)
-
-MACHINE_CONFIG_END
+void t5182_device::device_add_mconfig(machine_config &config)
+{
+ Z80(config, m_ourcpu, T5182_CLOCK);
+ m_ourcpu->set_addrmap(AS_PROGRAM, &t5182_device::t5182_map);
+ m_ourcpu->set_addrmap(AS_IO, &t5182_device::t5182_io);
+}
diff --git a/src/mame/audio/taito_en.cpp b/src/mame/audio/taito_en.cpp
index c4592aba133..bec1aa88503 100644
--- a/src/mame/audio/taito_en.cpp
+++ b/src/mame/audio/taito_en.cpp
@@ -43,7 +43,6 @@ taito_en_device::taito_en_device(const machine_config &mconfig, const char *tag,
void taito_en_device::device_start()
{
// tell the pump about the ESP chips
- m_pump->set_esp(m_esp);
uint8_t *ROM = m_osrom->base();
uint32_t max = (m_osrom->bytes() - 0x100000) / 0x20000;
for (int i = 0; i < 3; i++)
@@ -136,6 +135,18 @@ WRITE8_MEMBER(taito_en_device::mb87078_gain_changed)
/*************************************
*
+ * ES5510 callback
+ *
+ *************************************/
+
+void taito_en_device::es5505_clock_changed(u32 data)
+{
+ m_pump->set_unscaled_clock(data);
+}
+
+
+/*************************************
+ *
* M68681 callback
*
*************************************/
@@ -213,10 +224,12 @@ void taito_en_device::device_add_mconfig(machine_config &config)
SPEAKER(config, "rspeaker").front_right();
ESQ_5505_5510_PUMP(config, m_pump, XTAL(30'476'100) / (2 * 16 * 32));
+ m_pump->set_esp(m_esp);
m_pump->add_route(0, "lspeaker", 1.0);
m_pump->add_route(1, "rspeaker", 1.0);
ES5505(config, m_ensoniq, XTAL(30'476'100) / 2);
+ m_ensoniq->sample_rate_changed().set(FUNC(taito_en_device::es5505_clock_changed));
m_ensoniq->set_region0("ensoniq.0");
m_ensoniq->set_region1("ensoniq.0");
m_ensoniq->set_channels(4);
diff --git a/src/mame/audio/taito_en.h b/src/mame/audio/taito_en.h
index ca5854118d0..e3ab4c749e8 100644
--- a/src/mame/audio/taito_en.h
+++ b/src/mame/audio/taito_en.h
@@ -58,6 +58,7 @@ private:
DECLARE_WRITE8_MEMBER(duart_output);
DECLARE_WRITE8_MEMBER(mb87078_gain_changed);
+ void es5505_clock_changed(u32 data);
};
DECLARE_DEVICE_TYPE(TAITO_EN, taito_en_device)
diff --git a/src/mame/audio/targ.cpp b/src/mame/audio/targ.cpp
index 77d2c1fb150..d83b665955f 100644
--- a/src/mame/audio/targ.cpp
+++ b/src/mame/audio/targ.cpp
@@ -188,7 +188,6 @@ void exidy_state::spectar_audio(machine_config &config)
DAC_1BIT(config, m_dac, 0).add_route(ALL_OUTPUTS, "speaker", 0.99);
voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref", 0));
- vref.set_output(5.0);
vref.add_route(0, "dac", 1.0, DAC_VREF_POS_INPUT);
}
@@ -204,6 +203,5 @@ void exidy_state::targ_audio(machine_config &config)
DAC_1BIT(config, m_dac, 0).add_route(ALL_OUTPUTS, "speaker", 0.99);
voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref", 0));
- vref.set_output(5.0);
vref.add_route(0, "dac", 1.0, DAC_VREF_POS_INPUT);
}
diff --git a/src/mame/audio/timeplt.cpp b/src/mame/audio/timeplt.cpp
index 14bd7834c5c..c276cd3fcfe 100644
--- a/src/mame/audio/timeplt.cpp
+++ b/src/mame/audio/timeplt.cpp
@@ -219,13 +219,13 @@ void timeplt_audio_device::device_add_mconfig(machine_config &config)
}
-MACHINE_CONFIG_START(locomotn_audio_device::device_add_mconfig)
+void locomotn_audio_device::device_add_mconfig(machine_config &config)
+{
timeplt_audio_device::device_add_mconfig(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("tpsound")
- MCFG_DEVICE_PROGRAM_MAP(locomotn_sound_map)
-MACHINE_CONFIG_END
+ m_soundcpu->set_addrmap(AS_PROGRAM, &locomotn_audio_device::locomotn_sound_map);
+}
//-------------------------------------------------
// sound_stream_update - handle a stream update
diff --git a/src/mame/audio/timeplt.h b/src/mame/audio/timeplt.h
index fc3d57ec241..509de0fab17 100644
--- a/src/mame/audio/timeplt.h
+++ b/src/mame/audio/timeplt.h
@@ -34,9 +34,10 @@ protected:
void timeplt_sound_map(address_map &map);
+ required_device<cpu_device> m_soundcpu;
+
private:
// internal state
- required_device<cpu_device> m_soundcpu;
required_device<generic_latch_8_device> m_soundlatch;
required_device_array<filter_rc_device, 3> m_filter_0;
required_device_array<filter_rc_device, 3> m_filter_1;
diff --git a/src/mame/audio/tx1.cpp b/src/mame/audio/tx1.cpp
index d7eaf9d009a..f1667c8e7c0 100644
--- a/src/mame/audio/tx1.cpp
+++ b/src/mame/audio/tx1.cpp
@@ -386,21 +386,21 @@ void tx1_sound_device::sound_stream_update(sound_stream &stream, stream_sample_t
if (m_step0 & ((1 << TX1_FRAC)))
{
update_engine(m_eng0);
- m_pit0 = combine_4_weights(m_weights0, m_eng0[0], m_eng0[1], m_eng0[2], m_eng0[3]);
+ m_pit0 = combine_weights(m_weights0, m_eng0[0], m_eng0[1], m_eng0[2], m_eng0[3]);
m_step0 &= ((1 << TX1_FRAC) - 1);
}
if (m_step1 & ((1 << TX1_FRAC)))
{
update_engine(m_eng1);
- m_pit1 = combine_3_weights(m_weights1, m_eng1[0], m_eng1[1], m_eng1[3]);
+ m_pit1 = combine_weights(m_weights1, m_eng1[0], m_eng1[1], m_eng1[3]);
m_step1 &= ((1 << TX1_FRAC) - 1);
}
if (m_step2 & ((1 << TX1_FRAC)))
{
update_engine(m_eng2);
- m_pit2 = combine_3_weights(m_weights2, m_eng2[0], m_eng2[1], m_eng2[3]);
+ m_pit2 = combine_weights(m_weights2, m_eng2[0], m_eng2[1], m_eng2[3]);
m_step2 &= ((1 << TX1_FRAC) - 1);
}
@@ -552,7 +552,8 @@ ioport_constructor tx1j_sound_device::device_input_ports() const
return INPUT_PORTS_NAME(tx1j_inputs);
}
-MACHINE_CONFIG_START(tx1_sound_device::device_add_mconfig)
+void tx1_sound_device::device_add_mconfig(machine_config &config)
+{
Z80(config, m_audiocpu, TX1_PIXEL_CLOCK / 2);
m_audiocpu->set_addrmap(AS_PROGRAM, &tx1_sound_device::tx1_sound_prg);
m_audiocpu->set_addrmap(AS_IO, &tx1_sound_device::tx1_sound_io);
@@ -575,10 +576,9 @@ MACHINE_CONFIG_START(tx1_sound_device::device_add_mconfig)
aysnd.add_route(ALL_OUTPUTS, "frontleft", 0.1);
aysnd.add_route(ALL_OUTPUTS, "frontright", 0.1);
- MCFG_DEVICE_MODIFY(DEVICE_SELF)
- MCFG_SOUND_ROUTE(0, "frontleft", 0.2)
- MCFG_SOUND_ROUTE(1, "frontright", 0.2)
-MACHINE_CONFIG_END
+ this->add_route(0, "frontleft", 0.2);
+ this->add_route(1, "frontright", 0.2);
+}
/*************************************
*
@@ -659,7 +659,7 @@ void buggyboy_sound_device::device_start()
0, nullptr, nullptr, 0, 0 );
for (i = 0; i < 16; i++)
- m_eng_voltages[i] = combine_4_weights(aweights, BIT(tmp[i], 0), BIT(tmp[i], 1), BIT(tmp[i], 2), BIT(tmp[i], 3));
+ m_eng_voltages[i] = combine_weights(aweights, BIT(tmp[i], 0), BIT(tmp[i], 1), BIT(tmp[i], 2), BIT(tmp[i], 3));
/* Allocate the stream */
m_stream = machine().sound().stream_alloc(*this, 0, 2, machine().sample_rate());
@@ -1059,7 +1059,8 @@ ioport_constructor buggyboyjr_sound_device::device_input_ports() const
return INPUT_PORTS_NAME(buggyboyjr_inputs);
}
-MACHINE_CONFIG_START(buggyboy_sound_device::device_add_mconfig)
+void buggyboy_sound_device::device_add_mconfig(machine_config &config)
+{
Z80(config, m_audiocpu, BUGGYBOY_ZCLK / 2);
m_audiocpu->set_addrmap(AS_PROGRAM, &buggyboy_sound_device::buggyboy_sound_prg);
m_audiocpu->set_addrmap(AS_IO, &buggyboy_sound_device::buggyboy_sound_io);
@@ -1085,12 +1086,12 @@ MACHINE_CONFIG_START(buggyboy_sound_device::device_add_mconfig)
m_ym[1]->port_b_write_callback().set(FUNC(buggyboy_sound_device::ym2_b_w));
m_ym[1]->add_route(ALL_OUTPUTS, "frontright", 0.15);
- MCFG_DEVICE_MODIFY(DEVICE_SELF)
- MCFG_SOUND_ROUTE(0, "frontleft", 0.2)
- MCFG_SOUND_ROUTE(1, "frontright", 0.2)
-MACHINE_CONFIG_END
+ this->add_route(0, "frontleft", 0.2);
+ this->add_route(1, "frontright", 0.2);
+}
-MACHINE_CONFIG_START(buggyboyjr_sound_device::device_add_mconfig)
+void buggyboyjr_sound_device::device_add_mconfig(machine_config &config)
+{
Z80(config, m_audiocpu, BUGGYBOY_ZCLK / 2);
m_audiocpu->set_addrmap(AS_PROGRAM, &buggyboyjr_sound_device::buggybjr_sound_prg);
m_audiocpu->set_addrmap(AS_IO, &buggyboyjr_sound_device::buggyboy_sound_io);
@@ -1111,7 +1112,6 @@ MACHINE_CONFIG_START(buggyboyjr_sound_device::device_add_mconfig)
m_ym[1]->port_b_write_callback().set(FUNC(buggyboy_sound_device::ym2_b_w));
m_ym[1]->add_route(ALL_OUTPUTS, "frontright", 0.15);
- MCFG_DEVICE_MODIFY(DEVICE_SELF)
- MCFG_SOUND_ROUTE(0, "frontleft", 0.2)
- MCFG_SOUND_ROUTE(1, "frontright", 0.2)
-MACHINE_CONFIG_END
+ this->add_route(0, "frontleft", 0.2);
+ this->add_route(1, "frontright", 0.2);
+}
diff --git a/src/mame/audio/williams.cpp b/src/mame/audio/williams.cpp
index c94bea20c9a..1a515a44af7 100644
--- a/src/mame/audio/williams.cpp
+++ b/src/mame/audio/williams.cpp
@@ -70,7 +70,7 @@ DEFINE_DEVICE_TYPE(WILLIAMS_ADPCM_SOUND, williams_adpcm_sound_device, "wmsadpcm"
// williams_cvsd_sound_device - constructor
//-------------------------------------------------
-williams_cvsd_sound_device::williams_cvsd_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+williams_cvsd_sound_device::williams_cvsd_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
: device_t(mconfig, WILLIAMS_CVSD_SOUND, tag, owner, clock),
device_mixer_interface(mconfig, *this),
m_cpu(*this, "cpu"),
@@ -87,7 +87,7 @@ williams_cvsd_sound_device::williams_cvsd_sound_device(const machine_config &mco
// latch
//-------------------------------------------------
-WRITE16_MEMBER(williams_cvsd_sound_device::write)
+void williams_cvsd_sound_device::write(u16 data)
{
synchronize(0, data);
}
@@ -102,7 +102,7 @@ WRITE_LINE_MEMBER(williams_cvsd_sound_device::reset_write)
// going high halts the CPU
if (state)
{
- bank_select_w(m_cpu->space(), 0, 0);
+ bank_select_w(0);
device_reset();
m_cpu->set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
}
@@ -117,7 +117,7 @@ WRITE_LINE_MEMBER(williams_cvsd_sound_device::reset_write)
// bank_select_w - change memory banks
//-------------------------------------------------
-WRITE8_MEMBER(williams_cvsd_sound_device::bank_select_w)
+void williams_cvsd_sound_device::bank_select_w(u8 data)
{
m_rombank->set_entry(data & 0x0f);
}
@@ -127,7 +127,7 @@ WRITE8_MEMBER(williams_cvsd_sound_device::bank_select_w)
// talkback_w - write to the talkback latch
//-------------------------------------------------
-WRITE8_MEMBER(williams_cvsd_sound_device::talkback_w)
+void williams_cvsd_sound_device::talkback_w(u8 data)
{
m_talkback = data;
logerror("CVSD Talkback = %02X\n", data);
@@ -139,7 +139,7 @@ WRITE8_MEMBER(williams_cvsd_sound_device::talkback_w)
// the HC55516 and clock the data
//-------------------------------------------------
-WRITE8_MEMBER(williams_cvsd_sound_device::cvsd_digit_clock_clear_w)
+void williams_cvsd_sound_device::cvsd_digit_clock_clear_w(u8 data)
{
m_hc55516->digit_w(data);
m_hc55516->clock_w(0);
@@ -150,7 +150,7 @@ WRITE8_MEMBER(williams_cvsd_sound_device::cvsd_digit_clock_clear_w)
// cvsd_clock_set_w - set the clock on the HC55516
//-------------------------------------------------
-WRITE8_MEMBER(williams_cvsd_sound_device::cvsd_clock_set_w)
+void williams_cvsd_sound_device::cvsd_clock_set_w(u8 data)
{
m_hc55516->clock_w(1);
}
@@ -176,9 +176,10 @@ void williams_cvsd_sound_device::williams_cvsd_map(address_map &map)
// device_add_mconfig - add device configuration
//-------------------------------------------------
-MACHINE_CONFIG_START(williams_cvsd_sound_device::device_add_mconfig)
- MCFG_DEVICE_ADD(m_cpu, MC6809E, CVSD_MASTER_CLOCK / 4)
- MCFG_DEVICE_PROGRAM_MAP(williams_cvsd_map)
+void williams_cvsd_sound_device::device_add_mconfig(machine_config &config)
+{
+ MC6809E(config, m_cpu, CVSD_MASTER_CLOCK / 4);
+ m_cpu->set_addrmap(AS_PROGRAM, &williams_cvsd_sound_device::williams_cvsd_map);
PIA6821(config, m_pia, 0);
m_pia->writepa_handler().set("dac", FUNC(dac_byte_interface::data_w));
@@ -191,12 +192,13 @@ MACHINE_CONFIG_START(williams_cvsd_sound_device::device_add_mconfig)
ym.add_route(ALL_OUTPUTS, *this, 0.10);
MC1408(config, "dac", 0).add_route(ALL_OUTPUTS, *this, 0.25);
- MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
- MCFG_SOUND_ROUTE(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
+ voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref"));
+ vref.add_route(0, "dac", 1.0, DAC_VREF_POS_INPUT);
+ vref.add_route(0, "dac", -1.0, DAC_VREF_NEG_INPUT);
HC55516(config, m_hc55516, 0);
m_hc55516->add_route(ALL_OUTPUTS, *this, 0.60);
-MACHINE_CONFIG_END
+}
//-------------------------------------------------
@@ -206,7 +208,7 @@ MACHINE_CONFIG_END
void williams_cvsd_sound_device::device_start()
{
// configure master CPU banks
- uint8_t *rom = memregion("cpu")->base();
+ u8 *rom = memregion("cpu")->base();
for (int bank = 0; bank < 16; bank++)
{
//
@@ -262,7 +264,7 @@ void williams_cvsd_sound_device::device_timer(emu_timer &timer, device_timer_id
// williams_narc_sound_device - constructor
//-------------------------------------------------
-williams_narc_sound_device::williams_narc_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+williams_narc_sound_device::williams_narc_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
: device_t(mconfig, WILLIAMS_NARC_SOUND, tag, owner, clock),
device_mixer_interface(mconfig, *this),
m_cpu(*this, "cpu%u", 0U),
@@ -283,7 +285,7 @@ williams_narc_sound_device::williams_narc_sound_device(const machine_config &mco
// SYNC bits in bits 8 and 9
//-------------------------------------------------
-READ16_MEMBER(williams_narc_sound_device::read)
+u16 williams_narc_sound_device::read()
{
return m_talkback | (m_audio_sync << 8);
}
@@ -294,7 +296,7 @@ READ16_MEMBER(williams_narc_sound_device::read)
// latch
//-------------------------------------------------
-WRITE16_MEMBER(williams_narc_sound_device::write)
+void williams_narc_sound_device::write(u16 data)
{
synchronize(TID_MASTER_COMMAND, data);
}
@@ -309,8 +311,8 @@ WRITE_LINE_MEMBER(williams_narc_sound_device::reset_write)
// going high halts the CPU
if (state)
{
- master_bank_select_w(m_cpu[0]->space(), 0, 0);
- slave_bank_select_w(m_cpu[1]->space(), 0, 0);
+ master_bank_select_w(0);
+ slave_bank_select_w(0);
device_reset();
m_cpu[0]->set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
m_cpu[1]->set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
@@ -330,7 +332,7 @@ WRITE_LINE_MEMBER(williams_narc_sound_device::reset_write)
// master CPU
//-------------------------------------------------
-WRITE8_MEMBER(williams_narc_sound_device::master_bank_select_w)
+void williams_narc_sound_device::master_bank_select_w(u8 data)
{
m_masterbank->set_entry(data & 0x0f);
}
@@ -341,7 +343,7 @@ WRITE8_MEMBER(williams_narc_sound_device::master_bank_select_w)
// slave CPU
//-------------------------------------------------
-WRITE8_MEMBER(williams_narc_sound_device::slave_bank_select_w)
+void williams_narc_sound_device::slave_bank_select_w(u8 data)
{
m_slavebank->set_entry(data & 0x0f);
}
@@ -352,7 +354,7 @@ WRITE8_MEMBER(williams_narc_sound_device::slave_bank_select_w)
// agent
//-------------------------------------------------
-READ8_MEMBER(williams_narc_sound_device::command_r)
+u8 williams_narc_sound_device::command_r()
{
m_cpu[0]->set_input_line(M6809_IRQ_LINE, CLEAR_LINE);
m_sound_int_state = 0;
@@ -365,7 +367,7 @@ READ8_MEMBER(williams_narc_sound_device::command_r)
// slave CPU
//-------------------------------------------------
-WRITE8_MEMBER(williams_narc_sound_device::command2_w)
+void williams_narc_sound_device::command2_w(u8 data)
{
synchronize(TID_SLAVE_COMMAND, data);
}
@@ -376,7 +378,7 @@ WRITE8_MEMBER(williams_narc_sound_device::command2_w)
// CPU
//-------------------------------------------------
-READ8_MEMBER(williams_narc_sound_device::command2_r)
+u8 williams_narc_sound_device::command2_r()
{
m_cpu[1]->set_input_line(M6809_FIRQ_LINE, CLEAR_LINE);
return m_latch2;
@@ -388,7 +390,7 @@ READ8_MEMBER(williams_narc_sound_device::command2_r)
// talkback latch from the master CPU
//-------------------------------------------------
-WRITE8_MEMBER(williams_narc_sound_device::master_talkback_w)
+void williams_narc_sound_device::master_talkback_w(u8 data)
{
m_talkback = data;
logerror("Master Talkback = %02X\n", data);
@@ -400,7 +402,7 @@ WRITE8_MEMBER(williams_narc_sound_device::master_talkback_w)
// SYNC register
//-------------------------------------------------
-WRITE8_MEMBER(williams_narc_sound_device::master_sync_w)
+void williams_narc_sound_device::master_sync_w(u8 data)
{
timer_set(attotime::from_double(TIME_OF_74LS123(180000, 0.000001)), TID_SYNC_CLEAR, 0x01);
m_audio_sync |= 0x01;
@@ -413,7 +415,7 @@ WRITE8_MEMBER(williams_narc_sound_device::master_sync_w)
// talkback latch from the slave CPU
//-------------------------------------------------
-WRITE8_MEMBER(williams_narc_sound_device::slave_talkback_w)
+void williams_narc_sound_device::slave_talkback_w(u8 data)
{
logerror("Slave Talkback = %02X\n", data);
}
@@ -424,7 +426,7 @@ WRITE8_MEMBER(williams_narc_sound_device::slave_talkback_w)
// SYNC register
//-------------------------------------------------
-WRITE8_MEMBER(williams_narc_sound_device::slave_sync_w)
+void williams_narc_sound_device::slave_sync_w(u8 data)
{
timer_set(attotime::from_double(TIME_OF_74LS123(180000, 0.000001)), TID_SYNC_CLEAR, 0x02);
m_audio_sync |= 0x02;
@@ -437,7 +439,7 @@ WRITE8_MEMBER(williams_narc_sound_device::slave_sync_w)
// the HC55516 and clock the data
//-------------------------------------------------
-WRITE8_MEMBER(williams_narc_sound_device::cvsd_digit_clock_clear_w)
+void williams_narc_sound_device::cvsd_digit_clock_clear_w(u8 data)
{
m_hc55516->digit_w(data);
m_hc55516->clock_w(0);
@@ -448,7 +450,7 @@ WRITE8_MEMBER(williams_narc_sound_device::cvsd_digit_clock_clear_w)
// cvsd_clock_set_w - set the clock on the HC55516
//-------------------------------------------------
-WRITE8_MEMBER(williams_narc_sound_device::cvsd_clock_set_w)
+void williams_narc_sound_device::cvsd_clock_set_w(u8 data)
{
m_hc55516->clock_w(1);
}
@@ -497,26 +499,26 @@ void williams_narc_sound_device::williams_narc_slave_map(address_map &map)
//-------------------------------------------------
-MACHINE_CONFIG_START(williams_narc_sound_device::device_add_mconfig)
- MCFG_DEVICE_ADD("cpu0", MC6809E, NARC_MASTER_CLOCK / 4)
- MCFG_DEVICE_PROGRAM_MAP(williams_narc_master_map)
+void williams_narc_sound_device::device_add_mconfig(machine_config &config)
+{
+ MC6809E(config, m_cpu[0], NARC_MASTER_CLOCK / 4);
+ m_cpu[0]->set_addrmap(AS_PROGRAM, &williams_narc_sound_device::williams_narc_master_map);
- MCFG_DEVICE_ADD("cpu1", MC6809E, NARC_MASTER_CLOCK / 4)
- MCFG_DEVICE_PROGRAM_MAP(williams_narc_slave_map)
+ MC6809E(config, m_cpu[1], NARC_MASTER_CLOCK / 4);
+ m_cpu[1]->set_addrmap(AS_PROGRAM, &williams_narc_sound_device::williams_narc_slave_map);
ym2151_device &ym2151(YM2151(config, "ym2151", NARC_FM_CLOCK));
ym2151.irq_handler().set_inputline("cpu0", M6809_FIRQ_LINE);
ym2151.add_route(ALL_OUTPUTS, *this, 0.10);
- MCFG_DEVICE_ADD("dac1", AD7224, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, *this, 0.25)
- MCFG_DEVICE_ADD("dac2", AD7224, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, *this, 0.25)
- MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
- MCFG_SOUND_ROUTE(0, "dac1", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE(0, "dac1", -1.0, DAC_VREF_NEG_INPUT)
- MCFG_SOUND_ROUTE(0, "dac2", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE(0, "dac2", -1.0, DAC_VREF_NEG_INPUT)
+ AD7224(config, "dac1", 0).add_route(ALL_OUTPUTS, *this, 0.25);
+ AD7224(config, "dac2", 0).add_route(ALL_OUTPUTS, *this, 0.25);
+ voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref"));
+ vref.add_route(0, "dac1", 1.0, DAC_VREF_POS_INPUT); vref.add_route(0, "dac1", -1.0, DAC_VREF_NEG_INPUT);
+ vref.add_route(0, "dac2", 1.0, DAC_VREF_POS_INPUT); vref.add_route(0, "dac2", -1.0, DAC_VREF_NEG_INPUT);
- MCFG_DEVICE_ADD("cvsd", HC55516, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, *this, 0.60)
-MACHINE_CONFIG_END
+ HC55516(config, m_hc55516, 0).add_route(ALL_OUTPUTS, *this, 0.60);
+}
//-------------------------------------------------
@@ -526,7 +528,7 @@ MACHINE_CONFIG_END
void williams_narc_sound_device::device_start()
{
// configure master CPU banks
- uint8_t *rom = memregion("cpu0")->base();
+ u8 *rom = memregion("cpu0")->base();
for (int bank = 0; bank < 16; bank++)
{
//
@@ -617,7 +619,7 @@ void williams_narc_sound_device::device_timer(emu_timer &timer, device_timer_id
// williams_adpcm_sound_device - constructor
//-------------------------------------------------
-williams_adpcm_sound_device::williams_adpcm_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+williams_adpcm_sound_device::williams_adpcm_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
: device_t(mconfig, WILLIAMS_ADPCM_SOUND, tag, owner, clock),
device_mixer_interface(mconfig, *this),
m_cpu(*this, "cpu"),
@@ -635,7 +637,7 @@ williams_adpcm_sound_device::williams_adpcm_sound_device(const machine_config &m
// latch
//-------------------------------------------------
-WRITE16_MEMBER(williams_adpcm_sound_device::write)
+void williams_adpcm_sound_device::write(u16 data)
{
synchronize(TID_COMMAND, data);
}
@@ -650,7 +652,7 @@ WRITE_LINE_MEMBER(williams_adpcm_sound_device::reset_write)
// going high halts the CPU
if (state)
{
- bank_select_w(m_cpu->space(), 0, 0);
+ bank_select_w(0);
device_reset();
m_cpu->set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
}
@@ -676,18 +678,18 @@ READ_LINE_MEMBER(williams_adpcm_sound_device::irq_read)
// bank
//-------------------------------------------------
-WRITE8_MEMBER(williams_adpcm_sound_device::bank_select_w)
+void williams_adpcm_sound_device::bank_select_w(u8 data)
{
m_rombank->set_entry(data & 0x07);
}
//-------------------------------------------------
-// bank_select_w - select the OKI6295 memory
-// bank
+// oki6295_bank_select_w - select the OKI6295
+// memory bank
//-------------------------------------------------
-WRITE8_MEMBER(williams_adpcm_sound_device::oki6295_bank_select_w)
+void williams_adpcm_sound_device::oki6295_bank_select_w(u8 data)
{
m_okibank->set_entry(data & 7);
}
@@ -698,7 +700,7 @@ WRITE8_MEMBER(williams_adpcm_sound_device::oki6295_bank_select_w)
// latch
//-------------------------------------------------
-READ8_MEMBER(williams_adpcm_sound_device::command_r)
+u8 williams_adpcm_sound_device::command_r()
{
m_cpu->set_input_line(M6809_IRQ_LINE, CLEAR_LINE);
@@ -713,7 +715,7 @@ READ8_MEMBER(williams_adpcm_sound_device::command_r)
// talkback_w - write to the talkback latch
//-------------------------------------------------
-WRITE8_MEMBER(williams_adpcm_sound_device::talkback_w)
+void williams_adpcm_sound_device::talkback_w(u8 data)
{
m_talkback = data;
logerror("ADPCM Talkback = %02X\n", data);
@@ -754,22 +756,24 @@ void williams_adpcm_sound_device::williams_adpcm_oki_map(address_map &map)
// device_add_mconfig - add device configuration
//-------------------------------------------------
-MACHINE_CONFIG_START(williams_adpcm_sound_device::device_add_mconfig)
- MCFG_DEVICE_ADD("cpu", MC6809E, ADPCM_MASTER_CLOCK / 4)
- MCFG_DEVICE_PROGRAM_MAP(williams_adpcm_map)
+void williams_adpcm_sound_device::device_add_mconfig(machine_config &config)
+{
+ MC6809E(config, m_cpu, ADPCM_MASTER_CLOCK / 4);
+ m_cpu->set_addrmap(AS_PROGRAM, &williams_adpcm_sound_device::williams_adpcm_map);
ym2151_device &ym2151(YM2151(config, "ym2151", ADPCM_FM_CLOCK));
ym2151.irq_handler().set_inputline("cpu", M6809_FIRQ_LINE);
ym2151.add_route(ALL_OUTPUTS, *this, 0.10);
- MCFG_DEVICE_ADD("dac", AD7524, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, *this, 0.10)
- MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
- MCFG_SOUND_ROUTE(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
+ AD7524(config, "dac", 0).add_route(ALL_OUTPUTS, *this, 0.10);
+ voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref"));
+ vref.add_route(0, "dac", 1.0, DAC_VREF_POS_INPUT);
+ vref.add_route(0, "dac", -1.0, DAC_VREF_NEG_INPUT);
- MCFG_DEVICE_ADD("oki", OKIM6295, ADPCM_MASTER_CLOCK/8, okim6295_device::PIN7_HIGH) // clock frequency & pin 7 not verified
- MCFG_DEVICE_ADDRESS_MAP(0, williams_adpcm_oki_map)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, *this, 0.15)
-MACHINE_CONFIG_END
+ okim6295_device &oki(OKIM6295(config, "oki", ADPCM_MASTER_CLOCK/8, okim6295_device::PIN7_HIGH)); // clock frequency & pin 7 not verified
+ oki.set_addrmap(0, &williams_adpcm_sound_device::williams_adpcm_oki_map);
+ oki.add_route(ALL_OUTPUTS, *this, 0.15);
+}
//-------------------------------------------------
@@ -779,7 +783,7 @@ MACHINE_CONFIG_END
void williams_adpcm_sound_device::device_start()
{
// configure banks
- uint8_t *rom = memregion("cpu")->base();
+ u8 *rom = memregion("cpu")->base();
m_rombank->configure_entries(0, 8, &rom[0x10000], 0x8000);
membank("romupper")->set_base(&rom[0x10000 + 0x4000 + 7 * 0x8000]);
diff --git a/src/mame/audio/williams.h b/src/mame/audio/williams.h
index fa12524d3c1..a14e1d57d06 100644
--- a/src/mame/audio/williams.h
+++ b/src/mame/audio/williams.h
@@ -37,16 +37,16 @@ class williams_cvsd_sound_device : public device_t,
{
public:
// construction/destruction
- williams_cvsd_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
+ williams_cvsd_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0);
// read/write
- DECLARE_WRITE16_MEMBER(write);
+ void write(u16 data);
DECLARE_WRITE_LINE_MEMBER(reset_write);
// internal communications
- DECLARE_WRITE8_MEMBER(bank_select_w);
- DECLARE_WRITE8_MEMBER(cvsd_digit_clock_clear_w);
- DECLARE_WRITE8_MEMBER(cvsd_clock_set_w);
+ void bank_select_w(u8 data);
+ void cvsd_digit_clock_clear_w(u8 data);
+ void cvsd_clock_set_w(u8 data);
void williams_cvsd_map(address_map &map);
@@ -68,9 +68,9 @@ private:
required_memory_bank m_rombank;
// internal state
- uint8_t m_talkback;
+ u8 m_talkback;
- DECLARE_WRITE8_MEMBER(talkback_w);
+ void talkback_w(u8 data);
};
@@ -81,25 +81,25 @@ class williams_narc_sound_device : public device_t,
{
public:
// construction/destruction
- williams_narc_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
+ williams_narc_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0);
// read/write
- DECLARE_READ16_MEMBER(read);
- DECLARE_WRITE16_MEMBER(write);
+ u16 read();
+ void write(u16 data);
DECLARE_WRITE_LINE_MEMBER(reset_write);
// internal communications
- DECLARE_WRITE8_MEMBER(master_bank_select_w);
- DECLARE_WRITE8_MEMBER(slave_bank_select_w);
- DECLARE_READ8_MEMBER(command_r);
- DECLARE_WRITE8_MEMBER(command2_w);
- DECLARE_READ8_MEMBER(command2_r);
- DECLARE_WRITE8_MEMBER(master_talkback_w);
- DECLARE_WRITE8_MEMBER(master_sync_w);
- DECLARE_WRITE8_MEMBER(slave_talkback_w);
- DECLARE_WRITE8_MEMBER(slave_sync_w);
- DECLARE_WRITE8_MEMBER(cvsd_digit_clock_clear_w);
- DECLARE_WRITE8_MEMBER(cvsd_clock_set_w);
+ void master_bank_select_w(u8 data);
+ void slave_bank_select_w(u8 data);
+ u8 command_r();
+ void command2_w(u8 data);
+ u8 command2_r();
+ void master_talkback_w(u8 data);
+ void master_sync_w(u8 data);
+ void slave_talkback_w(u8 data);
+ void slave_sync_w(u8 data);
+ void cvsd_digit_clock_clear_w(u8 data);
+ void cvsd_clock_set_w(u8 data);
void williams_narc_master_map(address_map &map);
void williams_narc_slave_map(address_map &map);
@@ -130,11 +130,11 @@ private:
required_memory_bank m_slavebank;
// internal state
- uint8_t m_latch;
- uint8_t m_latch2;
- uint8_t m_talkback;
- uint8_t m_audio_sync;
- uint8_t m_sound_int_state;
+ u8 m_latch;
+ u8 m_latch2;
+ u8 m_talkback;
+ u8 m_audio_sync;
+ u8 m_sound_int_state;
};
@@ -145,18 +145,18 @@ class williams_adpcm_sound_device : public device_t,
{
public:
// construction/destruction
- williams_adpcm_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
+ williams_adpcm_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0);
// read/write
- DECLARE_WRITE16_MEMBER(write);
+ void write(u16 data);
DECLARE_WRITE_LINE_MEMBER(reset_write);
DECLARE_READ_LINE_MEMBER(irq_read);
// internal communications
- DECLARE_WRITE8_MEMBER(bank_select_w);
- DECLARE_WRITE8_MEMBER(oki6295_bank_select_w);
- DECLARE_READ8_MEMBER(command_r);
- DECLARE_WRITE8_MEMBER(talkback_w);
+ void bank_select_w(u8 data);
+ void oki6295_bank_select_w(u8 data);
+ u8 command_r();
+ void talkback_w(u8 data);
void williams_adpcm_map(address_map &map);
void williams_adpcm_oki_map(address_map &map);
@@ -185,7 +185,7 @@ private:
required_memory_bank m_okibank;
// internal state
- uint8_t m_latch;
- uint8_t m_talkback;
- uint8_t m_sound_int_state;
+ u8 m_latch;
+ u8 m_talkback;
+ u8 m_sound_int_state;
};
diff --git a/src/mame/audio/wpcsnd.cpp b/src/mame/audio/wpcsnd.cpp
index bb34e560a8d..05abf086a74 100644
--- a/src/mame/audio/wpcsnd.cpp
+++ b/src/mame/audio/wpcsnd.cpp
@@ -69,22 +69,23 @@ uint8_t wpcsnd_device::data_r()
return m_reply;
}
-MACHINE_CONFIG_START(wpcsnd_device::device_add_mconfig)
- MCFG_DEVICE_ADD("bgcpu", MC6809E, XTAL(8'000'000) / 4) // MC68B09E
- MCFG_DEVICE_PROGRAM_MAP(wpcsnd_map)
- MCFG_QUANTUM_TIME(attotime::from_hz(50))
+void wpcsnd_device::device_add_mconfig(machine_config &config)
+{
+ MC6809E(config, m_cpu, XTAL(8'000'000) / 4); // MC68B09E
+ m_cpu->set_addrmap(AS_PROGRAM, &wpcsnd_device::wpcsnd_map);
+ config.m_minimum_quantum = attotime::from_hz(50);
YM2151(config, m_ym2151, 3580000);
m_ym2151->irq_handler().set(FUNC(wpcsnd_device::ym2151_irq_w));
m_ym2151->add_route(ALL_OUTPUTS, *this, 0.25);
- MCFG_DEVICE_ADD("dac", AD7524, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, *this, 0.25)
- MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
- MCFG_SOUND_ROUTE(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
+ AD7524(config, "dac", 0).add_route(ALL_OUTPUTS, *this, 0.25);
+ voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref"));
+ vref.add_route(0, "dac", 1.0, DAC_VREF_POS_INPUT);
+ vref.add_route(0, "dac", -1.0, DAC_VREF_NEG_INPUT);
- MCFG_DEVICE_ADD("hc55516", HC55516, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, *this, 0.5)
-MACHINE_CONFIG_END
+ HC55516(config, m_hc55516, 0).add_route(ALL_OUTPUTS, *this, 0.5);
+}
void wpcsnd_device::device_start()
diff --git a/src/mame/audio/wswan.cpp b/src/mame/audio/wswan.cpp
index e8638bbc850..a7cb1ab1ceb 100644
--- a/src/mame/audio/wswan.cpp
+++ b/src/mame/audio/wswan.cpp
@@ -282,7 +282,7 @@ void wswan_sound_device::wswan_ch_set_freq( CHAN *ch, uint16_t freq )
ch->period = 2048 - freq;
}
-WRITE8_MEMBER( wswan_sound_device::port_w )
+void wswan_sound_device::port_w(offs_t offset, uint8_t data)
{
m_channel->update();
diff --git a/src/mame/audio/wswan.h b/src/mame/audio/wswan.h
index d04301ac868..3e39081ad57 100644
--- a/src/mame/audio/wswan.h
+++ b/src/mame/audio/wswan.h
@@ -25,7 +25,7 @@ class wswan_sound_device : public device_t,
public:
wswan_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- DECLARE_WRITE8_MEMBER( port_w );
+ void port_w(offs_t offset, uint8_t data);
protected:
struct CHAN
diff --git a/src/mame/audio/zaccaria.cpp b/src/mame/audio/zaccaria.cpp
index b7284a1f8b4..da94bae6ce1 100644
--- a/src/mame/audio/zaccaria.cpp
+++ b/src/mame/audio/zaccaria.cpp
@@ -189,10 +189,10 @@ READ8_MEMBER(zac1b111xx_melody_base::melodypia_porta_r)
u8 data = 0xff;
if (0x01 == (control & 0x03))
- data &= m_melodypsg1->data_r(space, 0);
+ data &= m_melodypsg1->data_r();
if (0x04 == (control & 0x0c))
- data &= m_melodypsg2->data_r(space, 0);
+ data &= m_melodypsg2->data_r();
return data;
}
@@ -202,19 +202,19 @@ WRITE8_MEMBER(zac1b111xx_melody_base::melodypia_porta_w)
u8 const control = m_melodypia->b_output();
if (control & 0x02)
- m_melodypsg1->data_address_w(space, (control >> 0) & 0x01, data);
+ m_melodypsg1->data_address_w((control >> 0) & 0x01, data);
if (control & 0x08)
- m_melodypsg2->data_address_w(space, (control >> 2) & 0x01, data);
+ m_melodypsg2->data_address_w((control >> 2) & 0x01, data);
}
WRITE8_MEMBER(zac1b111xx_melody_base::melodypia_portb_w)
{
if (data & 0x02)
- m_melodypsg1->data_address_w(space, (data >> 0) & 0x01, m_melodypia->a_output());
+ m_melodypsg1->data_address_w((data >> 0) & 0x01, m_melodypia->a_output());
if (data & 0x08)
- m_melodypsg2->data_address_w(space, (data >> 2) & 0x01, m_melodypia->a_output());
+ m_melodypsg2->data_address_w((data >> 2) & 0x01, m_melodypia->a_output());
}
READ8_MEMBER(zac1b111xx_melody_base::melodypsg1_portb_r)
@@ -430,7 +430,6 @@ void zac1b11142_audio_device::device_add_mconfig(machine_config &config)
MC1408(config, "dac", 0).add_route(ALL_OUTPUTS, *this, 0.40, AUTO_ALLOC_INPUT, 0); // mc1408.1f
voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref", 0));
- vref.set_output(5.0);
vref.add_route(0, "dac", 1.0, DAC_VREF_POS_INPUT);
vref.add_route(0, "dac", -1.0, DAC_VREF_NEG_INPUT);