summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/machine/m24_kbd.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/machine/m24_kbd.cpp')
-rw-r--r--src/mame/machine/m24_kbd.cpp19
1 files changed, 10 insertions, 9 deletions
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")