diff options
Diffstat (limited to 'src/mame/drivers/sm1800.cpp')
-rw-r--r-- | src/mame/drivers/sm1800.cpp | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/src/mame/drivers/sm1800.cpp b/src/mame/drivers/sm1800.cpp index 4bb3a5e595b..f2d48c5ae90 100644 --- a/src/mame/drivers/sm1800.cpp +++ b/src/mame/drivers/sm1800.cpp @@ -55,23 +55,25 @@ public: void sm1800_mem(address_map &map); }; -ADDRESS_MAP_START(sm1800_state::sm1800_mem) - ADDRESS_MAP_UNMAP_HIGH - AM_RANGE( 0x0000, 0x07ff ) AM_ROM +void sm1800_state::sm1800_mem(address_map &map) +{ + map.unmap_value_high(); + map(0x0000, 0x07ff).rom(); //AM_RANGE( 0x0fb0, 0x0fff ) AM_DEVWRITE("i8275", i8275_device, dack_w) - AM_RANGE( 0x1000, 0x17ff ) AM_RAM // videoram looks like 1080-17FF, normal ascii -ADDRESS_MAP_END - -ADDRESS_MAP_START(sm1800_state::sm1800_io) - ADDRESS_MAP_GLOBAL_MASK(0xff) - ADDRESS_MAP_UNMAP_HIGH - AM_RANGE( 0x3c, 0x3d ) AM_DEVREADWRITE("i8275", i8275_device, read, write) - AM_RANGE( 0x5c, 0x5c) AM_DEVREADWRITE("i8251", i8251_device, data_r, data_w) - AM_RANGE( 0x5d, 0x5d) AM_DEVREADWRITE("i8251", i8251_device, status_r, control_w) - AM_RANGE( 0x6c, 0x6f ) AM_DEVREADWRITE("i8255", i8255_device, read, write) + map(0x1000, 0x17ff).ram(); // videoram looks like 1080-17FF, normal ascii +} + +void sm1800_state::sm1800_io(address_map &map) +{ + map.global_mask(0xff); + map.unmap_value_high(); + map(0x3c, 0x3d).rw(m_crtc, FUNC(i8275_device::read), FUNC(i8275_device::write)); + map(0x5c, 0x5c).rw(m_uart, FUNC(i8251_device::data_r), FUNC(i8251_device::data_w)); + map(0x5d, 0x5d).rw(m_uart, FUNC(i8251_device::status_r), FUNC(i8251_device::control_w)); + map(0x6c, 0x6f).rw(m_ppi, FUNC(i8255_device::read), FUNC(i8255_device::write)); //AM_RANGE( 0x74, 0x74 ) AM_DEVREADWRITE("i8279", i8279_device, status_r, cmd_w) //AM_RANGE( 0x75, 0x75 ) AM_DEVREADWRITE("i8279", i8279_device, data_r, data_w) -ADDRESS_MAP_END +} /* Input ports */ static INPUT_PORTS_START( sm1800 ) |