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