summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/audio
diff options
context:
space:
mode:
author andreasnaive <andreasnaive@gmail.com>2019-03-25 23:13:40 +0100
committer andreasnaive <andreasnaive@gmail.com>2019-03-25 23:13:40 +0100
commitb380514764cf857469bae61c11143a19f79a74c5 (patch)
tree63c8012e262618f08a332da31dd714281aa2c5ed /src/mame/audio
parentc24473ddff715ecec2e258a6eb38960cf8c8e98e (diff)
Revert "conflict resolution (nw)"
This reverts commit c24473ddff715ecec2e258a6eb38960cf8c8e98e, reversing changes made to 009cba4fb8102102168ef32870892438327f3705.
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, 446 insertions, 476 deletions
diff --git a/src/mame/audio/alesis.cpp b/src/mame/audio/alesis.cpp
index 135a301dae7..39fb0609fb6 100644
--- a/src/mame/audio/alesis.cpp
+++ b/src/mame/audio/alesis.cpp
@@ -41,17 +41,15 @@ alesis_dm3ag_device::alesis_dm3ag_device(const machine_config &mconfig, const ch
// device_add_mconfig
//-------------------------------------------------
-void alesis_dm3ag_device::device_add_mconfig(machine_config &config)
-{
+MACHINE_CONFIG_START(alesis_dm3ag_device::device_add_mconfig)
SPEAKER(config, "lspeaker1").front_left();
SPEAKER(config, "rspeaker1").front_right();
SPEAKER(config, "lspeaker2").front_left();
SPEAKER(config, "rspeaker2").front_right();
- 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);
-}
+ 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
//-------------------------------------------------
// device_start - device-specific startup
diff --git a/src/mame/audio/asteroid.cpp b/src/mame/audio/asteroid.cpp
index cbae5ac9efb..bfc5bb773f7 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)
}
-void asteroid_state::asteroid_sound(machine_config &config)
-{
+MACHINE_CONFIG_START(asteroid_state::asteroid_sound)
SPEAKER(config, "mono").front_center();
- DISCRETE(config, m_discrete, asteroid_discrete).add_route(ALL_OUTPUTS, "mono", 1.4);
+ MCFG_DEVICE_ADD("discrete", DISCRETE, asteroid_discrete)
+ MCFG_SOUND_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 @@ void asteroid_state::asteroid_sound(machine_config &config)
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
-void asteroid_state::astdelux_sound(machine_config &config)
-{
+MACHINE_CONFIG_START(asteroid_state::astdelux_sound)
SPEAKER(config, "mono").front_center();
- DISCRETE(config, m_discrete, astdelux_discrete).add_route(ALL_OUTPUTS, "mono", 1.0);
+ MCFG_DEVICE_ADD("discrete", DISCRETE, astdelux_discrete)
+ MCFG_SOUND_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 663013e1bc8..89e334a6672 100644
--- a/src/mame/audio/astrof.cpp
+++ b/src/mame/audio/astrof.cpp
@@ -162,10 +162,9 @@ WRITE8_MEMBER(astrof_state::spfghmk2_audio_w)
}
-void astrof_state::spfghmk2_audio(machine_config &config)
-{
+MACHINE_CONFIG_START(astrof_state::spfghmk2_audio)
/* nothing yet */
-}
+MACHINE_CONFIG_END
diff --git a/src/mame/audio/atarijsa.cpp b/src/mame/audio/atarijsa.cpp
index 51869806fe1..23b8dacbf5e 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();
+ return m_oki2->read(space, offset);
// OKI may not be populated at all
else if (m_oki1 != nullptr)
- return m_oki1->read();
+ return m_oki1->read(space, offset);
// 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(data);
+ m_oki2->write(space, offset, data);
// OKI may not be populated at all
else if (m_oki1 != nullptr)
- m_oki1->write(data);
+ m_oki1->write(space, offset, 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(offset);
+ return m_pokey->read(space, 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(offset, data);
+ m_pokey->write(space, offset, data);
}
@@ -698,8 +698,8 @@ WRITE8_MEMBER( atari_jsa_i_device::pokey_w )
//-------------------------------------------------
// Fully populated JSA-I, not used by anyone
-void atari_jsa_i_device::device_add_mconfig(machine_config &config)
-{
+MACHINE_CONFIG_START(atari_jsa_i_device::device_add_mconfig)
+
// 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 @@ void atari_jsa_i_device::device_add_mconfig(machine_config &config)
m_ym2151->add_route(0, *this, 0.60, AUTO_ALLOC_INPUT, 0);
m_ym2151->add_route(1, *this, 0.60, AUTO_ALLOC_INPUT, 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("pokey", POKEY, JSA_MASTER_CLOCK/2)
+ MCFG_MIXER_ROUTE(ALL_OUTPUTS, *this, 0.40, 0)
+ MCFG_MIXER_ROUTE(ALL_OUTPUTS, *this, 0.40, 1)
- 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);
-}
+ 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
//-------------------------------------------------
diff --git a/src/mame/audio/avalnche.cpp b/src/mame/audio/avalnche.cpp
index 471c73a8e5c..3200bd8576f 100644
--- a/src/mame/audio/avalnche.cpp
+++ b/src/mame/audio/avalnche.cpp
@@ -102,27 +102,25 @@ static DISCRETE_SOUND_START(avalnche_discrete)
DISCRETE_SOUND_END
-void avalnche_state::avalnche_sound(machine_config &config)
-{
+MACHINE_CONFIG_START(avalnche_state::avalnche_sound)
SPEAKER(config, "mono").front_center();
- DISCRETE(config, m_discrete, avalnche_discrete).add_route(ALL_OUTPUTS, "mono", 1.0);
+ MCFG_DEVICE_ADD("discrete", DISCRETE, avalnche_discrete)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
- 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>));
-}
+ 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
-void avalnche_state::acatch_sound(machine_config &config)
-{
- // just a stub here...
+MACHINE_CONFIG_START(avalnche_state::acatch_sound) // 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 e2d2d6c6b2c..0384035ff91 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);
- //config.m_perfect_cpu_quantum = subtag("pokey1");
+ //MCFG_QUANTUM_PERFECT_CPU("pokey1")
}
void bwidow_state::gravitar_audio(machine_config &config)
diff --git a/src/mame/audio/cage.cpp b/src/mame/audio/cage.cpp
index 71be3313f6a..6d4167b254f 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_cpu(*this, "cpu"),
m_cageram(*this, "cageram"),
+ m_cpu(*this, "cpu"),
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
//-------------------------------------------------
-void atari_cage_device::device_add_mconfig(machine_config &config)
-{
+MACHINE_CONFIG_START(atari_cage_device::device_add_mconfig)
+
/* 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);
- 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));
+ 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)
/* sound hardware */
SPEAKER(config, "lspeaker").front_left();
@@ -630,19 +630,25 @@ void atari_cage_device::device_add_mconfig(machine_config &config)
GENERIC_LATCH_16(config, m_soundlatch);
#if (DAC_BUFFER_CHANNELS == 4)
- DMADAC(config, m_dmadac[0]).add_route(ALL_OUTPUTS, "rspeaker", 0.50);
+ MCFG_DEVICE_ADD("dac1", DMADAC)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.50)
- DMADAC(config, m_dmadac[1]).add_route(ALL_OUTPUTS, "lspeaker", 0.50);
+ MCFG_DEVICE_ADD("dac2", DMADAC)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.50)
- DMADAC(config, m_dmadac[2]).add_route(ALL_OUTPUTS, "lspeaker", 0.50);
+ MCFG_DEVICE_ADD("dac3", DMADAC)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.50)
- DMADAC(config, m_dmadac[3]).add_route(ALL_OUTPUTS, "rspeaker", 0.50);
+ MCFG_DEVICE_ADD("dac4", DMADAC)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.50)
#else
- DMADAC(config, m_dmadac[0]).add_route(ALL_OUTPUTS, "lspeaker", 1.0);
+ MCFG_DEVICE_ADD("dac1", DMADAC)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0)
- DMADAC(config, m_dmadac[1]).add_route(ALL_OUTPUTS, "rspeaker", 1.0);
+ MCFG_DEVICE_ADD("dac2", DMADAC)
+ MCFG_SOUND_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")
@@ -663,9 +669,10 @@ atari_cage_seattle_device::atari_cage_seattle_device(const machine_config &mconf
//-------------------------------------------------
-void atari_cage_seattle_device::device_add_mconfig(machine_config &config)
-{
+MACHINE_CONFIG_START(atari_cage_seattle_device::device_add_mconfig)
+
atari_cage_device::device_add_mconfig(config);
- m_cpu->set_addrmap(AS_PROGRAM, &atari_cage_seattle_device::cage_map_seattle);
-}
+ MCFG_DEVICE_MODIFY("cpu")
+ MCFG_DEVICE_PROGRAM_MAP(cage_map_seattle)
+MACHINE_CONFIG_END
diff --git a/src/mame/audio/cage.h b/src/mame/audio/cage.h
index 66c86f06cba..e8230aae377 100644
--- a/src/mame/audio/cage.h
+++ b/src/mame/audio/cage.h
@@ -64,10 +64,9 @@ 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 4709c274de4..d3bc5db7cc7 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(m_psgData);
+ m_psg->address_w(space, 0, m_psgData);
else
- m_psg->data_w(m_psgData);
+ m_psg->data_w(space, 0, m_psgData);
}
}
diff --git a/src/mame/audio/cmi01a.cpp b/src/mame/audio/cmi01a.cpp
index 0ec40b75a69..ad3899ac48a 100644
--- a/src/mame/audio/cmi01a.cpp
+++ b/src/mame/audio/cmi01a.cpp
@@ -26,8 +26,7 @@ cmi01a_device::cmi01a_device(const machine_config &mconfig, const char *tag, dev
{
}
-void cmi01a_device::device_add_mconfig(machine_config &config)
-{
+MACHINE_CONFIG_START(cmi01a_device::device_add_mconfig)
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));
@@ -50,8 +49,9 @@ void cmi01a_device::device_add_mconfig(machine_config &config)
m_ptm->o1_callback().set(FUNC(cmi01a_device::ptm_o1));
m_ptm->irq_callback().set("cmi01a_irq", FUNC(input_merger_device::in_w<4>));
- INPUT_MERGER_ANY_HIGH(config, "cmi01a_irq").output_handler().set(FUNC(cmi01a_device::cmi01a_irq));
-}
+ MCFG_INPUT_MERGER_ANY_HIGH("cmi01a_irq")
+ MCFG_INPUT_MERGER_OUTPUT_HANDLER(WRITELINE(*this, cmi01a_device, cmi01a_irq))
+MACHINE_CONFIG_END
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 )
}
}
-void cmi01a_device::pia_1_a_w(uint8_t data)
+WRITE8_MEMBER( cmi01a_device::pia_1_a_w )
{
// top two
}
-void cmi01a_device::pia_1_b_w(uint8_t data)
+WRITE8_MEMBER( cmi01a_device::pia_1_b_w )
{
}
-void cmi01a_device::rp_w(uint8_t data)
+WRITE8_MEMBER( cmi01a_device::rp_w )
{
m_rp = data;
}
-void cmi01a_device::ws_dir_w(uint8_t data)
+WRITE8_MEMBER( cmi01a_device::ws_dir_w )
{
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;
}
-void cmi01a_device::write(offs_t offset, uint8_t data)
+WRITE8_MEMBER( cmi01a_device::write )
{
//printf("C%d W: %02x = %02x\n", m_channel, offset, data);
@@ -335,11 +335,11 @@ void cmi01a_device::write(offs_t offset, uint8_t data)
break;
case 0x8: case 0x9: case 0xa: case 0xb:
- m_pia[0]->write(offset & 3, data);
+ m_pia[0]->write(space, offset & 3, data);
break;
case 0xc: case 0xd: case 0xe: case 0xf:
- m_pia[1]->write((BIT(offset, 0) << 1) | BIT(offset, 1), data);
+ m_pia[1]->write(space, (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 @@ void cmi01a_device::write(offs_t offset, uint8_t data)
int a2 = BIT(offset, 1);
//printf("CH%d PTM W: [%x] = %02x\n", m_channel, (a2 << 2) | (a1 << 1) | a0, data);
- m_ptm->write((a2 << 2) | (a1 << 1) | a0, data);
+ m_ptm->write(space, (a2 << 2) | (a1 << 1) | a0, data);
break;
}
@@ -360,7 +360,7 @@ void cmi01a_device::write(offs_t offset, uint8_t data)
}
}
-uint8_t cmi01a_device::read(offs_t offset)
+READ8_MEMBER( cmi01a_device::read )
{
if (machine().side_effects_disabled())
return 0;
@@ -392,11 +392,11 @@ uint8_t cmi01a_device::read(offs_t offset)
break;
case 0x8: case 0x9: case 0xa: case 0xb:
- data = m_pia[0]->read(offset & 3);
+ data = m_pia[0]->read(space, offset & 3);
break;
case 0xc: case 0xd: case 0xe: case 0xf:
- data = m_pia[1]->read((BIT(offset, 0) << 1) | BIT(offset, 1));
+ data = m_pia[1]->read(space, (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 @@ uint8_t cmi01a_device::read(offs_t offset)
int a1 = (m_ptm_o1 && BIT(offset, 3)) || (!BIT(offset, 3) && BIT(offset, 2));
int a2 = BIT(offset, 1);
- data = m_ptm->read((a2 << 2) | (a1 << 1) | a0);
+ data = m_ptm->read(space, (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 a0bfb603418..97685b7f624 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(); }
- void write(offs_t offset, uint8_t data);
- uint8_t read(offs_t offset);
+ DECLARE_WRITE8_MEMBER( write );
+ DECLARE_READ8_MEMBER( read );
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;
- void rp_w(uint8_t data);
- void ws_dir_w(uint8_t data);
+ DECLARE_WRITE8_MEMBER( rp_w );
+ DECLARE_WRITE8_MEMBER( ws_dir_w );
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 );
- void pia_1_a_w(uint8_t data);
- void pia_1_b_w(uint8_t data);
+ DECLARE_WRITE8_MEMBER( pia_1_a_w );
+ DECLARE_WRITE8_MEMBER( pia_1_b_w );
DECLARE_WRITE_LINE_MEMBER( ptm_o1 );
};
diff --git a/src/mame/audio/csd.cpp b/src/mame/audio/csd.cpp
index 9baf3792fed..416c3143353 100644
--- a/src/mame/audio/csd.cpp
+++ b/src/mame/audio/csd.cpp
@@ -36,10 +36,9 @@ void midway_cheap_squeak_deluxe_device::csdeluxe_map(address_map &map)
// machine configuration
//-------------------------------------------------
-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);
+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)
PIA6821(config, m_pia, 0);
m_pia->writepa_handler().set(FUNC(midway_cheap_squeak_deluxe_device::porta_w));
@@ -47,11 +46,10 @@ void midway_cheap_squeak_deluxe_device::device_add_mconfig(machine_config &confi
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));
- 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);
-}
+ 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
//-------------------------------------------------
// rom_region - device-specific ROM region
@@ -118,7 +116,7 @@ void midway_cheap_squeak_deluxe_device::suspend_cpu()
// stat_r - return the status value
//-------------------------------------------------
-u8 midway_cheap_squeak_deluxe_device::stat_r()
+READ8_MEMBER( midway_cheap_squeak_deluxe_device::stat_r )
{
return m_status;
}
@@ -127,7 +125,7 @@ u8 midway_cheap_squeak_deluxe_device::stat_r()
// sr_w - external 4-bit write to the input latch
//-------------------------------------------------
-void midway_cheap_squeak_deluxe_device::sr_w(u8 data)
+WRITE8_MEMBER( midway_cheap_squeak_deluxe_device::sr_w )
{
m_pia->write_portb(data & 0x0f);
}
diff --git a/src/mame/audio/csd.h b/src/mame/audio/csd.h
index c532863e151..0fb5a2f16a7 100644
--- a/src/mame/audio/csd.h
+++ b/src/mame/audio/csd.h
@@ -32,8 +32,8 @@ public:
void suspend_cpu();
// read/write
- u8 stat_r();
- void sr_w(u8 data);
+ DECLARE_READ8_MEMBER(stat_r);
+ DECLARE_WRITE8_MEMBER(sr_w);
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 df55e898700..99511cfe215 100644
--- a/src/mame/audio/exidy.cpp
+++ b/src/mame/audio/exidy.cpp
@@ -750,10 +750,9 @@ void venture_sound_device::venture_audio_map(address_map &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);
+MACHINE_CONFIG_START(venture_sound_device::device_add_mconfig)
+ MCFG_DEVICE_ADD("audiocpu", M6502, 3579545/4)
+ MCFG_DEVICE_PROGRAM_MAP(venture_audio_map)
RIOT6532(config, m_riot, SH6532_CLOCK);
m_riot->in_pa_callback().set(FUNC(venture_sound_device::r6532_porta_r));
@@ -769,12 +768,14 @@ void venture_sound_device::device_add_mconfig(machine_config &config)
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>));
- INPUT_MERGER_ANY_HIGH(config, "audioirq").output_handler().set_inputline("audiocpu", m6502_device::IRQ_LINE); // open collector
+ MCFG_INPUT_MERGER_ANY_HIGH("audioirq") // open collector
+ MCFG_INPUT_MERGER_OUTPUT_HANDLER(INPUTLINE("audiocpu", m6502_device::IRQ_LINE))
SPEAKER(config, "mono").front_center();
- this->add_route(ALL_OUTPUTS, "mono", 0.50);
-}
+ MCFG_DEVICE_MODIFY(DEVICE_SELF)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
+MACHINE_CONFIG_END
@@ -833,17 +834,17 @@ void mtrap_sound_device::cvsd_iomap(address_map &map)
}
-void mtrap_sound_device::device_add_mconfig(machine_config &config)
-{
+MACHINE_CONFIG_START(mtrap_sound_device::device_add_mconfig)
venture_sound_device::device_add_mconfig(config);
- 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);
+ MCFG_DEVICE_ADD("cvsdcpu", Z80, CVSD_Z80_CLOCK)
+ MCFG_DEVICE_PROGRAM_MAP(cvsd_map)
+ MCFG_DEVICE_IO_MAP(cvsd_iomap)
/* audio hardware */
- MC3417(config, m_cvsd, CVSD_CLOCK).add_route(ALL_OUTPUTS, "mono", 0.80);
-}
+ MCFG_DEVICE_ADD("cvsd", MC3417, CVSD_CLOCK)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80)
+MACHINE_CONFIG_END
/*************************************
@@ -980,10 +981,9 @@ void victory_sound_device::victory_audio_map(address_map &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);
+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)
RIOT6532(config, m_riot, SH6532_CLOCK);
m_riot->in_pa_callback().set(FUNC(victory_sound_device::r6532_porta_r));
@@ -997,11 +997,14 @@ void victory_sound_device::device_add_mconfig(machine_config &config)
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>));
- INPUT_MERGER_ANY_HIGH(config, "audioirq").output_handler().set_inputline("audiocpu", m6502_device::IRQ_LINE); // open collector
+ MCFG_INPUT_MERGER_ANY_HIGH("audioirq") // open collector
+ MCFG_INPUT_MERGER_OUTPUT_HANDLER(INPUTLINE("audiocpu", m6502_device::IRQ_LINE))
SPEAKER(config, "mono").front_center();
- this->add_route(ALL_OUTPUTS, "mono", 1.0);
+ MCFG_DEVICE_MODIFY(DEVICE_SELF)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
- TMS5220(config, m_tms, 640000).add_route(ALL_OUTPUTS, "mono", 1.0);
-}
+ MCFG_DEVICE_ADD("tms", TMS5220, 640000)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+MACHINE_CONFIG_END
diff --git a/src/mame/audio/exidy440.cpp b/src/mame/audio/exidy440.cpp
index df7c35fb084..59920448465 100644
--- a/src/mame/audio/exidy440.cpp
+++ b/src/mame/audio/exidy440.cpp
@@ -98,19 +98,22 @@ exidy440_sound_device::exidy440_sound_device(const machine_config &mconfig, cons
// device_add_mconfig - add device configuration
//-------------------------------------------------
-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);
+MACHINE_CONFIG_START(exidy440_sound_device::device_add_mconfig)
+ MCFG_DEVICE_ADD("audiocpu", MC6809, EXIDY440_AUDIO_CLOCK)
+ MCFG_DEVICE_PROGRAM_MAP(exidy440_audio_map)
-// MC3418(config, "cvsd1", EXIDY440_MC3418_CLOCK).add_route(ALL_OUTPUTS, "lspeaker", 1.0);
+// MCFG_DEVICE_ADD("cvsd1", MC3418, EXIDY440_MC3418_CLOCK)
+// MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0)
-// MC3418(config, "cvsd2", EXIDY440_MC3418_CLOCK).add_route(ALL_OUTPUTS, "rspeaker", 1.0);
+// MCFG_DEVICE_ADD("cvsd2", MC3418, EXIDY440_MC3418_CLOCK)
+// MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0)
-// MC3417(config, "cvsd3", EXIDY440_MC3417_CLOCK).add_route(ALL_OUTPUTS, "lspeaker", 1.0);
+// MCFG_DEVICE_ADD("cvsd3", MC3417, EXIDY440_MC3417_CLOCK)
+// MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0)
-// MC3417(config, "cvsd4", EXIDY440_MC3417_CLOCK).add_route(ALL_OUTPUTS, "rspeaker", 1.0);
-}
+// MCFG_DEVICE_ADD("cvsd4", MC3417, EXIDY440_MC3417_CLOCK)
+// MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0)
+MACHINE_CONFIG_END
//-------------------------------------------------
// device_start - device-specific startup
diff --git a/src/mame/audio/gottlieb.cpp b/src/mame/audio/gottlieb.cpp
index 8eab2d6b027..4b448f28c6d 100644
--- a/src/mame/audio/gottlieb.cpp
+++ b/src/mame/audio/gottlieb.cpp
@@ -2,7 +2,7 @@
// copyright-holders:Aaron Giles
/***************************************************************************
- gottlieb.cpp
+ gottlieb.c
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(m_r6530, FUNC(mos6530_device::read), FUNC(mos6530_device::write));
+ map(0x0200, 0x020f).rw("r6530", FUNC(mos6530_device::read), FUNC(mos6530_device::write));
map(0x0400, 0x0fff).rom();
}
@@ -115,23 +115,21 @@ INPUT_CHANGED_MEMBER( gottlieb_sound_r0_device::audio_nmi )
// device_add_mconfig - add device configuration
//-------------------------------------------------
-void gottlieb_sound_r0_device::device_add_mconfig(machine_config &config)
-{
+MACHINE_CONFIG_START(gottlieb_sound_r0_device::device_add_mconfig)
// audio CPU
- 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);
+ 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)
// I/O configuration
- 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));
+ 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))
// sound devices
- 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);
-}
+ 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
//-------------------------------------------------
@@ -245,11 +243,10 @@ INPUT_PORTS_END
// device_add_mconfig - add device configuration
//-------------------------------------------------
-void gottlieb_sound_r1_device::device_add_mconfig(machine_config &config)
-{
+MACHINE_CONFIG_START(gottlieb_sound_r1_device::device_add_mconfig)
// audio CPU
- 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);
+ 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)
INPUT_MERGER_ANY_HIGH(config, "nmi").output_handler().set_inputline("audiocpu", INPUT_LINE_NMI);
@@ -260,11 +257,10 @@ void gottlieb_sound_r1_device::device_add_mconfig(machine_config &config)
m_riot->irq_callback().set_inputline("audiocpu", M6502_IRQ_LINE);
// sound devices
- 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);
-}
+ 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
//-------------------------------------------------
@@ -358,8 +354,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(data >> 6);
- m_votrax->write(~data & 0x3f);
+ m_votrax->inflection_w(space, offset, data >> 6);
+ m_votrax->write(space, offset, ~data & 0x3f);
}
@@ -547,9 +543,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(data >> 4, m_psg_latch);
+ m_ay1->data_address_w(space, data >> 4, m_psg_latch);
else
- m_ay2->data_address_w(data >> 4, m_psg_latch);
+ m_ay2->data_address_w(space, data >> 4, m_psg_latch);
}
}
else
@@ -561,8 +557,8 @@ WRITE8_MEMBER( gottlieb_sound_r2_device::speech_control_w )
else
{
ay8913_device *ay = (data & 0x08) ? m_ay1 : m_ay2;
- ay->address_w(m_psg_latch);
- ay->data_w(m_psg_data_latch);
+ ay->address_w(space, 0, m_psg_latch);
+ ay->data_w(space, 0, m_psg_data_latch);
}
}
@@ -655,27 +651,28 @@ INPUT_PORTS_END
// device_add_mconfig - add device configuration
//-------------------------------------------------
-void gottlieb_sound_r2_device::device_add_mconfig(machine_config &config)
-{
+MACHINE_CONFIG_START(gottlieb_sound_r2_device::device_add_mconfig)
// audio CPUs
- M6502(config, m_audiocpu, SOUND2_CLOCK/4);
- m_audiocpu->set_addrmap(AS_PROGRAM, &gottlieb_sound_r2_device::gottlieb_sound_r2_map);
+ MCFG_DEVICE_ADD("audiocpu", M6502, SOUND2_CLOCK/4)
+ MCFG_DEVICE_PROGRAM_MAP(gottlieb_sound_r2_map)
- M6502(config, m_speechcpu, SOUND2_CLOCK/4);
- m_speechcpu->set_addrmap(AS_PROGRAM, &gottlieb_sound_r2_device::gottlieb_speech_r2_map);
+ MCFG_DEVICE_ADD("speechcpu", M6502, SOUND2_CLOCK/4)
+ MCFG_DEVICE_PROGRAM_MAP(gottlieb_speech_r2_map)
// sound hardware
- 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);
+ 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)
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);
- SP0250(config, m_sp0250, SOUND2_SPEECH_CLOCK).add_route(ALL_OUTPUTS, *this, 1.0);
-}
+ MCFG_DEVICE_ADD("spsnd", SP0250, SOUND2_SPEECH_CLOCK)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, *this, 1.0)
+MACHINE_CONFIG_END
//-------------------------------------------------
diff --git a/src/mame/audio/harddriv.cpp b/src/mame/audio/harddriv.cpp
index 6f14ca96460..598ff034ea9 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
//-------------------------------------------------
-void harddriv_sound_board_device::device_add_mconfig(machine_config &config)
-{
+MACHINE_CONFIG_START(harddriv_sound_board_device::device_add_mconfig)
+
/* 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,8 +455,7 @@ void harddriv_sound_board_device::device_add_mconfig(machine_config &config)
/* sound hardware */
SPEAKER(config, "speaker").front_center();
- 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);
-}
+ 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
diff --git a/src/mame/audio/irem.cpp b/src/mame/audio/irem.cpp
index 0786ccb2c0a..066296d4088 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(m_port1);
+ m_ay_45M->address_w(space, 0, m_port1);
if (m_port2 & 0x10)
- m_ay_45L->address_w(m_port1);
+ m_ay_45L->address_w(space, 0, m_port1);
}
else
{
/* PSG 0 or 1? */
if (m_port2 & 0x08)
- m_ay_45M->data_w(m_port1);
+ m_ay_45M->data_w(space, 0, m_port1);
if (m_port2 & 0x10)
- m_ay_45L->data_w(m_port1);
+ m_ay_45L->data_w(space, 0, 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();
+ return m_ay_45M->data_r(space, 0);
if (m_port2 & 0x10)
- return m_ay_45L->data_r();
+ return m_ay_45L->data_r(space, 0);
return 0xff;
}
diff --git a/src/mame/audio/leland.cpp b/src/mame/audio/leland.cpp
index 3d44fd2a539..fd46dfb7714 100644
--- a/src/mame/audio/leland.cpp
+++ b/src/mame/audio/leland.cpp
@@ -163,6 +163,7 @@ 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);
@@ -223,6 +224,7 @@ 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);
@@ -282,6 +284,7 @@ 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);
@@ -327,6 +330,7 @@ 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);
@@ -416,8 +420,6 @@ 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)")
@@ -620,11 +622,6 @@ 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);
@@ -640,9 +637,7 @@ WRITE16_MEMBER( leland_80186_sound_device::dac_w )
WRITE16_MEMBER( redline_80186_sound_device::redline_dac_w )
{
- data = (data & 0xff) | (offset << 8);
- offset = ((offset >> 8) & 7) | ((offset & 0x2000) ? 0x40 : 0) | ((offset & 0x800) ? 0x20 : 0);
- dac_w(space, offset, data, 0xffff);
+ dac_w(space, (offset >> 8) & 7, (data & 0xff) | (offset << 8), 0xffff);
}
WRITE16_MEMBER( leland_80186_sound_device::ataxx_dac_control )
@@ -650,22 +645,21 @@ WRITE16_MEMBER( leland_80186_sound_device::ataxx_dac_control )
if (ACCESSING_BITS_0_7)
{
/* handle common offsets */
- switch (offset & 0x1f)
+ switch (offset)
{
case 0x00:
- dac_w(space, 0x40, data, 0x00ff);
- return;
case 0x01:
- dac_w(space, 0x61, data, 0x00ff);
- return;
case 0x02:
- dac_w(space, 2, data, 0x00ff);
+ dac_w(space, offset, 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;
}
}
@@ -745,7 +739,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(offset);
+ return m_ymsnd->read(space, offset);
break;
case 4:
@@ -790,7 +784,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(offset, data);
+ m_ymsnd->write(space, offset, data);
break;
case 4:
diff --git a/src/mame/audio/llander.cpp b/src/mame/audio/llander.cpp
index 80429f032f4..4c216f3679b 100644
--- a/src/mame/audio/llander.cpp
+++ b/src/mame/audio/llander.cpp
@@ -98,9 +98,9 @@ WRITE8_MEMBER(asteroid_state::llander_sounds_w)
}
-void asteroid_state::llander_sound(machine_config &config)
-{
+MACHINE_CONFIG_START(asteroid_state::llander_sound)
SPEAKER(config, "mono").front_center();
- DISCRETE(config, m_discrete, llander_discrete).add_route(ALL_OUTPUTS, "mono", 1.0);
-}
+ MCFG_DEVICE_ADD("discrete", DISCRETE, llander_discrete)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+MACHINE_CONFIG_END
diff --git a/src/mame/audio/midway.cpp b/src/mame/audio/midway.cpp
index 2fc660bd094..f25b82f69b8 100644
--- a/src/mame/audio/midway.cpp
+++ b/src/mame/audio/midway.cpp
@@ -590,10 +590,9 @@ void midway_sounds_good_device::soundsgood_map(address_map &map)
// device_add_mconfig - add device configuration
//-------------------------------------------------
-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);
+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)
PIA6821(config, m_pia, 0);
m_pia->writepa_handler().set(FUNC(midway_sounds_good_device::porta_w));
@@ -601,11 +600,10 @@ void midway_sounds_good_device::device_add_mconfig(machine_config &config)
m_pia->irqa_handler().set(FUNC(midway_sounds_good_device::irq_w));
m_pia->irqb_handler().set(FUNC(midway_sounds_good_device::irq_w));
- 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);
-}
+ 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
//-------------------------------------------------
@@ -747,10 +745,9 @@ void midway_turbo_cheap_squeak_device::turbocs_map(address_map &map)
// device_add_mconfig - add device configuration
//-------------------------------------------------
-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);
+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)
PIA6821(config, m_pia, 0);
m_pia->writepa_handler().set(FUNC(midway_turbo_cheap_squeak_device::porta_w));
@@ -758,11 +755,10 @@ void midway_turbo_cheap_squeak_device::device_add_mconfig(machine_config &config
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));
- 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);
-}
+ 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
//-------------------------------------------------
@@ -953,10 +949,9 @@ void midway_squawk_n_talk_device::squawkntalk_alt_map(address_map &map)
// device_add_mconfig - add device configuration
//-------------------------------------------------
-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);
+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)
PIA6821(config, m_pia0, 0);
m_pia0->writepa_handler().set(FUNC(midway_squawk_n_talk_device::porta1_w));
@@ -970,11 +965,12 @@ void midway_squawk_n_talk_device::device_add_mconfig(machine_config &config)
m_pia1->irqb_handler().set(FUNC(midway_squawk_n_talk_device::irq_w));
// only used on Discs of Tron, which is stereo
- TMS5200(config, m_tms5200, 640000).add_route(ALL_OUTPUTS, *this, 0.60);
+ MCFG_DEVICE_ADD("tms5200", TMS5200, 640000)
+ MCFG_SOUND_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 9d135e89433..90557f27c3c 100644
--- a/src/mame/audio/n8080.cpp
+++ b/src/mame/audio/n8080.cpp
@@ -491,6 +491,7 @@ 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);
@@ -528,6 +529,7 @@ 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);
@@ -568,6 +570,7 @@ 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 f6dd3030111..747a543e846 100644
--- a/src/mame/audio/nichisnd.cpp
+++ b/src/mame/audio/nichisnd.cpp
@@ -78,8 +78,7 @@ static const z80_daisy_config daisy_chain[] =
-void nichisnd_device::device_add_mconfig(machine_config &config)
-{
+MACHINE_CONFIG_START(nichisnd_device::device_add_mconfig)
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);
@@ -96,14 +95,15 @@ void nichisnd_device::device_add_mconfig(machine_config &config)
GENERIC_LATCH_8(config, m_soundlatch);
- YM3812(config, "ymsnd", 4000000).add_route(ALL_OUTPUTS, "speaker", 1.0);
+ MCFG_DEVICE_ADD("ymsnd", YM3812, 4000000)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
- 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);
-}
+ 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
//-------------------------------------------------
diff --git a/src/mame/audio/nl_kidniki.cpp b/src/mame/audio/nl_kidniki.cpp
index 380059740d7..af9fc061c8c 100644
--- a/src/mame/audio/nl_kidniki.cpp
+++ b/src/mame/audio/nl_kidniki.cpp
@@ -2,17 +2,8 @@
// 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
@@ -317,7 +308,7 @@ NETLIST_END()
NETLIST_START(kidniki)
-#if (0 || USE_FRONTIERS)
+#if (1 || USE_FRONTIERS)
SOLVER(Solver, 18000)
PARAM(Solver.ACCURACY, 1e-7)
PARAM(Solver.NR_LOOPS, 100)
@@ -326,19 +317,16 @@ NETLIST_START(kidniki)
PARAM(Solver.METHOD, "MAT_CR")
//PARAM(Solver.METHOD, "MAT")
//PARAM(Solver.METHOD, "GMRES")
- PARAM(Solver.SOR_FACTOR, 1.313)
+ PARAM(Solver.SOR_FACTOR, 1.00)
PARAM(Solver.DYNAMIC_TS, 0)
PARAM(Solver.DYNAMIC_LTE, 5e-4)
PARAM(Solver.DYNAMIC_MIN_TIMESTEP, 20e-6)
#else
- SOLVER(Solver, 18000)
- PARAM(Solver.ACCURACY, 1e-7)
- PARAM(Solver.NR_LOOPS, 100)
- PARAM(Solver.GS_LOOPS, 300)
- //PARAM(Solver.METHOD, "MAT_CR")
+ SOLVER(Solver, 12000)
+ PARAM(Solver.ACCURACY, 1e-8)
+ PARAM(Solver.NR_LOOPS, 300)
+ PARAM(Solver.GS_LOOPS, 20)
PARAM(Solver.METHOD, "GMRES")
- //PARAM(Solver.SOR_FACTOR, 1.73)
- //PARAM(Solver.METHOD, "SOR")
#endif
#if (USE_FRONTIERS)
@@ -384,13 +372,16 @@ NETLIST_START(kidniki)
ALIAS(I_SINH0, SINH_DUMMY.2)
#endif
- NET_MODEL("AY8910PORT FAMILY(OVL=0.05 OVH=0.05 ORL=100.0 ORH=0.5k)")
+ NET_MODEL("AY8910PORT FAMILY(OVL=0.05 OVH=4.95 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 7f1aac03f70..7172603f816 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=0.05 ORL=100.0 ORH=0.5k)")
+ NET_MODEL("AY8910PORT FAMILY(OVL=0.05 OVH=4.95 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 a962dffd207..1fa0b1c33b0 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();
+ m_ay8910_latch_1 = m_ay8910->data_r(space, 0);
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(data, m_ay8910_latch_2);
+ m_ay8910->data_address_w(space, 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(data);
+ m_ay[0]->data_w(space, 0, data);
if (m_ay8910_latch_1 & 0x20)
- m_ay[1]->data_w(data);
+ m_ay[1]->data_w(space, 0, data);
break;
case 0x01:
if (m_ay8910_latch_1 & 0x10)
- m_ay8910_latch_2 = m_ay[0]->data_r();
+ m_ay8910_latch_2 = m_ay[0]->data_r(space, 0);
if (m_ay8910_latch_1 & 0x20)
- m_ay8910_latch_2 = m_ay[1]->data_r();
+ m_ay8910_latch_2 = m_ay[1]->data_r(space, 0);
break;
case 0x03:
if (m_ay8910_latch_1 & 0x10)
- m_ay[0]->address_w(data);
+ m_ay[0]->address_w(space, 0, data);
if (m_ay8910_latch_1 & 0x20)
- m_ay[1]->address_w(data);
+ m_ay[1]->address_w(space, 0, data);
break;
diff --git a/src/mame/audio/s11c_bg.cpp b/src/mame/audio/s11c_bg.cpp
index cdcbb701a76..7ababf96d48 100644
--- a/src/mame/audio/s11c_bg.cpp
+++ b/src/mame/audio/s11c_bg.cpp
@@ -58,31 +58,30 @@ void s11c_bg_device::data_w(uint8_t data)
m_pia40->write_portb(data);
}
-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);
+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))
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);
- 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("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)
- HC55516(config, m_hc55516, 0).add_route(ALL_OUTPUTS, *this, 0.5);
+ MCFG_DEVICE_ADD("hc55516_bg", HC55516, 0)
+ MCFG_SOUND_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(m_cpu, M6809_FIRQ_LINE);
- m_pia40->irqb_handler().set_inputline(m_cpu, INPUT_LINE_NMI);
-}
+ m_pia40->irqa_handler().set_inputline("bgcpu", M6809_FIRQ_LINE);
+ m_pia40->irqb_handler().set_inputline("bgcpu", INPUT_LINE_NMI);
+MACHINE_CONFIG_END
void s11c_bg_device::device_start()
{
diff --git a/src/mame/audio/segag80r.cpp b/src/mame/audio/segag80r.cpp
index 22fa9137274..e1cda7c68be 100644
--- a/src/mame/audio/segag80r.cpp
+++ b/src/mame/audio/segag80r.cpp
@@ -838,6 +838,7 @@ 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 091186b79a2..c714fe23c0e 100644
--- a/src/mame/audio/snk6502.cpp
+++ b/src/mame/audio/snk6502.cpp
@@ -339,6 +339,7 @@ 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 c8e139ac583..a6e3055d130 100644
--- a/src/mame/audio/spacefb.cpp
+++ b/src/mame/audio/spacefb.cpp
@@ -82,6 +82,7 @@ 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 3a50b0556c0..93c03844447 100644
--- a/src/mame/audio/spiders.cpp
+++ b/src/mame/audio/spiders.cpp
@@ -204,8 +204,9 @@ WRITE8_MEMBER(spiders_state::spiders_audio_ctrl_w)
}
-void spiders_state::spiders_audio(machine_config &config)
-{
+MACHINE_CONFIG_START(spiders_state::spiders_audio)
+
SPEAKER(config, "mono").front_center();
- DISCRETE(config, m_discrete, spiders_discrete).add_route(ALL_OUTPUTS, "mono", 1.0);
-}
+ MCFG_DEVICE_ADD("discrete", DISCRETE, spiders_discrete)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+MACHINE_CONFIG_END
diff --git a/src/mame/audio/sprint8.cpp b/src/mame/audio/sprint8.cpp
index c05a83bc890..e187173cbcd 100644
--- a/src/mame/audio/sprint8.cpp
+++ b/src/mame/audio/sprint8.cpp
@@ -296,8 +296,7 @@ DISCRETE_SOUND_START( sprint8_discrete )
DISCRETE_TASK_END()
DISCRETE_SOUND_END
-void sprint8_state::sprint8_audio(machine_config &config)
-{
+MACHINE_CONFIG_START(sprint8_state::sprint8_audio)
/* 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. */
@@ -306,30 +305,30 @@ void sprint8_state::sprint8_audio(machine_config &config)
SPEAKER(config, "speaker_5_6", 0.0, 0.0, -0.5); // back
SPEAKER(config, "speaker_4_8", 0.2, 0.0, 1.0); // right
- DISCRETE(config, m_discrete, sprint8_discrete);
- m_discrete->add_route(0, "speaker_1_2", 1.0);
+ MCFG_DEVICE_ADD("discrete", DISCRETE, sprint8_discrete)
+ MCFG_SOUND_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. */
- 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);
+ 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)
f9334_device &latch(F9334(config, "latch"));
latch.q_out_cb<0>().set(FUNC(sprint8_state::int_reset_w));
- 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<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<5>().set(FUNC(sprint8_state::team_w));
- latch.q_out_cb<6>().set(m_discrete, FUNC(discrete_device::write_line<SPRINT8_ATTRACT_EN>));
+ latch.q_out_cb<6>().set("discrete", FUNC(discrete_device::write_line<SPRINT8_ATTRACT_EN>));
f9334_device &motor(F9334(config, "motor"));
- 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>));
-}
+ 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
;
diff --git a/src/mame/audio/t5182.cpp b/src/mame/audio/t5182.cpp
index 2cc831bf63d..93726634dcb 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
//-------------------------------------------------
-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);
-}
+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
diff --git a/src/mame/audio/taito_en.cpp b/src/mame/audio/taito_en.cpp
index bec1aa88503..c4592aba133 100644
--- a/src/mame/audio/taito_en.cpp
+++ b/src/mame/audio/taito_en.cpp
@@ -43,6 +43,7 @@ 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++)
@@ -135,18 +136,6 @@ 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
*
*************************************/
@@ -224,12 +213,10 @@ 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 e3ab4c749e8..ca5854118d0 100644
--- a/src/mame/audio/taito_en.h
+++ b/src/mame/audio/taito_en.h
@@ -58,7 +58,6 @@ 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 d83b665955f..77d2c1fb150 100644
--- a/src/mame/audio/targ.cpp
+++ b/src/mame/audio/targ.cpp
@@ -188,6 +188,7 @@ 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);
}
@@ -203,5 +204,6 @@ 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 c276cd3fcfe..14bd7834c5c 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)
}
-void locomotn_audio_device::device_add_mconfig(machine_config &config)
-{
+MACHINE_CONFIG_START(locomotn_audio_device::device_add_mconfig)
timeplt_audio_device::device_add_mconfig(config);
/* basic machine hardware */
- m_soundcpu->set_addrmap(AS_PROGRAM, &locomotn_audio_device::locomotn_sound_map);
-}
+ MCFG_DEVICE_MODIFY("tpsound")
+ MCFG_DEVICE_PROGRAM_MAP(locomotn_sound_map)
+MACHINE_CONFIG_END
//-------------------------------------------------
// sound_stream_update - handle a stream update
diff --git a/src/mame/audio/timeplt.h b/src/mame/audio/timeplt.h
index 509de0fab17..fc3d57ec241 100644
--- a/src/mame/audio/timeplt.h
+++ b/src/mame/audio/timeplt.h
@@ -34,10 +34,9 @@ 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 f1667c8e7c0..d7eaf9d009a 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_weights(m_weights0, m_eng0[0], m_eng0[1], m_eng0[2], m_eng0[3]);
+ m_pit0 = combine_4_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_weights(m_weights1, m_eng1[0], m_eng1[1], m_eng1[3]);
+ m_pit1 = combine_3_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_weights(m_weights2, m_eng2[0], m_eng2[1], m_eng2[3]);
+ m_pit2 = combine_3_weights(m_weights2, m_eng2[0], m_eng2[1], m_eng2[3]);
m_step2 &= ((1 << TX1_FRAC) - 1);
}
@@ -552,8 +552,7 @@ ioport_constructor tx1j_sound_device::device_input_ports() const
return INPUT_PORTS_NAME(tx1j_inputs);
}
-void tx1_sound_device::device_add_mconfig(machine_config &config)
-{
+MACHINE_CONFIG_START(tx1_sound_device::device_add_mconfig)
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);
@@ -576,9 +575,10 @@ void tx1_sound_device::device_add_mconfig(machine_config &config)
aysnd.add_route(ALL_OUTPUTS, "frontleft", 0.1);
aysnd.add_route(ALL_OUTPUTS, "frontright", 0.1);
- this->add_route(0, "frontleft", 0.2);
- this->add_route(1, "frontright", 0.2);
-}
+ MCFG_DEVICE_MODIFY(DEVICE_SELF)
+ MCFG_SOUND_ROUTE(0, "frontleft", 0.2)
+ MCFG_SOUND_ROUTE(1, "frontright", 0.2)
+MACHINE_CONFIG_END
/*************************************
*
@@ -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_weights(aweights, BIT(tmp[i], 0), BIT(tmp[i], 1), BIT(tmp[i], 2), BIT(tmp[i], 3));
+ m_eng_voltages[i] = combine_4_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,8 +1059,7 @@ ioport_constructor buggyboyjr_sound_device::device_input_ports() const
return INPUT_PORTS_NAME(buggyboyjr_inputs);
}
-void buggyboy_sound_device::device_add_mconfig(machine_config &config)
-{
+MACHINE_CONFIG_START(buggyboy_sound_device::device_add_mconfig)
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);
@@ -1086,12 +1085,12 @@ void buggyboy_sound_device::device_add_mconfig(machine_config &config)
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);
- this->add_route(0, "frontleft", 0.2);
- this->add_route(1, "frontright", 0.2);
-}
+ MCFG_DEVICE_MODIFY(DEVICE_SELF)
+ MCFG_SOUND_ROUTE(0, "frontleft", 0.2)
+ MCFG_SOUND_ROUTE(1, "frontright", 0.2)
+MACHINE_CONFIG_END
-void buggyboyjr_sound_device::device_add_mconfig(machine_config &config)
-{
+MACHINE_CONFIG_START(buggyboyjr_sound_device::device_add_mconfig)
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);
@@ -1112,6 +1111,7 @@ void buggyboyjr_sound_device::device_add_mconfig(machine_config &config)
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);
- this->add_route(0, "frontleft", 0.2);
- this->add_route(1, "frontright", 0.2);
-}
+ MCFG_DEVICE_MODIFY(DEVICE_SELF)
+ MCFG_SOUND_ROUTE(0, "frontleft", 0.2)
+ MCFG_SOUND_ROUTE(1, "frontright", 0.2)
+MACHINE_CONFIG_END
diff --git a/src/mame/audio/williams.cpp b/src/mame/audio/williams.cpp
index 1a515a44af7..c94bea20c9a 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, u32 clock)
+williams_cvsd_sound_device::williams_cvsd_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t 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
//-------------------------------------------------
-void williams_cvsd_sound_device::write(u16 data)
+WRITE16_MEMBER(williams_cvsd_sound_device::write)
{
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(0);
+ bank_select_w(m_cpu->space(), 0, 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
//-------------------------------------------------
-void williams_cvsd_sound_device::bank_select_w(u8 data)
+WRITE8_MEMBER(williams_cvsd_sound_device::bank_select_w)
{
m_rombank->set_entry(data & 0x0f);
}
@@ -127,7 +127,7 @@ void williams_cvsd_sound_device::bank_select_w(u8 data)
// talkback_w - write to the talkback latch
//-------------------------------------------------
-void williams_cvsd_sound_device::talkback_w(u8 data)
+WRITE8_MEMBER(williams_cvsd_sound_device::talkback_w)
{
m_talkback = data;
logerror("CVSD Talkback = %02X\n", data);
@@ -139,7 +139,7 @@ void williams_cvsd_sound_device::talkback_w(u8 data)
// the HC55516 and clock the data
//-------------------------------------------------
-void williams_cvsd_sound_device::cvsd_digit_clock_clear_w(u8 data)
+WRITE8_MEMBER(williams_cvsd_sound_device::cvsd_digit_clock_clear_w)
{
m_hc55516->digit_w(data);
m_hc55516->clock_w(0);
@@ -150,7 +150,7 @@ void williams_cvsd_sound_device::cvsd_digit_clock_clear_w(u8 data)
// cvsd_clock_set_w - set the clock on the HC55516
//-------------------------------------------------
-void williams_cvsd_sound_device::cvsd_clock_set_w(u8 data)
+WRITE8_MEMBER(williams_cvsd_sound_device::cvsd_clock_set_w)
{
m_hc55516->clock_w(1);
}
@@ -176,10 +176,9 @@ void williams_cvsd_sound_device::williams_cvsd_map(address_map &map)
// device_add_mconfig - add device configuration
//-------------------------------------------------
-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);
+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)
PIA6821(config, m_pia, 0);
m_pia->writepa_handler().set("dac", FUNC(dac_byte_interface::data_w));
@@ -192,13 +191,12 @@ void williams_cvsd_sound_device::device_add_mconfig(machine_config &config)
ym.add_route(ALL_OUTPUTS, *this, 0.10);
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("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)
HC55516(config, m_hc55516, 0);
m_hc55516->add_route(ALL_OUTPUTS, *this, 0.60);
-}
+MACHINE_CONFIG_END
//-------------------------------------------------
@@ -208,7 +206,7 @@ void williams_cvsd_sound_device::device_add_mconfig(machine_config &config)
void williams_cvsd_sound_device::device_start()
{
// configure master CPU banks
- u8 *rom = memregion("cpu")->base();
+ uint8_t *rom = memregion("cpu")->base();
for (int bank = 0; bank < 16; bank++)
{
//
@@ -264,7 +262,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, u32 clock)
+williams_narc_sound_device::williams_narc_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, WILLIAMS_NARC_SOUND, tag, owner, clock),
device_mixer_interface(mconfig, *this),
m_cpu(*this, "cpu%u", 0U),
@@ -285,7 +283,7 @@ williams_narc_sound_device::williams_narc_sound_device(const machine_config &mco
// SYNC bits in bits 8 and 9
//-------------------------------------------------
-u16 williams_narc_sound_device::read()
+READ16_MEMBER(williams_narc_sound_device::read)
{
return m_talkback | (m_audio_sync << 8);
}
@@ -296,7 +294,7 @@ u16 williams_narc_sound_device::read()
// latch
//-------------------------------------------------
-void williams_narc_sound_device::write(u16 data)
+WRITE16_MEMBER(williams_narc_sound_device::write)
{
synchronize(TID_MASTER_COMMAND, data);
}
@@ -311,8 +309,8 @@ WRITE_LINE_MEMBER(williams_narc_sound_device::reset_write)
// going high halts the CPU
if (state)
{
- master_bank_select_w(0);
- slave_bank_select_w(0);
+ master_bank_select_w(m_cpu[0]->space(), 0, 0);
+ slave_bank_select_w(m_cpu[1]->space(), 0, 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);
@@ -332,7 +330,7 @@ WRITE_LINE_MEMBER(williams_narc_sound_device::reset_write)
// master CPU
//-------------------------------------------------
-void williams_narc_sound_device::master_bank_select_w(u8 data)
+WRITE8_MEMBER(williams_narc_sound_device::master_bank_select_w)
{
m_masterbank->set_entry(data & 0x0f);
}
@@ -343,7 +341,7 @@ void williams_narc_sound_device::master_bank_select_w(u8 data)
// slave CPU
//-------------------------------------------------
-void williams_narc_sound_device::slave_bank_select_w(u8 data)
+WRITE8_MEMBER(williams_narc_sound_device::slave_bank_select_w)
{
m_slavebank->set_entry(data & 0x0f);
}
@@ -354,7 +352,7 @@ void williams_narc_sound_device::slave_bank_select_w(u8 data)
// agent
//-------------------------------------------------
-u8 williams_narc_sound_device::command_r()
+READ8_MEMBER(williams_narc_sound_device::command_r)
{
m_cpu[0]->set_input_line(M6809_IRQ_LINE, CLEAR_LINE);
m_sound_int_state = 0;
@@ -367,7 +365,7 @@ u8 williams_narc_sound_device::command_r()
// slave CPU
//-------------------------------------------------
-void williams_narc_sound_device::command2_w(u8 data)
+WRITE8_MEMBER(williams_narc_sound_device::command2_w)
{
synchronize(TID_SLAVE_COMMAND, data);
}
@@ -378,7 +376,7 @@ void williams_narc_sound_device::command2_w(u8 data)
// CPU
//-------------------------------------------------
-u8 williams_narc_sound_device::command2_r()
+READ8_MEMBER(williams_narc_sound_device::command2_r)
{
m_cpu[1]->set_input_line(M6809_FIRQ_LINE, CLEAR_LINE);
return m_latch2;
@@ -390,7 +388,7 @@ u8 williams_narc_sound_device::command2_r()
// talkback latch from the master CPU
//-------------------------------------------------
-void williams_narc_sound_device::master_talkback_w(u8 data)
+WRITE8_MEMBER(williams_narc_sound_device::master_talkback_w)
{
m_talkback = data;
logerror("Master Talkback = %02X\n", data);
@@ -402,7 +400,7 @@ void williams_narc_sound_device::master_talkback_w(u8 data)
// SYNC register
//-------------------------------------------------
-void williams_narc_sound_device::master_sync_w(u8 data)
+WRITE8_MEMBER(williams_narc_sound_device::master_sync_w)
{
timer_set(attotime::from_double(TIME_OF_74LS123(180000, 0.000001)), TID_SYNC_CLEAR, 0x01);
m_audio_sync |= 0x01;
@@ -415,7 +413,7 @@ void williams_narc_sound_device::master_sync_w(u8 data)
// talkback latch from the slave CPU
//-------------------------------------------------
-void williams_narc_sound_device::slave_talkback_w(u8 data)
+WRITE8_MEMBER(williams_narc_sound_device::slave_talkback_w)
{
logerror("Slave Talkback = %02X\n", data);
}
@@ -426,7 +424,7 @@ void williams_narc_sound_device::slave_talkback_w(u8 data)
// SYNC register
//-------------------------------------------------
-void williams_narc_sound_device::slave_sync_w(u8 data)
+WRITE8_MEMBER(williams_narc_sound_device::slave_sync_w)
{
timer_set(attotime::from_double(TIME_OF_74LS123(180000, 0.000001)), TID_SYNC_CLEAR, 0x02);
m_audio_sync |= 0x02;
@@ -439,7 +437,7 @@ void williams_narc_sound_device::slave_sync_w(u8 data)
// the HC55516 and clock the data
//-------------------------------------------------
-void williams_narc_sound_device::cvsd_digit_clock_clear_w(u8 data)
+WRITE8_MEMBER(williams_narc_sound_device::cvsd_digit_clock_clear_w)
{
m_hc55516->digit_w(data);
m_hc55516->clock_w(0);
@@ -450,7 +448,7 @@ void williams_narc_sound_device::cvsd_digit_clock_clear_w(u8 data)
// cvsd_clock_set_w - set the clock on the HC55516
//-------------------------------------------------
-void williams_narc_sound_device::cvsd_clock_set_w(u8 data)
+WRITE8_MEMBER(williams_narc_sound_device::cvsd_clock_set_w)
{
m_hc55516->clock_w(1);
}
@@ -499,26 +497,26 @@ void williams_narc_sound_device::williams_narc_slave_map(address_map &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);
+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)
- MC6809E(config, m_cpu[1], NARC_MASTER_CLOCK / 4);
- m_cpu[1]->set_addrmap(AS_PROGRAM, &williams_narc_sound_device::williams_narc_slave_map);
+ MCFG_DEVICE_ADD("cpu1", MC6809E, NARC_MASTER_CLOCK / 4)
+ MCFG_DEVICE_PROGRAM_MAP(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);
- 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("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)
- HC55516(config, m_hc55516, 0).add_route(ALL_OUTPUTS, *this, 0.60);
-}
+ MCFG_DEVICE_ADD("cvsd", HC55516, 0)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, *this, 0.60)
+MACHINE_CONFIG_END
//-------------------------------------------------
@@ -528,7 +526,7 @@ void williams_narc_sound_device::device_add_mconfig(machine_config &config)
void williams_narc_sound_device::device_start()
{
// configure master CPU banks
- u8 *rom = memregion("cpu0")->base();
+ uint8_t *rom = memregion("cpu0")->base();
for (int bank = 0; bank < 16; bank++)
{
//
@@ -619,7 +617,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, u32 clock)
+williams_adpcm_sound_device::williams_adpcm_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, WILLIAMS_ADPCM_SOUND, tag, owner, clock),
device_mixer_interface(mconfig, *this),
m_cpu(*this, "cpu"),
@@ -637,7 +635,7 @@ williams_adpcm_sound_device::williams_adpcm_sound_device(const machine_config &m
// latch
//-------------------------------------------------
-void williams_adpcm_sound_device::write(u16 data)
+WRITE16_MEMBER(williams_adpcm_sound_device::write)
{
synchronize(TID_COMMAND, data);
}
@@ -652,7 +650,7 @@ WRITE_LINE_MEMBER(williams_adpcm_sound_device::reset_write)
// going high halts the CPU
if (state)
{
- bank_select_w(0);
+ bank_select_w(m_cpu->space(), 0, 0);
device_reset();
m_cpu->set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
}
@@ -678,18 +676,18 @@ READ_LINE_MEMBER(williams_adpcm_sound_device::irq_read)
// bank
//-------------------------------------------------
-void williams_adpcm_sound_device::bank_select_w(u8 data)
+WRITE8_MEMBER(williams_adpcm_sound_device::bank_select_w)
{
m_rombank->set_entry(data & 0x07);
}
//-------------------------------------------------
-// oki6295_bank_select_w - select the OKI6295
-// memory bank
+// bank_select_w - select the OKI6295 memory
+// bank
//-------------------------------------------------
-void williams_adpcm_sound_device::oki6295_bank_select_w(u8 data)
+WRITE8_MEMBER(williams_adpcm_sound_device::oki6295_bank_select_w)
{
m_okibank->set_entry(data & 7);
}
@@ -700,7 +698,7 @@ void williams_adpcm_sound_device::oki6295_bank_select_w(u8 data)
// latch
//-------------------------------------------------
-u8 williams_adpcm_sound_device::command_r()
+READ8_MEMBER(williams_adpcm_sound_device::command_r)
{
m_cpu->set_input_line(M6809_IRQ_LINE, CLEAR_LINE);
@@ -715,7 +713,7 @@ u8 williams_adpcm_sound_device::command_r()
// talkback_w - write to the talkback latch
//-------------------------------------------------
-void williams_adpcm_sound_device::talkback_w(u8 data)
+WRITE8_MEMBER(williams_adpcm_sound_device::talkback_w)
{
m_talkback = data;
logerror("ADPCM Talkback = %02X\n", data);
@@ -756,24 +754,22 @@ void williams_adpcm_sound_device::williams_adpcm_oki_map(address_map &map)
// device_add_mconfig - add device configuration
//-------------------------------------------------
-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);
+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)
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);
- 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("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)
- 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);
-}
+ 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
//-------------------------------------------------
@@ -783,7 +779,7 @@ void williams_adpcm_sound_device::device_add_mconfig(machine_config &config)
void williams_adpcm_sound_device::device_start()
{
// configure banks
- u8 *rom = memregion("cpu")->base();
+ uint8_t *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 a14e1d57d06..fa12524d3c1 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, u32 clock = 0);
+ williams_cvsd_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
// read/write
- void write(u16 data);
+ DECLARE_WRITE16_MEMBER(write);
DECLARE_WRITE_LINE_MEMBER(reset_write);
// internal communications
- void bank_select_w(u8 data);
- void cvsd_digit_clock_clear_w(u8 data);
- void cvsd_clock_set_w(u8 data);
+ DECLARE_WRITE8_MEMBER(bank_select_w);
+ DECLARE_WRITE8_MEMBER(cvsd_digit_clock_clear_w);
+ DECLARE_WRITE8_MEMBER(cvsd_clock_set_w);
void williams_cvsd_map(address_map &map);
@@ -68,9 +68,9 @@ private:
required_memory_bank m_rombank;
// internal state
- u8 m_talkback;
+ uint8_t m_talkback;
- void talkback_w(u8 data);
+ DECLARE_WRITE8_MEMBER(talkback_w);
};
@@ -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, u32 clock = 0);
+ williams_narc_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
// read/write
- u16 read();
- void write(u16 data);
+ DECLARE_READ16_MEMBER(read);
+ DECLARE_WRITE16_MEMBER(write);
DECLARE_WRITE_LINE_MEMBER(reset_write);
// internal communications
- 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);
+ 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 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
- u8 m_latch;
- u8 m_latch2;
- u8 m_talkback;
- u8 m_audio_sync;
- u8 m_sound_int_state;
+ uint8_t m_latch;
+ uint8_t m_latch2;
+ uint8_t m_talkback;
+ uint8_t m_audio_sync;
+ uint8_t 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, u32 clock = 0);
+ williams_adpcm_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
// read/write
- void write(u16 data);
+ DECLARE_WRITE16_MEMBER(write);
DECLARE_WRITE_LINE_MEMBER(reset_write);
DECLARE_READ_LINE_MEMBER(irq_read);
// internal communications
- void bank_select_w(u8 data);
- void oki6295_bank_select_w(u8 data);
- u8 command_r();
- void talkback_w(u8 data);
+ DECLARE_WRITE8_MEMBER(bank_select_w);
+ DECLARE_WRITE8_MEMBER(oki6295_bank_select_w);
+ DECLARE_READ8_MEMBER(command_r);
+ DECLARE_WRITE8_MEMBER(talkback_w);
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
- u8 m_latch;
- u8 m_talkback;
- u8 m_sound_int_state;
+ uint8_t m_latch;
+ uint8_t m_talkback;
+ uint8_t m_sound_int_state;
};
diff --git a/src/mame/audio/wpcsnd.cpp b/src/mame/audio/wpcsnd.cpp
index 05abf086a74..bb34e560a8d 100644
--- a/src/mame/audio/wpcsnd.cpp
+++ b/src/mame/audio/wpcsnd.cpp
@@ -69,23 +69,22 @@ uint8_t wpcsnd_device::data_r()
return m_reply;
}
-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);
+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))
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);
- 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("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)
- HC55516(config, m_hc55516, 0).add_route(ALL_OUTPUTS, *this, 0.5);
-}
+ MCFG_DEVICE_ADD("hc55516", HC55516, 0)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, *this, 0.5)
+MACHINE_CONFIG_END
void wpcsnd_device::device_start()
diff --git a/src/mame/audio/wswan.cpp b/src/mame/audio/wswan.cpp
index a7cb1ab1ceb..e8638bbc850 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;
}
-void wswan_sound_device::port_w(offs_t offset, uint8_t data)
+WRITE8_MEMBER( wswan_sound_device::port_w )
{
m_channel->update();
diff --git a/src/mame/audio/wswan.h b/src/mame/audio/wswan.h
index 3e39081ad57..d04301ac868 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);
- void port_w(offs_t offset, uint8_t data);
+ DECLARE_WRITE8_MEMBER( port_w );
protected:
struct CHAN
diff --git a/src/mame/audio/zaccaria.cpp b/src/mame/audio/zaccaria.cpp
index da94bae6ce1..b7284a1f8b4 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();
+ data &= m_melodypsg1->data_r(space, 0);
if (0x04 == (control & 0x0c))
- data &= m_melodypsg2->data_r();
+ data &= m_melodypsg2->data_r(space, 0);
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((control >> 0) & 0x01, data);
+ m_melodypsg1->data_address_w(space, (control >> 0) & 0x01, data);
if (control & 0x08)
- m_melodypsg2->data_address_w((control >> 2) & 0x01, data);
+ m_melodypsg2->data_address_w(space, (control >> 2) & 0x01, data);
}
WRITE8_MEMBER(zac1b111xx_melody_base::melodypia_portb_w)
{
if (data & 0x02)
- m_melodypsg1->data_address_w((data >> 0) & 0x01, m_melodypia->a_output());
+ m_melodypsg1->data_address_w(space, (data >> 0) & 0x01, m_melodypia->a_output());
if (data & 0x08)
- m_melodypsg2->data_address_w((data >> 2) & 0x01, m_melodypia->a_output());
+ m_melodypsg2->data_address_w(space, (data >> 2) & 0x01, m_melodypia->a_output());
}
READ8_MEMBER(zac1b111xx_melody_base::melodypsg1_portb_r)
@@ -430,6 +430,7 @@ 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);