diff options
author | AJR <ajrhacker@users.noreply.github.com> | 2017-05-04 22:14:19 -0400 |
---|---|---|
committer | Vas Crabb <cuavas@users.noreply.github.com> | 2017-05-06 14:33:17 +1000 |
commit | 48f24cb5f3482b062e45f33ae9e65f1f16d0188d (patch) | |
tree | 852ad1704af4a8603663f8ade88d95675ad12a14 /src/mame/machine/trs80m2kb.cpp | |
parent | 4930ecef121841dc30a349d154e3e940a319914e (diff) |
mcs48: Convert ports to devcb (nw)
- T0, T1 and PROG handlers are now 1-bit rather than 8-bit
- Eliminate several T0/T1 handlers that DEVCB macros can take care of now
- T0 CLK output emulation (untested)
Diffstat (limited to 'src/mame/machine/trs80m2kb.cpp')
-rw-r--r-- | src/mame/machine/trs80m2kb.cpp | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/src/mame/machine/trs80m2kb.cpp b/src/mame/machine/trs80m2kb.cpp index 86a73ed9c7d..9d6411d3313 100644 --- a/src/mame/machine/trs80m2kb.cpp +++ b/src/mame/machine/trs80m2kb.cpp @@ -48,24 +48,15 @@ const tiny_rom_entry *trs80m2_keyboard_device::device_rom_region() const //------------------------------------------------- -// ADDRESS_MAP( kb_io ) -//------------------------------------------------- - -static ADDRESS_MAP_START( trs80m2_keyboard_io, AS_IO, 8, trs80m2_keyboard_device ) - AM_RANGE(MCS48_PORT_T1, MCS48_PORT_T1) AM_READ(kb_t1_r) - AM_RANGE(MCS48_PORT_P0, MCS48_PORT_P0) AM_READ(kb_p0_r) - AM_RANGE(MCS48_PORT_P1, MCS48_PORT_P1) AM_WRITE(kb_p1_w) - AM_RANGE(MCS48_PORT_P2, MCS48_PORT_P2) AM_WRITE(kb_p2_w) -ADDRESS_MAP_END - - -//------------------------------------------------- // MACHINE_DRIVER( trs80m2_keyboard ) //------------------------------------------------- static MACHINE_CONFIG_FRAGMENT( trs80m2_keyboard ) MCFG_CPU_ADD(I8021_TAG, I8021, 3000000) // 1000uH inductor connected across the XTAL inputs - MCFG_CPU_IO_MAP(trs80m2_keyboard_io) + MCFG_MCS48_PORT_T1_IN_CB(READLINE(trs80m2_keyboard_device, kb_t1_r)) + MCFG_MCS48_PORT_BUS_IN_CB(READ8(trs80m2_keyboard_device, kb_p0_r)) + MCFG_MCS48_PORT_P1_OUT_CB(WRITE8(trs80m2_keyboard_device, kb_p1_w)) + MCFG_MCS48_PORT_P2_OUT_CB(WRITE8(trs80m2_keyboard_device, kb_p2_w)) MCFG_DEVICE_DISABLE() // TODO MACHINE_CONFIG_END @@ -288,7 +279,7 @@ READ_LINE_MEMBER( trs80m2_keyboard_device::data_r ) // kb_t1_r - //------------------------------------------------- -READ8_MEMBER( trs80m2_keyboard_device::kb_t1_r ) +READ_LINE_MEMBER( trs80m2_keyboard_device::kb_t1_r ) { return m_busy; } |