summaryrefslogtreecommitdiffstats
path: root/src/mame/audio
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/audio')
-rw-r--r--src/mame/audio/atarijsa.h14
-rw-r--r--src/mame/audio/cage.h2
-rw-r--r--src/mame/audio/cmi01a.h2
-rw-r--r--src/mame/audio/dsbz80.cpp27
-rw-r--r--src/mame/audio/dsbz80.h2
-rw-r--r--src/mame/audio/efo_zsu.cpp20
-rw-r--r--src/mame/audio/exidy.h8
-rw-r--r--src/mame/audio/harddriv.cpp20
-rw-r--r--src/mame/audio/irem.cpp38
-rw-r--r--src/mame/audio/irem.h7
-rw-r--r--src/mame/audio/namco52.h4
-rw-r--r--src/mame/audio/rad_eu3a05.h2
-rw-r--r--src/mame/audio/segag80r.cpp2
-rw-r--r--src/mame/audio/segam1audio.cpp12
-rw-r--r--src/mame/audio/segam1audio.h8
-rw-r--r--src/mame/audio/segasnd.h2
-rw-r--r--src/mame/audio/seibu.h4
-rw-r--r--src/mame/audio/svis_snd.h2
-rw-r--r--src/mame/audio/tvc.h2
-rw-r--r--src/mame/audio/williams.cpp24
-rw-r--r--src/mame/audio/zaccaria.h2
21 files changed, 100 insertions, 104 deletions
diff --git a/src/mame/audio/atarijsa.h b/src/mame/audio/atarijsa.h
index f8cef0ca4a4..30e543311f3 100644
--- a/src/mame/audio/atarijsa.h
+++ b/src/mame/audio/atarijsa.h
@@ -38,23 +38,22 @@ DECLARE_DEVICE_TYPE(ATARI_JSA_IIIS, atari_jsa_iiis_device)
#define MCFG_ATARI_JSA_I_ADD(_tag, _intcb) \
MCFG_DEVICE_ADD(_tag, ATARI_JSA_I, 0) \
- devcb = &downcast<atari_jsa_base_device &>(*device).set_main_int_cb(DEVCB_##_intcb);
+ downcast<atari_jsa_base_device &>(*device).set_main_int_cb(DEVCB_##_intcb);
#define MCFG_ATARI_JSA_II_ADD(_tag, _intcb) \
MCFG_DEVICE_ADD(_tag, ATARI_JSA_II, 0) \
- devcb = &downcast<atari_jsa_base_device &>(*device).set_main_int_cb(DEVCB_##_intcb);
+ downcast<atari_jsa_base_device &>(*device).set_main_int_cb(DEVCB_##_intcb);
#define MCFG_ATARI_JSA_III_ADD(_tag, _intcb) \
MCFG_DEVICE_ADD(_tag, ATARI_JSA_III, 0) \
- devcb = &downcast<atari_jsa_base_device &>(*device).set_main_int_cb(DEVCB_##_intcb);
+ downcast<atari_jsa_base_device &>(*device).set_main_int_cb(DEVCB_##_intcb);
#define MCFG_ATARI_JSA_IIIS_ADD(_tag, _intcb) \
MCFG_DEVICE_ADD(_tag, ATARI_JSA_IIIS, 0) \
- devcb = &downcast<atari_jsa_base_device &>(*device).set_main_int_cb(DEVCB_##_intcb);
+ downcast<atari_jsa_base_device &>(*device).set_main_int_cb(DEVCB_##_intcb);
#define MCFG_ATARI_JSA_TEST_PORT(_port, _bitnum) \
- devcb = &downcast<atari_jsa_base_device &>(*device).set_test_read_cb(DEVCB_IOPORT(_port)); \
- MCFG_DEVCB_RSHIFT(_bitnum);
+ downcast<atari_jsa_base_device &>(*device).test_read_cb().set_ioport(_port).bit(_bitnum);
//**************************************************************************
@@ -84,8 +83,9 @@ protected:
public:
// configuration
- template <class Object> devcb_base &set_test_read_cb(Object &&cb) { return m_test_read_cb.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_main_int_cb(Object &&cb) { return m_main_int_cb.set_callback(std::forward<Object>(cb)); }
+ auto test_read_cb() { return m_test_read_cb.bind(); }
+ auto main_int_cb() { return m_main_int_cb.bind(); }
// getters
m6502_device &soundcpu() const { return *m_jsacpu; }
diff --git a/src/mame/audio/cage.h b/src/mame/audio/cage.h
index d54a52888e0..d1202918ac2 100644
--- a/src/mame/audio/cage.h
+++ b/src/mame/audio/cage.h
@@ -17,7 +17,7 @@
#include "sound/dmadac.h"
#define MCFG_ATARI_CAGE_IRQ_CALLBACK(_write) \
- devcb = &downcast<atari_cage_device &>(*device).set_irqhandler_callback(DEVCB_##_write);
+ downcast<atari_cage_device &>(*device).set_irqhandler_callback(DEVCB_##_write);
#define MCFG_ATARI_CAGE_SPEEDUP(_speedup) \
downcast<atari_cage_device &>(*device).set_speedup(_speedup);
diff --git a/src/mame/audio/cmi01a.h b/src/mame/audio/cmi01a.h
index 5f9bbd9f15f..8c8272507ea 100644
--- a/src/mame/audio/cmi01a.h
+++ b/src/mame/audio/cmi01a.h
@@ -16,7 +16,7 @@
#define ENV_DIR_UP 1
#define MCFG_CMI01A_IRQ_CALLBACK(_devcb) \
- devcb = &downcast<cmi01a_device &>(*device).set_irq_callback(DEVCB_##_devcb);
+ downcast<cmi01a_device &>(*device).set_irq_callback(DEVCB_##_devcb);
class cmi01a_device : public device_t, public device_sound_interface {
public:
diff --git a/src/mame/audio/dsbz80.cpp b/src/mame/audio/dsbz80.cpp
index ea7a83ae824..c521ac825b6 100644
--- a/src/mame/audio/dsbz80.cpp
+++ b/src/mame/audio/dsbz80.cpp
@@ -45,19 +45,20 @@ DEFINE_DEVICE_TYPE(DSBZ80, dsbz80_device, "dsbz80_device", "Sega Z80-based Digit
// device_add_mconfig - add device configuration
//-------------------------------------------------
-MACHINE_CONFIG_START(dsbz80_device::device_add_mconfig)
- MCFG_DEVICE_ADD(Z80_TAG, Z80, 4000000) /* unknown clock, but probably pretty slow considering the z80 does like nothing */
- MCFG_DEVICE_PROGRAM_MAP(dsbz80_map)
- MCFG_DEVICE_IO_MAP(dsbz80io_map)
-
- MCFG_DEVICE_ADD("uart", I8251, 4000000)
- MCFG_I8251_RXRDY_HANDLER(INPUTLINE(Z80_TAG, INPUT_LINE_IRQ0))
- MCFG_I8251_TXD_HANDLER(WRITELINE(*this, dsbz80_device, output_txd))
-
- MCFG_CLOCK_ADD("uart_clock", 500000) // 16 times 31.25MHz (standard Sega/MIDI sound data rate)
- MCFG_CLOCK_SIGNAL_HANDLER(WRITELINE("uart", i8251_device, write_rxc))
- MCFG_DEVCB_CHAIN_OUTPUT(WRITELINE("uart", i8251_device, write_txc))
-MACHINE_CONFIG_END
+void dsbz80_device::device_add_mconfig(machine_config &config)
+{
+ Z80(config, m_ourcpu, 4000000); // unknown clock, but probably pretty slow considering the z80 does like nothing
+ m_ourcpu->set_addrmap(AS_PROGRAM, &dsbz80_device::dsbz80_map);
+ m_ourcpu->set_addrmap(AS_IO, &dsbz80_device::dsbz80io_map);
+
+ I8251(config, m_uart, 4000000);
+ m_uart->rxrdy_handler().set_inputline(m_ourcpu, INPUT_LINE_IRQ0);
+ m_uart->txd_handler().set(FUNC(dsbz80_device::output_txd));
+
+ clock_device &uart_clock(CLOCK(config, "uart_clock", 500000)); // 16 times 31.25MHz (standard Sega/MIDI sound data rate)
+ uart_clock.signal_handler().set("uart", FUNC(i8251_device::write_rxc));
+ uart_clock.signal_handler().append("uart", FUNC(i8251_device::write_txc));
+}
//**************************************************************************
// LIVE DEVICE
diff --git a/src/mame/audio/dsbz80.h b/src/mame/audio/dsbz80.h
index 43f2b0c9fcd..1db717c5484 100644
--- a/src/mame/audio/dsbz80.h
+++ b/src/mame/audio/dsbz80.h
@@ -15,7 +15,7 @@
MCFG_DEVICE_ADD(_tag, DSBZ80, 0)
#define MCFG_DSBZ80_RXD_HANDLER(_devcb) \
- devcb = &downcast<dsbz80_device &>(*device).set_rxd_handler(DEVCB_##_devcb);
+ downcast<dsbz80_device &>(*device).set_rxd_handler(DEVCB_##_devcb);
//**************************************************************************
// TYPE DEFINITIONS
diff --git a/src/mame/audio/efo_zsu.cpp b/src/mame/audio/efo_zsu.cpp
index 0bcb2ea8097..a847c98a177 100644
--- a/src/mame/audio/efo_zsu.cpp
+++ b/src/mame/audio/efo_zsu.cpp
@@ -209,10 +209,10 @@ MACHINE_CONFIG_START(efo_zsu_device::device_add_mconfig)
MCFG_Z80CTC_ZC2_CB(WRITELINE(*this, efo_zsu_device, ctc1_z2_w))
#if 0 // does nothing useful now
- MCFG_DEVICE_ADD("ck1mhz", CLOCK, 4000000/4)
- MCFG_CLOCK_SIGNAL_HANDLER(WRITELINE("ctc1", z80ctc_device, trg0))
- MCFG_DEVCB_CHAIN_OUTPUT(WRITELINE("ctc1", z80ctc_device, trg1))
- MCFG_DEVCB_CHAIN_OUTPUT(WRITELINE("ctc1", z80ctc_device, trg2))
+ clock_device &ck1mhz(CLOCK(config, "ck1mhz", 4000000/4);
+ ck1mhz.signal_handler().set(m_ctc1, FUNC(z80ctc_device::trg0));
+ ck1mhz.signal_handler().append(m_ctc1, FUNC(z80ctc_device::trg1));
+ ck1mhz.signal_handler().append(m_ctc1, FUNC(z80ctc_device::trg2));
#endif
MCFG_GENERIC_LATCH_8_ADD("soundlatch")
@@ -223,13 +223,13 @@ MACHINE_CONFIG_START(efo_zsu_device::device_add_mconfig)
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD("aysnd0", AY8910, 4000000/2)
- MCFG_AY8910_PORT_A_WRITE_CB(MEMBANK("rombank")) MCFG_DEVCB_MASK(0x03)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.5)
+ ay8910_device &aysnd0(AY8910(config, "aysnd0", 4000000/2));
+ aysnd0.port_a_write_callback().set_membank("rombank").mask(0x03);
+ aysnd0.add_route(ALL_OUTPUTS, "mono", 0.5);
- MCFG_DEVICE_ADD("aysnd1", AY8910, 4000000/2)
- MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(*this, efo_zsu_device, ay1_porta_w))
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.5)
+ ay8910_device &aysnd1(AY8910(config, "aysnd1", 4000000/2));
+ aysnd1.port_a_write_callback().set(FUNC(efo_zsu_device::ay1_porta_w));
+ aysnd1.add_route(ALL_OUTPUTS, "mono", 0.5);
MCFG_DEVICE_ADD("fifo", CD40105, 0)
MCFG_40105_DATA_OUT_READY_CB(WRITELINE(*this, efo_zsu_device, fifo_dor_w))
diff --git a/src/mame/audio/exidy.h b/src/mame/audio/exidy.h
index 703c4cd1fe1..b40d4fd489e 100644
--- a/src/mame/audio/exidy.h
+++ b/src/mame/audio/exidy.h
@@ -127,13 +127,13 @@ protected:
};
#define MCFG_EXIDY_VENTURE_WRITEPA_HANDLER(_devcb) \
- devcb = &downcast<venture_sound_device &>(*device).set_pa_callback(DEVCB_##_devcb);
+ downcast<venture_sound_device &>(*device).set_pa_callback(DEVCB_##_devcb);
#define MCFG_EXIDY_VENTURE_WRITEPB_HANDLER(_devcb) \
- devcb = &downcast<venture_sound_device &>(*device).set_pb_callback(DEVCB_##_devcb);
+ downcast<venture_sound_device &>(*device).set_pb_callback(DEVCB_##_devcb);
#define MCFG_EXIDY_VENTURE_CA2_HANDLER(_devcb) \
- devcb = &downcast<venture_sound_device &>(*device).set_ca2_callback(DEVCB_##_devcb);
+ downcast<venture_sound_device &>(*device).set_ca2_callback(DEVCB_##_devcb);
#define MCFG_EXIDY_VENTURE_CB2_HANDLER(_devcb) \
- devcb = &downcast<venture_sound_device &>(*device).set_cb2_callback(DEVCB_##_devcb);
+ downcast<venture_sound_device &>(*device).set_cb2_callback(DEVCB_##_devcb);
class venture_sound_device : public exidy_sh8253_sound_device
{
diff --git a/src/mame/audio/harddriv.cpp b/src/mame/audio/harddriv.cpp
index 70916a3b95f..5bb4c7a4967 100644
--- a/src/mame/audio/harddriv.cpp
+++ b/src/mame/audio/harddriv.cpp
@@ -435,16 +435,16 @@ void harddriv_sound_board_device::driversnd_dsp_io_map(address_map &map)
MACHINE_CONFIG_START(harddriv_sound_board_device::device_add_mconfig)
/* basic machine hardware */
- MCFG_DEVICE_ADD("soundcpu", M68000, XTAL(16'000'000)/2)
- MCFG_DEVICE_PROGRAM_MAP(driversnd_68k_map)
-
- MCFG_DEVICE_ADD("latch", LS259, 0) // 80R
- MCFG_ADDRESSABLE_LATCH_Q0_OUT_CB(WRITELINE(*this, harddriv_sound_board_device, speech_write_w)) // SPWR - 5220 write strobe
- MCFG_ADDRESSABLE_LATCH_Q1_OUT_CB(WRITELINE(*this, harddriv_sound_board_device, speech_reset_w)) // SPRES - 5220 hard reset
- MCFG_ADDRESSABLE_LATCH_Q2_OUT_CB(WRITELINE(*this, harddriv_sound_board_device, speech_rate_w)) // SPRATE
- MCFG_ADDRESSABLE_LATCH_Q3_OUT_CB(WRITELINE(*this, harddriv_sound_board_device, cram_enable_w)) // CRAMEN
- MCFG_ADDRESSABLE_LATCH_Q4_OUT_CB(INPUTLINE("sounddsp", INPUT_LINE_HALT)) MCFG_DEVCB_INVERT // RES320
- MCFG_ADDRESSABLE_LATCH_Q7_OUT_CB(WRITELINE(*this, harddriv_sound_board_device, led_w))
+ M68000(config, m_soundcpu, 16_MHz_XTAL/2);
+ m_soundcpu->set_addrmap(AS_PROGRAM, &harddriv_sound_board_device::driversnd_68k_map);
+
+ LS259(config, m_latch, 0); // 80R
+ m_latch->q_out_cb<0>().set(FUNC(harddriv_sound_board_device::speech_write_w)); // SPWR - 5220 write strobe
+ m_latch->q_out_cb<1>().set(FUNC(harddriv_sound_board_device::speech_reset_w)); // SPRES - 5220 hard reset
+ m_latch->q_out_cb<2>().set(FUNC(harddriv_sound_board_device::speech_rate_w)); // SPRATE
+ m_latch->q_out_cb<3>().set(FUNC(harddriv_sound_board_device::cram_enable_w)); // CRAMEN
+ m_latch->q_out_cb<4>().set_inputline(m_sounddsp, INPUT_LINE_HALT).invert(); // RES320
+ m_latch->q_out_cb<7>().set(FUNC(harddriv_sound_board_device::led_w));
MCFG_DEVICE_ADD("sounddsp", TMS32010, XTAL(20'000'000))
MCFG_DEVICE_PROGRAM_MAP(driversnd_dsp_program_map)
diff --git a/src/mame/audio/irem.cpp b/src/mame/audio/irem.cpp
index 88d312bbabc..7898c493a2b 100644
--- a/src/mame/audio/irem.cpp
+++ b/src/mame/audio/irem.cpp
@@ -20,14 +20,14 @@ DEFINE_DEVICE_TYPE(IREM_M52_LARGE_AUDIO, m52_large_audio_device, "m52_large_au
irem_audio_device::irem_audio_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, "iremsound")
+ , m_adpcm1(*this, "msm1")
+ , m_adpcm2(*this, "msm2")
, m_port1(0)
, m_port2(0)
, m_soundlatch(0)
- , m_cpu(*this, "iremsound")
, m_ay_45L(*this, "ay_45l")
, m_ay_45M(*this, "ay_45m")
- , m_adpcm1(*this, "msm1")
- , m_adpcm2(*this, "msm2")
, m_audio_BD(*this, "snd_nl:ibd")
, m_audio_SD(*this, "snd_nl:isd")
, m_audio_OH(*this, "snd_nl:ioh")
@@ -431,15 +431,15 @@ MACHINE_CONFIG_START(m62_audio_device::device_add_mconfig)
MCFG_SOUND_ROUTE(1, "snd_nl", 1.0, 4)
MCFG_SOUND_ROUTE(2, "snd_nl", 1.0, 5)
- MCFG_DEVICE_ADD("msm1", MSM5205, XTAL(384'000)) /* verified on pcb */
- MCFG_MSM5205_VCK_CALLBACK(INPUTLINE("iremsound", INPUT_LINE_NMI)) // driven through NPN inverter
- MCFG_DEVCB_CHAIN_OUTPUT(WRITELINE("msm2", msm5205_device, vclk_w)) // the first MSM5205 clocks the second
- MCFG_MSM5205_PRESCALER_SELECTOR(S96_4B) /* default to 4KHz, but can be changed at run time */
- MCFG_SOUND_ROUTE(0, "snd_nl", 1.0, 6)
+ MSM5205(config, m_adpcm1, 384_kHz_XTAL); // verified on PCB
+ m_adpcm1->vck_callback().set_inputline(m_cpu, INPUT_LINE_NMI); // driven through NPN inverter
+ m_adpcm1->vck_callback().append(m_adpcm2, FUNC(msm5205_device::vclk_w)); // the first MSM5205 clocks the second
+ m_adpcm1->set_prescaler_selector(msm5205_device::S96_4B); // default to 4KHz, but can be changed at run time
+ m_adpcm1->add_route(0, "snd_nl", 1.0, 6);
- MCFG_DEVICE_ADD("msm2", MSM5205, XTAL(384'000)) /* verified on pcb */
- MCFG_MSM5205_PRESCALER_SELECTOR(SEX_4B) /* default to 4KHz, but can be changed at run time, slave */
- MCFG_SOUND_ROUTE(0, "snd_nl", 1.0, 7)
+ MSM5205(config, m_adpcm2, 384_kHz_XTAL); // verified on PCB
+ m_adpcm2->set_prescaler_selector(msm5205_device::SEX_4B); // default to 4KHz, but can be changed at run time, slave
+ m_adpcm2->add_route(0, "snd_nl", 1.0, 7);
/* NETLIST configuration using internal AY8910 resistor values */
@@ -530,15 +530,15 @@ MACHINE_CONFIG_START(m52_large_audio_device::device_add_mconfig) /* 10 yard fig
MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(*this, irem_audio_device, ay8910_45L_porta_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80)
- MCFG_DEVICE_ADD("msm1", MSM5205, XTAL(384'000)) /* verified on pcb */
- MCFG_MSM5205_VCK_CALLBACK(INPUTLINE("iremsound", INPUT_LINE_NMI)) // driven through NPN inverter
- MCFG_DEVCB_CHAIN_OUTPUT(WRITELINE("msm2", msm5205_device, vclk_w)) // the first MSM5205 clocks the second
- MCFG_MSM5205_PRESCALER_SELECTOR(S96_4B) /* default to 4KHz, but can be changed at run time */
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80)
+ MSM5205(config, m_adpcm1, 384_kHz_XTAL); // verified on PCB
+ m_adpcm1->vck_callback().set_inputline(m_cpu, INPUT_LINE_NMI); // driven through NPN inverter
+ m_adpcm1->vck_callback().append(m_adpcm2, FUNC(msm5205_device::vclk_w)); // the first MSM5205 clocks the second
+ m_adpcm1->set_prescaler_selector(msm5205_device::S96_4B); // default to 4KHz, but can be changed at run time
+ m_adpcm1->add_route(ALL_OUTPUTS, "mono", 0.80);
- MCFG_DEVICE_ADD("msm2", MSM5205, XTAL(384'000)) /* verified on pcb */
- MCFG_MSM5205_PRESCALER_SELECTOR(SEX_4B) /* default to 4KHz, but can be changed at run time, slave */
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80)
+ MSM5205(config, m_adpcm2, 384_kHz_XTAL); // verified on PCB
+ m_adpcm2->set_prescaler_selector(msm5205_device::SEX_4B); // default to 4KHz, but can be changed at run time, slave
+ m_adpcm2->add_route(ALL_OUTPUTS, "mono", 0.80);
MACHINE_CONFIG_END
diff --git a/src/mame/audio/irem.h b/src/mame/audio/irem.h
index cbe85dd2853..7bbb614e634 100644
--- a/src/mame/audio/irem.h
+++ b/src/mame/audio/irem.h
@@ -39,6 +39,10 @@ protected:
virtual void device_start() override;
virtual void device_reset() override;
+ required_device<cpu_device> m_cpu;
+ required_device<msm5205_device> m_adpcm1;
+ optional_device<msm5205_device> m_adpcm2;
+
private:
// internal state
uint8_t m_port1;
@@ -46,11 +50,8 @@ private:
uint8_t m_soundlatch;
- required_device<cpu_device> m_cpu;
required_device<ay8910_device> m_ay_45L;
required_device<ay8910_device> m_ay_45M;
- required_device<msm5205_device> m_adpcm1;
- optional_device<msm5205_device> m_adpcm2;
optional_device<netlist_mame_logic_input_device> m_audio_BD;
optional_device<netlist_mame_logic_input_device> m_audio_SD;
optional_device<netlist_mame_logic_input_device> m_audio_OH;
diff --git a/src/mame/audio/namco52.h b/src/mame/audio/namco52.h
index 97221fb91cb..0412ed14dcb 100644
--- a/src/mame/audio/namco52.h
+++ b/src/mame/audio/namco52.h
@@ -19,10 +19,10 @@
downcast<namco_52xx_device &>(*device).set_extclock(_clock);
#define MCFG_NAMCO_52XX_ROMREAD_CB(_devcb) \
- devcb = &downcast<namco_52xx_device &>(*device).set_romread_callback(DEVCB_##_devcb);
+ downcast<namco_52xx_device &>(*device).set_romread_callback(DEVCB_##_devcb);
#define MCFG_NAMCO_52XX_SI_CB(_devcb) \
- devcb = &downcast<namco_52xx_device &>(*device).set_si_callback(DEVCB_##_devcb);
+ downcast<namco_52xx_device &>(*device).set_si_callback(DEVCB_##_devcb);
class namco_52xx_device : public device_t
diff --git a/src/mame/audio/rad_eu3a05.h b/src/mame/audio/rad_eu3a05.h
index 8dcd61927a4..16325185758 100644
--- a/src/mame/audio/rad_eu3a05.h
+++ b/src/mame/audio/rad_eu3a05.h
@@ -5,7 +5,7 @@
#define MAME_AUDIO_RAD_EU3A05_H
#define MCFG_RADICA6502_SOUND_SPACE_READ_CB(_devcb) \
- devcb = &downcast<radica6502_sound_device &>(*device).set_space_read_callback(DEVCB_##_devcb);
+ downcast<radica6502_sound_device &>(*device).set_space_read_callback(DEVCB_##_devcb);
//**************************************************************************
// TYPE DEFINITIONS
diff --git a/src/mame/audio/segag80r.cpp b/src/mame/audio/segag80r.cpp
index 12cc48e6b40..4e83f39f723 100644
--- a/src/mame/audio/segag80r.cpp
+++ b/src/mame/audio/segag80r.cpp
@@ -696,7 +696,7 @@ void monsterb_sound_device::device_start()
MACHINE_CONFIG_START(monsterb_sound_device::device_add_mconfig)
/* basic machine hardware */
MCFG_DEVICE_ADD(m_audiocpu, N7751, 6000000)
- MCFG_MCS48_PORT_T1_IN_CB(GND) // labelled as "TEST", connected to ground
+ MCFG_MCS48_PORT_T1_IN_CB(CONSTANT(0)) // labelled as "TEST", connected to ground
MCFG_MCS48_PORT_P2_IN_CB(READ8(*this, monsterb_sound_device, n7751_command_r))
MCFG_MCS48_PORT_BUS_IN_CB(READ8(*this, monsterb_sound_device, n7751_rom_r))
MCFG_MCS48_PORT_P1_OUT_CB(WRITE8("dac", dac_byte_interface, data_w))
diff --git a/src/mame/audio/segam1audio.cpp b/src/mame/audio/segam1audio.cpp
index 85475dc28bb..4638106761a 100644
--- a/src/mame/audio/segam1audio.cpp
+++ b/src/mame/audio/segam1audio.cpp
@@ -80,13 +80,13 @@ MACHINE_CONFIG_START(segam1audio_device::device_add_mconfig)
MCFG_SOUND_ROUTE(0, "lspeaker", 1.0)
MCFG_SOUND_ROUTE(1, "rspeaker", 1.0)
- MCFG_DEVICE_ADD(UART_TAG, I8251, 8000000) // T82C51, clock unknown
- MCFG_I8251_RXRDY_HANDLER(INPUTLINE(M68000_TAG, M68K_IRQ_2))
- MCFG_I8251_TXD_HANDLER(WRITELINE(*this, segam1audio_device, output_txd))
+ I8251(config, m_uart, 8000000); // T82C51, clock unknown
+ m_uart->rxrdy_handler().set_inputline(m_audiocpu, M68K_IRQ_2);
+ m_uart->txd_handler().set(FUNC(segam1audio_device::output_txd));
- MCFG_CLOCK_ADD("uart_clock", 500000) // 16 times 31.25MHz (standard Sega/MIDI sound data rate)
- MCFG_CLOCK_SIGNAL_HANDLER(WRITELINE(UART_TAG, i8251_device, write_txc))
- MCFG_DEVCB_CHAIN_OUTPUT(WRITELINE(UART_TAG, i8251_device, write_rxc))
+ clock_device &uart_clock(CLOCK(config, "uart_clock", 500000)); // 16 times 31.25MHz (standard Sega/MIDI sound data rate)
+ uart_clock.signal_handler().set(m_uart, FUNC(i8251_device::write_txc));
+ uart_clock.signal_handler().append(m_uart, FUNC(i8251_device::write_rxc));
MACHINE_CONFIG_END
//**************************************************************************
diff --git a/src/mame/audio/segam1audio.h b/src/mame/audio/segam1audio.h
index c31349b5ea2..9dc09cbf84c 100644
--- a/src/mame/audio/segam1audio.h
+++ b/src/mame/audio/segam1audio.h
@@ -15,12 +15,6 @@
#define M1AUDIO_MPCM1_REGION "m1audio:pcm1"
#define M1AUDIO_MPCM2_REGION "m1audio:pcm2"
-#define MCFG_SEGAM1AUDIO_ADD(_tag) \
- MCFG_DEVICE_ADD(_tag, SEGAM1AUDIO, 0)
-
-#define MCFG_SEGAM1AUDIO_RXD_HANDLER(_devcb) \
- devcb = &downcast<segam1audio_device &>(*device).set_rxd_handler(DEVCB_##_devcb);
-
//**************************************************************************
// TYPE DEFINITIONS
@@ -33,7 +27,7 @@ public:
segam1audio_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// configuration
- template <class Object> devcb_base &set_rxd_handler(Object &&cb) { return m_rxd_handler.set_callback(std::forward<Object>(cb)); }
+ auto rxd_handler() { return m_rxd_handler.bind(); }
DECLARE_WRITE16_MEMBER(m1_snd_mpcm_bnk1_w);
DECLARE_WRITE16_MEMBER(m1_snd_mpcm_bnk2_w);
diff --git a/src/mame/audio/segasnd.h b/src/mame/audio/segasnd.h
index 70551a8e39b..8e0f902a13e 100644
--- a/src/mame/audio/segasnd.h
+++ b/src/mame/audio/segasnd.h
@@ -36,7 +36,7 @@ protected:
#define SEGASND_SEGASPEECH_REGION "segaspeech:speech"
#define MCFG_SEGASPEECH_INT_CALLBACK(_devcb) \
- devcb = &downcast<speech_sound_device&>(*device).set_int_cb(DEVCB_##_devcb);
+ downcast<speech_sound_device&>(*device).set_int_cb(DEVCB_##_devcb);
class speech_sound_device : public device_t, public device_sound_interface
{
diff --git a/src/mame/audio/seibu.h b/src/mame/audio/seibu.h
index 546ab085b85..e4c8473ffa3 100644
--- a/src/mame/audio/seibu.h
+++ b/src/mame/audio/seibu.h
@@ -189,10 +189,10 @@ DECLARE_DEVICE_TYPE(SEIBU_ADPCM, seibu_adpcm_device)
downcast<seibu_sound_device &>(*device).set_rombank_tag(_banktag);
#define MCFG_SEIBU_SOUND_YM_READ_CB(_devcb) \
- devcb = &downcast<seibu_sound_device &>(*device).set_ym_read_callback(DEVCB_##_devcb);
+ downcast<seibu_sound_device &>(*device).set_ym_read_callback(DEVCB_##_devcb);
#define MCFG_SEIBU_SOUND_YM_WRITE_CB(_devcb) \
- devcb = &downcast<seibu_sound_device &>(*device).set_ym_write_callback(DEVCB_##_devcb);
+ downcast<seibu_sound_device &>(*device).set_ym_write_callback(DEVCB_##_devcb);
/**************************************************************************/
diff --git a/src/mame/audio/svis_snd.h b/src/mame/audio/svis_snd.h
index 44a40e5de86..802d3019371 100644
--- a/src/mame/audio/svis_snd.h
+++ b/src/mame/audio/svis_snd.h
@@ -17,7 +17,7 @@
//**************************************************************************
#define MCFG_SVISION_SOUND_IRQ_CALLBACK(_devcb) \
- devcb = &downcast<svision_sound_device&>(*device).set_irq_cb(DEVCB_##_devcb);
+ downcast<svision_sound_device&>(*device).set_irq_cb(DEVCB_##_devcb);
// ======================> svision_sound_device
diff --git a/src/mame/audio/tvc.h b/src/mame/audio/tvc.h
index b91a103d784..4555598bca7 100644
--- a/src/mame/audio/tvc.h
+++ b/src/mame/audio/tvc.h
@@ -12,7 +12,7 @@
#pragma once
#define MCFG_TVC_SOUND_SNDINT_CALLBACK(_write) \
- devcb = &downcast<tvc_sound_device &>(*device).set_sndint_wr_callback(DEVCB_##_write);
+ downcast<tvc_sound_device &>(*device).set_sndint_wr_callback(DEVCB_##_write);
//**************************************************************************
// TYPE DEFINITIONS
diff --git a/src/mame/audio/williams.cpp b/src/mame/audio/williams.cpp
index dce51aee1d6..c8968b1085a 100644
--- a/src/mame/audio/williams.cpp
+++ b/src/mame/audio/williams.cpp
@@ -177,25 +177,25 @@ void williams_cvsd_sound_device::williams_cvsd_map(address_map &map)
//-------------------------------------------------
MACHINE_CONFIG_START(williams_cvsd_sound_device::device_add_mconfig)
- MCFG_DEVICE_ADD("cpu", MC6809E, CVSD_MASTER_CLOCK / 4)
+ MCFG_DEVICE_ADD(m_cpu, MC6809E, CVSD_MASTER_CLOCK / 4)
MCFG_DEVICE_PROGRAM_MAP(williams_cvsd_map)
- MCFG_DEVICE_ADD("pia", PIA6821, 0)
- MCFG_PIA_WRITEPA_HANDLER(WRITE8("dac", dac_byte_interface, data_w))
- MCFG_PIA_WRITEPB_HANDLER(WRITE8(*this, williams_cvsd_sound_device, talkback_w))
- MCFG_PIA_IRQA_HANDLER(INPUTLINE("cpu", M6809_FIRQ_LINE))
- MCFG_PIA_IRQB_HANDLER(INPUTLINE("cpu", INPUT_LINE_NMI))
+ PIA6821(config, m_pia, 0);
+ m_pia->writepa_handler().set("dac", FUNC(dac_byte_interface::data_w));
+ m_pia->writepb_handler().set(FUNC(williams_cvsd_sound_device::talkback_w));
+ m_pia->irqa_handler().set_inputline(m_cpu, M6809_FIRQ_LINE);
+ m_pia->irqb_handler().set_inputline(m_cpu, INPUT_LINE_NMI);
- MCFG_DEVICE_ADD("ym2151", YM2151, CVSD_FM_CLOCK)
- MCFG_YM2151_IRQ_HANDLER(WRITELINE("pia", pia6821_device, ca1_w)) MCFG_DEVCB_INVERT // IRQ is not true state
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, *this, 0.10)
+ ym2151_device &ym(YM2151(config, "ym2151", CVSD_FM_CLOCK));
+ ym.irq_handler().set(m_pia, FUNC(pia6821_device::ca1_w)).invert(); // IRQ is not true state
+ ym.add_route(ALL_OUTPUTS, *this, 0.10);
- MCFG_DEVICE_ADD("dac", MC1408, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, *this, 0.25)
+ MC1408(config, "dac", 0).add_route(ALL_OUTPUTS, *this, 0.25);
MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
MCFG_SOUND_ROUTE(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
- MCFG_DEVICE_ADD("cvsd", HC55516, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, *this, 0.60)
+ HC55516(config, m_hc55516, 0);
+ m_hc55516->add_route(ALL_OUTPUTS, *this, 0.60);
MACHINE_CONFIG_END
diff --git a/src/mame/audio/zaccaria.h b/src/mame/audio/zaccaria.h
index 63605b079e6..468e9bd1ec7 100644
--- a/src/mame/audio/zaccaria.h
+++ b/src/mame/audio/zaccaria.h
@@ -25,7 +25,7 @@ DECLARE_DEVICE_TYPE(ZACCARIA_1B11142, zac1b11142_audio_device)
//**************************************************************************
#define MCFG_ZACCARIA_1B11142_SET_ACS_CALLBACK(_devcb) \
- devcb = &downcast<zac1b11142_audio_device &>(device).set_acs_cb(DEVCB_##_devcb);
+ downcast<zac1b11142_audio_device &>(device).set_acs_cb(DEVCB_##_devcb);