summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/imsai.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/imsai.cpp')
-rw-r--r--src/mame/drivers/imsai.cpp44
1 files changed, 23 insertions, 21 deletions
diff --git a/src/mame/drivers/imsai.cpp b/src/mame/drivers/imsai.cpp
index 2450f5930dd..c45c0f41fb4 100644
--- a/src/mame/drivers/imsai.cpp
+++ b/src/mame/drivers/imsai.cpp
@@ -51,27 +51,29 @@ private:
};
-ADDRESS_MAP_START(imsai_state::imsai_mem)
- ADDRESS_MAP_UNMAP_HIGH
- AM_RANGE(0x0000, 0x07ff) AM_ROM AM_REGION("prom", 0)
- AM_RANGE(0xd000, 0xd0ff) AM_RAM
- AM_RANGE(0xd100, 0xd103) AM_DEVREADWRITE("pit", pit8253_device, read, write)
- AM_RANGE(0xd800, 0xdfff) AM_ROM AM_REGION("prom", 0)
-ADDRESS_MAP_END
-
-ADDRESS_MAP_START(imsai_state::imsai_io)
- ADDRESS_MAP_UNMAP_HIGH
- ADDRESS_MAP_GLOBAL_MASK(0xff)
- AM_RANGE(0x02, 0x02) AM_READ(keyin_r) AM_DEVWRITE("terminal", generic_terminal_device, write)
- AM_RANGE(0x03, 0x03) AM_READ(status_r)
- AM_RANGE(0x04, 0x04) AM_DEVREADWRITE("uart", i8251_device, data_r, data_w)
- AM_RANGE(0x05, 0x05) AM_DEVREADWRITE("uart", i8251_device, status_r, control_w)
- AM_RANGE(0x12, 0x12) AM_DEVREADWRITE("uart", i8251_device, data_r, data_w)
- AM_RANGE(0x13, 0x13) AM_DEVREADWRITE("uart", i8251_device, status_r, control_w)
- AM_RANGE(0x14, 0x14) AM_READ(keyin_r) AM_DEVWRITE("terminal", generic_terminal_device, write)
- AM_RANGE(0x15, 0x15) AM_READ(status_r)
- AM_RANGE(0xf3, 0xf3) AM_WRITE(control_w)
-ADDRESS_MAP_END
+void imsai_state::imsai_mem(address_map &map)
+{
+ map.unmap_value_high();
+ map(0x0000, 0x07ff).rom().region("prom", 0);
+ map(0xd000, 0xd0ff).ram();
+ map(0xd100, 0xd103).rw(m_pit, FUNC(pit8253_device::read), FUNC(pit8253_device::write));
+ map(0xd800, 0xdfff).rom().region("prom", 0);
+}
+
+void imsai_state::imsai_io(address_map &map)
+{
+ map.unmap_value_high();
+ map.global_mask(0xff);
+ map(0x02, 0x02).r(this, FUNC(imsai_state::keyin_r)).w(m_terminal, FUNC(generic_terminal_device::write));
+ map(0x03, 0x03).r(this, FUNC(imsai_state::status_r));
+ map(0x04, 0x04).rw("uart", FUNC(i8251_device::data_r), FUNC(i8251_device::data_w));
+ map(0x05, 0x05).rw("uart", FUNC(i8251_device::status_r), FUNC(i8251_device::control_w));
+ map(0x12, 0x12).rw("uart", FUNC(i8251_device::data_r), FUNC(i8251_device::data_w));
+ map(0x13, 0x13).rw("uart", FUNC(i8251_device::status_r), FUNC(i8251_device::control_w));
+ map(0x14, 0x14).r(this, FUNC(imsai_state::keyin_r)).w(m_terminal, FUNC(generic_terminal_device::write));
+ map(0x15, 0x15).r(this, FUNC(imsai_state::status_r));
+ map(0xf3, 0xf3).w(this, FUNC(imsai_state::control_w));
+}
/* Input ports */
static INPUT_PORTS_START( imsai )