summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Ivan Vangelista <mesgnet@yahoo.it>2019-01-22 17:47:37 +0100
committer Ivan Vangelista <mesgnet@yahoo.it>2019-01-22 17:47:37 +0100
commit064847316c75dfc448f2b2b0e53a874a24f23cdf (patch)
treeb546037d288ea1fdcc495bbfc539720c78d3d466
parenta6f64287a3acbcb6ee629774918407be30807237 (diff)
magedev\cassette: removed MCFG macros (nw)
-rw-r--r--src/devices/bus/a1bus/a1cassette.cpp11
-rw-r--r--src/devices/bus/a800/cassette.cpp13
-rw-r--r--src/devices/bus/adamnet/ddp.cpp27
-rw-r--r--src/devices/bus/cpc/doubler.cpp13
-rw-r--r--src/devices/bus/einstein/pipe/speculator.cpp13
-rw-r--r--src/devices/bus/nes_ctrl/fckeybrd.cpp11
-rw-r--r--src/devices/bus/pet/c2n.cpp13
-rw-r--r--src/devices/bus/sg1000_exp/sk1100.cpp8
-rw-r--r--src/devices/bus/vcs/scharger.cpp18
-rw-r--r--src/devices/imagedev/cassette.h21
-rw-r--r--src/devices/machine/genpc.cpp4
-rw-r--r--src/mame/drivers/a5105.cpp2
-rw-r--r--src/mame/drivers/abc80.cpp8
-rw-r--r--src/mame/drivers/abc80x.cpp4
-rw-r--r--src/mame/drivers/ac1.cpp2
-rw-r--r--src/mame/drivers/acrnsys1.cpp13
-rw-r--r--src/mame/drivers/agat.cpp4
-rw-r--r--src/mame/drivers/aim65.cpp10
-rw-r--r--src/mame/drivers/alesis.cpp6
-rw-r--r--src/mame/drivers/alphatro.cpp6
-rw-r--r--src/mame/drivers/amstrad.cpp20
-rw-r--r--src/mame/drivers/apf.cpp10
-rw-r--r--src/mame/drivers/apple2.cpp6
-rw-r--r--src/mame/drivers/apple2e.cpp4
-rw-r--r--src/mame/drivers/applix.cpp6
-rw-r--r--src/mame/drivers/aquarius.cpp4
-rw-r--r--src/mame/drivers/asst128.cpp3
-rw-r--r--src/mame/drivers/atom.cpp16
-rw-r--r--src/mame/drivers/bcs3.cpp4
-rw-r--r--src/mame/drivers/bmjr.cpp2
-rw-r--r--src/mame/drivers/bml3.cpp2
-rw-r--r--src/mame/drivers/c80.cpp11
-rw-r--r--src/mame/drivers/camplynx.cpp16
-rw-r--r--src/mame/drivers/cgenie.cpp8
-rw-r--r--src/mame/drivers/coco12.cpp14
-rw-r--r--src/mame/drivers/coco3.cpp10
-rw-r--r--src/mame/drivers/cosmicos.cpp4
-rw-r--r--src/mame/drivers/cp1.cpp9
-rw-r--r--src/mame/drivers/d6800.cpp6
-rw-r--r--src/mame/drivers/dai.cpp8
-rw-r--r--src/mame/drivers/dragon.cpp8
-rw-r--r--src/mame/drivers/e100.cpp4
-rw-r--r--src/mame/drivers/elf.cpp11
-rw-r--r--src/mame/drivers/elwro800.cpp8
-rw-r--r--src/mame/drivers/emma2.cpp15
-rw-r--r--src/mame/drivers/et3400.cpp15
-rw-r--r--src/mame/drivers/eti660.cpp4
-rw-r--r--src/mame/drivers/excali64.cpp2
-rw-r--r--src/mame/drivers/fc100.cpp8
-rw-r--r--src/mame/drivers/fm7.cpp50
-rw-r--r--src/mame/drivers/fp1100.cpp4
-rw-r--r--src/mame/drivers/galaxy.cpp18
-rw-r--r--src/mame/drivers/hec2hrp.cpp36
-rw-r--r--src/mame/drivers/homelab.cpp12
-rw-r--r--src/mame/drivers/huebler.cpp4
-rw-r--r--src/mame/drivers/hx20.cpp2
-rw-r--r--src/mame/drivers/ibmpcjr.cpp4
-rw-r--r--src/mame/drivers/interact.cpp16
-rw-r--r--src/mame/drivers/intv.cpp2
-rw-r--r--src/mame/drivers/iq151.cpp6
-rw-r--r--src/mame/drivers/jtc.cpp4
-rw-r--r--src/mame/drivers/jupace.cpp10
-rw-r--r--src/mame/drivers/kc.cpp20
-rw-r--r--src/mame/drivers/kim1.cpp8
-rw-r--r--src/mame/drivers/lc80.cpp8
-rw-r--r--src/mame/drivers/lviv.cpp10
-rw-r--r--src/mame/drivers/m5.cpp8
-rw-r--r--src/mame/drivers/mbee.cpp12
-rw-r--r--src/mame/drivers/mc10.cpp16
-rw-r--r--src/mame/drivers/mc1000.cpp6
-rw-r--r--src/mame/drivers/mc1502.cpp6
-rw-r--r--src/mame/drivers/mekd2.cpp13
-rw-r--r--src/mame/drivers/meritum.cpp2
-rw-r--r--src/mame/drivers/microtan.cpp2
-rw-r--r--src/mame/drivers/mikro80.cpp10
-rw-r--r--src/mame/drivers/mikrosha.cpp8
-rw-r--r--src/mame/drivers/mkit09.cpp22
-rw-r--r--src/mame/drivers/mpf1.cpp40
-rw-r--r--src/mame/drivers/msx.cpp30
-rw-r--r--src/mame/drivers/mtx.cpp6
-rw-r--r--src/mame/drivers/mycom.cpp2
-rw-r--r--src/mame/drivers/mz2000.cpp10
-rw-r--r--src/mame/drivers/mz700.cpp8
-rw-r--r--src/mame/drivers/mz80.cpp6
-rw-r--r--src/mame/drivers/ondra.cpp8
-rw-r--r--src/mame/drivers/orao.cpp8
-rw-r--r--src/mame/drivers/pc6001.cpp14
-rw-r--r--src/mame/drivers/pc8001.cpp8
-rw-r--r--src/mame/drivers/pc8801.cpp4
-rw-r--r--src/mame/drivers/pcm.cpp2
-rw-r--r--src/mame/drivers/pegasus.cpp6
-rw-r--r--src/mame/drivers/pencil2.cpp6
-rw-r--r--src/mame/drivers/phc25.cpp10
-rw-r--r--src/mame/drivers/pk8000.cpp8
-rw-r--r--src/mame/drivers/pk8020.cpp3
-rw-r--r--src/mame/drivers/poisk1.cpp4
-rw-r--r--src/mame/drivers/poly88.cpp8
-rw-r--r--src/mame/drivers/poly880.cpp15
-rw-r--r--src/mame/drivers/primo.cpp10
-rw-r--r--src/mame/drivers/pro80.cpp13
-rw-r--r--src/mame/drivers/proteus3.cpp6
-rw-r--r--src/mame/drivers/pv2000.cpp6
-rw-r--r--src/mame/drivers/px4.cpp4
-rw-r--r--src/mame/drivers/px8.cpp6
-rw-r--r--src/mame/drivers/radio86.cpp8
-rw-r--r--src/mame/drivers/rm380z.cpp6
-rw-r--r--src/mame/drivers/rx78.cpp2
-rw-r--r--src/mame/drivers/sorcerer.cpp20
-rw-r--r--src/mame/drivers/spc1000.cpp10
-rw-r--r--src/mame/drivers/spc1500.cpp10
-rw-r--r--src/mame/drivers/special.cpp20
-rw-r--r--src/mame/drivers/svi318.cpp10
-rw-r--r--src/mame/drivers/tavernie.cpp2
-rw-r--r--src/mame/drivers/tec1.cpp13
-rw-r--r--src/mame/drivers/thomson.cpp77
-rw-r--r--src/mame/drivers/tiki100.cpp4
-rw-r--r--src/mame/drivers/tk2000.cpp4
-rw-r--r--src/mame/drivers/tmc1800.cpp16
-rw-r--r--src/mame/drivers/tmc600.cpp4
-rw-r--r--src/mame/drivers/trs80.cpp9
-rw-r--r--src/mame/drivers/trs80m3.cpp8
-rw-r--r--src/mame/drivers/tvc.cpp8
-rw-r--r--src/mame/drivers/ut88.cpp20
-rw-r--r--src/mame/drivers/vg5k.cpp10
-rw-r--r--src/mame/drivers/vip.cpp6
-rw-r--r--src/mame/drivers/vtech2.cpp8
-rw-r--r--src/mame/drivers/x07.cpp10
-rw-r--r--src/mame/drivers/x1.cpp10
-rw-r--r--src/mame/drivers/x1twin.cpp10
-rw-r--r--src/mame/drivers/z1013.cpp4
-rw-r--r--src/mame/drivers/z80ne.cpp36
-rw-r--r--src/mame/drivers/z9001.cpp2
-rw-r--r--src/mame/includes/hec2hrp.h4
-rw-r--r--src/mame/machine/coco_vhd.cpp2
-rw-r--r--src/mame/machine/coco_vhd.h16
135 files changed, 686 insertions, 698 deletions
diff --git a/src/devices/bus/a1bus/a1cassette.cpp b/src/devices/bus/a1bus/a1cassette.cpp
index 5605e156304..13140382f48 100644
--- a/src/devices/bus/a1bus/a1cassette.cpp
+++ b/src/devices/bus/a1bus/a1cassette.cpp
@@ -36,11 +36,12 @@ ROM_END
/* sound output */
-MACHINE_CONFIG_START(a1bus_cassette_device::device_add_mconfig)
- MCFG_CASSETTE_ADD("cassette")
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED)
- MCFG_CASSETTE_INTERFACE("apple1_cass")
-MACHINE_CONFIG_END
+void a1bus_cassette_device::device_add_mconfig(machine_config &config)
+{
+ CASSETTE(config, m_cassette);
+ m_cassette->set_default_state(CASSETTE_STOPPED);
+ m_cassette->set_interface("apple1_cass");
+}
const tiny_rom_entry *a1bus_cassette_device::device_rom_region() const
{
diff --git a/src/devices/bus/a800/cassette.cpp b/src/devices/bus/a800/cassette.cpp
index 1545cf434c7..fb08819e5ae 100644
--- a/src/devices/bus/a800/cassette.cpp
+++ b/src/devices/bus/a800/cassette.cpp
@@ -28,12 +28,13 @@ TODO:
DEFINE_DEVICE_TYPE(A8SIO_CASSETTE, a8sio_cassette_device, "a8sio_cass", "Atari 8 bit cassette")
const device_timer_id TIMER_CASSETTE_READ = 1;
-MACHINE_CONFIG_START(a8sio_cassette_device::device_add_mconfig)
- MCFG_CASSETTE_ADD("cassette")
- //MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED)
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY)
- MCFG_CASSETTE_INTERFACE("atari8bit_cass")
-MACHINE_CONFIG_END
+void a8sio_cassette_device::device_add_mconfig(machine_config &config)
+{
+ CASSETTE(config, m_cassette);
+ //m_cassette->set_default_state(CASSETTE_STOPPED);
+ m_cassette->set_default_state(CASSETTE_PLAY);
+ m_cassette->set_interface("atari8bit_cass");
+}
//**************************************************************************
// LIVE DEVICE
diff --git a/src/devices/bus/adamnet/ddp.cpp b/src/devices/bus/adamnet/ddp.cpp
index cf267e95a36..ede3719c910 100644
--- a/src/devices/bus/adamnet/ddp.cpp
+++ b/src/devices/bus/adamnet/ddp.cpp
@@ -70,7 +70,8 @@ static const struct CassetteOptions adam_cassette_options =
// device_add_mconfig - add device configuration
//-------------------------------------------------
-MACHINE_CONFIG_START(adam_digital_data_pack_device::device_add_mconfig)
+void adam_digital_data_pack_device::device_add_mconfig(machine_config &config)
+{
M6801(config, m_maincpu, XTAL(4'000'000));
m_maincpu->set_addrmap(AS_PROGRAM, &adam_digital_data_pack_device::adam_ddp_mem);
m_maincpu->out_p1_cb().set(FUNC(adam_digital_data_pack_device::p1_w));
@@ -79,18 +80,18 @@ MACHINE_CONFIG_START(adam_digital_data_pack_device::device_add_mconfig)
// Port 3 = Multiplexed Address/Data
m_maincpu->in_p4_cb().set(FUNC(adam_digital_data_pack_device::p4_r));
- MCFG_CASSETTE_ADD("cassette")
- MCFG_CASSETTE_FORMATS(coleco_adam_cassette_formats)
- MCFG_CASSETTE_CREATE_OPTS(&adam_cassette_options)
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_MUTED)
- MCFG_CASSETTE_INTERFACE("adam_cass")
-
- MCFG_CASSETTE_ADD("cassette2")
- MCFG_CASSETTE_FORMATS(coleco_adam_cassette_formats)
- MCFG_CASSETTE_CREATE_OPTS(&adam_cassette_options)
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_MUTED)
- MCFG_CASSETTE_INTERFACE("adam_cass")
-MACHINE_CONFIG_END
+ CASSETTE(config, m_ddp0);
+ m_ddp0->set_formats(coleco_adam_cassette_formats);
+ m_ddp0->set_create_opts(&adam_cassette_options);
+ m_ddp0->set_default_state(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_MUTED);
+ m_ddp0->set_interface("adam_cass");
+
+ CASSETTE(config, m_ddp1);
+ m_ddp1->set_formats(coleco_adam_cassette_formats);
+ m_ddp1->set_create_opts(&adam_cassette_options);
+ m_ddp1->set_default_state(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_MUTED);
+ m_ddp1->set_interface("adam_cass");
+}
diff --git a/src/devices/bus/cpc/doubler.cpp b/src/devices/bus/cpc/doubler.cpp
index ce89c0819dd..e9ed2e5b5f4 100644
--- a/src/devices/bus/cpc/doubler.cpp
+++ b/src/devices/bus/cpc/doubler.cpp
@@ -16,14 +16,15 @@
DEFINE_DEVICE_TYPE(CPC_DOUBLER, cpc_doubler_device, "cpc_doubler", "Draysoft Doubler")
-MACHINE_CONFIG_START(cpc_doubler_device::device_add_mconfig)
- MCFG_CASSETTE_ADD( "doubler_tape" )
- MCFG_CASSETTE_FORMATS(cdt_cassette_formats)
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED)
- MCFG_CASSETTE_INTERFACE("cpc_cass")
+void cpc_doubler_device::device_add_mconfig(machine_config &config)
+{
+ CASSETTE(config, m_tape);
+ m_tape->set_formats(cdt_cassette_formats);
+ m_tape->set_default_state(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED);
+ m_tape->set_interface("cpc_cass");
// no pass-through seen on remake PCBs, unknown if actual hardware had a pass-through port or not
-MACHINE_CONFIG_END
+}
//**************************************************************************
diff --git a/src/devices/bus/einstein/pipe/speculator.cpp b/src/devices/bus/einstein/pipe/speculator.cpp
index 75519847e16..ed35973ab12 100644
--- a/src/devices/bus/einstein/pipe/speculator.cpp
+++ b/src/devices/bus/einstein/pipe/speculator.cpp
@@ -25,7 +25,8 @@ DEFINE_DEVICE_TYPE(EINSTEIN_SPECULATOR, einstein_speculator_device, "einstein_sp
// device_add_mconfig - add device configuration
//-------------------------------------------------
-MACHINE_CONFIG_START(einstein_speculator_device::device_add_mconfig)
+void einstein_speculator_device::device_add_mconfig(machine_config &config)
+{
TTL74123(config, m_ic5a, 0);
m_ic5a->set_connection_type(TTL74123_NOT_GROUNDED_NO_DIODE);
m_ic5a->set_resistor_value(RES_K(47));
@@ -48,11 +49,11 @@ MACHINE_CONFIG_START(einstein_speculator_device::device_add_mconfig)
WAVE(config, "wave", m_cassette).add_route(ALL_OUTPUTS, "mono", 0.25);
SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 0.50);
- MCFG_CASSETTE_ADD(m_cassette)
- MCFG_CASSETTE_FORMATS(tzx_cassette_formats)
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED)
- MCFG_CASSETTE_INTERFACE("spectrum_cass")
-MACHINE_CONFIG_END
+ CASSETTE(config, m_cassette);
+ m_cassette->set_formats(tzx_cassette_formats);
+ m_cassette->set_default_state(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED);
+ m_cassette->set_interface("spectrum_cass");
+}
//**************************************************************************
diff --git a/src/devices/bus/nes_ctrl/fckeybrd.cpp b/src/devices/bus/nes_ctrl/fckeybrd.cpp
index 9c81fbea67e..5633254c8fb 100644
--- a/src/devices/bus/nes_ctrl/fckeybrd.cpp
+++ b/src/devices/bus/nes_ctrl/fckeybrd.cpp
@@ -123,11 +123,12 @@ ioport_constructor nes_fckeybrd_device::device_input_ports() const
// device_add_mconfig - add device configuration
//-------------------------------------------------
-MACHINE_CONFIG_START(nes_fckeybrd_device::device_add_mconfig)
- MCFG_CASSETTE_ADD("tape")
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED)
- MCFG_CASSETTE_INTERFACE("fc_cass")
-MACHINE_CONFIG_END
+void nes_fckeybrd_device::device_add_mconfig(machine_config &config)
+{
+ CASSETTE(config, m_cassette);
+ m_cassette->set_default_state(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED);
+ m_cassette->set_interface("fc_cass");
+}
//**************************************************************************
diff --git a/src/devices/bus/pet/c2n.cpp b/src/devices/bus/pet/c2n.cpp
index 1212f46c3ca..e7ac6e27c28 100644
--- a/src/devices/bus/pet/c2n.cpp
+++ b/src/devices/bus/pet/c2n.cpp
@@ -24,12 +24,13 @@ DEFINE_DEVICE_TYPE(C1531, c1531_device, "c1531", "Commodore 1531 Datassette")
// device_add_mconfig - add device configuration
//-------------------------------------------------
-MACHINE_CONFIG_START(c2n_device::device_add_mconfig)
- MCFG_CASSETTE_ADD("cassette" )
- MCFG_CASSETTE_FORMATS(cbm_cassette_formats)
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_MUTED)
- MCFG_CASSETTE_INTERFACE("cbm_cass")
-MACHINE_CONFIG_END
+void c2n_device::device_add_mconfig(machine_config &config)
+{
+ CASSETTE(config, m_cassette);
+ m_cassette->set_formats(cbm_cassette_formats);
+ m_cassette->set_default_state(CASSETTE_STOPPED | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_MUTED);
+ m_cassette->set_interface("cbm_cass");
+}
diff --git a/src/devices/bus/sg1000_exp/sk1100.cpp b/src/devices/bus/sg1000_exp/sk1100.cpp
index e23fe34caed..5e9660e1547 100644
--- a/src/devices/bus/sg1000_exp/sk1100.cpp
+++ b/src/devices/bus/sg1000_exp/sk1100.cpp
@@ -163,10 +163,10 @@ MACHINE_CONFIG_START(sega_sk1100_device::device_add_mconfig)
// MCFG_PRINTER_ADD("sp400") /* serial printer */
- MCFG_CASSETTE_ADD("cassette")
- MCFG_CASSETTE_FORMATS(sc3000_cassette_formats)
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED)
- MCFG_CASSETTE_INTERFACE("sc3000_cass")
+ CASSETTE(config, m_cassette);
+ m_cassette->set_formats(sc3000_cassette_formats);
+ m_cassette->set_default_state(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED);
+ m_cassette->set_interface("sc3000_cass");
/* software lists */
MCFG_SOFTWARE_LIST_ADD("sc3k_cart_list","sc3000_cart")
diff --git a/src/devices/bus/vcs/scharger.cpp b/src/devices/bus/vcs/scharger.cpp
index 36a9ee65acc..7c42fc9003c 100644
--- a/src/devices/bus/vcs/scharger.cpp
+++ b/src/devices/bus/vcs/scharger.cpp
@@ -87,15 +87,15 @@ void a26_rom_ss_device::device_reset()
}
-MACHINE_CONFIG_START(a26_rom_ss_device::device_add_mconfig)
- MCFG_CASSETTE_ADD("cassette")
- MCFG_CASSETTE_FORMATS(a26_cassette_formats)
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED)
- MCFG_CASSETTE_INTERFACE("a2600_cass")
-
-// MCFG_SOUND_WAVE_ADD("wave", "cassette")
-// MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
-MACHINE_CONFIG_END
+void a26_rom_ss_device::device_add_mconfig(machine_config &config)
+{
+ CASSETTE(config, m_cassette);
+ m_cassette->set_formats(a26_cassette_formats);
+ m_cassette->set_default_state(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED);
+ m_cassette->set_interface("a2600_cass");
+
+// WAVE(config, "wave", m_cassette).add_route(ALL_OUTPUTS, "mono", 0.25);
+}
inline uint8_t a26_rom_ss_device::read_byte(uint32_t offset)
{
diff --git a/src/devices/imagedev/cassette.h b/src/devices/imagedev/cassette.h
index 830f65c99d2..aac43869d2a 100644
--- a/src/devices/imagedev/cassette.h
+++ b/src/devices/imagedev/cassette.h
@@ -129,25 +129,4 @@ DECLARE_DEVICE_TYPE(CASSETTE, cassette_image_device)
// device iterator
typedef device_type_iterator<cassette_image_device> cassette_device_iterator;
-/***************************************************************************
- DEVICE CONFIGURATION MACROS
-***************************************************************************/
-#define MCFG_CASSETTE_ADD(_tag) \
- MCFG_DEVICE_ADD(_tag, CASSETTE, 0)
-
-#define MCFG_CASSETTE_MODIFY(_tag) \
- MCFG_DEVICE_MODIFY(_tag)
-
-#define MCFG_CASSETTE_FORMATS(_formats) \
- downcast<cassette_image_device &>(*device).set_formats(_formats);
-
-#define MCFG_CASSETTE_CREATE_OPTS(_create_opts) \
- downcast<cassette_image_device &>(*device).set_create_opts(_create_opts);
-
-#define MCFG_CASSETTE_DEFAULT_STATE(_state) \
- downcast<cassette_image_device &>(*device).set_default_state((cassette_state) (_state));
-
-#define MCFG_CASSETTE_INTERFACE(_interface) \
- downcast<cassette_image_device &>(*device).set_interface(_interface);
-
#endif // MAME_DEVICES_IMAGEDEV_CASSETTE_H
diff --git a/src/devices/machine/genpc.cpp b/src/devices/machine/genpc.cpp
index fa93013bd5f..b02090ffb52 100644
--- a/src/devices/machine/genpc.cpp
+++ b/src/devices/machine/genpc.cpp
@@ -606,8 +606,8 @@ MACHINE_CONFIG_START(ibm5150_mb_device::device_add_mconfig)
m_ppi8255->out_pb_callback().set(FUNC(ibm5150_mb_device::pc_ppi_portb_w));
m_ppi8255->in_pc_callback().set(FUNC(ibm5150_mb_device::pc_ppi_portc_r));
- MCFG_CASSETTE_ADD( "cassette" )
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED)
+ CASSETTE(config, m_cassette);
+ m_cassette->set_default_state(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED);
MACHINE_CONFIG_END
//**************************************************************************
diff --git a/src/mame/drivers/a5105.cpp b/src/mame/drivers/a5105.cpp
index f52c14979aa..cf73ba7ca47 100644
--- a/src/mame/drivers/a5105.cpp
+++ b/src/mame/drivers/a5105.cpp
@@ -596,7 +596,7 @@ MACHINE_CONFIG_START(a5105_state::a5105)
z80pio_device& pio(Z80PIO(config, "z80pio", XTAL(15'000'000) / 4));
pio.out_int_callback().set_inputline(m_maincpu, 0);
- MCFG_CASSETTE_ADD( "cassette" )
+ CASSETTE(config, m_cass);
UPD765A(config, m_fdc, 8'000'000, true, true);
MCFG_FLOPPY_DRIVE_ADD("upd765a:0", a5105_floppies, "525qd", a5105_state::floppy_formats)
diff --git a/src/mame/drivers/abc80.cpp b/src/mame/drivers/abc80.cpp
index ab56eab9795..7854e115004 100644
--- a/src/mame/drivers/abc80.cpp
+++ b/src/mame/drivers/abc80.cpp
@@ -509,7 +509,7 @@ MACHINE_CONFIG_START(abc80_state::abc80)
m_csg->set_oneshot_params(CAP_U(0.1), RES_K(330));
m_csg->add_route(ALL_OUTPUTS, "mono", 0.25);
- WAVE(config, "wave", CASSETTE_TAG).add_route(ALL_OUTPUTS, "mono", 0.25);
+ WAVE(config, "wave", m_cassette).add_route(ALL_OUTPUTS, "mono", 0.25);
// devices
Z80PIO(config, m_pio, XTAL(11'980'800)/2/2);
@@ -518,9 +518,9 @@ MACHINE_CONFIG_START(abc80_state::abc80)
m_pio->in_pb_callback().set(FUNC(abc80_state::pio_pb_r));
m_pio->out_pb_callback().set(FUNC(abc80_state::pio_pb_w));
- MCFG_CASSETTE_ADD(CASSETTE_TAG)
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED)
- MCFG_CASSETTE_INTERFACE("abc80_cass")
+ CASSETTE(config, m_cassette);
+ m_cassette->set_default_state(CASSETTE_STOPPED | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED);
+ m_cassette->set_interface("abc80_cass");
ABC80_KEYBOARD(config, m_kb, 0);
m_kb->keydown_wr_callback().set(FUNC(abc80_state::keydown_w));
diff --git a/src/mame/drivers/abc80x.cpp b/src/mame/drivers/abc80x.cpp
index 8342418f444..d97036b38f1 100644
--- a/src/mame/drivers/abc80x.cpp
+++ b/src/mame/drivers/abc80x.cpp
@@ -1083,8 +1083,8 @@ MACHINE_CONFIG_START(abc800_state::common)
m_dart->out_txdb_callback().set(ABC_KEYBOARD_PORT_TAG, FUNC(abc_keyboard_port_device::txd_w));
m_dart->out_int_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0);
- MCFG_CASSETTE_ADD(CASSETTE_TAG)
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_MUTED)
+ CASSETTE(config, m_cassette);
+ m_cassette->set_default_state(CASSETTE_STOPPED | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_MUTED);
TIMER(config, TIMER_CASSETTE_TAG).configure_periodic(FUNC(abc800_state::cassette_input_tick), attotime::from_hz(44100));
rs232_port_device &rs232a(RS232_PORT(config, RS232_A_TAG, default_rs232_devices, nullptr));
diff --git a/src/mame/drivers/ac1.cpp b/src/mame/drivers/ac1.cpp
index 1b7e4329cf0..9d43738780f 100644
--- a/src/mame/drivers/ac1.cpp
+++ b/src/mame/drivers/ac1.cpp
@@ -157,7 +157,7 @@ MACHINE_CONFIG_START(ac1_state::ac1)
SPEAKER(config, "mono").front_center();
WAVE(config, "wave", "cassette").add_route(ALL_OUTPUTS, "mono", 0.25);
- MCFG_CASSETTE_ADD( "cassette" )
+ CASSETTE(config, m_cassette);
MACHINE_CONFIG_END
MACHINE_CONFIG_START(ac1_state::ac1_32)
diff --git a/src/mame/drivers/acrnsys1.cpp b/src/mame/drivers/acrnsys1.cpp
index 3067715fac0..af3e882cfee 100644
--- a/src/mame/drivers/acrnsys1.cpp
+++ b/src/mame/drivers/acrnsys1.cpp
@@ -264,16 +264,17 @@ INPUT_PORTS_END
MACHINE DRIVERS
***************************************************************************/
-MACHINE_CONFIG_START(acrnsys1_state::acrnsys1)
+void acrnsys1_state::acrnsys1(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M6502, 1.008_MHz_XTAL) /* 1.008 MHz */
- MCFG_DEVICE_PROGRAM_MAP(acrnsys1_map)
+ M6502(config, m_maincpu, 1.008_MHz_XTAL); /* 1.008 MHz */
+ m_maincpu->set_addrmap(AS_PROGRAM, &acrnsys1_state::acrnsys1_map);
config.set_default_layout(layout_acrnsys1);
/* sound hardware */
SPEAKER(config, "mono").front_center();
- WAVE(config, "wave", "cassette").add_route(ALL_OUTPUTS, "mono", 0.25);
+ WAVE(config, "wave", m_cass).add_route(ALL_OUTPUTS, "mono", 0.25);
/* devices */
ins8154_device &b1(INS8154(config, "b1"));
@@ -283,11 +284,11 @@ MACHINE_CONFIG_START(acrnsys1_state::acrnsys1)
TTL74145(config, m_ttl74145, 0);
- MCFG_CASSETTE_ADD( "cassette" )
+ CASSETTE(config, m_cass);
TIMER(config, "acrnsys1_c").configure_periodic(FUNC(acrnsys1_state::acrnsys1_c), attotime::from_hz(4800));
TIMER(config, "acrnsys1_p").configure_periodic(FUNC(acrnsys1_state::acrnsys1_p), attotime::from_hz(40000));
-MACHINE_CONFIG_END
+}
/***************************************************************************
diff --git a/src/mame/drivers/agat.cpp b/src/mame/drivers/agat.cpp
index bba408474a4..91e957d3267 100644
--- a/src/mame/drivers/agat.cpp
+++ b/src/mame/drivers/agat.cpp
@@ -1129,8 +1129,8 @@ MACHINE_CONFIG_START(agat7_state::agat7)
A2BUS_SLOT(config, "sl5", m_a2bus, agat7_cards, nullptr);
A2BUS_SLOT(config, "sl6", m_a2bus, agat7_cards, "a7ram");
- MCFG_CASSETTE_ADD(m_cassette)
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED)
+ CASSETTE(config,m_cassette);
+ m_cassette->set_default_state(CASSETTE_STOPPED);
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/aim65.cpp b/src/mame/drivers/aim65.cpp
index a4bbcc24309..1237921e201 100644
--- a/src/mame/drivers/aim65.cpp
+++ b/src/mame/drivers/aim65.cpp
@@ -207,7 +207,7 @@ MACHINE_CONFIG_START(aim65_state::aim65)
/* Sound - wave sound only */
SPEAKER(config, "mono").front_center();
- WAVE(config, "wave", "cassette").add_route(ALL_OUTPUTS, "mono", 0.25);
+ WAVE(config, "wave", m_cassette1).add_route(ALL_OUTPUTS, "mono", 0.25);
/* other devices */
mos6532_new_device &riot(MOS6532_NEW(config, "riot", AIM65_CLOCK));
@@ -232,12 +232,12 @@ MACHINE_CONFIG_START(aim65_state::aim65)
pia.writepb_handler().set(FUNC(aim65_state::aim65_pia_b_w));
// Deck 1 can play and record
- MCFG_CASSETTE_ADD( "cassette" )
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED)
+ CASSETTE(config, m_cassette1);
+ m_cassette1->set_default_state(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED);
// Deck 2 can only record
- MCFG_CASSETTE_ADD( "cassette2" )
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_RECORD | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_MUTED)
+ CASSETTE(config, m_cassette2);
+ m_cassette2->set_default_state(CASSETTE_RECORD | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_MUTED);
MCFG_GENERIC_SOCKET_ADD("z26", generic_plain_slot, "aim65_z26_cart")
MCFG_GENERIC_EXTENSIONS("z26")
diff --git a/src/mame/drivers/alesis.cpp b/src/mame/drivers/alesis.cpp
index d85571609a4..f17df4c1bf8 100644
--- a/src/mame/drivers/alesis.cpp
+++ b/src/mame/drivers/alesis.cpp
@@ -434,9 +434,9 @@ MACHINE_CONFIG_START(alesis_state::hr16)
PALETTE(config, "palette", FUNC(alesis_state::alesis_palette), 2);
- MCFG_CASSETTE_ADD( "cassette" )
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED)
- MCFG_CASSETTE_INTERFACE("hr16_cass")
+ CASSETTE(config, m_cassette);
+ m_cassette->set_default_state(CASSETTE_STOPPED);
+ m_cassette->set_interface("hr16_cass");
HD44780(config, m_lcdc, 0);
m_lcdc->set_lcd_size(2, 16);
diff --git a/src/mame/drivers/alphatro.cpp b/src/mame/drivers/alphatro.cpp
index 4c8fe4aeb54..3620ac40b0c 100644
--- a/src/mame/drivers/alphatro.cpp
+++ b/src/mame/drivers/alphatro.cpp
@@ -780,9 +780,9 @@ MACHINE_CONFIG_START(alphatro_state::alphatro)
usart_clock.signal_handler().set(m_usart, FUNC(i8251_device::write_txc));
usart_clock.signal_handler().append(m_usart, FUNC(i8251_device::write_rxc));
- MCFG_CASSETTE_ADD("cassette")
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED)
- MCFG_CASSETTE_INTERFACE("alphatro_cass")
+ CASSETTE(config, m_cass);
+ m_cass->set_default_state(CASSETTE_PLAY | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED);
+ m_cass->set_interface("alphatro_cass");
MCFG_SOFTWARE_LIST_ADD("cass_list","alphatro_cass")
TIMER(config, "timer_c").configure_periodic(FUNC(alphatro_state::timer_c), attotime::from_hz(4800));
diff --git a/src/mame/drivers/amstrad.cpp b/src/mame/drivers/amstrad.cpp
index 8fcdc8732fa..4e0d0acc6aa 100644
--- a/src/mame/drivers/amstrad.cpp
+++ b/src/mame/drivers/amstrad.cpp
@@ -944,7 +944,7 @@ MACHINE_CONFIG_START(amstrad_state::amstrad_base)
/* sound hardware */
SPEAKER(config, "mono").front_center();
- WAVE(config, "wave", "cassette").add_route(ALL_OUTPUTS, "mono", 0.25);
+ WAVE(config, "wave", m_cassette).add_route(ALL_OUTPUTS, "mono", 0.25);
AY8912(config, m_ay, 16_MHz_XTAL / 16);
m_ay->port_a_read_callback().set(FUNC(amstrad_state::amstrad_psg_porta_read));
m_ay->add_route(ALL_OUTPUTS, "mono", 0.25);
@@ -956,10 +956,10 @@ MACHINE_CONFIG_START(amstrad_state::amstrad_base)
/* snapshot */
MCFG_SNAPSHOT_ADD("snapshot", amstrad_state, amstrad, "sna", 0)
- MCFG_CASSETTE_ADD( "cassette" )
- MCFG_CASSETTE_FORMATS(cdt_cassette_formats)
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED)
- MCFG_CASSETTE_INTERFACE("cpc_cass")
+ CASSETTE(config, m_cassette);
+ m_cassette->set_formats(cdt_cassette_formats);
+ m_cassette->set_default_state(CASSETTE_STOPPED | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED);
+ m_cassette->set_interface("cpc_cass");
MCFG_SOFTWARE_LIST_ADD("cass_list","cpc_cass")
@@ -1065,7 +1065,7 @@ MACHINE_CONFIG_START(amstrad_state::cpcplus)
/* sound hardware */
SPEAKER(config, "mono").front_center();
- WAVE(config, "wave", "cassette").add_route(ALL_OUTPUTS, "mono", 0.25);
+ WAVE(config, "wave", m_cassette).add_route(ALL_OUTPUTS, "mono", 0.25);
AY8912(config, m_ay, 40_MHz_XTAL / 40);
m_ay->port_a_read_callback().set(FUNC(amstrad_state::amstrad_psg_porta_read));
m_ay->add_route(ALL_OUTPUTS, "mono", 0.25);
@@ -1077,10 +1077,10 @@ MACHINE_CONFIG_START(amstrad_state::cpcplus)
/* snapshot */
MCFG_SNAPSHOT_ADD("snapshot", amstrad_state, amstrad, "sna", 0)
- MCFG_CASSETTE_ADD( "cassette" )
- MCFG_CASSETTE_FORMATS(cdt_cassette_formats)
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED)
- MCFG_CASSETTE_INTERFACE("cpc_cass")
+ CASSETTE(config, m_cassette);
+ m_cassette->set_formats(cdt_cassette_formats);
+ m_cassette->set_default_state(CASSETTE_STOPPED | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED);
+ m_cassette->set_interface("cpc_cass");
MCFG_SOFTWARE_LIST_ADD("cass_list","cpc_cass")
UPD765A(config, m_fdc, 40_MHz_XTAL / 10, true, true);
diff --git a/src/mame/drivers/apf.cpp b/src/mame/drivers/apf.cpp
index e502b698516..1e1b17e845d 100644
--- a/src/mame/drivers/apf.cpp
+++ b/src/mame/drivers/apf.cpp
@@ -564,17 +564,17 @@ MACHINE_CONFIG_START(apf_state::apfimag)
/* internal ram */
RAM(config, RAM_TAG).set_default_size("8K").set_extra_options("16K");
- WAVE(config, "wave", "cassette").add_route(ALL_OUTPUTS, "mono", 0.15);
+ WAVE(config, "wave", m_cass).add_route(ALL_OUTPUTS, "mono", 0.15);
PIA6821(config, m_pia1, 0);
m_pia1->readpa_handler().set(FUNC(apf_state::pia1_porta_r));
m_pia1->readpb_handler().set(FUNC(apf_state::pia1_portb_r));
m_pia1->writepb_handler().set(FUNC(apf_state::pia1_portb_w));
- MCFG_CASSETTE_ADD("cassette")
- MCFG_CASSETTE_FORMATS(apf_cassette_formats)
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_DISABLED)
- MCFG_CASSETTE_INTERFACE("apf_cass")
+ CASSETTE(config, m_cass);
+ m_cass->set_formats(apf_cassette_formats);
+ m_cass->set_default_state(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_DISABLED);
+ m_cass->set_interface("apf_cass");
FD1771(config, m_fdc, 1000000); // guess
MCFG_FLOPPY_DRIVE_ADD("fdc:0", apf_floppies, "525dd", floppy_image_device::default_floppy_formats)
diff --git a/src/mame/drivers/apple2.cpp b/src/mame/drivers/apple2.cpp
index 4ad0d53cd58..383e075d359 100644
--- a/src/mame/drivers/apple2.cpp
+++ b/src/mame/drivers/apple2.cpp
@@ -1441,9 +1441,9 @@ MACHINE_CONFIG_START(apple2_state::apple2_common)
SOFTWARE_LIST(config, "flop525_orig").set_compatible("apple2_flop_orig");
MCFG_SOFTWARE_LIST_ADD("cass_list", "apple2_cass")
- MCFG_CASSETTE_ADD(A2_CASSETTE_TAG)
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED)
- MCFG_CASSETTE_INTERFACE("apple2_cass")
+ CASSETTE(config, m_cassette);
+ m_cassette->set_default_state(CASSETTE_STOPPED);
+ m_cassette->set_interface("apple2_cass");
MACHINE_CONFIG_END
void apple2_state::apple2(machine_config &config)
diff --git a/src/mame/drivers/apple2e.cpp b/src/mame/drivers/apple2e.cpp
index fb2aab49aaa..6d19fe49f41 100644
--- a/src/mame/drivers/apple2e.cpp
+++ b/src/mame/drivers/apple2e.cpp
@@ -4060,8 +4060,8 @@ MACHINE_CONFIG_START(apple2e_state::apple2e)
MCFG_SOFTWARE_LIST_ADD("flop525_list","apple2")
SOFTWARE_LIST(config, "flop525_orig").set_compatible("apple2_flop_orig");
- MCFG_CASSETTE_ADD(A2_CASSETTE_TAG)
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED)
+ CASSETTE(config, m_cassette);
+ m_cassette->set_default_state(CASSETTE_STOPPED);
MACHINE_CONFIG_END
void apple2e_state::mprof3(machine_config &config)
diff --git a/src/mame/drivers/applix.cpp b/src/mame/drivers/applix.cpp
index 2481a2707da..ff05ceb5d3b 100644
--- a/src/mame/drivers/applix.cpp
+++ b/src/mame/drivers/applix.cpp
@@ -884,7 +884,7 @@ MACHINE_CONFIG_START(applix_state::applix)
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)
- WAVE(config, "wave", "cassette").add_route(ALL_OUTPUTS, "lspeaker", 0.50);
+ WAVE(config, "wave", m_cass).add_route(ALL_OUTPUTS, "lspeaker", 0.50);
/* Devices */
MC6845(config, m_crtc, 30_MHz_XTAL / 16); // MC6545 @ 1.875 MHz
@@ -910,8 +910,8 @@ MACHINE_CONFIG_START(applix_state::applix)
MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", "centronics")
- MCFG_CASSETTE_ADD("cassette")
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_MUTED)
+ CASSETTE(config, m_cass);
+ m_cass->set_default_state(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_MUTED);
WD1772(config, m_fdc, 16_MHz_XTAL / 2); //connected to Z80H clock pin
MCFG_FLOPPY_DRIVE_ADD("fdc:0", applix_floppies, "35dd", applix_state::floppy_formats)
diff --git a/src/mame/drivers/aquarius.cpp b/src/mame/drivers/aquarius.cpp
index 3440fc65931..02d0e9e6a8a 100644
--- a/src/mame/drivers/aquarius.cpp
+++ b/src/mame/drivers/aquarius.cpp
@@ -379,8 +379,8 @@ MACHINE_CONFIG_START(aquarius_state::aquarius)
ay8910.add_route(ALL_OUTPUTS, "mono", 0.25);
/* cassette */
- MCFG_CASSETTE_ADD( "cassette" )
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_MUTED)
+ CASSETTE(config, m_cassette);
+ m_cassette->set_default_state(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_MUTED);
/* cartridge */
MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_linear_slot, "aquarius_cart")
diff --git a/src/mame/drivers/asst128.cpp b/src/mame/drivers/asst128.cpp
index f857d084ae0..b9d62f6d74c 100644
--- a/src/mame/drivers/asst128.cpp
+++ b/src/mame/drivers/asst128.cpp
@@ -112,8 +112,7 @@ MACHINE_CONFIG_START(asst128_state::asst128)
downcast<asst128_mb_device &>(*device).set_cputag("maincpu");
MCFG_DEVICE_INPUT_DEFAULTS(asst128)
- MCFG_DEVICE_MODIFY("mb:cassette")
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED)
+ subdevice<cassette_image_device>("mb:cassette")->set_default_state(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED);
// FIXME: determine ISA bus clock
MCFG_DEVICE_ADD("board0", ISA8_SLOT, 0, "mb:isa", pc_isa8_cards, "cga_mc1502", true)
diff --git a/src/mame/drivers/atom.cpp b/src/mame/drivers/atom.cpp
index 93f13d51719..97379d2f4eb 100644
--- a/src/mame/drivers/atom.cpp
+++ b/src/mame/drivers/atom.cpp
@@ -753,10 +753,10 @@ MACHINE_CONFIG_START(atom_state::atom)
MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", CENTRONICS_TAG)
- MCFG_CASSETTE_ADD("cassette")
- MCFG_CASSETTE_FORMATS(atom_cassette_formats)
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_MUTED)
- MCFG_CASSETTE_INTERFACE("atom_cass")
+ CASSETTE(config, m_cassette);
+ m_cassette->set_formats(atom_cassette_formats);
+ m_cassette->set_default_state(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_MUTED);
+ m_cassette->set_interface("atom_cass");
MCFG_QUICKLOAD_ADD("quickload", atom_state, atom_atm, "atm", 0)
@@ -853,10 +853,10 @@ MACHINE_CONFIG_START(atom_state::atombb)
MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", CENTRONICS_TAG)
- MCFG_CASSETTE_ADD("cassette")
- MCFG_CASSETTE_FORMATS(atom_cassette_formats)
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_MUTED)
- MCFG_CASSETTE_INTERFACE("atom_cass")
+ CASSETTE(config, m_cassette);
+ m_cassette->set_formats(atom_cassette_formats);
+ m_cassette->set_default_state(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_MUTED);
+ m_cassette->set_interface("atom_cass");
/* internal ram */
RAM(config, RAM_TAG).set_default_size("16K").set_extra_options("8K,12K");
diff --git a/src/mame/drivers/bcs3.cpp b/src/mame/drivers/bcs3.cpp
index 7e7fbca8d44..32a93e03745 100644
--- a/src/mame/drivers/bcs3.cpp
+++ b/src/mame/drivers/bcs3.cpp
@@ -408,7 +408,7 @@ MACHINE_CONFIG_START(bcs3_state::bcs3)
m_ctc->zc_callback<0>().set(FUNC(bcs3_state::ctc_z0_w));
m_ctc->zc_callback<1>().set(FUNC(bcs3_state::ctc_z1_w));
- MCFG_CASSETTE_ADD( "cassette" )
+ CASSETTE(config, m_cass);
MACHINE_CONFIG_END
MACHINE_CONFIG_START(bcs3_state::bcs3a)
@@ -435,7 +435,7 @@ MACHINE_CONFIG_START(bcs3_state::bcs3a)
m_ctc->zc_callback<0>().set(FUNC(bcs3_state::ctc_z0_w));
m_ctc->zc_callback<1>().set(FUNC(bcs3_state::ctc_z1_w));
- MCFG_CASSETTE_ADD( "cassette" )
+ CASSETTE(config, m_cass);
MACHINE_CONFIG_END
MACHINE_CONFIG_START(bcs3_state::bcs3b)
diff --git a/src/mame/drivers/bmjr.cpp b/src/mame/drivers/bmjr.cpp
index e2f14a49778..c10079ee803 100644
--- a/src/mame/drivers/bmjr.cpp
+++ b/src/mame/drivers/bmjr.cpp
@@ -362,7 +362,7 @@ MACHINE_CONFIG_START(bmjr_state::bmjr)
WAVE(config, "wave", "cassette").add_route(ALL_OUTPUTS, "mono", 0.25);
/* Devices */
- MCFG_CASSETTE_ADD( "cassette" )
+ CASSETTE(config, m_cass);
MACHINE_CONFIG_END
/* ROM definition */
diff --git a/src/mame/drivers/bml3.cpp b/src/mame/drivers/bml3.cpp
index 87df85d73aa..452dd82479d 100644
--- a/src/mame/drivers/bml3.cpp
+++ b/src/mame/drivers/bml3.cpp
@@ -1000,7 +1000,7 @@ MACHINE_CONFIG_START(bml3_state::bml3_common)
acia_clock.signal_handler().set(m_acia, FUNC(acia6850_device::write_txc));
acia_clock.signal_handler().append(m_acia, FUNC(acia6850_device::write_rxc));
- MCFG_CASSETTE_ADD( "cassette" )
+ CASSETTE(config, m_cass);
/* Audio */
SPEAKER(config, "mono").front_center();
diff --git a/src/mame/drivers/c80.cpp b/src/mame/drivers/c80.cpp
index 6fc5b7466ef..44cd3b761fe 100644
--- a/src/mame/drivers/c80.cpp
+++ b/src/mame/drivers/c80.cpp
@@ -254,7 +254,8 @@ void c80_state::machine_start()
/* Machine Driver */
-MACHINE_CONFIG_START(c80_state::c80)
+void c80_state::c80(machine_config &config)
+{
/* basic machine hardware */
Z80(config, m_maincpu, 2500000); /* U880D */
m_maincpu->set_addrmap(AS_PROGRAM, &c80_state::c80_mem);
@@ -275,15 +276,15 @@ MACHINE_CONFIG_START(c80_state::c80)
z80pio_device& pio2(Z80PIO(config, Z80PIO2_TAG, XTAL(2500000)));
pio2.out_int_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0);
- MCFG_CASSETTE_ADD("cassette")
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED )
+ CASSETTE(config, m_cassette);
+ m_cassette->set_default_state(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED);
SPEAKER(config, "mono").front_center();
- WAVE(config, "wave", "cassette").add_route(ALL_OUTPUTS, "mono", 0.25);
+ WAVE(config, "wave", m_cassette).add_route(ALL_OUTPUTS, "mono", 0.25);
/* internal ram */
RAM(config, RAM_TAG).set_default_size("1K");
-MACHINE_CONFIG_END
+}
/* ROMs */
diff --git a/src/mame/drivers/camplynx.cpp b/src/mame/drivers/camplynx.cpp
index 7f05a0cfd4c..67badac8576 100644
--- a/src/mame/drivers/camplynx.cpp
+++ b/src/mame/drivers/camplynx.cpp
@@ -886,10 +886,10 @@ MACHINE_CONFIG_START(camplynx_state::lynx48k)
lynx_common(config);
- MCFG_CASSETTE_ADD("cassette")
- MCFG_CASSETTE_FORMATS(lynx48k_cassette_formats)
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_DISABLED)
- MCFG_CASSETTE_INTERFACE("camplynx_cass")
+ CASSETTE(config, m_cass);
+ m_cass->set_formats(lynx48k_cassette_formats);
+ m_cass->set_default_state(CASSETTE_PLAY | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_DISABLED);
+ m_cass->set_interface("camplynx_cass");
/* devices */
MC6845(config, m_crtc, 12_MHz_XTAL / 8);
@@ -933,10 +933,10 @@ MACHINE_CONFIG_START(camplynx_state::lynx128k)
lynx_common(config);
- MCFG_CASSETTE_ADD("cassette")
- MCFG_CASSETTE_FORMATS(lynx128k_cassette_formats)
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_DISABLED)
- MCFG_CASSETTE_INTERFACE("camplynx_cass")
+ CASSETTE(config, m_cass);
+ m_cass->set_formats(lynx128k_cassette_formats);
+ m_cass->set_default_state(CASSETTE_PLAY | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_DISABLED);
+ m_cass->set_interface("camplynx_cass");
/* devices */
MC6845(config, m_crtc, 12_MHz_XTAL / 8);
diff --git a/src/mame/drivers/cgenie.cpp b/src/mame/drivers/cgenie.cpp
index 65dcfeb85ca..bbbefcb2007 100644
--- a/src/mame/drivers/cgenie.cpp
+++ b/src/mame/drivers/cgenie.cpp
@@ -465,10 +465,10 @@ MACHINE_CONFIG_START(cgenie_state::cgenie)
ay8910.port_b_write_callback().set("par", FUNC(cg_parallel_slot_device::pb_w));
ay8910.add_route(ALL_OUTPUTS, "mono", 0.75);
- MCFG_CASSETTE_ADD("cassette")
- MCFG_CASSETTE_FORMATS(cgenie_cassette_formats)
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED)
- MCFG_CASSETTE_INTERFACE("cgenie_cass")
+ CASSETTE(config, m_cassette);
+ m_cassette->set_formats(cgenie_cassette_formats);
+ m_cassette->set_default_state(CASSETTE_STOPPED);
+ m_cassette->set_interface("cgenie_cass");
MCFG_SOFTWARE_LIST_ADD("cass_list", "cgenie_cass")
diff --git a/src/mame/drivers/coco12.cpp b/src/mame/drivers/coco12.cpp
index 20fb9893fdd..f19ca3f3a70 100644
--- a/src/mame/drivers/coco12.cpp
+++ b/src/mame/drivers/coco12.cpp
@@ -463,9 +463,9 @@ MACHINE_CONFIG_START(coco12_state::coco)
// Becker Port device
MCFG_DEVICE_ADD(DWSOCK_TAG, COCO_DWSOCK, 0)
- MCFG_CASSETTE_ADD("cassette")
- MCFG_CASSETTE_FORMATS(coco_cassette_formats)
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_MUTED)
+ CASSETTE(config, m_cassette);
+ m_cassette->set_formats(coco_cassette_formats);
+ m_cassette->set_default_state(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_MUTED);
rs232_port_device &rs232(RS232_PORT(config, RS232_TAG, default_rs232_devices, "printer"));
rs232.dcd_handler().set(PIA1_TAG, FUNC(pia6821_device::ca1_w));
@@ -516,8 +516,8 @@ void coco12_state::cocoe(machine_config &config)
cartslot.cart_callback().set([this] (int state) { cart_w(state != 0); }); // lambda because name is overloaded
cartslot.nmi_callback().set_inputline(m_maincpu, INPUT_LINE_NMI);
cartslot.halt_callback().set_inputline(m_maincpu, INPUT_LINE_HALT);
- COCO_VHD(config, m_vhd_0, 0);
- COCO_VHD(config, m_vhd_1, 0);
+ COCO_VHD(config, m_vhd_0, 0, m_maincpu);
+ COCO_VHD(config, m_vhd_1, 0, m_maincpu);
}
MACHINE_CONFIG_START(coco12_state::cocoeh)
@@ -534,8 +534,8 @@ void coco12_state::coco2(machine_config &config)
cartslot.cart_callback().set([this] (int state) { cart_w(state != 0); }); // lambda because name is overloaded
cartslot.nmi_callback().set_inputline(m_maincpu, INPUT_LINE_NMI);
cartslot.halt_callback().set_inputline(m_maincpu, INPUT_LINE_HALT);
- COCO_VHD(config, m_vhd_0, 0);
- COCO_VHD(config, m_vhd_1, 0);
+ COCO_VHD(config, m_vhd_0, 0, m_maincpu);
+ COCO_VHD(config, m_vhd_1, 0, m_maincpu);
}
MACHINE_CONFIG_START(coco12_state::coco2h)
diff --git a/src/mame/drivers/coco3.cpp b/src/mame/drivers/coco3.cpp
index 34c5091a287..23b2c0aedd4 100644
--- a/src/mame/drivers/coco3.cpp
+++ b/src/mame/drivers/coco3.cpp
@@ -273,9 +273,9 @@ MACHINE_CONFIG_START(coco3_state::coco3)
// Becker Port device
MCFG_DEVICE_ADD(DWSOCK_TAG, COCO_DWSOCK, 0)
- MCFG_CASSETTE_ADD("cassette")
- MCFG_CASSETTE_FORMATS(coco_cassette_formats)
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_MUTED)
+ CASSETTE(config, m_cassette);
+ m_cassette->set_formats(coco_cassette_formats);
+ m_cassette->set_default_state(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_MUTED);
rs232_port_device &rs232(RS232_PORT(config, RS232_TAG, default_rs232_devices, "printer"));
rs232.dcd_handler().set(PIA1_TAG, FUNC(pia6821_device::ca1_w));
@@ -286,8 +286,8 @@ MACHINE_CONFIG_START(coco3_state::coco3)
cartslot.nmi_callback().set_inputline(m_maincpu, INPUT_LINE_NMI);
cartslot.halt_callback().set_inputline(m_maincpu, INPUT_LINE_HALT);
- COCO_VHD(config, m_vhd_0, 0);
- COCO_VHD(config, m_vhd_1, 0);
+ COCO_VHD(config, m_vhd_0, 0, m_maincpu);
+ COCO_VHD(config, m_vhd_1, 0, m_maincpu);
// video hardware
config.set_default_layout(layout_coco3);
diff --git a/src/mame/drivers/cosmicos.cpp b/src/mame/drivers/cosmicos.cpp
index d07a0190604..6ec629e9dd0 100644
--- a/src/mame/drivers/cosmicos.cpp
+++ b/src/mame/drivers/cosmicos.cpp
@@ -549,8 +549,8 @@ MACHINE_CONFIG_START(cosmicos_state::cosmicos)
/* devices */
MCFG_QUICKLOAD_ADD("quickload", cosmicos_state, cosmicos, "bin", 0)
- MCFG_CASSETTE_ADD("cassette")
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_MUTED)
+ CASSETTE(config, m_cassette);
+ m_cassette->set_default_state(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_MUTED);
/* internal ram */
RAM(config, RAM_TAG).set_default_size("256").set_extra_options("4K,48K");
diff --git a/src/mame/drivers/cp1.cpp b/src/mame/drivers/cp1.cpp
index c94ab232131..7e1d2988876 100644
--- a/src/mame/drivers/cp1.cpp
+++ b/src/mame/drivers/cp1.cpp
@@ -264,7 +264,8 @@ QUICKLOAD_LOAD_MEMBER( cp1_state, quickload )
return image_init_result::PASS;
}
-MACHINE_CONFIG_START(cp1_state::cp1)
+void cp1_state::cp1(machine_config &config)
+{
/* basic machine hardware */
i8049_device &maincpu(I8049(config, m_maincpu, 6_MHz_XTAL));
maincpu.set_addrmap(AS_IO, &cp1_state::cp1_io);
@@ -287,10 +288,10 @@ MACHINE_CONFIG_START(cp1_state::cp1)
config.set_default_layout(layout_cp1);
- MCFG_CASSETTE_ADD("cassette")
+ CASSETTE(config, m_cassette);
- MCFG_QUICKLOAD_ADD("quickload", cp1_state, quickload, "obj", 1)
-MACHINE_CONFIG_END
+ QUICKLOAD(config, "quickload", 0).set_handler(snapquick_load_delegate(&QUICKLOAD_LOAD_NAME(cp1_state, quickload), this), "obj", 1);
+}
/* ROM definition */
/*
diff --git a/src/mame/drivers/d6800.cpp b/src/mame/drivers/d6800.cpp
index 01f434cd65b..a7b4c37b99a 100644
--- a/src/mame/drivers/d6800.cpp
+++ b/src/mame/drivers/d6800.cpp
@@ -406,7 +406,7 @@ MACHINE_CONFIG_START(d6800_state::d6800)
/* sound hardware */
SPEAKER(config, "mono").front_center();
- WAVE(config, "wave", "cassette").add_route(ALL_OUTPUTS, "mono", 0.50);
+ WAVE(config, "wave", m_cass).add_route(ALL_OUTPUTS, "mono", 0.50);
BEEP(config, "beeper", 1200).add_route(ALL_OUTPUTS, "mono", 0.50);
/* devices */
@@ -419,8 +419,8 @@ MACHINE_CONFIG_START(d6800_state::d6800)
m_pia->irqa_handler().set_inputline("maincpu", M6800_IRQ_LINE);
m_pia->irqb_handler().set_inputline("maincpu", M6800_IRQ_LINE);
- MCFG_CASSETTE_ADD("cassette")
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_MUTED)
+ CASSETTE(config, m_cass);
+ m_cass->set_default_state(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_MUTED);
TIMER(config, "d6800_c").configure_periodic(FUNC(d6800_state::d6800_c), attotime::from_hz(4800));
TIMER(config, "d6800_p").configure_periodic(FUNC(d6800_state::d6800_p), attotime::from_hz(40000));
diff --git a/src/mame/drivers/dai.cpp b/src/mame/drivers/dai.cpp
index 42425d3f928..eeb335aadd3 100644
--- a/src/mame/drivers/dai.cpp
+++ b/src/mame/drivers/dai.cpp
@@ -220,15 +220,15 @@ MACHINE_CONFIG_START(dai_state::dai)
/* sound hardware */
SPEAKER(config, "mono").front_center();
- WAVE(config, "wave", "cassette").add_route(ALL_OUTPUTS, "mono", 0.25);
+ WAVE(config, "wave", m_cassette).add_route(ALL_OUTPUTS, "mono", 0.25);
SPEAKER(config, "lspeaker").front_left();
SPEAKER(config, "rspeaker").front_right();
DAI_SOUND(config, m_sound).add_route(0, "lspeaker", 0.50).add_route(1, "rspeaker", 0.50);
/* cassette */
- MCFG_CASSETTE_ADD( "cassette" )
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED)
- MCFG_CASSETTE_INTERFACE("dai_cass")
+ CASSETTE(config, m_cassette);
+ m_cassette->set_default_state(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED);
+ m_cassette->set_interface("dai_cass");
/* tms5501 */
TMS5501(config, m_tms5501, 2000000);
diff --git a/src/mame/drivers/dragon.cpp b/src/mame/drivers/dragon.cpp
index 1a1c04141bf..ba6bb1df6bc 100644
--- a/src/mame/drivers/dragon.cpp
+++ b/src/mame/drivers/dragon.cpp
@@ -216,10 +216,10 @@ MACHINE_CONFIG_START(dragon_state::dragon_base)
SAM6883(config, m_sam, 14.218_MHz_XTAL, m_maincpu);
m_sam->res_rd_callback().set(FUNC(dragon_state::sam_read));
- MCFG_CASSETTE_ADD("cassette")
- MCFG_CASSETTE_FORMATS(coco_cassette_formats)
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_MUTED)
- MCFG_CASSETTE_INTERFACE("dragon_cass")
+ CASSETTE(config, m_cassette);
+ m_cassette->set_formats(coco_cassette_formats);
+ m_cassette->set_default_state(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_MUTED);
+ m_cassette->set_interface("dragon_cass");
PRINTER(config, m_printer, 0);
diff --git a/src/mame/drivers/e100.cpp b/src/mame/drivers/e100.cpp
index faffc4cebb0..d0727fb9da6 100644
--- a/src/mame/drivers/e100.cpp
+++ b/src/mame/drivers/e100.cpp
@@ -585,8 +585,8 @@ MACHINE_CONFIG_START(e100_state::e100)
* Once created it may be given on the commandline or mounted via TAB and select
* E100 supports cassette through the 'LOAD' and 'SAVE' commands with no arguments
*/
- MCFG_CASSETTE_ADD( "cassette" )
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_SPEAKER_MUTED | CASSETTE_MOTOR_ENABLED)
+ CASSETTE(config, m_cassette);
+ m_cassette->set_default_state(CASSETTE_STOPPED | CASSETTE_SPEAKER_MUTED | CASSETTE_MOTOR_ENABLED);
/* screen TODO: simplify the screen config, look at zx.cpp */
MCFG_SCREEN_ADD("screen", RASTER)
diff --git a/src/mame/drivers/elf.cpp b/src/mame/drivers/elf.cpp
index 5eaa84ce959..50ebed89d94 100644
--- a/src/mame/drivers/elf.cpp
+++ b/src/mame/drivers/elf.cpp
@@ -236,7 +236,8 @@ QUICKLOAD_LOAD_MEMBER( elf2_state, elf )
return image_init_result::PASS;
}
-MACHINE_CONFIG_START(elf2_state::elf2)
+void elf2_state::elf2(machine_config &config)
+{
/* basic machine hardware */
CDP1802(config, m_maincpu, XTAL(3'579'545)/2);
m_maincpu->set_addrmap(AS_PROGRAM, &elf2_state::elf2_mem);
@@ -271,14 +272,14 @@ MACHINE_CONFIG_START(elf2_state::elf2)
DM9368(config, m_led_h, 0).update_cb().set(FUNC(elf2_state::digit_w<0>));
DM9368(config, m_led_l, 0).update_cb().set(FUNC(elf2_state::digit_w<1>));
- MCFG_CASSETTE_ADD("cassette")
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_MUTED)
+ CASSETTE(config, m_cassette);
+ m_cassette->set_default_state(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_MUTED);
- MCFG_QUICKLOAD_ADD("quickload", elf2_state, elf, "bin", 0)
+ QUICKLOAD(config, "quickload", 0).set_handler(snapquick_load_delegate(&QUICKLOAD_LOAD_NAME(elf2_state, elf), this), "bin", 0);
/* internal ram */
RAM(config, RAM_TAG).set_default_size("256");
-MACHINE_CONFIG_END
+}
/* ROMs */
diff --git a/src/mame/drivers/elwro800.cpp b/src/mame/drivers/elwro800.cpp
index 0b18d1f0eb0..8906abb74ff 100644
--- a/src/mame/drivers/elwro800.cpp
+++ b/src/mame/drivers/elwro800.cpp
@@ -599,12 +599,12 @@ MACHINE_CONFIG_START(elwro800_state::elwro800)
/* sound hardware */
SPEAKER(config, "mono").front_center();
- WAVE(config, "wave", "cassette").add_route(ALL_OUTPUTS, "mono", 0.25);
+ WAVE(config, "wave", m_cassette).add_route(ALL_OUTPUTS, "mono", 0.25);
SPEAKER_SOUND(config, "speaker").add_route(ALL_OUTPUTS, "mono", 0.50);
- MCFG_CASSETTE_ADD( "cassette" )
- MCFG_CASSETTE_FORMATS(tzx_cassette_formats)
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED)
+ CASSETTE(config, m_cassette);
+ m_cassette->set_formats(tzx_cassette_formats);
+ m_cassette->set_default_state(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED);
MCFG_FLOPPY_DRIVE_ADD("upd765:0", elwro800jr_floppies, "525hd", floppy_image_device::default_floppy_formats)
MCFG_FLOPPY_DRIVE_ADD("upd765:1", elwro800jr_floppies, "525hd", floppy_image_device::default_floppy_formats)
diff --git a/src/mame/drivers/emma2.cpp b/src/mame/drivers/emma2.cpp
index 2a1fa2ebfdb..1c83b0c1d64 100644
--- a/src/mame/drivers/emma2.cpp
+++ b/src/mame/drivers/emma2.cpp
@@ -191,10 +191,11 @@ void emma2_state::machine_reset()
m_dig_change = 0;
}
-MACHINE_CONFIG_START(emma2_state::emma2)
+void emma2_state::emma2(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M6502, 1'000'000)
- MCFG_DEVICE_PROGRAM_MAP(mem_map)
+ M6502(config, m_maincpu, 1'000'000);
+ m_maincpu->set_addrmap(AS_PROGRAM, &emma2_state::mem_map);
/* video hardware */
config.set_default_layout(layout_emma2);
@@ -212,13 +213,13 @@ MACHINE_CONFIG_START(emma2_state::emma2)
m_pia->irqb_handler().set_inputline(m_maincpu, m6502_device::IRQ_LINE);
/* cassette */
- MCFG_CASSETTE_ADD( "cassette" )
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED)
+ CASSETTE(config, m_cassette);
+ m_cassette->set_default_state(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED);
/* sound hardware */
SPEAKER(config, "mono").front_center();
- WAVE(config, "wave", "cassette").add_route(ALL_OUTPUTS, "mono", 0.05);
-MACHINE_CONFIG_END
+ WAVE(config, "wave", m_cassette).add_route(ALL_OUTPUTS, "mono", 0.05);
+}
/* ROM definition */
diff --git a/src/mame/drivers/et3400.cpp b/src/mame/drivers/et3400.cpp
index eb86741f3fc..e42a4b41111 100644
--- a/src/mame/drivers/et3400.cpp
+++ b/src/mame/drivers/et3400.cpp
@@ -219,10 +219,11 @@ static DEVICE_INPUT_DEFAULTS_START( terminal )
DEVICE_INPUT_DEFAULTS( "RS232_STOPBITS", 0xff, RS232_STOPBITS_2 )
DEVICE_INPUT_DEFAULTS_END
-MACHINE_CONFIG_START(et3400_state::et3400)
+void et3400_state::et3400(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M6800, XTAL(4'000'000) / 4 ) // 1MHz with memory i/o accessory, or 500khz without it
- MCFG_DEVICE_PROGRAM_MAP(mem_map)
+ M6800(config, m_maincpu, XTAL(4'000'000) / 4 ); // 1MHz with memory i/o accessory, or 500khz without it
+ m_maincpu->set_addrmap(AS_PROGRAM, &et3400_state::mem_map);
/* video hardware */
config.set_default_layout(layout_et3400);
@@ -247,11 +248,11 @@ MACHINE_CONFIG_START(et3400_state::et3400)
m_displatch[4]->parallel_out_cb().set(FUNC(et3400_state::led_w<5>));
m_displatch[5]->parallel_out_cb().set(FUNC(et3400_state::led_w<6>));
- MCFG_CASSETTE_ADD("cassette")
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED)
+ CASSETTE(config, m_cass);
+ m_cass->set_default_state(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED);
SPEAKER(config, "mono").front_center();
- WAVE(config, "wave", "cassette").add_route(ALL_OUTPUTS, "mono", 0.05);
-MACHINE_CONFIG_END
+ WAVE(config, "wave", m_cass).add_route(ALL_OUTPUTS, "mono", 0.05);
+}
/* ROM definition */
ROM_START( et3400 )
diff --git a/src/mame/drivers/eti660.cpp b/src/mame/drivers/eti660.cpp
index 9ca22647fc5..be750085387 100644
--- a/src/mame/drivers/eti660.cpp
+++ b/src/mame/drivers/eti660.cpp
@@ -342,8 +342,8 @@ MACHINE_CONFIG_START(eti660_state::eti660)
m_pia->irqa_handler().set_inputline(m_maincpu, COSMAC_INPUT_LINE_INT).invert(); // FIXME: use an input merger for these lines
m_pia->irqb_handler().set_inputline(m_maincpu, COSMAC_INPUT_LINE_INT).invert();
- MCFG_CASSETTE_ADD("cassette")
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_MUTED)
+ CASSETTE(config, m_cassette);
+ m_cassette->set_default_state(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_MUTED);
/* internal ram */
RAM(config, RAM_TAG).set_default_size("3K");
diff --git a/src/mame/drivers/excali64.cpp b/src/mame/drivers/excali64.cpp
index caf29423c86..a059cb36748 100644
--- a/src/mame/drivers/excali64.cpp
+++ b/src/mame/drivers/excali64.cpp
@@ -600,7 +600,7 @@ MACHINE_CONFIG_START(excali64_state::excali64)
m_crtc->out_vsync_callback().set(FUNC(excali64_state::crtc_vs));
/* Devices */
- MCFG_CASSETTE_ADD( "cassette" )
+ CASSETTE(config, m_cass);
WD2793(config, m_fdc, 16_MHz_XTAL / 16);
m_fdc->drq_wr_callback().set(m_dma, FUNC(z80dma_device::rdy_w));
diff --git a/src/mame/drivers/fc100.cpp b/src/mame/drivers/fc100.cpp
index 0eb4db312c1..5fac171cdf4 100644
--- a/src/mame/drivers/fc100.cpp
+++ b/src/mame/drivers/fc100.cpp
@@ -535,7 +535,7 @@ MACHINE_CONFIG_START(fc100_state::fc100)
/* sound hardware */
SPEAKER(config, "mono").front_center();
- WAVE(config, "wave", "cassette").add_route(ALL_OUTPUTS, "mono", 0.05);
+ WAVE(config, "wave", m_cass).add_route(ALL_OUTPUTS, "mono", 0.05);
ay8910_device &psg(AY8910(config, "psg", XTAL(7'159'090)/3/2)); /* AY-3-8910 - clock not verified */
psg.port_a_read_callback().set_ioport("JOY0");
psg.port_b_read_callback().set_ioport("JOY1");
@@ -544,9 +544,9 @@ MACHINE_CONFIG_START(fc100_state::fc100)
psg.add_route(ALL_OUTPUTS, "mono", 1.50);
/* Devices */
- MCFG_CASSETTE_ADD("cassette")
- MCFG_CASSETTE_FORMATS(fc100_cassette_formats)
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED)
+ CASSETTE(config, m_cass);
+ m_cass->set_formats(fc100_cassette_formats);
+ m_cass->set_default_state(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED);
I8251(config, m_uart, 0);
m_uart->txd_handler().set(FUNC(fc100_state::txdata_callback));
diff --git a/src/mame/drivers/fm7.cpp b/src/mame/drivers/fm7.cpp
index ac7e10db3d2..8f7d35af344 100644
--- a/src/mame/drivers/fm7.cpp
+++ b/src/mame/drivers/fm7.cpp
@@ -2048,7 +2048,7 @@ MACHINE_CONFIG_START(fm7_state::fm7)
SPEAKER(config, "mono").front_center();
AY8910(config, m_psg, 4.9152_MHz_XTAL / 4).add_route(ALL_OUTPUTS,"mono", 1.00);
BEEP(config, "beeper", 1200).add_route(ALL_OUTPUTS, "mono", 0.50);
- WAVE(config, "wave", "cassette").add_route(ALL_OUTPUTS, "mono", 0.25);
+ WAVE(config, "wave", m_cassette).add_route(ALL_OUTPUTS, "mono", 0.25);
MCFG_MACHINE_START_OVERRIDE(fm7_state,fm7)
@@ -2059,10 +2059,10 @@ MACHINE_CONFIG_START(fm7_state::fm7)
PALETTE(config, m_palette, palette_device::BRG_3BIT);
- MCFG_CASSETTE_ADD("cassette")
- MCFG_CASSETTE_FORMATS(fm7_cassette_formats)
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED)
- MCFG_CASSETTE_INTERFACE("fm7_cass")
+ CASSETTE(config, m_cassette);
+ m_cassette->set_formats(fm7_cassette_formats);
+ m_cassette->set_default_state(CASSETTE_STOPPED | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED);
+ m_cassette->set_interface("fm7_cass");
MCFG_SOFTWARE_LIST_ADD("cass_list","fm7_cass")
@@ -2099,7 +2099,7 @@ MACHINE_CONFIG_START(fm7_state::fm8)
SPEAKER(config, "mono").front_center();
BEEP(config, m_beeper, 1200).add_route(ALL_OUTPUTS, "mono", 0.50);
- WAVE(config, "wave", "cassette").add_route(ALL_OUTPUTS, "mono", 0.25);
+ WAVE(config, "wave", m_cassette).add_route(ALL_OUTPUTS, "mono", 0.25);
MCFG_MACHINE_START_OVERRIDE(fm7_state,fm7)
@@ -2110,10 +2110,10 @@ MACHINE_CONFIG_START(fm7_state::fm8)
PALETTE(config, m_palette, palette_device::BRG_3BIT);
- MCFG_CASSETTE_ADD("cassette")
- MCFG_CASSETTE_FORMATS(fm7_cassette_formats)
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED)
- MCFG_CASSETTE_INTERFACE("fm7_cass")
+ CASSETTE(config, m_cassette);
+ m_cassette->set_formats(fm7_cassette_formats);
+ m_cassette->set_default_state(CASSETTE_STOPPED | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED);
+ m_cassette->set_interface("fm7_cass");
MB8877(config, m_fdc, 8_MHz_XTAL / 8);
m_fdc->intrq_wr_callback().set(FUNC(fm7_state::fm7_fdc_intrq_w));
@@ -2150,7 +2150,7 @@ MACHINE_CONFIG_START(fm7_state::fm77av)
m_ym->port_b_read_callback().set(FUNC(fm7_state::fm77av_joy_2_r));
m_ym->add_route(ALL_OUTPUTS,"mono", 1.00);
BEEP(config, "beeper", 1200).add_route(ALL_OUTPUTS, "mono", 0.50);
- WAVE(config, "wave", "cassette").add_route(ALL_OUTPUTS, "mono", 0.25);
+ WAVE(config, "wave", m_cassette).add_route(ALL_OUTPUTS, "mono", 0.25);
MCFG_MACHINE_START_OVERRIDE(fm7_state,fm77av)
@@ -2167,10 +2167,10 @@ MACHINE_CONFIG_START(fm7_state::fm77av)
PALETTE(config, m_palette, palette_device::BRG_3BIT);
MCFG_PALETTE_ADD("av_palette", 4096)
- MCFG_CASSETTE_ADD("cassette")
- MCFG_CASSETTE_FORMATS(fm7_cassette_formats)
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED)
- MCFG_CASSETTE_INTERFACE("fm7_cass")
+ CASSETTE(config, m_cassette);
+ m_cassette->set_formats(fm7_cassette_formats);
+ m_cassette->set_default_state(CASSETTE_STOPPED | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED);
+ m_cassette->set_interface("fm7_cass");
MCFG_SOFTWARE_LIST_COMPATIBLE_ADD("cass_list", "fm7_cass")
@@ -2211,7 +2211,7 @@ MACHINE_CONFIG_START(fm7_state::fm11)
SPEAKER(config, "mono").front_center();
BEEP(config, m_beeper, 1200).add_route(ALL_OUTPUTS, "mono", 0.50);
- WAVE(config, "wave", "cassette").add_route(ALL_OUTPUTS, "mono", 0.25);
+ WAVE(config, "wave", m_cassette).add_route(ALL_OUTPUTS, "mono", 0.25);
MCFG_MACHINE_START_OVERRIDE(fm7_state,fm11)
@@ -2227,10 +2227,10 @@ MACHINE_CONFIG_START(fm7_state::fm11)
PALETTE(config, m_palette, palette_device::BRG_3BIT);
- MCFG_CASSETTE_ADD("cassette")
- MCFG_CASSETTE_FORMATS(fm7_cassette_formats)
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED)
- MCFG_CASSETTE_INTERFACE("fm7_cass")
+ CASSETTE(config, m_cassette);
+ m_cassette->set_formats(fm7_cassette_formats);
+ m_cassette->set_default_state(CASSETTE_STOPPED | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED);
+ m_cassette->set_interface("fm7_cass");
MB8877(config, m_fdc, 8_MHz_XTAL / 8);
m_fdc->intrq_wr_callback().set(FUNC(fm7_state::fm7_fdc_intrq_w));
@@ -2262,7 +2262,7 @@ MACHINE_CONFIG_START(fm7_state::fm16beta)
SPEAKER(config, "mono").front_center();
BEEP(config, m_beeper, 1200).add_route(ALL_OUTPUTS, "mono", 0.50);
- WAVE(config, "wave", "cassette").add_route(ALL_OUTPUTS, "mono", 0.25);
+ WAVE(config, "wave", m_cassette).add_route(ALL_OUTPUTS, "mono", 0.25);
MCFG_MACHINE_START_OVERRIDE(fm7_state,fm16)
@@ -2273,10 +2273,10 @@ MACHINE_CONFIG_START(fm7_state::fm16beta)
PALETTE(config, m_palette, palette_device::BRG_3BIT);
- MCFG_CASSETTE_ADD("cassette")
- MCFG_CASSETTE_FORMATS(fm7_cassette_formats)
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED)
- MCFG_CASSETTE_INTERFACE("fm7_cass")
+ CASSETTE(config, m_cassette);
+ m_cassette->set_formats(fm7_cassette_formats);
+ m_cassette->set_default_state(CASSETTE_STOPPED | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED);
+ m_cassette->set_interface("fm7_cass");
MB8877(config, m_fdc, 8_MHz_XTAL / 8);
m_fdc->intrq_wr_callback().set(FUNC(fm7_state::fm7_fdc_intrq_w));
diff --git a/src/mame/drivers/fp1100.cpp b/src/mame/drivers/fp1100.cpp
index 8f97bc8c50f..c16a7d07605 100644
--- a/src/mame/drivers/fp1100.cpp
+++ b/src/mame/drivers/fp1100.cpp
@@ -682,8 +682,8 @@ MACHINE_CONFIG_START(fp1100_state::fp1100)
MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", "centronics")
/* Cassette */
- MCFG_CASSETTE_ADD("cassette")
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED)
+ CASSETTE(config, m_cass);
+ m_cass->set_default_state(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED);
TIMER(config, "timer_c").configure_periodic(FUNC(fp1100_state::timer_c), attotime::from_hz(4800)); // cass write
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/galaxy.cpp b/src/mame/drivers/galaxy.cpp
index 1c81aed7705..a1d447078ef 100644
--- a/src/mame/drivers/galaxy.cpp
+++ b/src/mame/drivers/galaxy.cpp
@@ -201,12 +201,12 @@ MACHINE_CONFIG_START(galaxy_state::galaxy)
MCFG_SNAPSHOT_ADD("snapshot", galaxy_state, galaxy, "gal", 0)
SPEAKER(config, "mono").front_center();
- WAVE(config, "wave", "cassette").add_route(ALL_OUTPUTS, "mono", 0.25);
+ WAVE(config, "wave", m_cassette).add_route(ALL_OUTPUTS, "mono", 0.25);
- MCFG_CASSETTE_ADD( "cassette" )
- MCFG_CASSETTE_FORMATS(gtp_cassette_formats)
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED)
- MCFG_CASSETTE_INTERFACE("galaxy_cass")
+ CASSETTE(config, m_cassette);
+ m_cassette->set_formats(gtp_cassette_formats);
+ m_cassette->set_default_state(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED);
+ m_cassette->set_interface("galaxy_cass");
MCFG_SOFTWARE_LIST_ADD("cass_list","galaxy")
@@ -244,10 +244,10 @@ MACHINE_CONFIG_START(galaxy_state::galaxyp)
AY8910(config, "ay8910", XTAL/4); // FIXME: really no output routes for this AY?
WAVE(config, "wave", "cassette").add_route(ALL_OUTPUTS, "mono", 0.25);
- MCFG_CASSETTE_ADD( "cassette" )
- MCFG_CASSETTE_FORMATS(gtp_cassette_formats)
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED)
- MCFG_CASSETTE_INTERFACE("galaxy_cass")
+ CASSETTE(config, m_cassette);
+ m_cassette->set_formats(gtp_cassette_formats);
+ m_cassette->set_default_state(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED);
+ m_cassette->set_interface("galaxy_cass");
MCFG_SOFTWARE_LIST_ADD("cass_list","galaxy")
diff --git a/src/mame/drivers/hec2hrp.cpp b/src/mame/drivers/hec2hrp.cpp
index b1c7b4056d6..4f5408508c9 100644
--- a/src/mame/drivers/hec2hrp.cpp
+++ b/src/mame/drivers/hec2hrp.cpp
@@ -415,9 +415,9 @@ MACHINE_CONFIG_START(hec2hrp_state::hec2hr)
hector_audio(config);
- MCFG_CASSETTE_ADD( "cassette" )
- MCFG_CASSETTE_FORMATS(hector_cassette_formats)
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED)
+ CASSETTE(config, m_cassette);
+ m_cassette->set_formats(hector_cassette_formats);
+ m_cassette->set_default_state(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED);
PRINTER(config, m_printer, 0);
MACHINE_CONFIG_END
@@ -443,9 +443,9 @@ MACHINE_CONFIG_START(hec2hrp_state::hec2hrp)
hector_audio(config);
- MCFG_CASSETTE_ADD( "cassette" )
- MCFG_CASSETTE_FORMATS(hector_cassette_formats)
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED)
+ CASSETTE(config, m_cassette);
+ m_cassette->set_formats(hector_cassette_formats);
+ m_cassette->set_default_state(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED);
PRINTER(config, m_printer, 0);
MACHINE_CONFIG_END
@@ -485,9 +485,9 @@ MACHINE_CONFIG_START(hec2hrp_state::hec2mx40)
hector_audio(config);
- MCFG_CASSETTE_ADD( "cassette" )
- MCFG_CASSETTE_FORMATS(hector_cassette_formats)
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED)
+ CASSETTE(config, m_cassette);
+ m_cassette->set_formats(hector_cassette_formats);
+ m_cassette->set_default_state(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED);
PRINTER(config, m_printer, 0);
MACHINE_CONFIG_END
@@ -523,9 +523,9 @@ MACHINE_CONFIG_START(hec2hrp_state::hec2hrx)
hector_audio(config);
- MCFG_CASSETTE_ADD( "cassette" )
- MCFG_CASSETTE_FORMATS(hector_cassette_formats)
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED)
+ CASSETTE(config, m_cassette);
+ m_cassette->set_formats(hector_cassette_formats);
+ m_cassette->set_default_state(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED);
PRINTER(config, m_printer, 0);
MACHINE_CONFIG_END
@@ -556,9 +556,9 @@ MACHINE_CONFIG_START(hec2hrp_state::hec2mdhrx)
hector_audio(config);
- MCFG_CASSETTE_ADD( "cassette" )
- MCFG_CASSETTE_FORMATS(hector_cassette_formats)
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED)
+ CASSETTE(config, m_cassette);
+ m_cassette->set_formats(hector_cassette_formats);
+ m_cassette->set_default_state(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED);
PRINTER(config, m_printer, 0);
MACHINE_CONFIG_END
@@ -594,9 +594,9 @@ MACHINE_CONFIG_START(hec2hrp_state::hec2mx80)
hector_audio(config);
- MCFG_CASSETTE_ADD( "cassette" )
- MCFG_CASSETTE_FORMATS(hector_cassette_formats)
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED)
+ CASSETTE(config, m_cassette);
+ m_cassette->set_formats(hector_cassette_formats);
+ m_cassette->set_default_state(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED);
PRINTER(config, m_printer, 0);
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/homelab.cpp b/src/mame/drivers/homelab.cpp
index 04ff0e7ac75..501938b3618 100644
--- a/src/mame/drivers/homelab.cpp
+++ b/src/mame/drivers/homelab.cpp
@@ -775,9 +775,9 @@ MACHINE_CONFIG_START(homelab_state::homelab)
MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
MCFG_SOUND_ROUTE(0, "dac", 1.0, DAC_VREF_POS_INPUT)
- WAVE(config, "wave", "cassette").add_route(ALL_OUTPUTS, "speaker", 0.25);
+ WAVE(config, "wave", m_cass).add_route(ALL_OUTPUTS, "speaker", 0.25);
- MCFG_CASSETTE_ADD( "cassette" )
+ CASSETTE(config, m_cass);
MCFG_QUICKLOAD_ADD("quickload", homelab_state, homelab, "htp", 2)
MACHINE_CONFIG_END
@@ -807,9 +807,9 @@ MACHINE_CONFIG_START(homelab_state::homelab3)
MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
MCFG_SOUND_ROUTE(0, "dac", 1.0, DAC_VREF_POS_INPUT)
- WAVE(config, "wave", "cassette").add_route(ALL_OUTPUTS, "speaker", 0.25);
+ WAVE(config, "wave", m_cass).add_route(ALL_OUTPUTS, "speaker", 0.25);
- MCFG_CASSETTE_ADD( "cassette" )
+ CASSETTE(config, m_cass);
MCFG_QUICKLOAD_ADD("quickload", homelab_state, homelab, "htp", 2)
MACHINE_CONFIG_END
@@ -839,12 +839,12 @@ MACHINE_CONFIG_START(homelab_state::brailab4)
MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
MCFG_SOUND_ROUTE(0, "dac", 1.0, DAC_VREF_POS_INPUT)
- WAVE(config, "wave", "cassette").add_route(ALL_OUTPUTS, "speaker", 0.25);
+ WAVE(config, "wave", m_cass).add_route(ALL_OUTPUTS, "speaker", 0.25);
MCFG_DEVICE_ADD("mea8000", MEA8000, 3840000)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
- MCFG_CASSETTE_ADD( "cassette" )
+ CASSETTE(config, m_cass);
MCFG_QUICKLOAD_ADD("quickload", homelab_state, homelab, "htp", 18)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/huebler.cpp b/src/mame/drivers/huebler.cpp
index 00ed00369e6..fbf7f7e10e6 100644
--- a/src/mame/drivers/huebler.cpp
+++ b/src/mame/drivers/huebler.cpp
@@ -345,8 +345,8 @@ MACHINE_CONFIG_START(amu880_state::amu880)
m_z80sio->out_txda_callback().set(FUNC(amu880_state::cassette_w));
m_z80sio->out_int_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0);
- MCFG_CASSETTE_ADD("cassette")
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_MUTED)
+ CASSETTE(config, m_cassette);
+ m_cassette->set_default_state(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_MUTED);
TIMER(config, "tape").configure_periodic(FUNC(amu880_state::tape_tick), attotime::from_hz(44100));
diff --git a/src/mame/drivers/hx20.cpp b/src/mame/drivers/hx20.cpp
index d54e917b70d..03370850007 100644
--- a/src/mame/drivers/hx20.cpp
+++ b/src/mame/drivers/hx20.cpp
@@ -882,7 +882,7 @@ MACHINE_CONFIG_START(hx20_state::hx20)
m_rtc->irq().set(FUNC(hx20_state::rtc_irq_w));
RS232_PORT(config, RS232_TAG, default_rs232_devices, nullptr);
- MCFG_CASSETTE_ADD(CASSETTE_TAG)
+ CASSETTE(config, m_cassette);
MCFG_EPSON_SIO_ADD("sio", "tf20")
MCFG_EPSON_SIO_RX(WRITELINE(*this, hx20_state, sio_rx_w))
MCFG_EPSON_SIO_PIN(WRITELINE(*this, hx20_state, sio_pin_w))
diff --git a/src/mame/drivers/ibmpcjr.cpp b/src/mame/drivers/ibmpcjr.cpp
index 170af410333..c8657c6c6c8 100644
--- a/src/mame/drivers/ibmpcjr.cpp
+++ b/src/mame/drivers/ibmpcjr.cpp
@@ -657,8 +657,8 @@ MACHINE_CONFIG_START(pcjr_state::ibmpcjr)
PC_JOY(config, "pc_joy");
/* cassette */
- MCFG_CASSETTE_ADD( "cassette")
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED)
+ CASSETTE(config, m_cassette);
+ m_cassette->set_default_state(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED);
UPD765A(config, m_fdc, 8'000'000, false, false);
diff --git a/src/mame/drivers/interact.cpp b/src/mame/drivers/interact.cpp
index 08516b1fc52..d898cab6522 100644
--- a/src/mame/drivers/interact.cpp
+++ b/src/mame/drivers/interact.cpp
@@ -152,10 +152,10 @@ MACHINE_CONFIG_START(interact_state::interact)
hector_audio(config);
- MCFG_CASSETTE_ADD("cassette")
- MCFG_CASSETTE_FORMATS(hector_cassette_formats)
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MASK_SPEAKER)
- MCFG_CASSETTE_INTERFACE("interact_cass")
+ CASSETTE(config, m_cassette);
+ m_cassette->set_formats(hector_cassette_formats);
+ m_cassette->set_default_state(CASSETTE_STOPPED | CASSETTE_MASK_SPEAKER);
+ m_cassette->set_interface("interact_cass");
MCFG_SOFTWARE_LIST_ADD("cass_list","interact")
@@ -189,10 +189,10 @@ MACHINE_CONFIG_START(interact_state::hector1)
hector_audio(config);
- MCFG_CASSETTE_ADD("cassette")
- MCFG_CASSETTE_FORMATS(hector_cassette_formats)
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MASK_SPEAKER)
- MCFG_CASSETTE_INTERFACE("interact_cass")
+ CASSETTE(config, m_cassette);
+ m_cassette->set_formats(hector_cassette_formats);
+ m_cassette->set_default_state(CASSETTE_STOPPED | CASSETTE_MASK_SPEAKER);
+ m_cassette->set_interface("interact_cass");
/* printer */
PRINTER(config, m_printer, 0);
diff --git a/src/mame/drivers/intv.cpp b/src/mame/drivers/intv.cpp
index c878215b485..988e9eec581 100644
--- a/src/mame/drivers/intv.cpp
+++ b/src/mame/drivers/intv.cpp
@@ -524,7 +524,7 @@ MACHINE_CONFIG_START(intv_state::intvecs)
speech.add_route(ALL_OUTPUTS, "mono", 1.00);
/* cassette */
- //MCFG_CASSETTE_ADD( "cassette" )
+ //CASSETTE(config, "cassette");
/* software lists */
MCFG_DEVICE_REMOVE("cart_list")
diff --git a/src/mame/drivers/iq151.cpp b/src/mame/drivers/iq151.cpp
index 63a076bcbe3..11c44925207 100644
--- a/src/mame/drivers/iq151.cpp
+++ b/src/mame/drivers/iq151.cpp
@@ -421,9 +421,9 @@ MACHINE_CONFIG_START(iq151_state::iq151)
ppi.in_pc_callback().set(FUNC(iq151_state::ppi_portc_r));
ppi.out_pc_callback().set(FUNC(iq151_state::ppi_portc_w));
- MCFG_CASSETTE_ADD( "cassette" )
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED)
- MCFG_CASSETTE_INTERFACE("iq151_cass")
+ CASSETTE(config, m_cassette);
+ m_cassette->set_default_state(CASSETTE_STOPPED);
+ m_cassette->set_interface("iq151_cass");
TIMER(config, "cassette_timer").configure_periodic(FUNC(iq151_state::cassette_timer), attotime::from_hz(2000));
diff --git a/src/mame/drivers/jtc.cpp b/src/mame/drivers/jtc.cpp
index 588a49ca077..8cac8b5e446 100644
--- a/src/mame/drivers/jtc.cpp
+++ b/src/mame/drivers/jtc.cpp
@@ -818,8 +818,8 @@ MACHINE_CONFIG_START(jtc_state::basic)
m_maincpu->p3_out_cb().set(FUNC(jtc_state::p3_w));
/* cassette */
- MCFG_CASSETTE_ADD( "cassette" )
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED)
+ CASSETTE(config, m_cassette);
+ m_cassette->set_default_state(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED);
/* sound hardware */
SPEAKER(config, "mono").front_center();
diff --git a/src/mame/drivers/jupace.cpp b/src/mame/drivers/jupace.cpp
index 12eadf3e305..ec5bf8b9766 100644
--- a/src/mame/drivers/jupace.cpp
+++ b/src/mame/drivers/jupace.cpp
@@ -776,7 +776,7 @@ MACHINE_CONFIG_START(ace_state::ace)
// sound hardware
SPEAKER(config, "mono").front_center();
- WAVE(config, "wave", "cassette").add_route(ALL_OUTPUTS, "mono", 0.25);
+ WAVE(config, "wave", m_cassette).add_route(ALL_OUTPUTS, "mono", 0.25);
SPEAKER_SOUND(config, "speaker").add_route(ALL_OUTPUTS, "mono", 1.00);
AY8910(config, AY8910_TAG, XTAL(6'500'000) / 2).add_route(ALL_OUTPUTS, "mono", 0.25);
@@ -785,10 +785,10 @@ MACHINE_CONFIG_START(ace_state::ace)
m_sp0256->add_route(ALL_OUTPUTS, "mono", 0.25);
// devices
- MCFG_CASSETTE_ADD("cassette")
- MCFG_CASSETTE_FORMATS(ace_cassette_formats)
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED)
- MCFG_CASSETTE_INTERFACE("jupace_cass")
+ CASSETTE(config, m_cassette);
+ m_cassette->set_formats(ace_cassette_formats);
+ m_cassette->set_default_state(CASSETTE_STOPPED);
+ m_cassette->set_interface("jupace_cass");
MCFG_SNAPSHOT_ADD("snapshot", ace_state, ace, "ace", 1)
diff --git a/src/mame/drivers/kc.cpp b/src/mame/drivers/kc.cpp
index 7456eacfe32..296c607349a 100644
--- a/src/mame/drivers/kc.cpp
+++ b/src/mame/drivers/kc.cpp
@@ -134,16 +134,16 @@ MACHINE_CONFIG_START(kc_state::kc85_3)
/* sound hardware */
SPEAKER(config, "mono").front_center();
- WAVE(config, "wave", "cassette").add_route(ALL_OUTPUTS, "mono", 0.25);
+ WAVE(config, "wave", m_cassette).add_route(ALL_OUTPUTS, "mono", 0.25);
SPEAKER_SOUND(config, "speaker").add_route(ALL_OUTPUTS, "mono", 0.50);
/* devices */
MCFG_QUICKLOAD_ADD("quickload", kc_state, kc, "kcc", 2)
- MCFG_CASSETTE_ADD( "cassette" )
- MCFG_CASSETTE_FORMATS(kc_cassette_formats)
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY)
- MCFG_CASSETTE_INTERFACE("kc_cass")
+ CASSETTE(config, m_cassette);
+ m_cassette->set_formats(kc_cassette_formats);
+ m_cassette->set_default_state(CASSETTE_PLAY);
+ m_cassette->set_interface("kc_cass");
/* cartridge slot */
MCFG_DEVICE_ADD("m8", KCCART_SLOT, 0)
@@ -214,16 +214,16 @@ MACHINE_CONFIG_START(kc85_4_state::kc85_4)
/* sound hardware */
SPEAKER(config, "mono").front_center();
- WAVE(config, "wave", "cassette").add_route(ALL_OUTPUTS, "mono", 0.25);
+ WAVE(config, "wave", m_cassette).add_route(ALL_OUTPUTS, "mono", 0.25);
SPEAKER_SOUND(config, "speaker").add_route(ALL_OUTPUTS, "mono", 0.50);
/* devices */
MCFG_QUICKLOAD_ADD("quickload", kc_state, kc, "kcc", 2)
- MCFG_CASSETTE_ADD( "cassette" )
- MCFG_CASSETTE_FORMATS(kc_cassette_formats)
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY)
- MCFG_CASSETTE_INTERFACE("kc_cass")
+ CASSETTE(config, m_cassette);
+ m_cassette->set_formats(kc_cassette_formats);
+ m_cassette->set_default_state(CASSETTE_PLAY);
+ m_cassette->set_interface("kc_cass");
/* cartridge slot */
MCFG_DEVICE_ADD("m8", KCCART_SLOT, 0)
diff --git a/src/mame/drivers/kim1.cpp b/src/mame/drivers/kim1.cpp
index 28e65781edd..bdc71f298b4 100644
--- a/src/mame/drivers/kim1.cpp
+++ b/src/mame/drivers/kim1.cpp
@@ -258,10 +258,10 @@ MACHINE_CONFIG_START(kim1_state::kim1)
MOS6530(config, "miot_u3", 1000000);
- MCFG_CASSETTE_ADD( "cassette" )
- MCFG_CASSETTE_FORMATS(kim1_cassette_formats)
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED)
- MCFG_CASSETTE_INTERFACE ("kim1_cass")
+ CASSETTE(config, m_cass);
+ m_cass->set_formats(kim1_cassette_formats);
+ m_cass->set_default_state(CASSETTE_STOPPED);
+ m_cass->set_interface ("kim1_cass");
TIMER(config, "led_timer").configure_periodic(FUNC(kim1_state::kim1_update_leds), attotime::from_hz(60));
TIMER(config, "cassette_timer").configure_periodic(FUNC(kim1_state::kim1_cassette_input), attotime::from_hz(44100));
diff --git a/src/mame/drivers/lc80.cpp b/src/mame/drivers/lc80.cpp
index be5c78464ca..56027374a61 100644
--- a/src/mame/drivers/lc80.cpp
+++ b/src/mame/drivers/lc80.cpp
@@ -361,8 +361,8 @@ MACHINE_CONFIG_START(lc80_state::lc80)
m_pio2->out_int_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0);
m_pio2->in_pb_callback().set(FUNC(lc80_state::pio2_pb_r));
- MCFG_CASSETTE_ADD("cassette")
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_MUTED)
+ CASSETTE(config, m_cassette);
+ m_cassette->set_default_state(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_MUTED);
RAM(config, RAM_TAG).set_default_size("1K").set_extra_options("2K,3K,4K");
MACHINE_CONFIG_END
@@ -398,8 +398,8 @@ MACHINE_CONFIG_START(lc80_state::lc80_2)
m_pio2->out_int_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0);
m_pio2->in_pb_callback().set(FUNC(lc80_state::pio2_pb_r));
- MCFG_CASSETTE_ADD("cassette")
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_MUTED)
+ CASSETTE(config, m_cassette);
+ m_cassette->set_default_state(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_MUTED);
/* internal ram */
RAM(config, RAM_TAG).set_default_size("4K");
diff --git a/src/mame/drivers/lviv.cpp b/src/mame/drivers/lviv.cpp
index 3af2fe67ae6..3d633bfb65b 100644
--- a/src/mame/drivers/lviv.cpp
+++ b/src/mame/drivers/lviv.cpp
@@ -458,16 +458,16 @@ MACHINE_CONFIG_START(lviv_state::lviv)
/* sound hardware */
SPEAKER(config, "mono").front_center();
- WAVE(config, "wave", "cassette").add_route(ALL_OUTPUTS, "mono", 0.25);
+ WAVE(config, "wave", m_cassette).add_route(ALL_OUTPUTS, "mono", 0.25);
SPEAKER_SOUND(config, "speaker").add_route(ALL_OUTPUTS, "mono", 0.50);
/* snapshot */
MCFG_SNAPSHOT_ADD("snapshot", lviv_state, lviv, "sav", 0)
- MCFG_CASSETTE_ADD( "cassette" )
- MCFG_CASSETTE_FORMATS(lviv_lvt_format)
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED)
- MCFG_CASSETTE_INTERFACE("lviv_cass")
+ CASSETTE(config, m_cassette);
+ m_cassette->set_formats(lviv_lvt_format);
+ m_cassette->set_default_state(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED);
+ m_cassette->set_interface("lviv_cass");
MCFG_SOFTWARE_LIST_ADD("cass_list","lviv")
diff --git a/src/mame/drivers/m5.cpp b/src/mame/drivers/m5.cpp
index ecef78735a7..b93a12dba14 100644
--- a/src/mame/drivers/m5.cpp
+++ b/src/mame/drivers/m5.cpp
@@ -1431,10 +1431,10 @@ MACHINE_CONFIG_START(m5_state::m5)
MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", CENTRONICS_TAG)
- MCFG_CASSETTE_ADD("cassette")
- MCFG_CASSETTE_FORMATS(sordm5_cassette_formats)
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY)
- MCFG_CASSETTE_INTERFACE("m5_cass")
+ CASSETTE(config, m_cassette);
+ m_cassette->set_formats(sordm5_cassette_formats);
+ m_cassette->set_default_state(CASSETTE_PLAY);
+ m_cassette->set_interface("m5_cass");
I8255(config, m_ppi);
m_ppi->in_pa_callback().set(FUNC(m5_state::ppi_pa_r));
diff --git a/src/mame/drivers/mbee.cpp b/src/mame/drivers/mbee.cpp
index bdca3e27910..0aa3dea47ff 100644
--- a/src/mame/drivers/mbee.cpp
+++ b/src/mame/drivers/mbee.cpp
@@ -694,9 +694,9 @@ MACHINE_CONFIG_START(mbee_state::mbee)
MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", "centronics")
- MCFG_CASSETTE_ADD( "cassette" )
- MCFG_CASSETTE_FORMATS(mbee_cassette_formats)
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED)
+ CASSETTE(config, m_cassette);
+ m_cassette->set_formats(mbee_cassette_formats);
+ m_cassette->set_default_state(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED);
MACHINE_CONFIG_END
@@ -751,9 +751,9 @@ MACHINE_CONFIG_START(mbee_state::mbeeic)
MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", "centronics")
- MCFG_CASSETTE_ADD( "cassette" )
- MCFG_CASSETTE_FORMATS(mbee_cassette_formats)
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED)
+ CASSETTE(config, m_cassette);
+ m_cassette->set_formats(mbee_cassette_formats);
+ m_cassette->set_default_state(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED);
MACHINE_CONFIG_END
MACHINE_CONFIG_START(mbee_state::mbeepc)
diff --git a/src/mame/drivers/mc10.cpp b/src/mame/drivers/mc10.cpp
index 4484438b2f9..1a71c0b3413 100644
--- a/src/mame/drivers/mc10.cpp
+++ b/src/mame/drivers/mc10.cpp
@@ -525,10 +525,10 @@ MACHINE_CONFIG_START(mc10_state::mc10)
MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
MCFG_SOUND_ROUTE(0, "dac", 1.0, DAC_VREF_POS_INPUT)
- MCFG_CASSETTE_ADD("cassette")
- MCFG_CASSETTE_FORMATS(coco_cassette_formats)
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED)
- MCFG_CASSETTE_INTERFACE("mc10_cass")
+ CASSETTE(config, m_cassette);
+ m_cassette->set_formats(coco_cassette_formats);
+ m_cassette->set_default_state(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED);
+ m_cassette->set_interface("mc10_cass");
/* printer */
PRINTER(config, m_printer, 0);
@@ -567,10 +567,10 @@ MACHINE_CONFIG_START(mc10_state::alice32)
MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
MCFG_SOUND_ROUTE(0, "dac", 1.0, DAC_VREF_POS_INPUT)
- MCFG_CASSETTE_ADD("cassette")
- MCFG_CASSETTE_FORMATS(alice32_cassette_formats)
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED)
- MCFG_CASSETTE_INTERFACE("mc10_cass")
+ CASSETTE(config, m_cassette);
+ m_cassette->set_formats(alice32_cassette_formats);
+ m_cassette->set_default_state(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED);
+ m_cassette->set_interface("mc10_cass");
/* printer */
PRINTER(config, m_printer, 0);
diff --git a/src/mame/drivers/mc1000.cpp b/src/mame/drivers/mc1000.cpp
index adf287844a5..a4702a42645 100644
--- a/src/mame/drivers/mc1000.cpp
+++ b/src/mame/drivers/mc1000.cpp
@@ -578,9 +578,9 @@ MACHINE_CONFIG_START(mc1000_state::mc1000)
ay8910.add_route(ALL_OUTPUTS, "mono", 0.25);
/* devices */
- MCFG_CASSETTE_ADD("cassette")
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED)
- MCFG_CASSETTE_INTERFACE("mc1000_cass")
+ CASSETTE(config, m_cassette);
+ m_cassette->set_default_state(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED);
+ m_cassette->set_interface("mc1000_cass");
MCFG_SOFTWARE_LIST_ADD("cass_list", "mc1000_cass")
diff --git a/src/mame/drivers/mc1502.cpp b/src/mame/drivers/mc1502.cpp
index 8d14a8620f3..3a8864e1094 100644
--- a/src/mame/drivers/mc1502.cpp
+++ b/src/mame/drivers/mc1502.cpp
@@ -289,7 +289,7 @@ MACHINE_CONFIG_START(mc1502_state::mc1502)
MCFG_DEVICE_ADD("isa2", ISA8_SLOT, 0, "isa", mc1502_isa8_cards, "rom", false)
SPEAKER(config, "mono").front_center();
- WAVE(config, "wave", "cassette"); // FIXME: really no output routes for the cassette sound?
+ WAVE(config, "wave", m_cassette); // FIXME: really no output routes for the cassette sound?
SPEAKER_SOUND(config, "speaker").add_route(ALL_OUTPUTS, "mono", 0.80);
MCFG_DEVICE_ADD(m_centronics, CENTRONICS, centronics_devices, "printer")
@@ -302,8 +302,8 @@ MACHINE_CONFIG_START(mc1502_state::mc1502)
MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", "centronics")
- MCFG_CASSETTE_ADD( "cassette" )
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED)
+ CASSETTE(config, m_cassette);
+ m_cassette->set_default_state(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED);
MCFG_SOFTWARE_LIST_ADD("flop_list","mc1502_flop")
// MCFG_SOFTWARE_LIST_ADD("cass_list","mc1502_cass")
diff --git a/src/mame/drivers/mekd2.cpp b/src/mame/drivers/mekd2.cpp
index c8434fcb899..25cc595b2f6 100644
--- a/src/mame/drivers/mekd2.cpp
+++ b/src/mame/drivers/mekd2.cpp
@@ -375,10 +375,11 @@ void mekd2_state::machine_start()
************************************************************/
-MACHINE_CONFIG_START(mekd2_state::mekd2)
+void mekd2_state::mekd2(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M6800, XTAL_MEKD2 / 2) /* 614.4 kHz */
- MCFG_DEVICE_PROGRAM_MAP(mekd2_mem)
+ M6800(config, m_maincpu, XTAL_MEKD2 / 2); /* 614.4 kHz */
+ m_maincpu->set_addrmap(AS_PROGRAM, &mekd2_state::mekd2_mem);
config.set_default_layout(layout_mekd2);
@@ -386,7 +387,7 @@ MACHINE_CONFIG_START(mekd2_state::mekd2)
SPEAKER(config, "mono").front_center();
WAVE(config, "wave", "cassette").add_route(ALL_OUTPUTS, "mono", 0.25);
- MCFG_CASSETTE_ADD("cassette")
+ CASSETTE(config, m_cass);
/* Devices */
PIA6821(config, m_pia_s, 0);
@@ -414,8 +415,8 @@ MACHINE_CONFIG_START(mekd2_state::mekd2)
TIMER(config, "mekd2_c").configure_periodic(FUNC(mekd2_state::mekd2_c), attotime::from_hz(4800));
TIMER(config, "mekd2_p").configure_periodic(FUNC(mekd2_state::mekd2_p), attotime::from_hz(40000));
- MCFG_QUICKLOAD_ADD("quickload", mekd2_state, mekd2_quik, "d2", 1)
-MACHINE_CONFIG_END
+ QUICKLOAD(config, "quickload", 0).set_handler(snapquick_load_delegate(&QUICKLOAD_LOAD_NAME(mekd2_state, mekd2_quik), this), "d2", 1);
+}
/***********************************************************
diff --git a/src/mame/drivers/meritum.cpp b/src/mame/drivers/meritum.cpp
index 89507372c4e..72ee1a5b4de 100644
--- a/src/mame/drivers/meritum.cpp
+++ b/src/mame/drivers/meritum.cpp
@@ -438,7 +438,7 @@ MACHINE_CONFIG_START(meritum_state::meritum)
WAVE(config, "wave", "cassette").add_route(ALL_OUTPUTS, "mono", 0.05);
/* devices */
- MCFG_CASSETTE_ADD("cassette")
+ CASSETTE(config, m_cassette);
MCFG_QUICKLOAD_ADD("quickload", meritum_state, trs80_cmd, "cmd", 1.0)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/microtan.cpp b/src/mame/drivers/microtan.cpp
index 16405bfab22..e69488a88be 100644
--- a/src/mame/drivers/microtan.cpp
+++ b/src/mame/drivers/microtan.cpp
@@ -240,7 +240,7 @@ MACHINE_CONFIG_START(microtan_state::microtan)
MCFG_QUICKLOAD_ADD("quickload", microtan_state, microtan, "hex", 0.5)
/* cassette */
- MCFG_CASSETTE_ADD( m_cassette )
+ CASSETTE(config, m_cassette);
/* acia */
mos6551_device &acia(MOS6551(config, "acia", 0));
diff --git a/src/mame/drivers/mikro80.cpp b/src/mame/drivers/mikro80.cpp
index 71169a78c75..cf093b9e9cf 100644
--- a/src/mame/drivers/mikro80.cpp
+++ b/src/mame/drivers/mikro80.cpp
@@ -189,12 +189,12 @@ MACHINE_CONFIG_START(mikro80_state::mikro80)
PALETTE(config, "palette", palette_device::MONOCHROME);
SPEAKER(config, "speaker").front_center();
- WAVE(config, "wave", "cassette").add_route(ALL_OUTPUTS, "speaker", 0.25);
+ WAVE(config, "wave", m_cassette).add_route(ALL_OUTPUTS, "speaker", 0.25);
- MCFG_CASSETTE_ADD( "cassette" )
- MCFG_CASSETTE_FORMATS(rk8_cassette_formats)
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED)
- MCFG_CASSETTE_INTERFACE("mikro80_cass")
+ CASSETTE(config, m_cassette);
+ m_cassette->set_formats(rk8_cassette_formats);
+ m_cassette->set_default_state(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED);
+ m_cassette->set_interface("mikro80_cass");
MCFG_SOFTWARE_LIST_ADD("cass_list", "mikro80")
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/mikrosha.cpp b/src/mame/drivers/mikrosha.cpp
index 348dadcd7d4..d029bdf94e7 100644
--- a/src/mame/drivers/mikrosha.cpp
+++ b/src/mame/drivers/mikrosha.cpp
@@ -249,10 +249,10 @@ MACHINE_CONFIG_START(mikrosha_state::mikrosha)
m_dma8257->out_iow_cb<2>().set("i8275", FUNC(i8275_device::dack_w));
m_dma8257->set_reverse_rw_mode(1);
- MCFG_CASSETTE_ADD( "cassette" )
- MCFG_CASSETTE_FORMATS(rkm_cassette_formats)
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED)
- MCFG_CASSETTE_INTERFACE("mikrosha_cass")
+ CASSETTE(config, m_cassette);
+ m_cassette->set_formats(rkm_cassette_formats);
+ m_cassette->set_default_state(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED);
+ m_cassette->set_interface("mikrosha_cass");
MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "mikrosha_cart")
MCFG_GENERIC_EXTENSIONS("bin,rom")
diff --git a/src/mame/drivers/mkit09.cpp b/src/mame/drivers/mkit09.cpp
index 679a947e82c..ab05909ab31 100644
--- a/src/mame/drivers/mkit09.cpp
+++ b/src/mame/drivers/mkit09.cpp
@@ -198,10 +198,11 @@ WRITE8_MEMBER( mkit09_state::pb_w )
}
-MACHINE_CONFIG_START(mkit09_state::mkit09)
+void mkit09_state::mkit09(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", MC6809, XTAL(4'000'000))
- MCFG_DEVICE_PROGRAM_MAP(mkit09_mem)
+ MC6809(config, m_maincpu, XTAL(4'000'000));
+ m_maincpu->set_addrmap(AS_PROGRAM, &mkit09_state::mkit09_mem);
/* video hardware */
config.set_default_layout(layout_mkit09);
@@ -219,13 +220,14 @@ MACHINE_CONFIG_START(mkit09_state::mkit09)
m_pia->irqa_handler().set_inputline("maincpu", M6809_IRQ_LINE);
m_pia->irqb_handler().set_inputline("maincpu", M6809_IRQ_LINE);
- MCFG_CASSETTE_ADD( "cassette" )
-MACHINE_CONFIG_END
+ CASSETTE(config, m_cass);
+}
-MACHINE_CONFIG_START(mkit09_state::mkit09a)
+void mkit09_state::mkit09a(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", MC6809, XTAL(4'000'000))
- MCFG_DEVICE_PROGRAM_MAP(mkit09a_mem)
+ MC6809(config, m_maincpu, XTAL(4'000'000));
+ m_maincpu->set_addrmap(AS_PROGRAM, &mkit09_state::mkit09a_mem);
/* video hardware */
config.set_default_layout(layout_mkit09);
@@ -243,8 +245,8 @@ MACHINE_CONFIG_START(mkit09_state::mkit09a)
m_pia->irqa_handler().set_inputline("maincpu", M6809_IRQ_LINE);
m_pia->irqb_handler().set_inputline("maincpu", M6809_IRQ_LINE);
- MCFG_CASSETTE_ADD( "cassette" )
-MACHINE_CONFIG_END
+ CASSETTE(config, m_cass);
+}
/* ROM definition */
ROM_START( mkit09 )
diff --git a/src/mame/drivers/mpf1.cpp b/src/mame/drivers/mpf1.cpp
index b7de2be907e..eec49abcc2e 100644
--- a/src/mame/drivers/mpf1.cpp
+++ b/src/mame/drivers/mpf1.cpp
@@ -355,8 +355,8 @@ void mpf1_state::machine_reset()
/* Machine Drivers */
-MACHINE_CONFIG_START(mpf1_state::mpf1)
-
+void mpf1_state::mpf1(machine_config &config)
+{
/* basic machine hardware */
Z80(config, m_maincpu, XTAL(3'579'545)/2);
m_maincpu->set_addrmap(AS_PROGRAM, &mpf1_state::mpf1_map);
@@ -376,21 +376,21 @@ MACHINE_CONFIG_START(mpf1_state::mpf1)
ppi.out_pb_callback().set(FUNC(mpf1_state::ppi_pb_w));
ppi.out_pc_callback().set(FUNC(mpf1_state::ppi_pc_w));
- MCFG_CASSETTE_ADD("cassette")
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED)
+ CASSETTE(config, m_cassette);
+ m_cassette->set_default_state(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED);
/* video hardware */
config.set_default_layout(layout_mpf1);
/* sound hardware */
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD("speaker", SPEAKER_SOUND)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+ SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 0.25);
TIMER(config, "halt_timer").configure_periodic(FUNC(mpf1_state::check_halt_callback), attotime::from_hz(1));
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(mpf1_state::mpf1b)
+void mpf1_state::mpf1b(machine_config &config)
+{
/* basic machine hardware */
Z80(config, m_maincpu, XTAL(3'579'545)/2);
m_maincpu->set_addrmap(AS_PROGRAM, &mpf1_state::mpf1b_map);
@@ -410,24 +410,23 @@ MACHINE_CONFIG_START(mpf1_state::mpf1b)
ppi.out_pb_callback().set(FUNC(mpf1_state::ppi_pb_w));
ppi.out_pc_callback().set(FUNC(mpf1_state::ppi_pc_w));
- MCFG_CASSETTE_ADD("cassette")
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED)
+ CASSETTE(config, m_cassette);
+ m_cassette->set_default_state(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED);
/* video hardware */
config.set_default_layout(layout_mpf1b);
/* sound hardware */
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD("speaker", SPEAKER_SOUND)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+ SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 0.25);
- MCFG_DEVICE_ADD(TMS5220_TAG, TMS5220, 680000L)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
+ TMS5220(config, TMS5220_TAG, 680000L).add_route(ALL_OUTPUTS, "mono", 0.50);
TIMER(config, "halt_timer").configure_periodic(FUNC(mpf1_state::check_halt_callback), attotime::from_hz(1));
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(mpf1_state::mpf1p)
+void mpf1_state::mpf1p(machine_config &config)
+{
/* basic machine hardware */
Z80(config, m_maincpu, 2500000);
m_maincpu->set_addrmap(AS_PROGRAM, &mpf1_state::mpf1p_map);
@@ -450,16 +449,15 @@ MACHINE_CONFIG_START(mpf1_state::mpf1p)
ppi.out_pb_callback().set(FUNC(mpf1_state::ppi_pb_w));
ppi.out_pc_callback().set(FUNC(mpf1_state::ppi_pc_w));
- MCFG_CASSETTE_ADD("cassette")
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED)
+ CASSETTE(config, m_cassette);
+ m_cassette->set_default_state(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED);
/* sound hardware */
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD("speaker", SPEAKER_SOUND)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+ SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 0.25);
TIMER(config, "halt_timer").configure_periodic(FUNC(mpf1_state::check_halt_callback), attotime::from_hz(1));
-MACHINE_CONFIG_END
+}
/* ROMs */
diff --git a/src/mame/drivers/msx.cpp b/src/mame/drivers/msx.cpp
index 16e3b689a7d..9a76bc47ff8 100644
--- a/src/mame/drivers/msx.cpp
+++ b/src/mame/drivers/msx.cpp
@@ -1364,7 +1364,7 @@ MACHINE_CONFIG_START(msx_state::msx)
MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
MCFG_SOUND_ROUTE(0, "dac", 1.0, DAC_VREF_POS_INPUT)
- WAVE(config, "wave", "cassette").add_route(ALL_OUTPUTS, "speaker", 0.25);
+ WAVE(config, "wave", m_cassette).add_route(ALL_OUTPUTS, "speaker", 0.25);
AY8910(config, m_ay8910, 10.738635_MHz_XTAL / 3 / 2);
m_ay8910->set_flags(AY8910_SINGLE_OUTPUT);
m_ay8910->port_a_read_callback().set(FUNC(msx_state::msx_psg_port_a_r));
@@ -1384,10 +1384,10 @@ MACHINE_CONFIG_START(msx_state::msx)
MCFG_OUTPUT_LATCH_BIT1_HANDLER(WRITELINE("centronics", centronics_device, write_strobe))
/* cassette */
- MCFG_CASSETTE_ADD( "cassette" )
- MCFG_CASSETTE_FORMATS(fmsx_cassette_formats)
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY)
- MCFG_CASSETTE_INTERFACE("msx_cass")
+ CASSETTE(config, m_cassette);
+ m_cassette->set_formats(fmsx_cassette_formats);
+ m_cassette->set_default_state(CASSETTE_PLAY);
+ m_cassette->set_interface("msx_cass");
/* Software lists */
MCFG_SOFTWARE_LIST_ADD("cass_list","msx1_cass")
@@ -1434,7 +1434,7 @@ MACHINE_CONFIG_START(msx2_state::msx2)
MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
MCFG_SOUND_ROUTE(0, "dac", 1.0, DAC_VREF_POS_INPUT)
- WAVE(config, "wave", "cassette").add_route(ALL_OUTPUTS, "speaker", 0.25);
+ WAVE(config, "wave", m_cassette).add_route(ALL_OUTPUTS, "speaker", 0.25);
AY8910(config, m_ay8910, 21.477272_MHz_XTAL / 6 / 2);
m_ay8910->set_flags(AY8910_SINGLE_OUTPUT);
m_ay8910->port_a_read_callback().set(FUNC(msx2_state::msx_psg_port_a_r));
@@ -1454,10 +1454,10 @@ MACHINE_CONFIG_START(msx2_state::msx2)
MCFG_OUTPUT_LATCH_BIT1_HANDLER(WRITELINE("centronics", centronics_device, write_strobe))
/* cassette */
- MCFG_CASSETTE_ADD( "cassette" )
- MCFG_CASSETTE_FORMATS(fmsx_cassette_formats)
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY)
- MCFG_CASSETTE_INTERFACE("msx_cass")
+ CASSETTE(config, m_cassette);
+ m_cassette->set_formats(fmsx_cassette_formats);
+ m_cassette->set_default_state(CASSETTE_PLAY);
+ m_cassette->set_interface("msx_cass");
/* real time clock */
RP5C01(config, m_rtc, 32.768_kHz_XTAL);
@@ -1495,7 +1495,7 @@ MACHINE_CONFIG_START(msx2_state::msx2p)
MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
MCFG_SOUND_ROUTE(0, "dac", 1.0, DAC_VREF_POS_INPUT)
- WAVE(config, "wave", "cassette").add_route(ALL_OUTPUTS, "speaker", 0.25);
+ WAVE(config, "wave", m_cassette).add_route(ALL_OUTPUTS, "speaker", 0.25);
AY8910(config, m_ay8910, 21.477272_MHz_XTAL / 6 / 2);
m_ay8910->set_flags(AY8910_SINGLE_OUTPUT);
m_ay8910->port_a_read_callback().set(FUNC(msx2_state::msx_psg_port_a_r));
@@ -1515,10 +1515,10 @@ MACHINE_CONFIG_START(msx2_state::msx2p)
MCFG_OUTPUT_LATCH_BIT1_HANDLER(WRITELINE("centronics", centronics_device, write_strobe))
/* cassette */
- MCFG_CASSETTE_ADD( "cassette" )
- MCFG_CASSETTE_FORMATS(fmsx_cassette_formats)
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY)
- MCFG_CASSETTE_INTERFACE("msx_cass")
+ CASSETTE(config, m_cassette);
+ m_cassette->set_formats(fmsx_cassette_formats);
+ m_cassette->set_default_state(CASSETTE_PLAY);
+ m_cassette->set_interface("msx_cass");
/* real time clock */
RP5C01(config, m_rtc, 32.768_kHz_XTAL);
diff --git a/src/mame/drivers/mtx.cpp b/src/mame/drivers/mtx.cpp
index ba38a8440e1..04852d39bf7 100644
--- a/src/mame/drivers/mtx.cpp
+++ b/src/mame/drivers/mtx.cpp
@@ -323,9 +323,9 @@ MACHINE_CONFIG_START(mtx_state::mtx512)
MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", "centronics")
MCFG_SNAPSHOT_ADD("snapshot", mtx_state, mtx, "mtx", 1)
- MCFG_CASSETTE_ADD("cassette")
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_MUTED)
- MCFG_CASSETTE_INTERFACE("mtx_cass")
+ CASSETTE(config, m_cassette);
+ m_cassette->set_default_state(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_MUTED);
+ m_cassette->set_interface("mtx_cass");
TIMER(config, "cassette_timer").configure_periodic(FUNC(mtx_state::cassette_tick), attotime::from_hz(44100));
diff --git a/src/mame/drivers/mycom.cpp b/src/mame/drivers/mycom.cpp
index 3ff21c80436..de95edb5960 100644
--- a/src/mame/drivers/mycom.cpp
+++ b/src/mame/drivers/mycom.cpp
@@ -557,7 +557,7 @@ MACHINE_CONFIG_START(mycom_state::mycom)
/* Devices */
MCFG_DEVICE_ADD("rtc", MSM5832, 32.768_kHz_XTAL)
- MCFG_CASSETTE_ADD("cassette")
+ CASSETTE(config, m_cass);
FD1771(config, m_fdc, 16_MHz_XTAL / 16);
MCFG_FLOPPY_DRIVE_ADD("fdc:0", mycom_floppies, "525sd", floppy_image_device::default_floppy_formats)
diff --git a/src/mame/drivers/mz2000.cpp b/src/mame/drivers/mz2000.cpp
index 05a52679b10..b2c3a215884 100644
--- a/src/mame/drivers/mz2000.cpp
+++ b/src/mame/drivers/mz2000.cpp
@@ -910,10 +910,10 @@ MACHINE_CONFIG_START(mz2000_state::mz2000)
MCFG_SOFTWARE_LIST_ADD("flop_list", "mz2000_flop")
- MCFG_CASSETTE_ADD( "cassette" )
- MCFG_CASSETTE_FORMATS(mz700_cassette_formats)
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED)
- MCFG_CASSETTE_INTERFACE("mz_cass")
+ CASSETTE(config, m_cass);
+ m_cass->set_formats(mz700_cassette_formats);
+ m_cass->set_default_state(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED);
+ m_cass->set_interface("mz_cass");
MCFG_SOFTWARE_LIST_ADD("cass_list","mz2000_cass")
@@ -931,7 +931,7 @@ MACHINE_CONFIG_START(mz2000_state::mz2000)
SPEAKER(config, "mono").front_center();
- WAVE(config, "wave", "cassette").add_route(ALL_OUTPUTS, "mono", 0.25);
+ WAVE(config, "wave", m_cass).add_route(ALL_OUTPUTS, "mono", 0.25);
BEEP(config, "beeper", 4096).add_route(ALL_OUTPUTS,"mono",0.15);
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/mz700.cpp b/src/mame/drivers/mz700.cpp
index e213d905d2f..98479a728e7 100644
--- a/src/mame/drivers/mz700.cpp
+++ b/src/mame/drivers/mz700.cpp
@@ -417,10 +417,10 @@ MACHINE_CONFIG_START(mz_state::mz700)
TTL74145(config, m_ls145);
- MCFG_CASSETTE_ADD( "cassette" )
- MCFG_CASSETTE_FORMATS(mz700_cassette_formats)
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED)
- MCFG_CASSETTE_INTERFACE("mz_cass")
+ CASSETTE(config, m_cassette);
+ m_cassette->set_formats(mz700_cassette_formats);
+ m_cassette->set_default_state(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED);
+ m_cassette->set_interface("mz_cass");
MCFG_SOFTWARE_LIST_ADD("cass_list","mz700_cass")
diff --git a/src/mame/drivers/mz80.cpp b/src/mame/drivers/mz80.cpp
index ac4c703cbb2..247b3944651 100644
--- a/src/mame/drivers/mz80.cpp
+++ b/src/mame/drivers/mz80.cpp
@@ -318,9 +318,9 @@ MACHINE_CONFIG_START(mz80_state::mz80k)
m_pit->out_handler<2>().set(FUNC(mz80_state::pit_out2_changed));
TIMER(config, "tempo").configure_periodic(FUNC(mz80_state::ne555_tempo_callback), attotime::from_hz(34));
- MCFG_CASSETTE_ADD( "cassette" )
- MCFG_CASSETTE_FORMATS(mz700_cassette_formats)
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED)
+ CASSETTE(config, m_cassette);
+ m_cassette->set_formats(mz700_cassette_formats);
+ m_cassette->set_default_state(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED);
MACHINE_CONFIG_END
void mz80_state::mz80kj(machine_config &config)
diff --git a/src/mame/drivers/ondra.cpp b/src/mame/drivers/ondra.cpp
index 12c9f073cd2..5f51b057465 100644
--- a/src/mame/drivers/ondra.cpp
+++ b/src/mame/drivers/ondra.cpp
@@ -143,11 +143,11 @@ MACHINE_CONFIG_START(ondra_state::ondra)
// sound hardware
SPEAKER(config, "mono").front_center();
- WAVE(config, "wave", "cassette").add_route(ALL_OUTPUTS, "mono", 0.25);
+ WAVE(config, "wave", m_cassette).add_route(ALL_OUTPUTS, "mono", 0.25);
- MCFG_CASSETTE_ADD( "cassette" )
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED)
- MCFG_CASSETTE_INTERFACE("ondra_cass")
+ CASSETTE(config, m_cassette);
+ m_cassette->set_default_state(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED);
+ m_cassette->set_interface("ondra_cass");
MCFG_SOFTWARE_LIST_ADD("cass_list","ondra")
diff --git a/src/mame/drivers/orao.cpp b/src/mame/drivers/orao.cpp
index f8f98b1934e..734033e5567 100644
--- a/src/mame/drivers/orao.cpp
+++ b/src/mame/drivers/orao.cpp
@@ -193,10 +193,10 @@ MACHINE_CONFIG_START(orao_state::orao)
SPEAKER_SOUND(config, "speaker").add_route(ALL_OUTPUTS, "mono", 0.50);
WAVE(config, "wave", "cassette").add_route(ALL_OUTPUTS, "mono", 0.25);
- MCFG_CASSETTE_ADD( "cassette")
- MCFG_CASSETTE_FORMATS(orao_cassette_formats)
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED)
- MCFG_CASSETTE_INTERFACE("orao_cass")
+ CASSETTE(config, m_cassette);
+ m_cassette->set_formats(orao_cassette_formats);
+ m_cassette->set_default_state(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED);
+ m_cassette->set_interface("orao_cass");
MCFG_SOFTWARE_LIST_ADD("cass_list","orao")
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/pc6001.cpp b/src/mame/drivers/pc6001.cpp
index 343c78dd63a..d4fa2d2c229 100644
--- a/src/mame/drivers/pc6001.cpp
+++ b/src/mame/drivers/pc6001.cpp
@@ -1440,16 +1440,6 @@ void pc6001sr_state::machine_reset()
}
-#if 0
-static const cassette_interface pc6001_cassette_interface =
-{
- pc6001_cassette_formats,
- nullptr,
- (cassette_state)(CASSETTE_STOPPED | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED),
- nullptr
-};
-#endif
-
static const gfx_layout char_layout =
{
8, 16,
@@ -1516,7 +1506,9 @@ MACHINE_CONFIG_START(pc6001_state::pc6001)
MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "pc6001_cart")
-// MCFG_CASSETTE_ADD("cassette", pc6001_cassette_interface)
+// CASSETTE(config, m_cassette);
+// m_cassette->set_formats(pc6001_cassette_formats);
+// m_cassette->set_default_state(CASSETTE_STOPPED | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED);
MCFG_GENERIC_CARTSLOT_ADD("cas_hack", generic_plain_slot, "pc6001_cass")
MCFG_GENERIC_EXTENSIONS("cas,p6")
diff --git a/src/mame/drivers/pc8001.cpp b/src/mame/drivers/pc8001.cpp
index a61565c6a3c..92d31b9ca22 100644
--- a/src/mame/drivers/pc8001.cpp
+++ b/src/mame/drivers/pc8001.cpp
@@ -521,8 +521,8 @@ MACHINE_CONFIG_START(pc8001_state::pc8001)
MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", CENTRONICS_TAG)
- MCFG_CASSETTE_ADD("cassette")
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_MUTED)
+ CASSETTE(config, m_cassette);
+ m_cassette->set_default_state(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_MUTED);
RAM(config, RAM_TAG).set_default_size("16K").set_extra_options("32K,64K");
MACHINE_CONFIG_END
@@ -567,8 +567,8 @@ MACHINE_CONFIG_START(pc8001mk2_state::pc8001mk2)
MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", CENTRONICS_TAG)
- MCFG_CASSETTE_ADD("cassette")
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_MUTED)
+ CASSETTE(config, m_cassette);
+ m_cassette->set_default_state(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_MUTED);
RAM(config, RAM_TAG).set_default_size("64K");
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/pc8801.cpp b/src/mame/drivers/pc8801.cpp
index c2b228dfc45..70bfecbcc88 100644
--- a/src/mame/drivers/pc8801.cpp
+++ b/src/mame/drivers/pc8801.cpp
@@ -2376,8 +2376,8 @@ MACHINE_CONFIG_START(pc8801_state::pc8801)
#endif
UPD1990A(config, m_rtc);
//MCFG_CENTRONICS_ADD("centronics", centronics_devices, "printer")
- MCFG_CASSETTE_ADD("cassette")
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_MUTED)
+ CASSETTE(config, m_cassette);
+ m_cassette->set_default_state(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_MUTED);
MCFG_SOFTWARE_LIST_ADD("tape_list","pc8801_cass")
diff --git a/src/mame/drivers/pcm.cpp b/src/mame/drivers/pcm.cpp
index e8dc1e64561..12cd4d4a39b 100644
--- a/src/mame/drivers/pcm.cpp
+++ b/src/mame/drivers/pcm.cpp
@@ -282,7 +282,7 @@ MACHINE_CONFIG_START(pcm_state::pcm)
/* Devices */
K7659_KEYBOARD(config, K7659_KEYBOARD_TAG, 0);
- MCFG_CASSETTE_ADD("cassette")
+ CASSETTE(config, m_cass);
Z80PIO(config, m_pio_u, XTAL(10'000'000)/4);
m_pio_u->out_int_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0);
diff --git a/src/mame/drivers/pegasus.cpp b/src/mame/drivers/pegasus.cpp
index 1ab5f7726a7..4b8162bb4bd 100644
--- a/src/mame/drivers/pegasus.cpp
+++ b/src/mame/drivers/pegasus.cpp
@@ -508,7 +508,7 @@ MACHINE_CONFIG_START(pegasus_state::pegasus)
/* sound hardware */
SPEAKER(config, "mono").front_center();
- WAVE(config, "wave", "cassette").add_route(ALL_OUTPUTS, "mono", 0.05);
+ WAVE(config, "wave", m_cass).add_route(ALL_OUTPUTS, "mono", 0.05);
/* devices */
PIA6821(config, m_pia_s, 0);
@@ -541,8 +541,8 @@ MACHINE_CONFIG_START(pegasus_state::pegasus)
MCFG_GENERIC_SOCKET_ADD("exp0d", generic_plain_slot, "pegasus_cart")
MCFG_GENERIC_LOAD(pegasus_state, exp0d_load)
- MCFG_CASSETTE_ADD("cassette")
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED|CASSETTE_MOTOR_ENABLED)
+ CASSETTE(config, m_cass);
+ m_cass->set_default_state(CASSETTE_STOPPED|CASSETTE_MOTOR_ENABLED);
/* Software lists */
MCFG_SOFTWARE_LIST_ADD("cart_list", "pegasus_cart")
diff --git a/src/mame/drivers/pencil2.cpp b/src/mame/drivers/pencil2.cpp
index 624e697cc44..30cd5a36af5 100644
--- a/src/mame/drivers/pencil2.cpp
+++ b/src/mame/drivers/pencil2.cpp
@@ -327,11 +327,11 @@ MACHINE_CONFIG_START(pencil2_state::pencil2)
SPEAKER(config, "mono").front_center();
MCFG_DEVICE_ADD("sn76489a", SN76489A, XTAL(10'738'635)/3) // guess
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
- WAVE(config, "wave", "cassette").add_route(ALL_OUTPUTS, "mono", 0.25);
+ WAVE(config, "wave", m_cass).add_route(ALL_OUTPUTS, "mono", 0.25);
/* cassette */
- MCFG_CASSETTE_ADD( "cassette" )
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED)
+ CASSETTE(config, m_cass);
+ m_cass->set_default_state(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED);
/* cartridge */
MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "pencil2_cart")
diff --git a/src/mame/drivers/phc25.cpp b/src/mame/drivers/phc25.cpp
index a9a5955f927..957a4eaac89 100644
--- a/src/mame/drivers/phc25.cpp
+++ b/src/mame/drivers/phc25.cpp
@@ -320,13 +320,13 @@ MACHINE_CONFIG_START(phc25_state::phc25)
psg.port_a_read_callback().set_ioport("JOY0");
psg.port_b_read_callback().set_ioport("JOY1");
psg.add_route(ALL_OUTPUTS, "mono", 1.00);
- WAVE(config, "wave", "cassette").add_route(ALL_OUTPUTS, "mono", 0.15);
+ WAVE(config, "wave", m_cassette).add_route(ALL_OUTPUTS, "mono", 0.15);
/* devices */
- MCFG_CASSETTE_ADD("cassette")
- MCFG_CASSETTE_FORMATS(phc25_cassette_formats)
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED)
- MCFG_CASSETTE_INTERFACE("phc25_cass")
+ CASSETTE(config, m_cassette);
+ m_cassette->set_formats(phc25_cassette_formats);
+ m_cassette->set_default_state(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED);
+ m_cassette->set_interface("phc25_cass");
MCFG_DEVICE_ADD(m_centronics, CENTRONICS, centronics_devices, "printer")
MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE(*this, phc25_state, write_centronics_busy))
diff --git a/src/mame/drivers/pk8000.cpp b/src/mame/drivers/pk8000.cpp
index 941ad1c568f..d26f7998579 100644
--- a/src/mame/drivers/pk8000.cpp
+++ b/src/mame/drivers/pk8000.cpp
@@ -392,11 +392,11 @@ MACHINE_CONFIG_START(pk8000_state::pk8000)
/* audio hardware */
SPEAKER(config, "mono").front_center();
SPEAKER_SOUND(config, "speaker").add_route(ALL_OUTPUTS, "mono", 0.50);
- WAVE(config, "wave", "cassette").add_route(ALL_OUTPUTS, "mono", 0.25);
+ WAVE(config, "wave", m_cassette).add_route(ALL_OUTPUTS, "mono", 0.25);
- MCFG_CASSETTE_ADD( "cassette" )
- MCFG_CASSETTE_FORMATS(fmsx_cassette_formats)
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY)
+ CASSETTE(config, m_cassette);
+ m_cassette->set_formats(fmsx_cassette_formats);
+ m_cassette->set_default_state(CASSETTE_PLAY);
/* internal ram */
RAM(config, RAM_TAG).set_default_size("64K");
diff --git a/src/mame/drivers/pk8020.cpp b/src/mame/drivers/pk8020.cpp
index c845ad68667..a161a416072 100644
--- a/src/mame/drivers/pk8020.cpp
+++ b/src/mame/drivers/pk8020.cpp
@@ -258,8 +258,7 @@ MACHINE_CONFIG_START(pk8020_state::pk8020)
SPEAKER_SOUND(config, "speaker").add_route(ALL_OUTPUTS, "mono", 0.25);
WAVE(config, "wave", "cassette").add_route(ALL_OUTPUTS, "mono", 0.25);
- MCFG_CASSETTE_ADD( "cassette" )
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY)
+ CASSETTE(config, "cassette").set_default_state(CASSETTE_PLAY);
/* internal ram */
RAM(config, RAM_TAG).set_default_size("258K").set_default_value(0x00); // 64 + 4*48 + 2 = 258
diff --git a/src/mame/drivers/poisk1.cpp b/src/mame/drivers/poisk1.cpp
index ccb3a81dda8..db74763f360 100644
--- a/src/mame/drivers/poisk1.cpp
+++ b/src/mame/drivers/poisk1.cpp
@@ -685,8 +685,8 @@ MACHINE_CONFIG_START(p1_state::poisk1)
MCFG_DEVICE_ADD("isa3", ISA8_SLOT, 0, "isa", p1_isa8_cards, nullptr, false)
MCFG_DEVICE_ADD("isa4", ISA8_SLOT, 0, "isa", p1_isa8_cards, nullptr, false)
- MCFG_CASSETTE_ADD( "cassette" )
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED)
+ CASSETTE(config, m_cassette);
+ m_cassette->set_default_state(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED);
MCFG_SOFTWARE_LIST_ADD("flop_list","poisk1_flop")
// MCFG_SOFTWARE_LIST_ADD("cass_list","poisk1_cass")
diff --git a/src/mame/drivers/poly88.cpp b/src/mame/drivers/poly88.cpp
index 3d24a4bf349..1a16a1fd8c3 100644
--- a/src/mame/drivers/poly88.cpp
+++ b/src/mame/drivers/poly88.cpp
@@ -218,12 +218,12 @@ MACHINE_CONFIG_START(poly88_state::poly88)
/* audio hardware */
SPEAKER(config, "mono").front_center();
- WAVE(config, "wave", "cassette").add_route(ALL_OUTPUTS, "mono", 0.25);
+ WAVE(config, "wave", m_cassette).add_route(ALL_OUTPUTS, "mono", 0.25);
/* cassette */
- MCFG_CASSETTE_ADD( "cassette" )
- MCFG_CASSETTE_CREATE_OPTS(&poly88_cassette_options)
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED)
+ CASSETTE(config, m_cassette);
+ m_cassette->set_create_opts(&poly88_cassette_options);
+ m_cassette->set_default_state(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED);
/* uart */
I8251(config, m_uart, XTAL(16'588'800) / 9);
diff --git a/src/mame/drivers/poly880.cpp b/src/mame/drivers/poly880.cpp
index 30b9b44df64..d079ba13e65 100644
--- a/src/mame/drivers/poly880.cpp
+++ b/src/mame/drivers/poly880.cpp
@@ -245,11 +245,12 @@ void poly880_state::machine_start()
/* Machine Driver */
-MACHINE_CONFIG_START(poly880_state::poly880)
+void poly880_state::poly880(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD(Z80_TAG, Z80, XTAL(7'372'800)/8)
- MCFG_DEVICE_PROGRAM_MAP(poly880_mem)
- MCFG_DEVICE_IO_MAP(poly880_io)
+ Z80(config, m_maincpu, XTAL(7'372'800)/8);
+ m_maincpu->set_addrmap(AS_PROGRAM, &poly880_state::poly880_mem);
+ m_maincpu->set_addrmap(AS_IO, &poly880_state::poly880_io);
/* video hardware */
config.set_default_layout(layout_poly880);
@@ -270,12 +271,12 @@ MACHINE_CONFIG_START(poly880_state::poly880)
z80pio_device& pio2(Z80PIO(config, Z80PIO2_TAG, XTAL(7'372'800)/16));
pio2.out_int_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0);
- MCFG_CASSETTE_ADD("cassette")
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_MUTED)
+ CASSETTE(config, m_cassette);
+ m_cassette->set_default_state(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_MUTED);
/* internal ram */
RAM(config, RAM_TAG).set_default_size("1K");
-MACHINE_CONFIG_END
+}
/* ROMs */
diff --git a/src/mame/drivers/primo.cpp b/src/mame/drivers/primo.cpp
index 803f97bcb58..5fbd17d0078 100644
--- a/src/mame/drivers/primo.cpp
+++ b/src/mame/drivers/primo.cpp
@@ -266,17 +266,17 @@ MACHINE_CONFIG_START(primo_state::primoa32)
/* sound hardware */
SPEAKER(config, "mono").front_center();
- WAVE(config, "wave", "cassette").add_route(ALL_OUTPUTS, "mono", 0.25);
+ WAVE(config, "wave", m_cassette).add_route(ALL_OUTPUTS, "mono", 0.25);
SPEAKER_SOUND(config, "speaker").add_route(ALL_OUTPUTS, "mono", 0.50);
/* snapshot/quickload */
MCFG_SNAPSHOT_ADD("snapshot", primo_state, primo, "pss", 0)
MCFG_QUICKLOAD_ADD("quickload", primo_state, primo, "pp", 0)
- MCFG_CASSETTE_ADD( "cassette" )
- MCFG_CASSETTE_FORMATS(primo_ptp_format)
- MCFG_CASSETTE_CREATE_OPTS(&primo_cassette_options)
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED)
+ CASSETTE(config, m_cassette);
+ m_cassette->set_formats(primo_ptp_format);
+ m_cassette->set_create_opts(&primo_cassette_options);
+ m_cassette->set_default_state(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED);
/* floppy from serial bus */
MCFG_CBM_IEC_ADD(nullptr)
diff --git a/src/mame/drivers/pro80.cpp b/src/mame/drivers/pro80.cpp
index 857593676d8..8b15dee23d9 100644
--- a/src/mame/drivers/pro80.cpp
+++ b/src/mame/drivers/pro80.cpp
@@ -175,11 +175,12 @@ void pro80_state::machine_reset()
m_cass_in = 0;
}
-MACHINE_CONFIG_START(pro80_state::pro80)
+void pro80_state::pro80(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, XTAL(4'000'000) / 2)
- MCFG_DEVICE_PROGRAM_MAP(pro80_mem)
- MCFG_DEVICE_IO_MAP(pro80_io)
+ Z80(config, m_maincpu, XTAL(4'000'000) / 2);
+ m_maincpu->set_addrmap(AS_PROGRAM, &pro80_state::pro80_mem);
+ m_maincpu->set_addrmap(AS_IO, &pro80_state::pro80_io);
/* video hardware */
config.set_default_layout(layout_pro80);
@@ -189,10 +190,10 @@ MACHINE_CONFIG_START(pro80_state::pro80)
WAVE(config, "wave", "cassette").add_route(ALL_OUTPUTS, "mono", 0.05);
/* Devices */
- MCFG_CASSETTE_ADD( "cassette" )
+ CASSETTE(config, m_cass);
Z80PIO(config, "pio", XTAL(4'000'000) / 2);
TIMER(config, "timer_p").configure_periodic(FUNC(pro80_state::timer_p), attotime::from_hz(40000)); // cass read
-MACHINE_CONFIG_END
+}
/* ROM definition */
ROM_START( pro80 )
diff --git a/src/mame/drivers/proteus3.cpp b/src/mame/drivers/proteus3.cpp
index aac578e8a34..5834054a08a 100644
--- a/src/mame/drivers/proteus3.cpp
+++ b/src/mame/drivers/proteus3.cpp
@@ -409,10 +409,10 @@ MACHINE_CONFIG_START(proteus3_state::proteus3)
ACIA6850(config, m_acia1, 0);
m_acia1->txd_handler().set(FUNC(proteus3_state::acia1_txdata_w));
- MCFG_CASSETTE_ADD("cassette")
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED)
+ CASSETTE(config, m_cass);
+ m_cass->set_default_state(CASSETTE_PLAY | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED);
SPEAKER(config, "mono").front_center();
- WAVE(config, "wave", "cassette").add_route(ALL_OUTPUTS, "mono", 0.25);
+ WAVE(config, "wave", m_cass).add_route(ALL_OUTPUTS, "mono", 0.25);
TIMER(config, "timer_c").configure_periodic(FUNC(proteus3_state::timer_c), attotime::from_hz(4800));
TIMER(config, "timer_p").configure_periodic(FUNC(proteus3_state::timer_p), attotime::from_hz(40000));
diff --git a/src/mame/drivers/pv2000.cpp b/src/mame/drivers/pv2000.cpp
index faaa9c7159d..b1e2744860a 100644
--- a/src/mame/drivers/pv2000.cpp
+++ b/src/mame/drivers/pv2000.cpp
@@ -406,11 +406,11 @@ MACHINE_CONFIG_START(pv2000_state::pv2000)
MCFG_DEVICE_ADD("sn76489a", SN76489A, XTAL(7'159'090)/2) /* 3.579545 MHz */
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
- WAVE(config, "wave", "cassette").add_route(ALL_OUTPUTS, "mono", 0.25);
+ WAVE(config, "wave", m_cass).add_route(ALL_OUTPUTS, "mono", 0.25);
/* cassette */
- MCFG_CASSETTE_ADD( "cassette" )
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_DISABLED)
+ CASSETTE(config, m_cass);
+ m_cass->set_default_state(CASSETTE_STOPPED | CASSETTE_MOTOR_DISABLED);
/* cartridge */
MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "pv2000_cart")
diff --git a/src/mame/drivers/px4.cpp b/src/mame/drivers/px4.cpp
index f5ff8450691..e0d3625f2c4 100644
--- a/src/mame/drivers/px4.cpp
+++ b/src/mame/drivers/px4.cpp
@@ -1522,8 +1522,8 @@ MACHINE_CONFIG_START(px4_state::px4)
MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", "centronics")
// external cassette
- MCFG_CASSETTE_ADD("extcas")
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_DISABLED)
+ CASSETTE(config, m_ext_cas);
+ m_ext_cas->set_default_state(CASSETTE_PLAY | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_DISABLED);
TIMER(config, m_ext_cas_timer).configure_generic(FUNC(px4_state::ext_cassette_read));
diff --git a/src/mame/drivers/px8.cpp b/src/mame/drivers/px8.cpp
index fdb96f8cb75..ff8c1773a9a 100644
--- a/src/mame/drivers/px8.cpp
+++ b/src/mame/drivers/px8.cpp
@@ -768,7 +768,7 @@ MACHINE_CONFIG_START(px8_state::px8)
/* sound hardware */
SPEAKER(config, "mono").front_center();
- WAVE(config, "wave", "cassette").add_route(0, "mono", 0.25);
+ WAVE(config, "wave", m_cassette).add_route(0, "mono", 0.25);
/* cartridge */
MCFG_GENERIC_CARTSLOT_ADD("capsule1", generic_plain_slot, "px8_cart")
@@ -780,8 +780,8 @@ MACHINE_CONFIG_START(px8_state::px8)
/* devices */
MCFG_DEVICE_ADD(I8251_TAG, I8251, 0)
- MCFG_CASSETTE_ADD("cassette")
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED)
+ CASSETTE(config, m_cassette);
+ m_cassette->set_default_state(CASSETTE_STOPPED | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED);
/* internal ram */
RAM(config, RAM_TAG).set_default_size("64K");
diff --git a/src/mame/drivers/radio86.cpp b/src/mame/drivers/radio86.cpp
index 808a14f5161..1918b653697 100644
--- a/src/mame/drivers/radio86.cpp
+++ b/src/mame/drivers/radio86.cpp
@@ -496,10 +496,10 @@ MACHINE_CONFIG_START(radio86_state::radio86)
m_dma8257->out_iow_cb<2>().set("i8275", FUNC(i8275_device::dack_w));
m_dma8257->set_reverse_rw_mode(1);
- MCFG_CASSETTE_ADD( "cassette" )
- MCFG_CASSETTE_FORMATS(rkr_cassette_formats)
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED)
- MCFG_CASSETTE_INTERFACE("radio86_cass")
+ CASSETTE(config, m_cassette);
+ m_cassette->set_formats(rkr_cassette_formats);
+ m_cassette->set_default_state(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED);
+ m_cassette->set_interface("radio86_cass");
MCFG_SOFTWARE_LIST_ADD("cass_list", "radio86_cass")
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/rm380z.cpp b/src/mame/drivers/rm380z.cpp
index e2215a65ba4..cad42716375 100644
--- a/src/mame/drivers/rm380z.cpp
+++ b/src/mame/drivers/rm380z.cpp
@@ -254,9 +254,9 @@ MACHINE_CONFIG_START(rm380z_state::rm380z)
PALETTE(config, "palette", palette_device::MONOCHROME);
/* cassette */
- MCFG_CASSETTE_ADD( "cassette" )
-// MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_MUTED)
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY | CASSETTE_MOTOR_ENABLED)
+ CASSETTE(config, m_cassette);
+// m_cassette->set_default_state(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_MUTED);
+ m_cassette->set_default_state(CASSETTE_PLAY | CASSETTE_MOTOR_ENABLED);
//m_cassette->change_state((BIT(data,x)) ? CASSETTE_MOTOR_DISABLED : CASSETTE_MOTOR_ENABLED, CASSETTE_MASK_MOTOR);
/* RAM configurations */
diff --git a/src/mame/drivers/rx78.cpp b/src/mame/drivers/rx78.cpp
index 5a21fbd418d..2f06fbf010c 100644
--- a/src/mame/drivers/rx78.cpp
+++ b/src/mame/drivers/rx78.cpp
@@ -498,7 +498,7 @@ MACHINE_CONFIG_START(rx78_state::rx78)
RAM(config, RAM_TAG).set_default_size("32K").set_extra_options("16K");
- MCFG_CASSETTE_ADD( "cassette" )
+ CASSETTE(config, m_cass);
SPEAKER(config, "mono").front_center();
diff --git a/src/mame/drivers/sorcerer.cpp b/src/mame/drivers/sorcerer.cpp
index f76ddad5d35..4411cf3cef2 100644
--- a/src/mame/drivers/sorcerer.cpp
+++ b/src/mame/drivers/sorcerer.cpp
@@ -426,8 +426,8 @@ MACHINE_CONFIG_START(sorcerer_state::sorcerer)
/* sound hardware */
SPEAKER(config, "mono").front_center();
- WAVE(config, "wave", "cassette").add_route(ALL_OUTPUTS, "mono", 0.05); // cass1 speaker
- WAVE(config, "wave2", "cassette2").add_route(ALL_OUTPUTS, "mono", 0.05); // cass2 speaker
+ WAVE(config, "wave", m_cassette1).add_route(ALL_OUTPUTS, "mono", 0.05); // cass1 speaker
+ WAVE(config, "wave2", m_cassette2).add_route(ALL_OUTPUTS, "mono", 0.05); // cass2 speaker
AY31015(config, m_uart);
m_uart->set_tx_clock(ES_UART_CLOCK);
@@ -449,15 +449,15 @@ MACHINE_CONFIG_START(sorcerer_state::sorcerer)
MCFG_SNAPSHOT_ADD("snapshot", sorcerer_state, sorcerer, "snp", 2)
MCFG_QUICKLOAD_ADD("quickload", sorcerer_state, sorcerer, "bin", 3)
- MCFG_CASSETTE_ADD( "cassette" )
- MCFG_CASSETTE_FORMATS(sorcerer_cassette_formats)
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED)
- MCFG_CASSETTE_INTERFACE("sorcerer_cass")
+ CASSETTE(config, m_cassette1);
+ m_cassette1->set_formats(sorcerer_cassette_formats);
+ m_cassette1->set_default_state(CASSETTE_PLAY | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED);
+ m_cassette1->set_interface("sorcerer_cass");
- MCFG_CASSETTE_ADD( "cassette2" )
- MCFG_CASSETTE_FORMATS(sorcerer_cassette_formats)
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED)
- MCFG_CASSETTE_INTERFACE("sorcerer_cass")
+ CASSETTE(config, m_cassette2);
+ m_cassette2->set_formats(sorcerer_cassette_formats);
+ m_cassette2->set_default_state(CASSETTE_PLAY | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED);
+ m_cassette2->set_interface("sorcerer_cass");
/* cartridge */
MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "sorcerer_cart")
diff --git a/src/mame/drivers/spc1000.cpp b/src/mame/drivers/spc1000.cpp
index 97500d01770..83e9a2c6398 100644
--- a/src/mame/drivers/spc1000.cpp
+++ b/src/mame/drivers/spc1000.cpp
@@ -489,7 +489,7 @@ MACHINE_CONFIG_START(spc1000_state::spc1000)
ay8910.port_a_read_callback().set(FUNC(spc1000_state::porta_r));
ay8910.port_b_write_callback().set("cent_data_out", FUNC(output_latch_device::bus_w));
ay8910.add_route(ALL_OUTPUTS, "mono", 1.00);
- WAVE(config, "wave", "cassette").add_route(ALL_OUTPUTS, "mono", 0.05);
+ WAVE(config, "wave", m_cass).add_route(ALL_OUTPUTS, "mono", 0.05);
MCFG_DEVICE_ADD("ext1", SPC1000_EXP_SLOT, 0)
MCFG_DEVICE_SLOT_INTERFACE(spc1000_exp, nullptr, false)
@@ -499,10 +499,10 @@ MACHINE_CONFIG_START(spc1000_state::spc1000)
MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", "centronics")
MCFG_DEVICE_ADD("cent_status_in", INPUT_BUFFER, 0)
- MCFG_CASSETTE_ADD("cassette")
- MCFG_CASSETTE_FORMATS(spc1000_cassette_formats)
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_DISABLED)
- MCFG_CASSETTE_INTERFACE("spc1000_cass")
+ CASSETTE(config, m_cass);
+ m_cass->set_formats(spc1000_cassette_formats);
+ m_cass->set_default_state(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_DISABLED);
+ m_cass->set_interface("spc1000_cass");
MCFG_SOFTWARE_LIST_ADD("cass_list", "spc1000_cass")
diff --git a/src/mame/drivers/spc1500.cpp b/src/mame/drivers/spc1500.cpp
index 8cbed428c56..b4fba68fe6d 100644
--- a/src/mame/drivers/spc1500.cpp
+++ b/src/mame/drivers/spc1500.cpp
@@ -919,17 +919,17 @@ MACHINE_CONFIG_START(spc1500_state::spc1500)
m_sound->port_a_read_callback().set(FUNC(spc1500_state::psga_r));
m_sound->port_b_write_callback().set(FUNC(spc1500_state::psgb_w));
m_sound->add_route(ALL_OUTPUTS, "mono", 1.00);
- WAVE(config, "wave", "cassette").add_route(ALL_OUTPUTS, "mono", 0.25);
+ WAVE(config, "wave", m_cass).add_route(ALL_OUTPUTS, "mono", 0.25);
MCFG_DEVICE_ADD(m_centronics, CENTRONICS, centronics_devices, "printer")
MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE(*this, spc1500_state, centronics_busy_w))
MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", "centronics")
MCFG_DEVICE_ADD("cent_status_in", INPUT_BUFFER, 0)
- MCFG_CASSETTE_ADD("cassette")
- MCFG_CASSETTE_FORMATS(spc1000_cassette_formats)
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_SPEAKER_MUTED | CASSETTE_MOTOR_DISABLED)
- MCFG_CASSETTE_INTERFACE("spc1500_cass")
+ CASSETTE(config, m_cass);
+ m_cass->set_formats(spc1000_cassette_formats);
+ m_cass->set_default_state(CASSETTE_STOPPED | CASSETTE_SPEAKER_MUTED | CASSETTE_MOTOR_DISABLED);
+ m_cass->set_interface("spc1500_cass");
MCFG_SOFTWARE_LIST_ADD("cass_list", "spc1500_cass")
diff --git a/src/mame/drivers/special.cpp b/src/mame/drivers/special.cpp
index 60378882403..eabff86da2d 100644
--- a/src/mame/drivers/special.cpp
+++ b/src/mame/drivers/special.cpp
@@ -387,7 +387,7 @@ MACHINE_CONFIG_START(special_state::special)
MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
MCFG_SOUND_ROUTE(0, "dac", 1.0, DAC_VREF_POS_INPUT)
- WAVE(config, "wave", "cassette").add_route(ALL_OUTPUTS, "speaker", 0.25);
+ WAVE(config, "wave", m_cassette).add_route(ALL_OUTPUTS, "speaker", 0.25);
/* Devices */
I8255(config, m_ppi);
@@ -398,10 +398,10 @@ MACHINE_CONFIG_START(special_state::special)
m_ppi->in_pc_callback().set(FUNC(special_state::specialist_8255_portc_r));
m_ppi->out_pc_callback().set(FUNC(special_state::specialist_8255_portc_w));
- MCFG_CASSETTE_ADD( "cassette" )
- MCFG_CASSETTE_FORMATS(rks_cassette_formats)
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED)
- MCFG_CASSETTE_INTERFACE("special_cass")
+ CASSETTE(config, m_cassette);
+ m_cassette->set_formats(rks_cassette_formats);
+ m_cassette->set_default_state(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED);
+ m_cassette->set_interface("special_cass");
MCFG_SOFTWARE_LIST_ADD("cass_list","special_cass")
MACHINE_CONFIG_END
@@ -498,13 +498,13 @@ MACHINE_CONFIG_START(special_state::erik)
MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
MCFG_SOUND_ROUTE(0, "dac", 1.0, DAC_VREF_POS_INPUT)
- WAVE(config, "wave", "cassette").add_route(ALL_OUTPUTS, "speaker", 0.25);
+ WAVE(config, "wave", m_cassette).add_route(ALL_OUTPUTS, "speaker", 0.25);
/* Devices */
- MCFG_CASSETTE_ADD( "cassette" )
- MCFG_CASSETTE_FORMATS(rks_cassette_formats)
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED)
- MCFG_CASSETTE_INTERFACE("special_cass")
+ CASSETTE(config, m_cassette);
+ m_cassette->set_formats(rks_cassette_formats);
+ m_cassette->set_default_state(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED);
+ m_cassette->set_interface("special_cass");
I8255(config, m_ppi);
m_ppi->in_pa_callback().set(FUNC(special_state::specialist_8255_porta_r));
diff --git a/src/mame/drivers/svi318.cpp b/src/mame/drivers/svi318.cpp
index bcca2074c81..3653a443433 100644
--- a/src/mame/drivers/svi318.cpp
+++ b/src/mame/drivers/svi318.cpp
@@ -548,17 +548,17 @@ MACHINE_CONFIG_START(svi3x8_state::svi318)
// sound hardware
SPEAKER(config, "mono").front_center();
SPEAKER_SOUND(config, "speaker").add_route(ALL_OUTPUTS, "mono", 0.25);
- WAVE(config, "wave", "cassette").add_route(ALL_OUTPUTS, "mono", 0.25);
+ WAVE(config, "wave", m_cassette).add_route(ALL_OUTPUTS, "mono", 0.25);
ay8910_device &psg(AY8910(config, "psg", XTAL(10'738'635) / 6));
psg.port_a_read_callback().set_ioport("JOY");
psg.port_b_write_callback().set(FUNC(svi3x8_state::bank_w));
psg.add_route(ALL_OUTPUTS, "mono", 0.75);
// cassette
- MCFG_CASSETTE_ADD("cassette")
- MCFG_CASSETTE_FORMATS(svi_cassette_formats)
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED)
- MCFG_CASSETTE_INTERFACE("svi318_cass")
+ CASSETTE(config, m_cassette);
+ m_cassette->set_formats(svi_cassette_formats);
+ m_cassette->set_default_state(CASSETTE_STOPPED);
+ m_cassette->set_interface("svi318_cass");
MCFG_SOFTWARE_LIST_ADD("cass_list", "svi318_cass")
// cartridge slot
diff --git a/src/mame/drivers/tavernie.cpp b/src/mame/drivers/tavernie.cpp
index 47f4bb58f70..10a19636047 100644
--- a/src/mame/drivers/tavernie.cpp
+++ b/src/mame/drivers/tavernie.cpp
@@ -308,7 +308,7 @@ MACHINE_CONFIG_START(tavernie_state::cpu09)
WAVE(config, "wave", "cassette").add_route(ALL_OUTPUTS, "mono", 0.05);
/* Devices */
- MCFG_CASSETTE_ADD( "cassette" )
+ CASSETTE(config, m_cass);
pia6821_device &pia(PIA6821(config, "pia", 0));
pia.readpa_handler().set(FUNC(tavernie_state::pa_r));
diff --git a/src/mame/drivers/tec1.cpp b/src/mame/drivers/tec1.cpp
index 6ebe2b360ba..f968b701f20 100644
--- a/src/mame/drivers/tec1.cpp
+++ b/src/mame/drivers/tec1.cpp
@@ -435,11 +435,12 @@ MACHINE_CONFIG_START(tec1_state::tec1)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
MACHINE_CONFIG_END
-MACHINE_CONFIG_START(tec1_state::tecjmon)
+void tec1_state::tecjmon(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, XTAL(3'579'545) / 2)
- MCFG_DEVICE_PROGRAM_MAP(tecjmon_map)
- MCFG_DEVICE_IO_MAP(tecjmon_io)
+ Z80(config, m_maincpu, XTAL(3'579'545) / 2);
+ m_maincpu->set_addrmap(AS_PROGRAM, &tec1_state::tecjmon_map);
+ m_maincpu->set_addrmap(AS_IO, &tec1_state::tecjmon_io);
/* video hardware */
config.set_default_layout(layout_tec1);
@@ -450,8 +451,8 @@ MACHINE_CONFIG_START(tec1_state::tecjmon)
WAVE(config, "wave", "cassette").add_route(ALL_OUTPUTS, "mono", 0.05);
/* Devices */
- MCFG_CASSETTE_ADD( "cassette" )
-MACHINE_CONFIG_END
+ CASSETTE(config, m_cass);
+}
/***************************************************************************
diff --git a/src/mame/drivers/thomson.cpp b/src/mame/drivers/thomson.cpp
index 3ef9e4f2c03..5c5945f02dd 100644
--- a/src/mame/drivers/thomson.cpp
+++ b/src/mame/drivers/thomson.cpp
@@ -658,10 +658,10 @@ MACHINE_CONFIG_START(thomson_state::to7_base)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
/* cassette */
- MCFG_CASSETTE_ADD( "cassette" )
- MCFG_CASSETTE_FORMATS(to7_cassette_formats)
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED)
- MCFG_CASSETTE_INTERFACE("to_cass")
+ CASSETTE(config, m_cassette);
+ m_cassette->set_formats(to7_cassette_formats);
+ m_cassette->set_default_state(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED);
+ m_cassette->set_interface("to_cass");
/* floppy */
MCFG_DEVICE_ADD("mc6843", MC6843, 16_MHz_XTAL / 16 / 2)
@@ -945,14 +945,14 @@ MACHINE_CONFIG_START(thomson_state::to770)
/* internal ram */
m_ram->set_default_size("128K").set_extra_options("64K");
- MCFG_DEVICE_REMOVE("to7_cart_list")
+ config.device_remove("to7_cart_list");
MCFG_SOFTWARE_LIST_ADD("t770_cart_list","to770_cart")
MCFG_SOFTWARE_LIST_COMPATIBLE_ADD("to7_cart_list","to7_cart")
MACHINE_CONFIG_END
MACHINE_CONFIG_START(thomson_state::to770a)
to770(config);
- MCFG_DEVICE_REMOVE("t770_cart_list")
+ config.device_remove("t770_cart_list");
MCFG_SOFTWARE_LIST_ADD("t770a_cart_list","to770a_cart")
MACHINE_CONFIG_END
@@ -1124,9 +1124,8 @@ MACHINE_CONFIG_START(thomson_state::mo5)
MCFG_DEVICE_MODIFY( "maincpu" )
MCFG_DEVICE_PROGRAM_MAP ( mo5)
- MCFG_CASSETTE_MODIFY( "cassette" )
- MCFG_CASSETTE_FORMATS(mo5_cassette_formats)
- MCFG_CASSETTE_INTERFACE("mo_cass")
+ m_cassette->set_formats(mo5_cassette_formats);
+ m_cassette->set_interface("mo_cass");
subdevice<palette_device>("palette")->set_init(FUNC(thomson_state::mo5_palette));
@@ -1138,15 +1137,15 @@ MACHINE_CONFIG_START(thomson_state::mo5)
m_pia_sys->cb2_handler().set_nop();
m_pia_sys->irqb_handler().set("mainirq", FUNC(input_merger_device::in_w<1>)); // WARNING: differs from TO7 !
- MCFG_DEVICE_REMOVE("cartslot")
+ config.device_remove("cartslot");
MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "mo_cart")
MCFG_GENERIC_EXTENSIONS("m5,rom")
MCFG_GENERIC_LOAD(thomson_state, mo5_cartridge)
- MCFG_DEVICE_REMOVE("to7_cart_list")
- MCFG_DEVICE_REMOVE("to7_cass_list")
- MCFG_DEVICE_REMOVE("to_flop_list")
- MCFG_DEVICE_REMOVE("to7_qd_list")
+ config.device_remove("to7_cart_list");
+ config.device_remove("to7_cass_list");
+ config.device_remove("to_flop_list");
+ config.device_remove("to7_qd_list");
MCFG_SOFTWARE_LIST_ADD("mo5_cart_list","mo5_cart")
MCFG_SOFTWARE_LIST_ADD("mo5_cass_list","mo5_cass")
@@ -1722,8 +1721,8 @@ MACHINE_CONFIG_START(thomson_state::to8)
/* internal ram */
m_ram->set_default_size("512K").set_extra_options("256K");
- MCFG_DEVICE_REMOVE("to7_cass_list")
- MCFG_DEVICE_REMOVE("to7_qd_list")
+ config.device_remove("to7_cass_list");
+ config.device_remove("to7_qd_list");
MCFG_SOFTWARE_LIST_ADD("to8_cass_list", "to8_cass")
MCFG_SOFTWARE_LIST_ADD("to8_qd_list", "to8_qd")
@@ -1885,8 +1884,8 @@ MACHINE_CONFIG_START(thomson_state::to9p)
/* internal ram */
m_ram->set_default_size("512K");
- MCFG_DEVICE_REMOVE("to7_cass_list")
- MCFG_DEVICE_REMOVE("to7_qd_list")
+ config.device_remove("to7_cass_list");
+ config.device_remove("to7_qd_list");
MCFG_SOFTWARE_LIST_ADD("to8_cass_list", "to8_cass")
MCFG_SOFTWARE_LIST_ADD("to8_qd_list", "to8_qd")
@@ -2213,9 +2212,8 @@ MACHINE_CONFIG_START(thomson_state::mo6)
MCFG_DEVICE_MODIFY( "maincpu" )
MCFG_DEVICE_PROGRAM_MAP ( mo6)
- MCFG_CASSETTE_MODIFY( "cassette" )
- MCFG_CASSETTE_FORMATS(mo5_cassette_formats)
- MCFG_CASSETTE_INTERFACE("mo_cass")
+ m_cassette->set_formats(mo5_cassette_formats);
+ m_cassette->set_interface("mo_cass");
m_pia_sys->readpa_handler().set(FUNC(thomson_state::mo6_sys_porta_in));
m_pia_sys->readpb_handler().set(FUNC(thomson_state::mo6_sys_portb_in));
@@ -2233,7 +2231,7 @@ MACHINE_CONFIG_START(thomson_state::mo6)
MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", "centronics")
- MCFG_DEVICE_REMOVE("cartslot")
+ config.device_remove("cartslot");
MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "mo_cart")
MCFG_GENERIC_EXTENSIONS("m5,rom")
MCFG_GENERIC_LOAD(thomson_state, mo5_cartridge)
@@ -2241,10 +2239,10 @@ MACHINE_CONFIG_START(thomson_state::mo6)
/* internal ram */
m_ram->set_default_size("128K");
- MCFG_DEVICE_REMOVE("to7_cart_list")
- MCFG_DEVICE_REMOVE("to7_cass_list")
- MCFG_DEVICE_REMOVE("to_flop_list")
- MCFG_DEVICE_REMOVE("to7_qd_list")
+ config.device_remove("to7_cart_list");
+ config.device_remove("to7_cass_list");
+ config.device_remove("to_flop_list");
+ config.device_remove("to7_qd_list");
MCFG_SOFTWARE_LIST_ADD("mo6_cass_list","mo6_cass")
MCFG_SOFTWARE_LIST_ADD("mo6_flop_list","mo6_flop")
@@ -2257,13 +2255,13 @@ MACHINE_CONFIG_END
MACHINE_CONFIG_START(thomson_state::pro128)
mo6(config);
- MCFG_DEVICE_REMOVE("mo6_cass_list")
- MCFG_DEVICE_REMOVE("mo6_flop_list")
+ config.device_remove("mo6_cass_list");
+ config.device_remove("mo6_flop_list");
- MCFG_DEVICE_REMOVE("mo5_cart_list")
- MCFG_DEVICE_REMOVE("mo5_cass_list")
- MCFG_DEVICE_REMOVE("mo5_flop_list")
- MCFG_DEVICE_REMOVE("mo5_qd_list")
+ config.device_remove("mo5_cart_list");
+ config.device_remove("mo5_cass_list");
+ config.device_remove("mo5_flop_list");
+ config.device_remove("mo5_qd_list");
MCFG_SOFTWARE_LIST_ADD("p128_cart_list","pro128_cart")
MCFG_SOFTWARE_LIST_ADD("p128_cass_list","pro128_cass")
@@ -2478,9 +2476,8 @@ MACHINE_CONFIG_START(thomson_state::mo5nr)
MCFG_DEVICE_MODIFY( "maincpu" )
MCFG_DEVICE_PROGRAM_MAP ( mo5nr)
- MCFG_CASSETTE_MODIFY( "cassette" )
- MCFG_CASSETTE_FORMATS(mo5_cassette_formats)
- MCFG_CASSETTE_INTERFACE("mo_cass")
+ m_cassette->set_formats(mo5_cassette_formats);
+ m_cassette->set_interface("mo_cass");
m_pia_sys->readpa_handler().set(FUNC(thomson_state::mo6_sys_porta_in));
m_pia_sys->readpb_handler().set(FUNC(thomson_state::mo5nr_sys_portb_in));
@@ -2499,7 +2496,7 @@ MACHINE_CONFIG_START(thomson_state::mo5nr)
INPUT_BUFFER(config, "cent_data_in");
MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", "centronics")
- MCFG_DEVICE_REMOVE("cartslot")
+ config.device_remove("cartslot");
MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "mo_cart")
MCFG_GENERIC_EXTENSIONS("m5,rom")
MCFG_GENERIC_LOAD(thomson_state, mo5_cartridge)
@@ -2507,10 +2504,10 @@ MACHINE_CONFIG_START(thomson_state::mo5nr)
/* internal ram */
m_ram->set_default_size("128K");
- MCFG_DEVICE_REMOVE("to7_cart_list")
- MCFG_DEVICE_REMOVE("to7_cass_list")
- MCFG_DEVICE_REMOVE("to_flop_list")
- MCFG_DEVICE_REMOVE("to7_qd_list")
+ config.device_remove("to7_cart_list");
+ config.device_remove("to7_cass_list");
+ config.device_remove("to_flop_list");
+ config.device_remove("to7_qd_list");
MCFG_SOFTWARE_LIST_ADD("mo6_cass_list","mo6_cass")
MCFG_SOFTWARE_LIST_ADD("mo6_flop_list","mo6_flop")
diff --git a/src/mame/drivers/tiki100.cpp b/src/mame/drivers/tiki100.cpp
index 585a6c1c348..ecbbe29a71c 100644
--- a/src/mame/drivers/tiki100.cpp
+++ b/src/mame/drivers/tiki100.cpp
@@ -767,8 +767,8 @@ MACHINE_CONFIG_START(tiki100_state::tiki100)
INPUT_BUFFER(config, "cent_data_in");
MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", CENTRONICS_TAG)
- MCFG_CASSETTE_ADD(CASSETTE_TAG)
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_MUTED)
+ CASSETTE(config, m_cassette);
+ m_cassette->set_default_state(CASSETTE_STOPPED | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_MUTED);
TIMER(config, "tape").configure_periodic(FUNC(tiki100_state::tape_tick), attotime::from_hz(44100));
diff --git a/src/mame/drivers/tk2000.cpp b/src/mame/drivers/tk2000.cpp
index e254f09a54d..728512b869b 100644
--- a/src/mame/drivers/tk2000.cpp
+++ b/src/mame/drivers/tk2000.cpp
@@ -593,8 +593,8 @@ MACHINE_CONFIG_START(tk2000_state::tk2000)
RAM(config, RAM_TAG).set_default_size("64K");
- MCFG_CASSETTE_ADD(A2_CASSETTE_TAG)
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED)
+ CASSETTE(config, m_cassette);
+ m_cassette->set_default_state(CASSETTE_STOPPED);
MACHINE_CONFIG_END
/***************************************************************************
diff --git a/src/mame/drivers/tmc1800.cpp b/src/mame/drivers/tmc1800.cpp
index 1aec81698a0..b19c7173a11 100644
--- a/src/mame/drivers/tmc1800.cpp
+++ b/src/mame/drivers/tmc1800.cpp
@@ -736,8 +736,8 @@ MACHINE_CONFIG_START(tmc1800_state::tmc1800)
// devices
MCFG_QUICKLOAD_ADD("quickload", tmc1800_base_state, tmc1800, "bin", 0)
- MCFG_CASSETTE_ADD( "cassette" )
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_MUTED)
+ CASSETTE(config, m_cassette);
+ m_cassette->set_default_state(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_MUTED);
// internal ram
RAM(config, RAM_TAG).set_default_size("2K").set_extra_options("4K");
@@ -764,8 +764,8 @@ MACHINE_CONFIG_START(osc1000b_state::osc1000b)
// devices
MCFG_QUICKLOAD_ADD("quickload", tmc1800_base_state, tmc1800, "bin", 0)
- MCFG_CASSETTE_ADD( "cassette" )
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_MUTED)
+ CASSETTE(config, m_cassette);
+ m_cassette->set_default_state(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_MUTED);
// internal ram
RAM(config, RAM_TAG).set_default_size("2K").set_extra_options("4K");
@@ -788,8 +788,8 @@ MACHINE_CONFIG_START(tmc2000_state::tmc2000)
// devices
MCFG_QUICKLOAD_ADD("quickload", tmc1800_base_state, tmc1800, "bin", 0)
- MCFG_CASSETTE_ADD( "cassette" )
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_MUTED)
+ CASSETTE(config, m_cassette);
+ m_cassette->set_default_state(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_MUTED);
// internal ram
RAM(config, RAM_TAG).set_default_size("4K").set_extra_options("16K,32K");
@@ -812,8 +812,8 @@ MACHINE_CONFIG_START(nano_state::nano)
// devices
MCFG_QUICKLOAD_ADD("quickload", tmc1800_base_state, tmc1800, "bin", 0)
- MCFG_CASSETTE_ADD( "cassette" )
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_MUTED)
+ CASSETTE(config, m_cassette);
+ m_cassette->set_default_state(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_MUTED);
// internal ram
RAM(config, RAM_TAG).set_default_size("4K");
diff --git a/src/mame/drivers/tmc600.cpp b/src/mame/drivers/tmc600.cpp
index 3ee26702f24..60c88428387 100644
--- a/src/mame/drivers/tmc600.cpp
+++ b/src/mame/drivers/tmc600.cpp
@@ -289,8 +289,8 @@ MACHINE_CONFIG_START(tmc600_state::tmc600)
m_centronics->busy_handler().set(CDP1802_TAG, FUNC(cosmac_device::ef4_w)).exor(1);
// cassette
- MCFG_CASSETTE_ADD("cassette")
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_MUTED)
+ CASSETTE(config, m_cassette);
+ m_cassette->set_default_state(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_MUTED);
// expansion bus connector
MCFG_TMC600_EURO_BUS_SLOT_ADD(TMC600_EURO_BUS_TAG, tmc600_euro_bus_cards, nullptr)
diff --git a/src/mame/drivers/trs80.cpp b/src/mame/drivers/trs80.cpp
index 7c58811e433..39908a3c2de 100644
--- a/src/mame/drivers/trs80.cpp
+++ b/src/mame/drivers/trs80.cpp
@@ -516,10 +516,10 @@ MACHINE_CONFIG_START(trs80_state::trs80) // the original model I, level I,
/* sound hardware */
SPEAKER(config, "mono").front_center();
SPEAKER_SOUND(config, "speaker").add_route(ALL_OUTPUTS, "mono", 0.50);
- WAVE(config, "wave", "cassette").add_route(ALL_OUTPUTS, "mono", 0.05);
+ WAVE(config, "wave", m_cassette).add_route(ALL_OUTPUTS, "mono", 0.05);
/* devices */
- MCFG_CASSETTE_ADD("cassette")
+ CASSETTE(config, m_cassette);
MACHINE_CONFIG_END
MACHINE_CONFIG_START(trs80_state::model1) // model I, level II
@@ -531,9 +531,8 @@ MACHINE_CONFIG_START(trs80_state::model1) // model I, level II
MCFG_DEVICE_PERIODIC_INT_DRIVER(trs80_state, rtc_interrupt, 40)
/* devices */
- MCFG_CASSETTE_MODIFY("cassette")
- MCFG_CASSETTE_FORMATS(trs80l2_cassette_formats)
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY)
+ m_cassette->set_formats(trs80l2_cassette_formats);
+ m_cassette->set_default_state(CASSETTE_PLAY);
MCFG_QUICKLOAD_ADD("quickload", trs80_state, trs80_cmd, "cmd", 1.0)
diff --git a/src/mame/drivers/trs80m3.cpp b/src/mame/drivers/trs80m3.cpp
index b5140197b72..e9d7ef5db30 100644
--- a/src/mame/drivers/trs80m3.cpp
+++ b/src/mame/drivers/trs80m3.cpp
@@ -352,12 +352,12 @@ MACHINE_CONFIG_START(trs80m3_state::model3)
/* sound hardware */
SPEAKER(config, "mono").front_center();
SPEAKER_SOUND(config, "speaker").add_route(ALL_OUTPUTS, "mono", 0.50);
- WAVE(config, "wave", "cassette").add_route(ALL_OUTPUTS, "mono", 0.05);
+ WAVE(config, "wave", m_cassette).add_route(ALL_OUTPUTS, "mono", 0.05);
/* devices */
- MCFG_CASSETTE_ADD("cassette")
- MCFG_CASSETTE_FORMATS(trs80l2_cassette_formats)
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY)
+ CASSETTE(config, m_cassette);
+ m_cassette->set_formats(trs80l2_cassette_formats);
+ m_cassette->set_default_state(CASSETTE_PLAY);
MCFG_QUICKLOAD_ADD("quickload", trs80m3_state, trs80_cmd, "cmd", 1.0)
diff --git a/src/mame/drivers/tvc.cpp b/src/mame/drivers/tvc.cpp
index d089d76a57d..7bfb9bf8a0e 100644
--- a/src/mame/drivers/tvc.cpp
+++ b/src/mame/drivers/tvc.cpp
@@ -826,10 +826,10 @@ MACHINE_CONFIG_START(tvc_state::tvc)
MCFG_TVCEXP_SLOT_OUT_NMI_CB(INPUTLINE("maincpu", INPUT_LINE_NMI))
/* cassette */
- MCFG_CASSETTE_ADD( "cassette" )
- MCFG_CASSETTE_FORMATS(tvc64_cassette_formats)
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED)
- MCFG_CASSETTE_INTERFACE("tvc_cass")
+ CASSETTE(config, m_cassette);
+ m_cassette->set_formats(tvc64_cassette_formats);
+ m_cassette->set_default_state(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED);
+ m_cassette->set_interface("tvc_cass");
/* quickload */
MCFG_QUICKLOAD_ADD("quickload", tvc_state, tvc64, "cas", 6)
diff --git a/src/mame/drivers/ut88.cpp b/src/mame/drivers/ut88.cpp
index 3e03cdf4a33..76f06a4e70d 100644
--- a/src/mame/drivers/ut88.cpp
+++ b/src/mame/drivers/ut88.cpp
@@ -213,7 +213,7 @@ MACHINE_CONFIG_START(ut88_state::ut88)
MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
MCFG_SOUND_ROUTE(0, "dac", 1.0, DAC_VREF_POS_INPUT)
- WAVE(config, "wave", "cassette").add_route(ALL_OUTPUTS, "speaker", 0.25);
+ WAVE(config, "wave", m_cassette).add_route(ALL_OUTPUTS, "speaker", 0.25);
/* Devices */
I8255A(config, m_ppi);
@@ -221,10 +221,10 @@ MACHINE_CONFIG_START(ut88_state::ut88)
m_ppi->in_pb_callback().set(FUNC(ut88_state::ut88_8255_portb_r));
m_ppi->in_pc_callback().set(FUNC(ut88_state::ut88_8255_portc_r));
- MCFG_CASSETTE_ADD( "cassette" )
- MCFG_CASSETTE_FORMATS(rku_cassette_formats)
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED)
- MCFG_CASSETTE_INTERFACE("ut88_cass")
+ CASSETTE(config, m_cassette);
+ m_cassette->set_formats(rku_cassette_formats);
+ m_cassette->set_default_state(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED);
+ m_cassette->set_interface("ut88_cass");
MCFG_SOFTWARE_LIST_ADD("cass_list","ut88")
MACHINE_CONFIG_END
@@ -242,12 +242,12 @@ MACHINE_CONFIG_START(ut88_state::ut88mini)
/* Cassette */
SPEAKER(config, "speaker").front_center();
- WAVE(config, "wave", "cassette").add_route(ALL_OUTPUTS, "speaker", 0.25);
+ WAVE(config, "wave", m_cassette).add_route(ALL_OUTPUTS, "speaker", 0.25);
- MCFG_CASSETTE_ADD( "cassette" )
- MCFG_CASSETTE_FORMATS(rku_cassette_formats)
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED)
- MCFG_CASSETTE_INTERFACE("ut88_cass")
+ CASSETTE(config, m_cassette);
+ m_cassette->set_formats(rku_cassette_formats);
+ m_cassette->set_default_state(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED);
+ m_cassette->set_interface("ut88_cass");
MCFG_SOFTWARE_LIST_ADD("cass_list","ut88")
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/vg5k.cpp b/src/mame/drivers/vg5k.cpp
index 69d02ca6ff7..b53a0422839 100644
--- a/src/mame/drivers/vg5k.cpp
+++ b/src/mame/drivers/vg5k.cpp
@@ -398,12 +398,12 @@ MACHINE_CONFIG_START(vg5k_state::vg5k)
MCFG_SOUND_ROUTE(0, "dac", 1.0, DAC_VREF_POS_INPUT)
/* cassette */
- WAVE(config, "wave", "cassette").add_route(0, "speaker", 0.25);
+ WAVE(config, "wave", m_cassette).add_route(0, "speaker", 0.25);
- MCFG_CASSETTE_ADD( "cassette" )
- MCFG_CASSETTE_FORMATS(vg5k_cassette_formats)
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MASK_SPEAKER)
- MCFG_CASSETTE_INTERFACE("vg5k_cass")
+ CASSETTE(config, m_cassette);
+ m_cassette->set_formats(vg5k_cassette_formats);
+ m_cassette->set_default_state(CASSETTE_STOPPED | CASSETTE_MASK_SPEAKER);
+ m_cassette->set_interface("vg5k_cass");
/* printer */
PRINTER(config, m_printer, 0);
diff --git a/src/mame/drivers/vip.cpp b/src/mame/drivers/vip.cpp
index 909c6b0cdee..83c3d77de0a 100644
--- a/src/mame/drivers/vip.cpp
+++ b/src/mame/drivers/vip.cpp
@@ -739,9 +739,9 @@ MACHINE_CONFIG_START(vip_state::vip)
// devices
MCFG_QUICKLOAD_ADD("quickload", vip_state, vip, "bin,c8,c8x", 0)
- MCFG_CASSETTE_ADD("cassette")
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_MUTED)
- MCFG_CASSETTE_INTERFACE("vip_cass")
+ CASSETTE(config, m_cassette);
+ m_cassette->set_default_state(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_MUTED);
+ m_cassette->set_interface("vip_cass");
// software lists
MCFG_SOFTWARE_LIST_ADD("cass_list", "vip")
diff --git a/src/mame/drivers/vtech2.cpp b/src/mame/drivers/vtech2.cpp
index 4c27fdaa769..c1b6f11f308 100644
--- a/src/mame/drivers/vtech2.cpp
+++ b/src/mame/drivers/vtech2.cpp
@@ -511,12 +511,12 @@ MACHINE_CONFIG_START(vtech2_state::laser350)
/* sound hardware */
SPEAKER(config, "mono").front_center();
- WAVE(config, "wave", "cassette").add_route(ALL_OUTPUTS, "mono", 0.25);
+ WAVE(config, "wave", m_cassette).add_route(ALL_OUTPUTS, "mono", 0.25);
SPEAKER_SOUND(config, "speaker").add_route(ALL_OUTPUTS, "mono", 0.75);
- MCFG_CASSETTE_ADD( "cassette" )
- MCFG_CASSETTE_FORMATS(vtech2_cassette_formats)
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY)
+ CASSETTE(config, m_cassette);
+ m_cassette->set_formats(vtech2_cassette_formats);
+ m_cassette->set_default_state(CASSETTE_PLAY);
VTECH_IOEXP_SLOT(config, "io");
diff --git a/src/mame/drivers/x07.cpp b/src/mame/drivers/x07.cpp
index 65034b74d1b..2d8b0b01e80 100644
--- a/src/mame/drivers/x07.cpp
+++ b/src/mame/drivers/x07.cpp
@@ -1501,7 +1501,7 @@ MACHINE_CONFIG_START(x07_state::x07)
/* sound hardware */
SPEAKER(config, "mono").front_center();
BEEP(config, "beeper", 0).add_route(ALL_OUTPUTS, "mono", 0.50);
- WAVE(config, "wave", "cassette").add_route(ALL_OUTPUTS, "mono", 0.25);
+ WAVE(config, "wave", m_cassette).add_route(ALL_OUTPUTS, "mono", 0.25);
/* printer */
PRINTER(config, m_printer, 0);
@@ -1525,10 +1525,10 @@ MACHINE_CONFIG_START(x07_state::x07)
MCFG_GENERIC_LOAD(x07_state, x07_card)
/* cassette */
- MCFG_CASSETTE_ADD("cassette")
- MCFG_CASSETTE_FORMATS(x07_cassette_formats)
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED)
- MCFG_CASSETTE_INTERFACE("x07_cass")
+ CASSETTE(config, m_cassette);
+ m_cassette->set_formats(x07_cassette_formats);
+ m_cassette->set_default_state(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED);
+ m_cassette->set_interface("x07_cass");
/* Software lists */
MCFG_SOFTWARE_LIST_ADD("card_list", "x07_card")
diff --git a/src/mame/drivers/x1.cpp b/src/mame/drivers/x1.cpp
index 1eeffd20ee6..8bacb4d3c93 100644
--- a/src/mame/drivers/x1.cpp
+++ b/src/mame/drivers/x1.cpp
@@ -2263,12 +2263,12 @@ MACHINE_CONFIG_START(x1_state::x1)
ay.add_route(0, "rspeaker", 0.25);
ay.add_route(1, "lspeaker", 0.5);
ay.add_route(2, "rspeaker", 0.5);
- WAVE(config, "wave", "cassette").add_route(ALL_OUTPUTS, "lspeaker", 0.25).add_route(ALL_OUTPUTS, "rspeaker", 0.10);
+ WAVE(config, "wave", m_cassette).add_route(ALL_OUTPUTS, "lspeaker", 0.25).add_route(ALL_OUTPUTS, "rspeaker", 0.10);
- MCFG_CASSETTE_ADD("cassette")
- MCFG_CASSETTE_FORMATS(x1_cassette_formats)
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED)
- MCFG_CASSETTE_INTERFACE("x1_cass")
+ CASSETTE(config, m_cassette);
+ m_cassette->set_formats(x1_cassette_formats);
+ m_cassette->set_default_state(CASSETTE_STOPPED | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED);
+ m_cassette->set_interface("x1_cass");
MCFG_SOFTWARE_LIST_ADD("cass_list","x1_cass")
diff --git a/src/mame/drivers/x1twin.cpp b/src/mame/drivers/x1twin.cpp
index 3676fd09c8e..28c6d4638d5 100644
--- a/src/mame/drivers/x1twin.cpp
+++ b/src/mame/drivers/x1twin.cpp
@@ -506,12 +506,12 @@ MACHINE_CONFIG_START(x1twin_state::x1twin)
ay.add_route(0, "x1_r", 0.25);
ay.add_route(1, "x1_l", 0.5);
ay.add_route(2, "x1_r", 0.5);
- WAVE(config, "wave", "cassette").add_route(ALL_OUTPUTS, "x1_l", 0.25).add_route(ALL_OUTPUTS, "x1_r", 0.10);
+ WAVE(config, "wave", m_cassette).add_route(ALL_OUTPUTS, "x1_l", 0.25).add_route(ALL_OUTPUTS, "x1_r", 0.10);
- MCFG_CASSETTE_ADD("cassette")
- MCFG_CASSETTE_FORMATS(x1_cassette_formats)
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED)
- MCFG_CASSETTE_INTERFACE("x1_cass")
+ CASSETTE(config, m_cassette);
+ m_cassette->set_formats(x1_cassette_formats);
+ m_cassette->set_default_state(CASSETTE_STOPPED | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED);
+ m_cassette->set_interface("x1_cass");
MCFG_SOFTWARE_LIST_ADD("cass_list","x1_cass")
diff --git a/src/mame/drivers/z1013.cpp b/src/mame/drivers/z1013.cpp
index 919497e9f72..0932272cefc 100644
--- a/src/mame/drivers/z1013.cpp
+++ b/src/mame/drivers/z1013.cpp
@@ -398,8 +398,8 @@ MACHINE_CONFIG_START(z1013_state::z1013)
pio.in_pb_callback().set(FUNC(z1013_state::port_b_r));
pio.out_pb_callback().set(FUNC(z1013_state::port_b_w));
- MCFG_CASSETTE_ADD( "cassette" )
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED)
+ CASSETTE(config, m_cass);
+ m_cass->set_default_state(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED);
MCFG_SNAPSHOT_ADD("snapshot", z1013_state, z1013, "z80", 0)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/z80ne.cpp b/src/mame/drivers/z80ne.cpp
index 9cdcfbe6f04..92694a38e93 100644
--- a/src/mame/drivers/z80ne.cpp
+++ b/src/mame/drivers/z80ne.cpp
@@ -427,13 +427,13 @@ MACHINE_CONFIG_START(z80ne_state::z80ne)
m_uart->set_tx_clock(4800.0);
m_uart->set_rx_clock(4800.0);
- MCFG_CASSETTE_ADD( "cassette" )
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED)
- MCFG_CASSETTE_INTERFACE("z80ne_cass")
+ CASSETTE(config, m_cassette1);
+ m_cassette1->set_default_state(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED);
+ m_cassette1->set_interface("z80ne_cass");
- MCFG_CASSETTE_ADD( "cassette2" )
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED)
- MCFG_CASSETTE_INTERFACE("z80ne_cass")
+ CASSETTE(config, m_cassette2);
+ m_cassette2->set_default_state(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED);
+ m_cassette2->set_interface("z80ne_cass");
config.set_default_layout(layout_z80ne);
@@ -496,13 +496,13 @@ MACHINE_CONFIG_START(z80ne_state::z80netb)
m_uart->set_tx_clock(4800.0);
m_uart->set_rx_clock(4800.0);
- MCFG_CASSETTE_ADD( "cassette" )
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED)
- MCFG_CASSETTE_INTERFACE("z80ne_cass")
+ CASSETTE(config, m_cassette1);
+ m_cassette1->set_default_state(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED);
+ m_cassette1->set_interface("z80ne_cass");
- MCFG_CASSETTE_ADD( "cassette2" )
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED)
- MCFG_CASSETTE_INTERFACE("z80ne_cass")
+ CASSETTE(config, m_cassette2);
+ m_cassette2->set_default_state(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED);
+ m_cassette2->set_interface("z80ne_cass");
KR2376_ST(config, m_lx387_kr2376, 50000);
m_lx387_kr2376->x<0>().set_ioport("X0");
@@ -546,13 +546,13 @@ MACHINE_CONFIG_START(z80netf_state::z80netf)
m_uart->set_tx_clock(4800.0);
m_uart->set_rx_clock(4800.0);
- MCFG_CASSETTE_ADD( "cassette" )
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED)
- MCFG_CASSETTE_INTERFACE("z80ne_cass")
+ CASSETTE(config, m_cassette1);
+ m_cassette1->set_default_state(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED);
+ m_cassette1->set_interface("z80ne_cass");
- MCFG_CASSETTE_ADD( "cassette2" )
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED)
- MCFG_CASSETTE_INTERFACE("z80ne_cass")
+ CASSETTE(config, m_cassette2);
+ m_cassette2->set_default_state(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED);
+ m_cassette2->set_interface("z80ne_cass");
KR2376_ST(config, m_lx387_kr2376, 50000);
diff --git a/src/mame/drivers/z9001.cpp b/src/mame/drivers/z9001.cpp
index 7b4002efff6..e533cf0372d 100644
--- a/src/mame/drivers/z9001.cpp
+++ b/src/mame/drivers/z9001.cpp
@@ -247,7 +247,7 @@ MACHINE_CONFIG_START(z9001_state::z9001)
ctc.zc_callback<0>().set(FUNC(z9001_state::cass_w));
ctc.zc_callback<2>().set("z80ctc", FUNC(z80ctc_device::trg3));
- MCFG_CASSETTE_ADD( "cassette" )
+ CASSETTE(config, m_cass);
MACHINE_CONFIG_END
/* ROM definition */
diff --git a/src/mame/includes/hec2hrp.h b/src/mame/includes/hec2hrp.h
index ed1611f1d34..ebf29c00ac5 100644
--- a/src/mame/includes/hec2hrp.h
+++ b/src/mame/includes/hec2hrp.h
@@ -83,10 +83,10 @@ class hec2hrp_state : public driver_device
public:
hec2hrp_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag),
+ m_cassette(*this, "cassette"),
m_printer(*this, "printer"),
m_maincpu(*this, "maincpu"),
m_disc2cpu(*this, "disc2cpu"),
- m_cassette(*this, "cassette"),
m_discrete(*this, "discrete"),
m_sn(*this, "sn76477"),
m_palette(*this, "palette"),
@@ -123,6 +123,7 @@ protected:
DECLARE_WRITE8_MEMBER(color_a_w);
DECLARE_WRITE8_MEMBER(color_b_w);
+ required_device<cassette_image_device> m_cassette;
optional_device<printer_image_device> m_printer;
private:
@@ -150,7 +151,6 @@ private:
required_device<cpu_device> m_maincpu;
optional_device<cpu_device> m_disc2cpu;
- required_device<cassette_image_device> m_cassette;
required_device<discrete_device> m_discrete;
required_device<sn76477_device> m_sn;
required_device<palette_device> m_palette;
diff --git a/src/mame/machine/coco_vhd.cpp b/src/mame/machine/coco_vhd.cpp
index c75e278caee..407d8b506d5 100644
--- a/src/mame/machine/coco_vhd.cpp
+++ b/src/mame/machine/coco_vhd.cpp
@@ -74,6 +74,7 @@ DEFINE_DEVICE_TYPE(COCO_VHD, coco_vhd_image_device, "coco_vhd_image", "CoCo Virt
coco_vhd_image_device::coco_vhd_image_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, COCO_VHD, tag, owner, clock)
, device_image_interface(mconfig, *this)
+ , m_cpu(*this, finder_base::DUMMY_TAG)
{
}
@@ -94,7 +95,6 @@ coco_vhd_image_device::~coco_vhd_image_device()
void coco_vhd_image_device::device_start()
{
m_status = VHDSTATUS_NO_VHD_ATTACHED;
- m_cpu = machine().device<cpu_device>(MAINCPU_TAG);
m_cpu_space = &m_cpu->space(AS_PROGRAM);
}
diff --git a/src/mame/machine/coco_vhd.h b/src/mame/machine/coco_vhd.h
index a484584c9f6..dc436466bf7 100644
--- a/src/mame/machine/coco_vhd.h
+++ b/src/mame/machine/coco_vhd.h
@@ -24,6 +24,12 @@ class coco_vhd_image_device : public device_t,
{
public:
// construction/destruction
+ template <typename T>
+ coco_vhd_image_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&cpu_tag)
+ : coco_vhd_image_device(mconfig, tag, owner, clock)
+ {
+ m_cpu.set_tag(std::forward<T>(cpu_tag));
+ }
coco_vhd_image_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
virtual ~coco_vhd_image_device();
@@ -52,11 +58,11 @@ protected:
void coco_vhd_readwrite(uint8_t data);
private:
- cpu_device * m_cpu;
- address_space * m_cpu_space;
- uint32_t m_logical_record_number;
- uint32_t m_buffer_address;
- uint8_t m_status;
+ required_device<cpu_device> m_cpu;
+ address_space * m_cpu_space;
+ uint32_t m_logical_record_number;
+ uint32_t m_buffer_address;
+ uint8_t m_status;
};
// device type definition