summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatarGravatar Ivan Vangelista <mesgnet@yahoo.it>2019-02-12 18:05:01 +0100
committerGravatarGravatar Ivan Vangelista <mesgnet@yahoo.it>2019-02-12 18:05:01 +0100
commita076b8d95d22ff7cae09b5234c7a524ecc1254fc (patch) (github)
treeb65065901ae2dec65ee6f57b48816185e8774ceb
parentfebaed1aa75dcf2cf9c35a08fac80b9514638654 (diff)
downloadmame-a076b8d95d22ff7cae09b5234c7a524ecc1254fc.tar.bz2
mame-a076b8d95d22ff7cae09b5234c7a524ecc1254fc.zip
volt_reg: removed MCFG macro (nw)
-rw-r--r--src/devices/bus/a2bus/a2dx1.cpp15
-rw-r--r--src/devices/bus/a2bus/pc_xporter.cpp27
-rw-r--r--src/devices/bus/coco/coco_multi.cpp82
-rw-r--r--src/devices/bus/coco/coco_orch90.cpp16
-rw-r--r--src/devices/bus/coco/cococart.h21
-rw-r--r--src/devices/bus/ecbbus/ecbbus.h38
-rw-r--r--src/devices/bus/lpci/southbridge.cpp19
-rw-r--r--src/devices/bus/pc1512/mouse.h20
-rw-r--r--src/devices/bus/pc_kbd/pc_kbdc.h17
-rw-r--r--src/devices/bus/pet/2joysnd.cpp12
-rw-r--r--src/devices/bus/pet/cb2snd.cpp12
-rw-r--r--src/devices/machine/8042kbdc.cpp8
-rw-r--r--src/devices/machine/pckeybrd.h25
-rw-r--r--src/devices/sound/volt_reg.h3
-rw-r--r--src/mame/audio/alesis.cpp7
-rw-r--r--src/mame/audio/csd.cpp11
-rw-r--r--src/mame/audio/gottlieb.cpp29
-rw-r--r--src/mame/audio/harddriv.cpp8
-rw-r--r--src/mame/audio/midway.cpp22
-rw-r--r--src/mame/audio/nichisnd.cpp19
-rw-r--r--src/mame/audio/s11c_bg.cpp18
-rw-r--r--src/mame/audio/williams.cpp16
-rw-r--r--src/mame/drivers/4004clk.cpp13
-rw-r--r--src/mame/drivers/amstr_pc.cpp3
-rw-r--r--src/mame/drivers/applix.cpp7
-rw-r--r--src/mame/drivers/armedf.cpp35
-rw-r--r--src/mame/drivers/asst128.cpp2
-rw-r--r--src/mame/drivers/atari_s1.cpp27
-rw-r--r--src/mame/drivers/atari_s2.cpp5
-rw-r--r--src/mame/drivers/calchase.cpp14
-rw-r--r--src/mame/drivers/cc40.cpp5
-rw-r--r--src/mame/drivers/cchasm.cpp7
-rw-r--r--src/mame/drivers/champbas.cpp7
-rw-r--r--src/mame/drivers/circusc.cpp5
-rw-r--r--src/mame/drivers/ckz80.cpp12
-rw-r--r--src/mame/drivers/coco12.cpp12
-rw-r--r--src/mame/drivers/compc.cpp32
-rw-r--r--src/mame/drivers/ct486.cpp8
-rw-r--r--src/mame/drivers/cxgz80.cpp12
-rw-r--r--src/mame/drivers/cyberbal.cpp12
-rw-r--r--src/mame/drivers/dectalk.cpp11
-rw-r--r--src/mame/drivers/ec184x.cpp6
-rw-r--r--src/mame/drivers/europc.cpp27
-rw-r--r--src/mame/drivers/exterm.cpp5
-rw-r--r--src/mame/drivers/fidel68k.cpp15
-rw-r--r--src/mame/drivers/fidelmcs48.cpp13
-rw-r--r--src/mame/drivers/galeb.cpp5
-rw-r--r--src/mame/drivers/galivan.cpp14
-rw-r--r--src/mame/drivers/gamecom.cpp7
-rw-r--r--src/mame/drivers/gba.cpp11
-rw-r--r--src/mame/drivers/gei.cpp5
-rw-r--r--src/mame/drivers/genpc.cpp2
-rw-r--r--src/mame/drivers/gp32.cpp7
-rw-r--r--src/mame/drivers/hapyfish.cpp7
-rw-r--r--src/mame/drivers/homelab.cpp15
-rw-r--r--src/mame/drivers/hp80.cpp6
-rw-r--r--src/mame/drivers/hp95lx.cpp23
-rw-r--r--src/mame/drivers/ibmpc.cpp4
-rw-r--r--src/mame/drivers/ibmpcjr.cpp3
-rw-r--r--src/mame/drivers/iskr103x.cpp4
-rw-r--r--src/mame/drivers/jankenmn.cpp7
-rw-r--r--src/mame/drivers/junofrst.cpp17
-rw-r--r--src/mame/drivers/kron.cpp14
-rw-r--r--src/mame/drivers/laserbas.cpp15
-rw-r--r--src/mame/drivers/lazercmd.cpp25
-rw-r--r--src/mame/drivers/leland.cpp7
-rw-r--r--src/mame/drivers/littlerb.cpp20
-rw-r--r--src/mame/drivers/magicfly.cpp5
-rw-r--r--src/mame/drivers/mc10.cpp38
-rw-r--r--src/mame/drivers/mephistp.cpp31
-rw-r--r--src/mame/drivers/meyc8088.cpp5
-rw-r--r--src/mame/drivers/mikro80.cpp5
-rw-r--r--src/mame/drivers/mini2440.cpp7
-rw-r--r--src/mame/drivers/mogura.cpp7
-rw-r--r--src/mame/drivers/msx.cpp72
-rw-r--r--src/mame/drivers/murogem.cpp5
-rw-r--r--src/mame/drivers/nbmj8688.cpp10
-rw-r--r--src/mame/drivers/nbmj8991.cpp7
-rw-r--r--src/mame/drivers/nbmj9195.cpp7
-rw-r--r--src/mame/drivers/ngp.cpp7
-rw-r--r--src/mame/drivers/novagmcs48.cpp21
-rw-r--r--src/mame/drivers/palm.cpp5
-rw-r--r--src/mame/drivers/pc.cpp14
-rw-r--r--src/mame/drivers/pc1512.cpp20
-rw-r--r--src/mame/drivers/pcw16.cpp3
-rw-r--r--src/mame/drivers/prof80.cpp23
-rw-r--r--src/mame/drivers/pt68k4.cpp70
-rw-r--r--src/mame/drivers/rltennis.cpp7
-rw-r--r--src/mame/drivers/s11.cpp5
-rw-r--r--src/mame/drivers/s11a.cpp5
-rw-r--r--src/mame/drivers/s11b.cpp5
-rw-r--r--src/mame/drivers/s3.cpp20
-rw-r--r--src/mame/drivers/s4.cpp20
-rw-r--r--src/mame/drivers/s6.cpp18
-rw-r--r--src/mame/drivers/s6a.cpp18
-rw-r--r--src/mame/drivers/s7.cpp18
-rw-r--r--src/mame/drivers/s8.cpp15
-rw-r--r--src/mame/drivers/s8a.cpp15
-rw-r--r--src/mame/drivers/s9.cpp18
-rw-r--r--src/mame/drivers/sbrkout.cpp6
-rw-r--r--src/mame/drivers/special.cpp10
-rw-r--r--src/mame/drivers/taito.cpp15
-rw-r--r--src/mame/drivers/tandy1t.cpp16
-rw-r--r--src/mame/drivers/terracre.cpp7
-rw-r--r--src/mame/drivers/thomson.cpp8
-rw-r--r--src/mame/drivers/tosh1000.cpp2
-rw-r--r--src/mame/drivers/truco.cpp5
-rw-r--r--src/mame/drivers/tsamurai.cpp14
-rw-r--r--src/mame/drivers/tsispch.cpp7
-rw-r--r--src/mame/drivers/ut88.cpp5
-rw-r--r--src/mame/drivers/vg5k.cpp5
-rw-r--r--src/mame/drivers/wheelfir.cpp7
-rw-r--r--src/mame/drivers/williams.cpp7
-rw-r--r--src/mame/drivers/xtheball.cpp14
-rw-r--r--src/mame/machine/inder_sb.cpp32
115 files changed, 851 insertions, 793 deletions
diff --git a/src/devices/bus/a2bus/a2dx1.cpp b/src/devices/bus/a2bus/a2dx1.cpp
index 5efd112a779..6ccf43eda18 100644
--- a/src/devices/bus/a2bus/a2dx1.cpp
+++ b/src/devices/bus/a2bus/a2dx1.cpp
@@ -31,14 +31,15 @@ DEFINE_DEVICE_TYPE(A2BUS_DX1, a2bus_dx1_device, "a2dx1", "Decillonix DX-1")
// device_add_mconfig - add device configuration
//-------------------------------------------------
-MACHINE_CONFIG_START(a2bus_dx1_device::device_add_mconfig)
+void a2bus_dx1_device::device_add_mconfig(machine_config &config)
+{
SPEAKER(config, "speaker").front_center();
- MCFG_DEVICE_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5) // 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)
-MACHINE_CONFIG_END
+ DAC_8BIT_R2R(config, m_dac, 0).add_route(ALL_OUTPUTS, "speaker", 0.5); // unknown DAC
+ DAC_8BIT_R2R(config, m_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.set_output(5.0);
+ vref.add_route(0, "dacvol", 1.0, DAC_VREF_POS_INPUT);
+}
//**************************************************************************
// LIVE DEVICE
diff --git a/src/devices/bus/a2bus/pc_xporter.cpp b/src/devices/bus/a2bus/pc_xporter.cpp
index 34f1f8125b7..305da9aa868 100644
--- a/src/devices/bus/a2bus/pc_xporter.cpp
+++ b/src/devices/bus/a2bus/pc_xporter.cpp
@@ -115,12 +115,13 @@ void a2bus_pcxporter_device::pc_io(address_map &map)
// device_add_mconfig - add device configuration
//-------------------------------------------------
-MACHINE_CONFIG_START(a2bus_pcxporter_device::device_add_mconfig)
- MCFG_DEVICE_ADD(m_v30, V30, A2BUS_7M_CLOCK) // 7.16 MHz as per manual
- MCFG_DEVICE_PROGRAM_MAP(pc_map)
- MCFG_DEVICE_IO_MAP(pc_io)
- MCFG_DEVICE_IRQ_ACKNOWLEDGE_DEVICE("pic8259", pic8259_device, inta_cb)
- MCFG_DEVICE_DISABLE()
+void a2bus_pcxporter_device::device_add_mconfig(machine_config &config)
+{
+ V30(config, m_v30, A2BUS_7M_CLOCK); // 7.16 MHz as per manual
+ m_v30->set_addrmap(AS_PROGRAM, &a2bus_pcxporter_device::pc_map);
+ m_v30->set_addrmap(AS_IO, &a2bus_pcxporter_device::pc_io);
+ m_v30->set_irq_acknowledge_callback("pic8259", FUNC(pic8259_device::inta_cb));
+ m_v30->set_disable();
PIT8253(config, m_pit8253);
m_pit8253->set_clk<0>(A2BUS_7M_CLOCK / 6.0); // heartbeat IRQ
@@ -163,18 +164,18 @@ MACHINE_CONFIG_START(a2bus_pcxporter_device::device_add_mconfig)
m_isabus->drq2_callback().set(m_dma8237, FUNC(am9517a_device::dreq2_w));
m_isabus->drq3_callback().set(m_dma8237, FUNC(am9517a_device::dreq3_w));
- MCFG_DEVICE_ADD(m_pc_kbdc, PC_KBDC, 0)
- MCFG_PC_KBDC_OUT_CLOCK_CB(WRITELINE(*this, a2bus_pcxporter_device, keyboard_clock_w))
- MCFG_PC_KBDC_OUT_DATA_CB(WRITELINE(*this, a2bus_pcxporter_device, keyboard_data_w))
- MCFG_PC_KBDC_SLOT_ADD("pc_kbdc", "kbd", pc_xt_keyboards, STR_KBD_KEYTRONIC_PC3270)
+ PC_KBDC(config, m_pc_kbdc, 0);
+ m_pc_kbdc->out_clock_cb().set(FUNC(a2bus_pcxporter_device::keyboard_clock_w));
+ m_pc_kbdc->out_data_cb().set(FUNC(a2bus_pcxporter_device::keyboard_data_w));
+ PC_KBDC_SLOT(config, "kbd", pc_xt_keyboards, STR_KBD_KEYTRONIC_PC3270).set_pc_kbdc_slot(m_pc_kbdc);
/* sound hardware */
SPEAKER(config, "mono").front_center();
SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 1.00);
- MCFG_DEVICE_ADD("isa1", ISA8_SLOT, 0, m_isabus, pc_isa8_cards, "cga", true) // FIXME: determine ISA bus clock
- MCFG_DEVICE_ADD("isa2", ISA8_SLOT, 0, m_isabus, pc_isa8_cards, "fdc_xt", true)
-MACHINE_CONFIG_END
+ ISA8_SLOT(config, "isa1", 0, m_isabus, pc_isa8_cards, "cga", true); // FIXME: determine ISA bus clock
+ ISA8_SLOT(config, "isa2", 0, m_isabus, pc_isa8_cards, "fdc_xt", true);
+}
//**************************************************************************
// LIVE DEVICE
diff --git a/src/devices/bus/coco/coco_multi.cpp b/src/devices/bus/coco/coco_multi.cpp
index 60a2b99286c..628a550fe07 100644
--- a/src/devices/bus/coco/coco_multi.cpp
+++ b/src/devices/bus/coco/coco_multi.cpp
@@ -96,29 +96,6 @@ namespace
// construction/destruction
coco_multipak_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- // optional information overrides
- virtual void device_add_mconfig(machine_config &config) override;
-
- virtual uint8_t* get_cart_base() override;
- virtual uint32_t get_cart_size() override;
-
- // these are only public so they can be in a MACHINE_CONFIG_START
- // declaration; don't think about them as publically accessable
- DECLARE_WRITE_LINE_MEMBER(multi_slot1_cart_w);
- DECLARE_WRITE_LINE_MEMBER(multi_slot1_nmi_w);
- DECLARE_WRITE_LINE_MEMBER(multi_slot1_halt_w);
- DECLARE_WRITE_LINE_MEMBER(multi_slot2_cart_w);
- DECLARE_WRITE_LINE_MEMBER(multi_slot2_nmi_w);
- DECLARE_WRITE_LINE_MEMBER(multi_slot2_halt_w);
- DECLARE_WRITE_LINE_MEMBER(multi_slot3_cart_w);
- DECLARE_WRITE_LINE_MEMBER(multi_slot3_nmi_w);
- DECLARE_WRITE_LINE_MEMBER(multi_slot3_halt_w);
- DECLARE_WRITE_LINE_MEMBER(multi_slot4_cart_w);
- DECLARE_WRITE_LINE_MEMBER(multi_slot4_nmi_w);
- DECLARE_WRITE_LINE_MEMBER(multi_slot4_halt_w);
-
- virtual address_space &cartridge_space() override;
- virtual ioport_constructor device_input_ports() const override;
INPUT_CHANGED_MEMBER( switch_changed );
protected:
@@ -129,6 +106,15 @@ namespace
virtual WRITE8_MEMBER(scs_write) override;
virtual void set_sound_enable(bool sound_enable) override;
+ // optional information overrides
+ virtual void device_add_mconfig(machine_config &config) override;
+
+ virtual uint8_t* get_cart_base() override;
+ virtual uint32_t get_cart_size() override;
+
+ virtual address_space &cartridge_space() override;
+ virtual ioport_constructor device_input_ports() const override;
+
private:
// device references
required_device_array<cococart_slot_device, 4> m_slots;
@@ -149,6 +135,19 @@ namespace
DECLARE_READ8_MEMBER(ff7f_read);
DECLARE_WRITE8_MEMBER(ff7f_write);
void update_line(int slot_number, line ln);
+
+ DECLARE_WRITE_LINE_MEMBER(multi_slot1_cart_w);
+ DECLARE_WRITE_LINE_MEMBER(multi_slot1_nmi_w);
+ DECLARE_WRITE_LINE_MEMBER(multi_slot1_halt_w);
+ DECLARE_WRITE_LINE_MEMBER(multi_slot2_cart_w);
+ DECLARE_WRITE_LINE_MEMBER(multi_slot2_nmi_w);
+ DECLARE_WRITE_LINE_MEMBER(multi_slot2_halt_w);
+ DECLARE_WRITE_LINE_MEMBER(multi_slot3_cart_w);
+ DECLARE_WRITE_LINE_MEMBER(multi_slot3_nmi_w);
+ DECLARE_WRITE_LINE_MEMBER(multi_slot3_halt_w);
+ DECLARE_WRITE_LINE_MEMBER(multi_slot4_cart_w);
+ DECLARE_WRITE_LINE_MEMBER(multi_slot4_nmi_w);
+ DECLARE_WRITE_LINE_MEMBER(multi_slot4_halt_w);
};
};
@@ -182,24 +181,25 @@ static void coco_cart_slot4(device_slot_interface &device)
}
-MACHINE_CONFIG_START(coco_multipak_device::device_add_mconfig)
- MCFG_COCO_CARTRIDGE_ADD(SLOT1_TAG, coco_cart_slot1_3, nullptr)
- MCFG_COCO_CARTRIDGE_CART_CB(WRITELINE(DEVICE_SELF, coco_multipak_device, multi_slot1_cart_w))
- MCFG_COCO_CARTRIDGE_NMI_CB(WRITELINE(DEVICE_SELF, coco_multipak_device, multi_slot1_nmi_w))
- MCFG_COCO_CARTRIDGE_HALT_CB(WRITELINE(DEVICE_SELF, coco_multipak_device, multi_slot1_halt_w))
- MCFG_COCO_CARTRIDGE_ADD(SLOT2_TAG, coco_cart_slot1_3, nullptr)
- MCFG_COCO_CARTRIDGE_CART_CB(WRITELINE(DEVICE_SELF, coco_multipak_device, multi_slot2_cart_w))
- MCFG_COCO_CARTRIDGE_NMI_CB(WRITELINE(DEVICE_SELF, coco_multipak_device, multi_slot2_nmi_w))
- MCFG_COCO_CARTRIDGE_HALT_CB(WRITELINE(DEVICE_SELF, coco_multipak_device, multi_slot2_halt_w))
- MCFG_COCO_CARTRIDGE_ADD(SLOT3_TAG, coco_cart_slot1_3, nullptr)
- MCFG_COCO_CARTRIDGE_CART_CB(WRITELINE(DEVICE_SELF, coco_multipak_device, multi_slot3_cart_w))
- MCFG_COCO_CARTRIDGE_NMI_CB(WRITELINE(DEVICE_SELF, coco_multipak_device, multi_slot3_nmi_w))
- MCFG_COCO_CARTRIDGE_HALT_CB(WRITELINE(DEVICE_SELF, coco_multipak_device, multi_slot3_halt_w))
- MCFG_COCO_CARTRIDGE_ADD(SLOT4_TAG, coco_cart_slot4, "fdcv11")
- MCFG_COCO_CARTRIDGE_CART_CB(WRITELINE(DEVICE_SELF, coco_multipak_device, multi_slot4_cart_w))
- MCFG_COCO_CARTRIDGE_NMI_CB(WRITELINE(DEVICE_SELF, coco_multipak_device, multi_slot4_nmi_w))
- MCFG_COCO_CARTRIDGE_HALT_CB(WRITELINE(DEVICE_SELF, coco_multipak_device, multi_slot4_halt_w))
-MACHINE_CONFIG_END
+void coco_multipak_device::device_add_mconfig(machine_config &config)
+{
+ COCOCART_SLOT(config, m_slots[0], DERIVED_CLOCK(1, 1), coco_cart_slot1_3, nullptr);
+ m_slots[0]->cart_callback().set(FUNC(coco_multipak_device::multi_slot1_cart_w));
+ m_slots[0]->nmi_callback().set(FUNC(coco_multipak_device::multi_slot1_nmi_w));
+ m_slots[0]->halt_callback().set(FUNC(coco_multipak_device::multi_slot1_halt_w));
+ COCOCART_SLOT(config, m_slots[1], DERIVED_CLOCK(1, 1), coco_cart_slot1_3, nullptr);
+ m_slots[1]->cart_callback().set(FUNC(coco_multipak_device::multi_slot2_cart_w));
+ m_slots[1]->nmi_callback().set(FUNC(coco_multipak_device::multi_slot2_nmi_w));
+ m_slots[1]->halt_callback().set(FUNC(coco_multipak_device::multi_slot2_halt_w));
+ COCOCART_SLOT(config, m_slots[2], DERIVED_CLOCK(1, 1), coco_cart_slot1_3, nullptr);
+ m_slots[2]->cart_callback().set(FUNC(coco_multipak_device::multi_slot3_cart_w));
+ m_slots[2]->nmi_callback().set(FUNC(coco_multipak_device::multi_slot3_nmi_w));
+ m_slots[2]->halt_callback().set(FUNC(coco_multipak_device::multi_slot3_halt_w));
+ COCOCART_SLOT(config, m_slots[3], DERIVED_CLOCK(1, 1), coco_cart_slot4, "fdcv11");
+ m_slots[3]->cart_callback().set(FUNC(coco_multipak_device::multi_slot4_cart_w));
+ m_slots[3]->nmi_callback().set(FUNC(coco_multipak_device::multi_slot4_nmi_w));
+ m_slots[3]->halt_callback().set(FUNC(coco_multipak_device::multi_slot4_halt_w));
+}
INPUT_PORTS_START( coco_multipack )
PORT_START( SWITCH_CONFIG_TAG )
diff --git a/src/devices/bus/coco/coco_orch90.cpp b/src/devices/bus/coco/coco_orch90.cpp
index 979acd423a1..359226e76dd 100644
--- a/src/devices/bus/coco/coco_orch90.cpp
+++ b/src/devices/bus/coco/coco_orch90.cpp
@@ -107,15 +107,17 @@ namespace
// MACHINE AND ROM DECLARATIONS
//**************************************************************************
-MACHINE_CONFIG_START(coco_orch90_device::device_add_mconfig)
+void coco_orch90_device::device_add_mconfig(machine_config &config)
+{
SPEAKER(config, "lspeaker").front_left();
SPEAKER(config, "rspeaker").front_right();
- MCFG_DEVICE_ADD("ldac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.5) // ls374.ic5 + r7 (8x20k) + r9 (8x10k)
- MCFG_DEVICE_ADD("rdac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.5) // ls374.ic4 + r6 (8x20k) + r8 (8x10k)
- MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
- MCFG_SOUND_ROUTE(0, "ldac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE(0, "ldac", -1.0, DAC_VREF_NEG_INPUT)
- MCFG_SOUND_ROUTE(0, "rdac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE(0, "rdac", -1.0, DAC_VREF_NEG_INPUT)
-MACHINE_CONFIG_END
+ DAC_8BIT_R2R(config, m_ldac, 0).add_route(ALL_OUTPUTS, "lspeaker", 0.5); // ls374.ic5 + r7 (8x20k) + r9 (8x10k)
+ DAC_8BIT_R2R(config, m_rdac, 0).add_route(ALL_OUTPUTS, "rspeaker", 0.5); // ls374.ic4 + r6 (8x20k) + r8 (8x10k)
+ voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref"));
+ vref.set_output(5.0);
+ vref.add_route(0, "ldac", 1.0, DAC_VREF_POS_INPUT); vref.add_route(0, "ldac", -1.0, DAC_VREF_NEG_INPUT);
+ vref.add_route(0, "rdac", 1.0, DAC_VREF_POS_INPUT); vref.add_route(0, "rdac", -1.0, DAC_VREF_NEG_INPUT);
+}
//**************************************************************************
diff --git a/src/devices/bus/coco/cococart.h b/src/devices/bus/coco/cococart.h
index 46f5ca7f146..3eb6f2874c1 100644
--- a/src/devices/bus/coco/cococart.h
+++ b/src/devices/bus/coco/cococart.h
@@ -25,15 +25,6 @@
// direct region update handler
typedef delegate<void (uint8_t *)> cococart_base_update_delegate;
-#define MCFG_COCO_CARTRIDGE_CART_CB(_devcb) \
- downcast<cococart_slot_device &>(*device).set_cart_callback(DEVCB_##_devcb);
-
-#define MCFG_COCO_CARTRIDGE_NMI_CB(_devcb) \
- downcast<cococart_slot_device &>(*device).set_nmi_callback(DEVCB_##_devcb);
-
-#define MCFG_COCO_CARTRIDGE_HALT_CB(_devcb) \
- downcast<cococart_slot_device &>(*device).set_halt_callback(DEVCB_##_devcb);
-
// ======================> cococart_slot_device
class device_cococart_interface;
@@ -72,9 +63,6 @@ public:
}
cococart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- template <class Object> devcb_base &set_cart_callback(Object &&cb) { return m_cart_callback.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_nmi_callback(Object &&cb) { return m_nmi_callback.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_halt_callback(Object &&cb) { return m_halt_callback.set_callback(std::forward<Object>(cb)); }
auto cart_callback() { return m_cart_callback.bind(); }
auto nmi_callback() { return m_nmi_callback.bind(); }
auto halt_callback() { return m_halt_callback.bind(); }
@@ -216,13 +204,4 @@ private:
device_cococart_host_interface * m_host;
};
-
-/***************************************************************************
- DEVICE CONFIGURATION MACROS
-***************************************************************************/
-
-#define MCFG_COCO_CARTRIDGE_ADD(_tag,_slot_intf,_def_slot) \
- MCFG_DEVICE_ADD(_tag, COCOCART_SLOT, DERIVED_CLOCK(1, 1)) \
- MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false)
-
#endif // MAME_BUS_COCO_COCOCART_H
diff --git a/src/devices/bus/ecbbus/ecbbus.h b/src/devices/bus/ecbbus/ecbbus.h
index f4d53b5cc9a..c14f1c53de4 100644
--- a/src/devices/bus/ecbbus/ecbbus.h
+++ b/src/devices/bus/ecbbus/ecbbus.h
@@ -56,27 +56,6 @@
#define ECBBUS_TAG "ecbbus"
-
-//**************************************************************************
-// INTERFACE CONFIGURATION MACROS
-//**************************************************************************
-
-#define MCFG_ECBBUS_ADD() \
- MCFG_DEVICE_ADD(ECBBUS_TAG, ECBBUS, 0)
-#define MCFG_ECBBUS_SLOT_ADD(_num, _tag, _slot_intf, _def_slot) \
- MCFG_DEVICE_ADD(_tag, ECBBUS_SLOT, 0) \
- MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false) \
- downcast<ecbbus_slot_device &>(*device).set_ecbbus_slot(ECBBUS_TAG, _num);
-
-
-#define MCFG_ECBBUS_IRQ_CALLBACK(_write) \
- downcast<ecbbus_device &>(*device).set_irq_wr_callback(DEVCB_##_write);
-
-#define MCFG_ECBBUS_NMI_CALLBACK(_write) \
- downcast<ecbbus_device &>(*device).set_nmi_wr_callback(DEVCB_##_write);
-
-
-
//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
@@ -90,6 +69,17 @@ class ecbbus_slot_device : public device_t,
{
public:
// construction/destruction
+ template <typename T>
+ ecbbus_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, int num, T &&opts, char const *dflt)
+ : ecbbus_slot_device(mconfig, tag, owner, 0)
+ {
+ option_reset();
+ opts(*this);
+ set_default_option(dflt);
+ set_fixed(false);
+ set_ecbbus_slot(ECBBUS_TAG, num);
+ }
+
ecbbus_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// device-level overrides
@@ -121,10 +111,10 @@ class ecbbus_device : public device_t
{
public:
// construction/destruction
- ecbbus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ ecbbus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
- template <class Object> devcb_base &set_irq_wr_callback(Object &&cb) { return m_write_irq.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_nmi_wr_callback(Object &&cb) { return m_write_nmi.set_callback(std::forward<Object>(cb)); }
+ auto irq_wr_callback() { return m_write_irq.bind(); }
+ auto nmi_wr_callback() { return m_write_nmi.bind(); }
void add_card(device_ecbbus_card_interface *card, int pos);
diff --git a/src/devices/bus/lpci/southbridge.cpp b/src/devices/bus/lpci/southbridge.cpp
index 352b8c46e7d..67fd4acaf34 100644
--- a/src/devices/bus/lpci/southbridge.cpp
+++ b/src/devices/bus/lpci/southbridge.cpp
@@ -516,7 +516,8 @@ static void pc_isa_onboard(device_slot_interface &device)
// device_add_mconfig - add device configuration
//-------------------------------------------------
-MACHINE_CONFIG_START(southbridge_extended_device::device_add_mconfig)
+void southbridge_extended_device::device_add_mconfig(machine_config &config)
+{
southbridge_device::device_add_mconfig(config);
at_keyboard_controller_device &keybc(AT_KEYBOARD_CONTROLLER(config, "keybc", XTAL(12'000'000)));
@@ -526,20 +527,20 @@ MACHINE_CONFIG_START(southbridge_extended_device::device_add_mconfig)
keybc.kbd_clk().set("pc_kbdc", FUNC(pc_kbdc_device::clock_write_from_mb));
keybc.kbd_data().set("pc_kbdc", FUNC(pc_kbdc_device::data_write_from_mb));
- MCFG_DEVICE_ADD("pc_kbdc", PC_KBDC, 0)
- MCFG_PC_KBDC_OUT_CLOCK_CB(WRITELINE("keybc", at_keyboard_controller_device, kbd_clk_w))
- MCFG_PC_KBDC_OUT_DATA_CB(WRITELINE("keybc", at_keyboard_controller_device, kbd_data_w))
- MCFG_PC_KBDC_SLOT_ADD("pc_kbdc", "kbd", pc_at_keyboards, STR_KBD_MICROSOFT_NATURAL)
+ PC_KBDC(config, m_pc_kbdc, 0);
+ m_pc_kbdc->out_clock_cb().set(m_keybc, FUNC(at_keyboard_controller_device::kbd_clk_w));
+ m_pc_kbdc->out_data_cb().set(m_keybc, FUNC(at_keyboard_controller_device::kbd_data_w));
+ PC_KBDC_SLOT(config, "kbd", pc_at_keyboards, STR_KBD_MICROSOFT_NATURAL).set_pc_kbdc_slot(m_pc_kbdc);
ds12885_device &rtc(DS12885(config, "rtc"));
rtc.irq().set("pic8259_slave", FUNC(pic8259_device::ir0_w));
rtc.set_century_index(0x32);
// on board devices
- MCFG_DEVICE_ADD("board1", ISA16_SLOT, 0, "isabus", pc_isa_onboard, "fdcsmc", true) // FIXME: determine ISA bus clock
- MCFG_DEVICE_ADD("board2", ISA16_SLOT, 0, "isabus", pc_isa_onboard, "comat", true)
- MCFG_DEVICE_ADD("board3", ISA16_SLOT, 0, "isabus", pc_isa_onboard, "lpt", true)
-MACHINE_CONFIG_END
+ ISA16_SLOT(config, "board1", 0, "isabus", pc_isa_onboard, "fdcsmc", true); // FIXME: determine ISA bus clock
+ ISA16_SLOT(config, "board2", 0, "isabus", pc_isa_onboard, "comat", true);
+ ISA16_SLOT(config, "board3", 0, "isabus", pc_isa_onboard, "lpt", true);
+}
southbridge_extended_device::southbridge_extended_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock)
: southbridge_device(mconfig, type, tag, owner, clock),
diff --git a/src/devices/bus/pc1512/mouse.h b/src/devices/bus/pc1512/mouse.h
index db432598a98..709696dfef7 100644
--- a/src/devices/bus/pc1512/mouse.h
+++ b/src/devices/bus/pc1512/mouse.h
@@ -78,13 +78,23 @@ class pc1512_mouse_port_device : public device_t, public device_slot_interface
{
public:
// construction/destruction
- pc1512_mouse_port_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ template <typename T>
+ pc1512_mouse_port_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt)
+ : pc1512_mouse_port_device(mconfig, tag, owner, 0)
+ {
+ option_reset();
+ opts(*this);
+ set_default_option(dflt);
+ set_fixed(false);
+ }
+
+ pc1512_mouse_port_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
// static configuration helpers
- template <class Object> devcb_base &set_x_wr_callback(Object &&cb) { return m_write_x.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_y_wr_callback(Object &&cb) { return m_write_y.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_m1_wr_callback(Object &&cb) { return m_write_m1.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_m2_wr_callback(Object &&cb) { return m_write_m2.set_callback(std::forward<Object>(cb)); }
+ auto x_wr_callback() { return m_write_x.bind(); }
+ auto y_wr_callback() { return m_write_y.bind(); }
+ auto m1_wr_callback() { return m_write_m1.bind(); }
+ auto m2_wr_callback() { return m_write_m2.bind(); }
// peripheral interface
void x_w(uint8_t data) { m_write_x(data); }
diff --git a/src/devices/bus/pc_kbd/pc_kbdc.h b/src/devices/bus/pc_kbd/pc_kbdc.h
index dac06daf60f..ff1168c314c 100644
--- a/src/devices/bus/pc_kbd/pc_kbdc.h
+++ b/src/devices/bus/pc_kbd/pc_kbdc.h
@@ -17,21 +17,6 @@ set the data line and then set the clock line.
//**************************************************************************
-// INTERFACE CONFIGURATION MACROS
-//**************************************************************************
-
-#define MCFG_PC_KBDC_OUT_CLOCK_CB(_devcb) \
- downcast<pc_kbdc_device &>(*device).set_out_clock_callback(DEVCB_##_devcb);
-
-#define MCFG_PC_KBDC_OUT_DATA_CB(_devcb) \
- downcast<pc_kbdc_device &>(*device).set_out_data_callback(DEVCB_##_devcb);
-
-#define MCFG_PC_KBDC_SLOT_ADD(_kbdc_tag, _tag, _slot_intf, _def_slot) \
- MCFG_DEVICE_ADD(_tag, PC_KBDC_SLOT, 0 ) \
- MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false) \
- downcast<pc_kbdc_slot_device &>(*device).set_pc_kbdc_slot(subdevice(_kbdc_tag) );
-
-//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
@@ -76,8 +61,6 @@ public:
// construction/destruction
pc_kbdc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- template <class Object> devcb_base &set_out_clock_callback(Object &&cb) { return m_out_clock_cb.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_out_data_callback(Object &&cb) { return m_out_data_cb.set_callback(std::forward<Object>(cb)); }
auto out_clock_cb() { return m_out_clock_cb.bind(); }
auto out_data_cb() { return m_out_data_cb.bind(); }
diff --git a/src/devices/bus/pet/2joysnd.cpp b/src/devices/bus/pet/2joysnd.cpp
index b89ca59f7f8..e7cc8a9d9fc 100644
--- a/src/devices/bus/pet/2joysnd.cpp
+++ b/src/devices/bus/pet/2joysnd.cpp
@@ -93,12 +93,14 @@ ioport_constructor pet_userport_joystick_and_sound_device::device_input_ports()
// device_add_mconfig - add device configuration
//-------------------------------------------------
-MACHINE_CONFIG_START(pet_userport_joystick_and_sound_device::device_add_mconfig)
+void pet_userport_joystick_and_sound_device::device_add_mconfig(machine_config &config)
+{
SPEAKER(config, "speaker").front_center();
- MCFG_DEVICE_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.99)
- MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
- MCFG_SOUND_ROUTE(0, "dac", 1.0, DAC_VREF_POS_INPUT)
-MACHINE_CONFIG_END
+ DAC_1BIT(config, m_dac, 0).add_route(ALL_OUTPUTS, "speaker", 0.99);
+ voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref"));
+ vref.set_output(5.0);
+ vref.add_route(0, "dac", 1.0, DAC_VREF_POS_INPUT);
+}
//**************************************************************************
// LIVE DEVICE
diff --git a/src/devices/bus/pet/cb2snd.cpp b/src/devices/bus/pet/cb2snd.cpp
index a9f5ccb480a..1195131702e 100644
--- a/src/devices/bus/pet/cb2snd.cpp
+++ b/src/devices/bus/pet/cb2snd.cpp
@@ -26,12 +26,14 @@ DEFINE_DEVICE_TYPE(PET_USERPORT_CB2_SOUND_DEVICE, pet_userport_cb2_sound_device,
// device_add_mconfig - add device configuration
//-------------------------------------------------
-MACHINE_CONFIG_START(pet_userport_cb2_sound_device::device_add_mconfig)
+void pet_userport_cb2_sound_device::device_add_mconfig(machine_config &config)
+{
SPEAKER(config, "speaker").front_center();
- MCFG_DEVICE_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.99)
- MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
- MCFG_SOUND_ROUTE(0, "dac", 1.0, DAC_VREF_POS_INPUT)
-MACHINE_CONFIG_END
+ DAC_1BIT(config, m_dac, 0).add_route(ALL_OUTPUTS, "speaker", 0.99);
+ voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref"));
+ vref.set_output(5.0);
+ vref.add_route(0, "dac", 1.0, DAC_VREF_POS_INPUT);
+}
//**************************************************************************
// LIVE DEVICE
diff --git a/src/devices/machine/8042kbdc.cpp b/src/devices/machine/8042kbdc.cpp
index 5a7815f3ccd..541e7575b63 100644
--- a/src/devices/machine/8042kbdc.cpp
+++ b/src/devices/machine/8042kbdc.cpp
@@ -45,9 +45,11 @@ kbdc8042_device::kbdc8042_device(const machine_config &mconfig, const char *tag,
{
}
-MACHINE_CONFIG_START(kbdc8042_device::device_add_mconfig)
- MCFG_AT_KEYB_ADD("at_keyboard", 1, WRITELINE(*this, kbdc8042_device, keyboard_w))
-MACHINE_CONFIG_END
+void kbdc8042_device::device_add_mconfig(machine_config &config)
+{
+ AT_KEYB(config, m_keyboard_dev, pc_keyboard_device::KEYBOARD_TYPE::AT, 1);
+ m_keyboard_dev->keypress().set(FUNC(kbdc8042_device::keyboard_w));
+}
/*-------------------------------------------------
diff --git a/src/devices/machine/pckeybrd.h b/src/devices/machine/pckeybrd.h
index 7ee6c5c2c14..42a443226f5 100644
--- a/src/devices/machine/pckeybrd.h
+++ b/src/devices/machine/pckeybrd.h
@@ -20,12 +20,11 @@
class pc_keyboard_device : public device_t
{
public:
- pc_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ pc_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
DECLARE_READ8_MEMBER(read);
DECLARE_WRITE_LINE_MEMBER(enable);
- template <class Object> devcb_base &set_keypress_callback(Object &&cb) { return m_out_keypress_func.set_callback(std::forward<Object>(cb)); }
auto keypress() { return m_out_keypress_func.bind(); }
enum class KEYBOARD_TYPE
@@ -77,7 +76,13 @@ private:
class at_keyboard_device : public pc_keyboard_device
{
public:
- at_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ at_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, KEYBOARD_TYPE type, int default_set)
+ : at_keyboard_device(mconfig, tag, owner, 0)
+ {
+ set_type(type, default_set);
+ }
+
+ at_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
DECLARE_WRITE8_MEMBER( write );
@@ -114,18 +119,4 @@ INPUT_PORTS_EXTERN( at_keyboard );
DECLARE_DEVICE_TYPE(PC_KEYB, pc_keyboard_device)
DECLARE_DEVICE_TYPE(AT_KEYB, at_keyboard_device)
-#define MCFG_PC_KEYB_ADD(_tag, _cb) \
- MCFG_DEVICE_ADD(_tag, PC_KEYB, 0) \
- downcast<pc_keyboard_device &>(*device).set_keypress_callback(DEVCB_##_cb);
-
-#define MCFG_AT_KEYB_ADD(_tag, _def_set, _cb) \
- MCFG_DEVICE_ADD(_tag, AT_KEYB, 0) \
- downcast<at_keyboard_device &>(*device).set_type(pc_keyboard_device::KEYBOARD_TYPE::AT, _def_set); \
- downcast<pc_keyboard_device &>(*device).set_keypress_callback(DEVCB_##_cb);
-
-#define MCFG_AT_MF2_KEYB_ADD(_tag, _def_set, _cb) \
- MCFG_DEVICE_ADD(_tag, AT_KEYB, 0) \
- downcast<at_keyboard_device &>(*device).set_type(pc_keyboard_device::KEYBOARD_TYPE_MF2, _def_set); \
- downcast<pc_keyboard_device &>(*device).set_keypress_callback(DEVCB_##_cb);
-
#endif // MAME_MACHINE_PCKEYBRD_H
diff --git a/src/devices/sound/volt_reg.h b/src/devices/sound/volt_reg.h
index f2e5d88298e..a0a5b1e1abb 100644
--- a/src/devices/sound/volt_reg.h
+++ b/src/devices/sound/volt_reg.h
@@ -14,9 +14,6 @@
#pragma once
-#define MCFG_VOLTAGE_REGULATOR_OUTPUT(_output) \
- downcast<voltage_regulator_device &>(*device).set_output(_output);
-
class voltage_regulator_device : public device_t, public device_sound_interface
{
public:
diff --git a/src/mame/audio/alesis.cpp b/src/mame/audio/alesis.cpp
index baa33f06560..1c68948ef4c 100644
--- a/src/mame/audio/alesis.cpp
+++ b/src/mame/audio/alesis.cpp
@@ -41,17 +41,18 @@ alesis_dm3ag_device::alesis_dm3ag_device(const machine_config &mconfig, const ch
// device_add_mconfig
//-------------------------------------------------
-MACHINE_CONFIG_START(alesis_dm3ag_device::device_add_mconfig)
+void alesis_dm3ag_device::device_add_mconfig(machine_config &config)
+{
SPEAKER(config, "lspeaker1").front_left();
SPEAKER(config, "rspeaker1").front_right();
SPEAKER(config, "lspeaker2").front_left();
SPEAKER(config, "rspeaker2").front_right();
- MCFG_DEVICE_ADD("dac", PCM54HP, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker1", 1.0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker1", 1.0) // PCM54HP DAC + R63/R73-75 + Sample and hold
+ 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.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);
-MACHINE_CONFIG_END
+}
//-------------------------------------------------
// device_start - device-specific startup
diff --git a/src/mame/audio/csd.cpp b/src/mame/audio/csd.cpp
index e21e871c17b..2ce5c9d8707 100644
--- a/src/mame/audio/csd.cpp
+++ b/src/mame/audio/csd.cpp
@@ -36,9 +36,10 @@ void midway_cheap_squeak_deluxe_device::csdeluxe_map(address_map &map)
// machine configuration
//-------------------------------------------------
-MACHINE_CONFIG_START(midway_cheap_squeak_deluxe_device::device_add_mconfig)
- MCFG_DEVICE_ADD("cpu", M68000, DERIVED_CLOCK(1, 2))
- MCFG_DEVICE_PROGRAM_MAP(csdeluxe_map)
+void midway_cheap_squeak_deluxe_device::device_add_mconfig(machine_config &config)
+{
+ M68000(config, m_cpu, DERIVED_CLOCK(1, 2));
+ m_cpu->set_addrmap(AS_PROGRAM, &midway_cheap_squeak_deluxe_device::csdeluxe_map);
PIA6821(config, m_pia, 0);
m_pia->writepa_handler().set(FUNC(midway_cheap_squeak_deluxe_device::porta_w));
@@ -46,12 +47,12 @@ MACHINE_CONFIG_START(midway_cheap_squeak_deluxe_device::device_add_mconfig)
m_pia->irqa_handler().set(FUNC(midway_cheap_squeak_deluxe_device::irq_w));
m_pia->irqb_handler().set(FUNC(midway_cheap_squeak_deluxe_device::irq_w));
- MCFG_DEVICE_ADD("dac", AD7533, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, *this, 1.0)
+ AD7533(config, m_dac, 0).add_route(ALL_OUTPUTS, *this, 1.0);
voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref"));
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);
-MACHINE_CONFIG_END
+}
//-------------------------------------------------
// rom_region - device-specific ROM region
diff --git a/src/mame/audio/gottlieb.cpp b/src/mame/audio/gottlieb.cpp
index 90cf2af226e..1ed3ca8af76 100644
--- a/src/mame/audio/gottlieb.cpp
+++ b/src/mame/audio/gottlieb.cpp
@@ -2,7 +2,7 @@
// copyright-holders:Aaron Giles
/***************************************************************************
- gottlieb.c
+ gottlieb.cpp
Gottlieb 6502-based sound hardware implementations.
@@ -115,10 +115,11 @@ INPUT_CHANGED_MEMBER( gottlieb_sound_r0_device::audio_nmi )
// device_add_mconfig - add device configuration
//-------------------------------------------------
-MACHINE_CONFIG_START(gottlieb_sound_r0_device::device_add_mconfig)
+void gottlieb_sound_r0_device::device_add_mconfig(machine_config &config)
+{
// audio CPU
- MCFG_DEVICE_ADD("audiocpu", M6502, SOUND1_CLOCK/4) // M6503 - clock is a gate, a resistor and a capacitor. Freq unknown.
- MCFG_DEVICE_PROGRAM_MAP(gottlieb_sound_r0_map)
+ M6502(config, m_audiocpu, SOUND1_CLOCK/4); // M6503 - clock is a gate, a resistor and a capacitor. Freq unknown.
+ m_audiocpu->set_addrmap(AS_PROGRAM, &gottlieb_sound_r0_device::gottlieb_sound_r0_map);
// I/O configuration
MOS6530(config, m_r6530, SOUND1_CLOCK/4); // unknown - same as cpu
@@ -126,12 +127,12 @@ MACHINE_CONFIG_START(gottlieb_sound_r0_device::device_add_mconfig)
m_r6530->in_pb_callback().set(FUNC(gottlieb_sound_r0_device::r6530b_r));
// sound devices
- MCFG_DEVICE_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, *this, 0.25) // unknown DAC
+ DAC_8BIT_R2R(config, "dac", 0).add_route(ALL_OUTPUTS, *this, 0.25); // unknown DAC
voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref"));
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);
-MACHINE_CONFIG_END
+}
//-------------------------------------------------
@@ -245,10 +246,11 @@ INPUT_PORTS_END
// device_add_mconfig - add device configuration
//-------------------------------------------------
-MACHINE_CONFIG_START(gottlieb_sound_r1_device::device_add_mconfig)
+void gottlieb_sound_r1_device::device_add_mconfig(machine_config &config)
+{
// audio CPU
- MCFG_DEVICE_ADD("audiocpu", M6502, SOUND1_CLOCK/4) // the board can be set to /2 as well
- MCFG_DEVICE_PROGRAM_MAP(gottlieb_sound_r1_map)
+ m6502_device &audiocpu(M6502(config, "audiocpu", SOUND1_CLOCK/4)); // the board can be set to /2 as well
+ audiocpu.set_addrmap(AS_PROGRAM, &gottlieb_sound_r1_device::gottlieb_sound_r1_map);
INPUT_MERGER_ANY_HIGH(config, "nmi").output_handler().set_inputline("audiocpu", INPUT_LINE_NMI);
@@ -259,12 +261,12 @@ MACHINE_CONFIG_START(gottlieb_sound_r1_device::device_add_mconfig)
m_riot->irq_callback().set_inputline("audiocpu", M6502_IRQ_LINE);
// sound devices
- MCFG_DEVICE_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, *this, 0.25) // unknown DAC
+ DAC_8BIT_R2R(config, "dac", 0).add_route(ALL_OUTPUTS, *this, 0.25); // unknown DAC
voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref"));
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);
-MACHINE_CONFIG_END
+}
//-------------------------------------------------
@@ -667,8 +669,9 @@ MACHINE_CONFIG_START(gottlieb_sound_r2_device::device_add_mconfig)
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)
+ voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref"));
+ vref.set_output(5.0);
+ vref.add_route(0, "dacvol", 1.0, DAC_VREF_POS_INPUT);
AY8913(config, m_ay1, SOUND2_CLOCK/2).add_route(ALL_OUTPUTS, *this, 0.15);
diff --git a/src/mame/audio/harddriv.cpp b/src/mame/audio/harddriv.cpp
index b94ec4e84cb..3759f137c0e 100644
--- a/src/mame/audio/harddriv.cpp
+++ b/src/mame/audio/harddriv.cpp
@@ -432,8 +432,8 @@ void harddriv_sound_board_device::driversnd_dsp_io_map(address_map &map)
// device_add_mconfig - add device configuration
//-------------------------------------------------
-MACHINE_CONFIG_START(harddriv_sound_board_device::device_add_mconfig)
-
+void harddriv_sound_board_device::device_add_mconfig(machine_config &config)
+{
/* basic machine hardware */
M68000(config, m_soundcpu, 16_MHz_XTAL/2);
m_soundcpu->set_addrmap(AS_PROGRAM, &harddriv_sound_board_device::driversnd_68k_map);
@@ -455,9 +455,9 @@ MACHINE_CONFIG_START(harddriv_sound_board_device::device_add_mconfig)
/* sound hardware */
SPEAKER(config, "speaker").front_center();
- MCFG_DEVICE_ADD("dac", AM6012, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5) // ls374d.75e + ls374d.90e + am6012
+ 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.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);
-MACHINE_CONFIG_END
+}
diff --git a/src/mame/audio/midway.cpp b/src/mame/audio/midway.cpp
index 54b8aed7998..6ca374dcb3b 100644
--- a/src/mame/audio/midway.cpp
+++ b/src/mame/audio/midway.cpp
@@ -590,9 +590,10 @@ void midway_sounds_good_device::soundsgood_map(address_map &map)
// device_add_mconfig - add device configuration
//-------------------------------------------------
-MACHINE_CONFIG_START(midway_sounds_good_device::device_add_mconfig)
- MCFG_DEVICE_ADD("cpu", M68000, DERIVED_CLOCK(1, 2))
- MCFG_DEVICE_PROGRAM_MAP(soundsgood_map)
+void midway_sounds_good_device::device_add_mconfig(machine_config &config)
+{
+ M68000(config, m_cpu, DERIVED_CLOCK(1, 2));
+ m_cpu->set_addrmap(AS_PROGRAM, &midway_sounds_good_device::soundsgood_map);
PIA6821(config, m_pia, 0);
m_pia->writepa_handler().set(FUNC(midway_sounds_good_device::porta_w));
@@ -600,12 +601,12 @@ MACHINE_CONFIG_START(midway_sounds_good_device::device_add_mconfig)
m_pia->irqa_handler().set(FUNC(midway_sounds_good_device::irq_w));
m_pia->irqb_handler().set(FUNC(midway_sounds_good_device::irq_w));
- MCFG_DEVICE_ADD("dac", AD7533, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, *this, 1.0) /// ad7533jn.u10
+ AD7533(config, m_dac, 0).add_route(ALL_OUTPUTS, *this, 1.0); /// ad7533jn.u10
voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref"));
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);
-MACHINE_CONFIG_END
+}
//-------------------------------------------------
@@ -747,9 +748,10 @@ void midway_turbo_cheap_squeak_device::turbocs_map(address_map &map)
// device_add_mconfig - add device configuration
//-------------------------------------------------
-MACHINE_CONFIG_START(midway_turbo_cheap_squeak_device::device_add_mconfig)
- MCFG_DEVICE_ADD("cpu", MC6809E, DERIVED_CLOCK(1, 4))
- MCFG_DEVICE_PROGRAM_MAP(turbocs_map)
+void midway_turbo_cheap_squeak_device::device_add_mconfig(machine_config &config)
+{
+ MC6809E(config, m_cpu, DERIVED_CLOCK(1, 4));
+ m_cpu->set_addrmap(AS_PROGRAM, &midway_turbo_cheap_squeak_device::turbocs_map);
PIA6821(config, m_pia, 0);
m_pia->writepa_handler().set(FUNC(midway_turbo_cheap_squeak_device::porta_w));
@@ -757,12 +759,12 @@ MACHINE_CONFIG_START(midway_turbo_cheap_squeak_device::device_add_mconfig)
m_pia->irqa_handler().set(FUNC(midway_turbo_cheap_squeak_device::irq_w));
m_pia->irqb_handler().set(FUNC(midway_turbo_cheap_squeak_device::irq_w));
- MCFG_DEVICE_ADD("dac", AD7533, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, *this, 1.0)
+ AD7533(config, m_dac, 0).add_route(ALL_OUTPUTS, *this, 1.0);
voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref"));
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);
-MACHINE_CONFIG_END
+}
//-------------------------------------------------
diff --git a/src/mame/audio/nichisnd.cpp b/src/mame/audio/nichisnd.cpp
index 747a543e846..e4291b41342 100644
--- a/src/mame/audio/nichisnd.cpp
+++ b/src/mame/audio/nichisnd.cpp
@@ -78,7 +78,8 @@ static const z80_daisy_config daisy_chain[] =
-MACHINE_CONFIG_START(nichisnd_device::device_add_mconfig)
+void nichisnd_device::device_add_mconfig(machine_config &config)
+{
tmpz84c011_device& audiocpu(TMPZ84C011(config, "audiocpu", 8000000)); /* TMPZ84C011, 8.00 MHz */
audiocpu.set_daisy_config(daisy_chain);
audiocpu.set_addrmap(AS_PROGRAM, &nichisnd_device::nichisnd_map);
@@ -95,15 +96,15 @@ MACHINE_CONFIG_START(nichisnd_device::device_add_mconfig)
GENERIC_LATCH_8(config, m_soundlatch);
- MCFG_DEVICE_ADD("ymsnd", YM3812, 4000000)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
+ YM3812(config, "ymsnd", 4000000).add_route(ALL_OUTPUTS, "speaker", 1.0);
- MCFG_DEVICE_ADD("dac1", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.37) // unknown DAC
- MCFG_DEVICE_ADD("dac2", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.37) // unknown DAC
- MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
- MCFG_SOUND_ROUTE(0, "dac1", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE(0, "dac1", -1.0, DAC_VREF_NEG_INPUT)
- MCFG_SOUND_ROUTE(0, "dac2", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE(0, "dac2", -1.0, DAC_VREF_NEG_INPUT)
-MACHINE_CONFIG_END
+ DAC_8BIT_R2R(config, "dac1", 0).add_route(ALL_OUTPUTS, "speaker", 0.37); // unknown DAC
+ DAC_8BIT_R2R(config, "dac2", 0).add_route(ALL_OUTPUTS, "speaker", 0.37); // unknown DAC
+ voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref"));
+ vref.set_output(5.0);
+ 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);
+}
//-------------------------------------------------
diff --git a/src/mame/audio/s11c_bg.cpp b/src/mame/audio/s11c_bg.cpp
index a9f33ec8cf8..c94dd98ca43 100644
--- a/src/mame/audio/s11c_bg.cpp
+++ b/src/mame/audio/s11c_bg.cpp
@@ -58,32 +58,32 @@ void s11c_bg_device::data_w(uint8_t data)
m_pia40->write_portb(data);
}
-MACHINE_CONFIG_START(s11c_bg_device::device_add_mconfig)
- MCFG_DEVICE_ADD("bgcpu", MC6809E, XTAL(8'000'000) / 4) // MC68B09E
- MCFG_DEVICE_PROGRAM_MAP(s11c_bg_map)
+void s11c_bg_device::device_add_mconfig(machine_config &config)
+{
+ MC6809E(config, m_cpu, XTAL(8'000'000) / 4); // MC68B09E
+ m_cpu->set_addrmap(AS_PROGRAM, &s11c_bg_device::s11c_bg_map);
config.m_minimum_quantum = attotime::from_hz(50);
YM2151(config, m_ym2151, XTAL(3'579'545)); // "3.58 MHz" on schematics and parts list
m_ym2151->irq_handler().set(FUNC(s11c_bg_device::ym2151_irq_w));
m_ym2151->add_route(ALL_OUTPUTS, *this, 0.25);
- MCFG_DEVICE_ADD("dac", MC1408, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, *this, 0.25)
+ MC1408(config, "dac", 0).add_route(ALL_OUTPUTS, *this, 0.25);
voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref"));
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);
- MCFG_DEVICE_ADD("hc55516_bg", HC55516, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, *this, 0.5)
+ HC55516(config, m_hc55516, 0).add_route(ALL_OUTPUTS, *this, 0.5);
PIA6821(config, m_pia40, 0);
m_pia40->writepa_handler().set("dac", FUNC(dac_byte_interface::data_w));
m_pia40->writepb_handler().set(FUNC(s11c_bg_device::pia40_pb_w));
m_pia40->ca2_handler().set(m_ym2151, FUNC(ym2151_device::reset_w));
m_pia40->cb2_handler().set(FUNC(s11c_bg_device::pia40_cb2_w));
- m_pia40->irqa_handler().set_inputline("bgcpu", M6809_FIRQ_LINE);
- m_pia40->irqb_handler().set_inputline("bgcpu", INPUT_LINE_NMI);
-MACHINE_CONFIG_END
+ m_pia40->irqa_handler().set_inputline(m_cpu, M6809_FIRQ_LINE);
+ m_pia40->irqb_handler().set_inputline(m_cpu, INPUT_LINE_NMI);
+}
void s11c_bg_device::device_start()
{
diff --git a/src/mame/audio/williams.cpp b/src/mame/audio/williams.cpp
index c7efdbecf4e..87758db2d9c 100644
--- a/src/mame/audio/williams.cpp
+++ b/src/mame/audio/williams.cpp
@@ -176,9 +176,10 @@ void williams_cvsd_sound_device::williams_cvsd_map(address_map &map)
// device_add_mconfig - add device configuration
//-------------------------------------------------
-MACHINE_CONFIG_START(williams_cvsd_sound_device::device_add_mconfig)
- MCFG_DEVICE_ADD(m_cpu, MC6809E, CVSD_MASTER_CLOCK / 4)
- MCFG_DEVICE_PROGRAM_MAP(williams_cvsd_map)
+void williams_cvsd_sound_device::device_add_mconfig(machine_config &config)
+{
+ MC6809E(config, m_cpu, CVSD_MASTER_CLOCK / 4);
+ m_cpu->set_addrmap(AS_PROGRAM, &williams_cvsd_sound_device::williams_cvsd_map);
PIA6821(config, m_pia, 0);
m_pia->writepa_handler().set("dac", FUNC(dac_byte_interface::data_w));
@@ -198,7 +199,7 @@ MACHINE_CONFIG_START(williams_cvsd_sound_device::device_add_mconfig)
HC55516(config, m_hc55516, 0);
m_hc55516->add_route(ALL_OUTPUTS, *this, 0.60);
-MACHINE_CONFIG_END
+}
//-------------------------------------------------
@@ -512,9 +513,10 @@ MACHINE_CONFIG_START(williams_narc_sound_device::device_add_mconfig)
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)
+ voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref"));
+ vref.set_output(5.0);
+ vref.add_route(0, "dac1", 1.0, DAC_VREF_POS_INPUT); vref.add_route(0, "dac1", -1.0, DAC_VREF_NEG_INPUT);
+ vref.add_route(0, "dac2", 1.0, DAC_VREF_POS_INPUT); vref.add_route(0, "dac2", -1.0, DAC_VREF_NEG_INPUT);
MCFG_DEVICE_ADD("cvsd", HC55516, 0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, *this, 0.60)
diff --git a/src/mame/drivers/4004clk.cpp b/src/mame/drivers/4004clk.cpp
index e89a880e082..35afef0064f 100644
--- a/src/mame/drivers/4004clk.cpp
+++ b/src/mame/drivers/4004clk.cpp
@@ -134,8 +134,8 @@ void nixieclock_state::machine_start()
save_pointer(NAME(m_nixie), 6);
}
-MACHINE_CONFIG_START(nixieclock_state::_4004clk)
-
+void nixieclock_state::_4004clk(machine_config &config)
+{
/* basic machine hardware */
i4004_cpu_device &cpu(I4004(config, "maincpu", 5_MHz_XTAL / 8));
cpu.set_rom_map(&nixieclock_state::_4004clk_rom);
@@ -149,13 +149,14 @@ MACHINE_CONFIG_START(nixieclock_state::_4004clk)
/* sound hardware */
SPEAKER(config, "speaker").front_center();
- MCFG_DEVICE_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 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)
+ DAC_1BIT(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 0.25);
+ 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);
clock_device &clk(CLOCK(config, "clk", 60));
clk.signal_handler().set_inputline("maincpu", I4004_TEST_LINE);
-MACHINE_CONFIG_END
+}
/* ROM definition */
ROM_START( 4004clk )
diff --git a/src/mame/drivers/amstr_pc.cpp b/src/mame/drivers/amstr_pc.cpp
index 24580a058c5..5ef0dec8787 100644
--- a/src/mame/drivers/amstr_pc.cpp
+++ b/src/mame/drivers/amstr_pc.cpp
@@ -534,7 +534,8 @@ MACHINE_CONFIG_START(amstrad_pc_state::pc200)
PC_JOY(config, "pc_joy");
- MCFG_PC_KEYB_ADD("pc_keyboard", WRITELINE("mb:pic8259", pic8259_device, ir1_w))
+ PC_KEYB(config, m_keyboard);
+ m_keyboard->keypress().set("mb:pic8259", FUNC(pic8259_device::ir1_w));
/* internal ram */
RAM(config, m_ram).set_default_size("640K").set_extra_options("512K");
diff --git a/src/mame/drivers/applix.cpp b/src/mame/drivers/applix.cpp
index ebd59d5562c..5c36930b81f 100644
--- a/src/mame/drivers/applix.cpp
+++ b/src/mame/drivers/applix.cpp
@@ -880,9 +880,10 @@ MACHINE_CONFIG_START(applix_state::applix)
SPEAKER(config, "rspeaker").front_right();
MCFG_DEVICE_ADD("ldac", DAC0800, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0) // 74ls374.u20 + dac0800.u21 + 4052.u23
MCFG_DEVICE_ADD("rdac", DAC0800, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0) // 74ls374.u20 + dac0800.u21 + 4052.u23
- MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
- MCFG_SOUND_ROUTE(0, "ldac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE(0, "ldac", -1.0, DAC_VREF_NEG_INPUT)
- MCFG_SOUND_ROUTE(0, "rdac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE(0, "rdac", -1.0, DAC_VREF_NEG_INPUT)
+ voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref"));
+ vref.set_output(5.0);
+ vref.add_route(0, "ldac", 1.0, DAC_VREF_POS_INPUT); vref.add_route(0, "ldac", -1.0, DAC_VREF_NEG_INPUT);
+ vref.add_route(0, "rdac", 1.0, DAC_VREF_POS_INPUT); vref.add_route(0, "rdac", -1.0, DAC_VREF_NEG_INPUT);
WAVE(config, "wave", m_cass).add_route(ALL_OUTPUTS, "lspeaker", 0.50);
diff --git a/src/mame/drivers/armedf.cpp b/src/mame/drivers/armedf.cpp
index 959d098491a..1e31b5e770d 100644
--- a/src/mame/drivers/armedf.cpp
+++ b/src/mame/drivers/armedf.cpp
@@ -1266,9 +1266,10 @@ MACHINE_CONFIG_START(armedf_state::terraf_sound)
MCFG_DEVICE_ADD("dac1", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.8) // 10-pin SIP with 74HC374P latch
MCFG_DEVICE_ADD("dac2", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.8) // 10-pin SIP with 74HC374P latch
- 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)
+ voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref"));
+ vref.set_output(5.0);
+ 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);
MACHINE_CONFIG_END
MACHINE_CONFIG_START(armedf_state::terraf)
@@ -1344,9 +1345,10 @@ MACHINE_CONFIG_START(armedf_state::terrafjb)
MCFG_DEVICE_ADD("dac1", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.8) // unknown DAC
MCFG_DEVICE_ADD("dac2", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.8) // 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)
+ voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref"));
+ vref.set_output(5.0);
+ 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);
MACHINE_CONFIG_END
void armedf_state::terrafb(machine_config &config)
@@ -1424,9 +1426,10 @@ MACHINE_CONFIG_START(armedf_state::armedf)
MCFG_DEVICE_ADD("dac1", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5) // unknown DAC
MCFG_DEVICE_ADD("dac2", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5) // 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)
+ voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref"));
+ vref.set_output(5.0);
+ 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);
MACHINE_CONFIG_END
MACHINE_CONFIG_START(armedf_state::cclimbr2)
@@ -1470,9 +1473,10 @@ MACHINE_CONFIG_START(armedf_state::cclimbr2)
MCFG_DEVICE_ADD("dac1", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.4) // unknown DAC
MCFG_DEVICE_ADD("dac2", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.4) // 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)
+ voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref"));
+ vref.set_output(5.0);
+ 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);
MACHINE_CONFIG_END
MACHINE_CONFIG_START(armedf_state::legion_common)
@@ -1508,9 +1512,10 @@ MACHINE_CONFIG_START(armedf_state::legion_common)
MCFG_DEVICE_ADD("dac1", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.4) // 10-pin SIP with 74HC374P latch
MCFG_DEVICE_ADD("dac2", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.4) // 10-pin SIP with 74HC374P latch
- 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)
+ voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref"));
+ vref.set_output(5.0);
+ 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);
MACHINE_CONFIG_END
MACHINE_CONFIG_START(armedf_state::legion)
diff --git a/src/mame/drivers/asst128.cpp b/src/mame/drivers/asst128.cpp
index d2e0d97f365..f07914d5fe2 100644
--- a/src/mame/drivers/asst128.cpp
+++ b/src/mame/drivers/asst128.cpp
@@ -118,7 +118,7 @@ MACHINE_CONFIG_START(asst128_state::asst128)
MCFG_DEVICE_ADD("board0", ISA8_SLOT, 0, "mb:isa", pc_isa8_cards, "cga_mc1502", true)
MCFG_DEVICE_ADD("board1", ISA8_SLOT, 0, "mb:isa", pc_isa8_cards, "lpt", true)
- MCFG_PC_KBDC_SLOT_ADD("mb:pc_kbdc", "kbd", pc_xt_keyboards, STR_KBD_IBM_PC_XT_83)
+ PC_KBDC_SLOT(config, "kbd", pc_xt_keyboards, STR_KBD_IBM_PC_XT_83).set_pc_kbdc_slot(subdevice("mb:pc_kbdc"));
PC_FDC_XT(config, m_fdc, 0);
m_fdc->intrq_wr_callback().set("mb:pic8259", FUNC(pic8259_device::ir6_w));
diff --git a/src/mame/drivers/atari_s1.cpp b/src/mame/drivers/atari_s1.cpp
index 958fb13a8f1..bb765e75e9c 100644
--- a/src/mame/drivers/atari_s1.cpp
+++ b/src/mame/drivers/atari_s1.cpp
@@ -450,10 +450,11 @@ void atari_s1_state::machine_reset()
m_audiores = 0;
}
-MACHINE_CONFIG_START(atari_s1_state::atari_s1)
+void atari_s1_state::atari_s1(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M6800, MASTER_CLK)
- MCFG_DEVICE_PROGRAM_MAP(atari_s1_map)
+ M6800(config, m_maincpu, MASTER_CLK);
+ m_maincpu->set_addrmap(AS_PROGRAM, &atari_s1_state::atari_s1_map);
WATCHDOG_TIMER(config, "watchdog");
@@ -461,7 +462,7 @@ MACHINE_CONFIG_START(atari_s1_state::atari_s1)
genpin_audio(config);
SPEAKER(config, "speaker").front_center();
- MCFG_DEVICE_ADD("dac", DAC_4BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.3) // unknown DAC
+ DAC_4BIT_R2R(config, m_dac, 0).add_route(ALL_OUTPUTS, "speaker", 0.3); // unknown DAC
voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref"));
vref.set_output(5.0);
vref.add_route(0, "dac", 1.0, DAC_VREF_POS_INPUT);
@@ -472,19 +473,19 @@ MACHINE_CONFIG_START(atari_s1_state::atari_s1)
TIMER(config, "nmi").configure_periodic(FUNC(atari_s1_state::nmi), attotime::from_hz(NMI_INT));
TIMER(config, "timer_s").configure_periodic(FUNC(atari_s1_state::timer_s), attotime::from_hz(AUDIO_CLK));
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(atari_s1_state::atarians)
+void atari_s1_state::atarians(machine_config &config)
+{
atari_s1(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(atarians_map)
-MACHINE_CONFIG_END
+ m_maincpu->set_addrmap(AS_PROGRAM, &atari_s1_state::atarians_map);
+}
-MACHINE_CONFIG_START(atari_s1_state::midearth)
+void atari_s1_state::midearth(machine_config &config)
+{
atari_s1(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(midearth_map)
-MACHINE_CONFIG_END
+ m_maincpu->set_addrmap(AS_PROGRAM, &atari_s1_state::midearth_map);
+}
/*-------------------------------------------------------------------
/ The Atarians (11/1976)
diff --git a/src/mame/drivers/atari_s2.cpp b/src/mame/drivers/atari_s2.cpp
index e957af24698..2074d23a4e3 100644
--- a/src/mame/drivers/atari_s2.cpp
+++ b/src/mame/drivers/atari_s2.cpp
@@ -494,9 +494,8 @@ MACHINE_CONFIG_START(atari_s2_state::atari_s2)
MCFG_DEVICE_ADD("dac1", DAC_3BIT_BINARY_WEIGHTED, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.15) // r18-r20 (100k,47k,100k)
voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref"));
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);
- MCFG_SOUND_ROUTE(0, "dac1", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE(0, "dac1", -1.0, DAC_VREF_NEG_INPUT)
+ vref.add_route(0, "dac", 1.0, DAC_VREF_POS_INPUT); vref.add_route(0, "dac", -1.0, DAC_VREF_NEG_INPUT);
+ vref.add_route(0, "dac1", 1.0, DAC_VREF_POS_INPUT); vref.add_route(0, "dac1", -1.0, DAC_VREF_NEG_INPUT);
/* Video */
config.set_default_layout(layout_atari_s2);
diff --git a/src/mame/drivers/calchase.cpp b/src/mame/drivers/calchase.cpp
index c8303bb5c53..a918595c110 100644
--- a/src/mame/drivers/calchase.cpp
+++ b/src/mame/drivers/calchase.cpp
@@ -704,9 +704,10 @@ MACHINE_CONFIG_START(calchase_state::calchase)
SPEAKER(config, "rspeaker").front_right();
MCFG_DEVICE_ADD("ldac", DAC_12BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.25) // unknown DAC
MCFG_DEVICE_ADD("rdac", DAC_12BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.25) // unknown DAC
- MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
- MCFG_SOUND_ROUTE(0, "ldac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE(0, "ldac", -1.0, DAC_VREF_NEG_INPUT)
- MCFG_SOUND_ROUTE(0, "rdac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE(0, "rdac", -1.0, DAC_VREF_NEG_INPUT)
+ voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref"));
+ vref.set_output(5.0);
+ vref.add_route(0, "ldac", 1.0, DAC_VREF_POS_INPUT); vref.add_route(0, "ldac", -1.0, DAC_VREF_NEG_INPUT);
+ vref.add_route(0, "rdac", 1.0, DAC_VREF_POS_INPUT); vref.add_route(0, "rdac", -1.0, DAC_VREF_NEG_INPUT);
MACHINE_CONFIG_END
MACHINE_CONFIG_START(calchase_state::hostinv)
@@ -732,9 +733,10 @@ MACHINE_CONFIG_START(calchase_state::hostinv)
SPEAKER(config, "rspeaker").front_right();
MCFG_DEVICE_ADD("ldac", DAC_12BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.25) // unknown DAC
MCFG_DEVICE_ADD("rdac", DAC_12BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.25) // unknown DAC
- MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
- MCFG_SOUND_ROUTE(0, "ldac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE(0, "ldac", -1.0, DAC_VREF_NEG_INPUT)
- MCFG_SOUND_ROUTE(0, "rdac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE(0, "rdac", -1.0, DAC_VREF_NEG_INPUT)
+ voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref"));
+ vref.set_output(5.0);
+ vref.add_route(0, "ldac", 1.0, DAC_VREF_POS_INPUT); vref.add_route(0, "ldac", -1.0, DAC_VREF_NEG_INPUT);
+ vref.add_route(0, "rdac", 1.0, DAC_VREF_POS_INPUT); vref.add_route(0, "rdac", -1.0, DAC_VREF_NEG_INPUT);
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/cc40.cpp b/src/mame/drivers/cc40.cpp
index 7d88f1f7e1b..9ce088b6fd0 100644
--- a/src/mame/drivers/cc40.cpp
+++ b/src/mame/drivers/cc40.cpp
@@ -616,8 +616,9 @@ MACHINE_CONFIG_START(cc40_state::cc40)
/* sound hardware */
SPEAKER(config, "speaker").front_center();
MCFG_DEVICE_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 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)
+ 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);
/* cartridge */
MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "cc40_cart")
diff --git a/src/mame/drivers/cchasm.cpp b/src/mame/drivers/cchasm.cpp
index e238d3d1e82..2cae8d08d2c 100644
--- a/src/mame/drivers/cchasm.cpp
+++ b/src/mame/drivers/cchasm.cpp
@@ -186,9 +186,10 @@ MACHINE_CONFIG_START(cchasm_state::cchasm)
MCFG_DEVICE_ADD("dac1", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5)
MCFG_DEVICE_ADD("dac2", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5)
- 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, "dac2", 1.0, DAC_VREF_POS_INPUT)
+ voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref"));
+ vref.set_output(5.0);
+ vref.add_route(0, "dac1", 1.0, DAC_VREF_POS_INPUT);
+ vref.add_route(0, "dac2", 1.0, DAC_VREF_POS_INPUT);
/* 6840 PTM */
ptm6840_device &ptm(PTM6840(config, "6840ptm", CCHASM_68K_CLOCK/10));
diff --git a/src/mame/drivers/champbas.cpp b/src/mame/drivers/champbas.cpp
index 90915cc8d76..52ffaca1202 100644
--- a/src/mame/drivers/champbas.cpp
+++ b/src/mame/drivers/champbas.cpp
@@ -729,9 +729,10 @@ MACHINE_CONFIG_START(exctsccr_state::exctsccr)
MCFG_DEVICE_ADD("dac1", DAC_6BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.3) // unknown DAC
MCFG_DEVICE_ADD("dac2", DAC_6BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.3) // 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)
+ voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref"));
+ vref.set_output(5.0);
+ 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);
MACHINE_CONFIG_END
/* Bootleg running on a modified Champion Baseball board */
diff --git a/src/mame/drivers/circusc.cpp b/src/mame/drivers/circusc.cpp
index 2dc7bbfb542..ede53ac5e66 100644
--- a/src/mame/drivers/circusc.cpp
+++ b/src/mame/drivers/circusc.cpp
@@ -388,8 +388,9 @@ MACHINE_CONFIG_START(circusc_state::circusc)
MCFG_SOUND_ROUTE(0, "fltdisc", 1.0, 1)
MCFG_DEVICE_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(0, "fltdisc", 1.0, 2) // ls374.7g + r44+r45+r47+r48+r50+r56+r57+r58+r59 (20k) + r46+r49+r51+r52+r53+r54+r55 (10k) + upc324.3h
- MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
- MCFG_SOUND_ROUTE(0, "dac", 1.0, DAC_VREF_POS_INPUT)
+ 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);
MCFG_DEVICE_ADD("fltdisc", DISCRETE, circusc_discrete)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
diff --git a/src/mame/drivers/ckz80.cpp b/src/mame/drivers/ckz80.cpp
index dcbb7543bb4..d2dd6ae0f92 100644
--- a/src/mame/drivers/ckz80.cpp
+++ b/src/mame/drivers/ckz80.cpp
@@ -433,11 +433,11 @@ INPUT_PORTS_END
Machine Drivers
******************************************************************************/
-MACHINE_CONFIG_START(ckz80_state::master)
-
+void ckz80_state::master(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, 8_MHz_XTAL/2)
- MCFG_DEVICE_PROGRAM_MAP(master_trampoline)
+ Z80(config, m_maincpu, 8_MHz_XTAL/2);
+ m_maincpu->set_addrmap(AS_PROGRAM, &ckz80_state::master_trampoline);
ADDRESS_MAP_BANK(config, "master_map").set_map(&ckz80_state::master_map).set_options(ENDIANNESS_LITTLE, 8, 16);
const attotime irq_period = attotime::from_hz(429); // theoretical frequency from 555 timer (22nF, 150K, 1K5), measurement was 418Hz
@@ -450,12 +450,12 @@ MACHINE_CONFIG_START(ckz80_state::master)
/* sound hardware */
SPEAKER(config, "speaker").front_center();
- MCFG_DEVICE_ADD("dac", DAC_2BIT_BINARY_WEIGHTED_ONES_COMPLEMENT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25)
+ DAC_2BIT_BINARY_WEIGHTED_ONES_COMPLEMENT(config, m_dac, 0).add_route(ALL_OUTPUTS, "speaker", 0.25);
voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref"));
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);
-MACHINE_CONFIG_END
+}
diff --git a/src/mame/drivers/coco12.cpp b/src/mame/drivers/coco12.cpp
index 1a195c299e1..19a4ac28818 100644
--- a/src/mame/drivers/coco12.cpp
+++ b/src/mame/drivers/coco12.cpp
@@ -381,22 +381,22 @@ void t4426_cart(device_slot_interface &device)
// MACHINE_CONFIG_START( coco_sound )
//-------------------------------------------------
-MACHINE_CONFIG_START(coco_state::coco_sound)
+void coco_state::coco_sound(machine_config &config)
+{
SPEAKER(config, "speaker").front_center();
// 6-bit D/A: R10-15 = 10K, 20K, 40.2K, 80.6K, 162K, 324K (according to parts list); output also controls joysticks
- MCFG_DEVICE_ADD("dac", DAC_6BIT_BINARY_WEIGHTED, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.125)
+ DAC_6BIT_BINARY_WEIGHTED(config, m_dac, 0).add_route(ALL_OUTPUTS, "speaker", 0.125);
voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref"));
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);
- MCFG_SOUND_ROUTE(0, "sbs", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE(0, "sbs", -1.0, DAC_VREF_NEG_INPUT)
+ vref.add_route(0, "dac", 1.0, DAC_VREF_POS_INPUT); vref.add_route(0, "dac", -1.0, DAC_VREF_NEG_INPUT);
+ vref.add_route(0, "sbs", 1.0, DAC_VREF_POS_INPUT); vref.add_route(0, "sbs", -1.0, DAC_VREF_NEG_INPUT);
// Single-bit sound: R22 = 10K
DAC_1BIT(config, "sbs", 0).add_route(ALL_OUTPUTS, "speaker", 0.125);
WAVE(config, "wave", "cassette").add_route(ALL_OUTPUTS, "speaker", 0.25);
-MACHINE_CONFIG_END
+}
//-------------------------------------------------
diff --git a/src/mame/drivers/compc.cpp b/src/mame/drivers/compc.cpp
index 17debf68727..a13dc96603f 100644
--- a/src/mame/drivers/compc.cpp
+++ b/src/mame/drivers/compc.cpp
@@ -220,11 +220,12 @@ void compc_state::compciii_io(address_map &map)
map(0x0060, 0x0063).rw(FUNC(compc_state::pioiii_r), FUNC(compc_state::pioiii_w));
}
-MACHINE_CONFIG_START(compc_state::compc)
- MCFG_DEVICE_ADD("maincpu", I8088, 4772720*2)
- MCFG_DEVICE_PROGRAM_MAP(compc_map)
- MCFG_DEVICE_IO_MAP(compc_io)
- MCFG_DEVICE_IRQ_ACKNOWLEDGE_DEVICE("mb:pic8259", pic8259_device, inta_cb)
+void compc_state::compc(machine_config &config)
+{
+ I8088(config, m_maincpu, 4772720*2);
+ m_maincpu->set_addrmap(AS_PROGRAM, &compc_state::compc_map);
+ m_maincpu->set_addrmap(AS_IO, &compc_state::compc_io);
+ m_maincpu->set_irq_acknowledge_callback("mb:pic8259", FUNC(pic8259_device::inta_cb));
PCNOPPI_MOTHERBOARD(config, "mb", 0).set_cputag(m_maincpu);
config.device_remove("mb:pit8253");
@@ -237,25 +238,26 @@ MACHINE_CONFIG_START(compc_state::compc)
pit.out_handler<2>().set(m_mb, FUNC(ibm5160_mb_device::pc_pit8253_out2_changed));
// FIXME: determine ISA bus clock
- MCFG_DEVICE_ADD("isa1", ISA8_SLOT, 0, "mb:isa", pc_isa8_cards, "mda", false)
- MCFG_DEVICE_ADD("isa2", ISA8_SLOT, 0, "mb:isa", pc_isa8_cards, "lpt", false)
- MCFG_DEVICE_ADD("isa3", ISA8_SLOT, 0, "mb:isa", pc_isa8_cards, "com", false)
- MCFG_DEVICE_ADD("isa4", ISA8_SLOT, 0, "mb:isa", pc_isa8_cards, "fdc_xt", false)
+ ISA8_SLOT(config, "isa1", 0, "mb:isa", pc_isa8_cards, "mda", false);
+ ISA8_SLOT(config, "isa2", 0, "mb:isa", pc_isa8_cards, "lpt", false);
+ ISA8_SLOT(config, "isa3", 0, "mb:isa", pc_isa8_cards, "com", false);
+ ISA8_SLOT(config, "isa4", 0, "mb:isa", pc_isa8_cards, "fdc_xt", false);
- MCFG_PC_KEYB_ADD("pc_keyboard", WRITELINE("mb:pic8259", pic8259_device, ir1_w))
+ PC_KEYB(config, m_keyboard);
+ m_keyboard->keypress().set("mb:pic8259", FUNC(pic8259_device::ir1_w));
/* internal ram */
RAM(config, RAM_TAG).set_default_size("256K").set_extra_options("512K, 640K");
/* software lists */
SOFTWARE_LIST(config, "disk_list").set_original("ibm5150");
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(compc_state::pc10iii)
+void compc_state::pc10iii(machine_config &config)
+{
compc(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_IO_MAP(compciii_io)
-MACHINE_CONFIG_END
+ m_maincpu->set_addrmap(AS_IO, &compc_state::compciii_io);
+}
ROM_START(compc10)
ROM_REGION(0x10000, "bios", 0)
diff --git a/src/mame/drivers/ct486.cpp b/src/mame/drivers/ct486.cpp
index 7dc9a8471d1..c9ed963917e 100644
--- a/src/mame/drivers/ct486.cpp
+++ b/src/mame/drivers/ct486.cpp
@@ -139,10 +139,10 @@ MACHINE_CONFIG_START(ct486_state::ct486)
keybc.kbd_clk().set("pc_kbdc", FUNC(pc_kbdc_device::clock_write_from_mb));
keybc.kbd_data().set("pc_kbdc", FUNC(pc_kbdc_device::data_write_from_mb));
- MCFG_DEVICE_ADD("pc_kbdc", PC_KBDC, 0)
- MCFG_PC_KBDC_OUT_CLOCK_CB(WRITELINE("keybc", at_kbc_device_base, kbd_clk_w))
- MCFG_PC_KBDC_OUT_DATA_CB(WRITELINE("keybc", at_kbc_device_base, kbd_data_w))
- MCFG_PC_KBDC_SLOT_ADD("pc_kbdc", "kbd", pc_at_keyboards, STR_KBD_MICROSOFT_NATURAL)
+ pc_kbdc_device &pc_kbdc(PC_KBDC(config, "pc_kbdc", 0));
+ pc_kbdc.out_clock_cb().set(keybc, FUNC(at_kbc_device_base::kbd_clk_w));
+ pc_kbdc.out_data_cb().set(keybc, FUNC(at_kbc_device_base::kbd_data_w));
+ PC_KBDC_SLOT(config, "kbd", pc_at_keyboards, STR_KBD_MICROSOFT_NATURAL).set_pc_kbdc_slot(&pc_kbdc);
ISA16(config, m_isabus, 0);
m_isabus->set_memspace(m_maincpu, AS_PROGRAM);
diff --git a/src/mame/drivers/cxgz80.cpp b/src/mame/drivers/cxgz80.cpp
index 07bb6909e65..64bfddffba4 100644
--- a/src/mame/drivers/cxgz80.cpp
+++ b/src/mame/drivers/cxgz80.cpp
@@ -397,7 +397,8 @@ INPUT_PORTS_END
Machine Drivers
******************************************************************************/
-MACHINE_CONFIG_START(cxgz80_state::ch2001)
+void cxgz80_state::ch2001(machine_config &config)
+{
/* basic machine hardware */
Z80(config, m_maincpu, 8_MHz_XTAL/2);
m_maincpu->set_addrmap(AS_PROGRAM, &cxgz80_state::ch2001_map);
@@ -414,10 +415,11 @@ MACHINE_CONFIG_START(cxgz80_state::ch2001)
/* sound hardware */
SPEAKER(config, "speaker").front_center();
- MCFG_DEVICE_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 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)
-MACHINE_CONFIG_END
+ DAC_1BIT(config, m_dac, 0).add_route(ALL_OUTPUTS, "speaker", 0.25);
+ voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref"));
+ vref.set_output(5.0);
+ vref.add_route(0, "dac", 1.0, DAC_VREF_POS_INPUT);
+}
diff --git a/src/mame/drivers/cyberbal.cpp b/src/mame/drivers/cyberbal.cpp
index 172eda403d4..850cb8dbf1f 100644
--- a/src/mame/drivers/cyberbal.cpp
+++ b/src/mame/drivers/cyberbal.cpp
@@ -392,8 +392,8 @@ GFXDECODE_END
*
*************************************/
-MACHINE_CONFIG_START(cyberbal_state::cyberbal_base)
-
+void cyberbal_state::cyberbal_base(machine_config &config)
+{
/* basic machine hardware */
M68000(config, m_maincpu, ATARI_CLOCK_14MHz/2);
m_maincpu->set_addrmap(AS_PROGRAM, &cyberbal_state::main_map);
@@ -405,9 +405,9 @@ MACHINE_CONFIG_START(cyberbal_state::cyberbal_base)
M68000(config, m_extracpu, ATARI_CLOCK_14MHz/2);
m_extracpu->set_addrmap(AS_PROGRAM, &cyberbal_state::extra_map);
- MCFG_DEVICE_ADD("dac", M68000, ATARI_CLOCK_14MHz/2)
- MCFG_DEVICE_PROGRAM_MAP(sound_68k_map)
- MCFG_DEVICE_PERIODIC_INT_DRIVER(cyberbal_state, sound_68k_irq_gen, 10000)
+ M68000(config, m_daccpu, ATARI_CLOCK_14MHz/2);
+ m_daccpu->set_addrmap(AS_PROGRAM, &cyberbal_state::sound_68k_map);
+ m_daccpu->set_periodic_int(FUNC(cyberbal_state::sound_68k_irq_gen), attotime::from_hz(10000));
config.m_minimum_quantum = attotime::from_hz(600);
@@ -471,7 +471,7 @@ MACHINE_CONFIG_START(cyberbal_state::cyberbal_base)
vref.add_route(0, "rdac", -1.0, DAC_VREF_NEG_INPUT);
vref.add_route(0, "ldac", 1.0, DAC_VREF_POS_INPUT);
vref.add_route(0, "ldac", -1.0, DAC_VREF_NEG_INPUT);
-MACHINE_CONFIG_END
+}
void cyberbal_state::cyberbal(machine_config &config)
{
diff --git a/src/mame/drivers/dectalk.cpp b/src/mame/drivers/dectalk.cpp
index 56dbc431f37..aa5cc8696d9 100644
--- a/src/mame/drivers/dectalk.cpp
+++ b/src/mame/drivers/dectalk.cpp
@@ -876,10 +876,11 @@ TIMER_CALLBACK_MEMBER(dectalk_state::outfifo_read_cb)
m_duart->duart_rx_break(1, 0);*/
}
-MACHINE_CONFIG_START(dectalk_state::dectalk)
+void dectalk_state::dectalk(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M68000, XTAL(20'000'000)/2) /* E74 20MHz OSC (/2) */
- MCFG_DEVICE_PROGRAM_MAP(m68k_mem)
+ M68000(config, m_maincpu, XTAL(20'000'000)/2); /* E74 20MHz OSC (/2) */
+ m_maincpu->set_addrmap(AS_PROGRAM, &dectalk_state::m68k_mem);
SCN2681(config, m_duart, XTAL(3'686'400)); // MC2681 DUART ; Y3 3.6864MHz xtal */
m_duart->irq_cb().set(FUNC(dectalk_state::duart_irq_handler));
@@ -905,7 +906,7 @@ MACHINE_CONFIG_START(dectalk_state::dectalk)
/* sound hardware */
SPEAKER(config, "speaker").front_center();
- MCFG_DEVICE_ADD("dac", AD7541, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.9) // ad7541.e107 (E88 10KHz OSC, handled by timer)
+ AD7541(config, m_dac, 0).add_route(ALL_OUTPUTS, "speaker", 0.9); // ad7541.e107 (E88 10KHz OSC, handled by timer)
voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref"));
vref.set_output(5.0);
vref.add_route(0, "dac", 1.0, DAC_VREF_POS_INPUT);
@@ -915,7 +916,7 @@ MACHINE_CONFIG_START(dectalk_state::dectalk)
rs232_port_device &rs232(RS232_PORT(config, "rs232", default_rs232_devices, "terminal"));
rs232.rxd_handler().set(m_duart, FUNC(scn2681_device::rx_b_w));
-MACHINE_CONFIG_END
+}
diff --git a/src/mame/drivers/ec184x.cpp b/src/mame/drivers/ec184x.cpp
index a944c91a1ff..f07609fab76 100644
--- a/src/mame/drivers/ec184x.cpp
+++ b/src/mame/drivers/ec184x.cpp
@@ -242,7 +242,7 @@ MACHINE_CONFIG_START(ec184x_state::ec1840)
SOFTWARE_LIST(config, "flop_list").set_original("ec1841");
- MCFG_PC_KBDC_SLOT_ADD("mb:pc_kbdc", "kbd", pc_xt_keyboards, STR_KBD_EC_1841)
+ PC_KBDC_SLOT(config, "kbd", pc_xt_keyboards, STR_KBD_EC_1841).set_pc_kbdc_slot(subdevice("mb:pc_kbdc"));
RAM(config, m_ram).set_default_size("512K");
MACHINE_CONFIG_END
@@ -267,7 +267,7 @@ MACHINE_CONFIG_START(ec184x_state::ec1841)
SOFTWARE_LIST(config, "flop_list").set_original("ec1841");
- MCFG_PC_KBDC_SLOT_ADD("mb:pc_kbdc", "kbd", pc_xt_keyboards, STR_KBD_EC_1841)
+ PC_KBDC_SLOT(config, "kbd", pc_xt_keyboards, STR_KBD_EC_1841).set_pc_kbdc_slot(subdevice("mb:pc_kbdc"));
RAM(config, m_ram).set_default_size("640K").set_extra_options("512K,1024K,1576K,2048K");
MACHINE_CONFIG_END
@@ -289,7 +289,7 @@ MACHINE_CONFIG_START(ec184x_state::ec1847)
MCFG_DEVICE_ADD("isa5", ISA8_SLOT, 0, "mb:isa", pc_isa8_cards, nullptr, false)
MCFG_DEVICE_ADD("isa6", ISA8_SLOT, 0, "mb:isa", pc_isa8_cards, nullptr, false)
- MCFG_PC_KBDC_SLOT_ADD("mb:pc_kbdc", "kbd", pc_xt_keyboards, STR_KBD_KEYTRONIC_PC3270)
+ PC_KBDC_SLOT(config, "kbd", pc_xt_keyboards, STR_KBD_KEYTRONIC_PC3270).set_pc_kbdc_slot(subdevice("mb:pc_kbdc"));
RAM(config, m_ram).set_default_size("640K");
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/europc.cpp b/src/mame/drivers/europc.cpp
index e53178a8289..0b809265a0d 100644
--- a/src/mame/drivers/europc.cpp
+++ b/src/mame/drivers/europc.cpp
@@ -552,22 +552,21 @@ static void europc_fdc(device_slot_interface &device)
}
//Euro PC
-MACHINE_CONFIG_START(europc_pc_state::europc)
- MCFG_DEVICE_ADD("maincpu", I8088, 4772720*2)
- MCFG_DEVICE_PROGRAM_MAP(europc_map)
- MCFG_DEVICE_IO_MAP(europc_io)
- MCFG_DEVICE_IRQ_ACKNOWLEDGE_DEVICE("mb:pic8259", pic8259_device, inta_cb)
+void europc_pc_state::europc(machine_config &config)
+{
+ I8088(config, m_maincpu, 4772720*2);
+ m_maincpu->set_addrmap(AS_PROGRAM, &europc_pc_state::europc_map);
+ m_maincpu->set_addrmap(AS_IO, &europc_pc_state::europc_io);
+ m_maincpu->set_irq_acknowledge_callback("mb:pic8259", FUNC(pic8259_device::inta_cb));
PCNOPPI_MOTHERBOARD(config, "mb", 0).set_cputag(m_maincpu);
- MCFG_DEVICE_ADD("isa1", ISA8_SLOT, 0, "mb:isa", pc_isa8_cards, "aga", false) // FIXME: determine ISA bus clock
- MCFG_DEVICE_ADD("isa2", ISA8_SLOT, 0, "mb:isa", pc_isa8_cards, "lpt", false)
- MCFG_SLOT_FIXED(true)
- MCFG_DEVICE_ADD("isa3", ISA8_SLOT, 0, "mb:isa", pc_isa8_cards, "com", false)
- MCFG_SLOT_FIXED(true)
- MCFG_DEVICE_ADD("isa4", ISA8_SLOT, 0, "mb:isa", europc_fdc, "fdc", false)
- MCFG_SLOT_FIXED(true)
- MCFG_PC_KEYB_ADD("pc_keyboard", WRITELINE("mb:pic8259", pic8259_device, ir1_w))
+ ISA8_SLOT(config, "isa1", 0, "mb:isa", pc_isa8_cards, "aga", false); // FIXME: determine ISA bus clock
+ ISA8_SLOT(config, "isa2", 0, "mb:isa", pc_isa8_cards, "lpt", true);
+ ISA8_SLOT(config, "isa3", 0, "mb:isa", pc_isa8_cards, "com", true);
+ ISA8_SLOT(config, "isa4", 0, "mb:isa", europc_fdc, "fdc", true);
+ PC_KEYB(config, m_keyboard);
+ m_keyboard->keypress().set("mb:pic8259", FUNC(pic8259_device::ir1_w));
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);;
@@ -577,7 +576,7 @@ MACHINE_CONFIG_START(europc_pc_state::europc)
/* software lists */
SOFTWARE_LIST(config, "disk_list").set_original("ibm5150");
-MACHINE_CONFIG_END
+}
//Euro PC II
void europc_pc_state::europc2(machine_config &config)
diff --git a/src/mame/drivers/exterm.cpp b/src/mame/drivers/exterm.cpp
index fd3d05790eb..c02dd2bb8f7 100644
--- a/src/mame/drivers/exterm.cpp
+++ b/src/mame/drivers/exterm.cpp
@@ -418,8 +418,9 @@ MACHINE_CONFIG_START(exterm_state::exterm)
MCFG_DEVICE_ADD("dac", AD7528, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.4) // ad7528j.e2
MCFG_DEVICE_ADD("dacvol", AD7528, 0) // ad7528j.e2
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)
+ voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref"));
+ vref.set_output(5.0);
+ vref.add_route(0, "dacvol", 1.0, DAC_VREF_POS_INPUT);
YM2151(config, m_ym2151, 4000000).add_route(ALL_OUTPUTS, "speaker", 1.0);
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/fidel68k.cpp b/src/mame/drivers/fidel68k.cpp
index c7ae6a81799..99e3e1f959c 100644
--- a/src/mame/drivers/fidel68k.cpp
+++ b/src/mame/drivers/fidel68k.cpp
@@ -585,8 +585,9 @@ MACHINE_CONFIG_START(fidel68k_state::fex68k)
/* sound hardware */
SPEAKER(config, "speaker").front_center();
MCFG_DEVICE_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 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)
+ 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);
MACHINE_CONFIG_END
MACHINE_CONFIG_START(fidel68k_state::fex68km2)
@@ -623,8 +624,9 @@ MACHINE_CONFIG_START(fidel68k_state::fdes2265)
/* sound hardware */
SPEAKER(config, "speaker").front_center();
MCFG_DEVICE_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 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)
+ 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);
MACHINE_CONFIG_END
MACHINE_CONFIG_START(fidel68k_state::fdes2325)
@@ -656,8 +658,9 @@ MACHINE_CONFIG_START(fidel68k_state::eag_base)
/* sound hardware */
SPEAKER(config, "speaker").front_center();
MCFG_DEVICE_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 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)
+ 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);
/* cartridge */
MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "fidel_scc")
diff --git a/src/mame/drivers/fidelmcs48.cpp b/src/mame/drivers/fidelmcs48.cpp
index 267f14eaa61..f68d968c82c 100644
--- a/src/mame/drivers/fidelmcs48.cpp
+++ b/src/mame/drivers/fidelmcs48.cpp
@@ -149,8 +149,8 @@ INPUT_PORTS_END
Machine Drivers
******************************************************************************/
-MACHINE_CONFIG_START(fidelmcs48_state::sc6)
-
+void fidelmcs48_state::sc6(machine_config &config)
+{
/* basic machine hardware */
i8040_device &maincpu(I8040(config, m_maincpu, 11_MHz_XTAL));
maincpu.set_addrmap(AS_PROGRAM, &fidelmcs48_state::sc6_map);
@@ -165,10 +165,11 @@ MACHINE_CONFIG_START(fidelmcs48_state::sc6)
/* sound hardware */
SPEAKER(config, "speaker").front_center();
- MCFG_DEVICE_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 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)
-MACHINE_CONFIG_END
+ DAC_1BIT(config, m_dac, 0).add_route(ALL_OUTPUTS, "speaker", 0.25);
+ 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/drivers/galeb.cpp b/src/mame/drivers/galeb.cpp
index 78db98130ed..590d39b128d 100644
--- a/src/mame/drivers/galeb.cpp
+++ b/src/mame/drivers/galeb.cpp
@@ -186,8 +186,9 @@ MACHINE_CONFIG_START(galeb_state::galeb)
/* audio hardware */
SPEAKER(config, "speaker").front_center();
MCFG_DEVICE_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.0625) // 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)
+ 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);
MACHINE_CONFIG_END
/* ROM definition */
diff --git a/src/mame/drivers/galivan.cpp b/src/mame/drivers/galivan.cpp
index b752b5c836b..a2dbc99460f 100644
--- a/src/mame/drivers/galivan.cpp
+++ b/src/mame/drivers/galivan.cpp
@@ -472,9 +472,10 @@ MACHINE_CONFIG_START(galivan_state::galivan)
MCFG_DEVICE_ADD("dac1", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) // unknown DAC
MCFG_DEVICE_ADD("dac2", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) // 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)
+ voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref"));
+ vref.set_output(5.0);
+ 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);
MACHINE_CONFIG_END
MACHINE_CONFIG_START(dangarj_state::dangarj)
@@ -530,9 +531,10 @@ MACHINE_CONFIG_START(galivan_state::ninjemak)
MCFG_DEVICE_ADD("dac1", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) // unknown DAC
MCFG_DEVICE_ADD("dac2", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) // 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)
+ voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref"));
+ vref.set_output(5.0);
+ 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);
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/gamecom.cpp b/src/mame/drivers/gamecom.cpp
index ddfd03de7e6..061f986a0a5 100644
--- a/src/mame/drivers/gamecom.cpp
+++ b/src/mame/drivers/gamecom.cpp
@@ -287,10 +287,9 @@ MACHINE_CONFIG_START(gamecom_state::gamecom)
MCFG_DEVICE_ADD("dac1", DAC_4BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.05) // unknown DAC (Frequency modulation)
voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref"));
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);
- MCFG_SOUND_ROUTE(0, "dac0", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE(0, "dac0", -1.0, DAC_VREF_NEG_INPUT)
- MCFG_SOUND_ROUTE(0, "dac1", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE(0, "dac1", -1.0, DAC_VREF_NEG_INPUT)
+ vref.add_route(0, "dac", 1.0, DAC_VREF_POS_INPUT); vref.add_route(0, "dac", -1.0, DAC_VREF_NEG_INPUT);
+ vref.add_route(0, "dac0", 1.0, DAC_VREF_POS_INPUT); vref.add_route(0, "dac0", -1.0, DAC_VREF_NEG_INPUT);
+ vref.add_route(0, "dac1", 1.0, DAC_VREF_POS_INPUT); vref.add_route(0, "dac1", -1.0, DAC_VREF_NEG_INPUT);
/* cartridge */
MCFG_GENERIC_CARTSLOT_ADD("cartslot1", generic_linear_slot, "gamecom_cart")
diff --git a/src/mame/drivers/gba.cpp b/src/mame/drivers/gba.cpp
index 272d438fdf2..53a12ba2ab8 100644
--- a/src/mame/drivers/gba.cpp
+++ b/src/mame/drivers/gba.cpp
@@ -1452,11 +1452,12 @@ MACHINE_CONFIG_START(gba_state::gbadv)
MCFG_DEVICE_ADD("rdaca", DAC_8BIT_R2R_TWOS_COMPLEMENT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.5) // unknown DAC
MCFG_DEVICE_ADD("ldacb", DAC_8BIT_R2R_TWOS_COMPLEMENT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.5) // unknown DAC
MCFG_DEVICE_ADD("rdacb", DAC_8BIT_R2R_TWOS_COMPLEMENT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.5) // unknown DAC
- MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
- MCFG_SOUND_ROUTE(0, "ldaca", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE(0, "ldaca", -1.0, DAC_VREF_NEG_INPUT)
- MCFG_SOUND_ROUTE(0, "rdaca", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE(0, "rdaca", -1.0, DAC_VREF_NEG_INPUT)
- MCFG_SOUND_ROUTE(0, "ldacb", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE(0, "ldacb", -1.0, DAC_VREF_NEG_INPUT)
- MCFG_SOUND_ROUTE(0, "rdacb", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE(0, "rdacb", -1.0, DAC_VREF_NEG_INPUT)
+ voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref", 0));
+ vref.set_output(5.0);
+ vref.add_route(0, "ldaca", 1.0, DAC_VREF_POS_INPUT); vref.add_route(0, "ldaca", -1.0, DAC_VREF_NEG_INPUT);
+ vref.add_route(0, "rdaca", 1.0, DAC_VREF_POS_INPUT); vref.add_route(0, "rdaca", -1.0, DAC_VREF_NEG_INPUT);
+ vref.add_route(0, "ldacb", 1.0, DAC_VREF_POS_INPUT); vref.add_route(0, "ldacb", -1.0, DAC_VREF_NEG_INPUT);
+ vref.add_route(0, "rdacb", 1.0, DAC_VREF_POS_INPUT); vref.add_route(0, "rdacb", -1.0, DAC_VREF_NEG_INPUT);
GBA_CART_SLOT(config, m_cart, gba_cart, nullptr);
SOFTWARE_LIST(config, "cart_list").set_original("gba");
diff --git a/src/mame/drivers/gei.cpp b/src/mame/drivers/gei.cpp
index 9f835ec7cc8..2a403be5089 100644
--- a/src/mame/drivers/gei.cpp
+++ b/src/mame/drivers/gei.cpp
@@ -1011,8 +1011,9 @@ MACHINE_CONFIG_START(gei_state::getrivia)
/* sound hardware */
SPEAKER(config, "speaker").front_center();
MCFG_DEVICE_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.99)
- MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
- MCFG_SOUND_ROUTE(0, "dac", 1.0, DAC_VREF_POS_INPUT)
+ 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);
MACHINE_CONFIG_END
MACHINE_CONFIG_START(gei_state::findout)
diff --git a/src/mame/drivers/genpc.cpp b/src/mame/drivers/genpc.cpp
index 316235cc1f0..39118e5dfc7 100644
--- a/src/mame/drivers/genpc.cpp
+++ b/src/mame/drivers/genpc.cpp
@@ -71,7 +71,7 @@ MACHINE_CONFIG_START(genpc_state::pcmda)
MCFG_DEVICE_ADD("isa6", ISA8_SLOT, 0, "mb:isa", pc_isa8_cards, nullptr, false)
/* keyboard */
- MCFG_PC_KBDC_SLOT_ADD("mb:pc_kbdc", "kbd", pc_xt_keyboards, STR_KBD_IBM_PC_XT_83)
+ PC_KBDC_SLOT(config, "kbd", pc_xt_keyboards, STR_KBD_IBM_PC_XT_83).set_pc_kbdc_slot(subdevice("mb:pc_kbdc"));
/* internal ram */
RAM(config, RAM_TAG).set_default_size("640K").set_extra_options("64K, 128K, 256K, 512K");
diff --git a/src/mame/drivers/gp32.cpp b/src/mame/drivers/gp32.cpp
index 86e3130165e..e8232aea7ca 100644
--- a/src/mame/drivers/gp32.cpp
+++ b/src/mame/drivers/gp32.cpp
@@ -1690,9 +1690,10 @@ MACHINE_CONFIG_START(gp32_state::gp32)
SPEAKER(config, "rspeaker").front_right();
MCFG_DEVICE_ADD("ldac", DAC_16BIT_R2R_TWOS_COMPLEMENT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0) // unknown DAC
MCFG_DEVICE_ADD("rdac", DAC_16BIT_R2R_TWOS_COMPLEMENT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0) // unknown DAC
- MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
- MCFG_SOUND_ROUTE(0, "ldac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE(0, "ldac", -1.0, DAC_VREF_NEG_INPUT)
- MCFG_SOUND_ROUTE(0, "rdac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE(0, "rdac", -1.0, DAC_VREF_NEG_INPUT)
+ voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref"));
+ vref.set_output(5.0);
+ vref.add_route(0, "ldac", 1.0, DAC_VREF_POS_INPUT); vref.add_route(0, "ldac", -1.0, DAC_VREF_NEG_INPUT);
+ vref.add_route(0, "rdac", 1.0, DAC_VREF_POS_INPUT); vref.add_route(0, "rdac", -1.0, DAC_VREF_NEG_INPUT);
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_1);
diff --git a/src/mame/drivers/hapyfish.cpp b/src/mame/drivers/hapyfish.cpp
index 541e7c9c3ec..c31dfd28921 100644
--- a/src/mame/drivers/hapyfish.cpp
+++ b/src/mame/drivers/hapyfish.cpp
@@ -259,9 +259,10 @@ MACHINE_CONFIG_START(hapyfish_state::hapyfish)
SPEAKER(config, "rspeaker").front_right();
MCFG_DEVICE_ADD("ldac", UDA1341TS, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0) // uda1341ts.u12
MCFG_DEVICE_ADD("rdac", UDA1341TS, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0) // uda1341ts.u12
- MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
- MCFG_SOUND_ROUTE(0, "ldac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE(0, "ldac", -1.0, DAC_VREF_NEG_INPUT)
- MCFG_SOUND_ROUTE(0, "rdac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE(0, "rdac", -1.0, DAC_VREF_NEG_INPUT)
+ voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref"));
+ vref.set_output(5.0);
+ vref.add_route(0, "ldac", 1.0, DAC_VREF_POS_INPUT); vref.add_route(0, "ldac", -1.0, DAC_VREF_NEG_INPUT);
+ vref.add_route(0, "rdac", 1.0, DAC_VREF_POS_INPUT); vref.add_route(0, "rdac", -1.0, DAC_VREF_NEG_INPUT);
S3C2440(config, m_s3c2440, 12000000);
m_s3c2440->set_palette_tag("palette");
diff --git a/src/mame/drivers/homelab.cpp b/src/mame/drivers/homelab.cpp
index 52a511b0241..a4381953667 100644
--- a/src/mame/drivers/homelab.cpp
+++ b/src/mame/drivers/homelab.cpp
@@ -773,8 +773,9 @@ MACHINE_CONFIG_START(homelab_state::homelab)
/* sound hardware */
SPEAKER(config, "speaker").front_center();
MCFG_DEVICE_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5)
- MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
- MCFG_SOUND_ROUTE(0, "dac", 1.0, DAC_VREF_POS_INPUT)
+ 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);
WAVE(config, "wave", m_cass).add_route(ALL_OUTPUTS, "speaker", 0.25);
@@ -806,8 +807,9 @@ MACHINE_CONFIG_START(homelab_state::homelab3)
/* sound hardware */
SPEAKER(config, "speaker").front_center();
MCFG_DEVICE_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5)
- MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
- MCFG_SOUND_ROUTE(0, "dac", 1.0, DAC_VREF_POS_INPUT)
+ 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);
WAVE(config, "wave", m_cass).add_route(ALL_OUTPUTS, "speaker", 0.25);
@@ -839,8 +841,9 @@ MACHINE_CONFIG_START(homelab_state::brailab4)
/* sound hardware */
SPEAKER(config, "speaker").front_center();
MCFG_DEVICE_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5)
- MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
- MCFG_SOUND_ROUTE(0, "dac", 1.0, DAC_VREF_POS_INPUT)
+ 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);
WAVE(config, "wave", m_cass).add_route(ALL_OUTPUTS, "speaker", 0.25);
diff --git a/src/mame/drivers/hp80.cpp b/src/mame/drivers/hp80.cpp
index 5870120b805..295c3b50f50 100644
--- a/src/mame/drivers/hp80.cpp
+++ b/src/mame/drivers/hp80.cpp
@@ -1357,9 +1357,9 @@ MACHINE_CONFIG_START(hp85_state::hp85)
SPEAKER(config, "mono").front_center();
MCFG_DEVICE_ADD("dac" , DAC_1BIT , 0)
MCFG_MIXER_ROUTE(ALL_OUTPUTS , "mono" , 0.5 , 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)
+ voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref"));
+ vref.set_output(5.0);
+ vref.add_route(0, "dac", 1.0, DAC_VREF_POS_INPUT);
MCFG_DEVICE_ADD("beeper" , BEEP , MASTER_CLOCK / 8192)
MCFG_MIXER_ROUTE(ALL_OUTPUTS , "mono" , 0.5 , 0)
diff --git a/src/mame/drivers/hp95lx.cpp b/src/mame/drivers/hp95lx.cpp
index 74f455217d4..701f8b9c63d 100644
--- a/src/mame/drivers/hp95lx.cpp
+++ b/src/mame/drivers/hp95lx.cpp
@@ -709,11 +709,12 @@ void hp95lx_state::hp95lx_io(address_map &map)
}
-MACHINE_CONFIG_START(hp95lx_state::hp95lx)
- MCFG_DEVICE_ADD("maincpu", V20, XTAL(5'370'000))
- MCFG_DEVICE_PROGRAM_MAP(hp95lx_map)
- MCFG_DEVICE_IO_MAP(hp95lx_io)
- MCFG_DEVICE_IRQ_ACKNOWLEDGE_DEVICE("pic8259", pic8259_device, inta_cb)
+void hp95lx_state::hp95lx(machine_config &config)
+{
+ V20(config, m_maincpu, XTAL(5'370'000));
+ m_maincpu->set_addrmap(AS_PROGRAM, &hp95lx_state::hp95lx_map);
+ m_maincpu->set_addrmap(AS_IO, &hp95lx_state::hp95lx_io);
+ m_maincpu->set_irq_acknowledge_callback("pic8259", FUNC(pic8259_device::inta_cb));
ADDRESS_MAP_BANK(config, "bankdev_c000").set_map(&hp95lx_state::hp95lx_romdos).set_options(ENDIANNESS_LITTLE, 8, 32, 0x10000);
ADDRESS_MAP_BANK(config, "bankdev_d000").set_map(&hp95lx_state::hp95lx_romdos).set_options(ENDIANNESS_LITTLE, 8, 32, 0x10000);
@@ -735,12 +736,12 @@ MACHINE_CONFIG_START(hp95lx_state::hp95lx)
m_isabus->set_memspace("maincpu", AS_PROGRAM);
m_isabus->set_iospace("maincpu", AS_IO);
- MCFG_DEVICE_ADD("board0", ISA8_SLOT, 0, "isa", pc_isa8_cards, "com", true)
+ ISA8_SLOT(config, "board0", 0, "isa", pc_isa8_cards, "com", true);
- MCFG_DEVICE_ADD(KBDC_TAG, PC_KBDC, 0)
- MCFG_PC_KBDC_OUT_CLOCK_CB(WRITELINE(*this, hp95lx_state, keyboard_clock_w))
- MCFG_PC_KBDC_OUT_DATA_CB(WRITELINE(*this, hp95lx_state, keyboard_data_w))
- MCFG_PC_KBDC_SLOT_ADD(KBDC_TAG, "kbd", pc_xt_keyboards, STR_KBD_KEYTRONIC_PC3270)
+ pc_kbdc_device &pc_kbdc(PC_KBDC(config, KBDC_TAG, 0));
+ pc_kbdc.out_clock_cb().set(FUNC(hp95lx_state::keyboard_clock_w));
+ pc_kbdc.out_data_cb().set(FUNC(hp95lx_state::keyboard_data_w));
+ PC_KBDC_SLOT(config, "kbd", pc_xt_keyboards, STR_KBD_KEYTRONIC_PC3270).set_pc_kbdc_slot(&pc_kbdc);
NVRAM(config, "nvram2", nvram_device::DEFAULT_ALL_0); // RAM
NVRAM(config, "nvram3", nvram_device::DEFAULT_ALL_0); // card slot
@@ -755,7 +756,7 @@ MACHINE_CONFIG_START(hp95lx_state::hp95lx)
PALETTE(config, "palette", FUNC(hp95lx_state::hp95lx_palette), 2);
RAM(config, RAM_TAG).set_default_size("512K");
-MACHINE_CONFIG_END
+}
ROM_START( hp95lx )
diff --git a/src/mame/drivers/ibmpc.cpp b/src/mame/drivers/ibmpc.cpp
index ebf10b813c3..a382369e530 100644
--- a/src/mame/drivers/ibmpc.cpp
+++ b/src/mame/drivers/ibmpc.cpp
@@ -313,7 +313,7 @@ MACHINE_CONFIG_START(ibmpc_state::ibm5150)
MCFG_DEVICE_ADD("isa5", ISA8_SLOT, 0, "mb:isa", pc_isa8_cards, nullptr, false)
/* keyboard */
- MCFG_PC_KBDC_SLOT_ADD("mb:pc_kbdc", "kbd", pc_xt_keyboards, STR_KBD_KEYTRONIC_PC3270)
+ PC_KBDC_SLOT(config, "kbd", pc_xt_keyboards, STR_KBD_KEYTRONIC_PC3270).set_pc_kbdc_slot(subdevice("mb:pc_kbdc"));
/* internal ram */
RAM(config, RAM_TAG).set_default_size("640K").set_extra_options("64K, 128K, 256K, 512K");
@@ -353,7 +353,7 @@ MACHINE_CONFIG_START(ibmpc_state::ibm5160)
MCFG_DEVICE_ADD("isa8", ISA8_SLOT, 0, "mb:isa", pc_isa8_cards, nullptr, false)
/* keyboard */
- MCFG_PC_KBDC_SLOT_ADD("mb:pc_kbdc", "kbd", pc_xt_keyboards, STR_KBD_IBM_PC_XT_83)
+ PC_KBDC_SLOT(config, "kbd", pc_xt_keyboards, STR_KBD_IBM_PC_XT_83).set_pc_kbdc_slot(subdevice("mb:pc_kbdc"));
/* internal ram */
RAM(config, RAM_TAG).set_default_size("640K").set_extra_options("64K, 128K, 256K, 512K");
diff --git a/src/mame/drivers/ibmpcjr.cpp b/src/mame/drivers/ibmpcjr.cpp
index 990e70ca9ee..52f85851c7b 100644
--- a/src/mame/drivers/ibmpcjr.cpp
+++ b/src/mame/drivers/ibmpcjr.cpp
@@ -664,7 +664,8 @@ MACHINE_CONFIG_START(pcjr_state::ibmpcjr)
FLOPPY_CONNECTOR(config, "fdc:0", pcjr_floppies, "525dd", isa8_fdc_device::floppy_formats, true);
- MCFG_PC_KEYB_ADD("pc_keyboard", WRITELINE(*this, pcjr_state, keyb_interrupt))
+ PC_KEYB(config, m_keyboard);
+ m_keyboard->keypress().set(FUNC(pcjr_state::keyb_interrupt));
/* cartridge */
MCFG_GENERIC_CARTSLOT_ADD("cartslot1", generic_plain_slot, "ibmpcjr_cart")
diff --git a/src/mame/drivers/iskr103x.cpp b/src/mame/drivers/iskr103x.cpp
index 9f3c62d868a..f2a7fd7ab15 100644
--- a/src/mame/drivers/iskr103x.cpp
+++ b/src/mame/drivers/iskr103x.cpp
@@ -86,8 +86,8 @@ MACHINE_CONFIG_START(iskr103x_state::iskr1030m)
MCFG_DEVICE_ADD("isa5", ISA8_SLOT, 0, "mb:isa", iskr103x_isa8_cards, nullptr, false)
MCFG_DEVICE_ADD("isa6", ISA8_SLOT, 0, "mb:isa", iskr103x_isa8_cards, nullptr, false)
- MCFG_PC_KBDC_SLOT_ADD("mb:pc_kbdc", "kbd", pc_xt_keyboards, STR_KBD_EC_1841)
-// MCFG_PC_KBDC_SLOT_ADD("mb:pc_kbdc", "kbd", pc_xt_keyboards, STR_KBD_ISKR_1030)
+ PC_KBDC_SLOT(config, "kbd", pc_xt_keyboards, STR_KBD_EC_1841).set_pc_kbdc_slot(subdevice("mb:pc_kbdc"));
+// PC_KBDC_SLOT(config, "kbd", pc_xt_keyboards, STR_KBD_ISKR_1030).set_pc_kbdc_slot(subdevice("mb:pc_kbdc"));
RAM(config, RAM_TAG).set_default_size("640K").set_extra_options("64K, 128K, 256K, 512K");
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/jankenmn.cpp b/src/mame/drivers/jankenmn.cpp
index 736bfecedd7..066f9680d30 100644
--- a/src/mame/drivers/jankenmn.cpp
+++ b/src/mame/drivers/jankenmn.cpp
@@ -383,7 +383,8 @@ static const z80_daisy_config daisy_chain[] =
* Machine Config *
*********************************************/
-MACHINE_CONFIG_START(jankenmn_state::jankenmn)
+void jankenmn_state::jankenmn(machine_config &config)
+{
/* basic machine hardware */
Z80(config, m_maincpu, MASTER_CLOCK); /* 2.5 MHz */
m_maincpu->set_daisy_config(daisy_chain);
@@ -410,12 +411,12 @@ MACHINE_CONFIG_START(jankenmn_state::jankenmn)
/* sound hardware */
SPEAKER(config, "speaker").front_center();
- MCFG_DEVICE_ADD("dac", AD7523, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5)
+ AD7523(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 0.5);
voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref"));
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);
-MACHINE_CONFIG_END
+}
/*********************************************
diff --git a/src/mame/drivers/junofrst.cpp b/src/mame/drivers/junofrst.cpp
index 400ca45846f..3059bfd1fa4 100644
--- a/src/mame/drivers/junofrst.cpp
+++ b/src/mame/drivers/junofrst.cpp
@@ -403,8 +403,8 @@ WRITE_LINE_MEMBER(junofrst_state::_30hz_irq)
}
}
-MACHINE_CONFIG_START(junofrst_state::junofrst)
-
+void junofrst_state::junofrst(machine_config &config)
+{
/* basic machine hardware */
KONAMI1(config, m_maincpu, 1500000); /* 1.5 MHz ??? */
m_maincpu->set_addrmap(AS_PROGRAM, &junofrst_state::main_map);
@@ -452,19 +452,16 @@ MACHINE_CONFIG_START(junofrst_state::junofrst)
aysnd.add_route(1, "filter.0.1", 0.30);
aysnd.add_route(2, "filter.0.2", 0.30);
- MCFG_DEVICE_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) // 100K (R56-63)/200K (R64-71) ladder network
+ DAC_8BIT_R2R(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 0.25); // 100K (R56-63)/200K (R64-71) ladder network
voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref"));
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);
- MCFG_DEVICE_ADD("filter.0.0", FILTER_RC)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
- MCFG_DEVICE_ADD("filter.0.1", FILTER_RC)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
- MCFG_DEVICE_ADD("filter.0.2", FILTER_RC)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
-MACHINE_CONFIG_END
+ FILTER_RC(config, m_filter_0_0).add_route(ALL_OUTPUTS, "speaker", 1.0);
+ FILTER_RC(config, m_filter_0_1).add_route(ALL_OUTPUTS, "speaker", 1.0);
+ FILTER_RC(config, m_filter_0_2).add_route(ALL_OUTPUTS, "speaker", 1.0);
+}
ROM_START( junofrst )
diff --git a/src/mame/drivers/kron.cpp b/src/mame/drivers/kron.cpp
index df55b3a0b46..85de8f4dc61 100644
--- a/src/mame/drivers/kron.cpp
+++ b/src/mame/drivers/kron.cpp
@@ -300,11 +300,12 @@ WRITE_LINE_MEMBER(kron180_state::keyb_interrupt)
/*
* Machine configuration
*/
-MACHINE_CONFIG_START(kron180_state::kron180)
+void kron180_state::kron180(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD ("maincpu", Z180, XTAL(12'288'000))
- MCFG_DEVICE_PROGRAM_MAP (kron180_mem)
- MCFG_DEVICE_IO_MAP(kron180_iomap)
+ Z180(config, m_maincpu, XTAL(12'288'000));
+ m_maincpu->set_addrmap(AS_PROGRAM, &kron180_state::kron180_mem);
+ m_maincpu->set_addrmap(AS_IO, &kron180_state::kron180_iomap);
/* video hardware */
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER, rgb_t::green()));
@@ -317,8 +318,9 @@ MACHINE_CONFIG_START(kron180_state::kron180)
PALETTE(config, "palette", palette_device::MONOCHROME);
/* keyboard TODO: fix it, doesn't work yet */
- MCFG_PC_KEYB_ADD("pc_keyboard", WRITELINE(*this, kron180_state, keyb_interrupt))
-MACHINE_CONFIG_END
+ PC_KEYB(config, m_keyboard);
+ m_keyboard->keypress().set(FUNC(kron180_state::keyb_interrupt));
+}
/* ROM definitions */
ROM_START (kron180)
diff --git a/src/mame/drivers/laserbas.cpp b/src/mame/drivers/laserbas.cpp
index cb5cae08506..f205c8f056c 100644
--- a/src/mame/drivers/laserbas.cpp
+++ b/src/mame/drivers/laserbas.cpp
@@ -412,13 +412,14 @@ MACHINE_CONFIG_START(laserbas_state::laserbas)
MCFG_DEVICE_ADD(m_dac[3], DAC_4BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.16)
MCFG_DEVICE_ADD(m_dac[4], DAC_4BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.16)
MCFG_DEVICE_ADD(m_dac[5], DAC_4BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.16)
- 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)
- MCFG_SOUND_ROUTE(0, "dac3", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE(0, "dac3", -1.0, DAC_VREF_NEG_INPUT)
- MCFG_SOUND_ROUTE(0, "dac4", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE(0, "dac4", -1.0, DAC_VREF_NEG_INPUT)
- MCFG_SOUND_ROUTE(0, "dac5", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE(0, "dac5", -1.0, DAC_VREF_NEG_INPUT)
- MCFG_SOUND_ROUTE(0, "dac6", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_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, "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);
+ vref.add_route(0, "dac3", 1.0, DAC_VREF_POS_INPUT); vref.add_route(0, "dac3", -1.0, DAC_VREF_NEG_INPUT);
+ vref.add_route(0, "dac4", 1.0, DAC_VREF_POS_INPUT); vref.add_route(0, "dac4", -1.0, DAC_VREF_NEG_INPUT);
+ vref.add_route(0, "dac5", 1.0, DAC_VREF_POS_INPUT); vref.add_route(0, "dac5", -1.0, DAC_VREF_NEG_INPUT);
+ vref.add_route(0, "dac6", 1.0, DAC_VREF_POS_INPUT); vref.add_route(0, "dac6", -1.0, DAC_VREF_NEG_INPUT);
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/lazercmd.cpp b/src/mame/drivers/lazercmd.cpp
index 24f56591a0c..eb9f8115393 100644
--- a/src/mame/drivers/lazercmd.cpp
+++ b/src/mame/drivers/lazercmd.cpp
@@ -656,11 +656,12 @@ MACHINE_CONFIG_START(lazercmd_state::lazercmd)
MCFG_DEVICE_ADD("dac1", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.99)
MCFG_DEVICE_ADD("dac2", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.99)
MCFG_DEVICE_ADD("dac3", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.99)
- MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
- MCFG_SOUND_ROUTE(0, "dac0", 1.0, DAC_VREF_POS_INPUT)
- MCFG_SOUND_ROUTE(0, "dac1", 1.0, DAC_VREF_POS_INPUT)
- MCFG_SOUND_ROUTE(0, "dac2", 1.0, DAC_VREF_POS_INPUT)
- MCFG_SOUND_ROUTE(0, "dac3", 1.0, DAC_VREF_POS_INPUT)
+ voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref"));
+ vref.set_output(5.0);
+ vref.add_route(0, "dac0", 1.0, DAC_VREF_POS_INPUT);
+ vref.add_route(0, "dac1", 1.0, DAC_VREF_POS_INPUT);
+ vref.add_route(0, "dac2", 1.0, DAC_VREF_POS_INPUT);
+ vref.add_route(0, "dac3", 1.0, DAC_VREF_POS_INPUT);
MACHINE_CONFIG_END
@@ -692,9 +693,10 @@ MACHINE_CONFIG_START(lazercmd_state::medlanes)
SPEAKER(config, "speaker").front_center();
MCFG_DEVICE_ADD("dac2", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.99)
MCFG_DEVICE_ADD("dac3", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.99)
- MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
- MCFG_SOUND_ROUTE(0, "dac2", 1.0, DAC_VREF_POS_INPUT)
- MCFG_SOUND_ROUTE(0, "dac3", 1.0, DAC_VREF_POS_INPUT)
+ voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref"));
+ vref.set_output(5.0);
+ vref.add_route(0, "dac2", 1.0, DAC_VREF_POS_INPUT);
+ vref.add_route(0, "dac3", 1.0, DAC_VREF_POS_INPUT);
MACHINE_CONFIG_END
@@ -726,9 +728,10 @@ MACHINE_CONFIG_START(lazercmd_state::bbonk)
SPEAKER(config, "speaker").front_center();
MCFG_DEVICE_ADD("dac2", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.99)
MCFG_DEVICE_ADD("dac3", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.99)
- MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
- MCFG_SOUND_ROUTE(0, "dac2", 1.0, DAC_VREF_POS_INPUT)
- MCFG_SOUND_ROUTE(0, "dac3", 1.0, DAC_VREF_POS_INPUT)
+ voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref"));
+ vref.set_output(5.0);
+ vref.add_route(0, "dac2", 1.0, DAC_VREF_POS_INPUT);
+ vref.add_route(0, "dac3", 1.0, DAC_VREF_POS_INPUT);
MACHINE_CONFIG_END
/***************************************************************************
diff --git a/src/mame/drivers/leland.cpp b/src/mame/drivers/leland.cpp
index 7f2a80da015..88f27326849 100644
--- a/src/mame/drivers/leland.cpp
+++ b/src/mame/drivers/leland.cpp
@@ -1015,9 +1015,10 @@ MACHINE_CONFIG_START(leland_state::leland)
MCFG_DEVICE_ADD(m_dac[0], DAC_8BIT_BINARY_WEIGHTED, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.0625) // ls374.u79 + r17-r23 (24k,12k,6.2k,3k,1.5k,750,390,180)
MCFG_DEVICE_ADD(m_dac[1], DAC_8BIT_BINARY_WEIGHTED, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.0625) // ls374.u88 + r27-r34 (24k,12k,6.2k,3k,1.5k,750,390,180)
- MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
- MCFG_SOUND_ROUTE(0, "dac0", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE(0, "dac0", -1.0, DAC_VREF_NEG_INPUT)
- MCFG_SOUND_ROUTE(0, "dac1", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE(0, "dac1", -1.0, DAC_VREF_NEG_INPUT)
+ voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref"));
+ vref.set_output(5.0);
+ vref.add_route(0, "dac0", 1.0, DAC_VREF_POS_INPUT); vref.add_route(0, "dac0", -1.0, DAC_VREF_NEG_INPUT);
+ vref.add_route(0, "dac1", 1.0, DAC_VREF_POS_INPUT); vref.add_route(0, "dac1", -1.0, DAC_VREF_NEG_INPUT);
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/littlerb.cpp b/src/mame/drivers/littlerb.cpp
index a2522b810e8..a0df0e65d2b 100644
--- a/src/mame/drivers/littlerb.cpp
+++ b/src/mame/drivers/littlerb.cpp
@@ -287,9 +287,10 @@ TIMER_DEVICE_CALLBACK_MEMBER(littlerb_state::littlerb_sound_step_cb)
m_soundframe++;
}
-MACHINE_CONFIG_START(littlerb_state::littlerb)
- MCFG_DEVICE_ADD("maincpu", M68000, XTAL(16'000'000)/2) // 10MHz rated part, near 16Mhz XTAL
- MCFG_DEVICE_PROGRAM_MAP(littlerb_main)
+void littlerb_state::littlerb(machine_config &config)
+{
+ M68000(config, m_maincpu, XTAL(16'000'000)/2); // 10MHz rated part, near 16Mhz XTAL
+ m_maincpu->set_addrmap(AS_PROGRAM, &littlerb_state::littlerb_main);
INDER_VIDEO(config, m_indervid, 0); // XTAL(40'000'000)
@@ -300,12 +301,13 @@ MACHINE_CONFIG_START(littlerb_state::littlerb)
SPEAKER(config, "lspeaker").front_left();
SPEAKER(config, "rspeaker").front_right();
- MCFG_DEVICE_ADD("ldac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.5) // unknown DAC
- MCFG_DEVICE_ADD("rdac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.5) // unknown DAC
- MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
- MCFG_SOUND_ROUTE(0, "ldac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE(0, "ldac", -1.0, DAC_VREF_NEG_INPUT)
- MCFG_SOUND_ROUTE(0, "rdac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE(0, "rdac", -1.0, DAC_VREF_NEG_INPUT)
-MACHINE_CONFIG_END
+ DAC_8BIT_R2R(config, m_ldac, 0).add_route(ALL_OUTPUTS, "lspeaker", 0.5); // unknown DAC
+ DAC_8BIT_R2R(config, m_rdac, 0).add_route(ALL_OUTPUTS, "rspeaker", 0.5); // unknown DAC
+ voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref"));
+ vref.set_output(5.0);
+ vref.add_route(0, "ldac", 1.0, DAC_VREF_POS_INPUT); vref.add_route(0, "ldac", -1.0, DAC_VREF_NEG_INPUT);
+ vref.add_route(0, "rdac", 1.0, DAC_VREF_POS_INPUT); vref.add_route(0, "rdac", -1.0, DAC_VREF_NEG_INPUT);
+}
ROM_START( littlerb )
ROM_REGION( 0x100000, "maincpu", 0 ) /* 68000 Code */
diff --git a/src/mame/drivers/magicfly.cpp b/src/mame/drivers/magicfly.cpp
index b7f35b850c4..2d7581a45b3 100644
--- a/src/mame/drivers/magicfly.cpp
+++ b/src/mame/drivers/magicfly.cpp
@@ -969,8 +969,9 @@ MACHINE_CONFIG_START(magicfly_state::magicfly)
/* sound hardware */
SPEAKER(config, "speaker").front_center();
MCFG_DEVICE_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 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)
+ 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);
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/mc10.cpp b/src/mame/drivers/mc10.cpp
index b636ea44816..ee1a75dc0e2 100644
--- a/src/mame/drivers/mc10.cpp
+++ b/src/mame/drivers/mc10.cpp
@@ -502,8 +502,8 @@ INPUT_PORTS_END
MACHINE DRIVERS
***************************************************************************/
-MACHINE_CONFIG_START(mc10_state::mc10)
-
+void mc10_state::mc10(machine_config &config)
+{
/* basic machine hardware */
M6803(config, m_maincpu, XTAL(3'579'545)); /* 0,894886 MHz */
m_maincpu->set_addrmap(AS_PROGRAM, &mc10_state::mc10_mem);
@@ -521,9 +521,10 @@ MACHINE_CONFIG_START(mc10_state::mc10)
/* sound hardware */
SPEAKER(config, "speaker").front_center();
- MCFG_DEVICE_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.0625)
- MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
- MCFG_SOUND_ROUTE(0, "dac", 1.0, DAC_VREF_POS_INPUT)
+ DAC_1BIT(config, m_dac, 0).add_route(ALL_OUTPUTS, "speaker", 0.0625);
+ 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);
CASSETTE(config, m_cassette);
m_cassette->set_formats(coco_cassette_formats);
@@ -538,10 +539,10 @@ MACHINE_CONFIG_START(mc10_state::mc10)
/* Software lists */
SOFTWARE_LIST(config, "cass_list").set_original("mc10");
-MACHINE_CONFIG_END
-
-MACHINE_CONFIG_START(mc10_state::alice32)
+}
+void mc10_state::alice32(machine_config &config)
+{
M6803(config, m_maincpu, XTAL(3'579'545));
m_maincpu->set_addrmap(AS_PROGRAM, &mc10_state::alice32_mem);
m_maincpu->in_p1_cb().set(FUNC(mc10_state::mc10_port1_r));
@@ -550,12 +551,12 @@ MACHINE_CONFIG_START(mc10_state::alice32)
m_maincpu->out_p2_cb().set(FUNC(mc10_state::mc10_port2_w));
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_UPDATE_DEVICE("ef9345", ef9345_device, screen_update)
- MCFG_SCREEN_SIZE(336, 270)
- MCFG_SCREEN_VISIBLE_AREA(00, 336-1, 00, 270-1)
- MCFG_PALETTE_ADD("palette", 8)
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(60);
+ screen.set_screen_update("ef9345", FUNC(ef9345_device::screen_update));
+ screen.set_size(336, 270);
+ screen.set_visarea(00, 336-1, 00, 270-1);
+ PALETTE(config, "palette").set_entries(8);
EF9345(config, m_ef9345, 0);
m_ef9345->set_palette_tag("palette");
@@ -563,9 +564,10 @@ MACHINE_CONFIG_START(mc10_state::alice32)
/* sound hardware */
SPEAKER(config, "speaker").front_center();
- MCFG_DEVICE_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.0625)
- MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
- MCFG_SOUND_ROUTE(0, "dac", 1.0, DAC_VREF_POS_INPUT)
+ DAC_1BIT(config, m_dac, 0).add_route(ALL_OUTPUTS, "speaker", 0.0625);
+ 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);
CASSETTE(config, m_cassette);
m_cassette->set_formats(alice32_cassette_formats);
@@ -581,7 +583,7 @@ MACHINE_CONFIG_START(mc10_state::alice32)
/* Software lists */
SOFTWARE_LIST(config, "cass_list").set_original("alice32");
SOFTWARE_LIST(config, "mc10_cass").set_compatible("mc10");
-MACHINE_CONFIG_END
+}
void mc10_state::alice90(machine_config &config)
{
diff --git a/src/mame/drivers/mephistp.cpp b/src/mame/drivers/mephistp.cpp
index b19d54df7a7..7538c317b09 100644
--- a/src/mame/drivers/mephistp.cpp
+++ b/src/mame/drivers/mephistp.cpp
@@ -160,17 +160,18 @@ void mephisto_pinball_state::machine_reset()
{
}
-MACHINE_CONFIG_START(mephisto_pinball_state::mephisto)
+void mephisto_pinball_state::mephisto(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", I8088, XTAL(18'000'000)/3)
- MCFG_DEVICE_PROGRAM_MAP(mephisto_map)
- //MCFG_DEVICE_IRQ_ACKNOWLEDGE_DEVICE("muart", i8256_device, inta_cb)
+ I8088(config, m_maincpu, XTAL(18'000'000)/3);
+ m_maincpu->set_addrmap(AS_PROGRAM, mephisto_pinball_state::mephisto_map);
+ //m_maincpu->set_irq_acknowledge_callback("muart", FUNC(i8256_device::inta_cb));
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
- //MCFG_DEVICE_ADD("muart", I8256, XTAL(18'000'000)/3)
- //MCFG_I8256_IRQ_HANDLER(INPUTLINE("maincpu", INPUT_LINE_IRQ0))
- //MCFG_I8256_TXD_HANDLER(INPUTLINE("audiocpu", MCS51_RX_LINE))
+ //i8256_device &muart(I8256(config, "muart", XTAL(18'000'000)/3));
+ //muart.irq_handler().set_inputline(m_maincpu, INPUT_LINE_IRQ0);
+ //muart.txd_handler().set_inputline("audiocpu", MCS51_RX_LINE);
I8155(config, "ic20", XTAL(18'000'000)/6);
//i8155_device &i8155_1(I8155(config, "ic20", XTAL(18'000'000)/6));
@@ -195,23 +196,21 @@ MACHINE_CONFIG_START(mephisto_pinball_state::mephisto)
m_aysnd->port_b_read_callback().set(FUNC(mephisto_pinball_state::ay8910_inputs_r));
m_aysnd->add_route(ALL_OUTPUTS, "mono", 0.5);
- MCFG_DEVICE_ADD("dac", DAC08, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.5)
+ DAC08(config, "dac", 0).add_route(ALL_OUTPUTS, "mono", 0.5);
voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref"));
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);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(mephisto_pinball_state::sport2k)
+void mephisto_pinball_state::sport2k(machine_config &config)
+{
mephisto(config);
- MCFG_DEVICE_MODIFY("soundcpu")
- MCFG_DEVICE_IO_MAP(sport2k_8051_io)
+ subdevice<i8051_device>("soundcpu")->set_addrmap(AS_IO, &mephisto_pinball_state::sport2k_8051_io);
- MCFG_DEVICE_ADD("ymsnd", YM3812, XTAL(14'318'181)/4)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.5)
-MACHINE_CONFIG_END
+ YM3812(config, "ymsnd", XTAL(14'318'181)/4).add_route(ALL_OUTPUTS, "mono", 0.5);
+}
/*-------------------------------------------------------------------
/ Mephisto
diff --git a/src/mame/drivers/meyc8088.cpp b/src/mame/drivers/meyc8088.cpp
index 30f907e5b72..2d4ba708277 100644
--- a/src/mame/drivers/meyc8088.cpp
+++ b/src/mame/drivers/meyc8088.cpp
@@ -401,8 +401,9 @@ MACHINE_CONFIG_START(meyc8088_state::meyc8088)
SPEAKER(config, "speaker").front_center();
MCFG_DEVICE_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 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)
+ 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);
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/mikro80.cpp b/src/mame/drivers/mikro80.cpp
index bb5d6f1b652..c1d08e27a7d 100644
--- a/src/mame/drivers/mikro80.cpp
+++ b/src/mame/drivers/mikro80.cpp
@@ -207,8 +207,9 @@ MACHINE_CONFIG_START(mikro80_state::radio99)
MCFG_DEVICE_IO_MAP(radio99_io)
MCFG_DEVICE_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.12)
- MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
- MCFG_SOUND_ROUTE(0, "dac", 1.0, DAC_VREF_POS_INPUT)
+ 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);
MACHINE_CONFIG_END
MACHINE_CONFIG_START(mikro80_state::kristall)
diff --git a/src/mame/drivers/mini2440.cpp b/src/mame/drivers/mini2440.cpp
index ee445b41584..f3b2e8b7dfc 100644
--- a/src/mame/drivers/mini2440.cpp
+++ b/src/mame/drivers/mini2440.cpp
@@ -243,9 +243,10 @@ MACHINE_CONFIG_START(mini2440_state::mini2440)
SPEAKER(config, "rspeaker").front_right();
MCFG_DEVICE_ADD("ldac", UDA1341TS, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0) // uda1341ts.u12
MCFG_DEVICE_ADD("rdac", UDA1341TS, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0) // uda1341ts.u12
- MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
- MCFG_SOUND_ROUTE(0, "ldac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE(0, "ldac", -1.0, DAC_VREF_NEG_INPUT)
- MCFG_SOUND_ROUTE(0, "rdac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE(0, "rdac", -1.0, DAC_VREF_NEG_INPUT)
+ voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref"));
+ vref.set_output(5.0);
+ vref.add_route(0, "ldac", 1.0, DAC_VREF_POS_INPUT); vref.add_route(0, "ldac", -1.0, DAC_VREF_NEG_INPUT);
+ vref.add_route(0, "rdac", 1.0, DAC_VREF_POS_INPUT); vref.add_route(0, "rdac", -1.0, DAC_VREF_NEG_INPUT);
S3C2440(config, m_s3c2440, 12000000);
m_s3c2440->set_palette_tag("palette");
diff --git a/src/mame/drivers/mogura.cpp b/src/mame/drivers/mogura.cpp
index d2e4acbc668..86394740680 100644
--- a/src/mame/drivers/mogura.cpp
+++ b/src/mame/drivers/mogura.cpp
@@ -233,9 +233,10 @@ MACHINE_CONFIG_START(mogura_state::mogura)
SPEAKER(config, "rspeaker").front_right();
MCFG_DEVICE_ADD("ldac", DAC_4BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.25) // unknown DAC
MCFG_DEVICE_ADD("rdac", DAC_4BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.25) // unknown DAC
- MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
- MCFG_SOUND_ROUTE(0, "ldac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE(0, "ldac", -1.0, DAC_VREF_NEG_INPUT)
- MCFG_SOUND_ROUTE(0, "rdac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE(0, "rdac", -1.0, DAC_VREF_NEG_INPUT)
+ voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref"));
+ vref.set_output(5.0);
+ vref.add_route(0, "ldac", 1.0, DAC_VREF_POS_INPUT); vref.add_route(0, "ldac", -1.0, DAC_VREF_NEG_INPUT);
+ vref.add_route(0, "rdac", 1.0, DAC_VREF_POS_INPUT); vref.add_route(0, "rdac", -1.0, DAC_VREF_NEG_INPUT);
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/msx.cpp b/src/mame/drivers/msx.cpp
index 6417aa77ec4..f2b2b0fba2b 100644
--- a/src/mame/drivers/msx.cpp
+++ b/src/mame/drivers/msx.cpp
@@ -1342,22 +1342,23 @@ void msx_state::msx_2_35_dd_drive(machine_config &config)
FLOPPY_CONNECTOR(config, "fdc:1", msx_floppies, "35dd", msx_state::floppy_formats);
}
-MACHINE_CONFIG_START(msx2_state::msx_ym2413)
- MCFG_DEVICE_ADD("ym2413", YM2413, 21.477272_MHz_XTAL / 6)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.4)
-MACHINE_CONFIG_END
+void msx2_state::msx_ym2413(machine_config &config)
+{
+ YM2413(config, "ym2413", 21.477272_MHz_XTAL / 6).add_route(ALL_OUTPUTS, "speaker", 0.4);
+}
-MACHINE_CONFIG_START(msx2_state::msx2_64kb_vram)
- MCFG_DEVICE_MODIFY("v9938")
- downcast<v99x8_device &>(*device).set_vram_size(0x10000);
-MACHINE_CONFIG_END
+void msx2_state::msx2_64kb_vram(machine_config &config)
+{
+ m_v9938->set_vram_size(0x10000);
+}
-MACHINE_CONFIG_START(msx_state::msx)
+void msx_state::msx(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, 10.738635_MHz_XTAL / 3) /* 3.579545 MHz */
- MCFG_DEVICE_PROGRAM_MAP(msx_memory_map)
- MCFG_DEVICE_IO_MAP(msx_io_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", msx_state, msx_interrupt) /* Needed for mouse updates */
+ Z80(config, m_maincpu, 10.738635_MHz_XTAL / 3); /* 3.579545 MHz */
+ m_maincpu->set_addrmap(AS_PROGRAM, &msx_state::msx_memory_map);
+ m_maincpu->set_addrmap(AS_IO, &msx_state::msx_io_map);
+ m_maincpu->set_vblank_int("screen", FUNC(msx_state::msx_interrupt)); /* Needed for mouse updates */
config.m_minimum_quantum = attotime::from_hz(60);
INPUT_MERGER_ANY_HIGH(config, "mainirq").output_handler().set_inputline("maincpu", INPUT_LINE_IRQ0);
@@ -1369,9 +1370,10 @@ MACHINE_CONFIG_START(msx_state::msx)
/* sound hardware */
SPEAKER(config, "speaker").front_center();
- MCFG_DEVICE_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.1)
- MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
- MCFG_SOUND_ROUTE(0, "dac", 1.0, DAC_VREF_POS_INPUT)
+ DAC_1BIT(config, m_dac, 0).add_route(ALL_OUTPUTS, "speaker", 0.1);
+ 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);
WAVE(config, "wave", m_cassette).add_route(ALL_OUTPUTS, "speaker", 0.25);
AY8910(config, m_ay8910, 10.738635_MHz_XTAL / 3 / 2);
@@ -1401,7 +1403,7 @@ MACHINE_CONFIG_START(msx_state::msx)
/* Software lists */
SOFTWARE_LIST(config, "cass_list").set_original("msx1_cass");
-MACHINE_CONFIG_END
+}
template<typename VDPType>
@@ -1417,11 +1419,12 @@ void msx_state::msx1(VDPType &vdp_type, machine_config &config)
}
-MACHINE_CONFIG_START(msx2_state::msx2)
+void msx2_state::msx2(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, 21.477272_MHz_XTAL / 6) /* 3.579545 MHz */
- MCFG_DEVICE_PROGRAM_MAP(msx_memory_map)
- MCFG_DEVICE_IO_MAP(msx2_io_map)
+ Z80(config, m_maincpu, 21.477272_MHz_XTAL / 6); /* 3.579545 MHz */
+ m_maincpu->set_addrmap(AS_PROGRAM, &msx2_state::msx_memory_map);
+ m_maincpu->set_addrmap(AS_IO, &msx2_state::msx2_io_map);
config.m_minimum_quantum = attotime::from_hz(60);
INPUT_MERGER_ANY_HIGH(config, "mainirq").output_handler().set_inputline("maincpu", INPUT_LINE_IRQ0);
@@ -1440,9 +1443,10 @@ MACHINE_CONFIG_START(msx2_state::msx2)
/* sound hardware */
SPEAKER(config, "speaker").front_center();
- MCFG_DEVICE_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.1)
- MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
- MCFG_SOUND_ROUTE(0, "dac", 1.0, DAC_VREF_POS_INPUT)
+ DAC_1BIT(config, m_dac, 0).add_route(ALL_OUTPUTS, "speaker", 0.1);
+ 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);
WAVE(config, "wave", m_cassette).add_route(ALL_OUTPUTS, "speaker", 0.25);
AY8910(config, m_ay8910, 21.477272_MHz_XTAL / 6 / 2);
@@ -1476,14 +1480,15 @@ MACHINE_CONFIG_START(msx2_state::msx2)
/* Software lists */
SOFTWARE_LIST(config, "cass_list").set_original("msx2_cass");
SOFTWARE_LIST(config, "msx1_cas_l").set_compatible("msx1_cass");
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(msx2_state::msx2p)
+void msx2_state::msx2p(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, 21.477272_MHz_XTAL / 6) /* 3.579545 MHz */
- MCFG_DEVICE_PROGRAM_MAP(msx_memory_map)
- MCFG_DEVICE_IO_MAP(msx2p_io_map)
+ Z80(config, m_maincpu, 21.477272_MHz_XTAL / 6); /* 3.579545 MHz */
+ m_maincpu->set_addrmap(AS_PROGRAM, &msx2_state::msx_memory_map);
+ m_maincpu->set_addrmap(AS_IO, &msx2_state::msx2p_io_map);
config.m_minimum_quantum = attotime::from_hz(60);
INPUT_MERGER_ANY_HIGH(config, "mainirq").output_handler().set_inputline("maincpu", INPUT_LINE_IRQ0);
@@ -1502,9 +1507,10 @@ MACHINE_CONFIG_START(msx2_state::msx2p)
/* sound hardware */
SPEAKER(config, "speaker").front_center();
- MCFG_DEVICE_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.1)
- MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
- MCFG_SOUND_ROUTE(0, "dac", 1.0, DAC_VREF_POS_INPUT)
+ DAC_1BIT(config, m_dac, 0).add_route(ALL_OUTPUTS, "speaker", 0.1);
+ 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);
WAVE(config, "wave", m_cassette).add_route(ALL_OUTPUTS, "speaker", 0.25);
AY8910(config, m_ay8910, 21.477272_MHz_XTAL / 6 / 2);
@@ -1538,7 +1544,7 @@ MACHINE_CONFIG_START(msx2_state::msx2p)
/* Software lists */
SOFTWARE_LIST(config, "cass_list").set_original("msx2_cass");
SOFTWARE_LIST(config, "msx1_cas_l").set_compatible("msx1_cass");
-MACHINE_CONFIG_END
+ }
void msx2_state::msx2_pal(machine_config &config)
diff --git a/src/mame/drivers/murogem.cpp b/src/mame/drivers/murogem.cpp
index af2d453ca44..407dad1bd60 100644
--- a/src/mame/drivers/murogem.cpp
+++ b/src/mame/drivers/murogem.cpp
@@ -275,8 +275,9 @@ MACHINE_CONFIG_START(murogem_state::murogem)
/* sound hardware */
SPEAKER(config, "speaker").front_center();
MCFG_DEVICE_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.375)
- MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
- MCFG_SOUND_ROUTE(0, "dac", 1.0, DAC_VREF_POS_INPUT)
+ 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);
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/nbmj8688.cpp b/src/mame/drivers/nbmj8688.cpp
index a09871adde2..8ac2dc0867a 100644
--- a/src/mame/drivers/nbmj8688.cpp
+++ b/src/mame/drivers/nbmj8688.cpp
@@ -2490,7 +2490,8 @@ MACHINE_CONFIG_START(nbmj8688_state::NBMJDRV_4096)
vref.add_route(0, "dac", -1.0, DAC_VREF_NEG_INPUT);
MACHINE_CONFIG_END
-MACHINE_CONFIG_START(nbmj8688_state::NBMJDRV_256)
+void nbmj8688_state::NBMJDRV_256(machine_config &config)
+{
NBMJDRV_4096(config);
/* basic machine hardware */
@@ -2499,9 +2500,10 @@ MACHINE_CONFIG_START(nbmj8688_state::NBMJDRV_256)
subdevice<palette_device>("palette")->set_entries(256).set_init(FUNC(nbmj8688_state::mbmj8688_8bit));
MCFG_VIDEO_START_OVERRIDE(nbmj8688_state,mbmj8688_8bit)
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(nbmj8688_state::NBMJDRV_65536)
+void nbmj8688_state::NBMJDRV_65536(machine_config &config)
+{
NBMJDRV_4096(config);
/* basic machine hardware */
@@ -2510,7 +2512,7 @@ MACHINE_CONFIG_START(nbmj8688_state::NBMJDRV_65536)
subdevice<palette_device>("palette")->set_entries(65536).set_init(FUNC(nbmj8688_state::mbmj8688_16bit));
MCFG_VIDEO_START_OVERRIDE(nbmj8688_state,mbmj8688_hybrid_16bit)
-MACHINE_CONFIG_END
+}
// --------------------------------------------------------------------------------
diff --git a/src/mame/drivers/nbmj8991.cpp b/src/mame/drivers/nbmj8991.cpp
index 4567274c79c..653c80e7c48 100644
--- a/src/mame/drivers/nbmj8991.cpp
+++ b/src/mame/drivers/nbmj8991.cpp
@@ -1396,9 +1396,10 @@ MACHINE_CONFIG_START(nbmj8991_state::nbmjdrv2) // pstadium
MCFG_DEVICE_ADD("dac1", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) // unknown DAC
MCFG_DEVICE_ADD("dac2", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) // 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)
+ voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref"));
+ vref.set_output(5.0);
+ 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);
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/nbmj9195.cpp b/src/mame/drivers/nbmj9195.cpp
index ae22f97a402..19b518112cc 100644
--- a/src/mame/drivers/nbmj9195.cpp
+++ b/src/mame/drivers/nbmj9195.cpp
@@ -2548,9 +2548,10 @@ MACHINE_CONFIG_START(nbmj9195_state::NBMJDRV1_base)
MCFG_DEVICE_ADD("dac1", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) // unknown DAC
MCFG_DEVICE_ADD("dac2", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) // 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)
+ voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref"));
+ vref.set_output(5.0);
+ 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);
MACHINE_CONFIG_END
MACHINE_CONFIG_START(nbmj9195_state::NBMJDRV1)
diff --git a/src/mame/drivers/ngp.cpp b/src/mame/drivers/ngp.cpp
index a2e9cc79f4b..f2e1cae52ab 100644
--- a/src/mame/drivers/ngp.cpp
+++ b/src/mame/drivers/ngp.cpp
@@ -851,9 +851,10 @@ MACHINE_CONFIG_START(ngp_state::ngp_common)
MCFG_DEVICE_ADD("ldac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.25) // unknown DAC
MCFG_DEVICE_ADD("rdac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.25) // unknown DAC
- MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
- MCFG_SOUND_ROUTE(0, "ldac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE(0, "ldac", -1.0, DAC_VREF_NEG_INPUT)
- MCFG_SOUND_ROUTE(0, "rdac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE(0, "rdac", -1.0, DAC_VREF_NEG_INPUT)
+ voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref"));
+ vref.set_output(5.0);
+ vref.add_route(0, "ldac", 1.0, DAC_VREF_POS_INPUT); vref.add_route(0, "ldac", -1.0, DAC_VREF_NEG_INPUT);
+ vref.add_route(0, "rdac", 1.0, DAC_VREF_POS_INPUT); vref.add_route(0, "rdac", -1.0, DAC_VREF_NEG_INPUT);
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/novagmcs48.cpp b/src/mame/drivers/novagmcs48.cpp
index 46523cac1f1..a29f07ba89e 100644
--- a/src/mame/drivers/novagmcs48.cpp
+++ b/src/mame/drivers/novagmcs48.cpp
@@ -147,8 +147,8 @@ INPUT_CHANGED_MEMBER(novagmcs48_state::octo_cpu_freq)
Machine Drivers
******************************************************************************/
-MACHINE_CONFIG_START(novagmcs48_state::presto)
-
+void novagmcs48_state::presto(machine_config &config)
+{
/* basic machine hardware */
i8049_device &maincpu(I8049(config, m_maincpu, 6000000)); // LC circuit, measured 6MHz
maincpu.p1_in_cb().set(FUNC(novagmcs48_state::presto_input_r));
@@ -160,20 +160,21 @@ MACHINE_CONFIG_START(novagmcs48_state::presto)
/* sound hardware */
SPEAKER(config, "speaker").front_center();
- MCFG_DEVICE_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 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)
-MACHINE_CONFIG_END
+ DAC_1BIT(config, m_dac, 0).add_route(ALL_OUTPUTS, "speaker", 0.25);
+ voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref"));
+ vref.set_output(5.0);
+ vref.add_route(0, "dac", 1.0, DAC_VREF_POS_INPUT);
+}
-MACHINE_CONFIG_START(novagmcs48_state::octo)
+void novagmcs48_state::octo(machine_config &config)
+{
presto(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_CLOCK(12000000) // LC circuit, measured, see octo_set_cpu_freq
+ m_maincpu->set_clock(12000000); // LC circuit, measured, see octo_set_cpu_freq
MCFG_MACHINE_RESET_OVERRIDE(novagmcs48_state, octo)
-MACHINE_CONFIG_END
+}
diff --git a/src/mame/drivers/palm.cpp b/src/mame/drivers/palm.cpp
index a65716a300a..2f2c2166476 100644
--- a/src/mame/drivers/palm.cpp
+++ b/src/mame/drivers/palm.cpp
@@ -205,8 +205,9 @@ MACHINE_CONFIG_START(palm_state::palm)
/* audio hardware */
SPEAKER(config, "speaker").front_center();
MCFG_DEVICE_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 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)
+ 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);
MC68328(config, m_lsi, 0, "maincpu"); // on-board peripherals
m_lsi->out_port_f().set(FUNC(palm_state::palm_port_f_out));
diff --git a/src/mame/drivers/pc.cpp b/src/mame/drivers/pc.cpp
index 1e451328c36..2d8b7476bc4 100644
--- a/src/mame/drivers/pc.cpp
+++ b/src/mame/drivers/pc.cpp
@@ -215,7 +215,7 @@ MACHINE_CONFIG_START(pc_state::pccga)
MCFG_DEVICE_ADD("isa5", ISA8_SLOT, 0, "mb:isa", pc_isa8_cards, nullptr, false)
/* keyboard */
- MCFG_PC_KBDC_SLOT_ADD("mb:pc_kbdc", "kbd", pc_xt_keyboards, STR_KBD_IBM_PC_XT_83)
+ PC_KBDC_SLOT(config, "kbd", pc_xt_keyboards, STR_KBD_IBM_PC_XT_83).set_pc_kbdc_slot(subdevice("mb:pc_kbdc"));
/* internal ram */
RAM(config, RAM_TAG).set_default_size("640K").set_extra_options("64K, 128K, 256K, 512K");
@@ -629,7 +629,7 @@ MACHINE_CONFIG_START(pc_state::ibm5550)
MCFG_DEVICE_ADD("isa4", ISA8_SLOT, 0, "mb:isa", pc_isa8_cards, "com", false)
/* keyboard */
- MCFG_PC_KBDC_SLOT_ADD("mb:pc_kbdc", "kbd", pc_xt_keyboards, STR_KBD_IBM_PC_XT_83)
+ PC_KBDC_SLOT(config, "kbd", pc_xt_keyboards, STR_KBD_IBM_PC_XT_83).set_pc_kbdc_slot(subdevice("mb:pc_kbdc"));
/* internal ram */
RAM(config, RAM_TAG).set_default_size("640K").set_extra_options("64K, 128K, 256K, 512K");
@@ -858,7 +858,7 @@ MACHINE_CONFIG_START(pc_state::poisk2)
MCFG_DEVICE_ADD("isa4", ISA8_SLOT, 0, "mb:isa", pc_isa8_cards, "com", false)
/* keyboard */
- MCFG_PC_KBDC_SLOT_ADD("mb:pc_kbdc", "kbd", pc_xt_keyboards, STR_KBD_IBM_PC_XT_83)
+ PC_KBDC_SLOT(config, "kbd", pc_xt_keyboards, STR_KBD_IBM_PC_XT_83).set_pc_kbdc_slot(subdevice("mb:pc_kbdc"));
/* internal ram */
RAM(config, RAM_TAG).set_default_size("640K").set_extra_options("64K, 128K, 256K, 512K");
@@ -952,7 +952,7 @@ MACHINE_CONFIG_START(pc_state::iskr3104)
MCFG_DEVICE_ADD("isa4", ISA8_SLOT, 0, "mb:isa", pc_isa8_cards, "com", false)
/* keyboard */
- MCFG_PC_KBDC_SLOT_ADD("mb:pc_kbdc", "kbd", pc_xt_keyboards, STR_KBD_IBM_PC_XT_83)
+ PC_KBDC_SLOT(config, "kbd", pc_xt_keyboards, STR_KBD_IBM_PC_XT_83).set_pc_kbdc_slot(subdevice("mb:pc_kbdc"));
/* internal ram */
RAM(config, RAM_TAG).set_default_size("640K").set_extra_options("64K, 128K, 256K, 512K");
@@ -1030,7 +1030,7 @@ MACHINE_CONFIG_START(pc_state::siemens)
MCFG_DEVICE_ADD("isa6", ISA8_SLOT, 0, "mb:isa", pc_isa8_cards, nullptr, false)
/* keyboard */
- MCFG_PC_KBDC_SLOT_ADD("mb:pc_kbdc", "kbd", pc_xt_keyboards, STR_KBD_IBM_PC_XT_83)
+ PC_KBDC_SLOT(config, "kbd", pc_xt_keyboards, STR_KBD_IBM_PC_XT_83).set_pc_kbdc_slot(subdevice("mb:pc_kbdc"));
/* internal ram */
RAM(config, RAM_TAG).set_default_size("640K").set_extra_options("64K, 128K, 256K, 512K");
@@ -1076,7 +1076,7 @@ MACHINE_CONFIG_START(pc_state::laser_turbo_xt)
MCFG_DEVICE_ADD("isa8", ISA8_SLOT, 0, "mb:isa", pc_isa8_cards, nullptr, false)
/* keyboard */
- MCFG_PC_KBDC_SLOT_ADD("mb:pc_kbdc", "kbd", pc_xt_keyboards, STR_KBD_IBM_PC_XT_83)
+ PC_KBDC_SLOT(config, "kbd", pc_xt_keyboards, STR_KBD_IBM_PC_XT_83).set_pc_kbdc_slot(subdevice("mb:pc_kbdc"));
/* internal ram */
RAM(config, RAM_TAG).set_default_size("640K").set_extra_options("512K,768K,896K,1024K,1408K,1536K,1664K");
@@ -1152,7 +1152,7 @@ MACHINE_CONFIG_START(pc_state::zenith)
MCFG_DEVICE_ADD("isa4", ISA8_SLOT, 0, "mb:isa", pc_isa8_cards, "com", false)
/* keyboard */
- MCFG_PC_KBDC_SLOT_ADD("mb:pc_kbdc", "kbd", pc_xt_keyboards, STR_KBD_IBM_PC_XT_83)
+ PC_KBDC_SLOT(config, "kbd", pc_xt_keyboards, STR_KBD_IBM_PC_XT_83).set_pc_kbdc_slot(subdevice("mb:pc_kbdc"));
/* internal ram */
RAM(config, RAM_TAG).set_default_size("640K").set_extra_options("128K, 256K, 512K");
diff --git a/src/mame/drivers/pc1512.cpp b/src/mame/drivers/pc1512.cpp
index 50cc206394b..24680ba8376 100644
--- a/src/mame/drivers/pc1512.cpp
+++ b/src/mame/drivers/pc1512.cpp
@@ -1173,11 +1173,11 @@ MACHINE_CONFIG_START(pc1512_state::pc1512)
m_kb->clock_wr_callback().set(FUNC(pc1512_state::kbclk_w));
m_kb->data_wr_callback().set(FUNC(pc1512_state::kbdata_w));
- MCFG_PC1512_MOUSE_PORT_ADD(PC1512_MOUSE_PORT_TAG, pc1512_mouse_port_devices, "mouse")
- MCFG_PC1512_MOUSE_PORT_X_CB(WRITE8(*this, pc1512_state, mouse_x_w))
- MCFG_PC1512_MOUSE_PORT_Y_CB(WRITE8(*this, pc1512_state, mouse_y_w))
- MCFG_PC1512_MOUSE_PORT_M1_CB(WRITELINE(PC1512_KEYBOARD_TAG, pc1512_keyboard_device, m1_w))
- MCFG_PC1512_MOUSE_PORT_M2_CB(WRITELINE(PC1512_KEYBOARD_TAG, pc1512_keyboard_device, m2_w))
+ pc1512_mouse_port_device &mouse(PC1512_MOUSE_PORT(config, PC1512_MOUSE_PORT_TAG, pc1512_mouse_port_devices, "mouse"));
+ mouse.x_wr_callback().set(FUNC(pc1512_base_state::mouse_x_w));
+ mouse.y_wr_callback().set(FUNC(pc1512_base_state::mouse_y_w));
+ mouse.m1_wr_callback().set(m_kb, FUNC(pc1512_keyboard_device::m1_w));
+ mouse.m2_wr_callback().set(m_kb, FUNC(pc1512_keyboard_device::m2_w));
AM9517A(config, m_dmac, 24_MHz_XTAL / 6);
m_dmac->out_hreq_callback().set(FUNC(pc1512_state::hrq_w));
@@ -1307,11 +1307,11 @@ MACHINE_CONFIG_START(pc1640_state::pc1640)
m_kb->clock_wr_callback().set(FUNC(pc1512_base_state::kbclk_w));
m_kb->data_wr_callback().set(FUNC(pc1512_base_state::kbdata_w));
- MCFG_PC1512_MOUSE_PORT_ADD(PC1512_MOUSE_PORT_TAG, pc1512_mouse_port_devices, "mouse")
- MCFG_PC1512_MOUSE_PORT_X_CB(WRITE8(*this, pc1512_base_state, mouse_x_w))
- MCFG_PC1512_MOUSE_PORT_Y_CB(WRITE8(*this, pc1512_base_state, mouse_y_w))
- MCFG_PC1512_MOUSE_PORT_M1_CB(WRITELINE(PC1512_KEYBOARD_TAG, pc1512_keyboard_device, m1_w))
- MCFG_PC1512_MOUSE_PORT_M2_CB(WRITELINE(PC1512_KEYBOARD_TAG, pc1512_keyboard_device, m2_w))
+ pc1512_mouse_port_device &mouse(PC1512_MOUSE_PORT(config, PC1512_MOUSE_PORT_TAG, pc1512_mouse_port_devices, "mouse"));
+ mouse.x_wr_callback().set(FUNC(pc1512_base_state::mouse_x_w));
+ mouse.y_wr_callback().set(FUNC(pc1512_base_state::mouse_y_w));
+ mouse.m1_wr_callback().set(m_kb, FUNC(pc1512_keyboard_device::m1_w));
+ mouse.m2_wr_callback().set(m_kb, FUNC(pc1512_keyboard_device::m2_w));
AM9517A(config, m_dmac, 24_MHz_XTAL / 6);
m_dmac->out_hreq_callback().set(FUNC(pc1640_state::hrq_w));
diff --git a/src/mame/drivers/pcw16.cpp b/src/mame/drivers/pcw16.cpp
index 43b0fcb9d40..877d65105a7 100644
--- a/src/mame/drivers/pcw16.cpp
+++ b/src/mame/drivers/pcw16.cpp
@@ -1074,7 +1074,8 @@ MACHINE_CONFIG_START(pcw16_state::pcw16)
INTEL_E28F008SA(config, "flash0");
INTEL_E28F008SA(config, "flash1");
- MCFG_AT_KEYB_ADD("at_keyboard", 3, WRITELINE(*this, pcw16_state, pcw16_keyboard_callback))
+ AT_KEYB(config, m_keyboard, pc_keyboard_device::KEYBOARD_TYPE::AT, 3);
+ m_keyboard->keypress().set(FUNC(pcw16_state::pcw16_keyboard_callback));
/* video ints */
TIMER(config, "video_timer").configure_periodic(FUNC(pcw16_state::pcw16_timer_callback), attotime::from_usec(5830));
diff --git a/src/mame/drivers/prof80.cpp b/src/mame/drivers/prof80.cpp
index a72ec81b63b..9d2cdef58fe 100644
--- a/src/mame/drivers/prof80.cpp
+++ b/src/mame/drivers/prof80.cpp
@@ -450,11 +450,12 @@ void prof80_state::machine_start()
// MACHINE_CONFIG( prof80 )
//-------------------------------------------------
-MACHINE_CONFIG_START(prof80_state::prof80)
+void prof80_state::prof80(machine_config &config)
+{
// basic machine hardware
- MCFG_DEVICE_ADD(Z80_TAG, Z80, XTAL(6'000'000))
- MCFG_DEVICE_PROGRAM_MAP(prof80_mem)
- MCFG_DEVICE_IO_MAP(prof80_io)
+ Z80(config, m_maincpu, XTAL(6'000'000));
+ m_maincpu->set_addrmap(AS_PROGRAM, &prof80_state::prof80_mem);
+ m_maincpu->set_addrmap(AS_IO, &prof80_state::prof80_io);
// MMU
PROF80_MMU(config, m_mmu, 0);
@@ -492,12 +493,12 @@ MACHINE_CONFIG_START(prof80_state::prof80)
m_flrb->q_out_cb<7>().set(m_mmu, FUNC(prof80_mmu_device::mme_w)); // MME
// ECB bus
- MCFG_ECBBUS_ADD()
- MCFG_ECBBUS_SLOT_ADD(1, "ecb_1", ecbbus_cards, "grip21")
- MCFG_ECBBUS_SLOT_ADD(2, "ecb_2", ecbbus_cards, nullptr)
- MCFG_ECBBUS_SLOT_ADD(3, "ecb_3", ecbbus_cards, nullptr)
- MCFG_ECBBUS_SLOT_ADD(4, "ecb_4", ecbbus_cards, nullptr)
- MCFG_ECBBUS_SLOT_ADD(5, "ecb_5", ecbbus_cards, nullptr)
+ ECBBUS(config, m_ecb);
+ ECBBUS_SLOT(config, "ecb_1", 1, ecbbus_cards, "grip21");
+ ECBBUS_SLOT(config, "ecb_2", 2, ecbbus_cards, nullptr);
+ ECBBUS_SLOT(config, "ecb_3", 3, ecbbus_cards, nullptr);
+ ECBBUS_SLOT(config, "ecb_4", 4, ecbbus_cards, nullptr);
+ ECBBUS_SLOT(config, "ecb_5", 5, ecbbus_cards, nullptr);
// V24
RS232_PORT(config, m_rs232a, default_rs232_devices, nullptr);
@@ -508,7 +509,7 @@ MACHINE_CONFIG_START(prof80_state::prof80)
// software lists
SOFTWARE_LIST(config, "flop_list").set_original("prof80");
-MACHINE_CONFIG_END
+}
diff --git a/src/mame/drivers/pt68k4.cpp b/src/mame/drivers/pt68k4.cpp
index ab6e85f5b89..b28086c04f3 100644
--- a/src/mame/drivers/pt68k4.cpp
+++ b/src/mame/drivers/pt68k4.cpp
@@ -403,10 +403,11 @@ void pt68k4_isa8_cards(device_slot_interface &device)
device.option_add("xtide", ISA8_XTIDE); // Monk only
}
-MACHINE_CONFIG_START(pt68k4_state::pt68k2)
+void pt68k4_state::pt68k2(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD(M68K_TAG, M68000, 16_MHz_XTAL / 2) // 68k2 came in 8, 10, and 12 MHz versions
- MCFG_DEVICE_PROGRAM_MAP(pt68k2_mem)
+ M68000(config, m_maincpu, 16_MHz_XTAL / 2); // 68k2 came in 8, 10, and 12 MHz versions
+ m_maincpu->set_addrmap(AS_PROGRAM, &pt68k4_state::pt68k2_mem);
MC68681(config, m_duart1, 3.6864_MHz_XTAL);
m_duart1->irq_cb().set(FUNC(pt68k4_state::duart1_irq));
@@ -414,12 +415,12 @@ MACHINE_CONFIG_START(pt68k4_state::pt68k2)
MC68681(config, m_duart2, 3.6864_MHz_XTAL);
- MCFG_DEVICE_ADD(KBDC_TAG, PC_KBDC, 0)
- MCFG_PC_KBDC_OUT_CLOCK_CB(WRITELINE(*this, pt68k4_state, keyboard_clock_w))
- MCFG_PC_KBDC_OUT_DATA_CB(WRITELINE(*this, pt68k4_state, keyboard_data_w))
- MCFG_PC_KBDC_SLOT_ADD(KBDC_TAG, "kbd", pc_xt_keyboards, STR_KBD_IBM_PC_XT_83)
+ pc_kbdc_device &pc_kbdc(PC_KBDC(config, KBDC_TAG, 0));
+ pc_kbdc.out_clock_cb().set(FUNC(pt68k4_state::keyboard_clock_w));
+ pc_kbdc.out_data_cb().set(FUNC(pt68k4_state::keyboard_data_w));
+ PC_KBDC_SLOT(config, "kbd", pc_xt_keyboards, STR_KBD_IBM_PC_XT_83).set_pc_kbdc_slot(&pc_kbdc);
- MCFG_DEVICE_ADD(TIMEKEEPER_TAG, M48T02, 0)
+ M48T02(config, TIMEKEEPER_TAG, 0);
WD1772(config, m_wdfdc, 16_MHz_XTAL / 2);
FLOPPY_CONNECTOR(config, m_floppy_connector[0], pt68k_floppies, "525dd", pt68k4_state::floppy_formats);
@@ -429,24 +430,24 @@ MACHINE_CONFIG_START(pt68k4_state::pt68k2)
m_isa->set_custom_spaces();
m_isa->irq5_callback().set(FUNC(pt68k4_state::irq5_w));
- MCFG_DEVICE_ADD("isa1", ISA8_SLOT, 0, ISABUS_TAG, pt68k4_isa8_cards, "cga", false) // FIXME: determine ISA bus clock
- MCFG_DEVICE_ADD("isa2", ISA8_SLOT, 0, ISABUS_TAG, pt68k4_isa8_cards, nullptr, false)
- MCFG_DEVICE_ADD("isa3", ISA8_SLOT, 0, ISABUS_TAG, pt68k4_isa8_cards, nullptr, false)
- MCFG_DEVICE_ADD("isa4", ISA8_SLOT, 0, ISABUS_TAG, pt68k4_isa8_cards, nullptr, false)
- MCFG_DEVICE_ADD("isa5", ISA8_SLOT, 0, ISABUS_TAG, pt68k4_isa8_cards, nullptr, false)
- MCFG_DEVICE_ADD("isa6", ISA8_SLOT, 0, ISABUS_TAG, pt68k4_isa8_cards, nullptr, false)
+ ISA8_SLOT(config, "isa1", 0, m_isa, pt68k4_isa8_cards, "cga", false); // FIXME: determine ISA bus clock
+ ISA8_SLOT(config, "isa2", 0, m_isa, pt68k4_isa8_cards, nullptr, false);
+ ISA8_SLOT(config, "isa3", 0, m_isa, pt68k4_isa8_cards, nullptr, false);
+ ISA8_SLOT(config, "isa4", 0, m_isa, pt68k4_isa8_cards, nullptr, false);
+ ISA8_SLOT(config, "isa5", 0, m_isa, pt68k4_isa8_cards, nullptr, false);
+ ISA8_SLOT(config, "isa6", 0, m_isa, pt68k4_isa8_cards, nullptr, false),
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD(SPEAKER_TAG, SPEAKER_SOUND)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
+ SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 1.00);
SOFTWARE_LIST(config, "flop525_list").set_original("pt68k2");
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(pt68k4_state::pt68k4)
+void pt68k4_state::pt68k4(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD(M68K_TAG, M68000, XTAL(16'000'000))
- MCFG_DEVICE_PROGRAM_MAP(pt68k4_mem)
+ M68000(config, m_maincpu, XTAL(16'000'000));
+ m_maincpu->set_addrmap(AS_PROGRAM, &pt68k4_state::pt68k4_mem);
// add the DUARTS. first one has the console on channel A at 19200.
MC68681(config, m_duart1, XTAL(16'000'000) / 4);
@@ -455,30 +456,29 @@ MACHINE_CONFIG_START(pt68k4_state::pt68k4)
MC68681(config, m_duart2, XTAL(16'000'000) / 4);
- MCFG_DEVICE_ADD(KBDC_TAG, PC_KBDC, 0)
- MCFG_PC_KBDC_OUT_CLOCK_CB(WRITELINE(*this, pt68k4_state, keyboard_clock_w))
- MCFG_PC_KBDC_OUT_DATA_CB(WRITELINE(*this, pt68k4_state, keyboard_data_w))
- MCFG_PC_KBDC_SLOT_ADD(KBDC_TAG, "kbd", pc_xt_keyboards, STR_KBD_IBM_PC_XT_83)
+ pc_kbdc_device &pc_kbdc(PC_KBDC(config, KBDC_TAG, 0));
+ pc_kbdc.out_clock_cb().set(FUNC(pt68k4_state::keyboard_clock_w));
+ pc_kbdc.out_data_cb().set(FUNC(pt68k4_state::keyboard_data_w));
+ PC_KBDC_SLOT(config, "kbd", pc_xt_keyboards, STR_KBD_IBM_PC_XT_83).set_pc_kbdc_slot(&pc_kbdc);
- MCFG_DEVICE_ADD(TIMEKEEPER_TAG, M48T02, 0)
+ M48T02(config, TIMEKEEPER_TAG, 0);
ISA8(config, m_isa, 0);
m_isa->set_custom_spaces();
- MCFG_DEVICE_ADD("isa1", ISA8_SLOT, 0, ISABUS_TAG, pt68k4_isa8_cards, "fdc_at", false) // FIXME: determine ISA bus clock
- MCFG_DEVICE_ADD("isa2", ISA8_SLOT, 0, ISABUS_TAG, pt68k4_isa8_cards, "cga", false)
- MCFG_DEVICE_ADD("isa3", ISA8_SLOT, 0, ISABUS_TAG, pt68k4_isa8_cards, nullptr, false)
- MCFG_DEVICE_ADD("isa4", ISA8_SLOT, 0, ISABUS_TAG, pt68k4_isa8_cards, nullptr, false)
- MCFG_DEVICE_ADD("isa5", ISA8_SLOT, 0, ISABUS_TAG, pt68k4_isa8_cards, nullptr, false)
- MCFG_DEVICE_ADD("isa6", ISA8_SLOT, 0, ISABUS_TAG, pt68k4_isa8_cards, nullptr, false)
- MCFG_DEVICE_ADD("isa7", ISA8_SLOT, 0, ISABUS_TAG, pt68k4_isa8_cards, nullptr, false)
+ ISA8_SLOT(config, "isa1", 0, m_isa, pt68k4_isa8_cards, "fdc_at", false); // FIXME: determine ISA bus clock
+ ISA8_SLOT(config, "isa2", 0, m_isa, pt68k4_isa8_cards, "cga", false);
+ ISA8_SLOT(config, "isa3", 0, m_isa, pt68k4_isa8_cards, nullptr, false);
+ ISA8_SLOT(config, "isa4", 0, m_isa, pt68k4_isa8_cards, nullptr, false);
+ ISA8_SLOT(config, "isa5", 0, m_isa, pt68k4_isa8_cards, nullptr, false);
+ ISA8_SLOT(config, "isa6", 0, m_isa, pt68k4_isa8_cards, nullptr, false),
+ ISA8_SLOT(config, "isa7", 0, m_isa, pt68k4_isa8_cards, nullptr, false),
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD(SPEAKER_TAG, SPEAKER_SOUND)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
+ SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 1.00);
SOFTWARE_LIST(config, "flop525_list").set_original("pt68k2");
-MACHINE_CONFIG_END
+}
/* ROM definition */
ROM_START( pt68k2 )
diff --git a/src/mame/drivers/rltennis.cpp b/src/mame/drivers/rltennis.cpp
index 7f120374402..341d5720a0c 100644
--- a/src/mame/drivers/rltennis.cpp
+++ b/src/mame/drivers/rltennis.cpp
@@ -206,9 +206,10 @@ MACHINE_CONFIG_START(rltennis_state::rltennis)
MCFG_DEVICE_ADD("dac1", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5) // unknown DAC
MCFG_DEVICE_ADD("dac2", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) // 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)
+ voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref"));
+ vref.set_output(5.0);
+ 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);
MACHINE_CONFIG_END
ROM_START( rltennis )
diff --git a/src/mame/drivers/s11.cpp b/src/mame/drivers/s11.cpp
index 483dc5e6a31..7fa52dcc940 100644
--- a/src/mame/drivers/s11.cpp
+++ b/src/mame/drivers/s11.cpp
@@ -450,9 +450,8 @@ MACHINE_CONFIG_START(s11_state::s11)
MCFG_DEVICE_ADD("dac", MC1408, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5)
voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref"));
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);
- MCFG_SOUND_ROUTE(0, "dac1", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE(0, "dac1", -1.0, DAC_VREF_NEG_INPUT)
+ vref.add_route(0, "dac", 1.0, DAC_VREF_POS_INPUT); vref.add_route(0, "dac", -1.0, DAC_VREF_NEG_INPUT);
+ vref.add_route(0, "dac1", 1.0, DAC_VREF_POS_INPUT); vref.add_route(0, "dac1", -1.0, DAC_VREF_NEG_INPUT);
SPEAKER(config, "speech").front_center();
MCFG_DEVICE_ADD("hc55516", HC55516, 0)
diff --git a/src/mame/drivers/s11a.cpp b/src/mame/drivers/s11a.cpp
index f9a0956d7d6..43b3371f8ba 100644
--- a/src/mame/drivers/s11a.cpp
+++ b/src/mame/drivers/s11a.cpp
@@ -242,9 +242,8 @@ MACHINE_CONFIG_START(s11a_state::s11a)
MCFG_DEVICE_ADD("dac", MC1408, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25)
voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref"));
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);
- MCFG_SOUND_ROUTE(0, "dac1", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE(0, "dac1", -1.0, DAC_VREF_NEG_INPUT)
+ vref.add_route(0, "dac", 1.0, DAC_VREF_POS_INPUT); vref.add_route(0, "dac", -1.0, DAC_VREF_NEG_INPUT);
+ vref.add_route(0, "dac1", 1.0, DAC_VREF_POS_INPUT); vref.add_route(0, "dac1", -1.0, DAC_VREF_NEG_INPUT);
SPEAKER(config, "speech").front_center();
MCFG_DEVICE_ADD("hc55516", HC55516, 0)
diff --git a/src/mame/drivers/s11b.cpp b/src/mame/drivers/s11b.cpp
index f927c14814e..72b86268a83 100644
--- a/src/mame/drivers/s11b.cpp
+++ b/src/mame/drivers/s11b.cpp
@@ -318,9 +318,8 @@ MACHINE_CONFIG_START(s11b_state::s11b)
MCFG_DEVICE_ADD("dac", MC1408, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25)
voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref"));
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);
- MCFG_SOUND_ROUTE(0, "dac1", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE(0, "dac1", -1.0, DAC_VREF_NEG_INPUT)
+ vref.add_route(0, "dac", 1.0, DAC_VREF_POS_INPUT); vref.add_route(0, "dac", -1.0, DAC_VREF_NEG_INPUT);
+ vref.add_route(0, "dac1", 1.0, DAC_VREF_POS_INPUT); vref.add_route(0, "dac1", -1.0, DAC_VREF_NEG_INPUT);
SPEAKER(config, "speech").front_center();
MCFG_DEVICE_ADD("hc55516", HC55516, 0)
diff --git a/src/mame/drivers/s3.cpp b/src/mame/drivers/s3.cpp
index 7ba9f279b27..a508bea50c1 100644
--- a/src/mame/drivers/s3.cpp
+++ b/src/mame/drivers/s3.cpp
@@ -436,10 +436,11 @@ TIMER_DEVICE_CALLBACK_MEMBER( s3_state::irq )
m_t_c++;
}
-MACHINE_CONFIG_START(s3_state::s3)
+void s3_state::s3(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M6800, 3580000)
- MCFG_DEVICE_PROGRAM_MAP(s3_main_map)
+ M6800(config, m_maincpu, 3580000);
+ m_maincpu->set_addrmap(AS_PROGRAM, &s3_state::s3_main_map);
TIMER(config, "irq").configure_periodic(FUNC(s3_state::irq), attotime::from_hz(250));
MCFG_MACHINE_RESET_OVERRIDE(s3_state, s3)
@@ -486,17 +487,18 @@ MACHINE_CONFIG_START(s3_state::s3)
m_pia30->irqb_handler().set_inputline("maincpu", M6800_IRQ_LINE);
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(s3_state::s3a)
+void s3_state::s3a(machine_config &config)
+{
s3(config);
/* Add the soundcard */
- MCFG_DEVICE_ADD("audiocpu", M6802, 3580000)
- MCFG_DEVICE_PROGRAM_MAP(s3_audio_map)
+ M6802(config, m_audiocpu, 3580000);
+ m_audiocpu->set_addrmap(AS_PROGRAM, &s3_state::s3_audio_map);
MCFG_MACHINE_RESET_OVERRIDE(s3_state, s3a)
SPEAKER(config, "speaker").front_center();
- MCFG_DEVICE_ADD("dac", MC1408, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5)
+ MC1408(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 0.5);
voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref"));
vref.set_output(5.0);
vref.add_route(0, "dac", 1.0, DAC_VREF_POS_INPUT);
@@ -507,7 +509,7 @@ MACHINE_CONFIG_START(s3_state::s3a)
m_pias->writepa_handler().set("dac", FUNC(dac_byte_interface::data_w));
m_pias->irqa_handler().set_inputline("audiocpu", M6802_IRQ_LINE);
m_pias->irqb_handler().set_inputline("audiocpu", M6802_IRQ_LINE);
-MACHINE_CONFIG_END
+}
//***************************************** SYSTEM 3 ******************************************************
diff --git a/src/mame/drivers/s4.cpp b/src/mame/drivers/s4.cpp
index 7c75868a195..9edb22f9136 100644
--- a/src/mame/drivers/s4.cpp
+++ b/src/mame/drivers/s4.cpp
@@ -430,10 +430,11 @@ TIMER_DEVICE_CALLBACK_MEMBER( s4_state::irq )
m_t_c++;
}
-MACHINE_CONFIG_START(s4_state::s4)
+void s4_state::s4(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M6800, 3580000)
- MCFG_DEVICE_PROGRAM_MAP(s4_main_map)
+ M6800(config, m_maincpu, 3580000);
+ m_maincpu->set_addrmap(AS_PROGRAM, &s4_state::s4_main_map);
TIMER(config, "irq").configure_periodic(FUNC(s4_state::irq), attotime::from_hz(250));
MCFG_MACHINE_RESET_OVERRIDE(s4_state, s4)
@@ -480,17 +481,18 @@ MACHINE_CONFIG_START(s4_state::s4)
m_pia30->irqb_handler().set_inputline("maincpu", M6800_IRQ_LINE);
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(s4_state::s4a)
+void s4_state::s4a(machine_config &config)
+{
s4(config);
/* Add the soundcard */
- MCFG_DEVICE_ADD("audiocpu", M6808, 3580000)
- MCFG_DEVICE_PROGRAM_MAP(s4_audio_map)
+ M6808(config, m_audiocpu, 3580000);
+ m_audiocpu->set_addrmap(AS_PROGRAM, &s4_state::s4_audio_map);
MCFG_MACHINE_RESET_OVERRIDE(s4_state, s4a)
SPEAKER(config, "speaker").front_center();
- MCFG_DEVICE_ADD("dac", MC1408, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5)
+ MC1408(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 0.5);
voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref"));
vref.set_output(5.0);
vref.add_route(0, "dac", 1.0, DAC_VREF_POS_INPUT);
@@ -501,7 +503,7 @@ MACHINE_CONFIG_START(s4_state::s4a)
m_pias->writepa_handler().set("dac", FUNC(dac_byte_interface::data_w));
m_pias->irqa_handler().set_inputline("audiocpu", M6808_IRQ_LINE);
m_pias->irqb_handler().set_inputline("audiocpu", M6808_IRQ_LINE);
-MACHINE_CONFIG_END
+}
/*--------------------------------
diff --git a/src/mame/drivers/s6.cpp b/src/mame/drivers/s6.cpp
index 4f89d43330e..8ab3c872b26 100644
--- a/src/mame/drivers/s6.cpp
+++ b/src/mame/drivers/s6.cpp
@@ -409,10 +409,11 @@ void s6_state::init_s6()
m_irq_timer->adjust(attotime::from_ticks(980,3580000/4),1);
}
-MACHINE_CONFIG_START(s6_state::s6)
+void s6_state::s6(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M6808, 3580000) // 6802 or 6808 could be used here
- MCFG_DEVICE_PROGRAM_MAP(s6_main_map)
+ M6808(config, m_maincpu, 3580000); // 6802 or 6808 could be used here
+ m_maincpu->set_addrmap(AS_PROGRAM, &s6_state::s6_main_map);
MCFG_MACHINE_RESET_OVERRIDE(s6_state, s6)
/* Video */
@@ -458,19 +459,18 @@ MACHINE_CONFIG_START(s6_state::s6)
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
/* Add the soundcard */
- MCFG_DEVICE_ADD("audiocpu", M6802, 3580000)
- MCFG_DEVICE_PROGRAM_MAP(s6_audio_map)
+ M6802(config, m_audiocpu, 3580000);
+ m_audiocpu->set_addrmap(AS_PROGRAM, &s6_state::s6_audio_map);
SPEAKER(config, "speaker").front_center();
- MCFG_DEVICE_ADD("dac", MC1408, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5)
+ MC1408(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 0.5);
voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref"));
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);
SPEAKER(config, "speech").front_center();
- MCFG_DEVICE_ADD("hc55516", HC55516, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speech", 1.00)
+ HC55516(config, m_hc55516, 0).add_route(ALL_OUTPUTS, "speech", 1.00);
PIA6821(config, m_pias, 0);
m_pias->readpb_handler().set(FUNC(s6_state::sound_r));
@@ -479,7 +479,7 @@ MACHINE_CONFIG_START(s6_state::s6)
m_pias->cb2_handler().set(m_hc55516, FUNC(hc55516_device::clock_w));
m_pias->irqa_handler().set_inputline(m_audiocpu, M6802_IRQ_LINE); // FIXME: needs an input merger
m_pias->irqb_handler().set_inputline(m_audiocpu, M6802_IRQ_LINE);
-MACHINE_CONFIG_END
+}
/*--------------------------------
diff --git a/src/mame/drivers/s6a.cpp b/src/mame/drivers/s6a.cpp
index 141c7c09e15..368a858e748 100644
--- a/src/mame/drivers/s6a.cpp
+++ b/src/mame/drivers/s6a.cpp
@@ -392,10 +392,11 @@ void s6a_state::init_s6a()
m_irq_timer->adjust(attotime::from_ticks(980,3580000/4),1);
}
-MACHINE_CONFIG_START(s6a_state::s6a)
+void s6a_state::s6a(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M6808, 3580000)
- MCFG_DEVICE_PROGRAM_MAP(s6a_main_map)
+ M6808(config, m_maincpu, 3580000);
+ m_maincpu->set_addrmap(AS_PROGRAM, &s6a_state::s6a_main_map);
MCFG_MACHINE_RESET_OVERRIDE(s6a_state, s6a)
/* Video */
@@ -441,19 +442,18 @@ MACHINE_CONFIG_START(s6a_state::s6a)
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
/* Add the soundcard */
- MCFG_DEVICE_ADD("audiocpu", M6802, 3580000)
- MCFG_DEVICE_PROGRAM_MAP(s6a_audio_map)
+ M6802(config, m_audiocpu, 3580000);
+ m_audiocpu->set_addrmap(AS_PROGRAM, &s6a_state::s6a_audio_map);
SPEAKER(config, "speaker").front_center();
- MCFG_DEVICE_ADD("dac", MC1408, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5)
+ MC1408(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 0.5);
voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref"));
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);
SPEAKER(config, "speech").front_center();
- MCFG_DEVICE_ADD("hc55516", HC55516, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speech", 1.00)
+ HC55516(config, m_hc55516, 0).add_route(ALL_OUTPUTS, "speech", 1.00);
PIA6821(config, m_pias, 0);
m_pias->readpb_handler().set(FUNC(s6a_state::sound_r));
@@ -462,7 +462,7 @@ MACHINE_CONFIG_START(s6a_state::s6a)
m_pias->cb2_handler().set("hc55516", FUNC(hc55516_device::clock_w));
m_pias->irqa_handler().set_inputline("audiocpu", M6802_IRQ_LINE); // FIXME: needs an input merger
m_pias->irqb_handler().set_inputline("audiocpu", M6802_IRQ_LINE);
-MACHINE_CONFIG_END
+}
/*--------------------------
diff --git a/src/mame/drivers/s7.cpp b/src/mame/drivers/s7.cpp
index 3fdd8777e22..8de3f2b85e3 100644
--- a/src/mame/drivers/s7.cpp
+++ b/src/mame/drivers/s7.cpp
@@ -434,10 +434,11 @@ void s7_state::init_s7()
m_irq_timer->adjust(attotime::from_ticks(980,3580000/4),1);
}
-MACHINE_CONFIG_START(s7_state::s7)
+void s7_state::s7(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M6808, 3580000)
- MCFG_DEVICE_PROGRAM_MAP(s7_main_map)
+ M6808(config, m_maincpu, 3580000);
+ m_maincpu->set_addrmap(AS_PROGRAM, &s7_state::s7_main_map);
MCFG_MACHINE_RESET_OVERRIDE(s7_state, s7)
/* Video */
@@ -493,19 +494,18 @@ MACHINE_CONFIG_START(s7_state::s7)
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
/* Add the soundcard */
- MCFG_DEVICE_ADD("audiocpu", M6808, 3580000)
- MCFG_DEVICE_PROGRAM_MAP(s7_audio_map)
+ M6808(config, m_audiocpu, 3580000);
+ m_audiocpu->set_addrmap(AS_PROGRAM, &s7_state::s7_audio_map);
SPEAKER(config, "speaker").front_center();
- MCFG_DEVICE_ADD("dac", MC1408, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5)
+ MC1408(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 0.5);
voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref"));
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);
SPEAKER(config, "speech").front_center();
- MCFG_DEVICE_ADD("hc55516", HC55516, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speech", 1.00)
+ HC55516(config, m_hc55516, 0).add_route(ALL_OUTPUTS, "speech", 1.00);
PIA6821(config, m_pias, 0);
m_pias->readpb_handler().set(FUNC(s7_state::sound_r));
@@ -516,7 +516,7 @@ MACHINE_CONFIG_START(s7_state::s7)
m_pias->cb2_handler().set(m_hc55516, FUNC(hc55516_device::clock_w));
m_pias->irqa_handler().set_inputline(m_audiocpu, M6808_IRQ_LINE); // FIXME: needs an input merger
m_pias->irqb_handler().set_inputline(m_audiocpu, M6808_IRQ_LINE);
-MACHINE_CONFIG_END
+}
diff --git a/src/mame/drivers/s8.cpp b/src/mame/drivers/s8.cpp
index 8957d56dd13..9061941b2e0 100644
--- a/src/mame/drivers/s8.cpp
+++ b/src/mame/drivers/s8.cpp
@@ -317,10 +317,11 @@ void s8_state::init_s8()
m_irq_timer->adjust(attotime::from_ticks(980,1e6),1);
}
-MACHINE_CONFIG_START(s8_state::s8)
+void s8_state::s8(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M6802, XTAL(4'000'000))
- MCFG_DEVICE_PROGRAM_MAP(s8_main_map)
+ M6802(config, m_maincpu, XTAL(4'000'000));
+ m_maincpu->set_addrmap(AS_PROGRAM, &s8_state::s8_main_map);
MCFG_MACHINE_RESET_OVERRIDE(s8_state, s8)
/* Video */
@@ -364,11 +365,11 @@ MACHINE_CONFIG_START(s8_state::s8)
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
/* Add the soundcard */
- MCFG_DEVICE_ADD("audiocpu", M6808, XTAL(4'000'000))
- MCFG_DEVICE_PROGRAM_MAP(s8_audio_map)
+ M6808(config, m_audiocpu, XTAL(4'000'000));
+ m_audiocpu->set_addrmap(AS_PROGRAM, &s8_state::s8_audio_map);
SPEAKER(config, "speaker").front_center();
- MCFG_DEVICE_ADD("dac", MC1408, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5)
+ MC1408(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 0.5);
voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref"));
vref.set_output(5.0);
vref.add_route(0, "dac", 1.0, DAC_VREF_POS_INPUT);
@@ -379,7 +380,7 @@ MACHINE_CONFIG_START(s8_state::s8)
m_pias->writepb_handler().set("dac", FUNC(dac_byte_interface::data_w));
m_pias->irqa_handler().set_inputline("audiocpu", M6808_IRQ_LINE);
m_pias->irqa_handler().set_inputline("audiocpu", M6808_IRQ_LINE);
-MACHINE_CONFIG_END
+}
/*------------------------------
/ Pennant Fever (#526) 05/1984
diff --git a/src/mame/drivers/s8a.cpp b/src/mame/drivers/s8a.cpp
index 75316f551a7..34d1fb03604 100644
--- a/src/mame/drivers/s8a.cpp
+++ b/src/mame/drivers/s8a.cpp
@@ -289,10 +289,11 @@ void s8a_state::init_s8a()
m_irq_timer->adjust(attotime::from_ticks(980,1e6),1);
}
-MACHINE_CONFIG_START(s8a_state::s8a)
+void s8a_state::s8a(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M6802, XTAL(4'000'000))
- MCFG_DEVICE_PROGRAM_MAP(s8a_main_map)
+ M6802(config, m_maincpu, XTAL(4'000'000));
+ m_maincpu->set_addrmap(AS_PROGRAM, &s8a_state::s8a_main_map);
MCFG_MACHINE_RESET_OVERRIDE(s8a_state, s8a)
/* Video */
@@ -336,11 +337,11 @@ MACHINE_CONFIG_START(s8a_state::s8a)
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
/* Add the soundcard */
- MCFG_DEVICE_ADD("audiocpu", M6808, XTAL(4'000'000))
- MCFG_DEVICE_PROGRAM_MAP(s8a_audio_map)
+ M6808(config, m_audiocpu, XTAL(4'000'000));
+ m_audiocpu->set_addrmap(AS_PROGRAM, &s8a_state::s8a_audio_map);
SPEAKER(config, "speaker").front_center();
- MCFG_DEVICE_ADD("dac", MC1408, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5)
+ MC1408(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 0.5);
voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref"));
vref.set_output(5.0);
vref.add_route(0, "dac", 1.0, DAC_VREF_POS_INPUT);
@@ -351,7 +352,7 @@ MACHINE_CONFIG_START(s8a_state::s8a)
m_pias->writepb_handler().set("dac", FUNC(dac_byte_interface::data_w));
m_pias->irqa_handler().set_inputline("audiocpu", M6808_IRQ_LINE);
m_pias->irqa_handler().set_inputline("audiocpu", M6808_IRQ_LINE);
-MACHINE_CONFIG_END
+}
/*----------------------------
diff --git a/src/mame/drivers/s9.cpp b/src/mame/drivers/s9.cpp
index 8768bf0a070..cf38eccddd8 100644
--- a/src/mame/drivers/s9.cpp
+++ b/src/mame/drivers/s9.cpp
@@ -323,10 +323,11 @@ void s9_state::init_s9()
m_irq_timer->adjust(attotime::from_ticks(980,1e6),1);
}
-MACHINE_CONFIG_START(s9_state::s9)
+void s9_state::s9(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M6808, XTAL(4'000'000))
- MCFG_DEVICE_PROGRAM_MAP(s9_main_map)
+ M6808(config, m_maincpu, XTAL(4'000'000));
+ m_maincpu->set_addrmap(AS_PROGRAM, &s9_state::s9_main_map);
MCFG_MACHINE_RESET_OVERRIDE(s9_state, s9)
/* Video */
@@ -370,19 +371,18 @@ MACHINE_CONFIG_START(s9_state::s9)
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
/* Add the soundcard */
- MCFG_DEVICE_ADD("audiocpu", M6808, XTAL(4'000'000))
- MCFG_DEVICE_PROGRAM_MAP(s9_audio_map)
+ M6808(config, m_audiocpu, XTAL(4'000'000));
+ m_audiocpu->set_addrmap(AS_PROGRAM, &s9_state::s9_audio_map);
SPEAKER(config, "speaker").front_center();
- MCFG_DEVICE_ADD("dac", MC1408, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5)
+ MC1408(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 0.5);
voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref"));
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);
SPEAKER(config, "speech").front_center();
- MCFG_DEVICE_ADD("hc55516", HC55516, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speech", 1.00)
+ HC55516(config, m_hc55516, 0).add_route(ALL_OUTPUTS, "speech", 1.00);
PIA6821(config, m_pias, 0);
m_pias->readpa_handler().set(FUNC(s9_state::sound_r));
@@ -391,7 +391,7 @@ MACHINE_CONFIG_START(s9_state::s9)
m_pias->cb2_handler().set("hc55516", FUNC(hc55516_device::digit_w));
m_pias->irqa_handler().set_inputline("audiocpu", M6808_IRQ_LINE);
m_pias->irqa_handler().set_inputline("audiocpu", M6808_IRQ_LINE);
-MACHINE_CONFIG_END
+}
/*-----------------------------
/ Rat Race - Sys.9 (Game #527)- Prototype (displays as #500)
diff --git a/src/mame/drivers/sbrkout.cpp b/src/mame/drivers/sbrkout.cpp
index de61657e15e..0fae879d1cc 100644
--- a/src/mame/drivers/sbrkout.cpp
+++ b/src/mame/drivers/sbrkout.cpp
@@ -556,8 +556,8 @@ GFXDECODE_END
*
*************************************/
-MACHINE_CONFIG_START(sbrkout_state::sbrkout)
-
+void sbrkout_state::sbrkout(machine_config &config)
+{
/* basic machine hardware */
M6502(config, m_maincpu, MAIN_CLOCK/16); // 375 KHz? Should be 750KHz?
m_maincpu->set_addrmap(AS_PROGRAM, &sbrkout_state::main_map);
@@ -589,7 +589,7 @@ MACHINE_CONFIG_START(sbrkout_state::sbrkout)
SPEAKER(config, "speaker").front_center();
DAC_1BIT(config, m_dac, 0).add_route(ALL_OUTPUTS, "speaker", 0.99);
VOLTAGE_REGULATOR(config, "vref").set_output(5.0).add_route(0, m_dac, 1.0, DAC_VREF_POS_INPUT);
-MACHINE_CONFIG_END
+}
void sbrkoutct_state::sbrkoutct(machine_config &config)
diff --git a/src/mame/drivers/special.cpp b/src/mame/drivers/special.cpp
index 29fe2a40378..9d75b10eab5 100644
--- a/src/mame/drivers/special.cpp
+++ b/src/mame/drivers/special.cpp
@@ -384,8 +384,9 @@ MACHINE_CONFIG_START(special_state::special)
/* audio hardware */
SPEAKER(config, "speaker").front_center();
DAC_1BIT(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 0.0625);
- MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
- MCFG_SOUND_ROUTE(0, "dac", 1.0, DAC_VREF_POS_INPUT)
+ 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);
WAVE(config, "wave", m_cassette).add_route(ALL_OUTPUTS, "speaker", 0.25);
@@ -495,8 +496,9 @@ MACHINE_CONFIG_START(special_state::erik)
/* audio hardware */
SPEAKER(config, "speaker").front_center();
DAC_1BIT(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 0.0625);
- MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
- MCFG_SOUND_ROUTE(0, "dac", 1.0, DAC_VREF_POS_INPUT)
+ 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);
WAVE(config, "wave", m_cassette).add_route(ALL_OUTPUTS, "speaker", 0.25);
diff --git a/src/mame/drivers/taito.cpp b/src/mame/drivers/taito.cpp
index 466cb0926b0..eb3d87dc32d 100644
--- a/src/mame/drivers/taito.cpp
+++ b/src/mame/drivers/taito.cpp
@@ -350,13 +350,14 @@ TIMER_DEVICE_CALLBACK_MEMBER( taito_state::timer_a )
m_digits[++digit] = patterns[m_p_ram[m_out_offs++]&15];
}
-MACHINE_CONFIG_START(taito_state::taito)
+void taito_state::taito(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD(m_maincpu, I8080, 19000000/9)
- MCFG_DEVICE_PROGRAM_MAP(taito_map)
+ I8080(config, m_maincpu, 19000000/9);
+ m_maincpu->set_addrmap(AS_PROGRAM, &taito_state::taito_map);
- MCFG_DEVICE_ADD(m_cpu2, M6802, 1000000) // cpu & clock are a guess
- MCFG_DEVICE_PROGRAM_MAP(taito_sub_map)
+ M6802(config, m_cpu2, 1000000); // cpu & clock are a guess
+ m_cpu2->set_addrmap(AS_PROGRAM, &taito_state::taito_sub_map);
/* Video */
config.set_default_layout(layout_taito);
@@ -365,7 +366,7 @@ MACHINE_CONFIG_START(taito_state::taito)
genpin_audio(config);
SPEAKER(config, "speaker").front_center();
- MCFG_DEVICE_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.475) // unknown DAC
+ DAC_8BIT_R2R(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 0.475); // unknown DAC
voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref"));
vref.set_output(5.0);
vref.add_route(0, "dac", 1.0, DAC_VREF_POS_INPUT);
@@ -382,7 +383,7 @@ MACHINE_CONFIG_START(taito_state::taito)
m_pia->irqb_handler().set_inputline(m_cpu2, M6802_IRQ_LINE);
TIMER(config, "timer_a").configure_periodic(FUNC(taito_state::timer_a), attotime::from_hz(200));
-MACHINE_CONFIG_END
+}
void taito_state::shock(machine_config &config)
{
diff --git a/src/mame/drivers/tandy1t.cpp b/src/mame/drivers/tandy1t.cpp
index b5e398bd311..be4f6031903 100644
--- a/src/mame/drivers/tandy1t.cpp
+++ b/src/mame/drivers/tandy1t.cpp
@@ -688,13 +688,17 @@ MACHINE_CONFIG_START(tandy1000_state::tandy1000_common)
SOFTWARE_LIST(config, "pc_list").set_compatible("ibm5150");
MACHINE_CONFIG_END
-MACHINE_CONFIG_START(tandy1000_state::tandy1000_90key)
- MCFG_PC_KEYB_ADD("pc_keyboard", WRITELINE("mb:pic8259", pic8259_device, ir1_w))
-MACHINE_CONFIG_END
+void tandy1000_state::tandy1000_90key(machine_config &config)
+{
+ PC_KEYB(config, m_keyboard);
+ m_keyboard->keypress().set("mb:pic8259", FUNC(pic8259_device::ir1_w));
+}
-MACHINE_CONFIG_START(tandy1000_state::tandy1000_101key)
- MCFG_AT_KEYB_ADD("pc_keyboard", 1, WRITELINE("mb:pic8259", pic8259_device, ir1_w))
-MACHINE_CONFIG_END
+void tandy1000_state::tandy1000_101key(machine_config &config)
+{
+ AT_KEYB(config, m_keyboard, pc_keyboard_device::KEYBOARD_TYPE::AT, 1);
+ m_keyboard->keypress().set("mb:pic8259", FUNC(pic8259_device::ir1_w));
+}
MACHINE_CONFIG_START(tandy1000_state::t1000hx)
MCFG_DEVICE_ADD("maincpu", I8088, 8000000)
diff --git a/src/mame/drivers/terracre.cpp b/src/mame/drivers/terracre.cpp
index f08b89a34b6..6a922b8b0d1 100644
--- a/src/mame/drivers/terracre.cpp
+++ b/src/mame/drivers/terracre.cpp
@@ -487,9 +487,10 @@ MACHINE_CONFIG_START(terracre_state::ym3526)
MCFG_DEVICE_ADD("dac1", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5) // unknown DAC
MCFG_DEVICE_ADD("dac2", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5) // 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)
+ voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref"));
+ vref.set_output(5.0);
+ 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);
MACHINE_CONFIG_END
MACHINE_CONFIG_START(terracre_state::ym2203)
diff --git a/src/mame/drivers/thomson.cpp b/src/mame/drivers/thomson.cpp
index bb6b009e881..bb45817ba0c 100644
--- a/src/mame/drivers/thomson.cpp
+++ b/src/mame/drivers/thomson.cpp
@@ -649,9 +649,11 @@ MACHINE_CONFIG_START(thomson_state::to7_base)
SPEAKER(config, "speaker").front_center();
MCFG_DEVICE_ADD("buzzer", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5)
MCFG_DEVICE_ADD("dac", DAC_6BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5) // 6-bit game extension R-2R DAC (R=10K)
- MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
- MCFG_SOUND_ROUTE(0, "buzzer", 1.0, DAC_VREF_POS_INPUT)
- MCFG_SOUND_ROUTE(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
+ voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref"));
+ vref.set_output(5.0);
+ vref.add_route(0, "buzzer", 1.0, DAC_VREF_POS_INPUT);
+ vref.add_route(0, "dac", 1.0, DAC_VREF_POS_INPUT);
+ vref.add_route(0, "dac", -1.0, DAC_VREF_NEG_INPUT);
/* speech synthesis */
MCFG_DEVICE_ADD("mea8000", MEA8000, 3840000)
diff --git a/src/mame/drivers/tosh1000.cpp b/src/mame/drivers/tosh1000.cpp
index 380420e884a..68a195f8445 100644
--- a/src/mame/drivers/tosh1000.cpp
+++ b/src/mame/drivers/tosh1000.cpp
@@ -280,7 +280,7 @@ MACHINE_CONFIG_START(tosh1000_state::tosh1000)
// SOFTWARE_LIST(config, "flop_list").set_original("tosh1000");
// uses a 80C50 instead of 8042 for KBDC
- MCFG_PC_KBDC_SLOT_ADD("mb:pc_kbdc", "kbd", pc_xt_keyboards, STR_KBD_KEYTRONIC_PC3270)
+ PC_KBDC_SLOT(config, "kbd", pc_xt_keyboards, STR_KBD_KEYTRONIC_PC3270).set_pc_kbdc_slot(subdevice("mb:pc_kbdc"));
RAM(config, RAM_TAG).set_default_size("512K");
diff --git a/src/mame/drivers/truco.cpp b/src/mame/drivers/truco.cpp
index c3b9d09b7f9..dcbd0815e05 100644
--- a/src/mame/drivers/truco.cpp
+++ b/src/mame/drivers/truco.cpp
@@ -454,8 +454,9 @@ MACHINE_CONFIG_START(truco_state::truco)
/* sound hardware */
SPEAKER(config, "speaker").front_center();
MCFG_DEVICE_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.4)
- MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
- MCFG_SOUND_ROUTE(0, "dac", 1.0, DAC_VREF_POS_INPUT)
+ 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);
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/tsamurai.cpp b/src/mame/drivers/tsamurai.cpp
index 1d8d5cf0d89..f5f9786d076 100644
--- a/src/mame/drivers/tsamurai.cpp
+++ b/src/mame/drivers/tsamurai.cpp
@@ -760,9 +760,10 @@ MACHINE_CONFIG_START(tsamurai_state::tsamurai)
MCFG_DEVICE_ADD("dac1", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.1) // unknown DAC
MCFG_DEVICE_ADD("dac2", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.1) // 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)
+ voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref"));
+ vref.set_output(5.0);
+ 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);
MACHINE_CONFIG_END
@@ -864,9 +865,10 @@ MACHINE_CONFIG_START(tsamurai_state::m660)
MCFG_DEVICE_ADD("dac1", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.1) // unknown DAC
MCFG_DEVICE_ADD("dac2", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.1) // 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)
+ voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref"));
+ vref.set_output(5.0);
+ 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);
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/tsispch.cpp b/src/mame/drivers/tsispch.cpp
index df3dbf5aaa4..60802dcb51b 100644
--- a/src/mame/drivers/tsispch.cpp
+++ b/src/mame/drivers/tsispch.cpp
@@ -369,7 +369,8 @@ INPUT_PORTS_END
/******************************************************************************
Machine Drivers
******************************************************************************/
-MACHINE_CONFIG_START(tsispch_state::prose2k)
+void tsispch_state::prose2k(machine_config &config)
+{
/* basic machine hardware */
/* There are two crystals on the board: a 24MHz xtal at Y2 and a 16MHz xtal at Y1 */
I8086(config, m_maincpu, 8000000); /* VERIFIED clock, unknown divider */
@@ -405,7 +406,7 @@ MACHINE_CONFIG_START(tsispch_state::prose2k)
/* sound hardware */
SPEAKER(config, "speaker").front_center();
- MCFG_DEVICE_ADD("dac", DAC_12BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0) // unknown DAC (TODO: correctly figure out how the DAC works; apparently it is connected to the serial output of the upd7720, which will be "fun" to connect up)
+ DAC_12BIT_R2R(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 1.0); // unknown DAC (TODO: correctly figure out how the DAC works; apparently it is connected to the serial output of the upd7720, which will be "fun" to connect up)
voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref"));
vref.set_output(5.0);
vref.add_route(0, "dac", 1.0, DAC_VREF_POS_INPUT);
@@ -415,7 +416,7 @@ MACHINE_CONFIG_START(tsispch_state::prose2k)
rs232.rxd_handler().set("i8251a_u15", FUNC(i8251_device::write_rxd));
rs232.dsr_handler().set("i8251a_u15", FUNC(i8251_device::write_dsr));
rs232.cts_handler().set("i8251a_u15", FUNC(i8251_device::write_cts));
-MACHINE_CONFIG_END
+}
/******************************************************************************
ROM Definitions
diff --git a/src/mame/drivers/ut88.cpp b/src/mame/drivers/ut88.cpp
index f57ffcbf960..462e99c6871 100644
--- a/src/mame/drivers/ut88.cpp
+++ b/src/mame/drivers/ut88.cpp
@@ -210,8 +210,9 @@ MACHINE_CONFIG_START(ut88_state::ut88)
/* audio hardware */
SPEAKER(config, "speaker").front_center();
DAC_1BIT(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 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)
+ 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);
WAVE(config, "wave", m_cassette).add_route(ALL_OUTPUTS, "speaker", 0.25);
diff --git a/src/mame/drivers/vg5k.cpp b/src/mame/drivers/vg5k.cpp
index 22608192b48..c9f502ea87b 100644
--- a/src/mame/drivers/vg5k.cpp
+++ b/src/mame/drivers/vg5k.cpp
@@ -394,8 +394,9 @@ MACHINE_CONFIG_START(vg5k_state::vg5k)
/* sound hardware */
SPEAKER(config, "speaker").front_center();
DAC_1BIT(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 0.125);
- MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
- MCFG_SOUND_ROUTE(0, "dac", 1.0, DAC_VREF_POS_INPUT)
+ 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);
/* cassette */
WAVE(config, "wave", m_cassette).add_route(0, "speaker", 0.25);
diff --git a/src/mame/drivers/wheelfir.cpp b/src/mame/drivers/wheelfir.cpp
index b8945f3c4eb..a07ab00b4a2 100644
--- a/src/mame/drivers/wheelfir.cpp
+++ b/src/mame/drivers/wheelfir.cpp
@@ -771,9 +771,10 @@ MACHINE_CONFIG_START(wheelfir_state::wheelfir)
SPEAKER(config, "rspeaker").front_right();
MCFG_DEVICE_ADD("ldac", DAC_10BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0) // unknown DAC
MCFG_DEVICE_ADD("rdac", DAC_10BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0) // unknown DAC
- MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
- MCFG_SOUND_ROUTE(0, "ldac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE(0, "ldac", -1.0, DAC_VREF_NEG_INPUT)
- MCFG_SOUND_ROUTE(0, "rdac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE(0, "rdac", -1.0, DAC_VREF_NEG_INPUT)
+ voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref"));
+ vref.set_output(5.0);
+ vref.add_route(0, "ldac", 1.0, DAC_VREF_POS_INPUT); vref.add_route(0, "ldac", -1.0, DAC_VREF_NEG_INPUT);
+ vref.add_route(0, "rdac", 1.0, DAC_VREF_POS_INPUT); vref.add_route(0, "rdac", -1.0, DAC_VREF_NEG_INPUT);
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/williams.cpp b/src/mame/drivers/williams.cpp
index bc01cd3c2fa..866264f8b8d 100644
--- a/src/mame/drivers/williams.cpp
+++ b/src/mame/drivers/williams.cpp
@@ -1730,9 +1730,10 @@ MACHINE_CONFIG_START(blaster_state::blaster)
SPEAKER(config, "rspeaker").front_right();
MCFG_DEVICE_ADD("ldac", MC1408, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.25) // unknown DAC
MCFG_DEVICE_ADD("rdac", MC1408, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.25) // unknown DAC
- MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
- MCFG_SOUND_ROUTE(0, "ldac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE(0, "ldac", -1.0, DAC_VREF_NEG_INPUT)
- MCFG_SOUND_ROUTE(0, "rdac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE(0, "rdac", -1.0, DAC_VREF_NEG_INPUT)
+ voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref"));
+ vref.set_output(5.0);
+ vref.add_route(0, "ldac", 1.0, DAC_VREF_POS_INPUT); vref.add_route(0, "ldac", -1.0, DAC_VREF_NEG_INPUT);
+ vref.add_route(0, "rdac", 1.0, DAC_VREF_POS_INPUT); vref.add_route(0, "rdac", -1.0, DAC_VREF_NEG_INPUT);
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/xtheball.cpp b/src/mame/drivers/xtheball.cpp
index 7c3845d26f0..180189f2a7e 100644
--- a/src/mame/drivers/xtheball.cpp
+++ b/src/mame/drivers/xtheball.cpp
@@ -291,8 +291,8 @@ INPUT_PORTS_END
*
*************************************/
-MACHINE_CONFIG_START(xtheball_state::xtheball)
-
+void xtheball_state::xtheball(machine_config &config)
+{
TMS34010(config, m_maincpu, 40000000);
m_maincpu->set_addrmap(AS_PROGRAM, &xtheball_state::main_map);
m_maincpu->set_halt_on_reset(false);
@@ -324,19 +324,19 @@ MACHINE_CONFIG_START(xtheball_state::xtheball)
/* video hardware */
TLC34076(config, m_tlc34076, tlc34076_device::TLC34076_6_BIT);
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_RAW_PARAMS(10000000, 640, 114, 626, 257, 24, 248)
- MCFG_SCREEN_UPDATE_DEVICE("maincpu", tms34010_device, tms340x0_rgb32)
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_raw(10000000, 640, 114, 626, 257, 24, 248);
+ screen.set_screen_update("maincpu", FUNC(tms34010_device::tms340x0_rgb32));
/* sound hardware */
SPEAKER(config, "speaker").front_center();
- MCFG_DEVICE_ADD("dac", ZN428E, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5)
+ ZN428E(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 0.5);
voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref"));
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);
-MACHINE_CONFIG_END
+}
diff --git a/src/mame/machine/inder_sb.cpp b/src/mame/machine/inder_sb.cpp
index 0149c180291..58840f839a8 100644
--- a/src/mame/machine/inder_sb.cpp
+++ b/src/mame/machine/inder_sb.cpp
@@ -150,7 +150,8 @@ void inder_sb_device::sound_io(address_map &map)
}
-MACHINE_CONFIG_START(inder_sb_device::device_add_mconfig)
+void inder_sb_device::device_add_mconfig(machine_config &config)
+{
Z80(config, m_audiocpu, 8000000); // unk freq
m_audiocpu->set_daisy_config(daisy_chain);
m_audiocpu->set_addrmap(AS_PROGRAM, &inder_sb_device::sound_map);
@@ -161,20 +162,21 @@ MACHINE_CONFIG_START(inder_sb_device::device_add_mconfig)
m_ctc->intr_callback().set_inputline(m_audiocpu, 0);
SPEAKER(config, "speaker").front_center();
- MCFG_DEVICE_ADD("dac0", DAC_8BIT_R2R_TWOS_COMPLEMENT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5) // unknown DAC
- MCFG_DEVICE_ADD("dac1", DAC_8BIT_R2R_TWOS_COMPLEMENT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5) // unknown DAC
- MCFG_DEVICE_ADD("dac2", DAC_8BIT_R2R_TWOS_COMPLEMENT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5) // unknown DAC
- MCFG_DEVICE_ADD("dac3", DAC_8BIT_R2R_TWOS_COMPLEMENT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5) // unknown DAC
- MCFG_DEVICE_ADD("dac0vol", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(0, "dac0", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE(0, "dac0", -1.0, DAC_VREF_NEG_INPUT) // unknown DAC
- MCFG_DEVICE_ADD("dac1vol", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(0, "dac1", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE(0, "dac1", -1.0, DAC_VREF_NEG_INPUT) // unknown DAC
- MCFG_DEVICE_ADD("dac2vol", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(0, "dac2", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE(0, "dac2", -1.0, DAC_VREF_NEG_INPUT) // unknown DAC
- MCFG_DEVICE_ADD("dac3vol", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(0, "dac3", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE(0, "dac3", -1.0, DAC_VREF_NEG_INPUT) // unknown DAC
- MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
- MCFG_SOUND_ROUTE(0, "dac0vol", 1.0, DAC_VREF_POS_INPUT)
- MCFG_SOUND_ROUTE(0, "dac1vol", 1.0, DAC_VREF_POS_INPUT)
- MCFG_SOUND_ROUTE(0, "dac2vol", 1.0, DAC_VREF_POS_INPUT)
- MCFG_SOUND_ROUTE(0, "dac3vol", 1.0, DAC_VREF_POS_INPUT)
-MACHINE_CONFIG_END
+ DAC_8BIT_R2R_TWOS_COMPLEMENT(config, "dac0", 0).add_route(ALL_OUTPUTS, "speaker", 0.5); // unknown DAC
+ DAC_8BIT_R2R_TWOS_COMPLEMENT(config, "dac1", 0).add_route(ALL_OUTPUTS, "speaker", 0.5); // unknown DAC
+ DAC_8BIT_R2R_TWOS_COMPLEMENT(config, "dac2", 0).add_route(ALL_OUTPUTS, "speaker", 0.5); // unknown DAC
+ DAC_8BIT_R2R_TWOS_COMPLEMENT(config, "dac3", 0).add_route(ALL_OUTPUTS, "speaker", 0.5); // unknown DAC
+ DAC_8BIT_R2R(config, "dac0vol", 0).add_route(0, "dac0", 1.0, DAC_VREF_POS_INPUT).add_route(0, "dac0", -1.0, DAC_VREF_NEG_INPUT); // unknown DAC
+ DAC_8BIT_R2R(config, "dac1vol", 0).add_route(0, "dac1", 1.0, DAC_VREF_POS_INPUT).add_route(0, "dac1", -1.0, DAC_VREF_NEG_INPUT); // unknown DAC
+ DAC_8BIT_R2R(config, "dac2vol", 0).add_route(0, "dac2", 1.0, DAC_VREF_POS_INPUT).add_route(0, "dac2", -1.0, DAC_VREF_NEG_INPUT); // unknown DAC
+ DAC_8BIT_R2R(config, "dac3vol", 0).add_route(0, "dac3", 1.0, DAC_VREF_POS_INPUT).add_route(0, "dac3", -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, "dac0vol", 1.0, DAC_VREF_POS_INPUT);
+ 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);
+}
void inder_sb_device::device_start()