summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/konin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/konin.cpp')
-rw-r--r--src/mame/drivers/konin.cpp55
1 files changed, 34 insertions, 21 deletions
diff --git a/src/mame/drivers/konin.cpp b/src/mame/drivers/konin.cpp
index 07fe5965c13..7acf6b82dc8 100644
--- a/src/mame/drivers/konin.cpp
+++ b/src/mame/drivers/konin.cpp
@@ -86,27 +86,40 @@ WRITE_LINE_MEMBER(konin_state::picu_r3_w)
m_picu->r_w(3, !state);
}
-ADDRESS_MAP_START(konin_state::konin_mem)
- ADDRESS_MAP_UNMAP_HIGH
- AM_RANGE(0x0000, 0x4fff) AM_ROM
- AM_RANGE(0x5000, 0x7fff) AM_RAM
- AM_RANGE(0xf200, 0xf200) AM_WRITENOP // watchdog?
- AM_RANGE(0xf400, 0xfbff) AM_RAM
- AM_RANGE(0xfc80, 0xfc83) AM_DEVREADWRITE("mainppi", i8255_device, read, write)
- AM_RANGE(0xfc84, 0xfc87) AM_DEVREADWRITE("mainpit", pit8253_device, read, write)
- AM_RANGE(0xff00, 0xffff) AM_RAM
-ADDRESS_MAP_END
-
-ADDRESS_MAP_START(konin_state::konin_io)
- ADDRESS_MAP_UNMAP_HIGH
- ADDRESS_MAP_GLOBAL_MASK(0xff)
- AM_RANGE(0x24, 0x24) AM_WRITE(picu_b_w)
-
- ;map(0x80, 0x83).lrw8("ioppi_rw", [this](address_space &space, offs_t offset, u8 mem_mask) { return m_ioppi->read(space, offset^3, mem_mask); }, [this](address_space &space, offs_t offset, u8 data, u8 mem_mask) { m_ioppi->write(space, offset^3, data, mem_mask); });
- AM_RANGE(0xf6, 0xf6) AM_DEVREADWRITE("uart", i8251_device, status_r, control_w)
- AM_RANGE(0xf7, 0xf7) AM_DEVREADWRITE("uart", i8251_device, data_r, data_w)
- ;map(0xf8, 0xfb).lrw8("iopit_rw", [this](address_space &space, offs_t offset, u8 mem_mask) { return m_iopit->read(space, offset^3, mem_mask); }, [this](address_space &space, offs_t offset, u8 data, u8 mem_mask) { m_iopit->write(space, offset^3, data, mem_mask); });
-ADDRESS_MAP_END
+void konin_state::konin_mem(address_map &map)
+{
+ map.unmap_value_high();
+ map(0x0000, 0x4fff).rom();
+ map(0x5000, 0x7fff).ram();
+ map(0xf200, 0xf200).nopw(); // watchdog?
+ map(0xf400, 0xfbff).ram();
+ map(0xfc80, 0xfc83).rw("mainppi", FUNC(i8255_device::read), FUNC(i8255_device::write));
+ map(0xfc84, 0xfc87).rw("mainpit", FUNC(pit8253_device::read), FUNC(pit8253_device::write));
+ map(0xff00, 0xffff).ram();
+}
+
+void konin_state::konin_io(address_map &map)
+{
+ map.unmap_value_high();
+ map.global_mask(0xff);
+ map(0x24, 0x24).w(this, FUNC(konin_state::picu_b_w));
+ map(0x80, 0x83).lrw8("ioppi_rw",
+ [this](address_space &space, offs_t offset, u8 mem_mask) {
+ return m_ioppi->read(space, offset^3, mem_mask);
+ },
+ [this](address_space &space, offs_t offset, u8 data, u8 mem_mask) {
+ m_ioppi->write(space, offset^3, data, mem_mask);
+ });
+ map(0xf6, 0xf6).rw("uart", FUNC(i8251_device::status_r), FUNC(i8251_device::control_w));
+ map(0xf7, 0xf7).rw("uart", FUNC(i8251_device::data_r), FUNC(i8251_device::data_w));
+ map(0xf8, 0xfb).lrw8("iopit_rw",
+ [this](address_space &space, offs_t offset, u8 mem_mask) {
+ return m_iopit->read(space, offset^3, mem_mask);
+ },
+ [this](address_space &space, offs_t offset, u8 data, u8 mem_mask) {
+ m_iopit->write(space, offset^3, data, mem_mask);
+ });
+}
/* Input ports */
static INPUT_PORTS_START( konin )