summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--src/mame/drivers/mikromik.cpp4
-rw-r--r--src/mame/includes/thomson.h24
-rw-r--r--src/mame/includes/xbox_pci.h4
-rw-r--r--src/mame/machine/abc1600mac.cpp7
-rw-r--r--src/mame/machine/abc1600mac.h8
-rw-r--r--src/mame/machine/abc80kb.cpp15
-rw-r--r--src/mame/machine/abc80kb.h10
-rw-r--r--src/mame/machine/alpha8201.cpp13
-rw-r--r--src/mame/machine/alpha8201.h11
-rw-r--r--src/mame/machine/apricotkb.cpp15
-rw-r--r--src/mame/machine/apricotkb.h10
-rw-r--r--src/mame/machine/asic65.cpp21
-rw-r--r--src/mame/machine/asic65.h5
-rw-r--r--src/mame/machine/at.cpp6
-rw-r--r--src/mame/machine/at.h68
-rw-r--r--src/mame/machine/atarifdc.cpp14
-rw-r--r--src/mame/machine/atarifdc.h2
-rw-r--r--src/mame/machine/atarigen.cpp21
-rw-r--r--src/mame/machine/atarigen.h4
-rw-r--r--src/mame/machine/beta.cpp29
-rw-r--r--src/mame/machine/beta.h5
-rw-r--r--src/mame/machine/c117.cpp15
-rw-r--r--src/mame/machine/c117.h2
-rw-r--r--src/mame/machine/cedar_magnet_flop.cpp6
-rw-r--r--src/mame/machine/cedar_magnet_flop.h2
-rw-r--r--src/mame/machine/cedar_magnet_plane.cpp7
-rw-r--r--src/mame/machine/cedar_magnet_plane.h22
-rw-r--r--src/mame/machine/cedar_magnet_sprite.cpp8
-rw-r--r--src/mame/machine/cedar_magnet_sprite.h32
-rw-r--r--src/mame/machine/compiskb.cpp15
-rw-r--r--src/mame/machine/compiskb.h20
-rw-r--r--src/mame/machine/cuda.cpp16
-rw-r--r--src/mame/machine/cuda.h2
-rw-r--r--src/mame/machine/dec_lk201.cpp16
-rw-r--r--src/mame/machine/dec_lk201.h2
-rw-r--r--src/mame/machine/decopincpu.cpp26
-rw-r--r--src/mame/machine/decopincpu.h37
-rw-r--r--src/mame/machine/dmv_keyb.cpp21
-rw-r--r--src/mame/machine/dmv_keyb.h18
-rw-r--r--src/mame/machine/egret.cpp16
-rw-r--r--src/mame/machine/egret.h2
-rw-r--r--src/mame/machine/esqlcd.cpp12
-rw-r--r--src/mame/machine/esqlcd.h2
-rw-r--r--src/mame/machine/esqpanel.cpp20
-rw-r--r--src/mame/machine/esqpanel.h8
-rw-r--r--src/mame/machine/esqvfd.cpp20
-rw-r--r--src/mame/machine/esqvfd.h6
-rw-r--r--src/mame/machine/ibm6580_fdc.cpp6
-rw-r--r--src/mame/machine/ibm6580_fdc.h24
-rw-r--r--src/mame/machine/ibm6580_kbd.cpp6
-rw-r--r--src/mame/machine/ibm6580_kbd.h24
-rw-r--r--src/mame/machine/inder_sb.cpp7
-rw-r--r--src/mame/machine/inder_sb.h14
-rw-r--r--src/mame/machine/inder_vid.cpp7
-rw-r--r--src/mame/machine/inder_vid.h14
-rw-r--r--src/mame/machine/isbc_208.cpp6
-rw-r--r--src/mame/machine/isbc_208.h15
-rw-r--r--src/mame/machine/isbc_215g.cpp6
-rw-r--r--src/mame/machine/isbc_215g.h15
-rw-r--r--src/mame/machine/iteagle_fpga.cpp59
-rw-r--r--src/mame/machine/iteagle_fpga.h14
-rw-r--r--src/mame/machine/jvs13551.cpp11
-rw-r--r--src/mame/machine/jvs13551.h2
-rw-r--r--src/mame/machine/k573cass.cpp35
-rw-r--r--src/mame/machine/k573cass.h10
-rw-r--r--src/mame/machine/k573dio.cpp13
-rw-r--r--src/mame/machine/k573dio.h2
-rw-r--r--src/mame/machine/k7659kb.cpp16
-rw-r--r--src/mame/machine/k7659kb.h11
-rw-r--r--src/mame/machine/km035.cpp16
-rw-r--r--src/mame/machine/km035.h18
-rw-r--r--src/mame/machine/m1comm.cpp17
-rw-r--r--src/mame/machine/m1comm.h9
-rw-r--r--src/mame/machine/m20_8086.cpp7
-rw-r--r--src/mame/machine/m20_8086.h8
-rw-r--r--src/mame/machine/m24_kbd.cpp7
-rw-r--r--src/mame/machine/m24_kbd.h20
-rw-r--r--src/mame/machine/m24_z8000.cpp7
-rw-r--r--src/mame/machine/m24_z8000.h11
-rw-r--r--src/mame/machine/m2comm.cpp11
-rw-r--r--src/mame/machine/m2comm.h4
-rw-r--r--src/mame/machine/m3comm.cpp26
-rw-r--r--src/mame/machine/m3comm.h14
-rw-r--r--src/mame/machine/mackbd.cpp33
-rw-r--r--src/mame/machine/mackbd.h13
-rw-r--r--src/mame/machine/mega32x.cpp16
-rw-r--r--src/mame/machine/mega32x.h9
-rw-r--r--src/mame/machine/megacd.cpp11
-rw-r--r--src/mame/machine/megacd.h17
-rw-r--r--src/mame/machine/megacdcd.cpp17
-rw-r--r--src/mame/machine/megacdcd.h7
-rw-r--r--src/mame/machine/midwayic.cpp7
-rw-r--r--src/mame/machine/midwayic.h15
-rw-r--r--src/mame/machine/mie.cpp17
-rw-r--r--src/mame/machine/mie.h11
-rw-r--r--src/mame/machine/mm1kb.cpp35
-rw-r--r--src/mame/machine/mm1kb.h22
-rw-r--r--src/mame/machine/ms7004.cpp16
-rw-r--r--src/mame/machine/ms7004.h12
-rw-r--r--src/mame/machine/namco50.cpp17
-rw-r--r--src/mame/machine/namco50.h2
-rw-r--r--src/mame/machine/namco51.cpp19
-rw-r--r--src/mame/machine/namco51.h3
-rw-r--r--src/mame/machine/namco53.cpp17
-rw-r--r--src/mame/machine/namco53.h2
-rw-r--r--src/mame/machine/namco62.cpp18
-rw-r--r--src/mame/machine/namco62.h3
-rw-r--r--src/mame/machine/naomim2.cpp7
-rw-r--r--src/mame/machine/naomim2.h6
-rw-r--r--src/mame/machine/nmk004.cpp19
-rw-r--r--src/mame/machine/nmk004.h2
-rw-r--r--src/mame/machine/pc1512kb.cpp15
-rw-r--r--src/mame/machine/pc1512kb.h24
-rw-r--r--src/mame/machine/pc9801_118.cpp16
-rw-r--r--src/mame/machine/pc9801_118.h17
-rw-r--r--src/mame/machine/pc9801_26.cpp17
-rw-r--r--src/mame/machine/pc9801_26.h14
-rw-r--r--src/mame/machine/pc9801_86.cpp17
-rw-r--r--src/mame/machine/pc9801_86.h17
-rw-r--r--src/mame/machine/pcd_kbd.cpp6
-rw-r--r--src/mame/machine/pcd_kbd.h16
-rw-r--r--src/mame/machine/pce_cd.cpp8
-rw-r--r--src/mame/machine/pce_cd.h15
-rw-r--r--src/mame/machine/rx01.cpp14
-rw-r--r--src/mame/machine/rx01.h5
-rw-r--r--src/mame/machine/s32comm.cpp11
-rw-r--r--src/mame/machine/s32comm.h5
-rw-r--r--src/mame/machine/st0016.cpp13
-rw-r--r--src/mame/machine/st0016.h5
-rw-r--r--src/mame/machine/taitoio.cpp35
-rw-r--r--src/mame/machine/taitoio.h6
-rw-r--r--src/mame/machine/tandy2kb.cpp15
-rw-r--r--src/mame/machine/tandy2kb.h18
-rw-r--r--src/mame/machine/teleprinter.cpp6
-rw-r--r--src/mame/machine/teleprinter.h9
-rw-r--r--src/mame/machine/thomson.cpp6
-rw-r--r--src/mame/machine/trs80m2kb.cpp15
-rw-r--r--src/mame/machine/trs80m2kb.h20
-rw-r--r--src/mame/machine/v1050kb.cpp15
-rw-r--r--src/mame/machine/v1050kb.h18
-rw-r--r--src/mame/machine/victor9k_fdc.cpp16
-rw-r--r--src/mame/machine/victor9k_fdc.h60
-rw-r--r--src/mame/machine/victor9k_kb.cpp15
-rw-r--r--src/mame/machine/victor9k_kb.h20
-rw-r--r--src/mame/machine/wangpckb.cpp15
-rw-r--r--src/mame/machine/wangpckb.h16
-rw-r--r--src/mame/machine/x820kb.cpp15
-rw-r--r--src/mame/machine/x820kb.h24
-rw-r--r--src/mame/machine/xbox_pci.cpp15
149 files changed, 769 insertions, 1339 deletions
diff --git a/src/mame/drivers/mikromik.cpp b/src/mame/drivers/mikromik.cpp
index 3e54905b2a9..0a6fd4e16cd 100644
--- a/src/mame/drivers/mikromik.cpp
+++ b/src/mame/drivers/mikromik.cpp
@@ -460,13 +460,13 @@ static MACHINE_CONFIG_START( mm1 )
MCFG_CPU_ADD(I8085A_TAG, I8085A, XTAL_6_144MHz)
MCFG_CPU_PROGRAM_MAP(mm1_map)
MCFG_I8085A_SID(READLINE(mm1_state, dsra_r))
- MCFG_I8085A_SOD(DEVWRITELINE(KB_TAG, mm1_keyoard_device, bell_w))
+ MCFG_I8085A_SOD(DEVWRITELINE(KB_TAG, mm1_keyboard_device, bell_w))
MCFG_QUANTUM_PERFECT_CPU(I8085A_TAG)
// peripheral hardware
MCFG_DEVICE_ADD(I8212_TAG, I8212, 0)
MCFG_I8212_IRQ_CALLBACK(INPUTLINE(I8085A_TAG, I8085_RST65_LINE))
- MCFG_I8212_DI_CALLBACK(DEVREAD8(KB_TAG, mm1_keyoard_device, read))
+ MCFG_I8212_DI_CALLBACK(DEVREAD8(KB_TAG, mm1_keyboard_device, read))
MCFG_DEVICE_ADD(I8237_TAG, AM9517A, XTAL_6_144MHz/2)
MCFG_I8237_OUT_HREQ_CB(WRITELINE(mm1_state, dma_hrq_w))
diff --git a/src/mame/includes/thomson.h b/src/mame/includes/thomson.h
index b8e0b4d1bfa..58223220730 100644
--- a/src/mame/includes/thomson.h
+++ b/src/mame/includes/thomson.h
@@ -673,21 +673,10 @@ public:
// construction/destruction
to7_io_line_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- /* read data register */
- DECLARE_READ8_MEMBER(porta_in);
-
- /* write data register */
- DECLARE_WRITE8_MEMBER(porta_out);
-
- DECLARE_WRITE_LINE_MEMBER(write_rxd);
- DECLARE_WRITE_LINE_MEMBER(write_cts);
- DECLARE_WRITE_LINE_MEMBER(write_dsr);
- DECLARE_WRITE_LINE_MEMBER(write_centronics_busy);
-
protected:
// device-level overrides
virtual void device_start() override;
- machine_config_constructor device_mconfig_additions() const override;
+ virtual void device_add_mconfig(machine_config &config) override;
private:
required_device<pia6821_device> m_pia_io;
@@ -697,6 +686,17 @@ private:
int m_rxd;
int m_cts;
int m_dsr;
+
+ /* read data register */
+ DECLARE_READ8_MEMBER(porta_in);
+
+ /* write data register */
+ DECLARE_WRITE8_MEMBER(porta_out);
+
+ DECLARE_WRITE_LINE_MEMBER(write_rxd);
+ DECLARE_WRITE_LINE_MEMBER(write_cts);
+ DECLARE_WRITE_LINE_MEMBER(write_dsr);
+ DECLARE_WRITE_LINE_MEMBER(write_centronics_busy);
};
DECLARE_DEVICE_TYPE(TO7_IO_LINE, to7_io_line_device)
diff --git a/src/mame/includes/xbox_pci.h b/src/mame/includes/xbox_pci.h
index 90418ccc854..864260078c6 100644
--- a/src/mame/includes/xbox_pci.h
+++ b/src/mame/includes/xbox_pci.h
@@ -273,18 +273,18 @@ extern const device_type MCPX_AC97_MODEM;
class mcpx_ide_device : public pci_device {
public:
mcpx_ide_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- DECLARE_WRITE_LINE_MEMBER(ide_interrupt);
template<class _Object> static devcb_base &set_interrupt_handler(device_t &device, _Object object) { return downcast<mcpx_ide_device &>(device).m_interrupt_handler.set_callback(object); }
protected:
virtual void device_start() override;
virtual void device_reset() override;
- virtual machine_config_constructor device_mconfig_additions() const override;
+ virtual void device_add_mconfig(machine_config &config) override;
private:
devcb_write_line m_interrupt_handler;
DECLARE_ADDRESS_MAP(mcpx_ide_io, 32);
+ DECLARE_WRITE_LINE_MEMBER(ide_interrupt);
};
extern const device_type MCPX_IDE;
diff --git a/src/mame/machine/abc1600mac.cpp b/src/mame/machine/abc1600mac.cpp
index 943dc69a98d..c30fafe2b36 100644
--- a/src/mame/machine/abc1600mac.cpp
+++ b/src/mame/machine/abc1600mac.cpp
@@ -66,16 +66,11 @@ static ADDRESS_MAP_START( program_map, AS_PROGRAM, 8, abc1600_mac_device )
ADDRESS_MAP_END
-static MACHINE_CONFIG_START( abc1600_mac )
+MACHINE_CONFIG_MEMBER( abc1600_mac_device::device_add_mconfig )
MCFG_WATCHDOG_ADD("watchdog")
MCFG_WATCHDOG_TIME_INIT(attotime::from_msec(1600)) // XTAL_64MHz/8/10/20000/8/8
MACHINE_CONFIG_END
-machine_config_constructor abc1600_mac_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME( abc1600_mac );
-}
-
//-------------------------------------------------
// ROM( abc1600_mac )
diff --git a/src/mame/machine/abc1600mac.h b/src/mame/machine/abc1600mac.h
index 78edac40e1a..650545008a2 100644
--- a/src/mame/machine/abc1600mac.h
+++ b/src/mame/machine/abc1600mac.h
@@ -47,10 +47,6 @@ class abc1600_mac_device : public device_t,
public:
abc1600_mac_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- // optional information overrides
- virtual machine_config_constructor device_mconfig_additions() const override;
- virtual const tiny_rom_entry *device_rom_region() const override;
-
void set_cpu_tag(const char *cpu_tag) { m_cpu_tag = cpu_tag; }
virtual DECLARE_ADDRESS_MAP(map, 8);
@@ -84,6 +80,10 @@ protected:
// device_memory_interface overrides
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_PROGRAM) const override;
+ // optional information overrides
+ virtual void device_add_mconfig(machine_config &config) override;
+ virtual const tiny_rom_entry *device_rom_region() const override;
+
private:
enum
{
diff --git a/src/mame/machine/abc80kb.cpp b/src/mame/machine/abc80kb.cpp
index d172bc90dd3..af158f21125 100644
--- a/src/mame/machine/abc80kb.cpp
+++ b/src/mame/machine/abc80kb.cpp
@@ -122,10 +122,10 @@ ADDRESS_MAP_END
//-------------------------------------------------
-// MACHINE_DRIVER( abc80_keyboard )
+// device_add_mconfig - add device configuration
//-------------------------------------------------
-static MACHINE_CONFIG_START( abc80_keyboard )
+MACHINE_CONFIG_MEMBER( abc80_keyboard_device::device_add_mconfig )
MCFG_CPU_ADD(I8048_TAG, I8048, 4000000)
MCFG_CPU_IO_MAP(abc80_keyboard_io)
MCFG_DEVICE_DISABLE()
@@ -133,17 +133,6 @@ MACHINE_CONFIG_END
//-------------------------------------------------
-// machine_config_additions - device-specific
-// machine configurations
-//-------------------------------------------------
-
-machine_config_constructor abc80_keyboard_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME( abc80_keyboard );
-}
-
-
-//-------------------------------------------------
// INPUT_PORTS( abc80_keyboard )
//-------------------------------------------------
diff --git a/src/mame/machine/abc80kb.h b/src/mame/machine/abc80kb.h
index 6dfe5d9175d..5ec3e04da20 100644
--- a/src/mame/machine/abc80kb.h
+++ b/src/mame/machine/abc80kb.h
@@ -43,11 +43,6 @@ public:
template<class _Object> static devcb_base &set_keydown_wr_callback(device_t &device, _Object object) { return downcast<abc80_keyboard_device &>(device).m_write_keydown.set_callback(object); }
- // optional information overrides
- virtual const tiny_rom_entry *device_rom_region() const override;
- virtual machine_config_constructor device_mconfig_additions() const override;
- virtual ioport_constructor device_input_ports() const override;
-
uint8_t data_r();
protected:
@@ -55,6 +50,11 @@ protected:
virtual void device_start() override;
virtual void device_reset() override;
+ // optional information overrides
+ virtual const tiny_rom_entry *device_rom_region() const override;
+ virtual void device_add_mconfig(machine_config &config) override;
+ virtual ioport_constructor device_input_ports() const override;
+
private:
devcb_write_line m_write_keydown;
diff --git a/src/mame/machine/alpha8201.cpp b/src/mame/machine/alpha8201.cpp
index 3549f08c7cf..cd2c00a4bee 100644
--- a/src/mame/machine/alpha8201.cpp
+++ b/src/mame/machine/alpha8201.cpp
@@ -312,8 +312,11 @@ void alpha_8201_device::device_start()
save_item(NAME(m_mcu_r));
}
-// machine config additions
-static MACHINE_CONFIG_START(alpha8201)
+//-------------------------------------------------
+// device_add_mconfig - add device configuration
+//-------------------------------------------------
+
+MACHINE_CONFIG_MEMBER(alpha_8201_device::device_add_mconfig)
MCFG_CPU_ADD("mcu", HD44801, DERIVED_CLOCK(1,1)) // 8H
MCFG_HMCS40_READ_R_CB(0, READ8(alpha_8201_device, mcu_data_r))
@@ -325,12 +328,6 @@ static MACHINE_CONFIG_START(alpha8201)
MCFG_HMCS40_WRITE_D_CB(WRITE16(alpha_8201_device, mcu_d_w))
MACHINE_CONFIG_END
-machine_config_constructor alpha_8201_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME(alpha8201);
-}
-
-
//-------------------------------------------------
// device_reset - device-specific reset
//-------------------------------------------------
diff --git a/src/mame/machine/alpha8201.h b/src/mame/machine/alpha8201.h
index 2a6250f7dc0..76a5f69c4d0 100644
--- a/src/mame/machine/alpha8201.h
+++ b/src/mame/machine/alpha8201.h
@@ -16,10 +16,6 @@ public:
alpha_8201_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
~alpha_8201_device() {}
- DECLARE_READ8_MEMBER(mcu_data_r);
- DECLARE_WRITE8_MEMBER(mcu_data_w);
- DECLARE_WRITE16_MEMBER(mcu_d_w);
-
// external I/O
DECLARE_WRITE_LINE_MEMBER(bus_dir_w);
DECLARE_WRITE_LINE_MEMBER(mcu_start_w);
@@ -30,8 +26,7 @@ protected:
// device-level overrides
virtual void device_start() override;
virtual void device_reset() override;
- virtual machine_config_constructor device_mconfig_additions() const override;
-
+ virtual void device_add_mconfig(machine_config &config) override;
private:
// devices/pointers
required_device<cpu_device> m_mcu;
@@ -45,6 +40,10 @@ private:
void mcu_update_address();
void mcu_writeram();
+
+ DECLARE_READ8_MEMBER(mcu_data_r);
+ DECLARE_WRITE8_MEMBER(mcu_data_w);
+ DECLARE_WRITE16_MEMBER(mcu_d_w);
};
diff --git a/src/mame/machine/apricotkb.cpp b/src/mame/machine/apricotkb.cpp
index 18fa981a287..c12d17755a6 100644
--- a/src/mame/machine/apricotkb.cpp
+++ b/src/mame/machine/apricotkb.cpp
@@ -64,10 +64,10 @@ ADDRESS_MAP_END
//-------------------------------------------------
-// MACHINE_DRIVER( apricot_keyboard )
+// device_add_mconfig - add device configuration
//-------------------------------------------------
-static MACHINE_CONFIG_START( apricot_keyboard )
+MACHINE_CONFIG_MEMBER( apricot_keyboard_device::device_add_mconfig )
#ifdef UPD7507_EMULATED
MCFG_CPU_ADD(UPD7507C_TAG, UPD7507, XTAL_32_768kHz)
MCFG_CPU_IO_MAP(apricot_keyboard_io)
@@ -76,17 +76,6 @@ MACHINE_CONFIG_END
//-------------------------------------------------
-// machine_config_additions - device-specific
-// machine configurations
-//-------------------------------------------------
-
-machine_config_constructor apricot_keyboard_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME( apricot_keyboard );
-}
-
-
-//-------------------------------------------------
// INPUT_PORTS( apricot_keyboard )
//-------------------------------------------------
diff --git a/src/mame/machine/apricotkb.h b/src/mame/machine/apricotkb.h
index ed0bbc6a9aa..aa891b36c81 100644
--- a/src/mame/machine/apricotkb.h
+++ b/src/mame/machine/apricotkb.h
@@ -45,11 +45,6 @@ public:
template<class _Object> static devcb_base &set_txd_wr_callback(device_t &device, _Object object) { return downcast<apricot_keyboard_device &>(device).m_write_txd.set_callback(object); }
- // optional information overrides
- virtual const tiny_rom_entry *device_rom_region() const override;
- virtual machine_config_constructor device_mconfig_additions() const override;
- virtual ioport_constructor device_input_ports() const override;
-
uint8_t read_keyboard();
DECLARE_READ8_MEMBER( kb_lo_r );
@@ -66,6 +61,11 @@ protected:
virtual void device_start() override;
virtual void device_reset() override;
+ // optional information overrides
+ virtual const tiny_rom_entry *device_rom_region() const override;
+ virtual void device_add_mconfig(machine_config &config) override;
+ virtual ioport_constructor device_input_ports() const override;
+
private:
devcb_write_line m_write_txd;
diff --git a/src/mame/machine/asic65.cpp b/src/mame/machine/asic65.cpp
index 8b1a974a9be..1991435431f 100644
--- a/src/mame/machine/asic65.cpp
+++ b/src/mame/machine/asic65.cpp
@@ -532,14 +532,11 @@ static ADDRESS_MAP_START( asic65_io_map, AS_IO, 16, asic65_device )
ADDRESS_MAP_END
+//-------------------------------------------------
+// device_add_mconfig - add device configuration
+//-------------------------------------------------
-/*************************************
- *
- * Machine driver for ROM-based
- *
- *************************************/
-
-MACHINE_CONFIG_START( asic65 )
+MACHINE_CONFIG_MEMBER( asic65_device::device_add_mconfig )
/* ASIC65 */
MCFG_CPU_ADD("asic65cpu", TMS32010, 20000000)
@@ -548,16 +545,6 @@ MACHINE_CONFIG_START( asic65 )
MCFG_TMS32010_BIO_IN_CB(READLINE(asic65_device, get_bio))
MACHINE_CONFIG_END
-//-------------------------------------------------
-// machine_config_additions - device-specific
-// machine configurations
-//-------------------------------------------------
-
-machine_config_constructor asic65_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME( asic65 );
-}
-
/***********************************************************************
diff --git a/src/mame/machine/asic65.h b/src/mame/machine/asic65.h
index 1dd9e32851c..9a126dfee4c 100644
--- a/src/mame/machine/asic65.h
+++ b/src/mame/machine/asic65.h
@@ -36,7 +36,6 @@ public:
DECLARE_READ16_MEMBER( m68k_r );
DECLARE_WRITE16_MEMBER( stat_w );
DECLARE_READ16_MEMBER( stat_r );
- DECLARE_READ_LINE_MEMBER( get_bio );
enum
{
@@ -47,7 +46,7 @@ protected:
// device-level overrides
virtual void device_start() override;
virtual void device_reset() override;
- virtual machine_config_constructor device_mconfig_additions() const override;
+ virtual void device_add_mconfig(machine_config &config) override;
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
private:
@@ -70,6 +69,8 @@ private:
uint16_t m_tdata;
FILE * m_log;
+
+ DECLARE_READ_LINE_MEMBER( get_bio );
};
DECLARE_DEVICE_TYPE(ASIC65, asic65_device)
diff --git a/src/mame/machine/at.cpp b/src/mame/machine/at.cpp
index 8e45cf2430b..607fcb9eb8d 100644
--- a/src/mame/machine/at.cpp
+++ b/src/mame/machine/at.cpp
@@ -53,7 +53,7 @@ MACHINE_CONFIG_START( at_softlists )
MCFG_SOFTWARE_LIST_ADD("at_cdrom_list","ibm5170_cdrom")
MACHINE_CONFIG_END
-static MACHINE_CONFIG_START( at_mb )
+MACHINE_CONFIG_MEMBER( at_mb_device::device_add_mconfig )
MCFG_DEVICE_ADD("pit8254", PIT8254, 0)
MCFG_PIT8253_CLK0(4772720/4) /* heartbeat IRQ */
MCFG_PIT8253_OUT0_HANDLER(DEVWRITELINE("pic8259_master", pic8259_device, ir0_w))
@@ -137,10 +137,6 @@ static MACHINE_CONFIG_START( at_mb )
MCFG_PC_KBDC_OUT_DATA_CB(DEVWRITELINE("keybc", at_keyboard_controller_device, keyboard_data_w))
MACHINE_CONFIG_END
-machine_config_constructor at_mb_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME(at_mb);
-}
DEVICE_ADDRESS_MAP_START( map, 16, at_mb_device )
AM_RANGE(0x0000, 0x001f) AM_DEVREADWRITE8("dma8237_1", am9517a_device, read, write, 0xffff)
diff --git a/src/mame/machine/at.h b/src/mame/machine/at.h
index 9a0797deaab..dcaf1d5af9e 100644
--- a/src/mame/machine/at.h
+++ b/src/mame/machine/at.h
@@ -23,46 +23,17 @@ public:
DECLARE_WRITE8_MEMBER(page8_w);
DECLARE_READ8_MEMBER(portb_r);
DECLARE_WRITE8_MEMBER(portb_w);
- DECLARE_READ8_MEMBER(get_slave_ack);
- DECLARE_WRITE_LINE_MEMBER(pit8254_out2_changed);
- DECLARE_WRITE_LINE_MEMBER(dma_hrq_changed);
- DECLARE_READ8_MEMBER(dma8237_0_dack_r);
- DECLARE_READ8_MEMBER(dma8237_1_dack_r);
- DECLARE_READ8_MEMBER(dma8237_2_dack_r);
- DECLARE_READ8_MEMBER(dma8237_3_dack_r);
- DECLARE_READ8_MEMBER(dma8237_5_dack_r);
- DECLARE_READ8_MEMBER(dma8237_6_dack_r);
- DECLARE_READ8_MEMBER(dma8237_7_dack_r);
- DECLARE_WRITE8_MEMBER(dma8237_0_dack_w);
- DECLARE_WRITE8_MEMBER(dma8237_1_dack_w);
- DECLARE_WRITE8_MEMBER(dma8237_2_dack_w);
- DECLARE_WRITE8_MEMBER(dma8237_3_dack_w);
- DECLARE_WRITE8_MEMBER(dma8237_5_dack_w);
- DECLARE_WRITE8_MEMBER(dma8237_6_dack_w);
- DECLARE_WRITE8_MEMBER(dma8237_7_dack_w);
- DECLARE_WRITE_LINE_MEMBER(dma8237_out_eop);
- DECLARE_WRITE_LINE_MEMBER(dack0_w);
- DECLARE_WRITE_LINE_MEMBER(dack1_w);
- DECLARE_WRITE_LINE_MEMBER(dack2_w);
- DECLARE_WRITE_LINE_MEMBER(dack3_w);
- DECLARE_WRITE_LINE_MEMBER(dack4_w);
- DECLARE_WRITE_LINE_MEMBER(dack5_w);
- DECLARE_WRITE_LINE_MEMBER(dack6_w);
- DECLARE_WRITE_LINE_MEMBER(dack7_w);
DECLARE_WRITE8_MEMBER(write_rtc);
DECLARE_WRITE_LINE_MEMBER(shutdown);
- DECLARE_READ8_MEMBER(dma_read_byte);
- DECLARE_WRITE8_MEMBER(dma_write_byte);
- DECLARE_READ8_MEMBER(dma_read_word);
- DECLARE_WRITE8_MEMBER(dma_write_word);
-
uint32_t a20_286(bool state);
+
protected:
void device_start() override;
void device_reset() override;
- virtual machine_config_constructor device_mconfig_additions() const override;
+ virtual void device_add_mconfig(machine_config &config) override;
+
private:
void set_dma_channel(int channel, int state);
void speaker_set_spkrdata(uint8_t data);
@@ -85,6 +56,39 @@ private:
uint8_t m_at_speaker;
uint8_t m_channel_check;
uint8_t m_nmi_enabled;
+
+ DECLARE_WRITE_LINE_MEMBER(pit8254_out2_changed);
+
+ DECLARE_WRITE_LINE_MEMBER(dma8237_out_eop);
+ DECLARE_READ8_MEMBER(dma8237_0_dack_r);
+ DECLARE_READ8_MEMBER(dma8237_1_dack_r);
+ DECLARE_READ8_MEMBER(dma8237_2_dack_r);
+ DECLARE_READ8_MEMBER(dma8237_3_dack_r);
+ DECLARE_READ8_MEMBER(dma8237_5_dack_r);
+ DECLARE_READ8_MEMBER(dma8237_6_dack_r);
+ DECLARE_READ8_MEMBER(dma8237_7_dack_r);
+ DECLARE_WRITE8_MEMBER(dma8237_0_dack_w);
+ DECLARE_WRITE8_MEMBER(dma8237_1_dack_w);
+ DECLARE_WRITE8_MEMBER(dma8237_2_dack_w);
+ DECLARE_WRITE8_MEMBER(dma8237_3_dack_w);
+ DECLARE_WRITE8_MEMBER(dma8237_5_dack_w);
+ DECLARE_WRITE8_MEMBER(dma8237_6_dack_w);
+ DECLARE_WRITE8_MEMBER(dma8237_7_dack_w);
+ DECLARE_WRITE_LINE_MEMBER(dack0_w);
+ DECLARE_WRITE_LINE_MEMBER(dack1_w);
+ DECLARE_WRITE_LINE_MEMBER(dack2_w);
+ DECLARE_WRITE_LINE_MEMBER(dack3_w);
+ DECLARE_WRITE_LINE_MEMBER(dack4_w);
+ DECLARE_WRITE_LINE_MEMBER(dack5_w);
+ DECLARE_WRITE_LINE_MEMBER(dack6_w);
+ DECLARE_WRITE_LINE_MEMBER(dack7_w);
+ DECLARE_READ8_MEMBER(get_slave_ack);
+ DECLARE_WRITE_LINE_MEMBER(dma_hrq_changed);
+
+ DECLARE_READ8_MEMBER(dma_read_byte);
+ DECLARE_WRITE8_MEMBER(dma_write_byte);
+ DECLARE_READ8_MEMBER(dma_read_word);
+ DECLARE_WRITE8_MEMBER(dma_write_word);
};
DECLARE_DEVICE_TYPE(AT_MB, at_mb_device)
diff --git a/src/mame/machine/atarifdc.cpp b/src/mame/machine/atarifdc.cpp
index f80b569f539..0603ebda199 100644
--- a/src/mame/machine/atarifdc.cpp
+++ b/src/mame/machine/atarifdc.cpp
@@ -735,10 +735,6 @@ static const floppy_interface atari_floppy_interface =
"floppy_5_25"
};
-static MACHINE_CONFIG_START( atari_fdc )
- MCFG_LEGACY_FLOPPY_4_DRIVES_ADD(atari_floppy_interface)
-MACHINE_CONFIG_END
-
legacy_floppy_image_device *atari_fdc_device::atari_floppy_get_device_child(int drive)
{
switch(drive) {
@@ -784,11 +780,9 @@ void atari_fdc_device::device_start()
}
//-------------------------------------------------
-// device_mconfig_additions - return a pointer to
-// the device's machine fragment
+// device_add_mconfig - add device configuration
//-------------------------------------------------
-machine_config_constructor atari_fdc_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME( atari_fdc );
-}
+MACHINE_CONFIG_MEMBER( atari_fdc_device::device_add_mconfig )
+ MCFG_LEGACY_FLOPPY_4_DRIVES_ADD(atari_floppy_interface)
+MACHINE_CONFIG_END
diff --git a/src/mame/machine/atarifdc.h b/src/mame/machine/atarifdc.h
index e68612b5204..c50742ac030 100644
--- a/src/mame/machine/atarifdc.h
+++ b/src/mame/machine/atarifdc.h
@@ -23,7 +23,7 @@ public:
protected:
// device-level overrides
virtual void device_start() override;
- virtual machine_config_constructor device_mconfig_additions() const override;
+ virtual void device_add_mconfig(machine_config &config) override;
private:
void clr_serout(int expect_data);
diff --git a/src/mame/machine/atarigen.cpp b/src/mame/machine/atarigen.cpp
index 065969e5b84..65b2b5a84b7 100644
--- a/src/mame/machine/atarigen.cpp
+++ b/src/mame/machine/atarigen.cpp
@@ -900,19 +900,13 @@ atari_eeprom_2804_device::atari_eeprom_2804_device(const machine_config &mconfig
//-------------------------------------------------
-// device_mconfig_additions - return machine
-// config fragment
+// device_add_mconfig - add device configuration
//-------------------------------------------------
-MACHINE_CONFIG_START(atari_eeprom_2804_config)
+MACHINE_CONFIG_MEMBER(atari_eeprom_2804_device::device_add_mconfig)
MCFG_EEPROM_2804_ADD("eeprom")
MACHINE_CONFIG_END
-machine_config_constructor atari_eeprom_2804_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME(atari_eeprom_2804_config);
-}
-
//-------------------------------------------------
// atari_eeprom_2816_device - constructor
@@ -925,20 +919,13 @@ atari_eeprom_2816_device::atari_eeprom_2816_device(const machine_config &mconfig
//-------------------------------------------------
-// device_mconfig_additions - return machine
-// config fragment
+// device_add_mconfig - add device configuration
//-------------------------------------------------
-MACHINE_CONFIG_START(atari_eeprom_2816_config)
+MACHINE_CONFIG_MEMBER(atari_eeprom_2816_device::device_add_mconfig)
MCFG_EEPROM_2816_ADD("eeprom")
MACHINE_CONFIG_END
-machine_config_constructor atari_eeprom_2816_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME(atari_eeprom_2816_config);
-}
-
-
/***************************************************************************
OVERALL INIT
diff --git a/src/mame/machine/atarigen.h b/src/mame/machine/atarigen.h
index 95d29226874..c6c6baa5896 100644
--- a/src/mame/machine/atarigen.h
+++ b/src/mame/machine/atarigen.h
@@ -298,7 +298,7 @@ public:
protected:
// device-level overrides
- virtual machine_config_constructor device_mconfig_additions() const override;
+ virtual void device_add_mconfig(machine_config &config) override;
};
class atari_eeprom_2816_device : public atari_eeprom_device
@@ -309,7 +309,7 @@ public:
protected:
// device-level overrides
- virtual machine_config_constructor device_mconfig_additions() const override;
+ virtual void device_add_mconfig(machine_config &config) override;
};
diff --git a/src/mame/machine/beta.cpp b/src/mame/machine/beta.cpp
index 42b92009bed..26dda683769 100644
--- a/src/mame/machine/beta.cpp
+++ b/src/mame/machine/beta.cpp
@@ -182,17 +182,6 @@ static SLOT_INTERFACE_START( beta_disk_floppies )
SLOT_INTERFACE( "drive3", FLOPPY_525_QD )
SLOT_INTERFACE_END
-static MACHINE_CONFIG_START( beta_disk )
- MCFG_KR1818VG93_ADD("wd179x", XTAL_8MHz / 8)
- MCFG_FLOPPY_DRIVE_ADD("wd179x:0", beta_disk_floppies, "drive0", beta_disk_device::floppy_formats)
- MCFG_FLOPPY_DRIVE_SOUND(true)
- MCFG_FLOPPY_DRIVE_ADD("wd179x:1", beta_disk_floppies, "drive1", beta_disk_device::floppy_formats)
- MCFG_FLOPPY_DRIVE_SOUND(true)
- MCFG_FLOPPY_DRIVE_ADD("wd179x:2", beta_disk_floppies, "drive2", beta_disk_device::floppy_formats)
- MCFG_FLOPPY_DRIVE_SOUND(true)
- MCFG_FLOPPY_DRIVE_ADD("wd179x:3", beta_disk_floppies, "drive3", beta_disk_device::floppy_formats)
- MCFG_FLOPPY_DRIVE_SOUND(true)
-MACHINE_CONFIG_END
ROM_START( beta_disk )
ROM_REGION( 0x60000, "beta", 0 )
@@ -277,14 +266,20 @@ ROM_END
//-------------------------------------------------
-// device_mconfig_additions - return a pointer to
-// the device's machine fragment
+// device_add_mconfig - add device configuration
//-------------------------------------------------
-machine_config_constructor beta_disk_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME( beta_disk );
-}
+MACHINE_CONFIG_MEMBER( beta_disk_device::device_add_mconfig )
+ MCFG_KR1818VG93_ADD("wd179x", XTAL_8MHz / 8)
+ MCFG_FLOPPY_DRIVE_ADD("wd179x:0", beta_disk_floppies, "drive0", beta_disk_device::floppy_formats)
+ MCFG_FLOPPY_DRIVE_SOUND(true)
+ MCFG_FLOPPY_DRIVE_ADD("wd179x:1", beta_disk_floppies, "drive1", beta_disk_device::floppy_formats)
+ MCFG_FLOPPY_DRIVE_SOUND(true)
+ MCFG_FLOPPY_DRIVE_ADD("wd179x:2", beta_disk_floppies, "drive2", beta_disk_device::floppy_formats)
+ MCFG_FLOPPY_DRIVE_SOUND(true)
+ MCFG_FLOPPY_DRIVE_ADD("wd179x:3", beta_disk_floppies, "drive3", beta_disk_device::floppy_formats)
+ MCFG_FLOPPY_DRIVE_SOUND(true)
+MACHINE_CONFIG_END
//-------------------------------------------------
// device_rom_region - return a pointer to the
diff --git a/src/mame/machine/beta.h b/src/mame/machine/beta.h
index a8505977cf1..4dd62aa1f31 100644
--- a/src/mame/machine/beta.h
+++ b/src/mame/machine/beta.h
@@ -35,7 +35,6 @@ public:
DECLARE_WRITE8_MEMBER(track_w);
DECLARE_WRITE8_MEMBER(sector_w);
DECLARE_WRITE8_MEMBER(data_w);
- DECLARE_FLOPPY_FORMATS(floppy_formats);
int is_active();
void enable();
@@ -46,7 +45,7 @@ protected:
virtual void device_start() override;
virtual void device_reset() override;
virtual const tiny_rom_entry *device_rom_region() const override;
- virtual machine_config_constructor device_mconfig_additions() const override;
+ virtual void device_add_mconfig(machine_config &config) override;
private:
uint8_t m_betadisk_active;
@@ -56,6 +55,8 @@ private:
required_device<floppy_connector> m_floppy1;
required_device<floppy_connector> m_floppy2;
required_device<floppy_connector> m_floppy3;
+
+ DECLARE_FLOPPY_FORMATS(floppy_formats);
};
DECLARE_DEVICE_TYPE(BETA_DISK, beta_disk_device)
diff --git a/src/mame/machine/c117.cpp b/src/mame/machine/c117.cpp
index 317cb6c6a91..78e6f18ebfc 100644
--- a/src/mame/machine/c117.cpp
+++ b/src/mame/machine/c117.cpp
@@ -26,11 +26,6 @@ two 6809s and as the reset generator for the entire system.
#include "machine/c117.h"
-static MACHINE_CONFIG_START( namco_c117 )
- MCFG_WATCHDOG_ADD("watchdog")
-MACHINE_CONFIG_END
-
-
DEFINE_DEVICE_TYPE(NAMCO_C117, namco_c117_device, "namco_c117", "Namco C117 MMU")
@@ -115,14 +110,12 @@ void namco_c117_device::device_reset()
//-------------------------------------------------
-// device_mconfig_additions - return a pointer to
-// the device's machine fragment
+// device_add_mconfig - add device configuration
//-------------------------------------------------
-machine_config_constructor namco_c117_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME( namco_c117 );
-}
+MACHINE_CONFIG_MEMBER( namco_c117_device::device_add_mconfig )
+ MCFG_WATCHDOG_ADD("watchdog")
+MACHINE_CONFIG_END
READ8_MEMBER(namco_c117_device::main_r)
diff --git a/src/mame/machine/c117.h b/src/mame/machine/c117.h
index 4586332a56e..4a1542252e0 100644
--- a/src/mame/machine/c117.h
+++ b/src/mame/machine/c117.h
@@ -50,7 +50,7 @@ protected:
// device-level overrides
virtual void device_start() override;
virtual void device_reset() override;
- virtual machine_config_constructor device_mconfig_additions() const override;
+ virtual void device_add_mconfig(machine_config &config) override;
// device_memory_interface overrides
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : nullptr; }
diff --git a/src/mame/machine/cedar_magnet_flop.cpp b/src/mame/machine/cedar_magnet_flop.cpp
index 9627968a204..b1cd0b2165b 100644
--- a/src/mame/machine/cedar_magnet_flop.cpp
+++ b/src/mame/machine/cedar_magnet_flop.cpp
@@ -16,14 +16,10 @@ cedar_magnet_flop_device::cedar_magnet_flop_device(const machine_config &mconfig
}
-static MACHINE_CONFIG_START( cedar_magnet_flop )
+MACHINE_CONFIG_MEMBER( cedar_magnet_flop_device::device_add_mconfig )
MCFG_NVRAM_ADD_NO_FILL("floppy_nvram")
MACHINE_CONFIG_END
-machine_config_constructor cedar_magnet_flop_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME( cedar_magnet_flop );
-}
void cedar_magnet_flop_device::device_start()
{
diff --git a/src/mame/machine/cedar_magnet_flop.h b/src/mame/machine/cedar_magnet_flop.h
index fc82a4adb8d..b7a151abaed 100644
--- a/src/mame/machine/cedar_magnet_flop.h
+++ b/src/mame/machine/cedar_magnet_flop.h
@@ -32,7 +32,7 @@ public:
DECLARE_WRITE8_MEMBER(write);
protected:
- virtual machine_config_constructor device_mconfig_additions() const override;
+ virtual void device_add_mconfig(machine_config &config) override;
virtual void device_start() override;
virtual void device_reset() override;
diff --git a/src/mame/machine/cedar_magnet_plane.cpp b/src/mame/machine/cedar_magnet_plane.cpp
index 1bc1b78804c..f341f4a6c22 100644
--- a/src/mame/machine/cedar_magnet_plane.cpp
+++ b/src/mame/machine/cedar_magnet_plane.cpp
@@ -69,7 +69,7 @@ WRITE8_MEMBER(cedar_magnet_plane_device::plane_portcf_w)
m_cf_data = data;
}
-static MACHINE_CONFIG_START( cedar_magnet_plane )
+MACHINE_CONFIG_MEMBER( cedar_magnet_plane_device::device_add_mconfig )
MCFG_CPU_ADD("planecpu", Z80,4000000)
MCFG_CPU_PROGRAM_MAP(cedar_magnet_plane_map)
MCFG_CPU_IO_MAP(cedar_magnet_plane_io)
@@ -126,11 +126,6 @@ WRITE8_MEMBER(cedar_magnet_plane_device::pio1_pb_w)
m_scrolly = data;
}
-machine_config_constructor cedar_magnet_plane_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME( cedar_magnet_plane );
-}
-
void cedar_magnet_plane_device::device_start()
{
save_item(NAME(m_framebuffer));
diff --git a/src/mame/machine/cedar_magnet_plane.h b/src/mame/machine/cedar_magnet_plane.h
index 1b6cadf78b0..f2f55f20efd 100644
--- a/src/mame/machine/cedar_magnet_plane.h
+++ b/src/mame/machine/cedar_magnet_plane.h
@@ -22,16 +22,6 @@ public:
// construction/destruction
cedar_magnet_plane_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- DECLARE_READ8_MEMBER(pio0_pa_r);
- DECLARE_WRITE8_MEMBER(pio0_pa_w);
-// DECLARE_READ8_MEMBER(pio0_pb_r);
- DECLARE_WRITE8_MEMBER(pio0_pb_w);
-
-// DECLARE_READ8_MEMBER(pio1_pa_r);
- DECLARE_WRITE8_MEMBER(pio1_pa_w);
-// DECLARE_READ8_MEMBER(pio1_pb_r);
- DECLARE_WRITE8_MEMBER(pio1_pb_w);
-
DECLARE_WRITE8_MEMBER(plane_portcc_w);
DECLARE_WRITE8_MEMBER(plane_portcd_w);
DECLARE_WRITE8_MEMBER(plane_portce_w);
@@ -42,7 +32,7 @@ public:
uint32_t draw(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int palbase);
protected:
- virtual machine_config_constructor device_mconfig_additions() const override;
+ virtual void device_add_mconfig(machine_config &config) override;
virtual void device_start() override;
private:
@@ -58,6 +48,16 @@ private:
uint8_t m_cd_data;
uint8_t m_cf_data;
+
+ DECLARE_READ8_MEMBER(pio0_pa_r);
+ DECLARE_WRITE8_MEMBER(pio0_pa_w);
+// DECLARE_READ8_MEMBER(pio0_pb_r);
+ DECLARE_WRITE8_MEMBER(pio0_pb_w);
+
+// DECLARE_READ8_MEMBER(pio1_pa_r);
+ DECLARE_WRITE8_MEMBER(pio1_pa_w);
+// DECLARE_READ8_MEMBER(pio1_pb_r);
+ DECLARE_WRITE8_MEMBER(pio1_pb_w);
};
#endif // MAME_MACHINE_CEDAR_MAGNET_PLANE_H
diff --git a/src/mame/machine/cedar_magnet_sprite.cpp b/src/mame/machine/cedar_magnet_sprite.cpp
index 939557a6f91..0745fdc37d7 100644
--- a/src/mame/machine/cedar_magnet_sprite.cpp
+++ b/src/mame/machine/cedar_magnet_sprite.cpp
@@ -199,7 +199,7 @@ WRITE8_MEMBER(cedar_magnet_sprite_device::sprite_port9c_w)
// printf("%s:sprite_port9c_w %02x\n", machine().describe_context(), data);
}
-static MACHINE_CONFIG_START( cedar_magnet_sprite )
+MACHINE_CONFIG_MEMBER( cedar_magnet_sprite_device::device_add_mconfig )
MCFG_CPU_ADD("spritecpu", Z80,4000000)
MCFG_CPU_PROGRAM_MAP(cedar_magnet_sprite_map)
MCFG_CPU_IO_MAP(cedar_magnet_sprite_io)
@@ -286,12 +286,6 @@ WRITE8_MEMBER(cedar_magnet_sprite_device::pio2_pb_w)
}
-machine_config_constructor cedar_magnet_sprite_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME( cedar_magnet_sprite );
-}
-
-
void cedar_magnet_sprite_device::device_start()
{
}
diff --git a/src/mame/machine/cedar_magnet_sprite.h b/src/mame/machine/cedar_magnet_sprite.h
index 3bdf55ed0f0..666908233bf 100644
--- a/src/mame/machine/cedar_magnet_sprite.h
+++ b/src/mame/machine/cedar_magnet_sprite.h
@@ -24,21 +24,6 @@ public:
// construction/destruction
cedar_magnet_sprite_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- DECLARE_READ8_MEMBER(pio0_pa_r);
- DECLARE_WRITE8_MEMBER(pio0_pa_w);
-// DECLARE_READ8_MEMBER(pio0_pb_r);
- DECLARE_WRITE8_MEMBER(pio0_pb_w);
-
-// DECLARE_READ8_MEMBER(pio1_pa_r);
- DECLARE_WRITE8_MEMBER(pio1_pa_w);
-// DECLARE_READ8_MEMBER(pio1_pb_r);
- DECLARE_WRITE8_MEMBER(pio1_pb_w);
-
-// DECLARE_READ8_MEMBER(pio2_pa_r);
- DECLARE_WRITE8_MEMBER(pio2_pa_w);
-// DECLARE_READ8_MEMBER(pio2_pb_r);
- DECLARE_WRITE8_MEMBER(pio2_pb_w);
-
DECLARE_WRITE8_MEMBER(sprite_port80_w);
DECLARE_WRITE8_MEMBER(sprite_port84_w);
DECLARE_WRITE8_MEMBER(sprite_port88_w);
@@ -52,7 +37,7 @@ public:
uint32_t draw(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int palbase);
protected:
- virtual machine_config_constructor device_mconfig_additions() const override;
+ virtual void device_add_mconfig(machine_config &config) override;
virtual void device_start() override;
virtual void device_reset() override;
@@ -75,6 +60,21 @@ private:
int m_high_write;
uint8_t m_uppersprite;
+ DECLARE_READ8_MEMBER(pio0_pa_r);
+ DECLARE_WRITE8_MEMBER(pio0_pa_w);
+// DECLARE_READ8_MEMBER(pio0_pb_r);
+ DECLARE_WRITE8_MEMBER(pio0_pb_w);
+
+// DECLARE_READ8_MEMBER(pio1_pa_r);
+ DECLARE_WRITE8_MEMBER(pio1_pa_w);
+// DECLARE_READ8_MEMBER(pio1_pb_r);
+ DECLARE_WRITE8_MEMBER(pio1_pb_w);
+
+// DECLARE_READ8_MEMBER(pio2_pa_r);
+ DECLARE_WRITE8_MEMBER(pio2_pa_w);
+// DECLARE_READ8_MEMBER(pio2_pb_r);
+ DECLARE_WRITE8_MEMBER(pio2_pb_w);
+
required_device<z80pio_device> m_pio0;
required_device<z80pio_device> m_pio1;
required_device<z80pio_device> m_pio2;
diff --git a/src/mame/machine/compiskb.cpp b/src/mame/machine/compiskb.cpp
index ac0172b07a1..58cf775f965 100644
--- a/src/mame/machine/compiskb.cpp
+++ b/src/mame/machine/compiskb.cpp
@@ -52,10 +52,10 @@ const tiny_rom_entry *compis_keyboard_device::device_rom_region() const
//-------------------------------------------------
-// MACHINE_DRIVER( compis_keyboard )
+// device_add_mconfig - add device configuration
//-------------------------------------------------
-static MACHINE_CONFIG_START( compis_keyboard )
+MACHINE_CONFIG_MEMBER( compis_keyboard_device::device_add_mconfig )
MCFG_CPU_ADD(I8748_TAG, I8748, 2016000) // XTAL_4_032MHz/2 ???
MCFG_MCS48_PORT_BUS_IN_CB(READ8(compis_keyboard_device, bus_r))
MCFG_MCS48_PORT_BUS_OUT_CB(WRITE8(compis_keyboard_device, bus_w))
@@ -72,17 +72,6 @@ MACHINE_CONFIG_END
//-------------------------------------------------
-// machine_config_additions - device-specific
-// machine configurations
-//-------------------------------------------------
-
-machine_config_constructor compis_keyboard_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME( compis_keyboard );
-}
-
-
-//-------------------------------------------------
// INPUT_PORTS( compis_keyboard )
//-------------------------------------------------
diff --git a/src/mame/machine/compiskb.h b/src/mame/machine/compiskb.h
index a4087f1f2cf..a6edcbe5d66 100644
--- a/src/mame/machine/compiskb.h
+++ b/src/mame/machine/compiskb.h
@@ -39,22 +39,17 @@ public:
template <class Object> static devcb_base &set_out_tx_handler(device_t &device, Object &&cb) { return downcast<compis_keyboard_device &>(device).m_out_tx_handler.set_callback(std::forward<Object>(cb)); }
- // optional information overrides
- virtual const tiny_rom_entry *device_rom_region() const override;
- virtual machine_config_constructor device_mconfig_additions() const override;
- virtual ioport_constructor device_input_ports() const override;
-
DECLARE_WRITE_LINE_MEMBER( si_w );
- DECLARE_READ8_MEMBER( bus_r );
- DECLARE_WRITE8_MEMBER( bus_w );
- DECLARE_READ8_MEMBER( p1_r );
- DECLARE_READ8_MEMBER( p2_r );
-
protected:
// device-level overrides
virtual void device_start() override;
+ // optional information overrides
+ virtual const tiny_rom_entry *device_rom_region() const override;
+ virtual void device_add_mconfig(machine_config &config) override;
+ virtual ioport_constructor device_input_ports() const override;
+
private:
enum
{
@@ -69,6 +64,11 @@ private:
uint8_t m_bus;
uint8_t m_keylatch;
+
+ DECLARE_READ8_MEMBER( bus_r );
+ DECLARE_WRITE8_MEMBER( bus_w );
+ DECLARE_READ8_MEMBER( p1_r );
+ DECLARE_READ8_MEMBER( p2_r );
};
diff --git a/src/mame/machine/cuda.cpp b/src/mame/machine/cuda.cpp
index b7a9f11e1c3..1493847920d 100644
--- a/src/mame/machine/cuda.cpp
+++ b/src/mame/machine/cuda.cpp
@@ -79,26 +79,16 @@ static ADDRESS_MAP_START( cuda_map, AS_PROGRAM, 8, cuda_device )
AM_RANGE(0x0f00, 0x1fff) AM_ROM AM_REGION(CUDA_CPU_TAG, 0)
ADDRESS_MAP_END
+
//-------------------------------------------------
-// MACHINE_CONFIG
+// device_add_mconfig - add device configuration
//-------------------------------------------------
-static MACHINE_CONFIG_START( cuda )
+MACHINE_CONFIG_MEMBER( cuda_device::device_add_mconfig )
MCFG_CPU_ADD(CUDA_CPU_TAG, M68HC05EG, XTAL_32_768kHz*192) // 32.768 kHz input clock, can be PLL'ed to x128 = 4.1 MHz under s/w control
MCFG_CPU_PROGRAM_MAP(cuda_map)
MACHINE_CONFIG_END
-
-//-------------------------------------------------
-// machine_config_additions - device-specific
-// machine configurations
-//-------------------------------------------------
-
-machine_config_constructor cuda_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME( cuda );
-}
-
const tiny_rom_entry *cuda_device::device_rom_region() const
{
return ROM_NAME( cuda );
diff --git a/src/mame/machine/cuda.h b/src/mame/machine/cuda.h
index 7e5e614623d..8330e31e902 100644
--- a/src/mame/machine/cuda.h
+++ b/src/mame/machine/cuda.h
@@ -107,7 +107,7 @@ protected:
// device-level overrides
virtual void device_start() override;
virtual void device_reset() override;
- virtual machine_config_constructor device_mconfig_additions() const override;
+ virtual void device_add_mconfig(machine_config &config) override;
virtual const tiny_rom_entry *device_rom_region() const override;
required_device<cpu_device> m_maincpu;
diff --git a/src/mame/machine/dec_lk201.cpp b/src/mame/machine/dec_lk201.cpp
index f05b41d3d19..d2eddf29cd5 100644
--- a/src/mame/machine/dec_lk201.cpp
+++ b/src/mame/machine/dec_lk201.cpp
@@ -205,11 +205,12 @@ static ADDRESS_MAP_START( lk201_map, AS_PROGRAM, 8, lk201_device )
AM_RANGE(0x0100, 0x1fff) AM_ROM AM_REGION(LK201_CPU_TAG, 0x100)
ADDRESS_MAP_END
+
//-------------------------------------------------
-// MACHINE_CONFIG
+// device_add_mconfig - add device configuration
//-------------------------------------------------
-static MACHINE_CONFIG_START( lk201 )
+MACHINE_CONFIG_MEMBER( lk201_device::device_add_mconfig )
MCFG_CPU_ADD(LK201_CPU_TAG, M68HC05EG, XTAL_4MHz) // actually 68HC05C4, clock verified by Lord_Nightmare
MCFG_CPU_PROGRAM_MAP(lk201_map)
@@ -218,17 +219,6 @@ static MACHINE_CONFIG_START( lk201 )
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
MACHINE_CONFIG_END
-
-//-------------------------------------------------
-// machine_config_additions - device-specific
-// machine configurations
-//-------------------------------------------------
-
-machine_config_constructor lk201_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME( lk201 );
-}
-
const tiny_rom_entry *lk201_device::device_rom_region() const
{
return ROM_NAME( lk201 );
diff --git a/src/mame/machine/dec_lk201.h b/src/mame/machine/dec_lk201.h
index d451ea8d530..1d1e8453c0d 100644
--- a/src/mame/machine/dec_lk201.h
+++ b/src/mame/machine/dec_lk201.h
@@ -64,7 +64,7 @@ public:
protected:
// device-level overrides
- virtual machine_config_constructor device_mconfig_additions() const override;
+ virtual void device_add_mconfig(machine_config &config) override;
virtual const tiny_rom_entry *device_rom_region() const override;
virtual ioport_constructor device_input_ports() const override;
virtual void device_start() override;
diff --git a/src/mame/machine/decopincpu.cpp b/src/mame/machine/decopincpu.cpp
index 3c046787b88..f1c3c6bd999 100644
--- a/src/mame/machine/decopincpu.cpp
+++ b/src/mame/machine/decopincpu.cpp
@@ -197,7 +197,7 @@ WRITE8_MEMBER( decocpu_type1_device::solenoid2_w )
// todo
}
-static MACHINE_CONFIG_START( decocpu1 )
+MACHINE_CONFIG_MEMBER( decocpu_type1_device::device_add_mconfig )
/* basic machine hardware */
MCFG_CPU_ADD("maincpu", M6808, XTAL_4MHz)
MCFG_CPU_PROGRAM_MAP(decocpu1_map)
@@ -245,19 +245,6 @@ static MACHINE_CONFIG_START( decocpu1 )
MCFG_NVRAM_ADD_1FILL("nvram")
MACHINE_CONFIG_END
-static MACHINE_CONFIG_START( decocpu2 )
- MCFG_FRAGMENT_ADD(decocpu1)
-
- /* basic machine hardware */
- MCFG_CPU_MODIFY("maincpu")
- MCFG_CPU_PROGRAM_MAP(decocpu2_map)
-MACHINE_CONFIG_END
-
-machine_config_constructor decocpu_type1_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME( decocpu1 );
-}
-
ioport_constructor decocpu_type1_device::device_input_ports() const
{
return INPUT_PORTS_NAME( decocpu1 );
@@ -321,10 +308,13 @@ decocpu_type2_device::decocpu_type2_device(const machine_config &mconfig, device
: decocpu_type1_device(mconfig, type, tag, owner, clock)
{}
-machine_config_constructor decocpu_type2_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME( decocpu2 );
-}
+MACHINE_CONFIG_MEMBER( decocpu_type2_device::device_add_mconfig )
+ decocpu_type1_device::device_add_mconfig(config);
+
+ /* basic machine hardware */
+ MCFG_CPU_MODIFY("maincpu")
+ MCFG_CPU_PROGRAM_MAP(decocpu2_map)
+MACHINE_CONFIG_END
void decocpu_type2_device::device_start()
{
diff --git a/src/mame/machine/decopincpu.h b/src/mame/machine/decopincpu.h
index cb40d0b26f9..8e7cd21aab3 100644
--- a/src/mame/machine/decopincpu.h
+++ b/src/mame/machine/decopincpu.h
@@ -77,22 +77,6 @@ public:
template <class Object> void set_lamp_write_callback(Object &&cb) { m_write_lamp.set_callback(std::forward<Object>(cb)); }
template <class Object> void set_solenoid_write_callback(Object &&cb) { m_write_solenoid.set_callback(std::forward<Object>(cb)); }
- DECLARE_WRITE_LINE_MEMBER(cpu_pia_irq);
- DECLARE_WRITE_LINE_MEMBER(pia21_ca2_w);
- DECLARE_WRITE8_MEMBER(lamp0_w);
- DECLARE_WRITE8_MEMBER(lamp1_w);
- DECLARE_READ8_MEMBER(display_strobe_r);
- DECLARE_WRITE8_MEMBER(display_strobe_w);
- DECLARE_WRITE8_MEMBER(display_out1_w);
- DECLARE_WRITE8_MEMBER(display_out2_w);
- DECLARE_WRITE8_MEMBER(display_out3_w);
- DECLARE_WRITE8_MEMBER(display_out4_w);
- DECLARE_READ8_MEMBER(display_in3_r);
- DECLARE_WRITE8_MEMBER(switch_w);
- DECLARE_READ8_MEMBER(switch_r);
- DECLARE_READ8_MEMBER(dmdstatus_r);
- DECLARE_WRITE8_MEMBER(sound_w);
- DECLARE_WRITE8_MEMBER(solenoid1_w);
DECLARE_WRITE8_MEMBER(solenoid2_w);
INPUT_CHANGED_MEMBER(main_nmi);
INPUT_CHANGED_MEMBER(audio_nmi);
@@ -105,7 +89,7 @@ protected:
decocpu_type1_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);
// overrides
- virtual machine_config_constructor device_mconfig_additions() const override;
+ virtual void device_add_mconfig(machine_config &config) override;
virtual void device_start() override;
virtual ioport_constructor device_input_ports() const override;
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
@@ -133,6 +117,23 @@ private:
devcb_write8 m_write_switch;
devcb_write8 m_write_lamp;
devcb_write8 m_write_solenoid;
+
+ DECLARE_WRITE_LINE_MEMBER(cpu_pia_irq);
+ DECLARE_WRITE_LINE_MEMBER(pia21_ca2_w);
+ DECLARE_WRITE8_MEMBER(lamp0_w);
+ DECLARE_WRITE8_MEMBER(lamp1_w);
+ DECLARE_READ8_MEMBER(display_strobe_r);
+ DECLARE_WRITE8_MEMBER(display_strobe_w);
+ DECLARE_WRITE8_MEMBER(display_out1_w);
+ DECLARE_WRITE8_MEMBER(display_out2_w);
+ DECLARE_WRITE8_MEMBER(display_out3_w);
+ DECLARE_WRITE8_MEMBER(display_out4_w);
+ DECLARE_READ8_MEMBER(display_in3_r);
+ DECLARE_WRITE8_MEMBER(switch_w);
+ DECLARE_READ8_MEMBER(switch_r);
+ DECLARE_READ8_MEMBER(dmdstatus_r);
+ DECLARE_WRITE8_MEMBER(sound_w);
+ DECLARE_WRITE8_MEMBER(solenoid1_w);
};
class decocpu_type2_device : public decocpu_type1_device
@@ -144,7 +145,7 @@ protected:
decocpu_type2_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);
// overrides
- virtual machine_config_constructor device_mconfig_additions() const override;
+ virtual void device_add_mconfig(machine_config &config) override;
virtual void device_start() override;
};
diff --git a/src/mame/machine/dmv_keyb.cpp b/src/mame/machine/dmv_keyb.cpp
index 2d0e817fa1d..6bd7b835555 100644
--- a/src/mame/machine/dmv_keyb.cpp
+++ b/src/mame/machine/dmv_keyb.cpp
@@ -27,14 +27,6 @@ ROM_START( dmv_keyboard )
ROM_END
-static MACHINE_CONFIG_START( dmv_keyboard )
- MCFG_CPU_ADD("mcu", I8741, XTAL_6MHz)
- MCFG_MCS48_PORT_P1_IN_CB(READ8(dmv_keyboard_device, port1_r))
- MCFG_MCS48_PORT_P2_IN_CB(READ8(dmv_keyboard_device, port2_r))
- MCFG_MCS48_PORT_P2_OUT_CB(WRITE8(dmv_keyboard_device, port2_w))
-MACHINE_CONFIG_END
-
-
INPUT_PORTS_START( dmv_keyboard )
PORT_START("COL.0")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_RCONTROL) PORT_CHAR(UCHAR_MAMEKEY(RCONTROL))
@@ -232,14 +224,15 @@ void dmv_keyboard_device::device_reset()
}
//-------------------------------------------------
-// machine_config_additions - device-specific
-// machine configurations
+// device_add_mconfig - add device configuration
//-------------------------------------------------
-machine_config_constructor dmv_keyboard_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME( dmv_keyboard );
-}
+MACHINE_CONFIG_MEMBER( dmv_keyboard_device::device_add_mconfig )
+ MCFG_CPU_ADD("mcu", I8741, XTAL_6MHz)
+ MCFG_MCS48_PORT_P1_IN_CB(READ8(dmv_keyboard_device, port1_r))
+ MCFG_MCS48_PORT_P2_IN_CB(READ8(dmv_keyboard_device, port2_r))
+ MCFG_MCS48_PORT_P2_OUT_CB(WRITE8(dmv_keyboard_device, port2_w))
+MACHINE_CONFIG_END
//-------------------------------------------------
diff --git a/src/mame/machine/dmv_keyb.h b/src/mame/machine/dmv_keyb.h
index 6411b39ed1b..a572133448d 100644
--- a/src/mame/machine/dmv_keyb.h
+++ b/src/mame/machine/dmv_keyb.h
@@ -35,23 +35,19 @@ public:
// construction/destruction
dmv_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- // optional information overrides
- virtual const tiny_rom_entry *device_rom_region() const override;
- virtual machine_config_constructor device_mconfig_additions() const override;
- virtual ioport_constructor device_input_ports() const override;
-
DECLARE_WRITE_LINE_MEMBER(sd_poll_w);
DECLARE_READ_LINE_MEMBER(sd_poll_r);
- DECLARE_READ8_MEMBER( port1_r );
- DECLARE_READ8_MEMBER( port2_r );
- DECLARE_WRITE8_MEMBER( port2_w );
-
protected:
// device-level overrides
virtual void device_start() override;
virtual void device_reset() override;
+ // optional information overrides
+ virtual const tiny_rom_entry *device_rom_region() const override;
+ virtual void device_add_mconfig(machine_config &config) override;
+ virtual ioport_constructor device_input_ports() const override;
+
private:
required_device<upi41_cpu_device> m_maincpu;
required_ioport_array<16> m_keyboard;
@@ -59,6 +55,10 @@ private:
uint8_t m_col;
int m_sd_data_state;
int m_sd_poll_state;
+
+ DECLARE_READ8_MEMBER( port1_r );
+ DECLARE_READ8_MEMBER( port2_r );
+ DECLARE_WRITE8_MEMBER( port2_w );
};
diff --git a/src/mame/machine/egret.cpp b/src/mame/machine/egret.cpp
index 7a52caa50b8..2b6834b8cc7 100644
--- a/src/mame/machine/egret.cpp
+++ b/src/mame/machine/egret.cpp
@@ -78,26 +78,16 @@ static ADDRESS_MAP_START( egret_map, AS_PROGRAM, 8, egret_device )
AM_RANGE(0x0f00, 0x1fff) AM_ROM AM_REGION(EGRET_CPU_TAG, 0)
ADDRESS_MAP_END
+
//-------------------------------------------------
-// MACHINE_CONFIG
+// device_add_mconfig - add device configuration
//-------------------------------------------------
-static MACHINE_CONFIG_START( egret )
+MACHINE_CONFIG_MEMBER( egret_device::device_add_mconfig )
MCFG_CPU_ADD(EGRET_CPU_TAG, M68HC05EG, XTAL_32_768kHz*192) // 32.768 kHz input clock, can be PLL'ed to x128 = 4.1 MHz under s/w control
MCFG_CPU_PROGRAM_MAP(egret_map)
MACHINE_CONFIG_END
-
-//-------------------------------------------------
-// machine_config_additions - device-specific
-// machine configurations
-//-------------------------------------------------
-
-machine_config_constructor egret_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME( egret );
-}
-
const tiny_rom_entry *egret_device::device_rom_region() const
{
return ROM_NAME( egret );
diff --git a/src/mame/machine/egret.h b/src/mame/machine/egret.h
index 742c3e47929..80f5ecf74e0 100644
--- a/src/mame/machine/egret.h
+++ b/src/mame/machine/egret.h
@@ -105,7 +105,7 @@ protected:
// device-level overrides
virtual void device_start() override;
virtual void device_reset() override;
- virtual machine_config_constructor device_mconfig_additions() const override;
+ virtual void device_add_mconfig(machine_config &config) override;
virtual const tiny_rom_entry *device_rom_region() const override;
required_device<cpu_device> m_maincpu;
diff --git a/src/mame/machine/esqlcd.cpp b/src/mame/machine/esqlcd.cpp
index beb524aa863..b125237950a 100644
--- a/src/mame/machine/esqlcd.cpp
+++ b/src/mame/machine/esqlcd.cpp
@@ -13,9 +13,6 @@
DEFINE_DEVICE_TYPE(ESQ2X16_SQ1, esq2x16_sq1_device, "esq2x16_sq1", "Ensoniq 2x16 VFD (SQ-1 variant)")
// --- SQ1 - Parduz --------------------------------------------------------------------------------------------------------------------------
-static MACHINE_CONFIG_START(esq2x16)
- MCFG_DEFAULT_LAYOUT(layout_esq2by16)
-MACHINE_CONFIG_END
/*! \file font5x7.h \brief Graphic LCD Font (Ascii Characters). */
//*****************************************************************************
@@ -163,10 +160,11 @@ static unsigned char const Font5x7[][5] = {
{0x08, 0x1C, 0x2A, 0x08, 0x08} // <- 0x7F
};
//--------------------------------------------------------------------------------------------------------------------------------------------
-machine_config_constructor esq2x16_sq1_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME( esq2x16 );
-}
+
+MACHINE_CONFIG_MEMBER(esq2x16_sq1_device::device_add_mconfig)
+ MCFG_DEFAULT_LAYOUT(layout_esq2by16)
+MACHINE_CONFIG_END
+
//--------------------------------------------------------------------------------------------------------------------------------------------
void esq2x16_sq1_device::write_char(int data)
{
diff --git a/src/mame/machine/esqlcd.h b/src/mame/machine/esqlcd.h
index 967c64af07f..eb5e09f6bff 100644
--- a/src/mame/machine/esqlcd.h
+++ b/src/mame/machine/esqlcd.h
@@ -24,7 +24,7 @@ public:
virtual void update_display() override;
protected:
- virtual machine_config_constructor device_mconfig_additions() const override;
+ virtual void device_add_mconfig(machine_config &config) override;
virtual void device_reset() override;
uint8_t m_lcdpg[4][32];
diff --git a/src/mame/machine/esqpanel.cpp b/src/mame/machine/esqpanel.cpp
index 5df6d26da71..57e4a873936 100644
--- a/src/mame/machine/esqpanel.cpp
+++ b/src/mame/machine/esqpanel.cpp
@@ -200,14 +200,10 @@ void esqpanel_device::set_analog_value(offs_t offset, uint16_t value)
/* panel with 1x22 VFD display used in the EPS-16 and EPS-16 Plus */
-static MACHINE_CONFIG_START(esqpanel1x22)
+MACHINE_CONFIG_MEMBER(esqpanel1x22_device::device_add_mconfig)
MCFG_ESQ1X22_ADD("vfd")
MACHINE_CONFIG_END
-machine_config_constructor esqpanel1x22_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME( esqpanel1x22 );
-}
esqpanel1x22_device::esqpanel1x22_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
esqpanel_device(mconfig, ESQPANEL1X22, tag, owner, clock),
@@ -218,14 +214,10 @@ esqpanel1x22_device::esqpanel1x22_device(const machine_config &mconfig, const ch
/* panel with 2x40 VFD display used in the ESQ-1, VFX-SD, SD-1, and others */
-static MACHINE_CONFIG_START(esqpanel2x40)
+MACHINE_CONFIG_MEMBER(esqpanel2x40_device::device_add_mconfig)
MCFG_ESQ2X40_ADD("vfd")
MACHINE_CONFIG_END
-machine_config_constructor esqpanel2x40_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME( esqpanel2x40 );
-}
esqpanel2x40_device::esqpanel2x40_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
esqpanel_device(mconfig, ESQPANEL2X40, tag, owner, clock),
@@ -235,14 +227,10 @@ esqpanel2x40_device::esqpanel2x40_device(const machine_config &mconfig, const ch
}
// --- SQ1 - Parduz --------------------------------------------------------------------------------------------------------------------------
-static MACHINE_CONFIG_START(esqpanel2x16_sq1)
+MACHINE_CONFIG_MEMBER(esqpanel2x16_sq1_device::device_add_mconfig)
MCFG_ESQ2X16_SQ1_ADD("vfd")
MACHINE_CONFIG_END
-// --- SQ1 - Parduz --------------------------------------------------------------------------------------------------------------------------
-machine_config_constructor esqpanel2x16_sq1_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME( esqpanel2x16_sq1 );
-}
+
// --- SQ1 - Parduz --------------------------------------------------------------------------------------------------------------------------
esqpanel2x16_sq1_device::esqpanel2x16_sq1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
esqpanel_device(mconfig, ESQPANEL2X16_SQ1, tag, owner, clock),
diff --git a/src/mame/machine/esqpanel.h b/src/mame/machine/esqpanel.h
index 2a2352507a4..4886da2a1a2 100644
--- a/src/mame/machine/esqpanel.h
+++ b/src/mame/machine/esqpanel.h
@@ -96,7 +96,7 @@ public:
esqpanel1x22_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
protected:
- virtual machine_config_constructor device_mconfig_additions() const override;
+ virtual void device_add_mconfig(machine_config &config) override;
virtual void send_to_display(uint8_t data) override { m_vfd->write_char(data); }
@@ -108,7 +108,7 @@ public:
esqpanel2x40_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
protected:
- virtual machine_config_constructor device_mconfig_additions() const override;
+ virtual void device_add_mconfig(machine_config &config) override;
virtual void send_to_display(uint8_t data) override { m_vfd->write_char(data); }
@@ -120,7 +120,7 @@ public:
esqpanel2x40_sq1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
protected:
- virtual machine_config_constructor device_mconfig_additions() const override;
+ virtual void device_add_mconfig(machine_config &config) override;
virtual void send_to_display(uint8_t data) override { m_vfd->write_char(data); }
@@ -133,7 +133,7 @@ public:
esqpanel2x16_sq1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
protected:
- virtual machine_config_constructor device_mconfig_additions() const override;
+ virtual void device_add_mconfig(machine_config &config) override;
virtual void send_to_display(uint8_t data) override { m_vfd->write_char(data); }
diff --git a/src/mame/machine/esqvfd.cpp b/src/mame/machine/esqvfd.cpp
index 88038c8af54..dd627f2b3fb 100644
--- a/src/mame/machine/esqvfd.cpp
+++ b/src/mame/machine/esqvfd.cpp
@@ -191,15 +191,10 @@ void esqvfd_device::update_display()
/* 2x40 VFD display used in the ESQ-1, VFX-SD, SD-1, and others */
-static MACHINE_CONFIG_START(esq2x40)
+MACHINE_CONFIG_MEMBER(esq2x40_device::device_add_mconfig)
MCFG_DEFAULT_LAYOUT(layout_esq2by40)
MACHINE_CONFIG_END
-machine_config_constructor esq2x40_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME( esq2x40 );
-}
-
void esq2x40_device::write_char(int data)
{
// ESQ-1 sends (cursor move) 0xfa 0xYY to mark YY characters as underlined at the current cursor location
@@ -291,14 +286,10 @@ esq2x40_device::esq2x40_device(const machine_config &mconfig, const char *tag, d
/* 1x22 display from the VFX (not right, but it'll do for now) */
-static MACHINE_CONFIG_START(esq1x22)
+MACHINE_CONFIG_MEMBER(esq1x22_device::device_add_mconfig)
MCFG_DEFAULT_LAYOUT(layout_esq1by22)
MACHINE_CONFIG_END
-machine_config_constructor esq1x22_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME( esq1x22 );
-}
void esq1x22_device::write_char(int data)
{
@@ -343,10 +334,9 @@ esq1x22_device::esq1x22_device(const machine_config &mconfig, const char *tag, d
}
/* SQ-1 display, I think it's really an LCD but we'll deal with it for now */
-machine_config_constructor esq2x40_sq1_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME( esq2x40 ); // we use the normal 2x40 layout
-}
+MACHINE_CONFIG_MEMBER(esq2x40_sq1_device::device_add_mconfig)
+ MCFG_DEFAULT_LAYOUT(layout_esq2by40) // we use the normal 2x40 layout
+MACHINE_CONFIG_END
void esq2x40_sq1_device::write_char(int data)
{
diff --git a/src/mame/machine/esqvfd.h b/src/mame/machine/esqvfd.h
index ac70201defc..99e1e6c00eb 100644
--- a/src/mame/machine/esqvfd.h
+++ b/src/mame/machine/esqvfd.h
@@ -61,7 +61,7 @@ public:
virtual void write_char(int data) override;
protected:
- virtual machine_config_constructor device_mconfig_additions() const override;
+ virtual void device_add_mconfig(machine_config &config) override;
private:
};
@@ -73,7 +73,7 @@ public:
virtual void write_char(int data) override;
protected:
- virtual machine_config_constructor device_mconfig_additions() const override;
+ virtual void device_add_mconfig(machine_config &config) override;
};
class esq2x40_sq1_device : public esqvfd_device {
@@ -83,7 +83,7 @@ public:
virtual void write_char(int data) override;
protected:
- virtual machine_config_constructor device_mconfig_additions() const override;
+ virtual void device_add_mconfig(machine_config &config) override;
private:
bool m_wait87shift, m_wait88shift;
diff --git a/src/mame/machine/ibm6580_fdc.cpp b/src/mame/machine/ibm6580_fdc.cpp
index f5b77cdf7e1..6a188c90a73 100644
--- a/src/mame/machine/ibm6580_fdc.cpp
+++ b/src/mame/machine/ibm6580_fdc.cpp
@@ -32,7 +32,7 @@ const tiny_rom_entry *dw_fdc_device::device_rom_region() const
return ROM_NAME( dw_fdc );
}
-static MACHINE_CONFIG_START( dw_fdc )
+MACHINE_CONFIG_MEMBER( dw_fdc_device::device_add_mconfig )
MCFG_CPU_ADD("mcu", I8048, XTAL_24MHz/4) // divisor is unverified
// MCFG_MCS48_PORT_BUS_IN_CB(READ8(dw_fdc_device, bus_r))
// MCFG_MCS48_PORT_BUS_OUT_CB(WRITE8(dw_fdc_device, bus_w))
@@ -50,10 +50,6 @@ static MACHINE_CONFIG_START( dw_fdc )
// MCFG_FLOPPY_DRIVE_ADD(UPD765_TAG ":1", wangpc_floppies, "525dd", wangpc_state::floppy_formats)
MACHINE_CONFIG_END
-machine_config_constructor dw_fdc_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME( dw_fdc );
-}
dw_fdc_device::dw_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, DW_FDC, tag, owner, clock)
diff --git a/src/mame/machine/ibm6580_fdc.h b/src/mame/machine/ibm6580_fdc.h
index b76562a9357..1e62fbf8fd5 100644
--- a/src/mame/machine/ibm6580_fdc.h
+++ b/src/mame/machine/ibm6580_fdc.h
@@ -28,23 +28,17 @@ public:
template <class Object> static devcb_base &set_out_clock_handler(device_t &device, Object &&cb) { return downcast<dw_fdc_device &>(device).m_out_clock.set_callback(std::forward<Object>(cb)); }
template <class Object> static devcb_base &set_out_strobe_handler(device_t &device, Object &&cb) { return downcast<dw_fdc_device &>(device).m_out_strobe.set_callback(std::forward<Object>(cb)); }
+ DECLARE_WRITE_LINE_MEMBER(reset_w);
+ DECLARE_WRITE_LINE_MEMBER(ack_w);
+
+protected:
virtual const tiny_rom_entry *device_rom_region() const override;
- virtual machine_config_constructor device_mconfig_additions() const override;
+ virtual void device_add_mconfig(machine_config &config) override;
void device_start() override;
void device_reset() override;
void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
- DECLARE_WRITE8_MEMBER(bus_w);
- DECLARE_READ8_MEMBER(bus_r);
- DECLARE_WRITE8_MEMBER(p1_w);
- DECLARE_WRITE8_MEMBER(p2_w);
- DECLARE_READ8_MEMBER(p2_r);
- DECLARE_READ_LINE_MEMBER(t0_r);
- DECLARE_READ_LINE_MEMBER(t1_r);
- DECLARE_WRITE_LINE_MEMBER(reset_w);
- DECLARE_WRITE_LINE_MEMBER(ack_w);
-
private:
uint8_t m_bus, m_t0, m_t1, m_p1, m_p2;
emu_timer *m_reset_timer;
@@ -53,6 +47,14 @@ private:
devcb_write_line m_out_clock;
devcb_write_line m_out_strobe;
required_device<cpu_device> m_mcu;
+
+ DECLARE_WRITE8_MEMBER(bus_w);
+ DECLARE_READ8_MEMBER(bus_r);
+ DECLARE_WRITE8_MEMBER(p1_w);
+ DECLARE_WRITE8_MEMBER(p2_w);
+ DECLARE_READ8_MEMBER(p2_r);
+ DECLARE_READ_LINE_MEMBER(t0_r);
+ DECLARE_READ_LINE_MEMBER(t1_r);
};
DECLARE_DEVICE_TYPE(DW_FDC, dw_fdc_device)
diff --git a/src/mame/machine/ibm6580_kbd.cpp b/src/mame/machine/ibm6580_kbd.cpp
index 73f9b6d7519..51ced305773 100644
--- a/src/mame/machine/ibm6580_kbd.cpp
+++ b/src/mame/machine/ibm6580_kbd.cpp
@@ -32,7 +32,7 @@ const tiny_rom_entry *dw_keyboard_device::device_rom_region() const
return ROM_NAME( dw_keyboard );
}
-static MACHINE_CONFIG_START( dw_keyboard )
+MACHINE_CONFIG_MEMBER( dw_keyboard_device::device_add_mconfig )
MCFG_CPU_ADD("mcu", I8049, XTAL_6MHz) // XXX RC oscillator
MCFG_MCS48_PORT_BUS_IN_CB(READ8(dw_keyboard_device, bus_r))
MCFG_MCS48_PORT_BUS_OUT_CB(WRITE8(dw_keyboard_device, bus_w))
@@ -43,10 +43,6 @@ static MACHINE_CONFIG_START( dw_keyboard )
MCFG_MCS48_PORT_T1_IN_CB(READLINE(dw_keyboard_device, t1_r))
MACHINE_CONFIG_END
-machine_config_constructor dw_keyboard_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME( dw_keyboard );
-}
INPUT_PORTS_START( dw_keyboard )
/*
diff --git a/src/mame/machine/ibm6580_kbd.h b/src/mame/machine/ibm6580_kbd.h
index b5e583ea7bc..fcdb6064598 100644
--- a/src/mame/machine/ibm6580_kbd.h
+++ b/src/mame/machine/ibm6580_kbd.h
@@ -24,24 +24,18 @@ public:
template <class Object> static devcb_base &set_out_clock_handler(device_t &device, Object &&cb) { return downcast<dw_keyboard_device &>(device).m_out_clock.set_callback(std::forward<Object>(cb)); }
template <class Object> static devcb_base &set_out_strobe_handler(device_t &device, Object &&cb) { return downcast<dw_keyboard_device &>(device).m_out_strobe.set_callback(std::forward<Object>(cb)); }
+ DECLARE_WRITE_LINE_MEMBER(reset_w);
+ DECLARE_WRITE_LINE_MEMBER(ack_w);
+
+protected:
virtual const tiny_rom_entry *device_rom_region() const override;
- virtual machine_config_constructor device_mconfig_additions() const override;
+ virtual void device_add_mconfig(machine_config &config) override;
virtual ioport_constructor device_input_ports() const override;
void device_start() override;
void device_reset() override;
void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
- DECLARE_WRITE8_MEMBER(bus_w);
- DECLARE_READ8_MEMBER(bus_r);
- DECLARE_WRITE8_MEMBER(p1_w);
- DECLARE_WRITE8_MEMBER(p2_w);
- DECLARE_READ8_MEMBER(p2_r);
- DECLARE_READ_LINE_MEMBER(t0_r);
- DECLARE_READ_LINE_MEMBER(t1_r);
- DECLARE_WRITE_LINE_MEMBER(reset_w);
- DECLARE_WRITE_LINE_MEMBER(ack_w);
-
private:
uint8_t m_dip, m_bus, m_p2;
int m_drive, m_sense;
@@ -53,6 +47,14 @@ private:
devcb_write_line m_out_clock;
devcb_write_line m_out_strobe;
required_device<cpu_device> m_mcu;
+
+ DECLARE_WRITE8_MEMBER(bus_w);
+ DECLARE_READ8_MEMBER(bus_r);
+ DECLARE_WRITE8_MEMBER(p1_w);
+ DECLARE_WRITE8_MEMBER(p2_w);
+ DECLARE_READ8_MEMBER(p2_r);
+ DECLARE_READ_LINE_MEMBER(t0_r);
+ DECLARE_READ_LINE_MEMBER(t1_r);
};
DECLARE_DEVICE_TYPE(DW_KEYBOARD, dw_keyboard_device)
diff --git a/src/mame/machine/inder_sb.cpp b/src/mame/machine/inder_sb.cpp
index 49f73bc020a..958672dbe48 100644
--- a/src/mame/machine/inder_sb.cpp
+++ b/src/mame/machine/inder_sb.cpp
@@ -206,8 +206,7 @@ static ADDRESS_MAP_START( sound_io, AS_IO, 8, inder_sb_device )
ADDRESS_MAP_END
-
-static MACHINE_CONFIG_START( inder_sb )
+MACHINE_CONFIG_MEMBER( inder_sb_device::device_add_mconfig )
MCFG_CPU_ADD("audiocpu", Z80, 8000000) // unk freq
MCFG_Z80_DAISY_CHAIN(daisy_chain)
MCFG_CPU_PROGRAM_MAP(sound_map)
@@ -237,10 +236,6 @@ static MACHINE_CONFIG_START( inder_sb )
MCFG_SOUND_ROUTE_EX(0, "dac3vol", 1.0, DAC_VREF_POS_INPUT)
MACHINE_CONFIG_END
-machine_config_constructor inder_sb_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME( inder_sb );
-}
void inder_sb_device::device_start()
{
diff --git a/src/mame/machine/inder_sb.h b/src/mame/machine/inder_sb.h
index 939e509bbe3..621fe5eaf3f 100644
--- a/src/mame/machine/inder_sb.h
+++ b/src/mame/machine/inder_sb.h
@@ -39,11 +39,6 @@ public:
DECLARE_WRITE8_MEMBER(dac2_rombank_write);
DECLARE_WRITE8_MEMBER(dac3_rombank_write);
- DECLARE_WRITE_LINE_MEMBER(z80ctc_ch0);
- DECLARE_WRITE_LINE_MEMBER(z80ctc_ch1);
- DECLARE_WRITE_LINE_MEMBER(z80ctc_ch2);
- DECLARE_WRITE_LINE_MEMBER(z80ctc_ch3);
-
DECLARE_READ8_MEMBER(megaphx_02cc_hack_r);
DECLARE_READ8_MEMBER(megaphx_02e6_hack_r);
DECLARE_READ8_MEMBER(megaphx_0309_hack_r);
@@ -57,12 +52,10 @@ public:
void update_sound_irqs(void);
protected:
- virtual machine_config_constructor device_mconfig_additions() const override;
+ virtual void device_add_mconfig(machine_config &config) override;
virtual void device_start() override;
virtual void device_reset() override;
-
-
private:
uint8_t m_soundbank[4];
@@ -71,6 +64,11 @@ private:
uint8_t m_soundback;
int m_soundirq;
+
+ DECLARE_WRITE_LINE_MEMBER(z80ctc_ch0);
+ DECLARE_WRITE_LINE_MEMBER(z80ctc_ch1);
+ DECLARE_WRITE_LINE_MEMBER(z80ctc_ch2);
+ DECLARE_WRITE_LINE_MEMBER(z80ctc_ch3);
};
#endif // MAME_MACHINE_INDER_SB_H
diff --git a/src/mame/machine/inder_vid.cpp b/src/mame/machine/inder_vid.cpp
index 78262161f18..70fa83bfc03 100644
--- a/src/mame/machine/inder_vid.cpp
+++ b/src/mame/machine/inder_vid.cpp
@@ -88,7 +88,7 @@ static ADDRESS_MAP_START( ramdac_map, AS_0, 8, inder_vid_device )
AM_RANGE(0x000, 0x3ff) AM_DEVREADWRITE("ramdac",ramdac_device,ramdac_pal_r,ramdac_rgb888_w)
ADDRESS_MAP_END
-static MACHINE_CONFIG_START( inder_vid )
+MACHINE_CONFIG_MEMBER( inder_vid_device::device_add_mconfig )
MCFG_CPU_ADD("tms", TMS34010, XTAL_40MHz)
MCFG_CPU_PROGRAM_MAP(megaphx_tms_map)
MCFG_TMS340X0_HALT_ON_RESET(true) /* halt on reset */
@@ -103,7 +103,6 @@ static MACHINE_CONFIG_START( inder_vid )
MCFG_SCREEN_RAW_PARAMS(XTAL_40MHz/12, 424, 0, 338-1, 262, 0, 246-1)
MCFG_SCREEN_UPDATE_DEVICE("tms", tms34010_device, tms340x0_rgb32)
-
MCFG_PALETTE_ADD("palette", 256)
MCFG_RAMDAC_ADD("ramdac", ramdac_map, "palette")
@@ -111,10 +110,6 @@ static MACHINE_CONFIG_START( inder_vid )
MACHINE_CONFIG_END
-machine_config_constructor inder_vid_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME( inder_vid );
-}
void inder_vid_device::device_start()
{
diff --git a/src/mame/machine/inder_vid.h b/src/mame/machine/inder_vid.h
index 5bb62591d15..5be0ea3e56d 100644
--- a/src/mame/machine/inder_vid.h
+++ b/src/mame/machine/inder_vid.h
@@ -28,14 +28,8 @@ public:
// construction/destruction
inder_vid_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- DECLARE_WRITE_LINE_MEMBER(m68k_gen_int);
-
- TMS340X0_TO_SHIFTREG_CB_MEMBER(to_shiftreg);
- TMS340X0_FROM_SHIFTREG_CB_MEMBER(from_shiftreg);
- TMS340X0_SCANLINE_RGB32_CB_MEMBER(scanline);
-
protected:
- virtual machine_config_constructor device_mconfig_additions() const override;
+ virtual void device_add_mconfig(machine_config &config) override;
virtual void device_start() override;
virtual void device_reset() override;
@@ -45,6 +39,12 @@ private:
required_device<tms34010_device> m_tms;
int m_shiftfull; // this might be a driver specific hack for a TMS bug.
+
+ DECLARE_WRITE_LINE_MEMBER(m68k_gen_int);
+
+ TMS340X0_TO_SHIFTREG_CB_MEMBER(to_shiftreg);
+ TMS340X0_FROM_SHIFTREG_CB_MEMBER(from_shiftreg);
+ TMS340X0_SCANLINE_RGB32_CB_MEMBER(scanline);
};
#endif // MAME_MACHINE_INDER_VID_H
diff --git a/src/mame/machine/isbc_208.cpp b/src/mame/machine/isbc_208.cpp
index 82f90e2d0d8..b21f6986805 100644
--- a/src/mame/machine/isbc_208.cpp
+++ b/src/mame/machine/isbc_208.cpp
@@ -28,7 +28,7 @@ static SLOT_INTERFACE_START( isbc_208_floppies )
SLOT_INTERFACE( "525dd", FLOPPY_525_DD )
SLOT_INTERFACE_END
-static MACHINE_CONFIG_START( isbc_208 )
+MACHINE_CONFIG_MEMBER( isbc_208_device::device_add_mconfig )
MCFG_DEVICE_ADD("dmac", AM9517A, XTAL_8MHz/4)
MCFG_I8237_OUT_HREQ_CB(WRITELINE(isbc_208_device, hreq_w))
MCFG_I8237_OUT_EOP_CB(WRITELINE(isbc_208_device, out_eop_w))
@@ -50,10 +50,6 @@ DEVICE_ADDRESS_MAP_START( map, 8, isbc_208_device )
AM_RANGE(0x12, 0x15) AM_READWRITE(stat_r, aux_w)
ADDRESS_MAP_END
-machine_config_constructor isbc_208_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME( isbc_208 );
-}
WRITE_LINE_MEMBER(isbc_208_device::out_eop_w)
{
diff --git a/src/mame/machine/isbc_208.h b/src/mame/machine/isbc_208.h
index 0611cbe0007..04ff15df4fb 100644
--- a/src/mame/machine/isbc_208.h
+++ b/src/mame/machine/isbc_208.h
@@ -14,16 +14,9 @@ class isbc_208_device : public device_t
public:
isbc_208_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- virtual machine_config_constructor device_mconfig_additions() const override;
DECLARE_ADDRESS_MAP(map, 8);
DECLARE_READ8_MEMBER(stat_r);
DECLARE_WRITE8_MEMBER(aux_w);
- DECLARE_WRITE_LINE_MEMBER(out_eop_w);
- DECLARE_WRITE_LINE_MEMBER(hreq_w);
- DECLARE_READ8_MEMBER(dma_read_byte);
- DECLARE_WRITE8_MEMBER(dma_write_byte);
- DECLARE_WRITE_LINE_MEMBER(irq_w);
- DECLARE_FLOPPY_FORMATS( floppy_formats );
template <class Object> static devcb_base &static_set_irq_callback(device_t &device, Object &&cb) { return downcast<isbc_208_device &>(device).m_out_irq_func.set_callback(std::forward<Object>(cb)); }
static void static_set_maincpu_tag(device_t &device, const char *maincpu_tag) { downcast<isbc_208_device &>(device).m_maincpu_tag = maincpu_tag; }
@@ -31,6 +24,7 @@ public:
protected:
virtual void device_start() override;
virtual void device_reset() override;
+ virtual void device_add_mconfig(machine_config &config) override;
private:
required_device<am9517a_device> m_dmac;
@@ -41,6 +35,13 @@ private:
u16 m_seg;
const char *m_maincpu_tag;
address_space *m_maincpu_mem;
+
+ DECLARE_WRITE_LINE_MEMBER(out_eop_w);
+ DECLARE_WRITE_LINE_MEMBER(hreq_w);
+ DECLARE_READ8_MEMBER(dma_read_byte);
+ DECLARE_WRITE8_MEMBER(dma_write_byte);
+ DECLARE_WRITE_LINE_MEMBER(irq_w);
+ DECLARE_FLOPPY_FORMATS( floppy_formats );
};
#define MCFG_ISBC_208_MAINCPU(_maincpu_tag) \
isbc_208_device::static_set_maincpu_tag(*device, _maincpu_tag);
diff --git a/src/mame/machine/isbc_215g.cpp b/src/mame/machine/isbc_215g.cpp
index 93fada6486f..cfb600e4730 100644
--- a/src/mame/machine/isbc_215g.cpp
+++ b/src/mame/machine/isbc_215g.cpp
@@ -350,7 +350,7 @@ WRITE_LINE_MEMBER(isbc_215g_device::isbx_irq_11_w)
m_isbx_irq[3] = state ? true : false;
}
-static MACHINE_CONFIG_START( isbc_215g )
+MACHINE_CONFIG_MEMBER( isbc_215g_device::device_add_mconfig )
MCFG_CPU_ADD("u84", I8089, XTAL_15MHz / 3)
MCFG_CPU_PROGRAM_MAP(isbc_215g_mem)
MCFG_CPU_IO_MAP(isbc_215g_io)
@@ -367,10 +367,6 @@ static MACHINE_CONFIG_START( isbc_215g )
MCFG_ISBX_SLOT_MINTR1_CALLBACK(WRITELINE(isbc_215g_device, isbx_irq_11_w))
MACHINE_CONFIG_END
-machine_config_constructor isbc_215g_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME( isbc_215g );
-}
ROM_START( isbc_215g )
ROM_REGION( 0x4000, "i8089", ROMREGION_ERASEFF )
diff --git a/src/mame/machine/isbc_215g.h b/src/mame/machine/isbc_215g.h
index 70695e91990..d22d9f36cc5 100644
--- a/src/mame/machine/isbc_215g.h
+++ b/src/mame/machine/isbc_215g.h
@@ -15,20 +15,12 @@ class isbc_215g_device : public device_t
public:
isbc_215g_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- virtual machine_config_constructor device_mconfig_additions() const override;
- const tiny_rom_entry *device_rom_region() const override;
-
DECLARE_WRITE8_MEMBER(write);
DECLARE_READ16_MEMBER(io_r);
DECLARE_WRITE16_MEMBER(io_w);
DECLARE_READ16_MEMBER(mem_r);
DECLARE_WRITE16_MEMBER(mem_w);
- DECLARE_WRITE_LINE_MEMBER(isbx_irq_00_w);
- DECLARE_WRITE_LINE_MEMBER(isbx_irq_01_w);
- DECLARE_WRITE_LINE_MEMBER(isbx_irq_10_w);
- DECLARE_WRITE_LINE_MEMBER(isbx_irq_11_w);
-
static void static_set_wakeup_addr(device_t &device, uint32_t wakeup) { downcast<isbc_215g_device &>(device).m_wakeup = wakeup; }
static void static_set_maincpu_tag(device_t &device, const char *maincpu_tag) { downcast<isbc_215g_device &>(device).m_maincpu_tag = maincpu_tag; }
template<class _Object> static devcb_base &static_set_irq_callback(device_t &device, _Object object) { return downcast<isbc_215g_device &>(device).m_out_irq_func.set_callback(object); }
@@ -36,6 +28,8 @@ public:
protected:
virtual void device_start() override;
virtual void device_reset() override;
+ virtual void device_add_mconfig(machine_config &config) override;
+ const tiny_rom_entry *device_rom_region() const override;
private:
void find_sector();
@@ -63,6 +57,11 @@ private:
bool m_isbx_irq[4], m_fdctc, m_step, m_format;
const struct hard_disk_info* m_geom[2];
+
+ DECLARE_WRITE_LINE_MEMBER(isbx_irq_00_w);
+ DECLARE_WRITE_LINE_MEMBER(isbx_irq_01_w);
+ DECLARE_WRITE_LINE_MEMBER(isbx_irq_10_w);
+ DECLARE_WRITE_LINE_MEMBER(isbx_irq_11_w);
};
#define MCFG_ISBC_215_ADD(_tag, _wakeup, _maincpu_tag) \
diff --git a/src/mame/machine/iteagle_fpga.cpp b/src/mame/machine/iteagle_fpga.cpp
index bdaa6c2f4bd..a28d37c22f1 100644
--- a/src/mame/machine/iteagle_fpga.cpp
+++ b/src/mame/machine/iteagle_fpga.cpp
@@ -17,26 +17,6 @@
DEFINE_DEVICE_TYPE(ITEAGLE_FPGA, iteagle_fpga_device, "iteagle_fpga", "ITEagle FPGA")
-MACHINE_CONFIG_START(iteagle_fpga)
- MCFG_NVRAM_ADD_0FILL("eagle2_rtc")
- // RS232 serial ports
- // The console terminal (com1) operates at 38400 baud
- MCFG_SCC85C30_ADD(AM85C30_TAG, XTAL_7_3728MHz, XTAL_7_3728MHz, 0, XTAL_7_3728MHz, 0)
- MCFG_Z80SCC_OUT_INT_CB(WRITELINE(iteagle_fpga_device, serial_interrupt))
- MCFG_Z80SCC_OUT_TXDA_CB(DEVWRITELINE(COM2_TAG, rs232_port_device, write_txd))
- MCFG_Z80SCC_OUT_TXDB_CB(DEVWRITELINE(COM1_TAG, rs232_port_device, write_txd))
-
- MCFG_RS232_PORT_ADD(COM1_TAG, default_rs232_devices, nullptr)
- MCFG_RS232_RXD_HANDLER(DEVWRITELINE(AM85C30_TAG, scc85c30_device, rxb_w))
- MCFG_RS232_DCD_HANDLER(DEVWRITELINE(AM85C30_TAG, scc85c30_device, dcdb_w))
- MCFG_RS232_CTS_HANDLER(DEVWRITELINE(AM85C30_TAG, scc85c30_device, ctsb_w))
-
- MCFG_RS232_PORT_ADD(COM2_TAG, default_rs232_devices, nullptr)
- MCFG_RS232_RXD_HANDLER(DEVWRITELINE(AM85C30_TAG, scc85c30_device, rxa_w))
- MCFG_RS232_DCD_HANDLER(DEVWRITELINE(AM85C30_TAG, scc85c30_device, dcda_w))
- MCFG_RS232_CTS_HANDLER(DEVWRITELINE(AM85C30_TAG, scc85c30_device, ctsa_w))
-MACHINE_CONFIG_END
-
DEVICE_ADDRESS_MAP_START(fpga_map, 32, iteagle_fpga_device)
AM_RANGE(0x000, 0x01f) AM_READWRITE(fpga_r, fpga_w)
ADDRESS_MAP_END
@@ -55,10 +35,25 @@ iteagle_fpga_device::iteagle_fpga_device(const machine_config &mconfig, const ch
{
}
-machine_config_constructor iteagle_fpga_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME(iteagle_fpga);
-}
+MACHINE_CONFIG_MEMBER(iteagle_fpga_device::device_add_mconfig)
+ MCFG_NVRAM_ADD_0FILL("eagle2_rtc")
+ // RS232 serial ports
+ // The console terminal (com1) operates at 38400 baud
+ MCFG_SCC85C30_ADD(AM85C30_TAG, XTAL_7_3728MHz, XTAL_7_3728MHz, 0, XTAL_7_3728MHz, 0)
+ MCFG_Z80SCC_OUT_INT_CB(WRITELINE(iteagle_fpga_device, serial_interrupt))
+ MCFG_Z80SCC_OUT_TXDA_CB(DEVWRITELINE(COM2_TAG, rs232_port_device, write_txd))
+ MCFG_Z80SCC_OUT_TXDB_CB(DEVWRITELINE(COM1_TAG, rs232_port_device, write_txd))
+
+ MCFG_RS232_PORT_ADD(COM1_TAG, default_rs232_devices, nullptr)
+ MCFG_RS232_RXD_HANDLER(DEVWRITELINE(AM85C30_TAG, scc85c30_device, rxb_w))
+ MCFG_RS232_DCD_HANDLER(DEVWRITELINE(AM85C30_TAG, scc85c30_device, dcdb_w))
+ MCFG_RS232_CTS_HANDLER(DEVWRITELINE(AM85C30_TAG, scc85c30_device, ctsb_w))
+
+ MCFG_RS232_PORT_ADD(COM2_TAG, default_rs232_devices, nullptr)
+ MCFG_RS232_RXD_HANDLER(DEVWRITELINE(AM85C30_TAG, scc85c30_device, rxa_w))
+ MCFG_RS232_DCD_HANDLER(DEVWRITELINE(AM85C30_TAG, scc85c30_device, dcda_w))
+ MCFG_RS232_CTS_HANDLER(DEVWRITELINE(AM85C30_TAG, scc85c30_device, ctsa_w))
+MACHINE_CONFIG_END
void iteagle_fpga_device::device_start()
{
@@ -615,18 +610,13 @@ DEVICE_ADDRESS_MAP_START(eeprom_map, 32, iteagle_eeprom_device)
AM_RANGE(0x0000, 0x000F) AM_READWRITE(eeprom_r, eeprom_w)
ADDRESS_MAP_END
-MACHINE_CONFIG_START( iteagle_eeprom )
+MACHINE_CONFIG_MEMBER( iteagle_eeprom_device::device_add_mconfig )
MCFG_EEPROM_SERIAL_93C46_ADD("eeprom")
MACHINE_CONFIG_END
-machine_config_constructor iteagle_eeprom_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME( iteagle_eeprom );
-}
-
iteagle_eeprom_device::iteagle_eeprom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: pci_device(mconfig, ITEAGLE_EEPROM, tag, owner, clock),
- m_eeprom(*this, "eeprom"), m_sw_version(0), m_hw_version(0)
+ m_sw_version(0), m_hw_version(0), m_eeprom(*this, "eeprom")
{
// When corrupt writes 0x3=2, 0x3e=2, 0xa=0, 0x30=0
// 0x4 = HW Version - 6-8 is GREEN board PCB, 9 is RED board PCB
@@ -734,15 +724,10 @@ WRITE32_MEMBER( iteagle_eeprom_device::eeprom_w )
// Attached Peripheral Controller
//************************************
-MACHINE_CONFIG_START(eagle1)
+MACHINE_CONFIG_MEMBER(iteagle_periph_device::device_add_mconfig)
MCFG_NVRAM_ADD_0FILL("eagle1_rtc")
MACHINE_CONFIG_END
-machine_config_constructor iteagle_periph_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME(eagle1);
-}
-
DEFINE_DEVICE_TYPE(ITEAGLE_PERIPH, iteagle_periph_device, "iteagle_periph", "ITEagle Peripheral Controller")
DEVICE_ADDRESS_MAP_START(ctrl_map, 32, iteagle_periph_device)
diff --git a/src/mame/machine/iteagle_fpga.h b/src/mame/machine/iteagle_fpga.h
index 7ed878c58ba..5b0e7a76a7a 100644
--- a/src/mame/machine/iteagle_fpga.h
+++ b/src/mame/machine/iteagle_fpga.h
@@ -56,7 +56,6 @@ class iteagle_fpga_device : public pci_device
{
public:
iteagle_fpga_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- virtual machine_config_constructor device_mconfig_additions() const override;
required_device<nvram_device> m_rtc;
required_device<scc85c30_device> m_scc1;
@@ -65,13 +64,13 @@ public:
void set_irq_info(const char *tag, const int irq_num, const int serial_num) {
m_cpu_tag = tag; m_irq_num = irq_num; m_serial_irq_num = serial_num;}
- DECLARE_WRITE_LINE_MEMBER(serial_interrupt);
DECLARE_WRITE8_MEMBER(serial_rx_w);
protected:
virtual void device_start() override;
virtual void device_reset() override;
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
+ virtual void device_add_mconfig(machine_config &config) override;
private:
emu_timer * m_timer;
@@ -107,22 +106,23 @@ private:
DECLARE_READ32_MEMBER( ram_r );
DECLARE_WRITE32_MEMBER( ram_w );
+
+ DECLARE_WRITE_LINE_MEMBER(serial_interrupt);
};
class iteagle_eeprom_device : public pci_device {
public:
iteagle_eeprom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// optional information overrides
- virtual machine_config_constructor device_mconfig_additions() const override;
virtual void map_extra(uint64_t memory_window_start, uint64_t memory_window_end, uint64_t memory_offset, address_space *memory_space,
uint64_t io_window_start, uint64_t io_window_end, uint64_t io_offset, address_space *io_space) override;
- required_device<eeprom_serial_93cxx_device> m_eeprom;
-
void set_info(int sw_version, int hw_version) {m_sw_version=sw_version; m_hw_version=hw_version;}
+
protected:
virtual void device_start() override;
virtual void device_reset() override;
+ virtual void device_add_mconfig(machine_config &config) override;
private:
address_space *m_memory_space;
@@ -134,16 +134,18 @@ private:
DECLARE_ADDRESS_MAP(eeprom_map, 32);
DECLARE_READ32_MEMBER( eeprom_r );
DECLARE_WRITE32_MEMBER( eeprom_w );
+
+ required_device<eeprom_serial_93cxx_device> m_eeprom;
};
class iteagle_periph_device : public pci_device {
public:
iteagle_periph_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- virtual machine_config_constructor device_mconfig_additions() const override;
protected:
virtual void device_start() override;
virtual void device_reset() override;
+ virtual void device_add_mconfig(machine_config &config) override;
private:
optional_device<nvram_device> m_rtc;
diff --git a/src/mame/machine/jvs13551.cpp b/src/mame/machine/jvs13551.cpp
index ca1d9ff0dea..afb05bbafe6 100644
--- a/src/mame/machine/jvs13551.cpp
+++ b/src/mame/machine/jvs13551.cpp
@@ -25,10 +25,6 @@ static INPUT_PORTS_START(sega_837_13551_coins)
PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_COIN2) PORT_WRITE_LINE_DEVICE_MEMBER(DEVICE_SELF, sega_837_13551_device, jvs13551_coin_2_w)
INPUT_PORTS_END
-MACHINE_CONFIG_START(sega_837_13551)
- MCFG_CPU_ADD("iomcu", TMP90PH44, 10000000) // unknown clock
-MACHINE_CONFIG_END
-
ROM_START( jvs13551 )
// TMP90PH44N firmwares
ROM_REGION( 0x4000, "iomcu", ROMREGION_ERASE )
@@ -53,10 +49,9 @@ void sega_837_13551_device::static_set_port_tag(device_t &device, int port, cons
ctrl.port_tag[port] = tag;
}
-machine_config_constructor sega_837_13551_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME(sega_837_13551);
-}
+MACHINE_CONFIG_MEMBER(sega_837_13551_device::device_add_mconfig)
+ MCFG_CPU_ADD("iomcu", TMP90PH44, 10000000) // unknown clock
+MACHINE_CONFIG_END
ioport_constructor sega_837_13551_device::device_input_ports() const
{
diff --git a/src/mame/machine/jvs13551.h b/src/mame/machine/jvs13551.h
index eccf1dd4b2f..9ae65d02c70 100644
--- a/src/mame/machine/jvs13551.h
+++ b/src/mame/machine/jvs13551.h
@@ -40,7 +40,7 @@ protected:
// device-level overrides
virtual void device_start() override;
virtual void device_reset() override;
- virtual machine_config_constructor device_mconfig_additions() const override;
+ virtual void device_add_mconfig(machine_config &config) override;
virtual ioport_constructor device_input_ports() const override;
// JVS device overrides
diff --git a/src/mame/machine/k573cass.cpp b/src/mame/machine/k573cass.cpp
index 52e481a930b..f6cb1e45a15 100644
--- a/src/mame/machine/k573cass.cpp
+++ b/src/mame/machine/k573cass.cpp
@@ -76,15 +76,10 @@ konami573_cassette_x_device::konami573_cassette_x_device(const machine_config &m
{
}
-static MACHINE_CONFIG_START( cassx )
+MACHINE_CONFIG_MEMBER( konami573_cassette_x_device::device_add_mconfig )
MCFG_X76F041_ADD( "eeprom" )
MACHINE_CONFIG_END
-machine_config_constructor konami573_cassette_x_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME( cassx );
-}
-
void konami573_cassette_x_device::device_start()
{
output_dsr(0);
@@ -125,17 +120,12 @@ konami573_cassette_xi_device::konami573_cassette_xi_device(const machine_config
{
}
-static MACHINE_CONFIG_START( cassxi )
+MACHINE_CONFIG_MEMBER( konami573_cassette_xi_device::device_add_mconfig )
MCFG_X76F041_ADD( "eeprom" )
MCFG_DS2401_ADD( "id" )
MCFG_DEVICE_ADD( "adc0838", ADC0838, 0 )
MACHINE_CONFIG_END
-machine_config_constructor konami573_cassette_xi_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME( cassxi );
-}
-
WRITE_LINE_MEMBER(konami573_cassette_xi_device::write_line_d0)
{
konami573_cassette_x_device::write_line_d0( state ); // shares line with x76f041 sda
@@ -198,15 +188,10 @@ konami573_cassette_y_device::konami573_cassette_y_device(const machine_config &m
{
}
-static MACHINE_CONFIG_START( cassy )
+MACHINE_CONFIG_MEMBER( konami573_cassette_y_device::device_add_mconfig )
MCFG_X76F100_ADD( "eeprom" )
MACHINE_CONFIG_END
-machine_config_constructor konami573_cassette_y_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME( cassy );
-}
-
void konami573_cassette_y_device::device_start()
{
m_d0_handler.resolve_safe();
@@ -279,16 +264,11 @@ konami573_cassette_yi_device::konami573_cassette_yi_device(const machine_config
{
}
-static MACHINE_CONFIG_START( cassyi )
+MACHINE_CONFIG_MEMBER( konami573_cassette_yi_device::device_add_mconfig )
MCFG_X76F100_ADD( "eeprom" )
MCFG_DS2401_ADD( "id" )
MACHINE_CONFIG_END
-machine_config_constructor konami573_cassette_yi_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME( cassyi );
-}
-
WRITE_LINE_MEMBER(konami573_cassette_yi_device::write_line_d4)
{
konami573_cassette_y_device::write_line_d4( state );
@@ -312,17 +292,12 @@ konami573_cassette_zi_device::konami573_cassette_zi_device(const machine_config
{
}
-static MACHINE_CONFIG_START( casszi )
+MACHINE_CONFIG_MEMBER( konami573_cassette_zi_device::device_add_mconfig )
MCFG_DS2401_ADD( "id" )
MCFG_ZS01_ADD( "eeprom" )
MCFG_ZS01_DS2401( "id" )
MACHINE_CONFIG_END
-machine_config_constructor konami573_cassette_zi_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME( casszi );
-}
-
void konami573_cassette_zi_device::device_start()
{
output_dsr(0);
diff --git a/src/mame/machine/k573cass.h b/src/mame/machine/k573cass.h
index 442ec5d2d86..09b33df3fd3 100644
--- a/src/mame/machine/k573cass.h
+++ b/src/mame/machine/k573cass.h
@@ -105,7 +105,7 @@ protected:
konami573_cassette_x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);
virtual void device_start() override;
- virtual machine_config_constructor device_mconfig_additions() const override;
+ virtual void device_add_mconfig(machine_config &config) override;
private:
required_device<x76f041_device> m_x76f041;
@@ -131,7 +131,7 @@ public:
ADC083X_INPUT_CB(punchmania_inputs_callback);
protected:
- virtual machine_config_constructor device_mconfig_additions() const override;
+ virtual void device_add_mconfig(machine_config &config) override;
private:
required_device<ds2401_device> m_ds2401;
@@ -196,7 +196,7 @@ protected:
konami573_cassette_y_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);
virtual void device_start() override;
- virtual machine_config_constructor device_mconfig_additions() const override;
+ virtual void device_add_mconfig(machine_config &config) override;
private:
required_device<x76f100_device> m_x76f100;
@@ -222,7 +222,7 @@ public:
virtual DECLARE_WRITE_LINE_MEMBER(write_line_d4) override;
protected:
- virtual machine_config_constructor device_mconfig_additions() const override;
+ virtual void device_add_mconfig(machine_config &config) override;
private:
required_device<ds2401_device> m_ds2401;
@@ -247,7 +247,7 @@ public:
protected:
virtual void device_start() override;
- virtual machine_config_constructor device_mconfig_additions() const override;
+ virtual void device_add_mconfig(machine_config &config) override;
private:
required_device<zs01_device> m_zs01;
diff --git a/src/mame/machine/k573dio.cpp b/src/mame/machine/k573dio.cpp
index 40ab1fcebc9..8f4ed59491b 100644
--- a/src/mame/machine/k573dio.cpp
+++ b/src/mame/machine/k573dio.cpp
@@ -100,11 +100,6 @@ DEVICE_ADDRESS_MAP_START(amap, 16, k573dio_device)
AM_RANGE(0xfe, 0xff) AM_WRITE(output_2_w)
ADDRESS_MAP_END
-static MACHINE_CONFIG_START( k573dio )
- MCFG_MAS3507D_ADD( "mpeg" )
- MCFG_DS2401_ADD( "digital_id" )
-MACHINE_CONFIG_END
-
k573dio_device::k573dio_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, KONAMI_573_DIGITAL_IO_BOARD, tag, owner, clock),
mas3507d(*this, "mpeg"),
@@ -136,10 +131,10 @@ const tiny_rom_entry *k573dio_device::device_rom_region() const
return ROM_NAME(k573dio);
}
-machine_config_constructor k573dio_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME( k573dio );
-}
+MACHINE_CONFIG_MEMBER( k573dio_device::device_add_mconfig )
+ MCFG_MAS3507D_ADD( "mpeg" )
+ MCFG_DS2401_ADD( "digital_id" )
+MACHINE_CONFIG_END
void k573dio_device::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
{
diff --git a/src/mame/machine/k573dio.h b/src/mame/machine/k573dio.h
index 9387238a622..8a21300b6f4 100644
--- a/src/mame/machine/k573dio.h
+++ b/src/mame/machine/k573dio.h
@@ -67,7 +67,7 @@ protected:
virtual void device_start() override;
virtual void device_reset() override;
virtual const tiny_rom_entry *device_rom_region() const override;
- virtual machine_config_constructor device_mconfig_additions() const override;
+ virtual void device_add_mconfig(machine_config &config) override;
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
private:
diff --git a/src/mame/machine/k7659kb.cpp b/src/mame/machine/k7659kb.cpp
index 854fc6233dc..373ed33be86 100644
--- a/src/mame/machine/k7659kb.cpp
+++ b/src/mame/machine/k7659kb.cpp
@@ -57,28 +57,16 @@ const tiny_rom_entry *k7659_keyboard_device::device_rom_region() const
//-------------------------------------------------
-
//-------------------------------------------------
-// MACHINE_DRIVER( k7659_keyboard )
+// device_add_mconfig - add device configuration
//-------------------------------------------------
-static MACHINE_CONFIG_START( k7659_keyboard )
+MACHINE_CONFIG_MEMBER( k7659_keyboard_device::device_add_mconfig )
MACHINE_CONFIG_END
//-------------------------------------------------
-// machine_config_additions - device-specific
-// machine configurations
-//-------------------------------------------------
-
-machine_config_constructor k7659_keyboard_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME( k7659_keyboard );
-}
-
-
-//-------------------------------------------------
// INPUT_PORTS( k7659_keyboard )
//-------------------------------------------------
diff --git a/src/mame/machine/k7659kb.h b/src/mame/machine/k7659kb.h
index 42f1ab26dc2..f6f50919426 100644
--- a/src/mame/machine/k7659kb.h
+++ b/src/mame/machine/k7659kb.h
@@ -43,11 +43,6 @@ public:
// construction/destruction
k7659_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- // optional information overrides
- virtual const tiny_rom_entry *device_rom_region() const override;
- virtual machine_config_constructor device_mconfig_additions() const override;
- virtual ioport_constructor device_input_ports() const override;
-
DECLARE_READ8_MEMBER(read);
protected:
@@ -55,6 +50,12 @@ protected:
virtual void device_start() override;
virtual void device_reset() override;
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
+
+ // optional information overrides
+ virtual const tiny_rom_entry *device_rom_region() const override;
+ virtual void device_add_mconfig(machine_config &config) override;
+ virtual ioport_constructor device_input_ports() const override;
+
emu_timer *m_timer;
private:
diff --git a/src/mame/machine/km035.cpp b/src/mame/machine/km035.cpp
index 9696bc9f0cb..f7cc03a7629 100644
--- a/src/mame/machine/km035.cpp
+++ b/src/mame/machine/km035.cpp
@@ -49,11 +49,12 @@ static ADDRESS_MAP_START( km035_map, AS_PROGRAM, 8, km035_device )
AM_RANGE(0x0000, 0x07ff) AM_ROM
ADDRESS_MAP_END
+
//-------------------------------------------------
-// MACHINE_CONFIG
+// device_add_mconfig - add device configuration
//-------------------------------------------------
-static MACHINE_CONFIG_START( km035 )
+MACHINE_CONFIG_MEMBER( km035_device::device_add_mconfig )
MCFG_CPU_ADD(KM035_CPU_TAG, I8035, XTAL_4_608MHz)
MCFG_CPU_PROGRAM_MAP(km035_map)
MCFG_MCS48_PORT_BUS_OUT_CB(WRITE8(km035_device, bus_w))
@@ -69,17 +70,6 @@ static MACHINE_CONFIG_START( km035 )
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
MACHINE_CONFIG_END
-
-//-------------------------------------------------
-// machine_config_additions - device-specific
-// machine configurations
-//-------------------------------------------------
-
-machine_config_constructor km035_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME( km035 );
-}
-
const tiny_rom_entry *km035_device::device_rom_region() const
{
return ROM_NAME( km035 );
diff --git a/src/mame/machine/km035.h b/src/mame/machine/km035.h
index 599c2cd64a2..195d7e9b758 100644
--- a/src/mame/machine/km035.h
+++ b/src/mame/machine/km035.h
@@ -39,19 +39,11 @@ public:
template<class _Object> static devcb_base &set_tx_handler(device_t &device, _Object wr) { return downcast<km035_device &>(device).m_tx_handler.set_callback(wr); }
template<class _Object> static devcb_base &set_rts_handler(device_t &device, _Object wr) { return downcast<km035_device &>(device).m_rts_handler.set_callback(wr); }
- DECLARE_WRITE8_MEMBER( bus_w );
- DECLARE_WRITE8_MEMBER( p1_w );
- DECLARE_WRITE8_MEMBER( p2_w );
- DECLARE_READ8_MEMBER( p1_r );
- DECLARE_READ8_MEMBER( p2_r );
- DECLARE_READ_LINE_MEMBER( t0_r );
- DECLARE_READ_LINE_MEMBER( t1_r );
-
DECLARE_WRITE_LINE_MEMBER( write_rxd );
protected:
// device-level overrides
- virtual machine_config_constructor device_mconfig_additions() const override;
+ virtual void device_add_mconfig(machine_config &config) override;
virtual const tiny_rom_entry *device_rom_region() const override;
virtual ioport_constructor device_input_ports() const override;
virtual void device_start() override;
@@ -70,6 +62,14 @@ private:
devcb_write_line m_tx_handler;
devcb_write_line m_rts_handler;
+
+ DECLARE_WRITE8_MEMBER( bus_w );
+ DECLARE_WRITE8_MEMBER( p1_w );
+ DECLARE_WRITE8_MEMBER( p2_w );
+ DECLARE_READ8_MEMBER( p1_r );
+ DECLARE_READ8_MEMBER( p2_r );
+ DECLARE_READ_LINE_MEMBER( t0_r );
+ DECLARE_READ_LINE_MEMBER( t1_r );
};
// device type definition
diff --git a/src/mame/machine/m1comm.cpp b/src/mame/machine/m1comm.cpp
index 3d75e1ffe57..6a4b8be6361 100644
--- a/src/mame/machine/m1comm.cpp
+++ b/src/mame/machine/m1comm.cpp
@@ -81,11 +81,6 @@ static ADDRESS_MAP_START( m1comm_io, AS_IO, 8, m1comm_device )
AM_RANGE(0xff, 0xff) AM_RAM
ADDRESS_MAP_END
-MACHINE_CONFIG_START( m1comm )
- MCFG_CPU_ADD(Z80_TAG, Z80, 8000000) /* 32 MHz / 4 */
- MCFG_CPU_PROGRAM_MAP(m1comm_mem)
- MCFG_CPU_IO_MAP(m1comm_io)
-MACHINE_CONFIG_END
ROM_START( m1comm )
ROM_REGION( 0x20000, Z80_TAG, ROMREGION_ERASEFF )
@@ -99,14 +94,14 @@ ROM_END
DEFINE_DEVICE_TYPE(M1COMM, m1comm_device, "m1comm", "Model 1 Communication Board")
//-------------------------------------------------
-// machine_config_additions - device-specific
-// machine configurations
+// device_add_mconfig - add device configuration
//-------------------------------------------------
-machine_config_constructor m1comm_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME( m1comm );
-}
+MACHINE_CONFIG_MEMBER( m1comm_device::device_add_mconfig )
+ MCFG_CPU_ADD(Z80_TAG, Z80, 8000000) /* 32 MHz / 4 */
+ MCFG_CPU_PROGRAM_MAP(m1comm_mem)
+ MCFG_CPU_IO_MAP(m1comm_io)
+MACHINE_CONFIG_END
//-------------------------------------------------
// rom_region - device-specific ROM region
diff --git a/src/mame/machine/m1comm.h b/src/mame/machine/m1comm.h
index 064a0f04a16..e60a6e66851 100644
--- a/src/mame/machine/m1comm.h
+++ b/src/mame/machine/m1comm.h
@@ -22,11 +22,6 @@ public:
// construction/destruction
m1comm_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- // optional information overrides
- virtual machine_config_constructor device_mconfig_additions() const override;
-
- required_device<z80_device> m_commcpu;
-
// internal API - stuff that happens on the comm board
// MB89374 registers
DECLARE_READ8_MEMBER(dlc_reg_r);
@@ -64,8 +59,12 @@ protected:
virtual void device_start() override;
virtual void device_reset() override;
virtual const tiny_rom_entry *device_rom_region() const override;
+ // optional information overrides
+ virtual void device_add_mconfig(machine_config &config) override;
private:
+ required_device<z80_device> m_commcpu;
+
uint8_t m_shared[0x1000]; // 2x 2k = 4k; model1 accesses this with 16bit data and 11bit address (A0 to A10)
uint8_t m_dlc_reg[0x20]; // MB89374 registers
uint8_t m_dma_reg[0x20]; // MB89237A registers
diff --git a/src/mame/machine/m20_8086.cpp b/src/mame/machine/m20_8086.cpp
index 73e3fc54923..895f3e856e9 100644
--- a/src/mame/machine/m20_8086.cpp
+++ b/src/mame/machine/m20_8086.cpp
@@ -55,18 +55,13 @@ static ADDRESS_MAP_START(i86_io, AS_IO, 16, m20_8086_device)
AM_RANGE(0x7ffa, 0x7ffd) AM_WRITE(handshake_w)
ADDRESS_MAP_END
-static MACHINE_CONFIG_START( m20_8086 )
+MACHINE_CONFIG_MEMBER( m20_8086_device::device_add_mconfig )
MCFG_CPU_ADD("8086", I8086, XTAL_24MHz/3)
MCFG_CPU_PROGRAM_MAP(i86_prog)
MCFG_CPU_IO_MAP(i86_io)
MCFG_CPU_IRQ_ACKNOWLEDGE_DRIVER(m20_8086_device, int_cb)
MACHINE_CONFIG_END
-machine_config_constructor m20_8086_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME( m20_8086 );
-}
-
READ16_MEMBER(m20_8086_device::z8000_io_r)
{
return m_maincpu->space(AS_IO).read_word(offset << 1, mem_mask);
diff --git a/src/mame/machine/m20_8086.h b/src/mame/machine/m20_8086.h
index c49fe1173cc..4c49847a4d3 100644
--- a/src/mame/machine/m20_8086.h
+++ b/src/mame/machine/m20_8086.h
@@ -11,15 +11,11 @@ class m20_8086_device : public device_t
public:
m20_8086_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- virtual const tiny_rom_entry *device_rom_region() const override;
- virtual machine_config_constructor device_mconfig_additions() const override;
-
DECLARE_READ16_MEMBER(z8000_io_r);
DECLARE_WRITE16_MEMBER(z8000_io_w);
DECLARE_WRITE_LINE_MEMBER(vi_w);
DECLARE_WRITE_LINE_MEMBER(nvi_w);
DECLARE_WRITE16_MEMBER(handshake_w);
- IRQ_CALLBACK_MEMBER(int_cb);
void halt() { m_8086->set_input_line(INPUT_LINE_HALT, ASSERT_LINE); }
bool halted() const { return m_8086_halt; }
@@ -27,6 +23,8 @@ public:
protected:
void device_start() override;
void device_reset() override;
+ virtual const tiny_rom_entry *device_rom_region() const override;
+ virtual void device_add_mconfig(machine_config &config) override;
private:
required_device<cpu_device> m_8086;
@@ -34,6 +32,8 @@ private:
required_device<pic8259_device> m_pic;
bool m_8086_halt;
int m_nvi, m_vi;
+
+ IRQ_CALLBACK_MEMBER(int_cb);
};
DECLARE_DEVICE_TYPE(M20_8086, m20_8086_device)
diff --git a/src/mame/machine/m24_kbd.cpp b/src/mame/machine/m24_kbd.cpp
index 4811e3abc69..4b094389133 100644
--- a/src/mame/machine/m24_kbd.cpp
+++ b/src/mame/machine/m24_kbd.cpp
@@ -16,7 +16,7 @@ const tiny_rom_entry *m24_keyboard_device::device_rom_region() const
return ROM_NAME( m24_keyboard );
}
-static MACHINE_CONFIG_START( m24_keyboard )
+MACHINE_CONFIG_MEMBER( m24_keyboard_device::device_add_mconfig )
MCFG_CPU_ADD("mcu", I8049, XTAL_6MHz)
MCFG_MCS48_PORT_BUS_OUT_CB(WRITE8(m24_keyboard_device, bus_w))
MCFG_MCS48_PORT_P1_IN_CB(READ8(m24_keyboard_device, p1_r))
@@ -26,11 +26,6 @@ static MACHINE_CONFIG_START( m24_keyboard )
MCFG_MCS48_PORT_T1_IN_CB(READLINE(m24_keyboard_device, t1_r))
MACHINE_CONFIG_END
-machine_config_constructor m24_keyboard_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME( m24_keyboard );
-}
-
INPUT_PORTS_START( m24_keyboard )
PORT_START("ROW.0")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_1) PORT_CHAR('1') PORT_CHAR('!')
diff --git a/src/mame/machine/m24_kbd.h b/src/mame/machine/m24_kbd.h
index a8845809ff8..529e4f9eaa4 100644
--- a/src/mame/machine/m24_kbd.h
+++ b/src/mame/machine/m24_kbd.h
@@ -17,16 +17,6 @@ public:
template <class Object> static devcb_base &set_out_data_handler(device_t &device, Object &&cb) { return downcast<m24_keyboard_device &>(device).m_out_data.set_callback(std::forward<Object>(cb)); }
- virtual const tiny_rom_entry *device_rom_region() const override;
- virtual machine_config_constructor device_mconfig_additions() const override;
- virtual ioport_constructor device_input_ports() const override;
-
- DECLARE_WRITE8_MEMBER(bus_w);
- DECLARE_READ8_MEMBER(p1_r);
- DECLARE_WRITE8_MEMBER(p1_w);
- DECLARE_READ8_MEMBER(p2_r);
- DECLARE_READ_LINE_MEMBER(t0_r);
- DECLARE_READ_LINE_MEMBER(t1_r);
DECLARE_WRITE_LINE_MEMBER(clock_w);
DECLARE_WRITE_LINE_MEMBER(data_w);
@@ -34,6 +24,9 @@ protected:
void device_start() override;
void device_reset() override;
void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
+ virtual const tiny_rom_entry *device_rom_region() const override;
+ virtual void device_add_mconfig(machine_config &config) override;
+ virtual ioport_constructor device_input_ports() const override;
private:
required_ioport_array<16> m_rows;
@@ -43,6 +36,13 @@ private:
devcb_write_line m_out_data;
required_device<cpu_device> m_mcu;
emu_timer *m_reset_timer;
+
+ DECLARE_WRITE8_MEMBER(bus_w);
+ DECLARE_READ8_MEMBER(p1_r);
+ DECLARE_WRITE8_MEMBER(p1_w);
+ DECLARE_READ8_MEMBER(p2_r);
+ DECLARE_READ_LINE_MEMBER(t0_r);
+ DECLARE_READ_LINE_MEMBER(t1_r);
};
DECLARE_DEVICE_TYPE(M24_KEYBOARD, m24_keyboard_device)
diff --git a/src/mame/machine/m24_z8000.cpp b/src/mame/machine/m24_z8000.cpp
index 6cacac0ab24..4d253afb1e2 100644
--- a/src/mame/machine/m24_z8000.cpp
+++ b/src/mame/machine/m24_z8000.cpp
@@ -63,7 +63,7 @@ static ADDRESS_MAP_START(z8000_io, AS_IO, 16, m24_z8000_device)
AM_RANGE(0x8000, 0x83ff) AM_READWRITE(i86_io_r, i86_io_w)
ADDRESS_MAP_END
-static MACHINE_CONFIG_START( m24_z8000 )
+MACHINE_CONFIG_MEMBER( m24_z8000_device::device_add_mconfig )
MCFG_CPU_ADD("z8000", Z8001, XTAL_8MHz/2)
MCFG_CPU_PROGRAM_MAP(z8000_prog)
MCFG_CPU_DATA_MAP(z8000_data)
@@ -82,11 +82,6 @@ static MACHINE_CONFIG_START( m24_z8000 )
MCFG_DEVICE_ADD("i8251", I8251, 0)
MACHINE_CONFIG_END
-machine_config_constructor m24_z8000_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME( m24_z8000 );
-}
-
const uint8_t m24_z8000_device::pmem_table[16][4] =
{{0, 1, 2, 3}, {1, 2, 3, 255}, {4, 5, 6, 7}, {46, 40, 41, 42},
{255, 255, 255, 255}, {255, 255, 255, 47}, {1, 2, 3, 255}, {255, 255, 255, 255},
diff --git a/src/mame/machine/m24_z8000.h b/src/mame/machine/m24_z8000.h
index 9e2590701ef..8bb01b4a234 100644
--- a/src/mame/machine/m24_z8000.h
+++ b/src/mame/machine/m24_z8000.h
@@ -18,8 +18,6 @@ class m24_z8000_device : public device_t
public:
m24_z8000_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- virtual const tiny_rom_entry *device_rom_region() const override;
- virtual machine_config_constructor device_mconfig_additions() const override;
template <class Object> static devcb_base &set_halt_callback(device_t &device, Object &&cb) { return downcast<m24_z8000_device &>(device).m_halt_out.set_callback(std::forward<Object>(cb)); }
DECLARE_READ16_MEMBER(pmem_r);
@@ -32,9 +30,6 @@ public:
DECLARE_WRITE8_MEMBER(serctl_w);
DECLARE_READ8_MEMBER(handshake_r);
DECLARE_WRITE8_MEMBER(handshake_w);
- DECLARE_WRITE_LINE_MEMBER(mo_w);
- DECLARE_WRITE_LINE_MEMBER(timer_irq_w);
- IRQ_CALLBACK_MEMBER(int_cb);
DECLARE_WRITE_LINE_MEMBER(halt_w) { m_z8000->set_input_line(INPUT_LINE_HALT, state); }
DECLARE_WRITE_LINE_MEMBER(int_w) { m_z8000->set_input_line(INPUT_LINE_IRQ1, state); }
@@ -44,6 +39,8 @@ public:
protected:
void device_start() override;
void device_reset() override;
+ virtual const tiny_rom_entry *device_rom_region() const override;
+ virtual void device_add_mconfig(machine_config &config) override;
private:
required_device<z8001_device> m_z8000;
@@ -54,6 +51,10 @@ private:
static const uint8_t dmem_table[16][4];
uint8_t m_handshake, m_irq;
bool m_z8000_halt, m_z8000_mem, m_timer_irq;
+
+ DECLARE_WRITE_LINE_MEMBER(mo_w);
+ DECLARE_WRITE_LINE_MEMBER(timer_irq_w);
+ IRQ_CALLBACK_MEMBER(int_cb);
};
extern const device_type M24_Z8000;
diff --git a/src/mame/machine/m2comm.cpp b/src/mame/machine/m2comm.cpp
index ee14ad4453f..4aa8f877265 100644
--- a/src/mame/machine/m2comm.cpp
+++ b/src/mame/machine/m2comm.cpp
@@ -171,8 +171,6 @@ Sega PC BD MODEL2 C-CRX COMMUNICATION 837-12839
#define VERBOSE 0
#include "logmacro.h"
-MACHINE_CONFIG_START( m2comm )
-MACHINE_CONFIG_END
//**************************************************************************
// GLOBAL VARIABLES
@@ -181,14 +179,11 @@ MACHINE_CONFIG_END
DEFINE_DEVICE_TYPE(M2COMM, m2comm_device, "m2comm", "Model 2 Communication Board")
//-------------------------------------------------
-// machine_config_additions - device-specific
-// machine configurations
+// device_add_mconfig - add device configuration
//-------------------------------------------------
-machine_config_constructor m2comm_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME( m2comm );
-}
+MACHINE_CONFIG_MEMBER( m2comm_device::device_add_mconfig )
+MACHINE_CONFIG_END
//**************************************************************************
// LIVE DEVICE
diff --git a/src/mame/machine/m2comm.h b/src/mame/machine/m2comm.h
index 2667f277340..ff11efb90ba 100644
--- a/src/mame/machine/m2comm.h
+++ b/src/mame/machine/m2comm.h
@@ -21,9 +21,6 @@ public:
// construction/destruction
m2comm_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- // optional information overrides
- virtual machine_config_constructor device_mconfig_additions() const override;
-
// single bit registers (74LS74)
DECLARE_READ8_MEMBER(zfg_r);
DECLARE_WRITE8_MEMBER(zfg_w);
@@ -51,6 +48,7 @@ protected:
// device-level overrides
virtual void device_start() override;
virtual void device_reset() override;
+ virtual void device_add_mconfig(machine_config &config) override;
private:
uint8_t m_shared[0x4000]; // 16k shared memory
diff --git a/src/mame/machine/m3comm.cpp b/src/mame/machine/m3comm.cpp
index 44d64246d84..be3d381e866 100644
--- a/src/mame/machine/m3comm.cpp
+++ b/src/mame/machine/m3comm.cpp
@@ -103,15 +103,6 @@ static ADDRESS_MAP_START( m3comm_mem, AS_PROGRAM, 16, m3comm_device )
ADDRESS_MAP_END
-MACHINE_CONFIG_START( m3comm )
- MCFG_CPU_ADD(M68K_TAG, M68000, 10000000) // random
- MCFG_CPU_PROGRAM_MAP(m3comm_mem)
-
- MCFG_RAM_ADD(RAM_TAG)
- MCFG_RAM_DEFAULT_SIZE("128K")
-MACHINE_CONFIG_END
-
-
//**************************************************************************
// GLOBAL VARIABLES
//**************************************************************************
@@ -123,10 +114,13 @@ DEFINE_DEVICE_TYPE(M3COMM, m3comm_device, "m3comm", "Model 3 Communication Board
// machine configurations
//-------------------------------------------------
-machine_config_constructor m3comm_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME( m3comm );
-}
+MACHINE_CONFIG_MEMBER( m3comm_device::device_add_mconfig )
+ MCFG_CPU_ADD(M68K_TAG, M68000, 10000000) // random
+ MCFG_CPU_PROGRAM_MAP(m3comm_mem)
+
+ MCFG_RAM_ADD(RAM_TAG)
+ MCFG_RAM_DEFAULT_SIZE("128K")
+MACHINE_CONFIG_END
//**************************************************************************
// LIVE DEVICE
@@ -138,11 +132,11 @@ machine_config_constructor m3comm_device::device_mconfig_additions() const
m3comm_device::m3comm_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
device_t(mconfig, M3COMM, tag, owner, clock),
+ m_line_rx(OPEN_FLAG_WRITE | OPEN_FLAG_CREATE ),
+ m_line_tx(OPEN_FLAG_READ),
m68k_ram(*this, "m68k_ram"),
m_commcpu(*this, M68K_TAG),
- m_ram(*this, RAM_TAG),
- m_line_rx(OPEN_FLAG_WRITE | OPEN_FLAG_CREATE ),
- m_line_tx(OPEN_FLAG_READ)
+ m_ram(*this, RAM_TAG)
{
// prepare localhost "filename"
m_localhost[0] = 0;
diff --git a/src/mame/machine/m3comm.h b/src/mame/machine/m3comm.h
index 2989bddabba..5883d2aed5d 100644
--- a/src/mame/machine/m3comm.h
+++ b/src/mame/machine/m3comm.h
@@ -21,12 +21,6 @@ public:
// construction/destruction
m3comm_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- // optional information overrides
- virtual machine_config_constructor device_mconfig_additions() const override;
-
- required_shared_ptr<uint16_t> m68k_ram;
- required_device<m68000_device> m_commcpu;
-
DECLARE_ADDRESS_MAP(m3_map, 32);
DECLARE_READ16_MEMBER(ctrl_r);
@@ -48,13 +42,13 @@ public:
protected:
enum { TIMER_IRQ5 = 1 };
- required_device<ram_device> m_ram;
-
// device-level overrides
virtual void device_start() override;
virtual void device_reset() override;
virtual void device_reset_after_children() override;
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
+ virtual void device_add_mconfig(machine_config &config) override;
+
private:
uint16_t naomi_control;
uint16_t naomi_offset;
@@ -74,6 +68,10 @@ private:
char m_remotehost[256];
emu_timer *timer;
+
+ required_shared_ptr<uint16_t> m68k_ram;
+ required_device<m68000_device> m_commcpu;
+ required_device<ram_device> m_ram;
};
// device type definition
diff --git a/src/mame/machine/mackbd.cpp b/src/mame/machine/mackbd.cpp
index 43346bfd694..c7aa2329174 100644
--- a/src/mame/machine/mackbd.cpp
+++ b/src/mame/machine/mackbd.cpp
@@ -87,21 +87,6 @@ static ADDRESS_MAP_START( mackbd_io_map, AS_IO, 8, mackbd_device )
AM_RANGE(0x2f, 0x36) AM_WRITE(p0_w)
ADDRESS_MAP_END
-//-------------------------------------------------
-// MACHINE_CONFIG
-//-------------------------------------------------
-
-static MACHINE_CONFIG_START( mackbd )
- MCFG_CPU_ADD(MACKBD_CPU_TAG, I8021, 3000000) // "the approximate clock rate of the MPU is 3 MHz"
- MCFG_CPU_PROGRAM_MAP(mackbd_map)
- MCFG_CPU_IO_MAP(mackbd_io_map)
- MCFG_MCS48_PORT_BUS_IN_CB(READ8(mackbd_device, p0_r))
- MCFG_MCS48_PORT_P1_IN_CB(READ8(mackbd_device, p1_r))
- MCFG_MCS48_PORT_P1_OUT_CB(WRITE8(mackbd_device, p1_w))
- MCFG_MCS48_PORT_P2_IN_CB(READ8(mackbd_device, p2_r))
- MCFG_MCS48_PORT_P2_OUT_CB(WRITE8(mackbd_device, p2_w))
- MCFG_MCS48_PORT_T1_IN_CB(IOPORT("MODS")) MCFG_DEVCB_RSHIFT(1) // option
-MACHINE_CONFIG_END
static INPUT_PORTS_START( mackbd )
PORT_START("COL0")
@@ -184,14 +169,20 @@ static INPUT_PORTS_START( mackbd )
INPUT_PORTS_END
//-------------------------------------------------
-// machine_config_additions - device-specific
-// machine configurations
+// device_add_mconfig - add device configuration
//-------------------------------------------------
-machine_config_constructor mackbd_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME( mackbd );
-}
+MACHINE_CONFIG_MEMBER( mackbd_device::device_add_mconfig )
+ MCFG_CPU_ADD(MACKBD_CPU_TAG, I8021, 3000000) // "the approximate clock rate of the MPU is 3 MHz"
+ MCFG_CPU_PROGRAM_MAP(mackbd_map)
+ MCFG_CPU_IO_MAP(mackbd_io_map)
+ MCFG_MCS48_PORT_BUS_IN_CB(READ8(mackbd_device, p0_r))
+ MCFG_MCS48_PORT_P1_IN_CB(READ8(mackbd_device, p1_r))
+ MCFG_MCS48_PORT_P1_OUT_CB(WRITE8(mackbd_device, p1_w))
+ MCFG_MCS48_PORT_P2_IN_CB(READ8(mackbd_device, p2_r))
+ MCFG_MCS48_PORT_P2_OUT_CB(WRITE8(mackbd_device, p2_w))
+ MCFG_MCS48_PORT_T1_IN_CB(IOPORT("MODS")) MCFG_DEVCB_RSHIFT(1) // option
+MACHINE_CONFIG_END
const tiny_rom_entry *mackbd_device::device_rom_region() const
{
diff --git a/src/mame/machine/mackbd.h b/src/mame/machine/mackbd.h
index 4984f8ebc12..ede2bc6c73c 100644
--- a/src/mame/machine/mackbd.h
+++ b/src/mame/machine/mackbd.h
@@ -42,12 +42,7 @@ public:
// construction/destruction
mackbd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- DECLARE_READ8_MEMBER(p0_r);
DECLARE_WRITE8_MEMBER(p0_w);
- DECLARE_READ8_MEMBER(p1_r);
- DECLARE_WRITE8_MEMBER(p1_w);
- DECLARE_READ8_MEMBER(p2_r);
- DECLARE_WRITE8_MEMBER(p2_w);
DECLARE_WRITE_LINE_MEMBER(data_w);
@@ -55,7 +50,7 @@ protected:
// device-level overrides
virtual void device_start() override;
virtual void device_reset() override;
- virtual machine_config_constructor device_mconfig_additions() const override;
+ virtual void device_add_mconfig(machine_config &config) override;
virtual const tiny_rom_entry *device_rom_region() const override;
virtual ioport_constructor device_input_ports() const override;
@@ -68,6 +63,12 @@ private:
devcb_write_line m_dataout_handler;
void scan_kbd_col(int col);
+
+ DECLARE_READ8_MEMBER(p0_r);
+ DECLARE_READ8_MEMBER(p1_r);
+ DECLARE_WRITE8_MEMBER(p1_w);
+ DECLARE_READ8_MEMBER(p2_r);
+ DECLARE_WRITE8_MEMBER(p2_w);
};
// device type definition
diff --git a/src/mame/machine/mega32x.cpp b/src/mame/machine/mega32x.cpp
index 5ec304d8fd8..b562b2c09c8 100644
--- a/src/mame/machine/mega32x.cpp
+++ b/src/mame/machine/mega32x.cpp
@@ -1771,7 +1771,7 @@ const rom_entry *sega_32x_device::device_rom_region() const
#define _32X_INTERLEAVE_LEVEL \
MCFG_QUANTUM_TIME(attotime::from_hz(1800000))
-static MACHINE_CONFIG_START( _32x_ntsc )
+MACHINE_CONFIG_MEMBER( sega_32x_ntsc_device::device_add_mconfig )
#ifndef _32X_SWAP_MASTER_SLAVE_HACK
MCFG_CPU_ADD("32x_master_sh2", SH2, (MASTER_CLOCK_NTSC*3)/7 )
@@ -1801,7 +1801,7 @@ static MACHINE_CONFIG_START( _32x_ntsc )
_32X_INTERLEAVE_LEVEL
MACHINE_CONFIG_END
-static MACHINE_CONFIG_START( _32x_pal )
+MACHINE_CONFIG_MEMBER( sega_32x_pal_device::device_add_mconfig )
#ifndef _32X_SWAP_MASTER_SLAVE_HACK
MCFG_CPU_ADD("32x_master_sh2", SH2, (MASTER_CLOCK_PAL*3)/7 )
@@ -1832,18 +1832,6 @@ static MACHINE_CONFIG_START( _32x_pal )
MACHINE_CONFIG_END
-
-machine_config_constructor sega_32x_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME( _32x_ntsc );
-}
-
-machine_config_constructor sega_32x_pal_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME( _32x_pal );
-}
-
-
void sega_32x_device::device_start()
{
m_32x_pwm_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(sega_32x_device::handle_pwm_callback), this));
diff --git a/src/mame/machine/mega32x.h b/src/mame/machine/mega32x.h
index 4b2328100a3..57a657b6b62 100644
--- a/src/mame/machine/mega32x.h
+++ b/src/mame/machine/mega32x.h
@@ -113,9 +113,6 @@ protected:
virtual void device_start() override;
virtual void device_reset() override;
- // optional information overrides
- virtual machine_config_constructor device_mconfig_additions() const override;
-
void update_total_scanlines(bool mode3) { m_total_scanlines = mode3 ? (m_base_total_scanlines * 2) : m_base_total_scanlines; } // this gets set at each EOF
/* our main vblank handler resets this */
@@ -205,14 +202,18 @@ class sega_32x_ntsc_device : public sega_32x_device
public:
sega_32x_ntsc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+protected:
+ virtual void device_add_mconfig(machine_config &config) override;
+
};
class sega_32x_pal_device : public sega_32x_device
{
public:
sega_32x_pal_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+
protected:
- virtual machine_config_constructor device_mconfig_additions() const override;
+ virtual void device_add_mconfig(machine_config &config) override;
};
diff --git a/src/mame/machine/megacd.cpp b/src/mame/machine/megacd.cpp
index c3c8fca02eb..10a0ebd6860 100644
--- a/src/mame/machine/megacd.cpp
+++ b/src/mame/machine/megacd.cpp
@@ -285,11 +285,11 @@ static GFXDECODE_START( segacd )
GFXDECODE_END
-static MACHINE_CONFIG_START( segacd_fragment )
+MACHINE_CONFIG_MEMBER( sega_segacd_device::device_add_mconfig )
MCFG_CPU_ADD("segacd_68k", M68000, SEGACD_CLOCK ) /* 12.5 MHz */
MCFG_CPU_PROGRAM_MAP(segacd_map)
- MCFG_CPU_IRQ_ACKNOWLEDGE_DEVICE(DEVICE_SELF, sega_segacd_device,segacd_sub_int_callback)
+ MCFG_CPU_IRQ_ACKNOWLEDGE_DEVICE(DEVICE_SELF, sega_segacd_device, segacd_sub_int_callback)
MCFG_DEVICE_ADD("cdc", LC89510, 0) // cd controller
@@ -314,13 +314,6 @@ static MACHINE_CONFIG_START( segacd_fragment )
MACHINE_CONFIG_END
-
-machine_config_constructor sega_segacd_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME( segacd_fragment );
-}
-
-
sega_segacd_device::sega_segacd_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, type, tag, owner, clock),
device_gfx_interface(mconfig, *this, GFXDECODE_NAME( segacd )),
diff --git a/src/mame/machine/megacd.h b/src/mame/machine/megacd.h
index cab6d1ea258..6dde3e06e49 100644
--- a/src/mame/machine/megacd.h
+++ b/src/mame/machine/megacd.h
@@ -95,19 +95,12 @@ public:
READ8_MEMBER( font_color_r );
WRITE8_MEMBER( font_color_w );
READ16_MEMBER( font_converted_r );
- TIMER_DEVICE_CALLBACK_MEMBER( dma_timer_callback );
- IRQ_CALLBACK_MEMBER(segacd_sub_int_callback);
-
- TIMER_DEVICE_CALLBACK_MEMBER( irq3_timer_callback );
- TIMER_DEVICE_CALLBACK_MEMBER( stamp_timer_callback );
-
- void SegaCD_CDC_Do_DMA( int &dmacount, uint8_t *CDC_BUFFER, uint16_t &dma_addrc, uint16_t &destination );
protected:
sega_segacd_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);
// optional information overrides
- virtual machine_config_constructor device_mconfig_additions() const override;
+ virtual void device_add_mconfig(machine_config &config) override;
required_device<cpu_device> m_scdcpu;
required_device<rf5c68_device> m_rfsnd;
@@ -188,6 +181,14 @@ protected:
virtual void device_start() override;
virtual void device_reset() override;
+
+ TIMER_DEVICE_CALLBACK_MEMBER( dma_timer_callback );
+ IRQ_CALLBACK_MEMBER(segacd_sub_int_callback);
+
+ TIMER_DEVICE_CALLBACK_MEMBER( irq3_timer_callback );
+ TIMER_DEVICE_CALLBACK_MEMBER( stamp_timer_callback );
+
+ void SegaCD_CDC_Do_DMA( int &dmacount, uint8_t *CDC_BUFFER, uint16_t &dma_addrc, uint16_t &destination );
};
diff --git a/src/mame/machine/megacdcd.cpp b/src/mame/machine/megacdcd.cpp
index 156fa98132c..ac055834c90 100644
--- a/src/mame/machine/megacdcd.cpp
+++ b/src/mame/machine/megacdcd.cpp
@@ -1184,9 +1184,7 @@ TIMER_DEVICE_CALLBACK_MEMBER( lc89510_temp_device::segacd_access_timer_callback
}
-
-
-static MACHINE_CONFIG_START( lc89510_temp_fragment )
+MACHINE_CONFIG_MEMBER( lc89510_temp_device::device_add_mconfig )
MCFG_TIMER_DRIVER_ADD_PERIODIC("hock_timer", lc89510_temp_device, segacd_access_timer_callback, attotime::from_hz(75))
MCFG_SOUND_ADD( "cdda", CDDA, 0 )
@@ -1194,20 +1192,9 @@ static MACHINE_CONFIG_START( lc89510_temp_fragment )
MCFG_SOUND_ROUTE( 1, ":rspeaker", 0.50 )
MACHINE_CONFIG_END
-machine_config_constructor lc89510_temp_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME( lc89510_temp_fragment );
-}
-
-/* Neo CD */
-
-
-
-
-
-
+/* Neo CD */
void lc89510_temp_device::NeoCDCommsReset()
diff --git a/src/mame/machine/megacdcd.h b/src/mame/machine/megacdcd.h
index c933a2cb887..d334e229dc7 100644
--- a/src/mame/machine/megacdcd.h
+++ b/src/mame/machine/megacdcd.h
@@ -74,9 +74,6 @@ public:
char* LC8915InitTransfer(int NeoCDDMACount);
void LC8915EndTransfer();
-
- TIMER_DEVICE_CALLBACK_MEMBER( segacd_access_timer_callback );
-
protected:
static constexpr unsigned SECTOR_SIZE = 2352;
static constexpr unsigned EXTERNAL_BUFFER_SIZE = (32 * 1024 * 2) + SECTOR_SIZE;
@@ -195,7 +192,9 @@ protected:
virtual void device_start() override;
virtual void device_reset() override;
- virtual machine_config_constructor device_mconfig_additions() const override;
+ virtual void device_add_mconfig(machine_config &config) override;
+
+ TIMER_DEVICE_CALLBACK_MEMBER( segacd_access_timer_callback );
};
DECLARE_DEVICE_TYPE(LC89510_TEMP, lc89510_temp_device)
diff --git a/src/mame/machine/midwayic.cpp b/src/mame/machine/midwayic.cpp
index 15fc63ff119..0e88511a3d0 100644
--- a/src/mame/machine/midwayic.cpp
+++ b/src/mame/machine/midwayic.cpp
@@ -249,7 +249,7 @@ WRITE8_MEMBER(midway_serial_pic_emu_device::write_c)
// printf("%s: write_c %02x\n", space.machine().describe_context(), data);
}
-static MACHINE_CONFIG_START( midway_pic )
+MACHINE_CONFIG_MEMBER( midway_serial_pic_emu_device::device_add_mconfig )
MCFG_CPU_ADD("pic", PIC16C57, 12000000) /* ? Mhz */
MCFG_PIC16C5x_WRITE_A_CB(WRITE8(midway_serial_pic_emu_device, write_a))
MCFG_PIC16C5x_READ_B_CB(READ8(midway_serial_pic_emu_device, read_b))
@@ -258,11 +258,6 @@ static MACHINE_CONFIG_START( midway_pic )
MCFG_PIC16C5x_WRITE_C_CB(WRITE8(midway_serial_pic_emu_device, write_c))
MACHINE_CONFIG_END
-machine_config_constructor midway_serial_pic_emu_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME( midway_pic );
-}
-
/*************************************
*
diff --git a/src/mame/machine/midwayic.h b/src/mame/machine/midwayic.h
index 65a6c6cf8fb..48ccf3d98ad 100644
--- a/src/mame/machine/midwayic.h
+++ b/src/mame/machine/midwayic.h
@@ -64,19 +64,20 @@ public:
// construction/destruction
midway_serial_pic_emu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+protected:
+ midway_serial_pic_emu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);
+
+ // device-level overrides
+ virtual void device_add_mconfig(machine_config &config) override;
+ virtual void device_start() override;
+
+private:
DECLARE_READ8_MEMBER(read_a);
DECLARE_READ8_MEMBER(read_b);
DECLARE_READ8_MEMBER(read_c);
DECLARE_WRITE8_MEMBER(write_a);
DECLARE_WRITE8_MEMBER(write_b);
DECLARE_WRITE8_MEMBER(write_c);
-
-protected:
- midway_serial_pic_emu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);
-
- // device-level overrides
- virtual machine_config_constructor device_mconfig_additions() const override;
- virtual void device_start() override;
};
diff --git a/src/mame/machine/mie.cpp b/src/mame/machine/mie.cpp
index 7dd5cd450be..379865bf827 100644
--- a/src/mame/machine/mie.cpp
+++ b/src/mame/machine/mie.cpp
@@ -53,13 +53,6 @@ static ADDRESS_MAP_START( mie_port, AS_IO, 8, mie_device)
AM_RANGE(0x91, 0x91) AM_READ(jvs_sense_r)
ADDRESS_MAP_END
-static MACHINE_CONFIG_START( mie )
- MCFG_CPU_ADD("mie", Z80, DERIVED_CLOCK(1,1))
- MCFG_CPU_PROGRAM_MAP(mie_map)
- MCFG_CPU_IO_MAP(mie_port)
- MCFG_CPU_IRQ_ACKNOWLEDGE_DEVICE(DEVICE_SELF, mie_device,irq_callback)
-MACHINE_CONFIG_END
-
ROM_START( mie )
ROM_REGION( 0x800, "mie", 0 )
ROM_LOAD( "315-6146.bin", 0x000, 0x800, CRC(9b197e35) SHA1(864d14d58732dd4e2ee538ccc71fa8df7013ba06))
@@ -82,10 +75,12 @@ const tiny_rom_entry *mie_device::device_rom_region() const
return ROM_NAME(mie);
}
-machine_config_constructor mie_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME(mie);
-}
+MACHINE_CONFIG_MEMBER( mie_device::device_add_mconfig )
+ MCFG_CPU_ADD("mie", Z80, DERIVED_CLOCK(1,1))
+ MCFG_CPU_PROGRAM_MAP(mie_map)
+ MCFG_CPU_IO_MAP(mie_port)
+ MCFG_CPU_IRQ_ACKNOWLEDGE_DEVICE(DEVICE_SELF, mie_device, irq_callback)
+MACHINE_CONFIG_END
mie_jvs_device::mie_jvs_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: jvs_host(mconfig, MIE_JVS, tag, owner, clock)
diff --git a/src/mame/machine/mie.h b/src/mame/machine/mie.h
index f74def20266..acd1e0b6922 100644
--- a/src/mame/machine/mie.h
+++ b/src/mame/machine/mie.h
@@ -36,10 +36,6 @@ public:
static void static_set_gpio_name(device_t &device, int entry, const char *name);
static void static_set_jvs_name(device_t &device, const char *name);
- // optional information overrides
- virtual const tiny_rom_entry *device_rom_region() const override;
- virtual machine_config_constructor device_mconfig_additions() const override;
-
DECLARE_READ8_MEMBER(control_r);
DECLARE_WRITE8_MEMBER(control_w);
DECLARE_READ8_MEMBER(lreg_r);
@@ -72,8 +68,6 @@ public:
DECLARE_READ8_MEMBER(read_00);
DECLARE_READ8_MEMBER(read_78xx);
- IRQ_CALLBACK_MEMBER(irq_callback);
-
void maple_w(const uint32_t *data, uint32_t in_size) override;
virtual void maple_reset() override;
@@ -86,6 +80,10 @@ protected:
virtual void device_reset() override;
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
+ // optional information overrides
+ virtual const tiny_rom_entry *device_rom_region() const override;
+ virtual void device_add_mconfig(machine_config &config) override;
+
private:
enum { TBUF_SIZE = 8 };
@@ -117,6 +115,7 @@ private:
void raise_irq(int level);
void recalc_irq();
+ IRQ_CALLBACK_MEMBER(irq_callback);
};
// Trampoline class, required for device discovery
diff --git a/src/mame/machine/mm1kb.cpp b/src/mame/machine/mm1kb.cpp
index 05f7f788764..56b6cb9813f 100644
--- a/src/mame/machine/mm1kb.cpp
+++ b/src/mame/machine/mm1kb.cpp
@@ -17,7 +17,7 @@
// DEVICE DEFINITIONS
//**************************************************************************
-DEFINE_DEVICE_TYPE(MM1_KEYBOARD, mm1_keyoard_device, "mm1kb", "MikroMikko 1 keyboard")
+DEFINE_DEVICE_TYPE(MM1_KEYBOARD, mm1_keyboard_device, "mm1kb", "MikroMikko 1 keyboard")
//-------------------------------------------------
@@ -34,7 +34,7 @@ ROM_END
// rom_region - device-specific ROM region
//-------------------------------------------------
-const tiny_rom_entry *mm1_keyoard_device::device_rom_region() const
+const tiny_rom_entry *mm1_keyboard_device::device_rom_region() const
{
return ROM_NAME( mm1_keyboard );
}
@@ -51,13 +51,13 @@ static const char *const mm1_kb_sample_names[] =
nullptr
};
-bool mm1_keyoard_device::first_time = true;
+bool mm1_keyboard_device::first_time = true;
//-------------------------------------------------
-// MACHINE_DRIVER( mm1_keyboard )
+// device_add_mconfig - add device configuration
//-------------------------------------------------
-static MACHINE_CONFIG_START( mm1_keyboard )
+MACHINE_CONFIG_MEMBER( mm1_keyboard_device::device_add_mconfig )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("keyboard_and_chassis_sounds", SAMPLES, 0)
MCFG_SAMPLES_CHANNELS(2)
@@ -67,17 +67,6 @@ MACHINE_CONFIG_END
//-------------------------------------------------
-// machine_config_additions - device-specific
-// machine configurations
-//-------------------------------------------------
-
-machine_config_constructor mm1_keyoard_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME( mm1_keyboard );
-}
-
-
-//-------------------------------------------------
// INPUT_PORTS( mm1_keyboard )
//-------------------------------------------------
@@ -193,7 +182,7 @@ INPUT_PORTS_END
// input_ports - device-specific input ports
//-------------------------------------------------
-ioport_constructor mm1_keyoard_device::device_input_ports() const
+ioport_constructor mm1_keyboard_device::device_input_ports() const
{
return INPUT_PORTS_NAME( mm1_keyboard );
}
@@ -205,10 +194,10 @@ ioport_constructor mm1_keyoard_device::device_input_ports() const
//**************************************************************************
//-------------------------------------------------
-// mm1_keyoard_device - constructor
+// mm1_keyboard_device - constructor
//-------------------------------------------------
-mm1_keyoard_device::mm1_keyoard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
+mm1_keyboard_device::mm1_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
device_t(mconfig, MM1_KEYBOARD, tag, owner, clock),
m_write_kbst(*this),
m_samples(*this, "keyboard_and_chassis_sounds"),
@@ -230,7 +219,7 @@ enum
// device_start - device-specific startup
//-------------------------------------------------
-void mm1_keyoard_device::device_start()
+void mm1_keyboard_device::device_start()
{
// resolve callbacks
m_write_kbst.resolve_safe();
@@ -240,7 +229,7 @@ void mm1_keyoard_device::device_start()
m_scan_timer->adjust(attotime::from_hz(clock()), 0, attotime::from_hz(clock()));
// add notification request for system shut down (to play back the power switch sound once more)
- machine().add_notifier(MACHINE_NOTIFY_EXIT, machine_notify_delegate(&mm1_keyoard_device::shut_down_mm1, this));
+ machine().add_notifier(MACHINE_NOTIFY_EXIT, machine_notify_delegate(&mm1_keyboard_device::shut_down_mm1, this));
// state saving
save_item(NAME(m_sense));
@@ -248,7 +237,7 @@ void mm1_keyoard_device::device_start()
save_item(NAME(m_data));
}
-void mm1_keyoard_device::shut_down_mm1()
+void mm1_keyboard_device::shut_down_mm1()
{
m_samples->start(1, 1); // pretty useless this, as far as there is no way to delay the shut down process...
}
@@ -257,7 +246,7 @@ void mm1_keyoard_device::shut_down_mm1()
// device_timer - handler timer events
//-------------------------------------------------
-void mm1_keyoard_device::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
+void mm1_keyboard_device::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
{
// handle scan timer
uint8_t data = 0xff;
diff --git a/src/mame/machine/mm1kb.h b/src/mame/machine/mm1kb.h
index ce5af33d784..a6531c5015d 100644
--- a/src/mame/machine/mm1kb.h
+++ b/src/mame/machine/mm1kb.h
@@ -20,7 +20,7 @@
//**************************************************************************
#define MCFG_MM1_KEYBOARD_KBST_CALLBACK(_write) \
- devcb = &mm1_keyoard_device::set_kbst_wr_callback(*device, DEVCB_##_write);
+ devcb = &mm1_keyboard_device::set_kbst_wr_callback(*device, DEVCB_##_write);
@@ -28,20 +28,15 @@
// TYPE DEFINITIONS
//**************************************************************************
-// ======================> mm1_keyoard_device
+// ======================> mm1_keyboard_device
-class mm1_keyoard_device : public device_t
+class mm1_keyboard_device : public device_t
{
public:
// construction/destruction
- mm1_keyoard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ mm1_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- template <class Object> static devcb_base &set_kbst_wr_callback(device_t &device, Object &&cb) { return downcast<mm1_keyoard_device &>(device).m_write_kbst.set_callback(std::forward<Object>(cb)); }
-
- // optional information overrides
- virtual const tiny_rom_entry *device_rom_region() const override;
- virtual machine_config_constructor device_mconfig_additions() const override;
- virtual ioport_constructor device_input_ports() const override;
+ template <class Object> static devcb_base &set_kbst_wr_callback(device_t &device, Object &&cb) { return downcast<mm1_keyboard_device &>(device).m_write_kbst.set_callback(std::forward<Object>(cb)); }
DECLARE_READ8_MEMBER( read ) { return m_data; }
@@ -65,6 +60,11 @@ protected:
virtual void device_start() override;
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
+ // optional information overrides
+ virtual const tiny_rom_entry *device_rom_region() const override;
+ virtual void device_add_mconfig(machine_config &config) override;
+ virtual ioport_constructor device_input_ports() const override;
+
private:
devcb_write_line m_write_kbst;
@@ -83,7 +83,7 @@ private:
// device type definition
-DECLARE_DEVICE_TYPE(MM1_KEYBOARD, mm1_keyoard_device)
+DECLARE_DEVICE_TYPE(MM1_KEYBOARD, mm1_keyboard_device)
diff --git a/src/mame/machine/ms7004.cpp b/src/mame/machine/ms7004.cpp
index 11be5b167e8..2404e290e82 100644
--- a/src/mame/machine/ms7004.cpp
+++ b/src/mame/machine/ms7004.cpp
@@ -51,11 +51,12 @@ static ADDRESS_MAP_START( ms7004_map, AS_PROGRAM, 8, ms7004_device )
AM_RANGE(0x0000, 0x07ff) AM_ROM
ADDRESS_MAP_END
+
//-------------------------------------------------
-// MACHINE_CONFIG
+// device_add_mconfig - add device configuration
//-------------------------------------------------
-static MACHINE_CONFIG_START( ms7004 )
+MACHINE_CONFIG_MEMBER( ms7004_device::device_add_mconfig )
MCFG_CPU_ADD(MS7004_CPU_TAG, I8035, XTAL_4_608MHz)
MCFG_CPU_PROGRAM_MAP(ms7004_map)
MCFG_MCS48_PORT_P1_OUT_CB(WRITE8(ms7004_device, p1_w))
@@ -70,17 +71,6 @@ static MACHINE_CONFIG_START( ms7004 )
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
MACHINE_CONFIG_END
-
-//-------------------------------------------------
-// machine_config_additions - device-specific
-// machine configurations
-//-------------------------------------------------
-
-machine_config_constructor ms7004_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME( ms7004 );
-}
-
const tiny_rom_entry *ms7004_device::device_rom_region() const
{
return ROM_NAME( ms7004 );
diff --git a/src/mame/machine/ms7004.h b/src/mame/machine/ms7004.h
index f8bf4b1def2..74e249de875 100644
--- a/src/mame/machine/ms7004.h
+++ b/src/mame/machine/ms7004.h
@@ -40,16 +40,11 @@ public:
template <class Object> static devcb_base &set_tx_handler(device_t &device, Object &&wr) { return downcast<ms7004_device &>(device).m_tx_handler.set_callback(std::forward<Object>(wr)); }
template <class Object> static devcb_base &set_rts_handler(device_t &device, Object &&wr) { return downcast<ms7004_device &>(device).m_rts_handler.set_callback(std::forward<Object>(wr)); }
- DECLARE_WRITE8_MEMBER( p1_w );
- DECLARE_WRITE8_MEMBER( p2_w );
- DECLARE_READ_LINE_MEMBER( t1_r );
- DECLARE_WRITE8_MEMBER( i8243_port_w );
-
DECLARE_WRITE_LINE_MEMBER( write_rxd );
protected:
// device-level overrides
- virtual machine_config_constructor device_mconfig_additions() const override;
+ virtual void device_add_mconfig(machine_config &config) override;
virtual const tiny_rom_entry *device_rom_region() const override;
virtual ioport_constructor device_input_ports() const override;
virtual void device_start() override;
@@ -68,6 +63,11 @@ private:
devcb_write_line m_tx_handler;
devcb_write_line m_rts_handler;
+
+ DECLARE_WRITE8_MEMBER( p1_w );
+ DECLARE_WRITE8_MEMBER( p2_w );
+ DECLARE_READ_LINE_MEMBER( t1_r );
+ DECLARE_WRITE8_MEMBER( i8243_port_w );
};
// device type definition
diff --git a/src/mame/machine/namco50.cpp b/src/mame/machine/namco50.cpp
index 13d7cd95d59..f36601b1d85 100644
--- a/src/mame/machine/namco50.cpp
+++ b/src/mame/machine/namco50.cpp
@@ -225,12 +225,6 @@ static ADDRESS_MAP_START( namco_50xx_map_io, AS_IO, 8, namco_50xx_device )
ADDRESS_MAP_END
-static MACHINE_CONFIG_START( namco_50xx )
- MCFG_CPU_ADD("mcu", MB8842, DERIVED_CLOCK(1,1)) /* parent clock, internally divided by 6 */
- MCFG_CPU_IO_MAP(namco_50xx_map_io)
-MACHINE_CONFIG_END
-
-
ROM_START( namco_50xx )
ROM_REGION( 0x800, "mcu", 0 )
ROM_LOAD( "50xx.bin", 0x0000, 0x0800, CRC(a0acbaf7) SHA1(f03c79451e73b3a93c1591cdb27fedc9f130508d) )
@@ -261,14 +255,13 @@ void namco_50xx_device::device_start()
}
//-------------------------------------------------
-// device_mconfig_additions - return a pointer to
-// the device's machine fragment
+// device_add_mconfig - add device configuration
//-------------------------------------------------
-machine_config_constructor namco_50xx_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME( namco_50xx );
-}
+MACHINE_CONFIG_MEMBER( namco_50xx_device::device_add_mconfig )
+ MCFG_CPU_ADD("mcu", MB8842, DERIVED_CLOCK(1,1)) /* parent clock, internally divided by 6 */
+ MCFG_CPU_IO_MAP(namco_50xx_map_io)
+MACHINE_CONFIG_END
//-------------------------------------------------
// device_rom_region - return a pointer to the
diff --git a/src/mame/machine/namco50.h b/src/mame/machine/namco50.h
index ed9dfda7bd3..4c132b4aa70 100644
--- a/src/mame/machine/namco50.h
+++ b/src/mame/machine/namco50.h
@@ -30,7 +30,7 @@ protected:
// device-level overrides
virtual void device_start() override;
virtual const tiny_rom_entry *device_rom_region() const override;
- virtual machine_config_constructor device_mconfig_additions() const override;
+ virtual void device_add_mconfig(machine_config &config) override;
TIMER_CALLBACK_MEMBER( latch_callback );
TIMER_CALLBACK_MEMBER( readrequest_callback );
diff --git a/src/mame/machine/namco51.cpp b/src/mame/machine/namco51.cpp
index 8cf5e506898..2fe1b736d79 100644
--- a/src/mame/machine/namco51.cpp
+++ b/src/mame/machine/namco51.cpp
@@ -329,13 +329,6 @@ static ADDRESS_MAP_START( namco_51xx_map_io, AS_IO, 8, namco_51xx_device )
ADDRESS_MAP_END
-static MACHINE_CONFIG_START( namco_51xx )
- MCFG_CPU_ADD("mcu", MB8843, DERIVED_CLOCK(1,1)) /* parent clock, internally divided by 6 */
- MCFG_CPU_IO_MAP(namco_51xx_map_io)
- MCFG_DEVICE_DISABLE()
-MACHINE_CONFIG_END
-
-
ROM_START( namco_51xx )
ROM_REGION( 0x400, "mcu", 0 )
ROM_LOAD( "51xx.bin", 0x0000, 0x0400, CRC(c2f57ef8) SHA1(50de79e0d6a76bda95ffb02fcce369a79e6abfec) )
@@ -400,14 +393,14 @@ void namco_51xx_device::device_reset()
}
//-------------------------------------------------
-// device_mconfig_additions - return a pointer to
-// the device's machine fragment
+// device_add_mconfig - add device configuration
//-------------------------------------------------
-machine_config_constructor namco_51xx_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME( namco_51xx );
-}
+MACHINE_CONFIG_MEMBER( namco_51xx_device::device_add_mconfig )
+ MCFG_CPU_ADD("mcu", MB8843, DERIVED_CLOCK(1,1)) /* parent clock, internally divided by 6 */
+ MCFG_CPU_IO_MAP(namco_51xx_map_io)
+ MCFG_DEVICE_DISABLE()
+MACHINE_CONFIG_END
//-------------------------------------------------
// device_rom_region - return a pointer to the
diff --git a/src/mame/machine/namco51.h b/src/mame/machine/namco51.h
index bbdb17dcd04..c1f0a1d66f8 100644
--- a/src/mame/machine/namco51.h
+++ b/src/mame/machine/namco51.h
@@ -46,7 +46,8 @@ protected:
virtual void device_start() override;
virtual void device_reset() override;
virtual const tiny_rom_entry *device_rom_region() const override;
- virtual machine_config_constructor device_mconfig_additions() const override;
+ virtual void device_add_mconfig(machine_config &config) override;
+
private:
// internal state
required_device<mb88_cpu_device> m_cpu;
diff --git a/src/mame/machine/namco53.cpp b/src/mame/machine/namco53.cpp
index 52319e0302f..79ea617b26d 100644
--- a/src/mame/machine/namco53.cpp
+++ b/src/mame/machine/namco53.cpp
@@ -126,12 +126,6 @@ static ADDRESS_MAP_START( namco_53xx_map_io, AS_IO, 8,namco_53xx_device )
ADDRESS_MAP_END
-static MACHINE_CONFIG_START( namco_53xx )
- MCFG_CPU_ADD("mcu", MB8843, DERIVED_CLOCK(1,1)) /* parent clock, internally divided by 6 */
- MCFG_CPU_IO_MAP(namco_53xx_map_io)
-MACHINE_CONFIG_END
-
-
ROM_START( namco_53xx )
ROM_REGION( 0x400, "mcu", 0 )
ROM_LOAD( "53xx.bin", 0x0000, 0x0400, CRC(b326fecb) SHA1(758d8583d658e4f1df93184009d86c3eb8713899) )
@@ -164,14 +158,13 @@ void namco_53xx_device::device_start()
}
//-------------------------------------------------
-// device_mconfig_additions - return a pointer to
-// the device's machine fragment
+// device_add_mconfig - add device configuration
//-------------------------------------------------
-machine_config_constructor namco_53xx_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME( namco_53xx );
-}
+MACHINE_CONFIG_MEMBER( namco_53xx_device::device_add_mconfig )
+ MCFG_CPU_ADD("mcu", MB8843, DERIVED_CLOCK(1,1)) /* parent clock, internally divided by 6 */
+ MCFG_CPU_IO_MAP(namco_53xx_map_io)
+MACHINE_CONFIG_END
//-------------------------------------------------
// device_rom_region - return a pointer to the
diff --git a/src/mame/machine/namco53.h b/src/mame/machine/namco53.h
index 3526fb9176a..86f0360002a 100644
--- a/src/mame/machine/namco53.h
+++ b/src/mame/machine/namco53.h
@@ -51,7 +51,7 @@ protected:
// device-level overrides
virtual void device_start() override;
virtual const tiny_rom_entry *device_rom_region() const override;
- virtual machine_config_constructor device_mconfig_additions() const override;
+ virtual void device_add_mconfig(machine_config &config) override;
TIMER_CALLBACK_MEMBER( irq_clear );
private:
diff --git a/src/mame/machine/namco62.cpp b/src/mame/machine/namco62.cpp
index 34876c9faac..2131a8d2e07 100644
--- a/src/mame/machine/namco62.cpp
+++ b/src/mame/machine/namco62.cpp
@@ -30,12 +30,6 @@ static ADDRESS_MAP_START( namco_62xx_map_io, AS_IO, 8, namco_62xx_device )
ADDRESS_MAP_END
-static MACHINE_CONFIG_START( namco_62xx )
- MCFG_CPU_ADD("mcu", MB8843, DERIVED_CLOCK(1,1)) /* parent clock, internally divided by 6 (TODO: Correct?) */
- MCFG_CPU_IO_MAP(namco_62xx_map_io)
- MCFG_DEVICE_DISABLE()
-MACHINE_CONFIG_END
-
ROM_START( namco_62xx )
ROM_REGION( 0x800, "mcu", 0 )
ROM_LOAD( "62xx.bin", 0x0000, 0x0800, CRC(308dc115) SHA1(fe0a60fc339ac2eeed4879a64c1aab130f9d4cfe) )
@@ -68,14 +62,14 @@ void namco_62xx_device::device_start()
}
//-------------------------------------------------
-// device_mconfig_additions - return a pointer to
-// the device's machine fragment
+// device_add_mconfig - add device configuration
//-------------------------------------------------
-machine_config_constructor namco_62xx_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME( namco_62xx );
-}
+MACHINE_CONFIG_MEMBER( namco_62xx_device::device_add_mconfig )
+ MCFG_CPU_ADD("mcu", MB8843, DERIVED_CLOCK(1,1)) /* parent clock, internally divided by 6 (TODO: Correct?) */
+ MCFG_CPU_IO_MAP(namco_62xx_map_io)
+ MCFG_DEVICE_DISABLE()
+MACHINE_CONFIG_END
//-------------------------------------------------
// device_rom_region - return a pointer to the
diff --git a/src/mame/machine/namco62.h b/src/mame/machine/namco62.h
index d21f186a6e5..c2b882c29a1 100644
--- a/src/mame/machine/namco62.h
+++ b/src/mame/machine/namco62.h
@@ -35,11 +35,12 @@ public:
template <unsigned N, class Object> static devcb_base &set_input_callback(device_t &device, Object &&cb) { return downcast<namco_62xx_device &>(device).m_in[N].set_callback(std::forward<Object>(cb)); }
template <unsigned N, class Object> static devcb_base &set_output_callback(device_t &device, Object &&cb) { return downcast<namco_62xx_device &>(device).m_out[N].set_callback(std::forward<Object>(cb)); }
+
protected:
// device-level overrides
virtual void device_start() override;
virtual const tiny_rom_entry *device_rom_region() const override;
- virtual machine_config_constructor device_mconfig_additions() const override;
+ virtual void device_add_mconfig(machine_config &config) override;
private:
// internal state
diff --git a/src/mame/machine/naomim2.cpp b/src/mame/machine/naomim2.cpp
index b91f5101229..aaaa089135b 100644
--- a/src/mame/machine/naomim2.cpp
+++ b/src/mame/machine/naomim2.cpp
@@ -200,12 +200,7 @@ uint16_t naomi_m2_board::read_callback(uint32_t addr)
}
}
-static MACHINE_CONFIG_START( naomim2 )
+MACHINE_CONFIG_MEMBER( naomi_m2_board::device_add_mconfig )
MCFG_DEVICE_ADD("segam2crypt", SEGA315_5881_CRYPT, 0)
MCFG_SET_READ_CALLBACK(naomi_m2_board, read_callback)
MACHINE_CONFIG_END
-
-machine_config_constructor naomi_m2_board::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME( naomim2 );
-}
diff --git a/src/mame/machine/naomim2.h b/src/mame/machine/naomim2.h
index 3f916ad947e..3c8a3fba553 100644
--- a/src/mame/machine/naomim2.h
+++ b/src/mame/machine/naomim2.h
@@ -20,12 +20,10 @@ public:
static const int RAM_SIZE = 65536;
std::unique_ptr<uint8_t[]> ram;
- uint16_t read_callback(uint32_t addr);
-
protected:
virtual void device_start() override;
virtual void device_reset() override;
- virtual machine_config_constructor device_mconfig_additions() const override;
+ virtual void device_add_mconfig(machine_config &config) override;
virtual void board_setup_address(uint32_t address, bool is_dma) override;
virtual void board_get_buffer(uint8_t *&base, uint32_t &limit) override;
@@ -35,6 +33,8 @@ protected:
private:
required_device<sega_315_5881_crypt_device> m_cryptdevice;
required_memory_region m_region;
+
+ uint16_t read_callback(uint32_t addr);
};
DECLARE_DEVICE_TYPE(NAOMI_M2_BOARD, naomi_m2_board)
diff --git a/src/mame/machine/nmk004.cpp b/src/mame/machine/nmk004.cpp
index 7adedf9d279..5bc7893ba7e 100644
--- a/src/mame/machine/nmk004.cpp
+++ b/src/mame/machine/nmk004.cpp
@@ -81,13 +81,6 @@ static ADDRESS_MAP_START( nmk004_sound_io_map, AS_IO, 8, nmk004_device )
ADDRESS_MAP_END
-static MACHINE_CONFIG_START( nmk004 )
- MCFG_CPU_ADD("mcu",TMP90840, DERIVED_CLOCK(1,1)) // Toshiba TMP90C840AF in QFP64 package with 8Kbyte internal ROM
- MCFG_CPU_PROGRAM_MAP(nmk004_sound_mem_map)
- MCFG_CPU_IO_MAP(nmk004_sound_io_map)
-MACHINE_CONFIG_END
-
-
ROM_START( nmk004 )
ROM_REGION( 0x2000, "mcu", 0 )
ROM_LOAD( "nmk004.bin", 0x00000, 0x02000, CRC(83b6f611) SHA1(bb7ddc00affe8a066002ecd6858dbd2854af8940) )
@@ -118,13 +111,13 @@ void nmk004_device::device_start()
}
//-------------------------------------------------
-// device_mconfig_additions - return a pointer to
-// the device's machine fragment
+// device_add_mconfig - add device configuration
//-------------------------------------------------
-machine_config_constructor nmk004_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME( nmk004 );
-}
+MACHINE_CONFIG_MEMBER( nmk004_device::device_add_mconfig )
+ MCFG_CPU_ADD("mcu",TMP90840, DERIVED_CLOCK(1,1)) // Toshiba TMP90C840AF in QFP64 package with 8Kbyte internal ROM
+ MCFG_CPU_PROGRAM_MAP(nmk004_sound_mem_map)
+ MCFG_CPU_IO_MAP(nmk004_sound_io_map)
+MACHINE_CONFIG_END
//-------------------------------------------------
// device_rom_region - return a pointer to the
diff --git a/src/mame/machine/nmk004.h b/src/mame/machine/nmk004.h
index 273d539447d..65302841ec8 100644
--- a/src/mame/machine/nmk004.h
+++ b/src/mame/machine/nmk004.h
@@ -45,7 +45,7 @@ protected:
// device-level overrides
virtual void device_start() override;
virtual const tiny_rom_entry *device_rom_region() const override;
- virtual machine_config_constructor device_mconfig_additions() const override;
+ virtual void device_add_mconfig(machine_config &config) override;
private:
// internal state
diff --git a/src/mame/machine/pc1512kb.cpp b/src/mame/machine/pc1512kb.cpp
index 35c9a21a35f..a86f241e8d3 100644
--- a/src/mame/machine/pc1512kb.cpp
+++ b/src/mame/machine/pc1512kb.cpp
@@ -47,10 +47,10 @@ const tiny_rom_entry *pc1512_keyboard_device::device_rom_region() const
//-------------------------------------------------
-// MACHINE_DRIVER( pc1512_keyboard )
+// device_add_mconfig - add device configuration
//-------------------------------------------------
-static MACHINE_CONFIG_START( pc1512_keyboard )
+MACHINE_CONFIG_MEMBER( pc1512_keyboard_device::device_add_mconfig )
MCFG_CPU_ADD(I8048_TAG, I8048, XTAL_6MHz)
MCFG_MCS48_PORT_BUS_IN_CB(READ8(pc1512_keyboard_device, kb_bus_r))
MCFG_MCS48_PORT_P1_OUT_CB(WRITE8(pc1512_keyboard_device, kb_p1_w))
@@ -64,17 +64,6 @@ MACHINE_CONFIG_END
//-------------------------------------------------
-// machine_config_additions - device-specific
-// machine configurations
-//-------------------------------------------------
-
-machine_config_constructor pc1512_keyboard_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME( pc1512_keyboard );
-}
-
-
-//-------------------------------------------------
// INPUT_PORTS( pc1512_keyboard )
//-------------------------------------------------
diff --git a/src/mame/machine/pc1512kb.h b/src/mame/machine/pc1512kb.h
index 469c744d909..ec6de694946 100644
--- a/src/mame/machine/pc1512kb.h
+++ b/src/mame/machine/pc1512kb.h
@@ -52,29 +52,22 @@ public:
template <class Object> static devcb_base &set_clock_wr_callback(device_t &device, Object &&cb) { return downcast<pc1512_keyboard_device &>(device).m_write_clock.set_callback(std::forward<Object>(cb)); }
template <class Object> static devcb_base &set_data_wr_callback(device_t &device, Object &&cb) { return downcast<pc1512_keyboard_device &>(device).m_write_data.set_callback(std::forward<Object>(cb)); }
- // optional information overrides
- virtual const tiny_rom_entry *device_rom_region() const override;
- virtual machine_config_constructor device_mconfig_additions() const override;
- virtual ioport_constructor device_input_ports() const override;
-
DECLARE_WRITE_LINE_MEMBER( data_w );
DECLARE_WRITE_LINE_MEMBER( clock_w );
DECLARE_WRITE_LINE_MEMBER( m1_w );
DECLARE_WRITE_LINE_MEMBER( m2_w );
- DECLARE_READ8_MEMBER( kb_bus_r );
- DECLARE_WRITE8_MEMBER( kb_p1_w );
- DECLARE_READ8_MEMBER( kb_p2_r );
- DECLARE_WRITE8_MEMBER( kb_p2_w );
- DECLARE_READ_LINE_MEMBER( kb_t0_r );
- DECLARE_READ_LINE_MEMBER( kb_t1_r );
-
protected:
// device-level overrides
virtual void device_start() override;
virtual void device_reset() override;
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
+ // optional information overrides
+ virtual const tiny_rom_entry *device_rom_region() const override;
+ virtual void device_add_mconfig(machine_config &config) override;
+ virtual ioport_constructor device_input_ports() const override;
+
private:
enum
{
@@ -98,6 +91,13 @@ private:
int m_m2;
emu_timer *m_reset_timer;
+
+ DECLARE_READ8_MEMBER( kb_bus_r );
+ DECLARE_WRITE8_MEMBER( kb_p1_w );
+ DECLARE_READ8_MEMBER( kb_p2_r );
+ DECLARE_WRITE8_MEMBER( kb_p2_w );
+ DECLARE_READ_LINE_MEMBER( kb_t0_r );
+ DECLARE_READ_LINE_MEMBER( kb_t1_r );
};
diff --git a/src/mame/machine/pc9801_118.cpp b/src/mame/machine/pc9801_118.cpp
index fec79eedb75..1681dfe5df4 100644
--- a/src/mame/machine/pc9801_118.cpp
+++ b/src/mame/machine/pc9801_118.cpp
@@ -46,7 +46,11 @@ WRITE_LINE_MEMBER(pc9801_118_device::pc9801_sound_irq)
machine().device<pic8259_device>(":pic8259_slave")->ir4_w(state);
}
-static MACHINE_CONFIG_START( pc9801_118_config )
+//-------------------------------------------------
+// device_add_mconfig - add device configuration
+//-------------------------------------------------
+
+MACHINE_CONFIG_MEMBER( pc9801_118_device::device_add_mconfig )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("opn3", YM2608, MAIN_CLOCK_X2*4) // actually YMF288, unknown clock / divider, might be X1 x 5 actually
MCFG_YM2608_IRQ_HANDLER(WRITELINE(pc9801_118_device, pc9801_sound_irq))
@@ -57,16 +61,6 @@ static MACHINE_CONFIG_START( pc9801_118_config )
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
MACHINE_CONFIG_END
-//-------------------------------------------------
-// machine_config_additions - device-specific
-// machine configurations
-//-------------------------------------------------
-
-machine_config_constructor pc9801_118_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME( pc9801_118_config );
-}
-
//-------------------------------------------------
// input_ports - device-specific input ports
diff --git a/src/mame/machine/pc9801_118.h b/src/mame/machine/pc9801_118.h
index ea6d0397cb0..f9f66be540b 100644
--- a/src/mame/machine/pc9801_118.h
+++ b/src/mame/machine/pc9801_118.h
@@ -28,25 +28,20 @@ public:
// construction/destruction
pc9801_118_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- // optional information overrides
- virtual machine_config_constructor device_mconfig_additions() const override;
- virtual ioport_constructor device_input_ports() const override;
-
- DECLARE_READ8_MEMBER(opn_porta_r);
- DECLARE_WRITE8_MEMBER(opn_portb_w);
DECLARE_READ8_MEMBER(pc9801_118_r);
DECLARE_WRITE8_MEMBER(pc9801_118_w);
DECLARE_READ8_MEMBER(pc9801_118_ext_r);
DECLARE_WRITE8_MEMBER(pc9801_118_ext_w);
- DECLARE_WRITE_LINE_MEMBER(pc9801_sound_irq);
-
- virtual const tiny_rom_entry *device_rom_region() const override;
protected:
// device-level overrides
virtual void device_validity_check(validity_checker &valid) const override;
virtual void device_start() override;
virtual void device_reset() override;
+ // optional information overrides
+ virtual void device_add_mconfig(machine_config &config) override;
+ virtual ioport_constructor device_input_ports() const override;
+ virtual const tiny_rom_entry *device_rom_region() const override;
void install_device(offs_t start, offs_t end, read8_delegate rhandler, write8_delegate whandler);
private:
@@ -55,6 +50,10 @@ private:
uint8_t m_joy_sel;
uint8_t m_ext_reg;
+
+ DECLARE_READ8_MEMBER(opn_porta_r);
+ DECLARE_WRITE8_MEMBER(opn_portb_w);
+ DECLARE_WRITE_LINE_MEMBER(pc9801_sound_irq);
};
diff --git a/src/mame/machine/pc9801_26.cpp b/src/mame/machine/pc9801_26.cpp
index f6881285f9b..ab509584137 100644
--- a/src/mame/machine/pc9801_26.cpp
+++ b/src/mame/machine/pc9801_26.cpp
@@ -46,7 +46,12 @@ WRITE_LINE_MEMBER(pc9801_26_device::pc9801_sound_irq)
machine().device<pic8259_device>(":pic8259_slave")->ir4_w(state);
}
-static MACHINE_CONFIG_START( pc9801_26_config )
+
+//-------------------------------------------------
+// device_add_mconfig - add device configuration
+//-------------------------------------------------
+
+MACHINE_CONFIG_MEMBER( pc9801_26_device::device_add_mconfig )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("opn", YM2203, MAIN_CLOCK_X1*2) // unknown clock / divider
MCFG_YM2203_IRQ_HANDLER(WRITELINE(pc9801_26_device, pc9801_sound_irq))
@@ -57,16 +62,6 @@ static MACHINE_CONFIG_START( pc9801_26_config )
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
MACHINE_CONFIG_END
-//-------------------------------------------------
-// machine_config_additions - device-specific
-// machine configurations
-//-------------------------------------------------
-
-machine_config_constructor pc9801_26_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME( pc9801_26_config );
-}
-
//-------------------------------------------------
// input_ports - device-specific input ports
diff --git a/src/mame/machine/pc9801_26.h b/src/mame/machine/pc9801_26.h
index 1aa42a013e9..67dbbf18c1a 100644
--- a/src/mame/machine/pc9801_26.h
+++ b/src/mame/machine/pc9801_26.h
@@ -28,21 +28,17 @@ public:
// construction/destruction
pc9801_26_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- // optional information overrides
- virtual machine_config_constructor device_mconfig_additions() const override;
- virtual ioport_constructor device_input_ports() const override;
-
- DECLARE_READ8_MEMBER(opn_porta_r);
- DECLARE_WRITE8_MEMBER(opn_portb_w);
DECLARE_READ8_MEMBER(pc9801_26_r);
DECLARE_WRITE8_MEMBER(pc9801_26_w);
- DECLARE_WRITE_LINE_MEMBER(pc9801_sound_irq);
protected:
// device-level overrides
virtual void device_validity_check(validity_checker &valid) const override;
virtual void device_start() override;
virtual void device_reset() override;
+ // optional information overrides
+ virtual void device_add_mconfig(machine_config &config) override;
+ virtual ioport_constructor device_input_ports() const override;
void install_device(offs_t start, offs_t end, read8_delegate rhandler, write8_delegate whandler);
private:
@@ -50,6 +46,10 @@ private:
required_device<ym2203_device> m_opn;
uint8_t m_joy_sel;
+
+ DECLARE_WRITE_LINE_MEMBER(pc9801_sound_irq);
+ DECLARE_READ8_MEMBER(opn_porta_r);
+ DECLARE_WRITE8_MEMBER(opn_portb_w);
};
diff --git a/src/mame/machine/pc9801_86.cpp b/src/mame/machine/pc9801_86.cpp
index cc5f5436dfd..29f94f2fa4c 100644
--- a/src/mame/machine/pc9801_86.cpp
+++ b/src/mame/machine/pc9801_86.cpp
@@ -48,7 +48,12 @@ WRITE_LINE_MEMBER(pc9801_86_device::sound_irq)
machine().device<pic8259_device>(":pic8259_slave")->ir4_w(state || (m_pcmirq ? ASSERT_LINE : CLEAR_LINE));
}
-static MACHINE_CONFIG_START( pc9801_86_config )
+
+//-------------------------------------------------
+// device_add_mconfig - add device configuration
+//-------------------------------------------------
+
+MACHINE_CONFIG_MEMBER( pc9801_86_device::device_add_mconfig )
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
MCFG_SOUND_ADD("opna", YM2608, MAIN_CLOCK_X1*4) // unknown clock / divider
MCFG_YM2608_IRQ_HANDLER(WRITELINE(pc9801_86_device, sound_irq))
@@ -65,16 +70,6 @@ static MACHINE_CONFIG_START( pc9801_86_config )
MCFG_SOUND_ROUTE_EX(0, "rdac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "rdac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
-//-------------------------------------------------
-// machine_config_additions - device-specific
-// machine configurations
-//-------------------------------------------------
-
-machine_config_constructor pc9801_86_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME( pc9801_86_config );
-}
-
// RAM
ROM_START( pc9801_86 )
ROM_REGION( 0x100000, "opna", ROMREGION_ERASE00 )
diff --git a/src/mame/machine/pc9801_86.h b/src/mame/machine/pc9801_86.h
index eb022a8a92d..4bb8de0701e 100644
--- a/src/mame/machine/pc9801_86.h
+++ b/src/mame/machine/pc9801_86.h
@@ -28,25 +28,22 @@ public:
// construction/destruction
pc9801_86_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- // optional information overrides
- virtual machine_config_constructor device_mconfig_additions() const override;
- virtual ioport_constructor device_input_ports() const override;
-
- DECLARE_READ8_MEMBER(opn_porta_r);
- DECLARE_WRITE8_MEMBER(opn_portb_w);
DECLARE_READ8_MEMBER(opn_r);
DECLARE_WRITE8_MEMBER(opn_w);
DECLARE_READ8_MEMBER(id_r);
DECLARE_WRITE8_MEMBER(mask_w);
DECLARE_READ8_MEMBER(pcm_r);
DECLARE_WRITE8_MEMBER(pcm_w);
- DECLARE_WRITE_LINE_MEMBER(sound_irq);
- virtual const tiny_rom_entry *device_rom_region() const override;
+
protected:
// device-level overrides
virtual void device_validity_check(validity_checker &valid) const override;
virtual void device_start() override;
virtual void device_reset() override;
+ // optional information overrides
+ virtual void device_add_mconfig(machine_config &config) override;
+ virtual ioport_constructor device_input_ports() const override;
+ virtual const tiny_rom_entry *device_rom_region() const override;
void install_device(offs_t start, offs_t end, read8_delegate rhandler, write8_delegate whandler);
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
@@ -62,6 +59,10 @@ private:
required_device<dac_word_interface> m_rdac;
std::vector<uint8_t> m_queue;
emu_timer *m_dac_timer;
+
+ DECLARE_WRITE_LINE_MEMBER(sound_irq);
+ DECLARE_READ8_MEMBER(opn_porta_r);
+ DECLARE_WRITE8_MEMBER(opn_portb_w);
};
diff --git a/src/mame/machine/pcd_kbd.cpp b/src/mame/machine/pcd_kbd.cpp
index 9b20689c4cc..a4b9bd4689b 100644
--- a/src/mame/machine/pcd_kbd.cpp
+++ b/src/mame/machine/pcd_kbd.cpp
@@ -26,7 +26,7 @@ static ADDRESS_MAP_START( pcd_keyboard_map, AS_PROGRAM, 8, pcd_keyboard_device )
AM_RANGE(0x000, 0xfff) AM_ROM
ADDRESS_MAP_END
-static MACHINE_CONFIG_START( pcd_keyboard )
+MACHINE_CONFIG_MEMBER( pcd_keyboard_device::device_add_mconfig )
MCFG_CPU_ADD("mcu", I8035, 5760000*2) // FIXME: the mc2661 baud rate calculation
MCFG_CPU_PROGRAM_MAP(pcd_keyboard_map)
MCFG_MCS48_PORT_BUS_IN_CB(READ8(pcd_keyboard_device, bus_r))
@@ -40,10 +40,6 @@ static MACHINE_CONFIG_START( pcd_keyboard )
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
MACHINE_CONFIG_END
-machine_config_constructor pcd_keyboard_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME( pcd_keyboard );
-}
INPUT_PORTS_START( pcd_keyboard )
PORT_START("ROW.0")
diff --git a/src/mame/machine/pcd_kbd.h b/src/mame/machine/pcd_kbd.h
index de373132a6b..efbfef33911 100644
--- a/src/mame/machine/pcd_kbd.h
+++ b/src/mame/machine/pcd_kbd.h
@@ -15,23 +15,25 @@ public:
template <class Object> static devcb_base &set_out_tx_handler(device_t &device, Object &&cb) { return downcast<pcd_keyboard_device &>(device).m_out_tx_handler.set_callback(std::forward<Object>(cb)); }
+ DECLARE_WRITE_LINE_MEMBER( t0_w );
+
+protected:
virtual const tiny_rom_entry *device_rom_region() const override;
- virtual machine_config_constructor device_mconfig_additions() const override;
+ virtual void device_add_mconfig(machine_config &config) override;
virtual ioport_constructor device_input_ports() const override;
void device_start() override;
- DECLARE_READ8_MEMBER( bus_r );
- DECLARE_READ8_MEMBER( p1_r );
- DECLARE_WRITE8_MEMBER( p1_w );
- DECLARE_READ_LINE_MEMBER( t0_r );
- DECLARE_WRITE_LINE_MEMBER( t0_w );
-
private:
required_ioport_array<17> m_rows;
uint8_t m_p1;
bool m_t0;
devcb_write_line m_out_tx_handler;
+
+ DECLARE_READ8_MEMBER( bus_r );
+ DECLARE_READ8_MEMBER( p1_r );
+ DECLARE_WRITE8_MEMBER( p1_w );
+ DECLARE_READ_LINE_MEMBER( t0_r );
};
extern const device_type PCD_KEYBOARD;
diff --git a/src/mame/machine/pce_cd.cpp b/src/mame/machine/pce_cd.cpp
index 81086e5d91b..bb82d695cd5 100644
--- a/src/mame/machine/pce_cd.cpp
+++ b/src/mame/machine/pce_cd.cpp
@@ -241,7 +241,7 @@ void pce_cd_device::nvram_init(nvram_device &nvram, void *data, size_t size)
}
// TODO: left and right speaker tags should be passed from the parent config, instead of using the hard-coded ones below!?!
-static MACHINE_CONFIG_START( pce_cd )
+ MACHINE_CONFIG_MEMBER( pce_cd_device::device_add_mconfig )
MCFG_NVRAM_ADD_CUSTOM_DRIVER("bram", pce_cd_device, nvram_init)
MCFG_CDROM_ADD("cdrom")
@@ -259,12 +259,6 @@ static MACHINE_CONFIG_START( pce_cd )
MACHINE_CONFIG_END
-machine_config_constructor pce_cd_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME( pce_cd );
-}
-
-
void pce_cd_device::adpcm_stop(uint8_t irq_flag)
{
m_regs[0x0c] |= PCE_CD_ADPCM_STOP_FLAG;
diff --git a/src/mame/machine/pce_cd.h b/src/mame/machine/pce_cd.h
index dba5682b082..c256aec9f14 100644
--- a/src/mame/machine/pce_cd.h
+++ b/src/mame/machine/pce_cd.h
@@ -46,11 +46,6 @@ public:
// construction/destruction
pce_cd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- // device-level overrides
- virtual void device_start() override;
- virtual machine_config_constructor device_mconfig_additions() const override;
- virtual void device_reset() override;
-
void update();
void late_setup();
@@ -58,12 +53,15 @@ public:
DECLARE_WRITE8_MEMBER(bram_w);
DECLARE_WRITE8_MEMBER(intf_w);
DECLARE_WRITE8_MEMBER(acard_w);
- DECLARE_WRITE_LINE_MEMBER(msm5205_int);
DECLARE_READ8_MEMBER(bram_r);
DECLARE_READ8_MEMBER(intf_r);
DECLARE_READ8_MEMBER(acard_r);
- void nvram_init(nvram_device &nvram, void *data, size_t size);
+protected:
+ // device-level overrides
+ virtual void device_start() override;
+ virtual void device_add_mconfig(machine_config &config) override;
+ virtual void device_reset() override;
private:
void adpcm_stop(uint8_t irq_flag);
@@ -170,6 +168,9 @@ private:
emu_timer *m_adpcm_fadeout_timer;
emu_timer *m_adpcm_fadein_timer;
double m_adpcm_volume;
+
+ DECLARE_WRITE_LINE_MEMBER(msm5205_int);
+ void nvram_init(nvram_device &nvram, void *data, size_t size);
};
diff --git a/src/mame/machine/rx01.cpp b/src/mame/machine/rx01.cpp
index 7aee467ef9a..7ce941a73bf 100644
--- a/src/mame/machine/rx01.cpp
+++ b/src/mame/machine/rx01.cpp
@@ -34,10 +34,6 @@ static const floppy_interface rx01_floppy_interface =
};
-MACHINE_CONFIG_START( rx01 )
- MCFG_LEGACY_FLOPPY_2_DRIVES_ADD(rx01_floppy_interface)
-MACHINE_CONFIG_END
-
//**************************************************************************
// DEVICE DEFINITIONS
//**************************************************************************
@@ -54,14 +50,12 @@ rx01_device::rx01_device(const machine_config &mconfig, const char *tag, device_
}
//-------------------------------------------------
-// machine_config_additions - device-specific
-// machine configurations
+// device_add_mconfig - add device configuration
//-------------------------------------------------
-machine_config_constructor rx01_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME( rx01 );
-}
+MACHINE_CONFIG_MEMBER( rx01_device::device_add_mconfig )
+ MCFG_LEGACY_FLOPPY_2_DRIVES_ADD(rx01_floppy_interface)
+MACHINE_CONFIG_END
//-------------------------------------------------
// device_start - device-specific startup
diff --git a/src/mame/machine/rx01.h b/src/mame/machine/rx01.h
index 0b9381ab3a4..19e416b26ab 100644
--- a/src/mame/machine/rx01.h
+++ b/src/mame/machine/rx01.h
@@ -35,12 +35,12 @@ public:
DECLARE_READ16_MEMBER( read );
DECLARE_WRITE16_MEMBER( write );
- // optional information overrides
- virtual machine_config_constructor device_mconfig_additions() const override;
protected:
// device-level overrides
virtual void device_start() override;
virtual void device_reset() override;
+ // optional information overrides
+ virtual void device_add_mconfig(machine_config &config) override;
void command_write(uint16_t data);
uint16_t status_read();
@@ -53,6 +53,7 @@ protected:
void position_head();
void read_sector();
void write_sector(int ddam);
+
private:
enum rx01_state {
RX01_FILL,
diff --git a/src/mame/machine/s32comm.cpp b/src/mame/machine/s32comm.cpp
index db4ff3d3f11..b8fb8df5151 100644
--- a/src/mame/machine/s32comm.cpp
+++ b/src/mame/machine/s32comm.cpp
@@ -73,8 +73,6 @@ Sega System Multi32 Comm PCB 837-8792-91
#define VERBOSE 0
#include "logmacro.h"
-MACHINE_CONFIG_START( s32comm )
-MACHINE_CONFIG_END
//**************************************************************************
// GLOBAL VARIABLES
@@ -83,14 +81,11 @@ MACHINE_CONFIG_END
DEFINE_DEVICE_TYPE(S32COMM, s32comm_device, "s32comm", "System 32 Communication Board")
//-------------------------------------------------
-// machine_config_additions - device-specific
-// machine configurations
+// device_add_mconfig - add device configuration
//-------------------------------------------------
-machine_config_constructor s32comm_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME( s32comm );
-}
+MACHINE_CONFIG_MEMBER( s32comm_device::device_add_mconfig )
+MACHINE_CONFIG_END
//**************************************************************************
// LIVE DEVICE
diff --git a/src/mame/machine/s32comm.h b/src/mame/machine/s32comm.h
index c88ec806f4a..658e2e9fcdd 100644
--- a/src/mame/machine/s32comm.h
+++ b/src/mame/machine/s32comm.h
@@ -20,9 +20,6 @@ public:
// construction/destruction
s32comm_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- // optional information overrides
- virtual machine_config_constructor device_mconfig_additions() const override;
-
// single bit registers (74LS74)
DECLARE_READ8_MEMBER(zfg_r);
DECLARE_WRITE8_MEMBER(zfg_w);
@@ -53,6 +50,8 @@ protected:
// device-level overrides
virtual void device_start() override;
virtual void device_reset() override;
+ // optional information overrides
+ virtual void device_add_mconfig(machine_config &config) override;
private:
uint8_t m_shared[0x800]; // 2k shared memory
diff --git a/src/mame/machine/st0016.cpp b/src/mame/machine/st0016.cpp
index e57830d80c3..352531878df 100644
--- a/src/mame/machine/st0016.cpp
+++ b/src/mame/machine/st0016.cpp
@@ -106,7 +106,7 @@ READ8_MEMBER(st0016_cpu_device::soundram_read)
}
/* CPU interface */
-static MACHINE_CONFIG_START( st0016_cpu )
+MACHINE_CONFIG_MEMBER( st0016_cpu_device::device_add_mconfig )
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
MCFG_PALETTE_ADD("palette", 16*16*4+1)
@@ -118,17 +118,6 @@ static MACHINE_CONFIG_START( st0016_cpu )
MACHINE_CONFIG_END
-machine_config_constructor st0016_cpu_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME( st0016_cpu );
-}
-
-
-
-
-
-
-
static const gfx_layout charlayout =
{
diff --git a/src/mame/machine/st0016.h b/src/mame/machine/st0016.h
index 92c1805422b..69959335c87 100644
--- a/src/mame/machine/st0016.h
+++ b/src/mame/machine/st0016.h
@@ -39,7 +39,6 @@ public:
DECLARE_READ8_MEMBER(st0016_vregs_r);
DECLARE_READ8_MEMBER(st0016_dma_r);
DECLARE_WRITE8_MEMBER(st0016_vregs_w);
- DECLARE_READ8_MEMBER(soundram_read);
void set_st0016_game_flag(uint32_t flag) { m_game_flag = flag; }
@@ -84,7 +83,7 @@ protected:
// device-level overrides
- virtual machine_config_constructor device_mconfig_additions() const override;
+ virtual void device_add_mconfig(machine_config &config) override;
virtual void device_start() override;
virtual void device_reset() override;
@@ -107,6 +106,8 @@ private:
uint8_t m_dma_offset;
st0016_dma_offs_delegate m_dma_offs_cb;
uint32_t m_game_flag;
+
+ DECLARE_READ8_MEMBER(soundram_read);
};
diff --git a/src/mame/machine/taitoio.cpp b/src/mame/machine/taitoio.cpp
index 0e62cacda02..e8be240319d 100644
--- a/src/mame/machine/taitoio.cpp
+++ b/src/mame/machine/taitoio.cpp
@@ -48,11 +48,6 @@ Newer version of the I/O chip ?
#include "machine/taitoio.h"
-MACHINE_CONFIG_START( taitoio )
- MCFG_WATCHDOG_ADD("watchdog")
-MACHINE_CONFIG_END
-
-
/***************************************************************************/
/* */
/* TC0220IOC */
@@ -101,14 +96,12 @@ void tc0220ioc_device::device_reset()
}
//-------------------------------------------------
-// device_mconfig_additions - return a pointer to
-// the device's machine fragment
+// device_add_mconfig - add device configuration
//-------------------------------------------------
-machine_config_constructor tc0220ioc_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME( taitoio );
-}
+MACHINE_CONFIG_MEMBER( tc0220ioc_device::device_add_mconfig )
+ MCFG_WATCHDOG_ADD("watchdog")
+MACHINE_CONFIG_END
/*****************************************************************************
DEVICE HANDLERS
@@ -235,14 +228,12 @@ void tc0510nio_device::device_reset()
}
//-------------------------------------------------
-// device_mconfig_additions - return a pointer to
-// the device's machine fragment
+// device_add_mconfig - add device configuration
//-------------------------------------------------
-machine_config_constructor tc0510nio_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME( taitoio );
-}
+MACHINE_CONFIG_MEMBER( tc0510nio_device::device_add_mconfig )
+ MCFG_WATCHDOG_ADD("watchdog")
+MACHINE_CONFIG_END
/*****************************************************************************
DEVICE HANDLERS
@@ -373,14 +364,12 @@ void tc0640fio_device::device_reset()
}
//-------------------------------------------------
-// device_mconfig_additions - return a pointer to
-// the device's machine fragment
+// device_add_mconfig - add device configuration
//-------------------------------------------------
-machine_config_constructor tc0640fio_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME( taitoio );
-}
+MACHINE_CONFIG_MEMBER( tc0640fio_device::device_add_mconfig )
+ MCFG_WATCHDOG_ADD("watchdog")
+MACHINE_CONFIG_END
/*****************************************************************************
diff --git a/src/mame/machine/taitoio.h b/src/mame/machine/taitoio.h
index 83919a71a26..dfd9e63e600 100644
--- a/src/mame/machine/taitoio.h
+++ b/src/mame/machine/taitoio.h
@@ -38,7 +38,7 @@ protected:
// device-level overrides
virtual void device_start() override;
virtual void device_reset() override;
- virtual machine_config_constructor device_mconfig_additions() const override;
+ virtual void device_add_mconfig(machine_config &config) override;
private:
// internal state
@@ -78,7 +78,7 @@ protected:
// device-level overrides
virtual void device_start() override;
virtual void device_reset() override;
- virtual machine_config_constructor device_mconfig_additions() const override;
+ virtual void device_add_mconfig(machine_config &config) override;
private:
// internal state
@@ -118,7 +118,7 @@ protected:
// device-level overrides
virtual void device_start() override;
virtual void device_reset() override;
- virtual machine_config_constructor device_mconfig_additions() const override;
+ virtual void device_add_mconfig(machine_config &config) override;
private:
// internal state
diff --git a/src/mame/machine/tandy2kb.cpp b/src/mame/machine/tandy2kb.cpp
index 35866e844f0..bd788bcc472 100644
--- a/src/mame/machine/tandy2kb.cpp
+++ b/src/mame/machine/tandy2kb.cpp
@@ -48,10 +48,10 @@ const tiny_rom_entry *tandy2k_keyboard_device::device_rom_region() const
//-------------------------------------------------
-// MACHINE_DRIVER( tandy2k_keyboard )
+// device_add_mconfig - add device configuration
//-------------------------------------------------
-static MACHINE_CONFIG_START( tandy2k_keyboard )
+MACHINE_CONFIG_MEMBER( tandy2k_keyboard_device::device_add_mconfig )
MCFG_CPU_ADD(I8048_TAG, I8048, 1000000) // ?
MCFG_MCS48_PORT_P1_OUT_CB(WRITE8(tandy2k_keyboard_device, kb_p1_w))
MCFG_MCS48_PORT_P2_OUT_CB(WRITE8(tandy2k_keyboard_device, kb_p2_w))
@@ -61,17 +61,6 @@ MACHINE_CONFIG_END
//-------------------------------------------------
-// machine_config_additions - device-specific
-// machine configurations
-//-------------------------------------------------
-
-machine_config_constructor tandy2k_keyboard_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME( tandy2k_keyboard );
-}
-
-
-//-------------------------------------------------
// INPUT_PORTS( tandy2k_keyboard )
//-------------------------------------------------
diff --git a/src/mame/machine/tandy2kb.h b/src/mame/machine/tandy2kb.h
index 255caae6f4e..6348b9a073b 100644
--- a/src/mame/machine/tandy2kb.h
+++ b/src/mame/machine/tandy2kb.h
@@ -50,25 +50,19 @@ public:
template <class Object> static devcb_base &set_clock_wr_callback(device_t &device, Object &&cb) { return downcast<tandy2k_keyboard_device &>(device).m_write_clock.set_callback(std::forward<Object>(cb)); }
template <class Object> static devcb_base &set_data_wr_callback(device_t &device, Object &&cb) { return downcast<tandy2k_keyboard_device &>(device).m_write_data.set_callback(std::forward<Object>(cb)); }
- // optional information overrides
- virtual const tiny_rom_entry *device_rom_region() const override;
- virtual machine_config_constructor device_mconfig_additions() const override;
- virtual ioport_constructor device_input_ports() const override;
-
DECLARE_WRITE_LINE_MEMBER( power_w );
DECLARE_WRITE_LINE_MEMBER( reset_w );
DECLARE_WRITE_LINE_MEMBER( busy_w );
DECLARE_READ_LINE_MEMBER( data_r );
- // not really public
- DECLARE_READ8_MEMBER( kb_p1_r );
- DECLARE_WRITE8_MEMBER( kb_p1_w );
- DECLARE_WRITE8_MEMBER( kb_p2_w );
-
protected:
// device-level overrides
virtual void device_start() override;
virtual void device_reset() override;
+ // optional information overrides
+ virtual const tiny_rom_entry *device_rom_region() const override;
+ virtual void device_add_mconfig(machine_config &config) override;
+ virtual ioport_constructor device_input_ports() const override;
private:
enum
@@ -87,6 +81,10 @@ private:
int m_clock;
int m_data;
+
+ DECLARE_READ8_MEMBER( kb_p1_r );
+ DECLARE_WRITE8_MEMBER( kb_p1_w );
+ DECLARE_WRITE8_MEMBER( kb_p2_w );
};
diff --git a/src/mame/machine/teleprinter.cpp b/src/mame/machine/teleprinter.cpp
index 9de48e9ee5b..0bdb7b9faa1 100644
--- a/src/mame/machine/teleprinter.cpp
+++ b/src/mame/machine/teleprinter.cpp
@@ -211,7 +211,7 @@ uint32_t teleprinter_device::tp_update(screen_device &device, bitmap_rgb32 &bitm
/***************************************************************************
VIDEO HARDWARE
***************************************************************************/
-MACHINE_CONFIG_START( generic_teleprinter )
+MACHINE_CONFIG_MEMBER( teleprinter_device::device_add_mconfig )
MCFG_SCREEN_ADD(TELEPRINTER_SCREEN_TAG, RASTER)
MCFG_SCREEN_REFRESH_RATE(50)
MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
@@ -226,10 +226,6 @@ MACHINE_CONFIG_START( generic_teleprinter )
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "bell", 0.50)
MACHINE_CONFIG_END
-machine_config_constructor teleprinter_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME(generic_teleprinter);
-}
/*-------------------------------------------------
device_reset - device-specific reset
diff --git a/src/mame/machine/teleprinter.h b/src/mame/machine/teleprinter.h
index 83a46e24a64..9ad5d73aabb 100644
--- a/src/mame/machine/teleprinter.h
+++ b/src/mame/machine/teleprinter.h
@@ -24,18 +24,17 @@
class teleprinter_device : public generic_terminal_device
{
public:
- static constexpr unsigned WIDTH = 80;
- static constexpr unsigned HEIGHT = 50;
-
teleprinter_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- uint32_t tp_update(screen_device &device, bitmap_rgb32 &bitmap, const rectangle &cliprect);
protected:
virtual void term_write(uint8_t data) override;
virtual void device_reset() override;
- virtual machine_config_constructor device_mconfig_additions() const override;
+ virtual void device_add_mconfig(machine_config &config) override;
private:
+ static constexpr unsigned WIDTH = 80;
+ static constexpr unsigned HEIGHT = 50;
+ uint32_t tp_update(screen_device &device, bitmap_rgb32 &bitmap, const rectangle &cliprect);
void scroll_line();
void write_char(uint8_t data);
void clear();
diff --git a/src/mame/machine/thomson.cpp b/src/mame/machine/thomson.cpp
index 7f8a1e62a96..5147e0418fa 100644
--- a/src/mame/machine/thomson.cpp
+++ b/src/mame/machine/thomson.cpp
@@ -607,7 +607,7 @@ to7_io_line_device::to7_io_line_device(const machine_config &mconfig, const char
{
}
-static MACHINE_CONFIG_START( to7_io_line )
+MACHINE_CONFIG_MEMBER( to7_io_line_device::device_add_mconfig )
/// THIS PIO is part of CC 90-232 expansion
MCFG_DEVICE_ADD(THOM_PIA_IO, PIA6821, 0)
MCFG_PIA_READPA_HANDLER(READ8(to7_io_line_device, porta_in))
@@ -630,10 +630,6 @@ static MACHINE_CONFIG_START( to7_io_line )
MACHINE_CONFIG_END
-machine_config_constructor to7_io_line_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME( to7_io_line );
-}
void to7_io_line_device::device_start()
{
diff --git a/src/mame/machine/trs80m2kb.cpp b/src/mame/machine/trs80m2kb.cpp
index d6dd379879b..97c5dbeceec 100644
--- a/src/mame/machine/trs80m2kb.cpp
+++ b/src/mame/machine/trs80m2kb.cpp
@@ -48,10 +48,10 @@ const tiny_rom_entry *trs80m2_keyboard_device::device_rom_region() const
//-------------------------------------------------
-// MACHINE_DRIVER( trs80m2_keyboard )
+// device_add_mconfig - add device configuration
//-------------------------------------------------
-static MACHINE_CONFIG_START( trs80m2_keyboard )
+MACHINE_CONFIG_MEMBER( trs80m2_keyboard_device::device_add_mconfig )
MCFG_CPU_ADD(I8021_TAG, I8021, 3000000) // 1000uH inductor connected across the XTAL inputs
MCFG_MCS48_PORT_T1_IN_CB(READLINE(trs80m2_keyboard_device, kb_t1_r))
MCFG_MCS48_PORT_BUS_IN_CB(READ8(trs80m2_keyboard_device, kb_p0_r))
@@ -62,17 +62,6 @@ MACHINE_CONFIG_END
//-------------------------------------------------
-// machine_config_additions - device-specific
-// machine configurations
-//-------------------------------------------------
-
-machine_config_constructor trs80m2_keyboard_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME( trs80m2_keyboard );
-}
-
-
-//-------------------------------------------------
// INPUT_PORTS( trs80m2_keyboard )
//-------------------------------------------------
diff --git a/src/mame/machine/trs80m2kb.h b/src/mame/machine/trs80m2kb.h
index 4c779a35486..bd4b4159614 100644
--- a/src/mame/machine/trs80m2kb.h
+++ b/src/mame/machine/trs80m2kb.h
@@ -47,24 +47,17 @@ public:
template <class Object> static devcb_base &set_clock_wr_callback(device_t &device, Object &&cb) { return downcast<trs80m2_keyboard_device &>(device).m_write_clock.set_callback(std::forward<Object>(cb)); }
- // optional information overrides
- virtual const tiny_rom_entry *device_rom_region() const override;
- virtual machine_config_constructor device_mconfig_additions() const override;
- virtual ioport_constructor device_input_ports() const override;
-
DECLARE_WRITE_LINE_MEMBER( busy_w );
DECLARE_READ_LINE_MEMBER( data_r );
- // not really public
- DECLARE_READ_LINE_MEMBER( kb_t1_r );
- DECLARE_READ8_MEMBER( kb_p0_r );
- DECLARE_WRITE8_MEMBER( kb_p1_w );
- DECLARE_WRITE8_MEMBER( kb_p2_w );
-
protected:
// device-level overrides
virtual void device_start() override;
virtual void device_reset() override;
+ // optional information overrides
+ virtual const tiny_rom_entry *device_rom_region() const override;
+ virtual void device_add_mconfig(machine_config &config) override;
+ virtual ioport_constructor device_input_ports() const override;
private:
enum
@@ -83,6 +76,11 @@ private:
int m_clk;
uint8_t m_keylatch;
+
+ DECLARE_READ_LINE_MEMBER( kb_t1_r );
+ DECLARE_READ8_MEMBER( kb_p0_r );
+ DECLARE_WRITE8_MEMBER( kb_p1_w );
+ DECLARE_WRITE8_MEMBER( kb_p2_w );
};
diff --git a/src/mame/machine/v1050kb.cpp b/src/mame/machine/v1050kb.cpp
index d60678c9b14..7314c0707f4 100644
--- a/src/mame/machine/v1050kb.cpp
+++ b/src/mame/machine/v1050kb.cpp
@@ -69,10 +69,10 @@ DISCRETE_SOUND_END
//-------------------------------------------------
-// MACHINE_DRIVER( v1050_keyboard )
+// device_add_mconfig - add device configuration
//-------------------------------------------------
-static MACHINE_CONFIG_START( v1050_keyboard )
+MACHINE_CONFIG_MEMBER( v1050_keyboard_device::device_add_mconfig )
MCFG_CPU_ADD(I8049_TAG, I8049, XTAL_4_608MHz)
MCFG_MCS48_PORT_P1_IN_CB(READ8(v1050_keyboard_device, kb_p1_r))
MCFG_MCS48_PORT_P1_OUT_CB(WRITE8(v1050_keyboard_device, kb_p1_w))
@@ -88,17 +88,6 @@ MACHINE_CONFIG_END
//-------------------------------------------------
-// machine_config_additions - device-specific
-// machine configurations
-//-------------------------------------------------
-
-machine_config_constructor v1050_keyboard_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME( v1050_keyboard );
-}
-
-
-//-------------------------------------------------
// INPUT_PORTS( v1050_keyboard )
//-------------------------------------------------
diff --git a/src/mame/machine/v1050kb.h b/src/mame/machine/v1050kb.h
index af66b205a1b..6230f783f92 100644
--- a/src/mame/machine/v1050kb.h
+++ b/src/mame/machine/v1050kb.h
@@ -39,22 +39,16 @@ public:
template <class Object> static devcb_base &set_out_tx_handler(device_t &device, Object &&cb) { return downcast<v1050_keyboard_device &>(device).m_out_tx_handler.set_callback(std::forward<Object>(cb)); }
- // optional information overrides
- virtual const tiny_rom_entry *device_rom_region() const override;
- virtual machine_config_constructor device_mconfig_additions() const override;
- virtual ioport_constructor device_input_ports() const override;
-
DECLARE_WRITE_LINE_MEMBER( si_w );
- // not really public
- DECLARE_READ8_MEMBER( kb_p1_r );
- DECLARE_WRITE8_MEMBER( kb_p1_w );
- DECLARE_WRITE8_MEMBER( kb_p2_w );
-
protected:
// device-level overrides
virtual void device_start() override;
virtual void device_reset() override;
+ // optional information overrides
+ virtual const tiny_rom_entry *device_rom_region() const override;
+ virtual void device_add_mconfig(machine_config &config) override;
+ virtual ioport_constructor device_input_ports() const override;
private:
required_device<cpu_device> m_maincpu;
@@ -63,6 +57,10 @@ private:
devcb_write_line m_out_tx_handler;
uint8_t m_keylatch;
+
+ DECLARE_READ8_MEMBER( kb_p1_r );
+ DECLARE_WRITE8_MEMBER( kb_p1_w );
+ DECLARE_WRITE8_MEMBER( kb_p2_w );
};
diff --git a/src/mame/machine/victor9k_fdc.cpp b/src/mame/machine/victor9k_fdc.cpp
index fd97ccc7f09..ca31fa42300 100644
--- a/src/mame/machine/victor9k_fdc.cpp
+++ b/src/mame/machine/victor9k_fdc.cpp
@@ -155,10 +155,10 @@ FLOPPY_FORMATS_END
//-------------------------------------------------
-// MACHINE_CONFIG_START( victor_9000_fdc )
+// device_add_mconfig - add device configuration
//-------------------------------------------------
-static MACHINE_CONFIG_START( victor_9000_fdc )
+MACHINE_CONFIG_MEMBER( victor_9000_fdc_device::device_add_mconfig )
MCFG_CPU_ADD(I8048_TAG, I8048, XTAL_30MHz/6)
MCFG_MCS48_PORT_P1_IN_CB(READ8(victor_9000_fdc_device, floppy_p1_r))
MCFG_MCS48_PORT_P1_OUT_CB(WRITE8(victor_9000_fdc_device, floppy_p1_w))
@@ -195,18 +195,6 @@ static MACHINE_CONFIG_START( victor_9000_fdc )
MACHINE_CONFIG_END
-//-------------------------------------------------
-// machine_config_additions - device-specific
-// machine configurations
-//-------------------------------------------------
-
-machine_config_constructor victor_9000_fdc_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME( victor_9000_fdc );
-}
-
-
-
//**************************************************************************
// LIVE DEVICE
//**************************************************************************
diff --git a/src/mame/machine/victor9k_fdc.h b/src/mame/machine/victor9k_fdc.h
index 15e92f7defc..cfb349b89cd 100644
--- a/src/mame/machine/victor9k_fdc.h
+++ b/src/mame/machine/victor9k_fdc.h
@@ -57,35 +57,6 @@ public:
DECLARE_READ8_MEMBER( cs7_r );
DECLARE_WRITE8_MEMBER( cs7_w );
- DECLARE_FLOPPY_FORMATS( floppy_formats );
-
- DECLARE_READ8_MEMBER( floppy_p1_r );
- DECLARE_WRITE8_MEMBER( floppy_p1_w );
- DECLARE_READ8_MEMBER( floppy_p2_r );
- DECLARE_WRITE8_MEMBER( floppy_p2_w );
- DECLARE_READ_LINE_MEMBER( tach0_r );
- DECLARE_READ_LINE_MEMBER( tach1_r );
- DECLARE_WRITE8_MEMBER( da_w );
-
- DECLARE_READ8_MEMBER( via4_pa_r );
- DECLARE_WRITE8_MEMBER( via4_pa_w );
- DECLARE_READ8_MEMBER( via4_pb_r );
- DECLARE_WRITE8_MEMBER( via4_pb_w );
- DECLARE_WRITE_LINE_MEMBER( wrsync_w );
- DECLARE_WRITE_LINE_MEMBER( via4_irq_w );
-
- DECLARE_READ8_MEMBER( via5_pa_r );
- DECLARE_WRITE8_MEMBER( via5_pb_w );
- DECLARE_WRITE_LINE_MEMBER( via5_irq_w );
-
- DECLARE_READ8_MEMBER( via6_pa_r );
- DECLARE_READ8_MEMBER( via6_pb_r );
- DECLARE_WRITE8_MEMBER( via6_pa_w );
- DECLARE_WRITE8_MEMBER( via6_pb_w );
- DECLARE_WRITE_LINE_MEMBER( drw_w );
- DECLARE_WRITE_LINE_MEMBER( erase_w );
- DECLARE_WRITE_LINE_MEMBER( via6_irq_w );
-
protected:
// device-level overrides
virtual void device_start() override;
@@ -94,7 +65,7 @@ protected:
// optional information overrides
virtual const tiny_rom_entry *device_rom_region() const override;
- virtual machine_config_constructor device_mconfig_additions() const override;
+ virtual void device_add_mconfig(machine_config &config) override;
private:
static const int rpm[0x100];
@@ -234,6 +205,35 @@ private:
void live_sync();
void live_abort();
void live_run(const attotime &limit = attotime::never);
+
+ DECLARE_FLOPPY_FORMATS( floppy_formats );
+
+ DECLARE_READ8_MEMBER( floppy_p1_r );
+ DECLARE_WRITE8_MEMBER( floppy_p1_w );
+ DECLARE_READ8_MEMBER( floppy_p2_r );
+ DECLARE_WRITE8_MEMBER( floppy_p2_w );
+ DECLARE_READ_LINE_MEMBER( tach0_r );
+ DECLARE_READ_LINE_MEMBER( tach1_r );
+ DECLARE_WRITE8_MEMBER( da_w );
+
+ DECLARE_READ8_MEMBER( via4_pa_r );
+ DECLARE_WRITE8_MEMBER( via4_pa_w );
+ DECLARE_READ8_MEMBER( via4_pb_r );
+ DECLARE_WRITE8_MEMBER( via4_pb_w );
+ DECLARE_WRITE_LINE_MEMBER( wrsync_w );
+ DECLARE_WRITE_LINE_MEMBER( via4_irq_w );
+
+ DECLARE_READ8_MEMBER( via5_pa_r );
+ DECLARE_WRITE8_MEMBER( via5_pb_w );
+ DECLARE_WRITE_LINE_MEMBER( via5_irq_w );
+
+ DECLARE_READ8_MEMBER( via6_pa_r );
+ DECLARE_READ8_MEMBER( via6_pb_r );
+ DECLARE_WRITE8_MEMBER( via6_pa_w );
+ DECLARE_WRITE8_MEMBER( via6_pb_w );
+ DECLARE_WRITE_LINE_MEMBER( drw_w );
+ DECLARE_WRITE_LINE_MEMBER( erase_w );
+ DECLARE_WRITE_LINE_MEMBER( via6_irq_w );
};
diff --git a/src/mame/machine/victor9k_kb.cpp b/src/mame/machine/victor9k_kb.cpp
index 534b4cd271a..329b265ff62 100644
--- a/src/mame/machine/victor9k_kb.cpp
+++ b/src/mame/machine/victor9k_kb.cpp
@@ -377,10 +377,10 @@ const tiny_rom_entry *victor_9000_keyboard_device::device_rom_region() const
//-------------------------------------------------
-// MACHINE_DRIVER( victor9k_keyboard )
+// device_add_mconfig - add device configuration
//-------------------------------------------------
-static MACHINE_CONFIG_START( victor9k_keyboard )
+MACHINE_CONFIG_MEMBER( victor_9000_keyboard_device::device_add_mconfig )
MCFG_CPU_ADD(I8021_TAG, I8021, XTAL_3_579545MHz)
// P0 is unconnected on pcb
MCFG_MCS48_PORT_P1_IN_CB(READ8(victor_9000_keyboard_device, kb_p1_r))
@@ -391,17 +391,6 @@ MACHINE_CONFIG_END
//-------------------------------------------------
-// machine_config_additions - device-specific
-// machine configurations
-//-------------------------------------------------
-
-machine_config_constructor victor_9000_keyboard_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME( victor9k_keyboard );
-}
-
-
-//-------------------------------------------------
// INPUT_PORTS( victor9k_keyboard )
//-------------------------------------------------
diff --git a/src/mame/machine/victor9k_kb.h b/src/mame/machine/victor9k_kb.h
index dd13aff5790..a686b71b7f1 100644
--- a/src/mame/machine/victor9k_kb.h
+++ b/src/mame/machine/victor9k_kb.h
@@ -42,22 +42,15 @@ public:
template<class _Object> static devcb_base &set_kbrdy_cb(device_t &device, _Object object) { return downcast<victor_9000_keyboard_device &>(device).m_kbrdy_cb.set_callback(object); }
template<class _Object> static devcb_base &set_kbdata_cb(device_t &device, _Object object) { return downcast<victor_9000_keyboard_device &>(device).m_kbdata_cb.set_callback(object); }
- // optional information overrides
- virtual const tiny_rom_entry *device_rom_region() const override;
- virtual machine_config_constructor device_mconfig_additions() const override;
- virtual ioport_constructor device_input_ports() const override;
-
DECLARE_WRITE_LINE_MEMBER( kback_w );
- // not really public
- DECLARE_READ8_MEMBER( kb_p1_r );
- DECLARE_WRITE8_MEMBER( kb_p1_w );
- DECLARE_WRITE8_MEMBER( kb_p2_w );
- DECLARE_READ_LINE_MEMBER( kb_t1_r );
-
protected:
// device-level overrides
virtual void device_start() override;
+ // optional information overrides
+ virtual const tiny_rom_entry *device_rom_region() const override;
+ virtual void device_add_mconfig(machine_config &config) override;
+ virtual ioport_constructor device_input_ports() const override;
private:
required_device<cpu_device> m_maincpu;
@@ -73,6 +66,11 @@ private:
int m_kbrdy;
int m_kbdata;
int m_kback;
+
+ DECLARE_READ8_MEMBER( kb_p1_r );
+ DECLARE_WRITE8_MEMBER( kb_p1_w );
+ DECLARE_WRITE8_MEMBER( kb_p2_w );
+ DECLARE_READ_LINE_MEMBER( kb_t1_r );
};
diff --git a/src/mame/machine/wangpckb.cpp b/src/mame/machine/wangpckb.cpp
index 42ee9200859..41727083683 100644
--- a/src/mame/machine/wangpckb.cpp
+++ b/src/mame/machine/wangpckb.cpp
@@ -109,10 +109,10 @@ ADDRESS_MAP_END
//-------------------------------------------------
-// MACHINE_DRIVER( wangpc_keyboard )
+// device_add_mconfig - add device configuration
//-------------------------------------------------
-static MACHINE_CONFIG_START( wangpc_keyboard )
+MACHINE_CONFIG_MEMBER( wangpc_keyboard_device::device_add_mconfig )
MCFG_CPU_ADD(I8051_TAG, I8051, XTAL_4MHz)
MCFG_CPU_IO_MAP(wangpc_keyboard_io)
MCFG_MCS51_SERIAL_TX_CB(WRITE8(wangpc_keyboard_device, mcs51_tx_callback))
@@ -126,17 +126,6 @@ MACHINE_CONFIG_END
//-------------------------------------------------
-// machine_config_additions - device-specific
-// machine configurations
-//-------------------------------------------------
-
-machine_config_constructor wangpc_keyboard_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME( wangpc_keyboard );
-}
-
-
-//-------------------------------------------------
// INPUT_PORTS( wangpc_keyboard )
//-------------------------------------------------
diff --git a/src/mame/machine/wangpckb.h b/src/mame/machine/wangpckb.h
index 938be9bde46..53adfb5b727 100644
--- a/src/mame/machine/wangpckb.h
+++ b/src/mame/machine/wangpckb.h
@@ -51,11 +51,6 @@ public:
template <class Object> static devcb_base &set_txd_handler(device_t &device, Object &&cb) { return downcast<wangpc_keyboard_device &>(device).m_txd_handler.set_callback(std::forward<Object>(cb)); }
- // optional information overrides
- virtual const tiny_rom_entry *device_rom_region() const override;
- virtual machine_config_constructor device_mconfig_additions() const override;
- virtual ioport_constructor device_input_ports() const override;
-
DECLARE_WRITE_LINE_MEMBER( write_rxd );
// not really public
@@ -64,15 +59,17 @@ public:
DECLARE_WRITE8_MEMBER( kb_p2_w );
DECLARE_WRITE8_MEMBER( kb_p3_w );
- DECLARE_READ8_MEMBER( mcs51_rx_callback );
- DECLARE_WRITE8_MEMBER( mcs51_tx_callback );
-
protected:
// device-level overrides
virtual void device_start() override;
virtual void device_reset() override;
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
+ // optional information overrides
+ virtual const tiny_rom_entry *device_rom_region() const override;
+ virtual void device_add_mconfig(machine_config &config) override;
+ virtual ioport_constructor device_input_ports() const override;
+
// device_serial_interface overrides
virtual void tra_callback() override;
virtual void tra_complete() override;
@@ -86,6 +83,9 @@ private:
uint8_t m_keylatch;
int m_rxd;
+
+ DECLARE_READ8_MEMBER( mcs51_rx_callback );
+ DECLARE_WRITE8_MEMBER( mcs51_tx_callback );
};
diff --git a/src/mame/machine/x820kb.cpp b/src/mame/machine/x820kb.cpp
index 1377ea38a5e..4d960d8c5e7 100644
--- a/src/mame/machine/x820kb.cpp
+++ b/src/mame/machine/x820kb.cpp
@@ -81,10 +81,10 @@ const tiny_rom_entry *xerox_820_keyboard_device::device_rom_region() const
//-------------------------------------------------
-// MACHINE_DRIVER( xerox_820_keyboard )
+// device_add_mconfig - add device configuration
//-------------------------------------------------
-static MACHINE_CONFIG_START( xerox_820_keyboard )
+MACHINE_CONFIG_MEMBER( xerox_820_keyboard_device::device_add_mconfig )
MCFG_CPU_ADD(I8748_TAG, I8048, XTAL_6MHz)
MCFG_MCS48_PORT_P1_IN_CB(READ8(xerox_820_keyboard_device, kb_p1_r))
MCFG_MCS48_PORT_P1_OUT_CB(WRITE8(xerox_820_keyboard_device, kb_p1_w))
@@ -96,17 +96,6 @@ MACHINE_CONFIG_END
//-------------------------------------------------
-// machine_config_additions - device-specific
-// machine configurations
-//-------------------------------------------------
-
-machine_config_constructor xerox_820_keyboard_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME( xerox_820_keyboard );
-}
-
-
-//-------------------------------------------------
// INPUT_PORTS( xerox_820_keyboard )
//-------------------------------------------------
diff --git a/src/mame/machine/x820kb.h b/src/mame/machine/x820kb.h
index f7845b8c7c1..4c56abf8d0d 100644
--- a/src/mame/machine/x820kb.h
+++ b/src/mame/machine/x820kb.h
@@ -38,26 +38,19 @@ public:
template <class Object> static devcb_base &set_kbstb_wr_callback(device_t &device, Object &&cb) { return downcast<xerox_820_keyboard_device &>(device).m_kbstb_cb.set_callback(std::forward<Object>(cb)); }
- // optional information overrides
- virtual const tiny_rom_entry *device_rom_region() const override;
- virtual machine_config_constructor device_mconfig_additions() const override;
- virtual ioport_constructor device_input_ports() const override;
-
uint8_t read() { return m_bus; }
- DECLARE_READ8_MEMBER( kb_p1_r );
- DECLARE_WRITE8_MEMBER( kb_p1_w );
- DECLARE_READ8_MEMBER( kb_p2_r );
- DECLARE_READ_LINE_MEMBER( kb_t0_r );
- DECLARE_READ_LINE_MEMBER( kb_t1_r );
- DECLARE_WRITE8_MEMBER( kb_bus_w );
-
protected:
// device-level overrides
virtual void device_start() override;
virtual void device_reset() override;
virtual void device_reset_after_children() override;
+ // optional information overrides
+ virtual const tiny_rom_entry *device_rom_region() const override;
+ virtual void device_add_mconfig(machine_config &config) override;
+ virtual ioport_constructor device_input_ports() const override;
+
private:
required_device<cpu_device> m_maincpu;
required_ioport_array<16> m_y;
@@ -66,6 +59,13 @@ private:
uint8_t m_p1;
uint8_t m_bus;
+
+ DECLARE_READ8_MEMBER( kb_p1_r );
+ DECLARE_WRITE8_MEMBER( kb_p1_w );
+ DECLARE_READ8_MEMBER( kb_p2_r );
+ DECLARE_READ_LINE_MEMBER( kb_t0_r );
+ DECLARE_READ_LINE_MEMBER( kb_t1_r );
+ DECLARE_WRITE8_MEMBER( kb_bus_w );
};
diff --git a/src/mame/machine/xbox_pci.cpp b/src/mame/machine/xbox_pci.cpp
index f330b602403..bff2a9b5669 100644
--- a/src/mame/machine/xbox_pci.cpp
+++ b/src/mame/machine/xbox_pci.cpp
@@ -682,12 +682,6 @@ DEVICE_ADDRESS_MAP_START(mcpx_ide_io, 32, mcpx_ide_device)
AM_RANGE(0x0000, 0x000f) AM_DEVREADWRITE("ide", bus_master_ide_controller_device, bmdma_r, bmdma_w)
ADDRESS_MAP_END
-static MACHINE_CONFIG_START(mcpx_ide)
- MCFG_DEVICE_ADD("ide", BUS_MASTER_IDE_CONTROLLER, 0)
- MCFG_ATA_INTERFACE_IRQ_HANDLER(WRITELINE(mcpx_ide_device, ide_interrupt))
- MCFG_BUS_MASTER_IDE_CONTROLLER_SPACE("maincpu", AS_PROGRAM)
-MACHINE_CONFIG_END
-
mcpx_ide_device::mcpx_ide_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: pci_device(mconfig, MCPX_IDE, tag, owner, clock),
m_interrupt_handler(*this)
@@ -707,10 +701,11 @@ void mcpx_ide_device::device_reset()
pci_device::device_reset();
}
-machine_config_constructor mcpx_ide_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME(mcpx_ide);
-}
+MACHINE_CONFIG_MEMBER(mcpx_ide_device::device_add_mconfig)
+ MCFG_DEVICE_ADD("ide", BUS_MASTER_IDE_CONTROLLER, 0)
+ MCFG_ATA_INTERFACE_IRQ_HANDLER(WRITELINE(mcpx_ide_device, ide_interrupt))
+ MCFG_BUS_MASTER_IDE_CONTROLLER_SPACE("maincpu", AS_PROGRAM)
+MACHINE_CONFIG_END
WRITE_LINE_MEMBER(mcpx_ide_device::ide_interrupt)
{