summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author mooglyguy <therealmogminer@gmail.com>2018-12-08 06:32:14 +0100
committer mooglyguy <therealmogminer@gmail.com>2018-12-08 06:32:26 +0100
commit185856f28fd262ceab68701537334f98c9ff19a5 (patch)
tree283fa18562efebf7f673731e8acbbd121cbc6bbc
parentd658e02bbaadd9b723acaf0da786cc61d45681d4 (diff)
mcs48: Removed MCFG, nw
-rw-r--r--src/devices/bus/abckb/abc77.cpp14
-rw-r--r--src/devices/bus/abckb/abc77.h2
-rw-r--r--src/devices/bus/abckb/abc800kb.cpp15
-rw-r--r--src/devices/bus/abckb/abc800kb.h2
-rw-r--r--src/devices/bus/abckb/abc99.cpp34
-rw-r--r--src/devices/bus/abckb/abc99.h4
-rw-r--r--src/devices/bus/dmv/k806.cpp17
-rw-r--r--src/devices/bus/interpro/keyboard/lle.cpp25
-rw-r--r--src/devices/bus/interpro/keyboard/lle.h2
-rw-r--r--src/devices/bus/pc_kbd/ec1841.cpp17
-rw-r--r--src/devices/bus/pc_kbd/ec1841.h2
-rw-r--r--src/devices/bus/pc_kbd/iskr1030.cpp17
-rw-r--r--src/devices/bus/pc_kbd/iskr1030.h2
-rw-r--r--src/devices/bus/pc_kbd/pc83.cpp15
-rw-r--r--src/devices/bus/pc_kbd/pc83.h2
-rw-r--r--src/devices/bus/pc_kbd/pcat84.cpp21
-rw-r--r--src/devices/bus/pc_kbd/pcat84.h2
-rw-r--r--src/devices/bus/pc_kbd/pcxt83.cpp19
-rw-r--r--src/devices/bus/pc_kbd/pcxt83.h2
-rw-r--r--src/devices/bus/vcs_ctrl/ctrl.h11
-rw-r--r--src/devices/cpu/mcs48/mcs48.h49
-rw-r--r--src/devices/cpu/mcs51/mcs51.h3
-rw-r--r--src/devices/cpu/melps4/melps4.h71
-rw-r--r--src/devices/machine/ldpr8210.cpp34
-rw-r--r--src/devices/machine/ldvp931.cpp21
-rw-r--r--src/devices/sound/sp0250.h1
-rw-r--r--src/mame/audio/carnival.cpp10
-rw-r--r--src/mame/audio/dkong.cpp46
-rw-r--r--src/mame/audio/mario.cpp20
-rw-r--r--src/mame/audio/n8080.cpp40
-rw-r--r--src/mame/audio/segag80r.cpp14
-rw-r--r--src/mame/audio/segasnd.cpp59
-rw-r--r--src/mame/drivers/advision.cpp15
-rw-r--r--src/mame/drivers/alpha68k.cpp14
-rw-r--r--src/mame/drivers/alphatpx.cpp20
-rw-r--r--src/mame/drivers/bitgraph.cpp8
-rw-r--r--src/mame/drivers/cgc7900.cpp13
-rw-r--r--src/mame/drivers/chinagat.cpp12
-rw-r--r--src/mame/drivers/decocass.cpp10
-rw-r--r--src/mame/drivers/dmv.cpp8
-rw-r--r--src/mame/drivers/drw80pkr.cpp30
-rw-r--r--src/mame/drivers/fidelmcs48.cpp14
-rw-r--r--src/mame/drivers/fidelz80.cpp14
-rw-r--r--src/mame/drivers/finalizr.cpp20
-rw-r--r--src/mame/drivers/gladiatr.cpp26
-rw-r--r--src/mame/drivers/gyruss.cpp11
-rw-r--r--src/mame/drivers/hh_melps4.cpp32
-rw-r--r--src/mame/drivers/itt3030.cpp10
-rw-r--r--src/mame/drivers/junofrst.cpp37
-rw-r--r--src/mame/drivers/k28.cpp31
-rw-r--r--src/mame/drivers/m63.cpp16
-rw-r--r--src/mame/drivers/megazone.cpp11
-rw-r--r--src/mame/drivers/microvsn.cpp14
-rw-r--r--src/mame/drivers/monzagp.cpp14
-rw-r--r--src/mame/drivers/novagmcs48.cpp8
-rw-r--r--src/mame/drivers/odyssey2.cpp82
-rw-r--r--src/mame/drivers/othello.cpp61
-rw-r--r--src/mame/drivers/pandoras.cpp24
-rw-r--r--src/mame/drivers/pcw.cpp121
-rw-r--r--src/mame/drivers/ql.cpp16
-rw-r--r--src/mame/drivers/quasar.cpp10
-rw-r--r--src/mame/drivers/ron.cpp22
-rw-r--r--src/mame/drivers/segag80r.cpp6
-rw-r--r--src/mame/drivers/segas16a.cpp14
-rw-r--r--src/mame/drivers/spacefb.cpp21
-rw-r--r--src/mame/drivers/spcforce.cpp33
-rw-r--r--src/mame/drivers/supstarf.cpp14
-rw-r--r--src/mame/drivers/tnzs.cpp12
-rw-r--r--src/mame/drivers/vega.cpp27
-rw-r--r--src/mame/drivers/videopkr.cpp75
-rw-r--r--src/mame/drivers/vp415.cpp24
-rw-r--r--src/mame/includes/advision.h5
-rw-r--r--src/mame/includes/dkong.h3
-rw-r--r--src/mame/includes/finalizr.h7
-rw-r--r--src/mame/includes/gyruss.h3
-rw-r--r--src/mame/includes/megazone.h3
-rw-r--r--src/mame/includes/n8080.h2
-rw-r--r--src/mame/includes/pandoras.h3
-rw-r--r--src/mame/includes/pcw.h5
-rw-r--r--src/mame/includes/spacefb.h11
-rw-r--r--src/mame/includes/spcforce.h9
-rw-r--r--src/mame/includes/vicdual.h2
-rw-r--r--src/mame/machine/compiskb.cpp24
-rw-r--r--src/mame/machine/compiskb.h3
-rw-r--r--src/mame/machine/dmv_keyb.cpp13
-rw-r--r--src/mame/machine/dmv_keyb.h2
-rw-r--r--src/mame/machine/ibm6580_fdc.cpp24
-rw-r--r--src/mame/machine/ibm6580_fdc.h3
-rw-r--r--src/mame/machine/ibm6580_kbd.cpp24
-rw-r--r--src/mame/machine/ibm6580_kbd.h3
-rw-r--r--src/mame/machine/kay_kbd.cpp23
-rw-r--r--src/mame/machine/kay_kbd.h4
-rw-r--r--src/mame/machine/km035.cpp26
-rw-r--r--src/mame/machine/km035.h2
-rw-r--r--src/mame/machine/m24_kbd.cpp19
-rw-r--r--src/mame/machine/m24_kbd.h2
-rw-r--r--src/mame/machine/ms7004.cpp20
-rw-r--r--src/mame/machine/ms7004.h2
-rw-r--r--src/mame/machine/pc1512kb.cpp23
-rw-r--r--src/mame/machine/pc1512kb.h2
-rw-r--r--src/mame/machine/pcd_kbd.cpp20
-rw-r--r--src/mame/machine/tandy2kb.cpp15
-rw-r--r--src/mame/machine/tandy2kb.h2
-rw-r--r--src/mame/machine/trs80m2kb.cpp17
-rw-r--r--src/mame/machine/trs80m2kb.h2
-rw-r--r--src/mame/machine/v1050kb.cpp10
-rw-r--r--src/mame/machine/v1050kb.h2
-rw-r--r--src/mame/machine/victor9k_kb.cpp15
-rw-r--r--src/mame/machine/victor9k_kb.h2
-rw-r--r--src/mame/machine/x820kb.cpp19
-rw-r--r--src/mame/machine/x820kb.h2
-rw-r--r--src/mame/video/pcd.cpp8
112 files changed, 947 insertions, 982 deletions
diff --git a/src/devices/bus/abckb/abc77.cpp b/src/devices/bus/abckb/abc77.cpp
index f225b7c06f9..87acedf4fb8 100644
--- a/src/devices/bus/abckb/abc77.cpp
+++ b/src/devices/bus/abckb/abc77.cpp
@@ -131,13 +131,13 @@ DISCRETE_SOUND_END
MACHINE_CONFIG_START(abc77_device::device_add_mconfig)
// keyboard cpu
- MCFG_DEVICE_ADD(I8035_TAG, I8035, XTAL(4'608'000))
- MCFG_DEVICE_PROGRAM_MAP(abc77_map)
- MCFG_DEVICE_IO_MAP(abc77_io)
- MCFG_MCS48_PORT_P1_IN_CB(READ8(*this, abc77_device, p1_r))
- MCFG_MCS48_PORT_P2_OUT_CB(WRITE8(*this, abc77_device, p2_w))
- MCFG_MCS48_PORT_T1_IN_CB(READLINE(*this, abc77_device, t1_r))
- MCFG_MCS48_PORT_PROG_OUT_CB(WRITELINE(*this, abc77_device, prog_w))
+ I8035(config, m_maincpu, XTAL(4'608'000));
+ m_maincpu->set_addrmap(AS_PROGRAM, &abc77_device::abc77_map);
+ m_maincpu->set_addrmap(AS_IO, &abc77_device::abc77_io);
+ m_maincpu->p1_in_cb().set(FUNC(abc77_device::p1_r));
+ m_maincpu->p2_out_cb().set(FUNC(abc77_device::p2_w));
+ m_maincpu->t1_in_cb().set(FUNC(abc77_device::t1_r));
+ m_maincpu->prog_out_cb().set(FUNC(abc77_device::prog_w));
// watchdog
WATCHDOG_TIMER(config, m_watchdog).set_time(attotime::from_hz(XTAL(4'608'000)/3/5/4096));
diff --git a/src/devices/bus/abckb/abc77.h b/src/devices/bus/abckb/abc77.h
index f03aa9a1980..b217a0fca47 100644
--- a/src/devices/bus/abckb/abc77.h
+++ b/src/devices/bus/abckb/abc77.h
@@ -61,7 +61,7 @@ private:
inline void serial_clock();
inline void key_down(int state);
- required_device<cpu_device> m_maincpu;
+ required_device<i8035_device> m_maincpu;
required_device<watchdog_timer_device> m_watchdog;
required_device<discrete_sound_device> m_discrete;
required_ioport_array<12> m_x;
diff --git a/src/devices/bus/abckb/abc800kb.cpp b/src/devices/bus/abckb/abc800kb.cpp
index 6cfcda5808d..fa20b40d317 100644
--- a/src/devices/bus/abckb/abc800kb.cpp
+++ b/src/devices/bus/abckb/abc800kb.cpp
@@ -112,13 +112,14 @@ const tiny_rom_entry *abc800_keyboard_device::device_rom_region() const
// device_add_mconfig - add device configuration
//-------------------------------------------------
-MACHINE_CONFIG_START(abc800_keyboard_device::device_add_mconfig)
- MCFG_DEVICE_ADD(I8048_TAG, I8048, XTAL(5'990'400))
- MCFG_MCS48_PORT_P1_IN_CB(READ8(*this, abc800_keyboard_device, kb_p1_r))
- MCFG_MCS48_PORT_P1_OUT_CB(WRITE8(*this, abc800_keyboard_device, kb_p1_w))
- MCFG_MCS48_PORT_P2_OUT_CB(WRITE8(*this, abc800_keyboard_device, kb_p2_w))
- MCFG_MCS48_PORT_T1_IN_CB(READLINE(*this, abc800_keyboard_device, kb_t1_r))
-MACHINE_CONFIG_END
+void abc800_keyboard_device::device_add_mconfig(machine_config &config)
+{
+ I8048(config, m_maincpu, XTAL(5'990'400));
+ m_maincpu->p1_in_cb().set(FUNC(abc800_keyboard_device::kb_p1_r));
+ m_maincpu->p1_out_cb().set(FUNC(abc800_keyboard_device::kb_p1_w));
+ m_maincpu->p2_out_cb().set(FUNC(abc800_keyboard_device::kb_p2_w));
+ m_maincpu->t1_in_cb().set(FUNC(abc800_keyboard_device::kb_t1_r));
+}
//-------------------------------------------------
diff --git a/src/devices/bus/abckb/abc800kb.h b/src/devices/bus/abckb/abc800kb.h
index 5d07699c1eb..50fde4beac9 100644
--- a/src/devices/bus/abckb/abc800kb.h
+++ b/src/devices/bus/abckb/abc800kb.h
@@ -55,7 +55,7 @@ private:
DECLARE_WRITE8_MEMBER( kb_p2_w );
DECLARE_READ_LINE_MEMBER( kb_t1_r );
- required_device<cpu_device> m_maincpu;
+ required_device<i8048_device> m_maincpu;
required_ioport_array<12> m_x;
int m_row;
diff --git a/src/devices/bus/abckb/abc99.cpp b/src/devices/bus/abckb/abc99.cpp
index 5fa271b5034..6782fbd8a59 100644
--- a/src/devices/bus/abckb/abc99.cpp
+++ b/src/devices/bus/abckb/abc99.cpp
@@ -153,30 +153,30 @@ void abc99_device::abc99_z5_mem(address_map &map)
// device_add_mconfig - add device configuration
//-------------------------------------------------
-MACHINE_CONFIG_START(abc99_device::device_add_mconfig)
+void abc99_device::device_add_mconfig(machine_config &config)
+{
// keyboard CPU
- MCFG_DEVICE_ADD(I8035_Z2_TAG, I8035, XTAL(6'000'000)/3) // from Z5 T0 output
- MCFG_DEVICE_PROGRAM_MAP(abc99_z2_mem)
- MCFG_DEVICE_IO_MAP(abc99_z2_io)
- MCFG_MCS48_PORT_P1_OUT_CB(WRITE8(*this, abc99_device, z2_p1_w))
- MCFG_MCS48_PORT_P2_IN_CB(READ8(*this, abc99_device, z2_p2_r))
- MCFG_MCS48_PORT_T0_IN_CB(READLINE(*this, abc99_device, z2_t0_r))
- MCFG_MCS48_PORT_T1_IN_CB(READLINE(*this, abc99_device, z2_t1_r))
+ I8035(config, m_maincpu, XTAL(6'000'000)/3); // from Z5 T0 output
+ m_maincpu->set_addrmap(AS_PROGRAM, &abc99_device::abc99_z2_mem);
+ m_maincpu->set_addrmap(AS_IO, &abc99_device::abc99_z2_io);
+ m_maincpu->p1_out_cb().set(FUNC(abc99_device::z2_p1_w));
+ m_maincpu->p2_in_cb().set(FUNC(abc99_device::z2_p2_r));
+ m_maincpu->t0_in_cb().set(FUNC(abc99_device::z2_t0_r));
+ m_maincpu->t1_in_cb().set(FUNC(abc99_device::z2_t1_r));
// mouse CPU
- MCFG_DEVICE_ADD(I8035_Z5_TAG, I8035, XTAL(6'000'000))
- MCFG_DEVICE_PROGRAM_MAP(abc99_z5_mem)
- //MCFG_MCS48_PORT_P1_IN_CB(READ8(*this, abc99_device, z5_p1_r))
- //MCFG_MCS48_PORT_P2_OUT_CB(WRITE8(*this, abc99_device, z5_p2_w))
+ I8035(config, m_mousecpu, XTAL(6'000'000));
+ m_mousecpu->set_addrmap(AS_PROGRAM, &abc99_device::abc99_z5_mem);
+ //m_mousecpu->p1_in_cb().set(FUNC(abc99_device::z5_p1_r));
+ //m_mousecpu->p2_out_cb().set(FUNC(abc99_device::z5_p2_w));
//MCFG_MCS48_PORT_T0_CLK_CUSTOM() // Z2 CLK
- //MCFG_MCS48_PORT_T1_IN_CB(READ8(*this, abc99_device, z5_t1_r))
- MCFG_DEVICE_DISABLE() // HACK fix for broken serial I/O
+ //m_mousecpu->t1_in_cb().set(FUNC(abc99_device::z5_t1_r));
+ m_mousecpu->set_disable(); // HACK fix for broken serial I/O
// sound hardware
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD("speaker", SPEAKER_SOUND, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
-MACHINE_CONFIG_END
+ SPEAKER_SOUND(config, m_speaker, 0).add_route(ALL_OUTPUTS, "mono", 0.25);
+}
//-------------------------------------------------
diff --git a/src/devices/bus/abckb/abc99.h b/src/devices/bus/abckb/abc99.h
index 1ad279141e8..cae72ac0675 100644
--- a/src/devices/bus/abckb/abc99.h
+++ b/src/devices/bus/abckb/abc99.h
@@ -92,8 +92,8 @@ private:
emu_timer *m_serial_timer;
emu_timer *m_mouse_timer;
- required_device<cpu_device> m_maincpu;
- required_device<cpu_device> m_mousecpu;
+ required_device<i8035_device> m_maincpu;
+ required_device<i8035_device> m_mousecpu;
required_device<speaker_sound_device> m_speaker;
required_ioport m_z14;
required_ioport m_mouseb;
diff --git a/src/devices/bus/dmv/k806.cpp b/src/devices/bus/dmv/k806.cpp
index 44d90f5a0af..62cf3f97ea4 100644
--- a/src/devices/bus/dmv/k806.cpp
+++ b/src/devices/bus/dmv/k806.cpp
@@ -100,14 +100,15 @@ void dmv_k806_device::device_reset()
// device_add_mconfig - add device configuration
//-------------------------------------------------
-MACHINE_CONFIG_START(dmv_k806_device::device_add_mconfig)
- MCFG_DEVICE_ADD("mcu", I8741, XTAL(6'000'000))
- MCFG_MCS48_PORT_P1_IN_CB(READ8(*this, dmv_k806_device, port1_r))
- MCFG_MCS48_PORT_P2_OUT_CB(WRITE8(*this, dmv_k806_device, port2_w))
- MCFG_MCS48_PORT_T1_IN_CB(READLINE(*this, dmv_k806_device, portt1_r))
-
- MCFG_TIMER_DRIVER_ADD_PERIODIC("mouse_timer", dmv_k806_device, mouse_timer, attotime::from_hz(1000))
-MACHINE_CONFIG_END
+void dmv_k806_device::device_add_mconfig(machine_config &config)
+{
+ I8741(config, m_mcu, XTAL(6'000'000));
+ m_mcu->p1_in_cb().set(FUNC(dmv_k806_device::port1_r));
+ m_mcu->p2_out_cb().set(FUNC(dmv_k806_device::port2_w));
+ m_mcu->t1_in_cb().set(FUNC(dmv_k806_device::portt1_r));
+
+ TIMER(config, "mouse_timer", 0).configure_periodic(timer_device::expired_delegate(FUNC(dmv_k806_device::mouse_timer), this), attotime::from_hz(1000));
+}
//-------------------------------------------------
// input_ports - device-specific input ports
diff --git a/src/devices/bus/interpro/keyboard/lle.cpp b/src/devices/bus/interpro/keyboard/lle.cpp
index bdeb185ebe8..dab60a49768 100644
--- a/src/devices/bus/interpro/keyboard/lle.cpp
+++ b/src/devices/bus/interpro/keyboard/lle.cpp
@@ -432,22 +432,23 @@ lle_device_base::lle_device_base(machine_config const &mconfig, device_type type
, m_leds(*this, "led_%u", 0U)
{
}
-MACHINE_CONFIG_START(lle_device_base::device_add_mconfig)
- MCFG_DEVICE_ADD("mcu", I8049, 11_MHz_XTAL)
- MCFG_DEVICE_ADDRESS_MAP(AS_IO, io_map)
- MCFG_MCS48_PORT_T0_IN_CB(READLINE(*this, lle_device_base, t0_r))
- MCFG_MCS48_PORT_T1_IN_CB(READLINE(*this, lle_device_base, t1_r))
- MCFG_MCS48_PORT_P1_OUT_CB(WRITE8(*this, lle_device_base, p1_w))
- MCFG_MCS48_PORT_P2_OUT_CB(WRITE8(*this, lle_device_base, p2_w))
- MCFG_MCS48_PORT_BUS_IN_CB(READ8(*this, lle_device_base, bus_r))
- MCFG_MCS48_PORT_BUS_OUT_CB(WRITE8(*this, lle_device_base, bus_w))
+
+void lle_device_base::device_add_mconfig(machine_config &config)
+{
+ I8049(config, m_mcu, 11_MHz_XTAL);
+ m_mcu->set_addrmap(AS_IO, &lle_device_base::io_map);
+ m_mcu->t0_in_cb().set(FUNC(lle_device_base::t0_r));
+ m_mcu->t1_in_cb().set(FUNC(lle_device_base::t1_r));
+ m_mcu->p1_out_cb().set(FUNC(lle_device_base::p1_w));
+ m_mcu->p2_out_cb().set(FUNC(lle_device_base::p2_w));
+ m_mcu->bus_in_cb().set(FUNC(lle_device_base::bus_r));
+ m_mcu->bus_out_cb().set(FUNC(lle_device_base::bus_w));
ADDRESS_MAP_BANK(config, m_ext).set_map(&lle_device_base::ext_map).set_options(ENDIANNESS_NATIVE, 8, 12, 0x100);
SPEAKER(config, "keyboard").front_center();
- MCFG_DEVICE_ADD("speaker", SPEAKER_SOUND, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "keyboard", 0.25)
-MACHINE_CONFIG_END
+ SPEAKER_SOUND(config, m_speaker, 0).add_route(ALL_OUTPUTS, "keyboard", 0.25);
+}
void lle_device_base::device_start()
{
diff --git a/src/devices/bus/interpro/keyboard/lle.h b/src/devices/bus/interpro/keyboard/lle.h
index 0b6c72a080f..d1e3d65f941 100644
--- a/src/devices/bus/interpro/keyboard/lle.h
+++ b/src/devices/bus/interpro/keyboard/lle.h
@@ -40,7 +40,7 @@ protected:
DECLARE_WRITE8_MEMBER(bus_w);
private:
- required_device<cpu_device> m_mcu;
+ required_device<i8049_device> m_mcu;
required_device<address_map_bank_device> m_ext;
required_ioport_array<15> m_upper;
required_ioport_array<11> m_lower;
diff --git a/src/devices/bus/pc_kbd/ec1841.cpp b/src/devices/bus/pc_kbd/ec1841.cpp
index b9e3ef1f345..51822723c7e 100644
--- a/src/devices/bus/pc_kbd/ec1841.cpp
+++ b/src/devices/bus/pc_kbd/ec1841.cpp
@@ -86,14 +86,15 @@ const tiny_rom_entry *ec_1841_keyboard_device::device_rom_region() const
// device_add_mconfig - add device configuration
//-------------------------------------------------
-MACHINE_CONFIG_START(ec_1841_keyboard_device::device_add_mconfig)
- MCFG_DEVICE_ADD(I8048_TAG, I8048, XTAL(5'460'000))
- MCFG_MCS48_PORT_BUS_OUT_CB(WRITE8(*this, ec_1841_keyboard_device, bus_w))
- MCFG_MCS48_PORT_P1_IN_CB(READ8(*this, ec_1841_keyboard_device, p1_r))
- MCFG_MCS48_PORT_P1_OUT_CB(WRITE8(*this, ec_1841_keyboard_device, p1_w))
- MCFG_MCS48_PORT_P2_OUT_CB(WRITE8(*this, ec_1841_keyboard_device, p2_w))
- MCFG_MCS48_PORT_T1_IN_CB(READLINE(*this, ec_1841_keyboard_device, t1_r))
-MACHINE_CONFIG_END
+void ec_1841_keyboard_device::device_add_mconfig(machine_config &config)
+{
+ I8048(config, m_maincpu, XTAL(5'460'000));
+ m_maincpu->bus_out_cb().set(FUNC(ec_1841_keyboard_device::bus_w));
+ m_maincpu->p1_in_cb().set(FUNC(ec_1841_keyboard_device::p1_r));
+ m_maincpu->p1_out_cb().set(FUNC(ec_1841_keyboard_device::p1_w));
+ m_maincpu->p2_out_cb().set(FUNC(ec_1841_keyboard_device::p2_w));
+ m_maincpu->t1_in_cb().set(FUNC(ec_1841_keyboard_device::t1_r));
+}
//-------------------------------------------------
diff --git a/src/devices/bus/pc_kbd/ec1841.h b/src/devices/bus/pc_kbd/ec1841.h
index 29fdff447ac..72e9dc639d0 100644
--- a/src/devices/bus/pc_kbd/ec1841.h
+++ b/src/devices/bus/pc_kbd/ec1841.h
@@ -49,7 +49,7 @@ private:
DECLARE_WRITE8_MEMBER( p2_w );
DECLARE_READ_LINE_MEMBER( t1_r );
- required_device<cpu_device> m_maincpu;
+ required_device<i8048_device> m_maincpu;
required_ioport_array<16> m_kbd;
uint8_t m_bus;
diff --git a/src/devices/bus/pc_kbd/iskr1030.cpp b/src/devices/bus/pc_kbd/iskr1030.cpp
index ac06d37d141..e55eabcfc20 100644
--- a/src/devices/bus/pc_kbd/iskr1030.cpp
+++ b/src/devices/bus/pc_kbd/iskr1030.cpp
@@ -71,14 +71,15 @@ void iskr_1030_keyboard_device::iskr_1030_keyboard_io(address_map &map)
// device_add_mconfig - add device configuration
//-------------------------------------------------
-MACHINE_CONFIG_START(iskr_1030_keyboard_device::device_add_mconfig)
- MCFG_DEVICE_ADD(I8048_TAG, I8048, XTAL(5'000'000))
- MCFG_DEVICE_IO_MAP(iskr_1030_keyboard_io)
- MCFG_MCS48_PORT_P1_IN_CB(READ8(*this, iskr_1030_keyboard_device, p1_r))
- MCFG_MCS48_PORT_P1_OUT_CB(WRITE8(*this, iskr_1030_keyboard_device, p1_w))
- MCFG_MCS48_PORT_P2_OUT_CB(WRITE8(*this, iskr_1030_keyboard_device, p2_w))
- MCFG_MCS48_PORT_T1_IN_CB(READLINE(*this, iskr_1030_keyboard_device, t1_r))
-MACHINE_CONFIG_END
+void iskr_1030_keyboard_device::device_add_mconfig(machine_config &config)
+{
+ I8048(config, m_maincpu, XTAL(5'000'000));
+ m_maincpu->set_addrmap(AS_IO, &iskr_1030_keyboard_device::iskr_1030_keyboard_io);
+ m_maincpu->p1_in_cb().set(FUNC(iskr_1030_keyboard_device::p1_r));
+ m_maincpu->p1_out_cb().set(FUNC(iskr_1030_keyboard_device::p1_w));
+ m_maincpu->p2_out_cb().set(FUNC(iskr_1030_keyboard_device::p2_w));
+ m_maincpu->t1_in_cb().set(FUNC(iskr_1030_keyboard_device::t1_r));
+}
//-------------------------------------------------
diff --git a/src/devices/bus/pc_kbd/iskr1030.h b/src/devices/bus/pc_kbd/iskr1030.h
index a05fd4b3736..0bc0796360f 100644
--- a/src/devices/bus/pc_kbd/iskr1030.h
+++ b/src/devices/bus/pc_kbd/iskr1030.h
@@ -54,7 +54,7 @@ private:
void iskr_1030_keyboard_io(address_map &map);
- required_device<cpu_device> m_maincpu;
+ required_device<i8048_device> m_maincpu;
required_ioport m_md00;
required_ioport m_md01;
required_ioport m_md02;
diff --git a/src/devices/bus/pc_kbd/pc83.cpp b/src/devices/bus/pc_kbd/pc83.cpp
index eb184f15cf0..9cfc3ee31e0 100644
--- a/src/devices/bus/pc_kbd/pc83.cpp
+++ b/src/devices/bus/pc_kbd/pc83.cpp
@@ -50,13 +50,14 @@ const tiny_rom_entry *ibm_pc_83_keyboard_device::device_rom_region() const
// device_add_mconfig - add device configuration
//-------------------------------------------------
-MACHINE_CONFIG_START(ibm_pc_83_keyboard_device::device_add_mconfig)
- MCFG_DEVICE_ADD(I8048_TAG, I8048, MCS48_LC_CLOCK(IND_U(47), CAP_P(20)))
- MCFG_MCS48_PORT_BUS_OUT_CB(WRITE8(*this, ibm_pc_83_keyboard_device, bus_w))
- MCFG_MCS48_PORT_P1_IN_CB(READ8(*this, ibm_pc_83_keyboard_device, p1_r))
- MCFG_MCS48_PORT_P2_OUT_CB(WRITE8(*this, ibm_pc_83_keyboard_device, p2_w))
- MCFG_MCS48_PORT_T0_IN_CB(READLINE(*this, ibm_pc_83_keyboard_device, t0_r))
-MACHINE_CONFIG_END
+void ibm_pc_83_keyboard_device::device_add_mconfig(machine_config &config)
+{
+ I8048(config, m_maincpu, MCS48_LC_CLOCK(IND_U(47), CAP_P(20)));
+ m_maincpu->bus_out_cb().set(FUNC(ibm_pc_83_keyboard_device::bus_w));
+ m_maincpu->p1_in_cb().set(FUNC(ibm_pc_83_keyboard_device::p1_r));
+ m_maincpu->p2_out_cb().set(FUNC(ibm_pc_83_keyboard_device::p2_w));
+ m_maincpu->t0_in_cb().set(FUNC(ibm_pc_83_keyboard_device::t0_r));
+}
//-------------------------------------------------
diff --git a/src/devices/bus/pc_kbd/pc83.h b/src/devices/bus/pc_kbd/pc83.h
index dc33096c437..6b800c7b8a0 100644
--- a/src/devices/bus/pc_kbd/pc83.h
+++ b/src/devices/bus/pc_kbd/pc83.h
@@ -50,7 +50,7 @@ private:
DECLARE_WRITE8_MEMBER( p2_w );
DECLARE_READ_LINE_MEMBER( t0_r );
- required_device<cpu_device> m_maincpu;
+ required_device<i8048_device> m_maincpu;
required_ioport_array<24> m_dr;
uint8_t m_cnt;
diff --git a/src/devices/bus/pc_kbd/pcat84.cpp b/src/devices/bus/pc_kbd/pcat84.cpp
index 0fc410d152e..47cb48496e9 100644
--- a/src/devices/bus/pc_kbd/pcat84.cpp
+++ b/src/devices/bus/pc_kbd/pcat84.cpp
@@ -103,16 +103,17 @@ const tiny_rom_entry *ibm_3270pc_122_keyboard_device::device_rom_region() const
// device_add_mconfig - add device configuration
//-------------------------------------------------
-MACHINE_CONFIG_START(ibm_pc_at_84_keyboard_device::device_add_mconfig)
- MCFG_DEVICE_ADD(I8048_TAG, I8048, 5364000)
- MCFG_MCS48_PORT_BUS_OUT_CB(WRITE8(*this, ibm_pc_at_84_keyboard_device, bus_w))
- MCFG_MCS48_PORT_P1_IN_CB(READ8(*this, ibm_pc_at_84_keyboard_device, p1_r))
- MCFG_MCS48_PORT_P1_OUT_CB(WRITE8(*this, ibm_pc_at_84_keyboard_device, p1_w))
- MCFG_MCS48_PORT_P2_IN_CB(READ8(*this, ibm_pc_at_84_keyboard_device, p2_r))
- MCFG_MCS48_PORT_P2_OUT_CB(WRITE8(*this, ibm_pc_at_84_keyboard_device, p2_w))
- MCFG_MCS48_PORT_T0_IN_CB(READLINE(*this, ibm_pc_at_84_keyboard_device, t0_r))
- MCFG_MCS48_PORT_T1_IN_CB(READLINE(*this, ibm_pc_at_84_keyboard_device, t1_r))
-MACHINE_CONFIG_END
+void ibm_pc_at_84_keyboard_device::device_add_mconfig(machine_config &config)
+{
+ I8048(config, m_maincpu, 5364000);
+ m_maincpu->bus_out_cb().set(FUNC(ibm_pc_at_84_keyboard_device::bus_w));
+ m_maincpu->p1_in_cb().set(FUNC(ibm_pc_at_84_keyboard_device::p1_r));
+ m_maincpu->p1_out_cb().set(FUNC(ibm_pc_at_84_keyboard_device::p1_w));
+ m_maincpu->p2_in_cb().set(FUNC(ibm_pc_at_84_keyboard_device::p2_r));
+ m_maincpu->p2_out_cb().set(FUNC(ibm_pc_at_84_keyboard_device::p2_w));
+ m_maincpu->t0_in_cb().set(FUNC(ibm_pc_at_84_keyboard_device::t0_r));
+ m_maincpu->t1_in_cb().set(FUNC(ibm_pc_at_84_keyboard_device::t1_r));
+}
//-------------------------------------------------
diff --git a/src/devices/bus/pc_kbd/pcat84.h b/src/devices/bus/pc_kbd/pcat84.h
index 4b97b8e7aa0..2ed3fcc2b7c 100644
--- a/src/devices/bus/pc_kbd/pcat84.h
+++ b/src/devices/bus/pc_kbd/pcat84.h
@@ -64,7 +64,7 @@ private:
int key_depressed();
- required_device<cpu_device> m_maincpu;
+ required_device<i8048_device> m_maincpu;
required_ioport_array<16> m_dr;
optional_ioport m_kbdida;
optional_ioport m_kbdidb;
diff --git a/src/devices/bus/pc_kbd/pcxt83.cpp b/src/devices/bus/pc_kbd/pcxt83.cpp
index 4c358cd9cff..366ef89332f 100644
--- a/src/devices/bus/pc_kbd/pcxt83.cpp
+++ b/src/devices/bus/pc_kbd/pcxt83.cpp
@@ -72,15 +72,16 @@ const tiny_rom_entry *ibm_pc_xt_83_keyboard_device::device_rom_region() const
// device_add_mconfig - add device configuration
//-------------------------------------------------
-MACHINE_CONFIG_START(ibm_pc_xt_83_keyboard_device::device_add_mconfig)
- MCFG_DEVICE_ADD(I8048_TAG, I8048, MCS48_LC_CLOCK(IND_U(47), CAP_P(20.7)))
- MCFG_MCS48_PORT_BUS_IN_CB(READ8(*this, ibm_pc_xt_83_keyboard_device, bus_r))
- MCFG_MCS48_PORT_BUS_OUT_CB(WRITE8(*this, ibm_pc_xt_83_keyboard_device, bus_w))
- MCFG_MCS48_PORT_P1_OUT_CB(WRITE8(*this, ibm_pc_xt_83_keyboard_device, p1_w))
- MCFG_MCS48_PORT_P2_OUT_CB(WRITE8(*this, ibm_pc_xt_83_keyboard_device, p2_w))
- MCFG_MCS48_PORT_T0_IN_CB(READLINE(*this, ibm_pc_xt_83_keyboard_device, t0_r))
- MCFG_MCS48_PORT_T1_IN_CB(READLINE(*this, ibm_pc_xt_83_keyboard_device, t1_r))
-MACHINE_CONFIG_END
+void ibm_pc_xt_83_keyboard_device::device_add_mconfig(machine_config &config)
+{
+ I8048(config, m_maincpu, MCS48_LC_CLOCK(IND_U(47), CAP_P(20.7)));
+ m_maincpu->bus_in_cb().set(FUNC(ibm_pc_xt_83_keyboard_device::bus_r));
+ m_maincpu->bus_out_cb().set(FUNC(ibm_pc_xt_83_keyboard_device::bus_w));
+ m_maincpu->p1_out_cb().set(FUNC(ibm_pc_xt_83_keyboard_device::p1_w));
+ m_maincpu->p2_out_cb().set(FUNC(ibm_pc_xt_83_keyboard_device::p2_w));
+ m_maincpu->t0_in_cb().set(FUNC(ibm_pc_xt_83_keyboard_device::t0_r));
+ m_maincpu->t1_in_cb().set(FUNC(ibm_pc_xt_83_keyboard_device::t1_r));
+}
//-------------------------------------------------
diff --git a/src/devices/bus/pc_kbd/pcxt83.h b/src/devices/bus/pc_kbd/pcxt83.h
index fd209d2e767..d2e7175e8c4 100644
--- a/src/devices/bus/pc_kbd/pcxt83.h
+++ b/src/devices/bus/pc_kbd/pcxt83.h
@@ -51,7 +51,7 @@ private:
DECLARE_READ_LINE_MEMBER( t0_r );
DECLARE_READ_LINE_MEMBER( t1_r );
- required_device<cpu_device> m_maincpu;
+ required_device<i8048_device> m_maincpu;
required_ioport_array<12> m_md;
uint8_t m_bus;
diff --git a/src/devices/bus/vcs_ctrl/ctrl.h b/src/devices/bus/vcs_ctrl/ctrl.h
index 3f9b77b4c35..31f371d2fa8 100644
--- a/src/devices/bus/vcs_ctrl/ctrl.h
+++ b/src/devices/bus/vcs_ctrl/ctrl.h
@@ -67,7 +67,16 @@ class vcs_control_port_device : public device_t,
{
public:
// construction/destruction
- vcs_control_port_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ template <typename T>
+ vcs_control_port_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&opts, char const* dflt)
+ : vcs_control_port_device(mconfig, tag, owner)
+ {
+ option_reset();
+ opts(*this);
+ set_default_option(dflt);
+ set_fixed(false);
+ }
+ vcs_control_port_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
// static configuration helpers
template <class Object> devcb_base &set_trigger_wr_callback(Object &&cb) { return m_write_trigger.set_callback(std::forward<Object>(cb)); }
diff --git a/src/devices/cpu/mcs48/mcs48.h b/src/devices/cpu/mcs48/mcs48.h
index ede81b5e87f..ed155affed3 100644
--- a/src/devices/cpu/mcs48/mcs48.h
+++ b/src/devices/cpu/mcs48/mcs48.h
@@ -68,36 +68,6 @@ enum
attotime::from_hz(_clock/(3*5))
-#define MCFG_MCS48_PORT_P1_IN_CB(_devcb) \
- downcast<mcs48_cpu_device &>(*device).set_port_in_cb(0, DEVCB_##_devcb);
-#define MCFG_MCS48_PORT_P1_OUT_CB(_devcb) \
- downcast<mcs48_cpu_device &>(*device).set_port_out_cb(0, DEVCB_##_devcb);
-
-#define MCFG_MCS48_PORT_P2_IN_CB(_devcb) \
- downcast<mcs48_cpu_device &>(*device).set_port_in_cb(1, DEVCB_##_devcb);
-#define MCFG_MCS48_PORT_P2_OUT_CB(_devcb) \
- downcast<mcs48_cpu_device &>(*device).set_port_out_cb(1, DEVCB_##_devcb);
-
-#define MCFG_MCS48_PORT_T0_IN_CB(_devcb) \
- downcast<mcs48_cpu_device &>(*device).set_test_in_cb(0, DEVCB_##_devcb);
-#define MCFG_MCS48_PORT_T0_CLK_DEVICE(_tag) \
- downcast<mcs48_cpu_device &>(*device).set_t0_clk_cb(clock_update_delegate(FUNC(device_t::set_unscaled_clock), _tag, (device_t *)nullptr));
-#define MCFG_MCS48_PORT_T0_CLK_CUSTOM(_class, _func) \
- downcast<mcs48_cpu_device &>(*device).set_t0_clk_cb(clock_update_delegate(&_class::_func, #_class "::" _func, owner));
-
-#define MCFG_MCS48_PORT_T1_IN_CB(_devcb) \
- downcast<mcs48_cpu_device &>(*device).set_test_in_cb(1, DEVCB_##_devcb);
-
-#define MCFG_MCS48_PORT_BUS_IN_CB(_devcb) \
- downcast<mcs48_cpu_device &>(*device).set_bus_in_cb(DEVCB_##_devcb);
-#define MCFG_MCS48_PORT_BUS_OUT_CB(_devcb) \
- downcast<mcs48_cpu_device &>(*device).set_bus_out_cb(DEVCB_##_devcb);
-
-// PROG line to 8243 expander
-#define MCFG_MCS48_PORT_PROG_OUT_CB(_devcb) \
- downcast<mcs48_cpu_device &>(*device).set_prog_out_cb(DEVCB_##_devcb);
-
-
/***************************************************************************
TYPES
***************************************************************************/
@@ -142,13 +112,6 @@ public:
};
// configuration
- template <class Object> devcb_base &set_port_in_cb(int n, Object &&cb) { return m_port_in_cb[n].set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_port_out_cb(int n, Object &&cb) { return m_port_out_cb[n].set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_bus_in_cb(Object &&cb) { return m_bus_in_cb.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_bus_out_cb(Object &&cb) { return m_bus_out_cb.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_test_in_cb(int n, Object &&cb) { return m_test_in_cb[n].set_callback(std::forward<Object>(cb)); }
- template <typename Object> void set_t0_clk_cb(Object &&cb) { m_t0_clk_func = std::forward<Object>(cb); }
- template <class Object> devcb_base &set_prog_out_cb(Object &&cb) { return m_prog_out_cb.set_callback(std::forward<Object>(cb)); }
auto p1_in_cb() { return m_port_in_cb[0].bind(); }
auto p2_in_cb() { return m_port_in_cb[1].bind(); }
auto p1_out_cb() { return m_port_out_cb[0].bind(); }
@@ -157,6 +120,8 @@ public:
auto bus_out_cb() { return m_bus_out_cb.bind(); }
auto t0_in_cb() { return m_test_in_cb[0].bind(); }
auto t1_in_cb() { return m_test_in_cb[1].bind(); }
+
+ // PROG line to 8243 expander
auto prog_out_cb() { return m_prog_out_cb.bind(); }
uint8_t p1_r() { return m_p1; }
@@ -168,6 +133,16 @@ public:
void program_10bit(address_map &map);
void program_11bit(address_map &map);
void program_12bit(address_map &map);
+
+ void set_t0_clk_cb(clock_update_delegate callback) { m_t0_clk_func = callback; }
+ template <class FunctionClass> void set_t0_clk_cb(const char *devname, void (FunctionClass::*callback)(uint32_t), const char *name)
+ {
+ set_t0_clk_cb(clock_update_delegate(callback, name, devname, static_cast<FunctionClass *>(nullptr)));
+ }
+ template <class FunctionClass> void set_t0_clk_cb(void (FunctionClass::*callback)(uint32_t), const char *name)
+ {
+ set_t0_clk_cb(clock_update_delegate(callback, name, nullptr, static_cast<FunctionClass *>(nullptr)));
+ }
protected:
typedef int (mcs48_cpu_device::*mcs48_ophandler)();
diff --git a/src/devices/cpu/mcs51/mcs51.h b/src/devices/cpu/mcs51/mcs51.h
index 911a49c2b89..fd0e05fe5d7 100644
--- a/src/devices/cpu/mcs51/mcs51.h
+++ b/src/devices/cpu/mcs51/mcs51.h
@@ -100,8 +100,11 @@ public:
void set_port_forced_input(uint8_t port, uint8_t forced_input) { m_forced_inputs[port] = forced_input; }
template<class Object> devcb_base &set_serial_rx_cb(Object &&cb) { return m_serial_rx_cb.set_callback(std::forward<Object>(cb)); }
template<class Object> devcb_base &set_serial_tx_cb(Object &&cb) { return m_serial_tx_cb.set_callback(std::forward<Object>(cb)); }
+
template <unsigned N> auto port_in_cb() { return m_port_in_cb[N].bind(); }
template <unsigned N> auto port_out_cb() { return m_port_out_cb[N].bind(); }
+ auto serial_rx_cb() { return m_serial_rx_cb.bind(); }
+ auto serial_tx_cb() { return m_serial_tx_cb.bind(); }
void program_internal(address_map &map);
void data_internal(address_map &map);
diff --git a/src/devices/cpu/melps4/melps4.h b/src/devices/cpu/melps4/melps4.h
index 17b0c9ea623..b88b6533aa6 100644
--- a/src/devices/cpu/melps4/melps4.h
+++ b/src/devices/cpu/melps4/melps4.h
@@ -12,43 +12,6 @@
#pragma once
-// I/O ports setup
-
-// K input or A/D input port, up to 16 pins
-#define MCFG_MELPS4_READ_K_CB(_devcb) \
- downcast<melps4_cpu_device &>(*device).set_read_k_callback(DEVCB_##_devcb);
-
-// D discrete I/O port, up to 16 pins - offset 0-15 for bit, 16 for all pins clear
-#define MCFG_MELPS4_READ_D_CB(_devcb) \
- downcast<melps4_cpu_device &>(*device).set_read_d_callback(DEVCB_##_devcb);
-#define MCFG_MELPS4_WRITE_D_CB(_devcb) \
- downcast<melps4_cpu_device &>(*device).set_write_d_callback(DEVCB_##_devcb);
-
-// 8-bit S generic I/O port
-#define MCFG_MELPS4_READ_S_CB(_devcb) \
- downcast<melps4_cpu_device &>(*device).set_read_s_callback(DEVCB_##_devcb);
-#define MCFG_MELPS4_WRITE_S_CB(_devcb) \
- downcast<melps4_cpu_device &>(*device).set_write_s_callback(DEVCB_##_devcb);
-
-// 4-bit F generic I/O port
-#define MCFG_MELPS4_READ_F_CB(_devcb) \
- downcast<melps4_cpu_device &>(*device).set_read_f_callback(DEVCB_##_devcb);
-#define MCFG_MELPS4_WRITE_F_CB(_devcb) \
- downcast<melps4_cpu_device &>(*device).set_write_f_callback(DEVCB_##_devcb);
-
-// 4-bit G generic output port
-#define MCFG_MELPS4_WRITE_G_CB(_devcb) \
- downcast<melps4_cpu_device &>(*device).set_write_g_callback(DEVCB_##_devcb);
-
-// 1-bit U generic output port
-#define MCFG_MELPS4_WRITE_U_CB(_devcb) \
- downcast<melps4_cpu_device &>(*device).set_write_u_callback(DEVCB_##_devcb);
-
-// T timer I/O pin (use execute_set_input for reads)
-#define MCFG_MELPS4_WRITE_T_CB(_devcb) \
- downcast<melps4_cpu_device &>(*device).set_write_t_callback(DEVCB_##_devcb);
-
-
#define MELPS4_PORTD_CLR 16
// only generic ports here
@@ -101,17 +64,29 @@ class melps4_cpu_device : public cpu_device
{
public:
// configuration helpers
- template <class Object> devcb_base &set_read_k_callback(Object &&cb) { return m_read_k.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_read_d_callback(Object &&cb) { return m_read_d.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_read_s_callback(Object &&cb) { return m_read_s.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_read_f_callback(Object &&cb) { return m_read_f.set_callback(std::forward<Object>(cb)); }
-
- template <class Object> devcb_base &set_write_d_callback(Object &&cb) { return m_write_d.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_write_s_callback(Object &&cb) { return m_write_s.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_write_f_callback(Object &&cb) { return m_write_f.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_write_g_callback(Object &&cb) { return m_write_g.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_write_u_callback(Object &&cb) { return m_write_u.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_write_t_callback(Object &&cb) { return m_write_t.set_callback(std::forward<Object>(cb)); }
+ // K input or A/D input port, up to 16 pins
+ auto read_k() { return m_read_k.bind(); }
+
+ // D discrete I/O port, up to 16 pins - offset 0-15 for bit, 16 for all pins clear
+ auto read_d() { return m_read_d.bind(); }
+ auto write_d() { return m_write_d.bind(); }
+
+ // 8-bit S generic I/O port
+ auto read_s() { return m_read_s.bind(); }
+ auto write_s() { return m_write_s.bind(); }
+
+ // 4-bit F generic I/O port
+ auto read_f() { return m_read_f.bind(); }
+ auto write_f() { return m_write_f.bind(); }
+
+ // 4-bit G generic output port
+ auto write_g() { return m_write_g.bind(); }
+
+ // 1-bit U generic output port
+ auto write_u() { return m_write_u.bind(); }
+
+ // T timer I/O pin (use execute_set_input for reads)
+ auto write_t() { return m_write_t.bind(); }
protected:
// construction/destruction
diff --git a/src/devices/machine/ldpr8210.cpp b/src/devices/machine/ldpr8210.cpp
index 34a2ff4b1ae..0bd86f5a3ae 100644
--- a/src/devices/machine/ldpr8210.cpp
+++ b/src/devices/machine/ldpr8210.cpp
@@ -373,15 +373,16 @@ const tiny_rom_entry *pioneer_pr8210_device::device_rom_region() const
// device_add_mconfig - add device configuration
//-------------------------------------------------
-MACHINE_CONFIG_START(pioneer_pr8210_device::device_add_mconfig)
- MCFG_DEVICE_ADD("pr8210", I8049, XTAL(4'410'000))
- MCFG_DEVICE_IO_MAP(pr8210_portmap)
- MCFG_MCS48_PORT_BUS_IN_CB(READ8(*this, pioneer_pr8210_device, i8049_bus_r))
- MCFG_MCS48_PORT_P1_OUT_CB(WRITE8(*this, pioneer_pr8210_device, i8049_port1_w))
- MCFG_MCS48_PORT_P2_OUT_CB(WRITE8(*this, pioneer_pr8210_device, i8049_port2_w))
- MCFG_MCS48_PORT_T0_IN_CB(READLINE(*this, pioneer_pr8210_device, i8049_t0_r))
- MCFG_MCS48_PORT_T1_IN_CB(READLINE(*this, pioneer_pr8210_device, i8049_t1_r))
-MACHINE_CONFIG_END
+void pioneer_pr8210_device::device_add_mconfig(machine_config &config)
+{
+ I8049(config, m_i8049_cpu, XTAL(4'410'000));
+ m_i8049_cpu->set_addrmap(AS_IO, &pioneer_pr8210_device::pr8210_portmap);
+ m_i8049_cpu->bus_in_cb().set(FUNC(pioneer_pr8210_device::i8049_bus_r));
+ m_i8049_cpu->p1_out_cb().set(FUNC(pioneer_pr8210_device::i8049_port1_w));
+ m_i8049_cpu->p2_out_cb().set(FUNC(pioneer_pr8210_device::i8049_port2_w));
+ m_i8049_cpu->t0_in_cb().set(FUNC(pioneer_pr8210_device::i8049_t0_r));
+ m_i8049_cpu->t1_in_cb().set(FUNC(pioneer_pr8210_device::i8049_t1_r));
+}
//-------------------------------------------------
@@ -1001,15 +1002,16 @@ const tiny_rom_entry *simutrek_special_device::device_rom_region() const
// device_add_mconfig - add device configuration
//-------------------------------------------------
-MACHINE_CONFIG_START(simutrek_special_device::device_add_mconfig)
- MCFG_DEVICE_ADD("simutrek", I8748, XTAL(6'000'000))
- MCFG_DEVICE_IO_MAP(simutrek_portmap)
- MCFG_MCS48_PORT_P2_IN_CB(READ8(*this, simutrek_special_device, i8748_port2_r))
- MCFG_MCS48_PORT_P2_OUT_CB(WRITE8(*this, simutrek_special_device, i8748_port2_w))
- MCFG_MCS48_PORT_T0_IN_CB(READLINE(*this, simutrek_special_device, i8748_t0_r))
+void simutrek_special_device::device_add_mconfig(machine_config &config)
+{
+ i8748_device &special(I8748(config, "simutrek", XTAL(6'000'000)));
+ special.set_addrmap(AS_IO, &simutrek_special_device::simutrek_portmap);
+ special.p2_in_cb().set(FUNC(simutrek_special_device::i8748_port2_r));
+ special.p2_out_cb().set(FUNC(simutrek_special_device::i8748_port2_w));
+ special.t0_in_cb().set(FUNC(simutrek_special_device::i8748_t0_r));
pioneer_pr8210_device::device_add_mconfig(config);
-MACHINE_CONFIG_END
+}
//-------------------------------------------------
diff --git a/src/devices/machine/ldvp931.cpp b/src/devices/machine/ldvp931.cpp
index 0f27be02906..7a688736a93 100644
--- a/src/devices/machine/ldvp931.cpp
+++ b/src/devices/machine/ldvp931.cpp
@@ -286,16 +286,17 @@ const tiny_rom_entry *phillips_22vp931_device::device_rom_region() const
// device_add_mconfig - add device configuration
//-------------------------------------------------
-MACHINE_CONFIG_START(phillips_22vp931_device::device_add_mconfig)
- MCFG_DEVICE_ADD("vp931", I8049, XTAL(11'000'000))
- MCFG_DEVICE_IO_MAP(vp931_portmap)
- MCFG_MCS48_PORT_P1_IN_CB(READ8(*this, phillips_22vp931_device, i8049_port1_r))
- MCFG_MCS48_PORT_P1_OUT_CB(WRITE8(*this, phillips_22vp931_device, i8049_port1_w))
- MCFG_MCS48_PORT_P2_IN_CB(READ8(*this, phillips_22vp931_device, i8049_port2_r))
- MCFG_MCS48_PORT_P2_OUT_CB(WRITE8(*this, phillips_22vp931_device, i8049_port2_w))
- MCFG_MCS48_PORT_T0_IN_CB(READLINE(*this, phillips_22vp931_device, i8049_t0_r))
- MCFG_MCS48_PORT_T1_IN_CB(READLINE(*this, phillips_22vp931_device, i8049_t1_r))
-MACHINE_CONFIG_END
+void phillips_22vp931_device::device_add_mconfig(machine_config &config)
+{
+ I8049(config, m_i8049_cpu, XTAL(11'000'000));
+ m_i8049_cpu->set_addrmap(AS_IO, &phillips_22vp931_device::vp931_portmap);
+ m_i8049_cpu->p1_in_cb().set(FUNC(phillips_22vp931_device::i8049_port1_r));
+ m_i8049_cpu->p1_out_cb().set(FUNC(phillips_22vp931_device::i8049_port1_w));
+ m_i8049_cpu->p2_in_cb().set(FUNC(phillips_22vp931_device::i8049_port2_r));
+ m_i8049_cpu->p2_out_cb().set(FUNC(phillips_22vp931_device::i8049_port2_w));
+ m_i8049_cpu->t0_in_cb().set(FUNC(phillips_22vp931_device::i8049_t0_r));
+ m_i8049_cpu->t1_in_cb().set(FUNC(phillips_22vp931_device::i8049_t1_r));
+}
//-------------------------------------------------
diff --git a/src/devices/sound/sp0250.h b/src/devices/sound/sp0250.h
index 95352c32ecc..665b719e725 100644
--- a/src/devices/sound/sp0250.h
+++ b/src/devices/sound/sp0250.h
@@ -11,6 +11,7 @@ public:
sp0250_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
template <class Object> devcb_base &set_drq_callback(Object &&cb) { return m_drq.set_callback(std::forward<Object>(cb)); }
+ auto drq() { return m_drq.bind(); }
DECLARE_WRITE8_MEMBER( write );
uint8_t drq_r();
diff --git a/src/mame/audio/carnival.cpp b/src/mame/audio/carnival.cpp
index e8355fee1fe..c19f4d5a942 100644
--- a/src/mame/audio/carnival.cpp
+++ b/src/mame/audio/carnival.cpp
@@ -200,11 +200,11 @@ void vicdual_state::mboard_map(address_map &map)
MACHINE_CONFIG_START(vicdual_state::carnival_audio)
/* music board */
- MCFG_DEVICE_ADD("audiocpu", I8039, XTAL(3'579'545))
- MCFG_DEVICE_PROGRAM_MAP(mboard_map)
- MCFG_MCS48_PORT_P1_OUT_CB(WRITE8(*this, vicdual_state, carnival_music_port_1_w))
- MCFG_MCS48_PORT_P2_OUT_CB(WRITE8(*this, vicdual_state, carnival_music_port_2_w))
- MCFG_MCS48_PORT_T1_IN_CB(READLINE(*this, vicdual_state, carnival_music_port_t1_r))
+ I8039(config, m_audiocpu, XTAL(3'579'545));
+ m_audiocpu->set_addrmap(AS_PROGRAM, &vicdual_state::mboard_map);
+ m_audiocpu->p1_out_cb().set(FUNC(vicdual_state::carnival_music_port_1_w));
+ m_audiocpu->p2_out_cb().set(FUNC(vicdual_state::carnival_music_port_2_w));
+ m_audiocpu->t1_in_cb().set(FUNC(vicdual_state::carnival_music_port_t1_r));
AY8912(config, m_psg, XTAL(3'579'545)/3).add_route(ALL_OUTPUTS, "mono", 0.25);
diff --git a/src/mame/audio/dkong.cpp b/src/mame/audio/dkong.cpp
index 8119918ffa4..2ac1dc6578f 100644
--- a/src/mame/audio/dkong.cpp
+++ b/src/mame/audio/dkong.cpp
@@ -3,7 +3,6 @@
#include "emu.h"
#include "includes/dkong.h"
-#include "cpu/mcs48/mcs48.h"
#include "sound/discrete.h"
#include "speaker.h"
@@ -1338,16 +1337,16 @@ MACHINE_CONFIG_START(dkong_state::dkong2b_audio)
m_dev_vp2->read_cb<5>().set(m_dev_6h, FUNC(latch8_device::bit3_r));
m_dev_vp2->write_cb<7>().set("discrete", FUNC(discrete_device::write_line<DS_DISCHARGE_INV>));
- MCFG_DEVICE_ADD("soundcpu", MB8884, I8035_CLOCK)
- MCFG_DEVICE_PROGRAM_MAP(dkong_sound_map)
- MCFG_DEVICE_IO_MAP(dkong_sound_io_map)
- MCFG_MCS48_PORT_BUS_IN_CB(READ8(*this, dkong_state, dkong_tune_r))
- MCFG_MCS48_PORT_BUS_OUT_CB(WRITE8(*this, dkong_state, dkong_voice_w))
- MCFG_MCS48_PORT_P1_OUT_CB(WRITE8(*this, dkong_state, dkong_p1_w)) // only write to dac
- MCFG_MCS48_PORT_P2_IN_CB(READ8("virtual_p2", latch8_device, read))
- MCFG_MCS48_PORT_P2_OUT_CB(WRITE8("virtual_p2", latch8_device, write))
- MCFG_MCS48_PORT_T0_IN_CB(READLINE("ls259.6h", latch8_device, bit5_q_r))
- MCFG_MCS48_PORT_T1_IN_CB(READLINE("ls259.6h", latch8_device, bit4_q_r))
+ MB8884(config, m_soundcpu, I8035_CLOCK);
+ m_soundcpu->set_addrmap(AS_PROGRAM, &dkong_state::dkong_sound_map);
+ m_soundcpu->set_addrmap(AS_IO, &dkong_state::dkong_sound_io_map);
+ m_soundcpu->bus_in_cb().set(FUNC(dkong_state::dkong_tune_r));
+ m_soundcpu->bus_out_cb().set(FUNC(dkong_state::dkong_voice_w));
+ m_soundcpu->p1_out_cb().set(FUNC(dkong_state::dkong_p1_w)); // only write to dac
+ m_soundcpu->p2_in_cb().set("virtual_p2", FUNC(latch8_device::read));
+ m_soundcpu->p2_out_cb().set("virtual_p2", FUNC(latch8_device::write));
+ m_soundcpu->t0_in_cb().set("ls259.6h", FUNC(latch8_device::bit5_q_r));
+ m_soundcpu->t1_in_cb().set("ls259.6h", FUNC(latch8_device::bit4_q_r));
SPEAKER(config, "mono").front_center();
MCFG_DEVICE_ADD("discrete", DISCRETE, dkong2b_discrete)
@@ -1365,11 +1364,10 @@ MACHINE_CONFIG_END
MACHINE_CONFIG_START(dkong_state::radarscp1_audio)
radarscp_audio(config);
- MCFG_DEVICE_MODIFY("soundcpu")
- MCFG_DEVICE_IO_MAP(radarscp1_sound_io_map)
- MCFG_MCS48_PORT_P1_IN_CB(READ8("virtual_p1", latch8_device, read))
- MCFG_MCS48_PORT_P1_OUT_CB(WRITE8(*this, dkong_state, m58817_command_w))
- MCFG_MCS48_PORT_P2_IN_CB(CONSTANT(0))
+ m_soundcpu->set_addrmap(AS_IO, &dkong_state::radarscp1_sound_io_map);
+ m_soundcpu->p1_in_cb().set("virtual_p1", FUNC(latch8_device::read));
+ m_soundcpu->p1_out_cb().set(FUNC(dkong_state::m58817_command_w));
+ m_soundcpu->p2_in_cb().set_constant(0);
/* virtual_p2 is not read -see memory map-, all bits are output bits */
latch8_device &vp1(LATCH8(config, "virtual_p1")); /* virtual latch for port A */
@@ -1412,14 +1410,14 @@ MACHINE_CONFIG_START(dkong_state::dkongjr_audio)
m_dev_vp2->read_cb<4>().set(m_dev_6h, FUNC(latch8_device::bit6_r));
m_dev_vp2->write_cb<7>().set("discrete", FUNC(discrete_device::write_line<DS_DISCHARGE_INV>));
- MCFG_DEVICE_ADD("soundcpu", MB8884, I8035_CLOCK)
- MCFG_DEVICE_PROGRAM_MAP(dkong_sound_map)
- MCFG_DEVICE_IO_MAP(dkongjr_sound_io_map)
- MCFG_MCS48_PORT_P1_OUT_CB(WRITE8(*this, dkong_state, dkong_p1_w)) // only write to dac
- MCFG_MCS48_PORT_P2_IN_CB(READ8("virtual_p2", latch8_device, read))
- MCFG_MCS48_PORT_P2_OUT_CB(WRITE8("virtual_p2", latch8_device, write))
- MCFG_MCS48_PORT_T0_IN_CB(READLINE("ls259.6h", latch8_device, bit5_q_r))
- MCFG_MCS48_PORT_T1_IN_CB(READLINE("ls259.6h", latch8_device, bit4_q_r))
+ MB8884(config, m_soundcpu, I8035_CLOCK);
+ m_soundcpu->set_addrmap(AS_PROGRAM, &dkong_state::dkong_sound_map);
+ m_soundcpu->set_addrmap(AS_IO, &dkong_state::dkongjr_sound_io_map);
+ m_soundcpu->p1_out_cb().set(FUNC(dkong_state::dkong_p1_w)); // only write to dac
+ m_soundcpu->p2_in_cb().set("virtual_p2", FUNC(latch8_device::read));
+ m_soundcpu->p2_out_cb().set("virtual_p2", FUNC(latch8_device::write));
+ m_soundcpu->t0_in_cb().set("ls259.6h", FUNC(latch8_device::bit5_q_r));
+ m_soundcpu->t1_in_cb().set("ls259.6h", FUNC(latch8_device::bit4_q_r));
SPEAKER(config, "mono").front_center();
diff --git a/src/mame/audio/mario.cpp b/src/mame/audio/mario.cpp
index 384033a7d6a..7759a09c720 100644
--- a/src/mame/audio/mario.cpp
+++ b/src/mame/audio/mario.cpp
@@ -638,18 +638,18 @@ void mario_state::masao_sound_map(address_map &map)
MACHINE_CONFIG_START(mario_state::mario_audio)
#if USE_8039
- MCFG_DEVICE_ADD("audiocpu", I8039, I8035_CLOCK) /* 730 kHz */
+ i8039_device &audiocpu(I8039(config, "audiocpu", I8035_CLOCK)); /* 730 kHz */
#else
- MCFG_DEVICE_ADD("audiocpu", M58715, I8035_CLOCK) /* 730 kHz */
+ m58715_device &audiocpu(M58715(config, m_audiocpu, I8035_CLOCK)); /* 730 kHz */
#endif
- MCFG_DEVICE_PROGRAM_MAP(mario_sound_map)
- MCFG_DEVICE_IO_MAP(mario_sound_io_map)
- MCFG_MCS48_PORT_P1_IN_CB(READ8(*this, mario_state, mario_sh_p1_r))
- MCFG_MCS48_PORT_P1_OUT_CB(WRITE8(*this, mario_state, mario_sh_p1_w))
- MCFG_MCS48_PORT_P2_IN_CB(READ8(*this, mario_state, mario_sh_p2_r))
- MCFG_MCS48_PORT_P2_OUT_CB(WRITE8(*this, mario_state, mario_sh_p2_w))
- MCFG_MCS48_PORT_T0_IN_CB(READLINE(*this, mario_state, mario_sh_t0_r))
- MCFG_MCS48_PORT_T1_IN_CB(READLINE(*this, mario_state, mario_sh_t1_r))
+ audiocpu.set_addrmap(AS_PROGRAM, &mario_state::mario_sound_map);
+ audiocpu.set_addrmap(AS_IO, &mario_state::mario_sound_io_map);
+ audiocpu.p1_in_cb().set(FUNC(mario_state::mario_sh_p1_r));
+ audiocpu.p1_out_cb().set(FUNC(mario_state::mario_sh_p1_w));
+ audiocpu.p2_in_cb().set(FUNC(mario_state::mario_sh_p2_r));
+ audiocpu.p2_out_cb().set(FUNC(mario_state::mario_sh_p2_w));
+ audiocpu.t0_in_cb().set(FUNC(mario_state::mario_sh_t0_r));
+ audiocpu.t1_in_cb().set(FUNC(mario_state::mario_sh_t1_r));
SPEAKER(config, "mono").front_center();
diff --git a/src/mame/audio/n8080.cpp b/src/mame/audio/n8080.cpp
index 99c0e41c2f2..426968b61f7 100644
--- a/src/mame/audio/n8080.cpp
+++ b/src/mame/audio/n8080.cpp
@@ -479,12 +479,12 @@ MACHINE_CONFIG_START(n8080_state::spacefev_sound)
MCFG_SOUND_RESET_OVERRIDE(n8080_state,spacefev)
/* basic machine hardware */
- MCFG_DEVICE_ADD("audiocpu", I8035, 6000000)
- MCFG_DEVICE_PROGRAM_MAP(n8080_sound_cpu_map)
- MCFG_MCS48_PORT_T0_IN_CB(READLINE(*this, n8080_state, n8080_8035_t0_r))
- MCFG_MCS48_PORT_T1_IN_CB(READLINE(*this, n8080_state, n8080_8035_t1_r))
- MCFG_MCS48_PORT_P1_IN_CB(READ8(*this, n8080_state, n8080_8035_p1_r))
- MCFG_MCS48_PORT_P2_OUT_CB(WRITE8(*this, n8080_state, n8080_dac_w))
+ I8035(config, m_audiocpu, 6000000);
+ m_audiocpu->set_addrmap(AS_PROGRAM, &n8080_state::n8080_sound_cpu_map);
+ m_audiocpu->t0_in_cb().set(FUNC(n8080_state::n8080_8035_t0_r));
+ m_audiocpu->t1_in_cb().set(FUNC(n8080_state::n8080_8035_t1_r));
+ m_audiocpu->p1_in_cb().set(FUNC(n8080_state::n8080_8035_p1_r));
+ m_audiocpu->p2_out_cb().set(FUNC(n8080_state::n8080_dac_w));
MCFG_TIMER_DRIVER_ADD_PERIODIC("vco_timer", n8080_state, spacefev_vco_voltage_timer, attotime::from_hz(1000))
@@ -519,12 +519,12 @@ MACHINE_CONFIG_START(n8080_state::sheriff_sound)
MCFG_SOUND_RESET_OVERRIDE(n8080_state,sheriff)
/* basic machine hardware */
- MCFG_DEVICE_ADD("audiocpu", I8035, 6000000)
- MCFG_DEVICE_PROGRAM_MAP(n8080_sound_cpu_map)
- MCFG_MCS48_PORT_T0_IN_CB(READLINE(*this, n8080_state, n8080_8035_t0_r))
- MCFG_MCS48_PORT_T1_IN_CB(READLINE(*this, n8080_state, n8080_8035_t1_r))
- MCFG_MCS48_PORT_P1_IN_CB(READ8(*this, n8080_state, n8080_8035_p1_r))
- MCFG_MCS48_PORT_P2_OUT_CB(WRITE8(*this, n8080_state, n8080_dac_w))
+ I8035(config, m_audiocpu, 6000000);
+ m_audiocpu->set_addrmap(AS_PROGRAM, &n8080_state::n8080_sound_cpu_map);
+ m_audiocpu->t0_in_cb().set(FUNC(n8080_state::n8080_8035_t0_r));
+ m_audiocpu->t1_in_cb().set(FUNC(n8080_state::n8080_8035_t1_r));
+ m_audiocpu->p1_in_cb().set(FUNC(n8080_state::n8080_8035_p1_r));
+ m_audiocpu->p2_out_cb().set(FUNC(n8080_state::n8080_dac_w));
/* sound hardware */
SPEAKER(config, "speaker").front_center();
@@ -557,14 +557,14 @@ MACHINE_CONFIG_START(n8080_state::helifire_sound)
MCFG_SOUND_RESET_OVERRIDE(n8080_state,helifire)
/* basic machine hardware */
- MCFG_DEVICE_ADD("audiocpu", I8035, 6000000)
- MCFG_DEVICE_PROGRAM_MAP(n8080_sound_cpu_map)
- MCFG_DEVICE_IO_MAP(helifire_sound_io_map)
- MCFG_MCS48_PORT_T0_IN_CB(READLINE(*this, n8080_state, helifire_8035_t0_r))
- MCFG_MCS48_PORT_T1_IN_CB(READLINE(*this, n8080_state, helifire_8035_t1_r))
- MCFG_MCS48_PORT_P2_IN_CB(READ8(*this, n8080_state, helifire_8035_p2_r))
- MCFG_MCS48_PORT_P1_OUT_CB(WRITE8("helifire_dac", dac_byte_interface, data_w))
- MCFG_MCS48_PORT_P2_OUT_CB(WRITE8(*this, n8080_state, helifire_sound_ctrl_w))
+ I8035(config, m_audiocpu, 6000000);
+ m_audiocpu->set_addrmap(AS_PROGRAM, &n8080_state::n8080_sound_cpu_map);
+ m_audiocpu->set_addrmap(AS_IO, &n8080_state::helifire_sound_io_map);
+ m_audiocpu->t0_in_cb().set(FUNC(n8080_state::helifire_8035_t0_r));
+ m_audiocpu->t1_in_cb().set(FUNC(n8080_state::helifire_8035_t1_r));
+ m_audiocpu->p2_in_cb().set(FUNC(n8080_state::helifire_8035_p2_r));
+ m_audiocpu->p1_out_cb().set("helifire_dac", FUNC(dac_byte_interface::data_w));
+ m_audiocpu->p2_out_cb().set(FUNC(n8080_state::helifire_sound_ctrl_w));
MCFG_TIMER_DRIVER_ADD_PERIODIC("helifire_dac_volume_timer", n8080_state, helifire_dac_volume_timer, attotime::from_hz(1000))
diff --git a/src/mame/audio/segag80r.cpp b/src/mame/audio/segag80r.cpp
index 27e5f47a68f..6c3047405ca 100644
--- a/src/mame/audio/segag80r.cpp
+++ b/src/mame/audio/segag80r.cpp
@@ -812,13 +812,13 @@ WRITE8_MEMBER(monsterb_sound_device::n7751_p2_w)
MACHINE_CONFIG_START(monsterb_sound_device::device_add_mconfig)
/* basic machine hardware */
- MCFG_DEVICE_ADD(m_audiocpu, N7751, 6000000)
- MCFG_MCS48_PORT_T1_IN_CB(CONSTANT(0)) // labelled as "TEST", connected to ground
- MCFG_MCS48_PORT_P2_IN_CB(READ8(*this, monsterb_sound_device, n7751_command_r))
- MCFG_MCS48_PORT_BUS_IN_CB(READ8(*this, monsterb_sound_device, n7751_rom_r))
- MCFG_MCS48_PORT_P1_OUT_CB(WRITE8("dac", dac_byte_interface, data_w))
- MCFG_MCS48_PORT_P2_OUT_CB(WRITE8(*this, monsterb_sound_device, n7751_p2_w))
- MCFG_MCS48_PORT_PROG_OUT_CB(WRITELINE(m_i8243, i8243_device, prog_w))
+ N7751(config, m_audiocpu, 6000000);
+ m_audiocpu->t1_in_cb().set_constant(0); // labelled as "TEST", connected to ground
+ m_audiocpu->p2_in_cb().set(FUNC(monsterb_sound_device::n7751_command_r));
+ m_audiocpu->bus_in_cb().set(FUNC(monsterb_sound_device::n7751_rom_r));
+ m_audiocpu->p1_out_cb().set("dac", FUNC(dac_byte_interface::data_w));
+ m_audiocpu->p2_out_cb().set(FUNC(monsterb_sound_device::n7751_p2_w));
+ m_audiocpu->prog_out_cb().set(m_i8243, FUNC(i8243_device::prog_w));
I8243(config, m_i8243);
m_i8243->p4_out_cb().set(FUNC(monsterb_sound_device::n7751_rom_addr_w<0>));
diff --git a/src/mame/audio/segasnd.cpp b/src/mame/audio/segasnd.cpp
index cd8bd9fd149..85d95753e0f 100644
--- a/src/mame/audio/segasnd.cpp
+++ b/src/mame/audio/segasnd.cpp
@@ -232,24 +232,24 @@ void segag80snd_common::speech_portmap(address_map &map)
*
*************************************/
-MACHINE_CONFIG_START(segag80snd_common::sega_speech_board)
-
+void segag80snd_common::sega_speech_board(machine_config &config)
+{
/* CPU for the speech board */
- MCFG_DEVICE_ADD("audiocpu", I8035, SPEECH_MASTER_CLOCK) /* divide by 15 in CPU */
- MCFG_DEVICE_PROGRAM_MAP(speech_map)
- MCFG_DEVICE_IO_MAP(speech_portmap)
- MCFG_MCS48_PORT_P1_IN_CB(READ8("segaspeech", speech_sound_device, p1_r))
- MCFG_MCS48_PORT_P1_OUT_CB(WRITE8("segaspeech", speech_sound_device, p1_w))
- MCFG_MCS48_PORT_P2_OUT_CB(WRITE8("segaspeech", speech_sound_device, p2_w))
- MCFG_MCS48_PORT_T0_IN_CB(READLINE("segaspeech", speech_sound_device, t0_r))
- MCFG_MCS48_PORT_T1_IN_CB(READLINE("segaspeech", speech_sound_device, t1_r))
+ i8035_device &audiocpu(I8035(config, m_audiocpu, SPEECH_MASTER_CLOCK)); /* divide by 15 in CPU */
+ audiocpu.set_addrmap(AS_PROGRAM, &segag80snd_common::speech_map);
+ audiocpu.set_addrmap(AS_IO, &segag80snd_common::speech_portmap);
+ audiocpu.p1_in_cb().set("segaspeech", FUNC(speech_sound_device::p1_r));
+ audiocpu.p1_out_cb().set("segaspeech", FUNC(speech_sound_device::p1_w));
+ audiocpu.p2_out_cb().set("segaspeech", FUNC(speech_sound_device::p2_w));
+ audiocpu.t0_in_cb().set("segaspeech", FUNC(speech_sound_device::t0_r));
+ audiocpu.t1_in_cb().set("segaspeech", FUNC(speech_sound_device::t1_r));
/* sound hardware */
SEGASPEECH(config, "segaspeech", 0).int_cb().set(FUNC(segag80snd_common::segaspeech_int_w));
- MCFG_DEVICE_ADD("speech", SP0250, SPEECH_MASTER_CLOCK)
- MCFG_SP0250_DRQ_CALLBACK(WRITELINE("segaspeech", speech_sound_device, drq_w))
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
-MACHINE_CONFIG_END
+ sp0250_device &speech(SP0250(config, "speech", SPEECH_MASTER_CLOCK));
+ speech.drq().set("segaspeech", FUNC(speech_sound_device::drq_w));
+ speech.add_route(ALL_OUTPUTS, "speaker", 1.0);
+}
@@ -871,19 +871,20 @@ void usb_sound_device::usb_portmap(address_map &map)
// device_add_mconfig - add device configuration
//-------------------------------------------------
-MACHINE_CONFIG_START(usb_sound_device::device_add_mconfig)
-
+void usb_sound_device::device_add_mconfig(machine_config &config)
+{
/* CPU for the usb board */
- MCFG_DEVICE_ADD("ourcpu", I8035, USB_MASTER_CLOCK) /* divide by 15 in CPU */
- MCFG_DEVICE_PROGRAM_MAP(usb_map)
- MCFG_DEVICE_IO_MAP(usb_portmap)
- MCFG_MCS48_PORT_P1_IN_CB(READ8(*this, usb_sound_device, p1_r))
- MCFG_MCS48_PORT_P1_OUT_CB(WRITE8(*this, usb_sound_device, p1_w))
- MCFG_MCS48_PORT_P2_OUT_CB(WRITE8(*this, usb_sound_device, p2_w))
- MCFG_MCS48_PORT_T1_IN_CB(READLINE(*this, usb_sound_device, t1_r))
+ I8035(config, m_ourcpu, USB_MASTER_CLOCK); /* divide by 15 in CPU */
+ m_ourcpu->set_addrmap(AS_PROGRAM, &usb_sound_device::usb_map);
+ m_ourcpu->set_addrmap(AS_IO, &usb_sound_device::usb_portmap);
+ m_ourcpu->p1_in_cb().set(FUNC(usb_sound_device::p1_r));
+ m_ourcpu->p1_out_cb().set(FUNC(usb_sound_device::p1_w));
+ m_ourcpu->p2_out_cb().set(FUNC(usb_sound_device::p2_w));
+ m_ourcpu->t1_in_cb().set(FUNC(usb_sound_device::t1_r));
- MCFG_TIMER_DRIVER_ADD_PERIODIC("usb_timer", usb_sound_device, increment_t1_clock_timer_cb, attotime::from_hz(USB_2MHZ_CLOCK / 256))
-MACHINE_CONFIG_END
+ TIMER(config, "usb_timer", 0).configure_periodic(timer_device::expired_delegate(FUNC(usb_sound_device::increment_t1_clock_timer_cb), this)
+ , attotime::from_hz(USB_2MHZ_CLOCK / 256));
+}
DEFINE_DEVICE_TYPE(SEGAUSBROM, usb_rom_sound_device, "segausbrom", "Sega Universal Sound Board with ROM")
@@ -898,10 +899,10 @@ void usb_sound_device::usb_map_rom(address_map &map)
map(0x0000, 0x0fff).rom().region(":usbcpu", 0);
}
-MACHINE_CONFIG_START(usb_rom_sound_device::device_add_mconfig)
+void usb_rom_sound_device::device_add_mconfig(machine_config &config)
+{
usb_sound_device::device_add_mconfig(config);
/* CPU for the usb board */
- MCFG_DEVICE_MODIFY("ourcpu")
- MCFG_DEVICE_PROGRAM_MAP(usb_map_rom)
-MACHINE_CONFIG_END
+ m_ourcpu->set_addrmap(AS_PROGRAM, &usb_rom_sound_device::usb_map_rom);
+}
diff --git a/src/mame/drivers/advision.cpp b/src/mame/drivers/advision.cpp
index 5cd747bce80..e037269cb4f 100644
--- a/src/mame/drivers/advision.cpp
+++ b/src/mame/drivers/advision.cpp
@@ -20,7 +20,6 @@
#include "emu.h"
#include "includes/advision.h"
-#include "cpu/mcs48/mcs48.h"
#include "cpu/cop400/cop400.h"
#include "sound/volt_reg.h"
#include "screen.h"
@@ -65,13 +64,13 @@ INPUT_PORTS_END
MACHINE_CONFIG_START(advision_state::advision)
/* basic machine hardware */
- MCFG_DEVICE_ADD(I8048_TAG, I8048, XTAL(11'000'000))
- MCFG_DEVICE_PROGRAM_MAP(program_map)
- MCFG_DEVICE_IO_MAP(io_map)
- MCFG_MCS48_PORT_P1_IN_CB(READ8(*this, advision_state, controller_r))
- MCFG_MCS48_PORT_P1_OUT_CB(WRITE8(*this, advision_state, bankswitch_w))
- MCFG_MCS48_PORT_P2_OUT_CB(WRITE8(*this, advision_state, av_control_w))
- MCFG_MCS48_PORT_T1_IN_CB(READLINE(*this, advision_state, vsync_r))
+ I8048(config, m_maincpu, XTAL(11'000'000));
+ m_maincpu->set_addrmap(AS_PROGRAM, &advision_state::program_map);
+ m_maincpu->set_addrmap(AS_IO, &advision_state::io_map);
+ m_maincpu->p1_in_cb().set(FUNC(advision_state::controller_r));
+ m_maincpu->p1_out_cb().set(FUNC(advision_state::bankswitch_w));
+ m_maincpu->p2_out_cb().set(FUNC(advision_state::av_control_w));
+ m_maincpu->t1_in_cb().set(FUNC(advision_state::vsync_r));
MCFG_DEVICE_ADD(COP411_TAG, COP411, 52631*4) // COP411L-KCN/N, R11=82k, C8=56pF
MCFG_COP400_CONFIG(COP400_CKI_DIVISOR_4, COP400_CKO_RAM_POWER_SUPPLY, false)
diff --git a/src/mame/drivers/alpha68k.cpp b/src/mame/drivers/alpha68k.cpp
index dc1760f2e82..7492d076caf 100644
--- a/src/mame/drivers/alpha68k.cpp
+++ b/src/mame/drivers/alpha68k.cpp
@@ -1907,14 +1907,14 @@ MACHINE_CONFIG_START(alpha68k_state::sstingry)
MCFG_DEVICE_VBLANK_INT_DRIVER("screen", alpha68k_state, irq0_line_hold)
MCFG_DEVICE_PERIODIC_INT_DRIVER(alpha68k_state, nmi_line_pulse, 4000)
- MCFG_DEVICE_ADD("mcu", I8748, 9263750) /* 9.263750 MHz oscillator, divided by 3*5 internally */
-// MCFG_DEVICE_PROGRAM_MAP(i8748_map)
-// MCFG_MCS48_PORT_BUS_IN_CB(READ8(*this, alpha68k_state, saiyugoub1_mcu_command_r))
+ i8748_device &mcu(I8748(config, "mcu", 9263750)); /* 9.263750 MHz oscillator, divided by 3*5 internally */
+// mcu.set_addrmap(AS_PROGRAM, &alpha68k_state::i8748_map);
+// mcu.bus_in_cb().set(FUNC(alpha68k_state::saiyugoub1_mcu_command_r));
// MCFG_MCS48_PORT_T0_CLK_CUSTOM(alpha68k_state, saiyugoub1_m5205_clk_w) /* Drives the clock on the m5205 at 1/8 of this frequency */
-// MCFG_MCS48_PORT_T1_IN_CB(READLINE(*this, alpha68k_state, saiyugoub1_m5205_irq_r))
-// MCFG_MCS48_PORT_P1_OUT_CB(WRITE8(*this, alpha68k_state, saiyugoub1_adpcm_rom_addr_w))
-// MCFG_MCS48_PORT_P2_OUT_CB(WRITE8(*this, alpha68k_state, saiyugoub1_adpcm_control_w))
- MCFG_DEVICE_DISABLE()
+// mcu.t1_in_cb().set(FUNC(alpha68k_state::saiyugoub1_m5205_irq_r));
+// mcu.p1_out_cb().set(FUNC(alpha68k_state::saiyugoub1_adpcm_rom_addr_w));
+// mcu.p2_out_cb().set(FUNC(alpha68k_state::saiyugoub1_adpcm_control_w));
+ mcu.set_disable();
MCFG_MACHINE_START_OVERRIDE(alpha68k_state,common)
MCFG_MACHINE_RESET_OVERRIDE(alpha68k_state,common)
diff --git a/src/mame/drivers/alphatpx.cpp b/src/mame/drivers/alphatpx.cpp
index 4f92070d6ad..1d15c544dfe 100644
--- a/src/mame/drivers/alphatpx.cpp
+++ b/src/mame/drivers/alphatpx.cpp
@@ -1211,11 +1211,11 @@ MACHINE_CONFIG_START(alphatp_12_state::alphatp2)
MCFG_QUANTUM_PERFECT_CPU("maincpu")
- MCFG_DEVICE_ADD("kbdmcu", I8041, 12.8544_MHz_XTAL / 2)
- MCFG_MCS48_PORT_T0_IN_CB(READLINE(*this, alphatp_12_state, kbd_matrix_r))
- MCFG_MCS48_PORT_P1_OUT_CB(WRITE8(*this, alphatp_12_state, kbd_matrix_w))
- MCFG_MCS48_PORT_P2_IN_CB(READ8(*this, alphatp_12_state, kbd_port2_r))
- MCFG_MCS48_PORT_P2_OUT_CB(WRITE8(*this, alphatp_12_state, kbd_port2_w))
+ I8041(config, m_kbdmcu, 12.8544_MHz_XTAL / 2);
+ m_kbdmcu->t0_in_cb().set(FUNC(alphatp_12_state::kbd_matrix_r));
+ m_kbdmcu->p1_out_cb().set(FUNC(alphatp_12_state::kbd_matrix_w));
+ m_kbdmcu->p2_in_cb().set(FUNC(alphatp_12_state::kbd_port2_r));
+ m_kbdmcu->p2_out_cb().set(FUNC(alphatp_12_state::kbd_port2_w));
ADDRESS_MAP_BANK(config, "bankdev").set_map(&alphatp_12_state::alphatp2_map).set_options(ENDIANNESS_LITTLE, 8, 18, 0x10000);
@@ -1288,11 +1288,11 @@ MACHINE_CONFIG_START(alphatp_34_state::alphatp3)
MCFG_QUANTUM_PERFECT_CPU("maincpu")
- MCFG_DEVICE_ADD("kbdmcu", I8041, 12.8544_MHz_XTAL /2)
- MCFG_MCS48_PORT_T0_IN_CB(READLINE(*this, alphatp_34_state, kbd_matrix_r))
- MCFG_MCS48_PORT_P1_OUT_CB(WRITE8(*this, alphatp_34_state, kbd_matrix_w))
- MCFG_MCS48_PORT_P2_IN_CB(READ8(*this, alphatp_34_state, kbd_port2_r))
- MCFG_MCS48_PORT_P2_OUT_CB(WRITE8(*this, alphatp_34_state, kbd_port2_w))
+ I8041(config, m_kbdmcu, 12.8544_MHz_XTAL /2);
+ m_kbdmcu->t0_in_cb().set(FUNC(alphatp_34_state::kbd_matrix_r));
+ m_kbdmcu->p1_out_cb().set(FUNC(alphatp_34_state::kbd_matrix_w));
+ m_kbdmcu->p2_in_cb().set(FUNC(alphatp_34_state::kbd_port2_r));
+ m_kbdmcu->p2_out_cb().set(FUNC(alphatp_34_state::kbd_port2_w));
ADDRESS_MAP_BANK(config, "bankdev").set_map(&alphatp_34_state::alphatp3_map).set_options(ENDIANNESS_LITTLE, 8, 18, 0x10000);
diff --git a/src/mame/drivers/bitgraph.cpp b/src/mame/drivers/bitgraph.cpp
index 0343a8b5a73..1269870ef16 100644
--- a/src/mame/drivers/bitgraph.cpp
+++ b/src/mame/drivers/bitgraph.cpp
@@ -560,10 +560,10 @@ MACHINE_CONFIG_END
#ifdef UNUSED_FUNCTION
MACHINE_CONFIG_START(bitgraph_state::bg_ppu)
- MCFG_DEVICE_ADD(PPU_TAG, I8035, XTAL(6'900'000))
- MCFG_DEVICE_IO_MAP(ppu_io)
-// MCFG_MCS48_PORT_T0_IN_CB(READLINE(*this, bitgraph_state, ppu_t0_r))
- MCFG_MCS48_PORT_PROG_OUT_CB(WRITELINE("i8243", i8243_device, prog_w))
+ i8035_device &ppu(I8035(config, PPU_TAG, XTAL(6'900'000)));
+ ppu.set_addrmap(AS_IO, &bitgraph_state::ppu_io);
+// ppu.t0_in_cb().set(FUNC(bitgraph_state::ppu_t0_r));
+ ppu.prog_out_cb().set("i8243", FUNC(i8243_device::prog_w));
i8243_device &i8243(I8243(config, "i8243"));
i8243.read_handler().set_nop();
diff --git a/src/mame/drivers/cgc7900.cpp b/src/mame/drivers/cgc7900.cpp
index 1e4106ea4bb..f618cd6eb1b 100644
--- a/src/mame/drivers/cgc7900.cpp
+++ b/src/mame/drivers/cgc7900.cpp
@@ -463,16 +463,9 @@ MACHINE_CONFIG_START(cgc7900_state::cgc7900)
MCFG_DEVICE_ADD(M68000_TAG, M68000, XTAL(28'480'000)/4)
MCFG_DEVICE_PROGRAM_MAP(cgc7900_mem)
- MCFG_DEVICE_ADD(I8035_TAG, I8035, 1000000)
- MCFG_DEVICE_PROGRAM_MAP(keyboard_mem)
- //MCFG_MCS48_PORT_P1_IN_CB(READ8(*this, ))
- //MCFG_MCS48_PORT_P1_OUT_CB(WRITE8(*this, ))
- //MCFG_MCS48_PORT_P2_IN_CB(READ8(*this, ))
- //MCFG_MCS48_PORT_P2_OUT_CB(WRITE8(*this, ))
- //MCFG_MCS48_PORT_T1_IN_CB(READLINE(*this, ))
- //MCFG_MCS48_PORT_BUS_IN_CB(READ8(*this, ))
- //MCFG_MCS48_PORT_BUS_OUT_CB(WRITE8(*this, ))
- MCFG_DEVICE_DISABLE()
+ i8035_device &kbmcu(I8035(config, I8035_TAG, 1000000));
+ kbmcu.set_addrmap(AS_PROGRAM, &cgc7900_state::keyboard_mem);
+ kbmcu.set_disable();
/* MCFG_DEVICE_ADD(AM2910_TAG, AM2910, XTAL(17'360'000))
MCFG_DEVICE_PROGRAM_MAP(omti10_mem)*/
diff --git a/src/mame/drivers/chinagat.cpp b/src/mame/drivers/chinagat.cpp
index 9d56a7cf482..dd766e19a75 100644
--- a/src/mame/drivers/chinagat.cpp
+++ b/src/mame/drivers/chinagat.cpp
@@ -615,13 +615,13 @@ MACHINE_CONFIG_START(chinagat_state::saiyugoub1)
MCFG_DEVICE_ADD("soundcpu", Z80, XTAL(3'579'545)) /* 3.579545 MHz oscillator */
MCFG_DEVICE_PROGRAM_MAP(saiyugoub1_sound_map)
- MCFG_DEVICE_ADD("mcu", I8748, 9263750) /* 9.263750 MHz oscillator, divided by 3*5 internally */
- MCFG_DEVICE_PROGRAM_MAP(i8748_map)
- MCFG_MCS48_PORT_BUS_IN_CB(READ8(*this, chinagat_state, saiyugoub1_mcu_command_r))
+ i8748_device &mcu(I8748(config, "mcu", 9263750)); /* 9.263750 MHz oscillator, divided by 3*5 internally */
+ mcu.set_addrmap(AS_PROGRAM, &chinagat_state::i8748_map);
+ mcu.bus_in_cb().set(FUNC(chinagat_state::saiyugoub1_mcu_command_r));
//MCFG_MCS48_PORT_T0_CLK_CUSTOM(chinagat_state, saiyugoub1_m5205_clk_w) /* Drives the clock on the m5205 at 1/8 of this frequency */
- MCFG_MCS48_PORT_T1_IN_CB(READLINE(*this, chinagat_state, saiyugoub1_m5205_irq_r))
- MCFG_MCS48_PORT_P1_OUT_CB(WRITE8(*this, chinagat_state, saiyugoub1_adpcm_rom_addr_w))
- MCFG_MCS48_PORT_P2_OUT_CB(WRITE8(*this, chinagat_state, saiyugoub1_adpcm_control_w))
+ mcu.t1_in_cb().set(FUNC(chinagat_state::saiyugoub1_m5205_irq_r));
+ mcu.p1_out_cb().set(FUNC(chinagat_state::saiyugoub1_adpcm_rom_addr_w));
+ mcu.p2_out_cb().set(FUNC(chinagat_state::saiyugoub1_adpcm_control_w));
MCFG_QUANTUM_TIME(attotime::from_hz(6000)) /* heavy interleaving to sync up sprite<->main cpu's */
diff --git a/src/mame/drivers/decocass.cpp b/src/mame/drivers/decocass.cpp
index 34870cc50e9..d694a84645d 100644
--- a/src/mame/drivers/decocass.cpp
+++ b/src/mame/drivers/decocass.cpp
@@ -962,11 +962,11 @@ MACHINE_CONFIG_START(decocass_state::decocass)
MCFG_DEVICE_PROGRAM_MAP(decocass_sound_map)
MCFG_TIMER_DRIVER_ADD_SCANLINE("audionmi", decocass_state, decocass_audio_nmi_gen, "screen", 0, 8)
- MCFG_DEVICE_ADD("mcu", I8041, HCLK)
- MCFG_MCS48_PORT_P1_IN_CB(READ8(*this, decocass_state, i8041_p1_r))
- MCFG_MCS48_PORT_P1_OUT_CB(WRITE8(*this, decocass_state, i8041_p1_w))
- MCFG_MCS48_PORT_P2_IN_CB(READ8(*this, decocass_state, i8041_p2_r))
- MCFG_MCS48_PORT_P2_OUT_CB(WRITE8(*this, decocass_state, i8041_p2_w))
+ I8041(config, m_mcu, HCLK);
+ m_mcu->p1_in_cb().set(FUNC(decocass_state::i8041_p1_r));
+ m_mcu->p1_out_cb().set(FUNC(decocass_state::i8041_p1_w));
+ m_mcu->p2_in_cb().set(FUNC(decocass_state::i8041_p2_r));
+ m_mcu->p2_out_cb().set(FUNC(decocass_state::i8041_p2_w));
MCFG_QUANTUM_TIME(attotime::from_hz(4200)) /* interleave CPUs */
diff --git a/src/mame/drivers/dmv.cpp b/src/mame/drivers/dmv.cpp
index 5cb751f0361..2671b7377b6 100644
--- a/src/mame/drivers/dmv.cpp
+++ b/src/mame/drivers/dmv.cpp
@@ -781,10 +781,10 @@ MACHINE_CONFIG_START(dmv_state::dmv)
MCFG_DEVICE_PROGRAM_MAP(dmv_mem)
MCFG_DEVICE_IO_MAP(dmv_io)
- MCFG_DEVICE_ADD("kb_ctrl_mcu", I8741, XTAL(6'000'000))
- MCFG_MCS48_PORT_P1_IN_CB(READ8(*this, dmv_state, kb_mcu_port1_r)) // bit 0 data from kb
- MCFG_MCS48_PORT_P1_OUT_CB(WRITE8(*this, dmv_state, kb_mcu_port1_w)) // bit 1 data to kb
- MCFG_MCS48_PORT_P2_OUT_CB(WRITE8(*this, dmv_state, kb_mcu_port2_w))
+ i8741_device &kbmcu(I8741(config, "kb_ctrl_mcu", XTAL(6'000'000)));
+ kbmcu.p1_in_cb().set(FUNC(dmv_state::kb_mcu_port1_r)); // bit 0 data from kb
+ kbmcu.p1_out_cb().set(FUNC(dmv_state::kb_mcu_port1_w)); // bit 1 data to kb
+ kbmcu.p2_out_cb().set(FUNC(dmv_state::kb_mcu_port2_w));
MCFG_QUANTUM_PERFECT_CPU("maincpu")
diff --git a/src/mame/drivers/drw80pkr.cpp b/src/mame/drivers/drw80pkr.cpp
index 7010f2549ff..595a45ec5c9 100644
--- a/src/mame/drivers/drw80pkr.cpp
+++ b/src/mame/drivers/drw80pkr.cpp
@@ -67,7 +67,7 @@ private:
uint16_t m_video_ram[0x0400];
uint8_t m_color_ram[0x0400];
- required_device<cpu_device> m_maincpu;
+ required_device<i8039_device> m_maincpu;
required_device<gfxdecode_device> m_gfxdecode;
required_device<ay8912_device> m_aysnd;
required_memory_bank m_mainbank;
@@ -457,23 +457,21 @@ INPUT_PORTS_END
MACHINE_CONFIG_START(drw80pkr_state::drw80pkr)
// basic machine hardware
- MCFG_DEVICE_ADD(m_maincpu, I8039, CPU_CLOCK)
- MCFG_DEVICE_PROGRAM_MAP(map)
- MCFG_DEVICE_IO_MAP(io_map)
- MCFG_MCS48_PORT_T0_IN_CB(READLINE(*this, drw80pkr_state, t0_r))
- MCFG_MCS48_PORT_T1_IN_CB(READLINE(*this, drw80pkr_state, t1_r))
- MCFG_MCS48_PORT_P1_IN_CB(READ8(*this, drw80pkr_state, p1_r))
- MCFG_MCS48_PORT_P1_OUT_CB(WRITE8(*this, drw80pkr_state, p1_w))
- MCFG_MCS48_PORT_P2_IN_CB(READ8(*this, drw80pkr_state, p2_r))
- MCFG_MCS48_PORT_P2_OUT_CB(WRITE8(*this, drw80pkr_state, p2_w))
- MCFG_MCS48_PORT_PROG_OUT_CB(WRITELINE(*this, drw80pkr_state, prog_w))
- MCFG_MCS48_PORT_BUS_IN_CB(READ8(*this, drw80pkr_state, bus_r))
- MCFG_MCS48_PORT_BUS_OUT_CB(WRITE8(*this, drw80pkr_state, bus_w))
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", drw80pkr_state, irq0_line_hold)
-
+ I8039(config, m_maincpu, CPU_CLOCK);
+ m_maincpu->set_addrmap(AS_PROGRAM, &drw80pkr_state::map);
+ m_maincpu->set_addrmap(AS_IO, &drw80pkr_state::io_map);
+ m_maincpu->t0_in_cb().set(FUNC(drw80pkr_state::t0_r));
+ m_maincpu->t1_in_cb().set(FUNC(drw80pkr_state::t1_r));
+ m_maincpu->p1_in_cb().set(FUNC(drw80pkr_state::p1_r));
+ m_maincpu->p1_out_cb().set(FUNC(drw80pkr_state::p1_w));
+ m_maincpu->p2_in_cb().set(FUNC(drw80pkr_state::p2_r));
+ m_maincpu->p2_out_cb().set(FUNC(drw80pkr_state::p2_w));
+ m_maincpu->prog_out_cb().set(FUNC(drw80pkr_state::prog_w));
+ m_maincpu->bus_in_cb().set(FUNC(drw80pkr_state::bus_r));
+ m_maincpu->bus_out_cb().set(FUNC(drw80pkr_state::bus_w));
+ m_maincpu->set_vblank_int("screen", FUNC(drw80pkr_state::irq0_line_hold));
// video hardware
-
MCFG_SCREEN_ADD("screen", RASTER)
MCFG_SCREEN_REFRESH_RATE(60)
MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
diff --git a/src/mame/drivers/fidelmcs48.cpp b/src/mame/drivers/fidelmcs48.cpp
index 71a59804cbb..7b49319751a 100644
--- a/src/mame/drivers/fidelmcs48.cpp
+++ b/src/mame/drivers/fidelmcs48.cpp
@@ -152,13 +152,13 @@ INPUT_PORTS_END
MACHINE_CONFIG_START(fidelmcs48_state::sc6)
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", I8040, 11_MHz_XTAL)
- MCFG_DEVICE_PROGRAM_MAP(sc6_map)
- MCFG_MCS48_PORT_P2_OUT_CB(WRITE8(*this, fidelmcs48_state, sc6_mux_w))
- MCFG_MCS48_PORT_P1_IN_CB(READ8(*this, fidelmcs48_state, sc6_input_r))
- MCFG_MCS48_PORT_P1_OUT_CB(WRITE8(*this, fidelmcs48_state, sc6_select_w))
- MCFG_MCS48_PORT_T0_IN_CB(READLINE(*this, fidelmcs48_state, sc6_input6_r))
- MCFG_MCS48_PORT_T1_IN_CB(READLINE(*this, fidelmcs48_state, sc6_input7_r))
+ i8040_device &maincpu(I8040(config, m_maincpu, 11_MHz_XTAL));
+ maincpu.set_addrmap(AS_PROGRAM, &fidelmcs48_state::sc6_map);
+ maincpu.p2_out_cb().set(FUNC(fidelmcs48_state::sc6_mux_w));
+ maincpu.p1_in_cb().set(FUNC(fidelmcs48_state::sc6_input_r));
+ maincpu.p1_out_cb().set(FUNC(fidelmcs48_state::sc6_select_w));
+ maincpu.t0_in_cb().set(FUNC(fidelmcs48_state::sc6_input6_r));
+ maincpu.t1_in_cb().set(FUNC(fidelmcs48_state::sc6_input7_r));
MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", fidelbase_state, display_decay_tick, attotime::from_msec(1))
config.set_default_layout(layout_fidel_sc6);
diff --git a/src/mame/drivers/fidelz80.cpp b/src/mame/drivers/fidelz80.cpp
index 5cbfcbef38f..2fe3a55b9b7 100644
--- a/src/mame/drivers/fidelz80.cpp
+++ b/src/mame/drivers/fidelz80.cpp
@@ -1784,13 +1784,13 @@ MACHINE_CONFIG_START(fidelz80_state::vbrc)
MCFG_DEVICE_IO_MAP(vbrc_main_io)
MCFG_QUANTUM_PERFECT_CPU("maincpu")
- MCFG_DEVICE_ADD("mcu", I8041, 5_MHz_XTAL)
- MCFG_MCS48_PORT_P1_OUT_CB(WRITE8(*this, fidelz80_state, vbrc_mcu_p1_w))
- MCFG_MCS48_PORT_P2_IN_CB(READ8(*this, fidelz80_state, vbrc_mcu_p2_r))
- MCFG_MCS48_PORT_P2_OUT_CB(WRITE8(m_i8243, i8243_device, p2_w))
- MCFG_MCS48_PORT_PROG_OUT_CB(WRITELINE(m_i8243, i8243_device, prog_w))
- MCFG_MCS48_PORT_T0_IN_CB(READLINE(*this, fidelz80_state, vbrc_mcu_t0_r))
- MCFG_MCS48_PORT_T1_IN_CB(READLINE(*this, fidelz80_state, vbrc_mcu_t1_r))
+ I8041(config, m_mcu, 5_MHz_XTAL);
+ m_mcu->p1_out_cb().set(FUNC(fidelz80_state::vbrc_mcu_p1_w));
+ m_mcu->p2_in_cb().set(FUNC(fidelz80_state::vbrc_mcu_p2_r));
+ m_mcu->p2_out_cb().set(m_i8243, FUNC(i8243_device::p2_w));
+ m_mcu->prog_out_cb().set(m_i8243, FUNC(i8243_device::prog_w));
+ m_mcu->t0_in_cb().set(FUNC(fidelz80_state::vbrc_mcu_t0_r));
+ m_mcu->t1_in_cb().set(FUNC(fidelz80_state::vbrc_mcu_t1_r));
I8243(config, m_i8243);
m_i8243->p4_out_cb().set(FUNC(fidelz80_state::vbrc_ioexp_port_w<0>));
diff --git a/src/mame/drivers/finalizr.cpp b/src/mame/drivers/finalizr.cpp
index e7252692072..d1a869d8acf 100644
--- a/src/mame/drivers/finalizr.cpp
+++ b/src/mame/drivers/finalizr.cpp
@@ -17,7 +17,6 @@
#include "includes/konamipt.h"
#include "cpu/m6809/m6809.h"
-#include "cpu/mcs48/mcs48.h"
#include "machine/gen_latch.h"
#include "machine/konami1.h"
#include "machine/watchdog.h"
@@ -77,10 +76,10 @@ WRITE8_MEMBER(finalizr_state::i8039_irqen_w)
m_audiocpu->set_input_line(0, CLEAR_LINE);
}
-READ_LINE_MEMBER(finalizr_state::i8039_T1_r)
+READ_LINE_MEMBER(finalizr_state::i8039_t1_r)
{
/* I suspect the clock-out from the I8039 T0 line should be connected
- here (See the i8039_T0_w handler below).
+ here (See the i8039_t0_w handler below).
The frequency of this clock cannot be greater than I8039 CLKIN / 45
Accounting for the I8039 input clock, and internal/external divisors
the frequency here should be 192KHz (I8039 CLKIN / 48)
@@ -94,7 +93,7 @@ READ_LINE_MEMBER(finalizr_state::i8039_T1_r)
return (!(m_T1_line % 3) && (m_T1_line > 0));
}
-WRITE8_MEMBER(finalizr_state::i8039_T0_w)
+WRITE8_MEMBER(finalizr_state::i8039_t0_w)
{
/* This becomes a clock output at a frequency of 3.072MHz (derived
by internally dividing the main xtal clock input by a factor of 3).
@@ -270,13 +269,12 @@ MACHINE_CONFIG_START(finalizr_state::finalizr)
MCFG_DEVICE_PROGRAM_MAP(main_map)
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", finalizr_state, finalizr_scanline, "screen", 0, 1)
- MCFG_DEVICE_ADD("audiocpu", I8039,XTAL(18'432'000)/2) /* 9.216MHz clkin ?? */
- MCFG_DEVICE_PROGRAM_MAP(sound_map)
- MCFG_DEVICE_IO_MAP(sound_io_map)
- MCFG_MCS48_PORT_P1_OUT_CB(WRITE8("dac", dac_byte_interface, data_w))
- MCFG_MCS48_PORT_P2_OUT_CB(WRITE8(*this, finalizr_state, i8039_irqen_w))
- //MCFG_MCS48_PORT_T0_CLK_CUSTOM(finalizr_state, i8039_T0_w)
- MCFG_MCS48_PORT_T1_IN_CB(READLINE(*this, finalizr_state, i8039_T1_r))
+ I8039(config, m_audiocpu, XTAL(18'432'000)/2); /* 9.216MHz clkin ?? */
+ m_audiocpu->set_addrmap(AS_PROGRAM, &finalizr_state::sound_map);
+ m_audiocpu->set_addrmap(AS_IO, &finalizr_state::sound_io_map);
+ m_audiocpu->p1_out_cb().set("dac", FUNC(dac_byte_interface::data_w));
+ m_audiocpu->p2_out_cb().set(FUNC(finalizr_state::i8039_irqen_w));
+ m_audiocpu->t1_in_cb().set(FUNC(finalizr_state::i8039_t1_r));
WATCHDOG_TIMER(config, "watchdog");
diff --git a/src/mame/drivers/gladiatr.cpp b/src/mame/drivers/gladiatr.cpp
index 7982e9f28c4..fcf1e61e9f4 100644
--- a/src/mame/drivers/gladiatr.cpp
+++ b/src/mame/drivers/gladiatr.cpp
@@ -1041,19 +1041,19 @@ MACHINE_CONFIG_START(gladiatr_state::gladiatr)
m_ccpu->t0_in_cb().set_ioport("COINS").bit(1);
m_ccpu->t1_in_cb().set_ioport("COINS").bit(0);
- MCFG_DEVICE_ADD("ucpu", I8741, 12_MHz_XTAL/2) /* verified on pcb */
- MCFG_MCS48_PORT_P1_IN_CB(READ8(*this, gladiatr_state, ucpu_p1_r))
- MCFG_MCS48_PORT_P1_OUT_CB(WRITE8(*this, gladiatr_state, ucpu_p1_w))
- MCFG_MCS48_PORT_P2_IN_CB(READ8(*this, gladiatr_state, ucpu_p2_r))
- MCFG_MCS48_PORT_T0_IN_CB(READLINE(*this, gladiatr_state, tclk_r))
- MCFG_MCS48_PORT_T1_IN_CB(READLINE(*this, gladiatr_state, ucpu_t1_r))
-
- MCFG_DEVICE_ADD("csnd", I8741, 12_MHz_XTAL/2) /* verified on pcb */
- MCFG_MCS48_PORT_P1_IN_CB(READ8(*this, gladiatr_state, csnd_p1_r))
- MCFG_MCS48_PORT_P1_OUT_CB(WRITE8(*this, gladiatr_state, csnd_p1_w))
- MCFG_MCS48_PORT_P2_IN_CB(READ8(*this, gladiatr_state, csnd_p2_r))
- MCFG_MCS48_PORT_T0_IN_CB(READLINE(*this, gladiatr_state, tclk_r))
- MCFG_MCS48_PORT_T1_IN_CB(READLINE(*this, gladiatr_state, csnd_t1_r))
+ I8741(config, m_ucpu, 12_MHz_XTAL/2); /* verified on pcb */
+ m_ucpu->p1_in_cb().set(FUNC(gladiatr_state::ucpu_p1_r));
+ m_ucpu->p1_out_cb().set(FUNC(gladiatr_state::ucpu_p1_w));
+ m_ucpu->p2_in_cb().set(FUNC(gladiatr_state::ucpu_p2_r));
+ m_ucpu->t0_in_cb().set(FUNC(gladiatr_state::tclk_r));
+ m_ucpu->t1_in_cb().set(FUNC(gladiatr_state::ucpu_t1_r));
+
+ I8741(config, m_csnd, 12_MHz_XTAL/2); /* verified on pcb */
+ m_csnd->p1_in_cb().set(FUNC(gladiatr_state::csnd_p1_r));
+ m_csnd->p1_out_cb().set(FUNC(gladiatr_state::csnd_p1_w));
+ m_csnd->p2_in_cb().set(FUNC(gladiatr_state::csnd_p2_r));
+ m_csnd->t0_in_cb().set(FUNC(gladiatr_state::tclk_r));
+ m_csnd->t1_in_cb().set(FUNC(gladiatr_state::csnd_t1_r));
/* lazy way to make polled serial between MCUs work */
MCFG_QUANTUM_PERFECT_CPU("ucpu")
diff --git a/src/mame/drivers/gyruss.cpp b/src/mame/drivers/gyruss.cpp
index 81a14fc5606..246527d9c54 100644
--- a/src/mame/drivers/gyruss.cpp
+++ b/src/mame/drivers/gyruss.cpp
@@ -62,7 +62,6 @@ and 1 SFX channel controlled by an 8039:
#include "includes/konamipt.h"
#include "cpu/m6809/m6809.h"
-#include "cpu/mcs48/mcs48.h"
#include "cpu/z80/z80.h"
#include "machine/74259.h"
#include "machine/gen_latch.h"
@@ -487,11 +486,11 @@ MACHINE_CONFIG_START(gyruss_state::gyruss)
MCFG_DEVICE_PROGRAM_MAP(audio_cpu1_map)
MCFG_DEVICE_IO_MAP(audio_cpu1_io_map)
- MCFG_DEVICE_ADD("audio2", I8039, XTAL(8'000'000))
- MCFG_DEVICE_PROGRAM_MAP(audio_cpu2_map)
- MCFG_DEVICE_IO_MAP(audio_cpu2_io_map)
- MCFG_MCS48_PORT_P1_OUT_CB(WRITE8(*this, gyruss_state, gyruss_dac_w))
- MCFG_MCS48_PORT_P2_OUT_CB(WRITE8(*this, gyruss_state, gyruss_irq_clear_w))
+ I8039(config, m_audiocpu_2, XTAL(8'000'000));
+ m_audiocpu_2->set_addrmap(AS_PROGRAM, &gyruss_state::audio_cpu2_map);
+ m_audiocpu_2->set_addrmap(AS_IO, &gyruss_state::audio_cpu2_io_map);
+ m_audiocpu_2->p1_out_cb().set(FUNC(gyruss_state::gyruss_dac_w));
+ m_audiocpu_2->p2_out_cb().set(FUNC(gyruss_state::gyruss_irq_clear_w));
MCFG_QUANTUM_TIME(attotime::from_hz(6000))
diff --git a/src/mame/drivers/hh_melps4.cpp b/src/mame/drivers/hh_melps4.cpp
index 888d403f791..6b9f0e4f129 100644
--- a/src/mame/drivers/hh_melps4.cpp
+++ b/src/mame/drivers/hh_melps4.cpp
@@ -36,7 +36,7 @@ public:
{ }
// devices
- required_device<cpu_device> m_maincpu;
+ required_device<m58846_device> m_maincpu;
optional_ioport_array<4> m_inp_matrix; // max 4
output_finder<0x20, 0x20> m_out_x;
output_finder<0x20> m_out_a;
@@ -297,13 +297,13 @@ INPUT_PORTS_END
MACHINE_CONFIG_START(cfrogger_state::cfrogger)
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M58846, 600_kHz_XTAL)
- MCFG_MELPS4_READ_K_CB(READ16(*this, cfrogger_state, input_r))
- MCFG_MELPS4_WRITE_S_CB(WRITE8(*this, cfrogger_state, plate_w))
- MCFG_MELPS4_WRITE_F_CB(WRITE8(*this, cfrogger_state, plate_w))
- MCFG_MELPS4_WRITE_G_CB(WRITE8(*this, cfrogger_state, plate_w))
- MCFG_MELPS4_WRITE_D_CB(WRITE16(*this, cfrogger_state, grid_w))
- MCFG_MELPS4_WRITE_T_CB(WRITELINE(*this, cfrogger_state, speaker_w))
+ M58846(config, m_maincpu, 600_kHz_XTAL);
+ m_maincpu->read_k().set(FUNC(cfrogger_state::input_r));
+ m_maincpu->write_s().set(FUNC(cfrogger_state::plate_w));
+ m_maincpu->write_f().set(FUNC(cfrogger_state::plate_w));
+ m_maincpu->write_g().set(FUNC(cfrogger_state::plate_w));
+ m_maincpu->write_d().set(FUNC(cfrogger_state::grid_w));
+ m_maincpu->write_t().set(FUNC(cfrogger_state::speaker_w));
/* video hardware */
MCFG_SCREEN_SVG_ADD("screen", "svg")
@@ -412,14 +412,14 @@ INPUT_PORTS_END
MACHINE_CONFIG_START(gjungler_state::gjungler)
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M58846, 600_kHz_XTAL)
- MCFG_MELPS4_READ_K_CB(READ16(*this, gjungler_state, input_r))
- MCFG_MELPS4_WRITE_S_CB(WRITE8(*this, gjungler_state, plate_w))
- MCFG_MELPS4_WRITE_F_CB(WRITE8(*this, gjungler_state, plate_w))
- MCFG_MELPS4_WRITE_G_CB(WRITE8(*this, gjungler_state, plate_w))
- MCFG_MELPS4_WRITE_U_CB(WRITE8(*this, gjungler_state, plate_w))
- MCFG_MELPS4_WRITE_D_CB(WRITE16(*this, gjungler_state, grid_w))
- MCFG_MELPS4_WRITE_T_CB(WRITELINE(*this, gjungler_state, speaker_w))
+ M58846(config, m_maincpu, 600_kHz_XTAL);
+ m_maincpu->read_k().set(FUNC(gjungler_state::input_r));
+ m_maincpu->write_s().set(FUNC(gjungler_state::plate_w));
+ m_maincpu->write_f().set(FUNC(gjungler_state::plate_w));
+ m_maincpu->write_g().set(FUNC(gjungler_state::plate_w));
+ m_maincpu->write_u().set(FUNC(gjungler_state::plate_w));
+ m_maincpu->write_d().set(FUNC(gjungler_state::grid_w));
+ m_maincpu->write_t().set(FUNC(gjungler_state::speaker_w));
/* video hardware */
MCFG_SCREEN_SVG_ADD("screen", "svg")
diff --git a/src/mame/drivers/itt3030.cpp b/src/mame/drivers/itt3030.cpp
index b2eab8073bf..9d64b13dd9c 100644
--- a/src/mame/drivers/itt3030.cpp
+++ b/src/mame/drivers/itt3030.cpp
@@ -707,11 +707,11 @@ MACHINE_CONFIG_START(itt3030_state::itt3030)
// bits 0-2 select bit to read back, bits 3-6 choose column to read from, bit 7 clocks the process (rising edge strobes the row, falling edge reads the data)
// T0 is the key matrix return
// pin 23 is the UPI-41 host IRQ line, it's unknown how it's connected to the Z80
- MCFG_DEVICE_ADD("kbdmcu", I8741, 6_MHz_XTAL)
- MCFG_MCS48_PORT_T0_IN_CB(READLINE(*this, itt3030_state, kbd_matrix_r))
- MCFG_MCS48_PORT_P1_OUT_CB(WRITE8(*this, itt3030_state, kbd_matrix_w))
- MCFG_MCS48_PORT_P2_IN_CB(READ8(*this, itt3030_state, kbd_port2_r))
- MCFG_MCS48_PORT_P2_OUT_CB(WRITE8(*this, itt3030_state, kbd_port2_w))
+ I8741(config, m_kbdmcu, 6_MHz_XTAL);
+ m_kbdmcu->t0_in_cb().set(FUNC(itt3030_state::kbd_matrix_r));
+ m_kbdmcu->p1_out_cb().set(FUNC(itt3030_state::kbd_matrix_w));
+ m_kbdmcu->p2_in_cb().set(FUNC(itt3030_state::kbd_port2_r));
+ m_kbdmcu->p2_out_cb().set(FUNC(itt3030_state::kbd_port2_w));
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
diff --git a/src/mame/drivers/junofrst.cpp b/src/mame/drivers/junofrst.cpp
index 5175bd96ba5..3d45aa8ff59 100644
--- a/src/mame/drivers/junofrst.cpp
+++ b/src/mame/drivers/junofrst.cpp
@@ -134,7 +134,7 @@ private:
void mcu_map(address_map &map);
required_device<cpu_device> m_audiocpu;
- required_device<cpu_device> m_i8039;
+ required_device<i8039_device> m_i8039;
required_device<filter_rc_device> m_filter_0_0;
required_device<filter_rc_device> m_filter_0_1;
required_device<filter_rc_device> m_filter_0_2;
@@ -406,17 +406,17 @@ WRITE_LINE_MEMBER(junofrst_state::_30hz_irq)
MACHINE_CONFIG_START(junofrst_state::junofrst)
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", KONAMI1, 1500000) /* 1.5 MHz ??? */
- MCFG_DEVICE_PROGRAM_MAP(main_map)
+ KONAMI1(config, m_maincpu, 1500000); /* 1.5 MHz ??? */
+ m_maincpu->set_addrmap(AS_PROGRAM, &junofrst_state::main_map);
- MCFG_DEVICE_ADD("audiocpu", Z80,14318000/8) /* 1.78975 MHz */
- MCFG_DEVICE_PROGRAM_MAP(audio_map)
+ Z80(config, m_audiocpu, 14318000/8); /* 1.78975 MHz */
+ m_audiocpu->set_addrmap(AS_PROGRAM, &junofrst_state::audio_map);
- MCFG_DEVICE_ADD("mcu", I8039,8000000) /* 8MHz crystal */
- MCFG_DEVICE_PROGRAM_MAP(mcu_map)
- MCFG_DEVICE_IO_MAP(mcu_io_map)
- MCFG_MCS48_PORT_P1_OUT_CB(WRITE8("dac", dac_byte_interface, data_w))
- MCFG_MCS48_PORT_P2_OUT_CB(WRITE8(*this, junofrst_state, i8039_irqen_and_status_w))
+ I8039(config, m_i8039, 8000000); /* 8MHz crystal */
+ m_i8039->set_addrmap(AS_PROGRAM, &junofrst_state::mcu_map);
+ m_i8039->set_addrmap(AS_IO, &junofrst_state::mcu_io_map);
+ m_i8039->p1_out_cb().set("dac", FUNC(dac_byte_interface::data_w));
+ m_i8039->p2_out_cb().set(FUNC(junofrst_state::i8039_irqen_and_status_w));
ls259_device &mainlatch(LS259(config, "mainlatch")); // B3
mainlatch.q_out_cb<0>().set(FUNC(junofrst_state::irq_enable_w));
@@ -428,17 +428,16 @@ MACHINE_CONFIG_START(junofrst_state::junofrst)
WATCHDOG_TIMER(config, "watchdog");
- MCFG_PALETTE_ADD("palette", 16)
- MCFG_PALETTE_FORMAT(BBGGGRRR)
+ PALETTE(config, m_palette, 16).set_format(PALETTE_FORMAT_BBGGGRRR);
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
- MCFG_SCREEN_SIZE(32*8, 32*8)
- MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1) /* not sure about the visible area */
- MCFG_SCREEN_UPDATE_DRIVER(junofrst_state, screen_update_tutankhm)
- MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, junofrst_state, _30hz_irq))
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(60);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
+ screen.set_size(32*8, 32*8);
+ screen.set_visarea(0*8, 32*8-1, 2*8, 30*8-1); /* not sure about the visible area */
+ screen.set_screen_update(FUNC(junofrst_state::screen_update_tutankhm));
+ screen.screen_vblank().set(FUNC(junofrst_state::_30hz_irq));
/* sound hardware */
SPEAKER(config, "speaker").front_center();
diff --git a/src/mame/drivers/k28.cpp b/src/mame/drivers/k28.cpp
index d1652dde306..53dfffa4e92 100644
--- a/src/mame/drivers/k28.cpp
+++ b/src/mame/drivers/k28.cpp
@@ -53,7 +53,7 @@ public:
private:
// devices
- required_device<cpu_device> m_maincpu;
+ required_device<i8021_device> m_maincpu;
required_device<tms6100_device> m_tms6100;
required_device<votrax_sc01_device> m_speech;
required_device<timer_device> m_onbutton_timer;
@@ -448,29 +448,26 @@ INPUT_PORTS_END
***************************************************************************/
-MACHINE_CONFIG_START(k28_state::k28)
-
+void k28_state::k28(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", I8021, 3.579545_MHz_XTAL)
- MCFG_MCS48_PORT_BUS_OUT_CB(WRITE8(*this, k28_state, mcu_p0_w))
- MCFG_MCS48_PORT_P1_IN_CB(READ8(*this, k28_state, mcu_p1_r))
- MCFG_MCS48_PORT_P2_IN_CB(READ8(*this, k28_state, mcu_p2_r))
- MCFG_MCS48_PORT_P2_OUT_CB(WRITE8(*this, k28_state, mcu_p2_w))
- MCFG_MCS48_PORT_PROG_OUT_CB(WRITELINE(*this, k28_state, mcu_prog_w))
- MCFG_MCS48_PORT_T1_IN_CB(READLINE("speech", votrax_sc01_device, request)) // SC-01 A/R pin
+ I8021(config, m_maincpu, 3.579545_MHz_XTAL);
+ m_maincpu->bus_out_cb().set(FUNC(k28_state::mcu_p0_w));
+ m_maincpu->p1_in_cb().set(FUNC(k28_state::mcu_p1_r));
+ m_maincpu->p2_in_cb().set(FUNC(k28_state::mcu_p2_r));
+ m_maincpu->p2_out_cb().set(FUNC(k28_state::mcu_p2_w));
+ m_maincpu->prog_out_cb().set(FUNC(k28_state::mcu_prog_w));
+ m_maincpu->t1_in_cb().set("speech", FUNC(votrax_sc01_device::request)); // SC-01 A/R pin
TMS6100(config, m_tms6100, 3.579545_MHz_XTAL); // CLK tied to 8021 ALE pin
- MCFG_TIMER_ADD_NONE("on_button")
-
- MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", k28_state, display_decay_tick, attotime::from_msec(1))
- config.set_default_layout(layout_k28);
+ TIMER(config, "on_button", 0).configure_generic(timer_device::expired_delegate());
+ TIMER(config, "display_decay", 0).configure_periodic(timer_device::expired_delegate(FUNC(k28_state::display_decay_tick), this), attotime::from_msec(1));
/* sound hardware */
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD("speech", VOTRAX_SC01, 760000) // measured 760kHz on its RC pin
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.5)
-MACHINE_CONFIG_END
+ VOTRAX_SC01(config, "speech", 760000).add_route(ALL_OUTPUTS, "mono", 0.5); // measured 760kHz on its RC pin
+}
diff --git a/src/mame/drivers/m63.cpp b/src/mame/drivers/m63.cpp
index ed406b7ac5d..117f237230b 100644
--- a/src/mame/drivers/m63.cpp
+++ b/src/mame/drivers/m63.cpp
@@ -185,7 +185,7 @@ private:
optional_device<ay8910_device> m_ay2;
required_device<gfxdecode_device> m_gfxdecode;
required_device<palette_device> m_palette;
- required_device<cpu_device> m_soundcpu;
+ required_device<i8039_device> m_soundcpu;
optional_device<samples_device> m_samples;
required_device<generic_latch_8_device> m_soundlatch;
@@ -770,13 +770,13 @@ MACHINE_CONFIG_START(m63_state::m63)
outlatch.q_out_cb<6>().set(FUNC(m63_state::coin1_w));
outlatch.q_out_cb<7>().set(FUNC(m63_state::coin2_w));
- MCFG_DEVICE_ADD("soundcpu",I8039,XTAL(12'000'000)/4) /* ????? */
- MCFG_DEVICE_PROGRAM_MAP(i8039_map)
- MCFG_DEVICE_IO_MAP(i8039_port_map)
- MCFG_MCS48_PORT_P1_OUT_CB(WRITE8(*this, m63_state, p1_w))
- MCFG_MCS48_PORT_P2_OUT_CB(WRITE8(*this, m63_state, p2_w))
- MCFG_MCS48_PORT_T1_IN_CB(READLINE(*this, m63_state, irq_r))
- MCFG_DEVICE_PERIODIC_INT_DRIVER(m63_state, snd_irq, 60)
+ I8039(config, m_soundcpu, XTAL(12'000'000)/4); /* ????? */
+ m_soundcpu->set_addrmap(AS_PROGRAM, &m63_state::i8039_map);
+ m_soundcpu->set_addrmap(AS_IO, &m63_state::i8039_port_map);
+ m_soundcpu->p1_out_cb().set(FUNC(m63_state::p1_w));
+ m_soundcpu->p2_out_cb().set(FUNC(m63_state::p2_w));
+ m_soundcpu->t1_in_cb().set(FUNC(m63_state::irq_r));
+ m_soundcpu->set_periodic_int(FUNC(m63_state::snd_irq), attotime::from_hz(60));
MCFG_MACHINE_START_OVERRIDE(m63_state,m63)
MCFG_MACHINE_RESET_OVERRIDE(m63_state,m63)
diff --git a/src/mame/drivers/megazone.cpp b/src/mame/drivers/megazone.cpp
index 9a36ef1fe47..973f2c1b058 100644
--- a/src/mame/drivers/megazone.cpp
+++ b/src/mame/drivers/megazone.cpp
@@ -64,7 +64,6 @@ REAR BOARD 1C026 N/U (CUSTOM ON ORIGINAL)
#include "includes/konamipt.h"
#include "cpu/m6809/m6809.h"
-#include "cpu/mcs48/mcs48.h"
#include "cpu/z80/z80.h"
#include "machine/74259.h"
#include "machine/gen_latch.h"
@@ -304,11 +303,11 @@ MACHINE_CONFIG_START(megazone_state::megazone)
MCFG_DEVICE_PROGRAM_MAP(megazone_sound_map)
MCFG_DEVICE_IO_MAP(megazone_sound_io_map)
- MCFG_DEVICE_ADD("daccpu", I8039, XTAL(14'318'181)/2) /* 7.15909MHz */
- MCFG_DEVICE_PROGRAM_MAP(megazone_i8039_map)
- MCFG_DEVICE_IO_MAP(megazone_i8039_io_map)
- MCFG_MCS48_PORT_P1_OUT_CB(WRITE8("dac", dac_byte_interface, data_w))
- MCFG_MCS48_PORT_P2_OUT_CB(WRITE8(*this, megazone_state, i8039_irqen_and_status_w))
+ I8039(config, m_daccpu, XTAL(14'318'181)/2); /* 7.15909MHz */
+ m_daccpu->set_addrmap(AS_PROGRAM, &megazone_state::megazone_i8039_map);
+ m_daccpu->set_addrmap(AS_IO, &megazone_state::megazone_i8039_io_map);
+ m_daccpu->p1_out_cb().set("dac", FUNC(dac_byte_interface::data_w));
+ m_daccpu->p2_out_cb().set(FUNC(megazone_state::i8039_irqen_and_status_w));
MCFG_QUANTUM_TIME(attotime::from_hz(900))
diff --git a/src/mame/drivers/microvsn.cpp b/src/mame/drivers/microvsn.cpp
index 9076da5c595..4233d5c5401 100644
--- a/src/mame/drivers/microvsn.cpp
+++ b/src/mame/drivers/microvsn.cpp
@@ -95,7 +95,7 @@ private:
required_device<dac_byte_interface> m_dac;
- required_device<cpu_device> m_i8021;
+ required_device<i8021_device> m_i8021;
required_device<tms1100_cpu_device> m_tms1100;
required_device<generic_slot_device> m_cart;
@@ -636,12 +636,12 @@ INPUT_PORTS_END
MACHINE_CONFIG_START(microvision_state::microvision)
- MCFG_DEVICE_ADD("maincpu1", I8021, 2000000) // approximately
- MCFG_MCS48_PORT_BUS_OUT_CB(WRITE8(*this, microvision_state, i8021_p0_write))
- MCFG_MCS48_PORT_P1_OUT_CB(WRITE8(*this, microvision_state, i8021_p1_write))
- MCFG_MCS48_PORT_P2_OUT_CB(WRITE8(*this, microvision_state, i8021_p2_write))
- MCFG_MCS48_PORT_T1_IN_CB(READLINE(*this, microvision_state, i8021_t1_read))
- MCFG_MCS48_PORT_BUS_IN_CB(READ8(*this, microvision_state, i8021_bus_read))
+ I8021(config, m_i8021, 2000000); // approximately
+ m_i8021->bus_out_cb().set(FUNC(microvision_state::i8021_p0_write));
+ m_i8021->p1_out_cb().set(FUNC(microvision_state::i8021_p1_write));
+ m_i8021->p2_out_cb().set(FUNC(microvision_state::i8021_p2_write));
+ m_i8021->t1_in_cb().set(FUNC(microvision_state::i8021_t1_read));
+ m_i8021->bus_in_cb().set(FUNC(microvision_state::i8021_bus_read));
TMS1100(config, m_tms1100, 500000); // most games seem to be running at approximately this speed
m_tms1100->set_output_pla(microvision_output_pla_0);
diff --git a/src/mame/drivers/monzagp.cpp b/src/mame/drivers/monzagp.cpp
index cd455f2faf1..d181f85c513 100644
--- a/src/mame/drivers/monzagp.cpp
+++ b/src/mame/drivers/monzagp.cpp
@@ -74,7 +74,7 @@ private:
TIMER_DEVICE_CALLBACK_MEMBER(time_tick_timer);
DECLARE_PALETTE_INIT(monzagp);
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
- required_device<cpu_device> m_maincpu;
+ required_device<i8035_device> m_maincpu;
required_device<dp8350_device> m_crtc;
required_device<gfxdecode_device> m_gfxdecode;
required_device<palette_device> m_palette;
@@ -502,12 +502,12 @@ static GFXDECODE_START( gfx_monzagp )
GFXDECODE_END
MACHINE_CONFIG_START(monzagp_state::monzagp)
- MCFG_DEVICE_ADD("maincpu", I8035, 12000000/4) /* 400KHz ??? - Main board Crystal is 12MHz */
- MCFG_DEVICE_PROGRAM_MAP(monzagp_map)
- MCFG_DEVICE_IO_MAP(monzagp_io)
- MCFG_MCS48_PORT_P1_OUT_CB(WRITE8(*this, monzagp_state, port1_w))
- MCFG_MCS48_PORT_P2_IN_CB(READ8(*this, monzagp_state, port2_r))
- MCFG_MCS48_PORT_P2_OUT_CB(WRITE8(*this, monzagp_state, port2_w))
+ I8035(config, m_maincpu, 12000000/4); /* 400KHz ??? - Main board Crystal is 12MHz */
+ m_maincpu->set_addrmap(AS_PROGRAM, &monzagp_state::monzagp_map);
+ m_maincpu->set_addrmap(AS_IO, &monzagp_state::monzagp_io);
+ m_maincpu->p1_out_cb().set(FUNC(monzagp_state::port1_w));
+ m_maincpu->p2_in_cb().set(FUNC(monzagp_state::port2_r));
+ m_maincpu->p2_out_cb().set(FUNC(monzagp_state::port2_w));
/* video hardware */
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
diff --git a/src/mame/drivers/novagmcs48.cpp b/src/mame/drivers/novagmcs48.cpp
index 7b340d274ac..bf40fdbf5c7 100644
--- a/src/mame/drivers/novagmcs48.cpp
+++ b/src/mame/drivers/novagmcs48.cpp
@@ -150,10 +150,10 @@ INPUT_CHANGED_MEMBER(novagmcs48_state::octo_cpu_freq)
MACHINE_CONFIG_START(novagmcs48_state::presto)
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", I8049, 6000000) // LC circuit, measured 6MHz
- MCFG_MCS48_PORT_P1_IN_CB(READ8(*this, novagmcs48_state, presto_input_r))
- MCFG_MCS48_PORT_P2_OUT_CB(WRITE8(*this, novagmcs48_state, presto_control_w))
- MCFG_MCS48_PORT_BUS_OUT_CB(WRITE8(*this, novagmcs48_state, presto_mux_w))
+ i8049_device &maincpu(I8049(config, m_maincpu, 6000000)); // LC circuit, measured 6MHz
+ maincpu.p1_in_cb().set(FUNC(novagmcs48_state::presto_input_r));
+ maincpu.p2_out_cb().set(FUNC(novagmcs48_state::presto_control_w));
+ maincpu.bus_out_cb().set(FUNC(novagmcs48_state::presto_mux_w));
MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", novagbase_state, display_decay_tick, attotime::from_msec(1))
config.set_default_layout(layout_novag_presto);
diff --git a/src/mame/drivers/odyssey2.cpp b/src/mame/drivers/odyssey2.cpp
index 1d0efddb345..a238708acc3 100644
--- a/src/mame/drivers/odyssey2.cpp
+++ b/src/mame/drivers/odyssey2.cpp
@@ -47,7 +47,7 @@ public:
protected:
- required_device<cpu_device> m_maincpu;
+ required_device<i8048_device> m_maincpu;
required_device<i8244_device> m_i8244;
required_device<o2_cart_slot_device> m_cart;
@@ -689,17 +689,18 @@ MACHINE_CONFIG_END
MACHINE_CONFIG_START(odyssey2_state::odyssey2)
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", I8048, ( ( XTAL(7'159'090) * 3 ) / 4 ) )
- MCFG_DEVICE_PROGRAM_MAP(odyssey2_mem)
- MCFG_DEVICE_IO_MAP(odyssey2_io)
- MCFG_MCS48_PORT_P1_IN_CB(READ8(*this, odyssey2_state, p1_read))
- MCFG_MCS48_PORT_P1_OUT_CB(WRITE8(*this, odyssey2_state, p1_write))
- MCFG_MCS48_PORT_P2_IN_CB(READ8(*this, odyssey2_state, p2_read))
- MCFG_MCS48_PORT_P2_OUT_CB(WRITE8(*this, odyssey2_state, p2_write))
- MCFG_MCS48_PORT_BUS_IN_CB(READ8(*this, odyssey2_state, bus_read))
- MCFG_MCS48_PORT_BUS_OUT_CB(WRITE8(*this, odyssey2_state, bus_write))
- MCFG_MCS48_PORT_T0_IN_CB(READLINE("cartslot", o2_cart_slot_device, t0_read))
- MCFG_MCS48_PORT_T1_IN_CB(READLINE(*this, odyssey2_state, t1_read))
+ I8048(config, m_maincpu, ((XTAL(7'159'090) * 3) / 4));
+ m_maincpu->set_addrmap(AS_PROGRAM, &odyssey2_state::odyssey2_mem);
+ m_maincpu->set_addrmap(AS_IO, &odyssey2_state::odyssey2_io);
+ m_maincpu->p1_in_cb().set(FUNC(odyssey2_state::p1_read));
+ m_maincpu->p1_out_cb().set(FUNC(odyssey2_state::p1_write));
+ m_maincpu->p2_in_cb().set(FUNC(odyssey2_state::p2_read));
+ m_maincpu->p2_out_cb().set(FUNC(odyssey2_state::p2_write));
+ m_maincpu->bus_in_cb().set(FUNC(odyssey2_state::bus_read));
+ m_maincpu->bus_out_cb().set(FUNC(odyssey2_state::bus_write));
+ m_maincpu->t0_in_cb().set("cartslot", FUNC(o2_cart_slot_device::t0_read));
+ m_maincpu->t1_in_cb().set(FUNC(odyssey2_state::t1_read));
+
MCFG_QUANTUM_TIME(attotime::from_hz(60))
/* video hardware */
@@ -723,9 +724,10 @@ MACHINE_CONFIG_END
MACHINE_CONFIG_START(odyssey2_state::videopac)
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", I8048, ( XTAL(17'734'470) / 3 ) )
- MCFG_DEVICE_PROGRAM_MAP(odyssey2_mem)
- MCFG_DEVICE_IO_MAP(odyssey2_io)
+ I8048(config, m_maincpu, (XTAL(17'734'470) / 3));
+ m_maincpu->set_addrmap(AS_PROGRAM, &odyssey2_state::odyssey2_mem);
+ m_maincpu->set_addrmap(AS_IO, &odyssey2_state::odyssey2_io);
+
MCFG_QUANTUM_TIME(attotime::from_hz(60))
/* video hardware */
@@ -749,18 +751,19 @@ MACHINE_CONFIG_END
MACHINE_CONFIG_START(g7400_state::g7400)
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", I8048, XTAL(5'911'000) )
- MCFG_DEVICE_PROGRAM_MAP(odyssey2_mem)
- MCFG_DEVICE_IO_MAP(g7400_io)
- MCFG_MCS48_PORT_P1_IN_CB(READ8(*this, g7400_state, p1_read))
- MCFG_MCS48_PORT_P1_OUT_CB(WRITE8(*this, g7400_state, p1_write))
- MCFG_MCS48_PORT_P2_IN_CB(READ8(*this, g7400_state, p2_read))
- MCFG_MCS48_PORT_P2_OUT_CB(WRITE8(*this, g7400_state, p2_write))
- MCFG_MCS48_PORT_BUS_IN_CB(READ8(*this, g7400_state, bus_read))
- MCFG_MCS48_PORT_BUS_OUT_CB(WRITE8(*this, g7400_state, bus_write))
- MCFG_MCS48_PORT_T0_IN_CB(READLINE("cartslot", o2_cart_slot_device, t0_read))
- MCFG_MCS48_PORT_T1_IN_CB(READLINE(*this, g7400_state, t1_read))
- MCFG_MCS48_PORT_PROG_OUT_CB(WRITELINE(m_i8243, i8243_device, prog_w))
+ I8048(config, m_maincpu, XTAL(5'911'000));
+ m_maincpu->set_addrmap(AS_PROGRAM, &g7400_state::odyssey2_mem);
+ m_maincpu->set_addrmap(AS_IO, &g7400_state::g7400_io);
+ m_maincpu->p1_in_cb().set(FUNC(g7400_state::p1_read));
+ m_maincpu->p1_out_cb().set(FUNC(g7400_state::p1_write));
+ m_maincpu->p2_in_cb().set(FUNC(g7400_state::p2_read));
+ m_maincpu->p2_out_cb().set(FUNC(g7400_state::p2_write));
+ m_maincpu->bus_in_cb().set(FUNC(g7400_state::bus_read));
+ m_maincpu->bus_out_cb().set(FUNC(g7400_state::bus_write));
+ m_maincpu->t0_in_cb().set("cartslot", FUNC(o2_cart_slot_device::t0_read));
+ m_maincpu->t1_in_cb().set(FUNC(g7400_state::t1_read));
+ m_maincpu->prog_out_cb().set(m_i8243, FUNC(i8243_device::prog_w));
+
MCFG_QUANTUM_TIME(attotime::from_hz(60))
/* video hardware */
@@ -794,18 +797,19 @@ MACHINE_CONFIG_END
MACHINE_CONFIG_START(g7400_state::odyssey3)
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", I8048, XTAL(5'911'000) )
- MCFG_DEVICE_PROGRAM_MAP(odyssey2_mem)
- MCFG_DEVICE_IO_MAP(g7400_io)
- MCFG_MCS48_PORT_P1_IN_CB(READ8(*this, g7400_state, p1_read))
- MCFG_MCS48_PORT_P1_OUT_CB(WRITE8(*this, g7400_state, p1_write))
- MCFG_MCS48_PORT_P2_IN_CB(READ8(*this, g7400_state, p2_read))
- MCFG_MCS48_PORT_P2_OUT_CB(WRITE8(*this, g7400_state, p2_write))
- MCFG_MCS48_PORT_BUS_IN_CB(READ8(*this, g7400_state, bus_read))
- MCFG_MCS48_PORT_BUS_OUT_CB(WRITE8(*this, g7400_state, bus_write))
- MCFG_MCS48_PORT_T0_IN_CB(READLINE("cartslot", o2_cart_slot_device, t0_read))
- MCFG_MCS48_PORT_T1_IN_CB(READLINE(*this, g7400_state, t1_read))
- MCFG_MCS48_PORT_PROG_OUT_CB(WRITELINE(m_i8243, i8243_device, prog_w))
+ I8048(config, m_maincpu, XTAL(5'911'000));
+ m_maincpu->set_addrmap(AS_PROGRAM, &g7400_state::odyssey2_mem);
+ m_maincpu->set_addrmap(AS_IO, &g7400_state::g7400_io);
+ m_maincpu->p1_in_cb().set(FUNC(g7400_state::p1_read));
+ m_maincpu->p1_out_cb().set(FUNC(g7400_state::p1_write));
+ m_maincpu->p2_in_cb().set(FUNC(g7400_state::p2_read));
+ m_maincpu->p2_out_cb().set(FUNC(g7400_state::p2_write));
+ m_maincpu->bus_in_cb().set(FUNC(g7400_state::bus_read));
+ m_maincpu->bus_out_cb().set(FUNC(g7400_state::bus_write));
+ m_maincpu->t0_in_cb().set("cartslot", FUNC(o2_cart_slot_device::t0_read));
+ m_maincpu->t1_in_cb().set(FUNC(g7400_state::t1_read));
+ m_maincpu->prog_out_cb().set(m_i8243, FUNC(i8243_device::prog_w));
+
MCFG_QUANTUM_TIME(attotime::from_hz(60))
/* video hardware */
diff --git a/src/mame/drivers/othello.cpp b/src/mame/drivers/othello.cpp
index 440bc912f3f..1f27adf7746 100644
--- a/src/mame/drivers/othello.cpp
+++ b/src/mame/drivers/othello.cpp
@@ -387,25 +387,25 @@ void othello_state::machine_reset()
m_n7751_busy = 0;
}
-MACHINE_CONFIG_START(othello_state::othello)
-
+void othello_state::othello(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD(m_maincpu, Z80, XTAL(8'000'000)/2)
- MCFG_DEVICE_PROGRAM_MAP(main_map)
- MCFG_DEVICE_IO_MAP(main_portmap)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", othello_state, irq0_line_hold)
-
- MCFG_DEVICE_ADD("audiocpu", Z80, XTAL(3'579'545))
- MCFG_DEVICE_PROGRAM_MAP(audio_map)
- MCFG_DEVICE_IO_MAP(audio_portmap)
-
- MCFG_DEVICE_ADD(m_n7751, N7751, XTAL(6'000'000))
- MCFG_MCS48_PORT_T1_IN_CB(CONSTANT(0)) // labelled as "TEST", connected to ground
- MCFG_MCS48_PORT_P2_IN_CB(READ8(*this, othello_state, n7751_command_r))
- MCFG_MCS48_PORT_BUS_IN_CB(READ8(*this, othello_state, n7751_rom_r))
- MCFG_MCS48_PORT_P1_OUT_CB(WRITE8("dac", dac_byte_interface, data_w))
- MCFG_MCS48_PORT_P2_OUT_CB(WRITE8(*this, othello_state, n7751_p2_w))
- MCFG_MCS48_PORT_PROG_OUT_CB(WRITELINE(m_i8243, i8243_device, prog_w))
+ Z80(config, m_maincpu, XTAL(8'000'000)/2);
+ m_maincpu->set_addrmap(AS_PROGRAM, &othello_state::main_map);
+ m_maincpu->set_addrmap(AS_IO, &othello_state::main_portmap);
+ m_maincpu->set_vblank_int("screen", FUNC(othello_state::irq0_line_hold));
+
+ z80_device &audiocpu(Z80(config, "audiocpu", XTAL(3'579'545)));
+ audiocpu.set_addrmap(AS_PROGRAM, &othello_state::audio_map);
+ audiocpu.set_addrmap(AS_IO, &othello_state::audio_portmap);
+
+ N7751(config, m_n7751, XTAL(6'000'000));
+ m_n7751->t1_in_cb().set_constant(0); // labelled as "TEST", connected to ground
+ m_n7751->p2_in_cb().set(FUNC(othello_state::n7751_command_r));
+ m_n7751->bus_in_cb().set(FUNC(othello_state::n7751_rom_r));
+ m_n7751->p1_out_cb().set("dac", FUNC(dac_byte_interface::data_w));
+ m_n7751->p2_out_cb().set(FUNC(othello_state::n7751_p2_w));
+ m_n7751->prog_out_cb().set(m_i8243, FUNC(i8243_device::prog_w));
I8243(config, m_i8243);
m_i8243->p4_out_cb().set(FUNC(othello_state::n7751_rom_addr_w<0>));
@@ -414,15 +414,14 @@ MACHINE_CONFIG_START(othello_state::othello)
m_i8243->p7_out_cb().set(FUNC(othello_state::n7751_rom_select_w));
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
- MCFG_SCREEN_SIZE(64*6, 64*8)
- MCFG_SCREEN_VISIBLE_AREA(0*8, 64*6-1, 0*8, 64*8-1)
- MCFG_SCREEN_UPDATE_DEVICE("crtc", h46505_device, screen_update)
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(60);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
+ screen.set_size(64*6, 64*8);
+ screen.set_visarea(0*8, 64*6-1, 0*8, 64*8-1);
+ screen.set_screen_update("crtc", FUNC(h46505_device::screen_update));
- MCFG_PALETTE_ADD(m_palette, 0x10)
- MCFG_PALETTE_INIT_OWNER(othello_state, othello)
+ PALETTE(config, m_palette, 0x10).set_init(palette_init_delegate(FUNC(othello_state::palette_init_othello), this));
h46505_device &crtc(H46505(config, "crtc", 1000000 /* ? MHz */)); /* H46505 @ CPU clock */
crtc.set_screen("screen");
@@ -439,10 +438,12 @@ MACHINE_CONFIG_START(othello_state::othello)
AY8910(config, m_ay[1], 2000000).add_route(ALL_OUTPUTS, "speaker", 0.15);
- MCFG_DEVICE_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.3) // unknown DAC
- MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
- MCFG_SOUND_ROUTE(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
-MACHINE_CONFIG_END
+ DAC_8BIT_R2R(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 0.3); // unknown DAC
+ voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref", 0));
+ vref.set_output(5.0);
+ vref.add_route(0, "dac", 1.0, DAC_VREF_POS_INPUT);
+ vref.add_route(0, "dac", -1.0, DAC_VREF_NEG_INPUT);
+}
ROM_START( othello )
ROM_REGION( 0x10000, "maincpu", 0 )
diff --git a/src/mame/drivers/pandoras.cpp b/src/mame/drivers/pandoras.cpp
index 3d6108a1ef9..545220ea313 100644
--- a/src/mame/drivers/pandoras.cpp
+++ b/src/mame/drivers/pandoras.cpp
@@ -28,7 +28,6 @@ Boards:
#include "includes/konamipt.h"
#include "cpu/m6809/m6809.h"
-#include "cpu/mcs48/mcs48.h"
#include "cpu/z80/z80.h"
#include "machine/74259.h"
#include "machine/gen_latch.h"
@@ -309,20 +308,20 @@ READ8_MEMBER(pandoras_state::pandoras_portB_r)
MACHINE_CONFIG_START(pandoras_state::pandoras)
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", MC6809E, MASTER_CLOCK/6) /* CPU A */
- MCFG_DEVICE_PROGRAM_MAP(pandoras_master_map)
+ MC6809E(config, m_maincpu, MASTER_CLOCK/6); /* CPU A */
+ m_maincpu->set_addrmap(AS_PROGRAM, &pandoras_state::pandoras_master_map);
- MCFG_DEVICE_ADD("sub", MC6809E, MASTER_CLOCK/6) /* CPU B */
- MCFG_DEVICE_PROGRAM_MAP(pandoras_slave_map)
+ MC6809E(config, m_subcpu, MASTER_CLOCK/6); /* CPU B */
+ m_subcpu->set_addrmap(AS_PROGRAM, &pandoras_state::pandoras_slave_map);
- MCFG_DEVICE_ADD("audiocpu", Z80, SOUND_CLOCK/8)
- MCFG_DEVICE_PROGRAM_MAP(pandoras_sound_map)
+ Z80(config, m_audiocpu, SOUND_CLOCK/8);
+ m_audiocpu->set_addrmap(AS_PROGRAM, &pandoras_state::pandoras_sound_map);
- MCFG_DEVICE_ADD("mcu", I8039, SOUND_CLOCK/2)
- MCFG_DEVICE_PROGRAM_MAP(pandoras_i8039_map)
- MCFG_DEVICE_IO_MAP(pandoras_i8039_io_map)
- MCFG_MCS48_PORT_P1_OUT_CB(WRITE8("dac", dac_byte_interface, data_w))
- MCFG_MCS48_PORT_P2_OUT_CB(WRITE8(*this, pandoras_state, i8039_irqen_and_status_w))
+ I8039(config, m_mcu, SOUND_CLOCK/2);
+ m_mcu->set_addrmap(AS_PROGRAM, &pandoras_state::pandoras_i8039_map);
+ m_mcu->set_addrmap(AS_IO, &pandoras_state::pandoras_i8039_io_map);
+ m_mcu->p1_out_cb().set("dac", FUNC(dac_byte_interface::data_w));
+ m_mcu->p2_out_cb().set(FUNC(pandoras_state::i8039_irqen_and_status_w));
MCFG_QUANTUM_TIME(attotime::from_hz(6000)) /* 100 CPU slices per frame - needed for correct synchronization of the sound CPUs */
@@ -348,6 +347,7 @@ MACHINE_CONFIG_START(pandoras_state::pandoras)
MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, pandoras_state, vblank_irq))
MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_pandoras)
+
MCFG_PALETTE_ADD("palette", 16*16+16*16)
MCFG_PALETTE_INDIRECT_ENTRIES(32)
MCFG_PALETTE_INIT_OWNER(pandoras_state, pandoras)
diff --git a/src/mame/drivers/pcw.cpp b/src/mame/drivers/pcw.cpp
index d0c55c7a763..3cb03bb101a 100644
--- a/src/mame/drivers/pcw.cpp
+++ b/src/mame/drivers/pcw.cpp
@@ -99,7 +99,6 @@
#include "includes/pcw.h"
#include "cpu/z80/z80.h"
-#include "cpu/mcs48/mcs48.h"
#include "machine/i8243.h"
#include "machine/upd765.h"
// pcw/pcw16 beeper
@@ -937,7 +936,7 @@ void pcw_state::pcw_io(address_map &map)
map(0x0f6, 0x0f6).w(FUNC(pcw_state::pcw_pointer_table_top_scan_w));
map(0x0f7, 0x0f7).w(FUNC(pcw_state::pcw_vdu_video_control_register_w));
map(0x0f8, 0x0f8).rw(FUNC(pcw_state::pcw_system_status_r), FUNC(pcw_state::pcw_system_control_w));
- map(0x0fc, 0x0fd).rw("printer_mcu", FUNC(i8041_device::upi41_master_r), FUNC(i8041_device::upi41_master_w));
+ map(0x0fc, 0x0fd).rw(m_printer_mcu, FUNC(i8041_device::upi41_master_r), FUNC(i8041_device::upi41_master_w));
}
@@ -1219,101 +1218,93 @@ static void pcw_floppies(device_slot_interface &device)
}
/* PCW8256, PCW8512, PCW9256 */
-MACHINE_CONFIG_START(pcw_state::pcw)
+void pcw_state::pcw(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, 4000000) /* clock supplied to chip, but in reality it is 3.4 MHz */
- MCFG_DEVICE_PROGRAM_MAP(pcw_map)
- MCFG_DEVICE_IO_MAP(pcw_io)
-
- MCFG_DEVICE_ADD("printer_mcu", I8041, 11000000) // 11MHz
- MCFG_MCS48_PORT_P2_IN_CB(READ8(*this, pcw_state, mcu_printer_p2_r))
- MCFG_MCS48_PORT_P2_OUT_CB(WRITE8(*this, pcw_state, mcu_printer_p2_w))
- MCFG_MCS48_PORT_P1_IN_CB(READ8(*this, pcw_state, mcu_printer_p1_r))
- MCFG_MCS48_PORT_P1_OUT_CB(WRITE8(*this, pcw_state, mcu_printer_p1_w))
- MCFG_MCS48_PORT_T1_IN_CB(READLINE(*this, pcw_state, mcu_printer_t1_r))
- MCFG_MCS48_PORT_T0_IN_CB(READLINE(*this, pcw_state, mcu_printer_t0_r))
-
- MCFG_DEVICE_ADD("keyboard_mcu", I8048, 5000000) // 5MHz
- MCFG_MCS48_PORT_P1_IN_CB(READ8(*this, pcw_state, mcu_kb_scan_r))
- MCFG_MCS48_PORT_P1_OUT_CB(WRITE8(*this, pcw_state, mcu_kb_scan_w))
- MCFG_MCS48_PORT_P2_IN_CB(READ8(*this, pcw_state, mcu_kb_scan_high_r))
- MCFG_MCS48_PORT_P2_OUT_CB(WRITE8(*this, pcw_state, mcu_kb_scan_high_w))
- MCFG_MCS48_PORT_T1_IN_CB(READLINE(*this, pcw_state, mcu_kb_t1_r))
- MCFG_MCS48_PORT_T0_IN_CB(READLINE(*this, pcw_state, mcu_kb_t0_r))
- MCFG_MCS48_PORT_BUS_IN_CB(READ8(*this, pcw_state, mcu_kb_data_r))
+ Z80(config, m_maincpu, 4000000); /* clock supplied to chip, but in reality it is 3.4 MHz */
+ m_maincpu->set_addrmap(AS_PROGRAM, &pcw_state::pcw_map);
+ m_maincpu->set_addrmap(AS_IO, &pcw_state::pcw_io);
+
+ I8041(config, m_printer_mcu, 11000000); // 11MHz
+ m_printer_mcu->p2_in_cb().set(FUNC(pcw_state::mcu_printer_p2_r));
+ m_printer_mcu->p2_out_cb().set(FUNC(pcw_state::mcu_printer_p2_w));
+ m_printer_mcu->p1_in_cb().set(FUNC(pcw_state::mcu_printer_p1_r));
+ m_printer_mcu->p1_out_cb().set(FUNC(pcw_state::mcu_printer_p1_w));
+ m_printer_mcu->t1_in_cb().set(FUNC(pcw_state::mcu_printer_t1_r));
+ m_printer_mcu->t0_in_cb().set(FUNC(pcw_state::mcu_printer_t0_r));
+
+ I8048(config, m_keyboard_mcu, 5000000); // 5MHz
+ m_keyboard_mcu->p1_in_cb().set(FUNC(pcw_state::mcu_kb_scan_r));
+ m_keyboard_mcu->p1_out_cb().set(FUNC(pcw_state::mcu_kb_scan_w));
+ m_keyboard_mcu->p2_in_cb().set(FUNC(pcw_state::mcu_kb_scan_high_r));
+ m_keyboard_mcu->p2_out_cb().set(FUNC(pcw_state::mcu_kb_scan_high_w));
+ m_keyboard_mcu->t1_in_cb().set(FUNC(pcw_state::mcu_kb_t1_r));
+ m_keyboard_mcu->t0_in_cb().set(FUNC(pcw_state::mcu_kb_t0_r));
+ m_keyboard_mcu->bus_in_cb().set(FUNC(pcw_state::mcu_kb_data_r));
// MCFG_QUANTUM_TIME(attotime::from_hz(50))
- MCFG_QUANTUM_PERFECT_CPU("maincpu")
-
+ config.m_perfect_cpu_quantum = subtag("maincpu");
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(50)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
- MCFG_SCREEN_SIZE(PCW_SCREEN_WIDTH, PCW_SCREEN_HEIGHT)
- MCFG_SCREEN_VISIBLE_AREA(0, PCW_SCREEN_WIDTH-1, 0, PCW_SCREEN_HEIGHT-1)
- MCFG_SCREEN_UPDATE_DRIVER(pcw_state, screen_update_pcw)
- MCFG_SCREEN_PALETTE("palette")
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_refresh_hz(50);
+ m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */
+ m_screen->set_size(PCW_SCREEN_WIDTH, PCW_SCREEN_HEIGHT);
+ m_screen->set_visarea(0, PCW_SCREEN_WIDTH-1, 0, PCW_SCREEN_HEIGHT-1);
+ m_screen->set_screen_update(FUNC(pcw_state::screen_update_pcw));
+ m_screen->set_palette(m_palette);
- MCFG_PALETTE_ADD("palette", PCW_NUM_COLOURS)
- MCFG_PALETTE_INIT_OWNER(pcw_state, pcw)
+ PALETTE(config, m_palette, PCW_NUM_COLOURS);
+ m_palette->set_init(palette_init_delegate(FUNC(pcw_state::palette_init_pcw), this));
/* sound hardware */
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD("beeper", BEEP, 3750)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
+ BEEP(config, m_beeper, 3750).add_route(ALL_OUTPUTS, "mono", 1.00);
UPD765A(config, m_fdc, true, true);
m_fdc->intrq_wr_callback().set(FUNC(pcw_state::pcw_fdc_interrupt));
- MCFG_FLOPPY_DRIVE_ADD("upd765:0", pcw_floppies, "3dsdd", floppy_image_device::default_floppy_formats)
- MCFG_FLOPPY_DRIVE_ADD("upd765:1", pcw_floppies, "3dsdd", floppy_image_device::default_floppy_formats)
+ FLOPPY_CONNECTOR(config, "upd765:0", pcw_floppies, "3dsdd", floppy_image_device::default_floppy_formats);
+ FLOPPY_CONNECTOR(config, "upd765:1", pcw_floppies, "3dsdd", floppy_image_device::default_floppy_formats);
- MCFG_SOFTWARE_LIST_ADD("disk_list","pcw")
+ SOFTWARE_LIST(config, "disk_list").set_original("pcw");
/* internal ram */
RAM(config, m_ram).set_default_size("256K");
- MCFG_TIMER_DRIVER_ADD_PERIODIC("pcw_timer", pcw_state, pcw_timer_interrupt, attotime::from_hz(300))
-MACHINE_CONFIG_END
+ TIMER(config, "pcw_timer", 0).configure_periodic(timer_device::expired_delegate(FUNC(pcw_state::pcw_timer_interrupt), this), attotime::from_hz(300));
+}
-MACHINE_CONFIG_START(pcw_state::pcw8256)
+void pcw_state::pcw8256(machine_config &config)
+{
pcw(config);
- MCFG_SCREEN_ADD("printer",RASTER)
- MCFG_SCREEN_REFRESH_RATE(50)
- MCFG_SCREEN_SIZE( PCW_PRINTER_WIDTH, PCW_PRINTER_HEIGHT )
- MCFG_SCREEN_VISIBLE_AREA(0, PCW_PRINTER_WIDTH-1, 0, PCW_PRINTER_HEIGHT-1)
- MCFG_SCREEN_UPDATE_DRIVER(pcw_state, screen_update_pcw_printer)
- MCFG_SCREEN_PALETTE("palette")
+ screen_device &printer(SCREEN(config, "printer", SCREEN_TYPE_RASTER));
+ printer.set_refresh_hz(50);
+ printer.set_size(PCW_PRINTER_WIDTH, PCW_PRINTER_HEIGHT);
+ printer.set_visarea(0, PCW_PRINTER_WIDTH-1, 0, PCW_PRINTER_HEIGHT-1);
+ printer.set_screen_update(FUNC(pcw_state::screen_update_pcw_printer));
+ printer.set_palette(m_palette);
config.set_default_layout(layout_pcw);
+}
-MACHINE_CONFIG_END
-
-MACHINE_CONFIG_START(pcw_state::pcw8512)
- pcw(config);
- MCFG_SCREEN_ADD("printer",RASTER)
- MCFG_SCREEN_REFRESH_RATE(50)
- MCFG_SCREEN_SIZE( PCW_PRINTER_WIDTH, PCW_PRINTER_HEIGHT )
- MCFG_SCREEN_VISIBLE_AREA(0, PCW_PRINTER_WIDTH-1, 0, PCW_PRINTER_HEIGHT-1)
- MCFG_SCREEN_UPDATE_DRIVER(pcw_state, screen_update_pcw_printer)
- MCFG_SCREEN_PALETTE("palette")
-
- config.set_default_layout(layout_pcw);
+void pcw_state::pcw8512(machine_config &config)
+{
+ pcw8256(config);
/* internal ram */
m_ram->set_default_size("512K");
-MACHINE_CONFIG_END
+}
/* PCW9512, PCW9512+, PCW10 */
-MACHINE_CONFIG_START(pcw_state::pcw9512)
+void pcw_state::pcw9512(machine_config &config)
+{
pcw(config);
- MCFG_DEVICE_MODIFY( "maincpu" )
- MCFG_DEVICE_IO_MAP(pcw9512_io)
+ m_maincpu->set_addrmap(AS_IO, &pcw_state::pcw9512_io);
/* internal ram */
m_ram->set_default_size("512K");
-MACHINE_CONFIG_END
+}
/***************************************************************************
diff --git a/src/mame/drivers/ql.cpp b/src/mame/drivers/ql.cpp
index 824b67b4fbd..080bf1d724a 100644
--- a/src/mame/drivers/ql.cpp
+++ b/src/mame/drivers/ql.cpp
@@ -145,7 +145,7 @@ public:
private:
required_device<cpu_device> m_maincpu;
- required_device<cpu_device> m_ipc;
+ required_device<i8749_device> m_ipc;
required_device<zx8301_device> m_zx8301;
required_device<zx8302_device> m_zx8302;
required_device<speaker_sound_device> m_speaker;
@@ -903,13 +903,13 @@ MACHINE_CONFIG_START(ql_state::ql)
MCFG_DEVICE_ADD(m_maincpu, M68008, X1/2)
MCFG_DEVICE_PROGRAM_MAP(ql_mem)
- MCFG_DEVICE_ADD(I8749_TAG, I8749, X4)
- MCFG_DEVICE_IO_MAP(ipc_io)
- MCFG_MCS48_PORT_P1_OUT_CB(WRITE8(*this, ql_state, ipc_port1_w))
- MCFG_MCS48_PORT_P2_IN_CB(READ8(*this, ql_state, ipc_port2_r))
- MCFG_MCS48_PORT_P2_OUT_CB(WRITE8(*this, ql_state, ipc_port2_w))
- MCFG_MCS48_PORT_T1_IN_CB(READLINE(*this, ql_state, ipc_t1_r))
- MCFG_MCS48_PORT_BUS_IN_CB(READ8(*this, ql_state, ipc_bus_r))
+ I8749(config, m_ipc, X4);
+ m_ipc->set_addrmap(AS_IO, &ql_state::ipc_io);
+ m_ipc->p1_out_cb().set(FUNC(ql_state::ipc_port1_w));
+ m_ipc->p2_in_cb().set(FUNC(ql_state::ipc_port2_r));
+ m_ipc->p2_out_cb().set(FUNC(ql_state::ipc_port2_w));
+ m_ipc->t1_in_cb().set(FUNC(ql_state::ipc_t1_r));
+ m_ipc->bus_in_cb().set(FUNC(ql_state::ipc_bus_r));
// video hardware
MCFG_SCREEN_ADD(SCREEN_TAG, RASTER)
diff --git a/src/mame/drivers/quasar.cpp b/src/mame/drivers/quasar.cpp
index ac46452b9bc..302c2805944 100644
--- a/src/mame/drivers/quasar.cpp
+++ b/src/mame/drivers/quasar.cpp
@@ -308,11 +308,11 @@ MACHINE_CONFIG_START(quasar_state::quasar)
MCFG_DEVICE_VBLANK_INT_DRIVER("screen", quasar_state, quasar_interrupt)
MCFG_S2650_SENSE_INPUT(READLINE("screen", screen_device, vblank))
- MCFG_DEVICE_ADD("soundcpu",I8035,6000000) /* 6MHz crystal divide by 15 in CPU */
- MCFG_DEVICE_PROGRAM_MAP(sound_map)
- MCFG_DEVICE_IO_MAP(sound_portmap)
- MCFG_MCS48_PORT_T1_IN_CB(READLINE(*this, quasar_state, audio_t1_r))
- MCFG_MCS48_PORT_P1_OUT_CB(WRITE8("dac", dac_byte_interface, data_w))
+ i8035_device &soundcpu(I8035(config, "soundcpu", 6000000)); /* 6MHz crystal divide by 15 in CPU */
+ soundcpu.set_addrmap(AS_PROGRAM, &quasar_state::sound_map);
+ soundcpu.set_addrmap(AS_IO, &quasar_state::sound_portmap);
+ soundcpu.t1_in_cb().set(FUNC(quasar_state::audio_t1_r));
+ soundcpu.p1_out_cb().set("dac", FUNC(dac_byte_interface::data_w));
MCFG_MACHINE_START_OVERRIDE(quasar_state,quasar)
MCFG_MACHINE_RESET_OVERRIDE(quasar_state,quasar)
diff --git a/src/mame/drivers/ron.cpp b/src/mame/drivers/ron.cpp
index d3d8e46a61a..f6c418cde1b 100644
--- a/src/mame/drivers/ron.cpp
+++ b/src/mame/drivers/ron.cpp
@@ -67,7 +67,7 @@ private:
DECLARE_READ8_MEMBER(audio_cmd_r);
DECLARE_WRITE8_MEMBER(audio_p1_w);
DECLARE_WRITE8_MEMBER(audio_p2_w);
- DECLARE_READ_LINE_MEMBER(audio_T1_r);
+ DECLARE_READ_LINE_MEMBER(audio_t1_r);
DECLARE_WRITE8_MEMBER(ay_pa_w);
void ron_audio_io(address_map &map);
@@ -83,7 +83,7 @@ private:
// devices
required_device<cpu_device> m_maincpu;
- required_device<cpu_device> m_audiocpu;
+ required_device<i8035_device> m_audiocpu;
required_device<ay8910_device> m_ay;
required_device<gfxdecode_device> m_gfxdecode;
required_shared_ptr<uint8_t> m_vram;
@@ -476,7 +476,7 @@ WRITE8_MEMBER(ron_state::audio_p2_w)
// machine().debug_break();
}
-READ_LINE_MEMBER(ron_state::audio_T1_r )
+READ_LINE_MEMBER(ron_state::audio_t1_r)
{
// TODO: what controls this?
return !BIT(m_sound_command, 6);
@@ -493,14 +493,14 @@ MACHINE_CONFIG_START(ron_state::ron)
MCFG_DEVICE_PROGRAM_MAP(ron_map)
MCFG_DEVICE_IO_MAP(ron_io)
- MCFG_DEVICE_ADD("audiocpu", I8035, SOUND_CLOCK)
- MCFG_DEVICE_PROGRAM_MAP(ron_audio_map)
- MCFG_DEVICE_IO_MAP(ron_audio_io)
- MCFG_MCS48_PORT_T0_CLK_DEVICE("aysnd")
- MCFG_MCS48_PORT_P2_IN_CB(READ8(*this, ron_state, audio_cmd_r))
- MCFG_MCS48_PORT_P1_OUT_CB(WRITE8(*this, ron_state, audio_p1_w))
- MCFG_MCS48_PORT_P2_OUT_CB(WRITE8(*this, ron_state, audio_p2_w))
- MCFG_MCS48_PORT_T1_IN_CB(READLINE(*this, ron_state, audio_T1_r))
+ I8035(config, m_audiocpu, SOUND_CLOCK);
+ m_audiocpu->set_addrmap(AS_PROGRAM, &ron_state::ron_audio_map);
+ m_audiocpu->set_addrmap(AS_IO, &ron_state::ron_audio_io);
+ m_audiocpu->set_t0_clk_cb("aysnd", FUNC(device_t::set_unscaled_clock));
+ m_audiocpu->p2_in_cb().set(FUNC(ron_state::audio_cmd_r));
+ m_audiocpu->p1_out_cb().set(FUNC(ron_state::audio_p1_w));
+ m_audiocpu->p2_out_cb().set(FUNC(ron_state::audio_p2_w));
+ m_audiocpu->t1_in_cb().set(FUNC(ron_state::audio_t1_r));
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
diff --git a/src/mame/drivers/segag80r.cpp b/src/mame/drivers/segag80r.cpp
index 791b7840ca3..33546daf5de 100644
--- a/src/mame/drivers/segag80r.cpp
+++ b/src/mame/drivers/segag80r.cpp
@@ -973,9 +973,9 @@ MACHINE_CONFIG_START(segag80r_state::sindbadm)
SPEAKER(config, "speaker").front_center();
/* sound boards */
- MCFG_DEVICE_ADD("audiocpu", Z80, SINDBADM_SOUND_CLOCK/2)
- MCFG_DEVICE_PROGRAM_MAP(sindbadm_sound_map)
- MCFG_DEVICE_PERIODIC_INT_DRIVER(segag80r_state, irq0_line_hold, 4*60)
+ Z80(config, m_audiocpu, SINDBADM_SOUND_CLOCK/2);
+ m_audiocpu->set_addrmap(AS_PROGRAM, &segag80r_state::sindbadm_sound_map);
+ m_audiocpu->set_periodic_int(FUNC(segag80r_state::irq0_line_hold), attotime::from_hz(4*60));
/* sound hardware */
MCFG_DEVICE_ADD("sn1", SN76496, SINDBADM_SOUND_CLOCK/2) /* matches PCB videos, correct? */
diff --git a/src/mame/drivers/segas16a.cpp b/src/mame/drivers/segas16a.cpp
index 25a73ebf3fb..dd705344ea8 100644
--- a/src/mame/drivers/segas16a.cpp
+++ b/src/mame/drivers/segas16a.cpp
@@ -1974,13 +1974,13 @@ MACHINE_CONFIG_START(segas16a_state::system16a)
MCFG_DEVICE_PROGRAM_MAP(sound_map)
MCFG_DEVICE_IO_MAP(sound_portmap)
- MCFG_DEVICE_ADD("n7751", N7751, 6000000)
- MCFG_MCS48_PORT_BUS_IN_CB(READ8(*this, segas16a_state, n7751_rom_r))
- MCFG_MCS48_PORT_T1_IN_CB(CONSTANT(0)) // labelled as "TEST", connected to ground
- MCFG_MCS48_PORT_P1_OUT_CB(WRITE8("dac", dac_byte_interface, data_w))
- MCFG_MCS48_PORT_P2_IN_CB(READ8(*this, segas16a_state, n7751_p2_r))
- MCFG_MCS48_PORT_P2_OUT_CB(WRITE8(*this, segas16a_state, n7751_p2_w))
- MCFG_MCS48_PORT_PROG_OUT_CB(WRITELINE("n7751_8243", i8243_device, prog_w))
+ N7751(config, m_n7751, 6000000);
+ m_n7751->bus_in_cb().set(FUNC(segas16a_state::n7751_rom_r));
+ m_n7751->t1_in_cb().set_constant(0); // labelled as "TEST", connected to ground
+ m_n7751->p1_out_cb().set("dac", FUNC(dac_byte_interface::data_w));
+ m_n7751->p2_in_cb().set(FUNC(segas16a_state::n7751_p2_r));
+ m_n7751->p2_out_cb().set(FUNC(segas16a_state::n7751_p2_w));
+ m_n7751->prog_out_cb().set("n7751_8243", FUNC(i8243_device::prog_w));
I8243(config, m_n7751_i8243);
m_n7751_i8243->p4_out_cb().set(FUNC(segas16a_state::n7751_rom_offset_w<0>));
diff --git a/src/mame/drivers/spacefb.cpp b/src/mame/drivers/spacefb.cpp
index 8317d720f3b..8a8c52e7f6a 100644
--- a/src/mame/drivers/spacefb.cpp
+++ b/src/mame/drivers/spacefb.cpp
@@ -117,7 +117,6 @@
#include "emu.h"
#include "cpu/z80/z80.h"
#include "includes/spacefb.h"
-#include "cpu/mcs48/mcs48.h"
#include "sound/dac.h"
@@ -334,22 +333,20 @@ INPUT_PORTS_END
MACHINE_CONFIG_START(spacefb_state::spacefb)
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, SPACEFB_MAIN_CPU_CLOCK)
- MCFG_DEVICE_PROGRAM_MAP(spacefb_main_map)
- MCFG_DEVICE_IO_MAP(spacefb_main_io_map)
+ Z80(config, m_maincpu, SPACEFB_MAIN_CPU_CLOCK);
+ m_maincpu->set_addrmap(AS_PROGRAM, &spacefb_state::spacefb_main_map);
+ m_maincpu->set_addrmap(AS_IO, &spacefb_state::spacefb_main_io_map);
- MCFG_DEVICE_ADD("audiocpu", I8035, SPACEFB_AUDIO_CPU_CLOCK)
- MCFG_DEVICE_PROGRAM_MAP(spacefb_audio_map)
- MCFG_MCS48_PORT_P1_OUT_CB(WRITE8("dac", dac_byte_interface, data_w))
- MCFG_MCS48_PORT_P2_IN_CB(READ8(*this, spacefb_state, audio_p2_r))
- MCFG_MCS48_PORT_T0_IN_CB(READLINE(*this, spacefb_state, audio_t0_r))
- MCFG_MCS48_PORT_T1_IN_CB(READLINE(*this, spacefb_state, audio_t1_r))
+ I8035(config, m_audiocpu, SPACEFB_AUDIO_CPU_CLOCK);
+ m_audiocpu->set_addrmap(AS_PROGRAM, &spacefb_state::spacefb_audio_map);
+ m_audiocpu->p1_out_cb().set("dac", FUNC(dac_byte_interface::data_w));
+ m_audiocpu->p2_in_cb().set(FUNC(spacefb_state::audio_p2_r));
+ m_audiocpu->t0_in_cb().set(FUNC(spacefb_state::audio_t0_r));
+ m_audiocpu->t1_in_cb().set(FUNC(spacefb_state::audio_t1_r));
MCFG_QUANTUM_TIME(attotime::from_hz(180))
-
/* video hardware */
-
MCFG_SCREEN_ADD("screen", RASTER)
MCFG_SCREEN_RAW_PARAMS(SPACEFB_PIXEL_CLOCK, SPACEFB_HTOTAL, SPACEFB_HBEND, SPACEFB_HBSTART, SPACEFB_VTOTAL, SPACEFB_VBEND, SPACEFB_VBSTART)
MCFG_SCREEN_UPDATE_DRIVER(spacefb_state, screen_update)
diff --git a/src/mame/drivers/spcforce.cpp b/src/mame/drivers/spcforce.cpp
index beb5b84f011..306b0abb6cb 100644
--- a/src/mame/drivers/spcforce.cpp
+++ b/src/mame/drivers/spcforce.cpp
@@ -39,7 +39,6 @@ TODO:
#include "includes/spcforce.h"
#include "cpu/i8085/i8085.h"
-#include "cpu/mcs48/mcs48.h"
#include "machine/gen_latch.h"
#include "emupal.h"
#include "screen.h"
@@ -58,7 +57,7 @@ void spcforce_state::machine_start()
save_item(NAME(m_irq_mask));
}
-WRITE8_MEMBER(spcforce_state::SN76496_latch_w)
+WRITE8_MEMBER(spcforce_state::sn76496_latch_w)
{
m_sn76496_latch = data;
}
@@ -78,22 +77,22 @@ WRITE_LINE_MEMBER(spcforce_state::write_sn3_ready)
m_sn3_ready = state;
}
-READ8_MEMBER(spcforce_state::SN76496_select_r)
+READ8_MEMBER(spcforce_state::sn76496_select_r)
{
- if (~m_sn76496_select & 0x40) return m_sn1_ready;
- if (~m_sn76496_select & 0x20) return m_sn2_ready;
- if (~m_sn76496_select & 0x10) return m_sn3_ready;
+ if (!BIT(m_sn76496_select, 6)) return m_sn1_ready;
+ if (!BIT(m_sn76496_select, 5)) return m_sn2_ready;
+ if (!BIT(m_sn76496_select, 4)) return m_sn3_ready;
return 0;
}
-WRITE8_MEMBER(spcforce_state::SN76496_select_w)
+WRITE8_MEMBER(spcforce_state::sn76496_select_w)
{
m_sn76496_select = data;
- if (~data & 0x40) m_sn1->write(m_sn76496_latch);
- if (~data & 0x20) m_sn2->write(m_sn76496_latch);
- if (~data & 0x10) m_sn3->write(m_sn76496_latch);
+ if (!BIT(data, 6)) m_sn1->write(m_sn76496_latch);
+ if (!BIT(data, 5)) m_sn2->write(m_sn76496_latch);
+ if (!BIT(data, 4)) m_sn3->write(m_sn76496_latch);
}
READ_LINE_MEMBER(spcforce_state::t0_r)
@@ -291,13 +290,13 @@ MACHINE_CONFIG_START(spcforce_state::spcforce)
MCFG_DEVICE_PROGRAM_MAP(spcforce_map)
MCFG_DEVICE_VBLANK_INT_DRIVER("screen", spcforce_state, vblank_irq)
- MCFG_DEVICE_ADD("audiocpu", I8035, 6144000) /* divisor ??? */
- MCFG_DEVICE_PROGRAM_MAP(spcforce_sound_map)
- MCFG_MCS48_PORT_BUS_IN_CB(READ8("soundlatch", generic_latch_8_device, read))
- MCFG_MCS48_PORT_P1_OUT_CB(WRITE8(*this, spcforce_state, SN76496_latch_w))
- MCFG_MCS48_PORT_P2_IN_CB(READ8(*this, spcforce_state, SN76496_select_r))
- MCFG_MCS48_PORT_P2_OUT_CB(WRITE8(*this, spcforce_state, SN76496_select_w))
- MCFG_MCS48_PORT_T0_IN_CB(READLINE(*this, spcforce_state, t0_r))
+ I8035(config, m_audiocpu, 6144000); /* divisor ??? */
+ m_audiocpu->set_addrmap(AS_PROGRAM, &spcforce_state::spcforce_sound_map);
+ m_audiocpu->bus_in_cb().set("soundlatch", FUNC(generic_latch_8_device::read));
+ m_audiocpu->p1_out_cb().set(FUNC(spcforce_state::sn76496_latch_w));
+ m_audiocpu->p2_in_cb().set(FUNC(spcforce_state::sn76496_select_r));
+ m_audiocpu->p2_out_cb().set(FUNC(spcforce_state::sn76496_select_w));
+ m_audiocpu->t0_in_cb().set(FUNC(spcforce_state::t0_r));
LS259(config, m_mainlatch);
m_mainlatch->q_out_cb<3>().set(FUNC(spcforce_state::flip_screen_w));
diff --git a/src/mame/drivers/supstarf.cpp b/src/mame/drivers/supstarf.cpp
index 98477550199..6c6f0cbd1b4 100644
--- a/src/mame/drivers/supstarf.cpp
+++ b/src/mame/drivers/supstarf.cpp
@@ -49,7 +49,7 @@ private:
virtual void machine_start() override;
required_device<cpu_device> m_maincpu;
- required_device<cpu_device> m_soundcpu;
+ required_device<i8035_device> m_soundcpu;
required_device_array<ay8910_device, 2> m_psg;
required_device_array<i8212_device, 2> m_soundlatch;
@@ -180,12 +180,12 @@ MACHINE_CONFIG_START(supstarf_state::supstarf)
MCFG_I8085A_SID(READLINE(*this, supstarf_state, contacts_r))
MCFG_I8085A_SOD(WRITELINE(*this, supstarf_state, displays_w))
- MCFG_DEVICE_ADD("soundcpu", I8035, XTAL(5'068'800) / 2) // from 8085 pin 37 (CLK OUT)
- MCFG_DEVICE_PROGRAM_MAP(sound_map)
- MCFG_DEVICE_IO_MAP(sound_io_map)
- MCFG_MCS48_PORT_P1_OUT_CB(WRITE8(*this, supstarf_state, port1_w))
- MCFG_MCS48_PORT_P2_OUT_CB(WRITE8(*this, supstarf_state, port2_w))
- MCFG_MCS48_PORT_T1_IN_CB(READLINE(*this, supstarf_state, phase_detect_r))
+ I8035(config, m_soundcpu, XTAL(5'068'800) / 2); // from 8085 pin 37 (CLK OUT)
+ m_soundcpu->set_addrmap(AS_PROGRAM, &supstarf_state::sound_map);
+ m_soundcpu->set_addrmap(AS_IO, &supstarf_state::sound_io_map);
+ m_soundcpu->p1_out_cb().set(FUNC(supstarf_state::port1_w));
+ m_soundcpu->p2_out_cb().set(FUNC(supstarf_state::port2_w));
+ m_soundcpu->t1_in_cb().set(FUNC(supstarf_state::phase_detect_r));
I8212(config, m_soundlatch[0], 0);
m_soundlatch[0]->md_rd_callback().set_constant(0);
diff --git a/src/mame/drivers/tnzs.cpp b/src/mame/drivers/tnzs.cpp
index eed341491d0..c68036d6914 100644
--- a/src/mame/drivers/tnzs.cpp
+++ b/src/mame/drivers/tnzs.cpp
@@ -1566,12 +1566,12 @@ MACHINE_CONFIG_END
MACHINE_CONFIG_START(tnzs_mcu_state::tnzs)
tnzs_base(config);
- MCFG_DEVICE_ADD("mcu", I8742, 12000000/2) /* 400KHz ??? - Main board Crystal is 12MHz */
- MCFG_MCS48_PORT_P1_IN_CB(READ8(*this, tnzs_mcu_state, mcu_port1_r))
- MCFG_MCS48_PORT_P2_IN_CB(READ8(*this, tnzs_mcu_state, mcu_port2_r))
- MCFG_MCS48_PORT_P2_OUT_CB(WRITE8(*this, tnzs_mcu_state, mcu_port2_w))
- MCFG_MCS48_PORT_T0_IN_CB(IOPORT("COIN1"))
- MCFG_MCS48_PORT_T1_IN_CB(IOPORT("COIN2"))
+ I8742(config, m_mcu, 12000000/2); /* 400KHz ??? - Main board Crystal is 12MHz */
+ m_mcu->p1_in_cb().set(FUNC(tnzs_mcu_state::mcu_port1_r));
+ m_mcu->p2_in_cb().set(FUNC(tnzs_mcu_state::mcu_port2_r));
+ m_mcu->p2_out_cb().set(FUNC(tnzs_mcu_state::mcu_port2_w));
+ m_mcu->t0_in_cb().set_ioport("COIN1");
+ m_mcu->t1_in_cb().set_ioport("COIN2");
MCFG_DEVICE_MODIFY("sub")
MCFG_DEVICE_PROGRAM_MAP(tnzs_sub_map)
diff --git a/src/mame/drivers/vega.cpp b/src/mame/drivers/vega.cpp
index b5211ac654a..8307949947a 100644
--- a/src/mame/drivers/vega.cpp
+++ b/src/mame/drivers/vega.cpp
@@ -122,7 +122,7 @@ public:
void init_vega();
private:
- required_device<cpu_device> m_maincpu;
+ required_device<i8035_device> m_maincpu;
required_device<i8255_device> m_i8255;
required_device<ins8154_device> m_ins8154;
required_device<ay8910_device> m_ay8910;
@@ -799,16 +799,17 @@ void vega_state::machine_start()
}
-MACHINE_CONFIG_START(vega_state::vega)
- MCFG_DEVICE_ADD("maincpu", I8035, 4000000)
- MCFG_DEVICE_PROGRAM_MAP(vega_map)
- MCFG_DEVICE_IO_MAP(vega_io_map)
- MCFG_MCS48_PORT_P1_IN_CB(IOPORT("DSW"))
- MCFG_MCS48_PORT_P1_OUT_CB(WRITE8(*this, vega_state, rombank_w))
- MCFG_MCS48_PORT_P2_IN_CB(READ8(*this, vega_state, p2_r))
- MCFG_MCS48_PORT_P2_OUT_CB(WRITE8(*this, vega_state, p2_w))
- MCFG_MCS48_PORT_T1_IN_CB(READLINE(*this, vega_state, t1_r))
- MCFG_MCS48_PORT_PROG_OUT_CB(NOOP) /* prog - inputs CLK */
+void vega_state::vega(machine_config &config)
+{
+ I8035(config, m_maincpu, 4000000);
+ m_maincpu->set_addrmap(AS_PROGRAM, &vega_state::vega_map);
+ m_maincpu->set_addrmap(AS_IO, &vega_state::vega_io_map);
+ m_maincpu->p1_in_cb().set_ioport("DSW");
+ m_maincpu->p1_out_cb().set(FUNC(vega_state::rombank_w));
+ m_maincpu->p2_in_cb().set(FUNC(vega_state::p2_r));
+ m_maincpu->p2_out_cb().set(FUNC(vega_state::p2_w));
+ m_maincpu->t1_in_cb().set(FUNC(vega_state::t1_r));
+ m_maincpu->prog_out_cb().set_nop(); /* prog - inputs CLK */
I8255A(config, m_i8255);
m_i8255->in_pa_callback().set(FUNC(vega_state::txtram_r));
@@ -839,7 +840,6 @@ MACHINE_CONFIG_START(vega_state::vega)
GFXDECODE(config, "gfxdecode", "palette", gfx_test_decode);
/* sound hardware */
-
SPEAKER(config, "mono").front_center();
AY8910(config, m_ay8910, 1500000);
@@ -848,8 +848,7 @@ MACHINE_CONFIG_START(vega_state::vega)
m_ay8910->port_a_write_callback().set(FUNC(vega_state::ay8910_pa_w));
m_ay8910->port_b_write_callback().set(FUNC(vega_state::ay8910_pb_w));
m_ay8910->add_route(ALL_OUTPUTS, "mono", 0.50);
-
-MACHINE_CONFIG_END
+}
ROM_START( vega )
ROM_REGION( 0x01000, "mb0", 0 )
diff --git a/src/mame/drivers/videopkr.cpp b/src/mame/drivers/videopkr.cpp
index bbdea1f53b6..ab574b917b6 100644
--- a/src/mame/drivers/videopkr.cpp
+++ b/src/mame/drivers/videopkr.cpp
@@ -1240,24 +1240,23 @@ void videopkr_state::machine_start()
MACHINE_CONFIG_START(videopkr_state::videopkr)
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", I8039, CPU_CLOCK)
- MCFG_DEVICE_PROGRAM_MAP(i8039_map)
- MCFG_DEVICE_IO_MAP(i8039_io_port)
- MCFG_MCS48_PORT_P1_IN_CB(READ8(*this, videopkr_state, videopkr_p1_data_r))
- MCFG_MCS48_PORT_P1_OUT_CB(WRITE8(*this, videopkr_state, videopkr_p1_data_w))
- MCFG_MCS48_PORT_P2_IN_CB(READ8(*this, videopkr_state, videopkr_p2_data_r))
- MCFG_MCS48_PORT_P2_OUT_CB(WRITE8(*this, videopkr_state, videopkr_p2_data_w))
- MCFG_MCS48_PORT_PROG_OUT_CB(WRITELINE(*this, videopkr_state, prog_w))
- MCFG_MCS48_PORT_T0_IN_CB(READLINE(*this, videopkr_state, videopkr_t0_latch))
-
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", videopkr_state, irq0_line_assert)
-
- MCFG_DEVICE_ADD("soundcpu", I8039, SOUND_CLOCK)
- MCFG_DEVICE_PROGRAM_MAP(i8039_sound_mem)
- MCFG_DEVICE_IO_MAP(i8039_sound_port)
- MCFG_MCS48_PORT_P1_OUT_CB(WRITE8("dac", dac_byte_interface, data_w))
- MCFG_MCS48_PORT_P2_IN_CB(READ8(*this, videopkr_state, sound_p2_r))
- MCFG_MCS48_PORT_P2_OUT_CB(WRITE8(*this, videopkr_state, sound_p2_w))
+ i8039_device &maincpu(I8039(config, m_maincpu, CPU_CLOCK));
+ maincpu.set_addrmap(AS_PROGRAM, &videopkr_state::i8039_map);
+ maincpu.set_addrmap(AS_IO, &videopkr_state::i8039_io_port);
+ maincpu.p1_in_cb().set(FUNC(videopkr_state::videopkr_p1_data_r));
+ maincpu.p1_out_cb().set(FUNC(videopkr_state::videopkr_p1_data_w));
+ maincpu.p2_in_cb().set(FUNC(videopkr_state::videopkr_p2_data_r));
+ maincpu.p2_out_cb().set(FUNC(videopkr_state::videopkr_p2_data_w));
+ maincpu.prog_out_cb().set(FUNC(videopkr_state::prog_w));
+ maincpu.t0_in_cb().set(FUNC(videopkr_state::videopkr_t0_latch));
+ maincpu.set_vblank_int("screen", FUNC(videopkr_state::irq0_line_assert));
+
+ i8039_device &soundcpu(I8039(config, m_soundcpu, SOUND_CLOCK));
+ soundcpu.set_addrmap(AS_PROGRAM, &videopkr_state::i8039_sound_mem);
+ soundcpu.set_addrmap(AS_IO, &videopkr_state::i8039_sound_port);
+ soundcpu.p1_out_cb().set("dac", FUNC(dac_byte_interface::data_w));
+ soundcpu.p2_in_cb().set(FUNC(videopkr_state::sound_p2_r));
+ soundcpu.p2_out_cb().set(FUNC(videopkr_state::sound_p2_w));
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
@@ -1265,10 +1264,8 @@ MACHINE_CONFIG_START(videopkr_state::videopkr)
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
-
MCFG_SCREEN_SIZE(32*8, 32*8)
MCFG_SCREEN_VISIBLE_AREA(5*8, 31*8-1, 3*8, 29*8-1)
-
MCFG_SCREEN_REFRESH_RATE(60)
MCFG_SCREEN_VBLANK_TIME(2080)
MCFG_SCREEN_UPDATE_DRIVER(videopkr_state, screen_update_videopkr)
@@ -1302,8 +1299,7 @@ MACHINE_CONFIG_START(videopkr_state::videodad)
videopkr(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_CLOCK(CPU_CLOCK_ALT)
+ m_maincpu->set_clock(CPU_CLOCK_ALT);
/* video hardware */
MCFG_SCREEN_MODIFY("screen")
@@ -1319,17 +1315,17 @@ MACHINE_CONFIG_START(videopkr_state::babypkr)
videopkr(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_CLOCK(CPU_CLOCK_ALT)
+ m_maincpu->set_clock(CPU_CLOCK_ALT);
+
/* most likely romless or eprom */
- MCFG_DEVICE_REPLACE("soundcpu", I8031, CPU_CLOCK )
- MCFG_DEVICE_PROGRAM_MAP(i8051_sound_mem)
- MCFG_DEVICE_IO_MAP(i8051_sound_port)
- MCFG_MCS51_PORT_P0_IN_CB(READ8(*this, videopkr_state, baby_sound_p0_r))
- MCFG_MCS51_PORT_P0_OUT_CB(WRITE8(*this, videopkr_state, baby_sound_p0_w))
- MCFG_MCS51_PORT_P1_IN_CB(READ8(*this, videopkr_state, baby_sound_p1_r))
- MCFG_MCS51_PORT_P2_OUT_CB(WRITE8("dac", dac_byte_interface, data_w))
- MCFG_MCS51_PORT_P3_OUT_CB(WRITE8(*this, videopkr_state, baby_sound_p3_w))
+ i8031_device &soundcpu(I8031(config.replace(), m_soundcpu, CPU_CLOCK));
+ soundcpu.set_addrmap(AS_PROGRAM, &videopkr_state::i8051_sound_mem);
+ soundcpu.set_addrmap(AS_IO, &videopkr_state::i8051_sound_port);
+ soundcpu.port_in_cb<0>().set(FUNC(videopkr_state::baby_sound_p0_r));
+ soundcpu.port_out_cb<0>().set(FUNC(videopkr_state::baby_sound_p0_w));
+ soundcpu.port_in_cb<1>().set(FUNC(videopkr_state::baby_sound_p1_r));
+ soundcpu.port_out_cb<2>().set("dac", FUNC(dac_byte_interface::data_w));
+ soundcpu.port_out_cb<3>().set(FUNC(videopkr_state::baby_sound_p3_w));
/* video hardware */
MCFG_SCREEN_MODIFY("screen")
@@ -1348,8 +1344,7 @@ MACHINE_CONFIG_START(videopkr_state::fortune1)
videopkr(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_CLOCK(CPU_CLOCK_ALT)
+ m_maincpu->set_clock(CPU_CLOCK_ALT);
MCFG_PALETTE_MODIFY("palette")
MCFG_PALETTE_INIT_OWNER(videopkr_state,fortune1)
@@ -1357,12 +1352,12 @@ MACHINE_CONFIG_END
MACHINE_CONFIG_START(videopkr_state::bpoker)
babypkr(config);
- MCFG_DEVICE_REPLACE("maincpu", I8751, XTAL(6'000'000))
- MCFG_DEVICE_PROGRAM_MAP(i8751_map)
- MCFG_DEVICE_IO_MAP(i8751_io_port)
- MCFG_MCS51_PORT_P0_IN_CB(CONSTANT(0)) // ???
- MCFG_MCS51_PORT_P1_IN_CB(CONSTANT(0)) // ???
- MCFG_MCS51_PORT_P1_OUT_CB(NOOP) // ???
+ i8751_device &maincpu(I8751(config.replace(), m_maincpu, XTAL(6'000'000)));
+ maincpu.set_addrmap(AS_PROGRAM, &videopkr_state::i8751_map);
+ maincpu.set_addrmap(AS_IO, &videopkr_state::i8751_io_port);
+ maincpu.port_in_cb<0>().set_constant(0); // ???
+ maincpu.port_in_cb<1>().set_constant(0); // ???
+ maincpu.port_out_cb<1>().set_nop(); // ???
I8255A(config, "ppi");
//ppi.out_pa_callback()
diff --git a/src/mame/drivers/vp415.cpp b/src/mame/drivers/vp415.cpp
index a068930c37a..2708b42affc 100644
--- a/src/mame/drivers/vp415.cpp
+++ b/src/mame/drivers/vp415.cpp
@@ -495,12 +495,12 @@ MACHINE_CONFIG_START(vp415_state::vp415)
MCFG_DEVICE_PROGRAM_MAP(z80_program_map)
MCFG_DEVICE_IO_MAP(z80_io_map)
- MCFG_DEVICE_ADD(DATAMCU_TAG, I8041, XTAL(4'000'000)) // Verified on schematic
- MCFG_MCS48_PORT_P1_IN_CB(READ8(*this, vp415_state, data_mcu_port1_r));
- MCFG_MCS48_PORT_P1_OUT_CB(WRITE8(*this, vp415_state, data_mcu_port1_w));
- MCFG_MCS48_PORT_P2_IN_CB(READ8(*this, vp415_state, data_mcu_port2_r));
- MCFG_MCS48_PORT_P2_OUT_CB(WRITE8(*this, vp415_state, data_mcu_port2_w));
- MCFG_DEVICE_PROGRAM_MAP(datamcu_program_map)
+ I8041(config, m_datamcu, XTAL(4'000'000)); // Verified on schematic
+ m_datamcu->p1_in_cb().set(FUNC(vp415_state::data_mcu_port1_r));
+ m_datamcu->p1_out_cb().set(FUNC(vp415_state::data_mcu_port1_w));
+ m_datamcu->p2_in_cb().set(FUNC(vp415_state::data_mcu_port2_r));
+ m_datamcu->p2_out_cb().set(FUNC(vp415_state::data_mcu_port2_w));
+ m_datamcu->set_addrmap(AS_PROGRAM, &vp415_state::datamcu_program_map);
MCFG_DEVICE_ADD(SCSI_TAG, NCR5385, XTAL(8'000'000)/2) // Same clock signal as above, per schematic
MCFG_NCR5385_INT_CB(WRITELINE(*this, vp415_state, cpu_int1_w))
@@ -514,12 +514,12 @@ MACHINE_CONFIG_START(vp415_state::vp415)
MCFG_DEVICE_PROGRAM_MAP(ctrl_program_map)
MCFG_DEVICE_IO_MAP(ctrl_io_map)
- MCFG_DEVICE_ADD(CTRLMCU_TAG, I8041, XTAL(4'000'000)) // Verified on schematic
- MCFG_MCS48_PORT_P1_IN_CB(READ8(*this, vp415_state, ctrl_mcu_port1_r));
- MCFG_MCS48_PORT_P1_OUT_CB(WRITE8(*this, vp415_state, ctrl_mcu_port1_w));
- MCFG_MCS48_PORT_P2_IN_CB(READ8(*this, vp415_state, ctrl_mcu_port2_r));
- MCFG_MCS48_PORT_P2_OUT_CB(WRITE8(*this, vp415_state, ctrl_mcu_port2_w));
- MCFG_DEVICE_PROGRAM_MAP(ctrlmcu_program_map)
+ I8041(config, m_ctrlmcu, XTAL(4'000'000)); // Verified on schematic
+ m_ctrlmcu->p1_in_cb().set(FUNC(vp415_state::ctrl_mcu_port1_r));
+ m_ctrlmcu->p1_out_cb().set(FUNC(vp415_state::ctrl_mcu_port1_w));
+ m_ctrlmcu->p2_in_cb().set(FUNC(vp415_state::ctrl_mcu_port2_r));
+ m_ctrlmcu->p2_out_cb().set(FUNC(vp415_state::ctrl_mcu_port2_w));
+ m_ctrlmcu->set_addrmap(AS_PROGRAM, &vp415_state::ctrlmcu_program_map);
// Module R: Drive
MCFG_DEVICE_ADD(DRIVECPU_TAG, I8031, XTAL(12'000'000)) // 12MHz, per schematic
diff --git a/src/mame/includes/advision.h b/src/mame/includes/advision.h
index 6fc4f70231d..d98595643d5 100644
--- a/src/mame/includes/advision.h
+++ b/src/mame/includes/advision.h
@@ -10,9 +10,10 @@
#pragma once
-#include "sound/dac.h"
#include "bus/generic/slot.h"
#include "bus/generic/carts.h"
+#include "cpu/mcs48/mcs48.h"
+#include "sound/dac.h"
#include "emupal.h"
#define SCREEN_TAG "screen"
@@ -33,7 +34,7 @@ public:
, m_palette(*this, "palette")
{ }
- required_device<cpu_device> m_maincpu;
+ required_device<i8048_device> m_maincpu;
required_device<cpu_device> m_soundcpu;
required_device<dac_byte_interface> m_dac;
required_device<generic_slot_device> m_cart;
diff --git a/src/mame/includes/dkong.h b/src/mame/includes/dkong.h
index 59d117b4c83..ed5578a8174 100644
--- a/src/mame/includes/dkong.h
+++ b/src/mame/includes/dkong.h
@@ -11,6 +11,7 @@
#pragma once
#include "cpu/m6502/n2a03.h"
+#include "cpu/mcs48/mcs48.h"
#include "machine/eepromser.h"
#include "machine/i8257.h"
#include "machine/latch8.h"
@@ -172,7 +173,7 @@ public:
private:
/* devices */
required_device<cpu_device> m_maincpu;
- optional_device<cpu_device> m_soundcpu;
+ optional_device<mcs48_cpu_device> m_soundcpu;
optional_device<eeprom_serial_93cxx_device> m_eeprom;
optional_device<n2a03_device> m_dev_n2a03a; /* dkong3 */
optional_device<n2a03_device> m_dev_n2a03b; /* dkong3 */
diff --git a/src/mame/includes/finalizr.h b/src/mame/includes/finalizr.h
index 15af5a71bcd..7c67ae3c466 100644
--- a/src/mame/includes/finalizr.h
+++ b/src/mame/includes/finalizr.h
@@ -10,6 +10,7 @@
#pragma once
+#include "cpu/mcs48/mcs48.h"
#include "machine/timer.h"
#include "emupal.h"
@@ -36,7 +37,7 @@ public:
private:
/* devices */
required_device<cpu_device> m_maincpu;
- required_device<cpu_device> m_audiocpu;
+ required_device<i8039_device> m_audiocpu;
required_device<gfxdecode_device> m_gfxdecode;
required_device<palette_device> m_palette;
@@ -64,8 +65,8 @@ private:
DECLARE_WRITE8_MEMBER(finalizr_flipscreen_w);
DECLARE_WRITE8_MEMBER(finalizr_i8039_irq_w);
DECLARE_WRITE8_MEMBER(i8039_irqen_w);
- DECLARE_READ_LINE_MEMBER(i8039_T1_r);
- DECLARE_WRITE8_MEMBER(i8039_T0_w);
+ DECLARE_READ_LINE_MEMBER(i8039_t1_r);
+ DECLARE_WRITE8_MEMBER(i8039_t0_w);
DECLARE_WRITE8_MEMBER(finalizr_videoctrl_w);
TILE_GET_INFO_MEMBER(get_bg_tile_info);
TILE_GET_INFO_MEMBER(get_fg_tile_info);
diff --git a/src/mame/includes/gyruss.h b/src/mame/includes/gyruss.h
index c30b4041bd5..ba561d9bedd 100644
--- a/src/mame/includes/gyruss.h
+++ b/src/mame/includes/gyruss.h
@@ -10,6 +10,7 @@
#pragma once
+#include "cpu/mcs48/mcs48.h"
#include "sound/discrete.h"
#include "emupal.h"
#include "screen.h"
@@ -41,7 +42,7 @@ private:
required_device<cpu_device> m_maincpu;
required_device<cpu_device> m_subcpu;
required_device<cpu_device> m_audiocpu;
- required_device<cpu_device> m_audiocpu_2;
+ required_device<i8039_device> m_audiocpu_2;
required_device<discrete_device> m_discrete;
required_shared_ptr<uint8_t> m_colorram;
required_shared_ptr<uint8_t> m_videoram;
diff --git a/src/mame/includes/megazone.h b/src/mame/includes/megazone.h
index b29132f065c..52a45854efc 100644
--- a/src/mame/includes/megazone.h
+++ b/src/mame/includes/megazone.h
@@ -10,6 +10,7 @@
#pragma once
+#include "cpu/mcs48/mcs48.h"
#include "sound/flt_rc.h"
#include "emupal.h"
@@ -55,7 +56,7 @@ private:
/* devices */
required_device<cpu_device> m_maincpu;
required_device<cpu_device> m_audiocpu;
- required_device<cpu_device> m_daccpu;
+ required_device<i8039_device> m_daccpu;
required_device<gfxdecode_device> m_gfxdecode;
required_device<palette_device> m_palette;
required_device_array<filter_rc_device, 3> m_filter;
diff --git a/src/mame/includes/n8080.h b/src/mame/includes/n8080.h
index 2bfa98ba5d1..891907c4d24 100644
--- a/src/mame/includes/n8080.h
+++ b/src/mame/includes/n8080.h
@@ -65,7 +65,7 @@ private:
/* devices */
required_device<cpu_device> m_maincpu;
- required_device<cpu_device> m_audiocpu;
+ required_device<i8035_device> m_audiocpu;
optional_device<dac_bit_interface> m_n8080_dac;
optional_device<dac_8bit_r2r_device> m_helifire_dac;
optional_device<sn76477_device> m_sn;
diff --git a/src/mame/includes/pandoras.h b/src/mame/includes/pandoras.h
index 6b19c1d1ff7..08ada3b1b0b 100644
--- a/src/mame/includes/pandoras.h
+++ b/src/mame/includes/pandoras.h
@@ -10,6 +10,7 @@
#pragma once
+#include "cpu/mcs48/mcs48.h"
#include "emupal.h"
class pandoras_state : public driver_device
@@ -47,7 +48,7 @@ public:
required_device<cpu_device> m_maincpu;
required_device<cpu_device> m_subcpu;
required_device<cpu_device> m_audiocpu;
- required_device<cpu_device> m_mcu;
+ required_device<i8039_device> m_mcu;
required_device<gfxdecode_device> m_gfxdecode;
required_device<palette_device> m_palette;
diff --git a/src/mame/includes/pcw.h b/src/mame/includes/pcw.h
index 8724463889b..138d4a4b703 100644
--- a/src/mame/includes/pcw.h
+++ b/src/mame/includes/pcw.h
@@ -10,6 +10,7 @@
#pragma once
+#include "cpu/mcs48/mcs48.h"
#include "imagedev/floppy.h"
#include "machine/upd765.h"
#include "machine/ram.h"
@@ -36,6 +37,8 @@ public:
pcw_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag)
, m_maincpu(*this, "maincpu")
+ , m_printer_mcu(*this, "printer_mcu")
+ , m_keyboard_mcu(*this, "keyboard_mcu")
, m_fdc(*this, "upd765")
, m_floppy(*this, "upd765:%u", 0U)
, m_ram(*this, RAM_TAG)
@@ -126,6 +129,8 @@ public:
DECLARE_WRITE_LINE_MEMBER( pcw_fdc_interrupt );
required_device<cpu_device> m_maincpu;
+ required_device<i8041_device> m_printer_mcu;
+ required_device<i8048_device> m_keyboard_mcu;
required_device<upd765a_device> m_fdc;
required_device_array<floppy_connector, 2> m_floppy;
required_device<ram_device> m_ram;
diff --git a/src/mame/includes/spacefb.h b/src/mame/includes/spacefb.h
index 279181d514c..22deee4b971 100644
--- a/src/mame/includes/spacefb.h
+++ b/src/mame/includes/spacefb.h
@@ -5,6 +5,13 @@
Space Firebird hardware
****************************************************************************/
+
+#ifndef MAME_INCLUDES_SPACEFB
+#define MAME_INCLUDES_SPACEFB
+
+#pragma once
+
+#include "cpu/mcs48/mcs48.h"
#include "sound/samples.h"
#include "screen.h"
/*
@@ -48,7 +55,7 @@ private:
};
required_device<cpu_device> m_maincpu;
- required_device<cpu_device> m_audiocpu;
+ required_device<i8035_device> m_audiocpu;
required_device<samples_device> m_samples;
required_device<screen_device> m_screen;
@@ -92,3 +99,5 @@ private:
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
};
+
+#endif // MAME_INCLUDES_SPACEFB \ No newline at end of file
diff --git a/src/mame/includes/spcforce.h b/src/mame/includes/spcforce.h
index 0ec5c8316e0..c53add56e7a 100644
--- a/src/mame/includes/spcforce.h
+++ b/src/mame/includes/spcforce.h
@@ -5,6 +5,7 @@
#pragma once
+#include "cpu/mcs48/mcs48.h"
#include "machine/74259.h"
#include "sound/sn76496.h"
#include "emupal.h"
@@ -35,9 +36,9 @@ protected:
virtual void machine_start() override;
private:
- DECLARE_WRITE8_MEMBER(SN76496_latch_w);
- DECLARE_READ8_MEMBER(SN76496_select_r);
- DECLARE_WRITE8_MEMBER(SN76496_select_w);
+ DECLARE_WRITE8_MEMBER(sn76496_latch_w);
+ DECLARE_READ8_MEMBER(sn76496_select_r);
+ DECLARE_WRITE8_MEMBER(sn76496_select_w);
DECLARE_WRITE_LINE_MEMBER(write_sn1_ready);
DECLARE_WRITE_LINE_MEMBER(write_sn2_ready);
DECLARE_WRITE_LINE_MEMBER(write_sn3_ready);
@@ -59,7 +60,7 @@ private:
required_device<cpu_device> m_maincpu;
required_device<ls259_device> m_mainlatch;
- required_device<cpu_device> m_audiocpu;
+ required_device<i8035_device> m_audiocpu;
required_device<gfxdecode_device> m_gfxdecode;
required_device<palette_device> m_palette;
required_device<sn76496_device> m_sn1;
diff --git a/src/mame/includes/vicdual.h b/src/mame/includes/vicdual.h
index 81abc7fee7a..a363a6d0a3c 100644
--- a/src/mame/includes/vicdual.h
+++ b/src/mame/includes/vicdual.h
@@ -85,7 +85,7 @@ public:
protected:
required_device<cpu_device> m_maincpu;
- optional_device<cpu_device> m_audiocpu;
+ optional_device<i8039_device> m_audiocpu;
optional_device<ay8910_device> m_psg;
optional_device<samples_device> m_samples;
optional_device<discrete_device> m_discrete;
diff --git a/src/mame/machine/compiskb.cpp b/src/mame/machine/compiskb.cpp
index b468009a07b..e3fc90f7e4f 100644
--- a/src/mame/machine/compiskb.cpp
+++ b/src/mame/machine/compiskb.cpp
@@ -9,8 +9,6 @@
#include "emu.h"
#include "compiskb.h"
-#include "cpu/mcs48/mcs48.h"
-
#include "speaker.h"
@@ -55,20 +53,20 @@ const tiny_rom_entry *compis_keyboard_device::device_rom_region() const
// device_add_mconfig - add device configuration
//-------------------------------------------------
-MACHINE_CONFIG_START(compis_keyboard_device::device_add_mconfig)
- MCFG_DEVICE_ADD(I8748_TAG, I8748, 2016000) // XTAL(4'032'000)/2 ???
- MCFG_MCS48_PORT_BUS_IN_CB(READ8(*this, compis_keyboard_device, bus_r))
- MCFG_MCS48_PORT_BUS_OUT_CB(WRITE8(*this, compis_keyboard_device, bus_w))
- MCFG_MCS48_PORT_P1_IN_CB(READ8(*this, compis_keyboard_device, p1_r))
- MCFG_MCS48_PORT_P2_IN_CB(READ8(*this, compis_keyboard_device, p2_r))
- MCFG_MCS48_PORT_T0_IN_CB(CONSTANT(0)) // ???
- MCFG_MCS48_PORT_T1_IN_CB(CONSTANT(0)) // ???
+void compis_keyboard_device::device_add_mconfig(machine_config &config)
+{
+ I8748(config, m_maincpu, 2016000); // XTAL(4'032'000)/2 ???
+ m_maincpu->bus_in_cb().set(FUNC(compis_keyboard_device::bus_r));
+ m_maincpu->bus_out_cb().set(FUNC(compis_keyboard_device::bus_w));
+ m_maincpu->p1_in_cb().set(FUNC(compis_keyboard_device::p1_r));
+ m_maincpu->p2_in_cb().set(FUNC(compis_keyboard_device::p2_r));
+ m_maincpu->t0_in_cb().set_constant(0); // ???
+ m_maincpu->t1_in_cb().set_constant(0); // ???
// sound hardware
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD(SPEAKER_TAG, SPEAKER_SOUND)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
-MACHINE_CONFIG_END
+ SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 0.25);
+}
//-------------------------------------------------
diff --git a/src/mame/machine/compiskb.h b/src/mame/machine/compiskb.h
index 56f6f7f0a4f..c7dac7dd5eb 100644
--- a/src/mame/machine/compiskb.h
+++ b/src/mame/machine/compiskb.h
@@ -11,6 +11,7 @@
#pragma once
+#include "cpu/mcs48/mcs48.h"
#include "sound/spkrdev.h"
@@ -40,7 +41,7 @@ protected:
virtual ioport_constructor device_input_ports() const override;
private:
- required_device<cpu_device> m_maincpu;
+ required_device<i8748_device> m_maincpu;
required_device<speaker_sound_device> m_speaker;
required_ioport_array<9> m_y;
required_ioport m_special;
diff --git a/src/mame/machine/dmv_keyb.cpp b/src/mame/machine/dmv_keyb.cpp
index e1b69479883..39fed8fc437 100644
--- a/src/mame/machine/dmv_keyb.cpp
+++ b/src/mame/machine/dmv_keyb.cpp
@@ -227,12 +227,13 @@ void dmv_keyboard_device::device_reset()
// device_add_mconfig - add device configuration
//-------------------------------------------------
-MACHINE_CONFIG_START(dmv_keyboard_device::device_add_mconfig)
- MCFG_DEVICE_ADD("mcu", I8741, XTAL(6'000'000))
- MCFG_MCS48_PORT_P1_IN_CB(READ8(*this, dmv_keyboard_device, port1_r))
- MCFG_MCS48_PORT_P2_IN_CB(READ8(*this, dmv_keyboard_device, port2_r))
- MCFG_MCS48_PORT_P2_OUT_CB(WRITE8(*this, dmv_keyboard_device, port2_w))
-MACHINE_CONFIG_END
+void dmv_keyboard_device::device_add_mconfig(machine_config &config)
+{
+ I8741(config, m_maincpu, XTAL(6'000'000));
+ m_maincpu->p1_in_cb().set(FUNC(dmv_keyboard_device::port1_r));
+ m_maincpu->p2_in_cb().set(FUNC(dmv_keyboard_device::port2_r));
+ m_maincpu->p2_out_cb().set(FUNC(dmv_keyboard_device::port2_w));
+}
//-------------------------------------------------
diff --git a/src/mame/machine/dmv_keyb.h b/src/mame/machine/dmv_keyb.h
index 5b8e8b38ef5..bc343b37086 100644
--- a/src/mame/machine/dmv_keyb.h
+++ b/src/mame/machine/dmv_keyb.h
@@ -41,7 +41,7 @@ protected:
virtual ioport_constructor device_input_ports() const override;
private:
- required_device<upi41_cpu_device> m_maincpu;
+ required_device<i8741_device> m_maincpu;
required_ioport_array<16> m_keyboard;
uint8_t m_col;
diff --git a/src/mame/machine/ibm6580_fdc.cpp b/src/mame/machine/ibm6580_fdc.cpp
index b87fb8aba5c..556cc718ef2 100644
--- a/src/mame/machine/ibm6580_fdc.cpp
+++ b/src/mame/machine/ibm6580_fdc.cpp
@@ -3,9 +3,6 @@
#include "emu.h"
#include "ibm6580_fdc.h"
-#include "cpu/mcs48/mcs48.h"
-
-
#define VERBOSE_DBG 2 /* general debug messages */
#define DBG_LOG(N,M,A) \
@@ -32,23 +29,24 @@ const tiny_rom_entry *dw_fdc_device::device_rom_region() const
return ROM_NAME( dw_fdc );
}
-MACHINE_CONFIG_START(dw_fdc_device::device_add_mconfig)
- MCFG_DEVICE_ADD("mcu", I8048, XTAL(24'000'000)/4) // divisor is unverified
-// MCFG_MCS48_PORT_BUS_IN_CB(READ8(*this, dw_fdc_device, bus_r))
-// MCFG_MCS48_PORT_BUS_OUT_CB(WRITE8(*this, dw_fdc_device, bus_w))
- MCFG_MCS48_PORT_P1_OUT_CB(WRITE8(*this, dw_fdc_device, p1_w))
- MCFG_MCS48_PORT_P2_OUT_CB(WRITE8(*this, dw_fdc_device, p2_w))
-// MCFG_MCS48_PORT_T0_IN_CB(READLINE(*this, dw_fdc_device, t0_r))
- MCFG_MCS48_PORT_T1_IN_CB(READLINE(*this, dw_fdc_device, t1_r))
+void dw_fdc_device::device_add_mconfig(machine_config &config)
+{
+ I8048(config, m_mcu, XTAL(24'000'000)/4); // divisor is unverified
+// m_mcu->bus_in_cb().set(FUNC(dw_fdc_device::bus_r));
+// m_mcu->bus_out_cb().set(FUNC(dw_fdc_device::bus_w));
+ m_mcu->p1_out_cb().set(FUNC(dw_fdc_device::p1_w));
+ m_mcu->p2_out_cb().set(FUNC(dw_fdc_device::p2_w));
+// m_mcu->t0_in_cb().set(FUNC(dw_fdc_device::t0_r));
+ m_mcu->t1_in_cb().set(FUNC(dw_fdc_device::t1_r));
- MCFG_DEVICE_ADD("ppi8255", I8255, 0)
+ I8255(config, "ppi8255", 0);
UPD765A(config, "upd765", false, false);
// m_upd_fdc->intrq_wr_callback().set("pic8259", FUNC(pic8259_device::ir4_w));
// m_upd_fdc->drq_wr_callback().set("dma8257", FUNC(dma8257_device::XXX));
// MCFG_FLOPPY_DRIVE_ADD(UPD765_TAG ":0", wangpc_floppies, "525dd", wangpc_state::floppy_formats)
// MCFG_FLOPPY_DRIVE_ADD(UPD765_TAG ":1", wangpc_floppies, "525dd", wangpc_state::floppy_formats)
-MACHINE_CONFIG_END
+}
dw_fdc_device::dw_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
diff --git a/src/mame/machine/ibm6580_fdc.h b/src/mame/machine/ibm6580_fdc.h
index edf1a58ff6f..36cfbe9dd23 100644
--- a/src/mame/machine/ibm6580_fdc.h
+++ b/src/mame/machine/ibm6580_fdc.h
@@ -5,6 +5,7 @@
#pragma once
+#include "cpu/mcs48/mcs48.h"
#include "machine/i8255.h"
#include "machine/upd765.h"
@@ -36,7 +37,7 @@ private:
devcb_write_line m_out_data;
devcb_write_line m_out_clock;
devcb_write_line m_out_strobe;
- required_device<cpu_device> m_mcu;
+ required_device<i8048_device> m_mcu;
DECLARE_WRITE8_MEMBER(bus_w);
DECLARE_READ8_MEMBER(bus_r);
diff --git a/src/mame/machine/ibm6580_kbd.cpp b/src/mame/machine/ibm6580_kbd.cpp
index e9979aedc7a..e412388c8cb 100644
--- a/src/mame/machine/ibm6580_kbd.cpp
+++ b/src/mame/machine/ibm6580_kbd.cpp
@@ -3,9 +3,6 @@
#include "emu.h"
#include "ibm6580_kbd.h"
-#include "cpu/mcs48/mcs48.h"
-
-
#define VERBOSE_DBG 0 /* general debug messages */
#define DBG_LOG(N,M,A) \
@@ -32,16 +29,17 @@ const tiny_rom_entry *dw_keyboard_device::device_rom_region() const
return ROM_NAME( dw_keyboard );
}
-MACHINE_CONFIG_START(dw_keyboard_device::device_add_mconfig)
- MCFG_DEVICE_ADD("mcu", I8049, XTAL(6'000'000)) // XXX RC oscillator
- MCFG_MCS48_PORT_BUS_IN_CB(READ8(*this, dw_keyboard_device, bus_r))
- MCFG_MCS48_PORT_BUS_OUT_CB(WRITE8(*this, dw_keyboard_device, bus_w))
- MCFG_MCS48_PORT_P1_OUT_CB(WRITE8(*this, dw_keyboard_device, p1_w))
- MCFG_MCS48_PORT_P2_IN_CB(READ8(*this, dw_keyboard_device, p2_r))
- MCFG_MCS48_PORT_P2_OUT_CB(WRITE8(*this, dw_keyboard_device, p2_w))
- MCFG_MCS48_PORT_T0_IN_CB(READLINE(*this, dw_keyboard_device, t0_r))
- MCFG_MCS48_PORT_T1_IN_CB(READLINE(*this, dw_keyboard_device, t1_r))
-MACHINE_CONFIG_END
+void dw_keyboard_device::device_add_mconfig(machine_config &config)
+{
+ I8049(config, m_mcu, XTAL(6'000'000)); // XXX RC oscillator
+ m_mcu->bus_in_cb().set(FUNC(dw_keyboard_device::bus_r));
+ m_mcu->bus_out_cb().set(FUNC(dw_keyboard_device::bus_w));
+ m_mcu->p1_out_cb().set(FUNC(dw_keyboard_device::p1_w));
+ m_mcu->p2_in_cb().set(FUNC(dw_keyboard_device::p2_r));
+ m_mcu->p2_out_cb().set(FUNC(dw_keyboard_device::p2_w));
+ m_mcu->t0_in_cb().set(FUNC(dw_keyboard_device::t0_r));
+ m_mcu->t1_in_cb().set(FUNC(dw_keyboard_device::t1_r));
+}
INPUT_PORTS_START( dw_keyboard )
diff --git a/src/mame/machine/ibm6580_kbd.h b/src/mame/machine/ibm6580_kbd.h
index 4796503ba58..94ce31a3032 100644
--- a/src/mame/machine/ibm6580_kbd.h
+++ b/src/mame/machine/ibm6580_kbd.h
@@ -5,6 +5,7 @@
#pragma once
+#include "cpu/mcs48/mcs48.h"
class dw_keyboard_device : public device_t
{
@@ -37,7 +38,7 @@ private:
devcb_write_line m_out_data;
devcb_write_line m_out_clock;
devcb_write_line m_out_strobe;
- required_device<cpu_device> m_mcu;
+ required_device<i8049_device> m_mcu;
DECLARE_WRITE8_MEMBER(bus_w);
DECLARE_READ8_MEMBER(bus_r);
diff --git a/src/mame/machine/kay_kbd.cpp b/src/mame/machine/kay_kbd.cpp
index dcdc9c265b6..7a4e791a178 100644
--- a/src/mame/machine/kay_kbd.cpp
+++ b/src/mame/machine/kay_kbd.cpp
@@ -11,7 +11,6 @@
#include "emu.h"
#include "machine/kay_kbd.h"
-#include "cpu/mcs48/mcs48.h"
#include "speaker.h"
#define LOG_GENERAL (1U << 0)
@@ -350,19 +349,19 @@ tiny_rom_entry const *kaypro_10_keyboard_device::device_rom_region() const
return ROM_NAME(kaypro_10_keyboard);
}
-MACHINE_CONFIG_START(kaypro_10_keyboard_device::device_add_mconfig)
- MCFG_DEVICE_ADD("mcu", I8049, 6_MHz_XTAL)
- MCFG_MCS48_PORT_P1_IN_CB(READ8(*this, kaypro_10_keyboard_device, p1_r))
- MCFG_MCS48_PORT_P2_IN_CB(READ8(*this, kaypro_10_keyboard_device, p2_r))
- MCFG_MCS48_PORT_P2_OUT_CB(WRITE8(*this, kaypro_10_keyboard_device, p2_w))
- MCFG_MCS48_PORT_T1_IN_CB(READLINE(*this, kaypro_10_keyboard_device, t1_r))
- MCFG_MCS48_PORT_BUS_IN_CB(READ8(*this, kaypro_10_keyboard_device, bus_r))
- MCFG_MCS48_PORT_BUS_OUT_CB(WRITE8(*this, kaypro_10_keyboard_device, bus_w))
+void kaypro_10_keyboard_device::device_add_mconfig(machine_config &config)
+{
+ I8049(config, m_mcu, 6_MHz_XTAL);
+ m_mcu->p1_in_cb().set(FUNC(kaypro_10_keyboard_device::p1_r));
+ m_mcu->p2_in_cb().set(FUNC(kaypro_10_keyboard_device::p2_r));
+ m_mcu->p2_out_cb().set(FUNC(kaypro_10_keyboard_device::p2_w));
+ m_mcu->t1_in_cb().set(FUNC(kaypro_10_keyboard_device::t1_r));
+ m_mcu->bus_in_cb().set(FUNC(kaypro_10_keyboard_device::bus_r));
+ m_mcu->bus_out_cb().set(FUNC(kaypro_10_keyboard_device::bus_w));
SPEAKER(config, "keyboard").front_center();
- MCFG_DEVICE_ADD("bell", SPEAKER_SOUND)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "keyboard", 0.25)
-MACHINE_CONFIG_END
+ SPEAKER_SOUND(config, m_bell).add_route(ALL_OUTPUTS, "keyboard", 0.25);
+}
ioport_constructor kaypro_10_keyboard_device::device_input_ports() const
{
diff --git a/src/mame/machine/kay_kbd.h b/src/mame/machine/kay_kbd.h
index 4274f7f3199..8e59dbd2586 100644
--- a/src/mame/machine/kay_kbd.h
+++ b/src/mame/machine/kay_kbd.h
@@ -5,9 +5,9 @@
#pragma once
+#include "cpu/mcs48/mcs48.h"
#include "sound/spkrdev.h"
-
class kaypro_10_keyboard_device : public device_t
{
public:
@@ -35,7 +35,7 @@ protected:
DECLARE_WRITE8_MEMBER(bus_w);
private:
- required_device<cpu_device> m_mcu;
+ required_device<i8049_device> m_mcu;
required_device<speaker_sound_device> m_bell;
required_ioport_array<16> m_matrix;
required_ioport m_modifiers;
diff --git a/src/mame/machine/km035.cpp b/src/mame/machine/km035.cpp
index 54d881980dc..f32036bf497 100644
--- a/src/mame/machine/km035.cpp
+++ b/src/mame/machine/km035.cpp
@@ -55,21 +55,21 @@ void km035_device::km035_map(address_map &map)
// device_add_mconfig - add device configuration
//-------------------------------------------------
-MACHINE_CONFIG_START(km035_device::device_add_mconfig)
- MCFG_DEVICE_ADD(KM035_CPU_TAG, I8035, XTAL(4'608'000))
- MCFG_DEVICE_PROGRAM_MAP(km035_map)
- MCFG_MCS48_PORT_BUS_OUT_CB(WRITE8(*this, km035_device, bus_w))
- MCFG_MCS48_PORT_P1_IN_CB(READ8(*this, km035_device, p1_r))
- MCFG_MCS48_PORT_P1_OUT_CB(WRITE8(*this, km035_device, p1_w))
- MCFG_MCS48_PORT_P2_IN_CB(READ8(*this, km035_device, p2_r))
- MCFG_MCS48_PORT_P2_OUT_CB(WRITE8(*this, km035_device, p2_w))
- MCFG_MCS48_PORT_T0_IN_CB(READLINE(*this, km035_device, t0_r))
- MCFG_MCS48_PORT_T1_IN_CB(READLINE(*this, km035_device, t1_r))
+void km035_device::device_add_mconfig(machine_config &config)
+{
+ I8035(config, m_maincpu, XTAL(4'608'000));
+ m_maincpu->set_addrmap(AS_PROGRAM, &km035_device::km035_map);
+ m_maincpu->bus_out_cb().set(FUNC(km035_device::bus_w));
+ m_maincpu->p1_in_cb().set(FUNC(km035_device::p1_r));
+ m_maincpu->p1_out_cb().set(FUNC(km035_device::p1_w));
+ m_maincpu->p2_in_cb().set(FUNC(km035_device::p2_r));
+ m_maincpu->p2_out_cb().set(FUNC(km035_device::p2_w));
+ m_maincpu->t0_in_cb().set(FUNC(km035_device::t0_r));
+ m_maincpu->t1_in_cb().set(FUNC(km035_device::t1_r));
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD(KM035_SPK_TAG, BEEP, 3250)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
-MACHINE_CONFIG_END
+ BEEP(config, m_speaker, 3250).add_route(ALL_OUTPUTS, "mono", 0.50);
+}
const tiny_rom_entry *km035_device::device_rom_region() const
{
diff --git a/src/mame/machine/km035.h b/src/mame/machine/km035.h
index 74245c373cf..b60122048c8 100644
--- a/src/mame/machine/km035.h
+++ b/src/mame/machine/km035.h
@@ -36,7 +36,7 @@ protected:
virtual void device_reset() override;
private:
- required_device<cpu_device> m_maincpu;
+ required_device<i8035_device> m_maincpu;
required_device<beep_device> m_speaker;
required_ioport_array<16> m_kbd;
diff --git a/src/mame/machine/m24_kbd.cpp b/src/mame/machine/m24_kbd.cpp
index 89a17f3cdbe..0d689a80372 100644
--- a/src/mame/machine/m24_kbd.cpp
+++ b/src/mame/machine/m24_kbd.cpp
@@ -16,15 +16,16 @@ const tiny_rom_entry *m24_keyboard_device::device_rom_region() const
return ROM_NAME( m24_keyboard );
}
-MACHINE_CONFIG_START(m24_keyboard_device::device_add_mconfig)
- MCFG_DEVICE_ADD("mcu", I8049, XTAL(6'000'000))
- MCFG_MCS48_PORT_BUS_OUT_CB(WRITE8(*this, m24_keyboard_device, bus_w))
- MCFG_MCS48_PORT_P1_IN_CB(READ8(*this, m24_keyboard_device, p1_r))
- MCFG_MCS48_PORT_P1_OUT_CB(WRITE8(*this, m24_keyboard_device, p1_w))
- MCFG_MCS48_PORT_P2_IN_CB(READ8(*this, m24_keyboard_device, p2_r))
- MCFG_MCS48_PORT_T0_IN_CB(READLINE(*this, m24_keyboard_device, t0_r))
- MCFG_MCS48_PORT_T1_IN_CB(READLINE(*this, m24_keyboard_device, t1_r))
-MACHINE_CONFIG_END
+void m24_keyboard_device::device_add_mconfig(machine_config &config)
+{
+ I8049(config, m_mcu, XTAL(6'000'000));
+ m_mcu->bus_out_cb().set(FUNC(m24_keyboard_device::bus_w));
+ m_mcu->p1_in_cb().set(FUNC(m24_keyboard_device::p1_r));
+ m_mcu->p1_out_cb().set(FUNC(m24_keyboard_device::p1_w));
+ m_mcu->p2_in_cb().set(FUNC(m24_keyboard_device::p2_r));
+ m_mcu->t0_in_cb().set(FUNC(m24_keyboard_device::t0_r));
+ m_mcu->t1_in_cb().set(FUNC(m24_keyboard_device::t1_r));
+}
INPUT_PORTS_START( m24_keyboard )
PORT_START("ROW.0")
diff --git a/src/mame/machine/m24_kbd.h b/src/mame/machine/m24_kbd.h
index 86ad4344e08..a18ffd3d198 100644
--- a/src/mame/machine/m24_kbd.h
+++ b/src/mame/machine/m24_kbd.h
@@ -32,7 +32,7 @@ private:
uint8_t m_p1;
bool m_keypress, m_kbcdata;
devcb_write_line m_out_data;
- required_device<cpu_device> m_mcu;
+ required_device<i8049_device> m_mcu;
emu_timer *m_reset_timer;
DECLARE_WRITE8_MEMBER(bus_w);
diff --git a/src/mame/machine/ms7004.cpp b/src/mame/machine/ms7004.cpp
index 05804b6b764..13c4f215507 100644
--- a/src/mame/machine/ms7004.cpp
+++ b/src/mame/machine/ms7004.cpp
@@ -57,13 +57,14 @@ void ms7004_device::ms7004_map(address_map &map)
// device_add_mconfig - add device configuration
//-------------------------------------------------
-MACHINE_CONFIG_START(ms7004_device::device_add_mconfig)
- MCFG_DEVICE_ADD(MS7004_CPU_TAG, I8035, XTAL(4'608'000))
- MCFG_DEVICE_PROGRAM_MAP(ms7004_map)
- MCFG_MCS48_PORT_P1_OUT_CB(WRITE8(*this, ms7004_device, p1_w))
- MCFG_MCS48_PORT_P2_OUT_CB(WRITE8(*this, ms7004_device, p2_w))
- MCFG_MCS48_PORT_T1_IN_CB(READLINE(*this, ms7004_device, t1_r))
- MCFG_MCS48_PORT_PROG_OUT_CB(WRITELINE(m_i8243, i8243_device, prog_w))
+void ms7004_device::device_add_mconfig(machine_config &config)
+{
+ I8035(config, m_maincpu, XTAL(4'608'000));
+ m_maincpu->set_addrmap(AS_PROGRAM, &ms7004_device::ms7004_map);
+ m_maincpu->p1_out_cb().set(FUNC(ms7004_device::p1_w));
+ m_maincpu->p2_out_cb().set(FUNC(ms7004_device::p2_w));
+ m_maincpu->t1_in_cb().set(FUNC(ms7004_device::t1_r));
+ m_maincpu->prog_out_cb().set(m_i8243, FUNC(i8243_device::prog_w));
I8243(config, m_i8243);
m_i8243->p4_out_cb().set(FUNC(ms7004_device::i8243_port_w<0>));
@@ -72,9 +73,8 @@ MACHINE_CONFIG_START(ms7004_device::device_add_mconfig)
m_i8243->p7_out_cb().set(FUNC(ms7004_device::i8243_port_w<3>));
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD(MS7004_SPK_TAG, BEEP, 3250)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
-MACHINE_CONFIG_END
+ BEEP(config, m_speaker, 3250).add_route(ALL_OUTPUTS, "mono", 0.50);
+}
const tiny_rom_entry *ms7004_device::device_rom_region() const
{
diff --git a/src/mame/machine/ms7004.h b/src/mame/machine/ms7004.h
index 3cf3b38f411..c9e563466a8 100644
--- a/src/mame/machine/ms7004.h
+++ b/src/mame/machine/ms7004.h
@@ -39,7 +39,7 @@ protected:
virtual void device_reset() override;
private:
- required_device<cpu_device> m_maincpu;
+ required_device<i8035_device> m_maincpu;
required_device<beep_device> m_speaker;
required_device<i8243_device> m_i8243;
diff --git a/src/mame/machine/pc1512kb.cpp b/src/mame/machine/pc1512kb.cpp
index fcbaf350f6b..f276da9440d 100644
--- a/src/mame/machine/pc1512kb.cpp
+++ b/src/mame/machine/pc1512kb.cpp
@@ -50,17 +50,18 @@ const tiny_rom_entry *pc1512_keyboard_device::device_rom_region() const
// device_add_mconfig - add device configuration
//-------------------------------------------------
-MACHINE_CONFIG_START(pc1512_keyboard_device::device_add_mconfig)
- MCFG_DEVICE_ADD(I8048_TAG, I8048, XTAL(6'000'000))
- MCFG_MCS48_PORT_BUS_IN_CB(READ8(*this, pc1512_keyboard_device, kb_bus_r))
- MCFG_MCS48_PORT_P1_OUT_CB(WRITE8(*this, pc1512_keyboard_device, kb_p1_w))
- MCFG_MCS48_PORT_P2_IN_CB(READ8(*this, pc1512_keyboard_device, kb_p2_r))
- MCFG_MCS48_PORT_P2_OUT_CB(WRITE8(*this, pc1512_keyboard_device, kb_p2_w))
- MCFG_MCS48_PORT_T0_IN_CB(READLINE(*this, pc1512_keyboard_device, kb_t0_r))
- MCFG_MCS48_PORT_T1_IN_CB(READLINE(*this, pc1512_keyboard_device, kb_t1_r))
-
- MCFG_VCS_CONTROL_PORT_ADD("joy", vcs_control_port_devices, nullptr)
-MACHINE_CONFIG_END
+void pc1512_keyboard_device::device_add_mconfig(machine_config &config)
+{
+ I8048(config, m_maincpu, XTAL(6'000'000));
+ m_maincpu->bus_in_cb().set(FUNC(pc1512_keyboard_device::kb_bus_r));
+ m_maincpu->p1_out_cb().set(FUNC(pc1512_keyboard_device::kb_p1_w));
+ m_maincpu->p2_in_cb().set(FUNC(pc1512_keyboard_device::kb_p2_r));
+ m_maincpu->p2_out_cb().set(FUNC(pc1512_keyboard_device::kb_p2_w));
+ m_maincpu->t0_in_cb().set(FUNC(pc1512_keyboard_device::kb_t0_r));
+ m_maincpu->t1_in_cb().set(FUNC(pc1512_keyboard_device::kb_t1_r));
+
+ VCS_CONTROL_PORT(config, "joy", vcs_control_port_devices, nullptr);
+}
//-------------------------------------------------
diff --git a/src/mame/machine/pc1512kb.h b/src/mame/machine/pc1512kb.h
index 8d00a54913e..8d69d651825 100644
--- a/src/mame/machine/pc1512kb.h
+++ b/src/mame/machine/pc1512kb.h
@@ -62,7 +62,7 @@ private:
LED_NUM
};
- required_device<cpu_device> m_maincpu;
+ required_device<i8048_device> m_maincpu;
required_device<vcs_control_port_device> m_joy;
required_ioport_array<11> m_y;
diff --git a/src/mame/machine/pcd_kbd.cpp b/src/mame/machine/pcd_kbd.cpp
index 4227b825cb4..7e42a41ad52 100644
--- a/src/mame/machine/pcd_kbd.cpp
+++ b/src/mame/machine/pcd_kbd.cpp
@@ -27,19 +27,19 @@ void pcd_keyboard_device::pcd_keyboard_map(address_map &map)
map(0x000, 0xfff).rom();
}
-MACHINE_CONFIG_START(pcd_keyboard_device::device_add_mconfig)
- MCFG_DEVICE_ADD("mcu", I8035, 5760000*2) // FIXME: the mc2661 baud rate calculation
- MCFG_DEVICE_PROGRAM_MAP(pcd_keyboard_map)
- MCFG_MCS48_PORT_BUS_IN_CB(READ8(*this, pcd_keyboard_device, bus_r))
- MCFG_MCS48_PORT_P1_IN_CB(READ8(*this, pcd_keyboard_device, p1_r))
- MCFG_MCS48_PORT_P1_OUT_CB(WRITE8(*this, pcd_keyboard_device, p1_w))
- MCFG_MCS48_PORT_T0_IN_CB(READLINE(*this, pcd_keyboard_device, t0_r))
+void pcd_keyboard_device::device_add_mconfig(machine_config &config)
+{
+ i8035_device &mcu(I8035(config, "mcu", 5760000*2)); // FIXME: the mc2661 baud rate calculation
+ mcu.set_addrmap(AS_PROGRAM, &pcd_keyboard_device::pcd_keyboard_map);
+ mcu.bus_in_cb().set(FUNC(pcd_keyboard_device::bus_r));
+ mcu.p1_in_cb().set(FUNC(pcd_keyboard_device::p1_r));
+ mcu.p1_out_cb().set(FUNC(pcd_keyboard_device::p1_w));
+ mcu.t0_in_cb().set(FUNC(pcd_keyboard_device::t0_r));
// sound hardware
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD("speaker", SPEAKER_SOUND)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
-MACHINE_CONFIG_END
+ SPEAKER_SOUND(config, "speaker").add_route(ALL_OUTPUTS, "mono", 0.25);
+}
INPUT_PORTS_START( pcd_keyboard )
diff --git a/src/mame/machine/tandy2kb.cpp b/src/mame/machine/tandy2kb.cpp
index de753eefef5..a005ecd7364 100644
--- a/src/mame/machine/tandy2kb.cpp
+++ b/src/mame/machine/tandy2kb.cpp
@@ -51,13 +51,14 @@ const tiny_rom_entry *tandy2k_keyboard_device::device_rom_region() const
// device_add_mconfig - add device configuration
//-------------------------------------------------
-MACHINE_CONFIG_START(tandy2k_keyboard_device::device_add_mconfig)
- MCFG_DEVICE_ADD(I8048_TAG, I8048, 1000000) // ?
- MCFG_MCS48_PORT_P1_OUT_CB(WRITE8(*this, tandy2k_keyboard_device, kb_p1_w))
- MCFG_MCS48_PORT_P2_OUT_CB(WRITE8(*this, tandy2k_keyboard_device, kb_p2_w))
- MCFG_MCS48_PORT_BUS_IN_CB(READ8(*this, tandy2k_keyboard_device, kb_p1_r))
- MCFG_DEVICE_DISABLE() // TODO
-MACHINE_CONFIG_END
+void tandy2k_keyboard_device::device_add_mconfig(machine_config &config)
+{
+ I8048(config, m_maincpu, 1000000); // ?
+ m_maincpu->p1_out_cb().set(FUNC(tandy2k_keyboard_device::kb_p1_w));
+ m_maincpu->p2_out_cb().set(FUNC(tandy2k_keyboard_device::kb_p2_w));
+ m_maincpu->bus_in_cb().set(FUNC(tandy2k_keyboard_device::kb_p1_r));
+ m_maincpu->set_disable(); // TODO
+}
//-------------------------------------------------
diff --git a/src/mame/machine/tandy2kb.h b/src/mame/machine/tandy2kb.h
index 76156c42178..fa910452fb5 100644
--- a/src/mame/machine/tandy2kb.h
+++ b/src/mame/machine/tandy2kb.h
@@ -58,7 +58,7 @@ private:
LED_2
};
- required_device<cpu_device> m_maincpu;
+ required_device<i8048_device> m_maincpu;
required_ioport_array<12> m_y;
output_finder<2> m_leds;
diff --git a/src/mame/machine/trs80m2kb.cpp b/src/mame/machine/trs80m2kb.cpp
index 60af2d67f54..936681364cd 100644
--- a/src/mame/machine/trs80m2kb.cpp
+++ b/src/mame/machine/trs80m2kb.cpp
@@ -51,14 +51,15 @@ const tiny_rom_entry *trs80m2_keyboard_device::device_rom_region() const
// device_add_mconfig - add device configuration
//-------------------------------------------------
-MACHINE_CONFIG_START(trs80m2_keyboard_device::device_add_mconfig)
- MCFG_DEVICE_ADD(I8021_TAG, I8021, 3000000) // 1000uH inductor connected across the XTAL inputs
- MCFG_MCS48_PORT_T1_IN_CB(READLINE(*this, trs80m2_keyboard_device, kb_t1_r))
- MCFG_MCS48_PORT_BUS_IN_CB(READ8(*this, trs80m2_keyboard_device, kb_p0_r))
- MCFG_MCS48_PORT_P1_OUT_CB(WRITE8(*this, trs80m2_keyboard_device, kb_p1_w))
- MCFG_MCS48_PORT_P2_OUT_CB(WRITE8(*this, trs80m2_keyboard_device, kb_p2_w))
- MCFG_DEVICE_DISABLE() // TODO
-MACHINE_CONFIG_END
+void trs80m2_keyboard_device::device_add_mconfig(machine_config &config)
+{
+ I8021(config, m_maincpu, 3000000); // 1000uH inductor connected across the XTAL inputs
+ m_maincpu->t1_in_cb().set(FUNC(trs80m2_keyboard_device::kb_t1_r));
+ m_maincpu->bus_in_cb().set(FUNC(trs80m2_keyboard_device::kb_p0_r));
+ m_maincpu->p1_out_cb().set(FUNC(trs80m2_keyboard_device::kb_p1_w));
+ m_maincpu->p2_out_cb().set(FUNC(trs80m2_keyboard_device::kb_p2_w));
+ m_maincpu->set_disable(); // TODO
+}
//-------------------------------------------------
diff --git a/src/mame/machine/trs80m2kb.h b/src/mame/machine/trs80m2kb.h
index a446fdca783..d2bf556a8ed 100644
--- a/src/mame/machine/trs80m2kb.h
+++ b/src/mame/machine/trs80m2kb.h
@@ -56,7 +56,7 @@ private:
LED_1
};
- required_device<cpu_device> m_maincpu;
+ required_device<i8021_device> m_maincpu;
required_ioport_array<12> m_y;
output_finder<2> m_leds;
diff --git a/src/mame/machine/v1050kb.cpp b/src/mame/machine/v1050kb.cpp
index 34621aee694..da37c65dd14 100644
--- a/src/mame/machine/v1050kb.cpp
+++ b/src/mame/machine/v1050kb.cpp
@@ -73,11 +73,11 @@ DISCRETE_SOUND_END
//-------------------------------------------------
MACHINE_CONFIG_START(v1050_keyboard_device::device_add_mconfig)
- MCFG_DEVICE_ADD(I8049_TAG, I8049, XTAL(4'608'000))
- MCFG_MCS48_PORT_P1_IN_CB(READ8(*this, v1050_keyboard_device, kb_p1_r))
- MCFG_MCS48_PORT_P1_OUT_CB(WRITE8(*this, v1050_keyboard_device, kb_p1_w))
- MCFG_MCS48_PORT_P2_OUT_CB(WRITE8(*this, v1050_keyboard_device, kb_p2_w))
- MCFG_DEVICE_DISABLE() // TODO
+ I8049(config, m_maincpu, XTAL(4'608'000));
+ m_maincpu->p1_in_cb().set(FUNC(v1050_keyboard_device::kb_p1_r));
+ m_maincpu->p1_out_cb().set(FUNC(v1050_keyboard_device::kb_p1_w));
+ m_maincpu->p2_out_cb().set(FUNC(v1050_keyboard_device::kb_p2_w));
+ m_maincpu->set_disable(); // TODO
// discrete sound
SPEAKER(config, "mono").front_center();
diff --git a/src/mame/machine/v1050kb.h b/src/mame/machine/v1050kb.h
index 349766a08e4..c75406e1ad3 100644
--- a/src/mame/machine/v1050kb.h
+++ b/src/mame/machine/v1050kb.h
@@ -44,7 +44,7 @@ protected:
virtual ioport_constructor device_input_ports() const override;
private:
- required_device<cpu_device> m_maincpu;
+ required_device<i8049_device> m_maincpu;
required_device<discrete_sound_device> m_discrete;
required_ioport_array<12> m_y;
devcb_write_line m_out_tx_handler;
diff --git a/src/mame/machine/victor9k_kb.cpp b/src/mame/machine/victor9k_kb.cpp
index 63a32fcc5ce..54a3b39dfc0 100644
--- a/src/mame/machine/victor9k_kb.cpp
+++ b/src/mame/machine/victor9k_kb.cpp
@@ -380,14 +380,15 @@ const tiny_rom_entry *victor_9000_keyboard_device::device_rom_region() const
// device_add_mconfig - add device configuration
//-------------------------------------------------
-MACHINE_CONFIG_START(victor_9000_keyboard_device::device_add_mconfig)
- MCFG_DEVICE_ADD(I8021_TAG, I8021, XTAL(3'579'545))
+void victor_9000_keyboard_device::device_add_mconfig(machine_config &config)
+{
+ I8021(config, m_maincpu, XTAL(3'579'545));
// P0 is unconnected on pcb
- MCFG_MCS48_PORT_P1_IN_CB(READ8(*this, victor_9000_keyboard_device, kb_p1_r))
- MCFG_MCS48_PORT_P1_OUT_CB(WRITE8(*this, victor_9000_keyboard_device, kb_p1_w))
- MCFG_MCS48_PORT_P2_OUT_CB(WRITE8(*this, victor_9000_keyboard_device, kb_p2_w))
- MCFG_MCS48_PORT_T1_IN_CB(READLINE(*this, victor_9000_keyboard_device, kb_t1_r))
-MACHINE_CONFIG_END
+ m_maincpu->p1_in_cb().set(FUNC(victor_9000_keyboard_device::kb_p1_r));
+ m_maincpu->p1_out_cb().set(FUNC(victor_9000_keyboard_device::kb_p1_w));
+ m_maincpu->p2_out_cb().set(FUNC(victor_9000_keyboard_device::kb_p2_w));
+ m_maincpu->t1_in_cb().set(FUNC(victor_9000_keyboard_device::kb_t1_r));
+}
//-------------------------------------------------
diff --git a/src/mame/machine/victor9k_kb.h b/src/mame/machine/victor9k_kb.h
index 78e3a6b2095..e0f80f0b7db 100644
--- a/src/mame/machine/victor9k_kb.h
+++ b/src/mame/machine/victor9k_kb.h
@@ -42,7 +42,7 @@ protected:
virtual ioport_constructor device_input_ports() const override;
private:
- required_device<cpu_device> m_maincpu;
+ required_device<i8021_device> m_maincpu;
required_ioport_array<13> m_y;
devcb_write_line m_kbrdy_cb;
diff --git a/src/mame/machine/x820kb.cpp b/src/mame/machine/x820kb.cpp
index 54533b49c33..672266620b9 100644
--- a/src/mame/machine/x820kb.cpp
+++ b/src/mame/machine/x820kb.cpp
@@ -84,15 +84,16 @@ const tiny_rom_entry *xerox_820_keyboard_device::device_rom_region() const
// device_add_mconfig - add device configuration
//-------------------------------------------------
-MACHINE_CONFIG_START(xerox_820_keyboard_device::device_add_mconfig)
- MCFG_DEVICE_ADD(I8748_TAG, I8048, XTAL(6'000'000))
- MCFG_MCS48_PORT_P1_IN_CB(READ8(*this, xerox_820_keyboard_device, kb_p1_r))
- MCFG_MCS48_PORT_P1_OUT_CB(WRITE8(*this, xerox_820_keyboard_device, kb_p1_w))
- MCFG_MCS48_PORT_P2_IN_CB(READ8(*this, xerox_820_keyboard_device, kb_p2_r))
- MCFG_MCS48_PORT_T0_IN_CB(READLINE(*this, xerox_820_keyboard_device, kb_t0_r))
- MCFG_MCS48_PORT_T1_IN_CB(READLINE(*this, xerox_820_keyboard_device, kb_t1_r))
- MCFG_MCS48_PORT_BUS_OUT_CB(WRITE8(*this, xerox_820_keyboard_device, kb_bus_w))
-MACHINE_CONFIG_END
+void xerox_820_keyboard_device::device_add_mconfig(machine_config &config)
+{
+ I8048(config, m_maincpu, XTAL(6'000'000));
+ m_maincpu->p1_in_cb().set(FUNC(xerox_820_keyboard_device::kb_p1_r));
+ m_maincpu->p1_out_cb().set(FUNC(xerox_820_keyboard_device::kb_p1_w));
+ m_maincpu->p2_in_cb().set(FUNC(xerox_820_keyboard_device::kb_p2_r));
+ m_maincpu->t0_in_cb().set(FUNC(xerox_820_keyboard_device::kb_t0_r));
+ m_maincpu->t1_in_cb().set(FUNC(xerox_820_keyboard_device::kb_t1_r));
+ m_maincpu->bus_out_cb().set(FUNC(xerox_820_keyboard_device::kb_bus_w));
+}
//-------------------------------------------------
diff --git a/src/mame/machine/x820kb.h b/src/mame/machine/x820kb.h
index 3e6fe6283ee..70ab368700d 100644
--- a/src/mame/machine/x820kb.h
+++ b/src/mame/machine/x820kb.h
@@ -42,7 +42,7 @@ protected:
virtual ioport_constructor device_input_ports() const override;
private:
- required_device<cpu_device> m_maincpu;
+ required_device<i8048_device> m_maincpu;
required_ioport_array<16> m_y;
devcb_write_line m_kbstb_cb;
diff --git a/src/mame/video/pcd.cpp b/src/mame/video/pcd.cpp
index b6609505c8f..dd0952032aa 100644
--- a/src/mame/video/pcd.cpp
+++ b/src/mame/video/pcd.cpp
@@ -100,10 +100,10 @@ ioport_constructor pcd_video_device::device_input_ports() const
}
MACHINE_CONFIG_START(pcd_video_device::device_add_mconfig)
- MCFG_DEVICE_ADD("graphics", I8741, 16_MHz_XTAL / 2)
- MCFG_MCS48_PORT_P1_IN_CB(READ8(*this, pcd_video_device, p1_r))
- MCFG_MCS48_PORT_P2_OUT_CB(WRITE8(*this, pcd_video_device, p2_w))
- MCFG_MCS48_PORT_T1_IN_CB(READLINE(*this, pcd_video_device, t1_r))
+ i8741_device &mcu(I8741(config, "graphics", 16_MHz_XTAL / 2));
+ mcu.p1_in_cb().set(FUNC(pcd_video_device::p1_r));
+ mcu.p2_out_cb().set(FUNC(pcd_video_device::p2_w));
+ mcu.t1_in_cb().set(FUNC(pcd_video_device::t1_r));
// video hardware
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));