summaryrefslogtreecommitdiffstats
path: root/src/mame/drivers/sacstate.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/sacstate.cpp')
-rw-r--r--src/mame/drivers/sacstate.cpp34
1 files changed, 18 insertions, 16 deletions
diff --git a/src/mame/drivers/sacstate.cpp b/src/mame/drivers/sacstate.cpp
index 100acf5290a..8bb546412de 100644
--- a/src/mame/drivers/sacstate.cpp
+++ b/src/mame/drivers/sacstate.cpp
@@ -94,22 +94,24 @@ WRITE8_MEMBER( sacstate_state::port08_w )
m_val = 0;
}
-ADDRESS_MAP_START(sacstate_state::sacstate_mem)
- ADDRESS_MAP_UNMAP_HIGH
- AM_RANGE(0x000,0x7ff) AM_ROM
- AM_RANGE(0x800,0xfff) AM_RAM
-ADDRESS_MAP_END
-
-ADDRESS_MAP_START(sacstate_state::sacstate_io)
- ADDRESS_MAP_UNMAP_HIGH
- ADDRESS_MAP_GLOBAL_MASK(0xff)
- AM_RANGE(0x00,0x00) AM_READ(port00_r)
- AM_RANGE(0x01,0x01) AM_READ(port01_r)
- AM_RANGE(0x04,0x04) AM_READ(port04_r)
- AM_RANGE(0x08,0x08) AM_WRITE(port08_w)
- AM_RANGE(0x16,0x16) AM_DEVWRITE("terminal", generic_terminal_device, write)
- AM_RANGE(0x17,0x1f) AM_WRITENOP
-ADDRESS_MAP_END
+void sacstate_state::sacstate_mem(address_map &map)
+{
+ map.unmap_value_high();
+ map(0x000, 0x7ff).rom();
+ map(0x800, 0xfff).ram();
+}
+
+void sacstate_state::sacstate_io(address_map &map)
+{
+ map.unmap_value_high();
+ map.global_mask(0xff);
+ map(0x00, 0x00).r(this, FUNC(sacstate_state::port00_r));
+ map(0x01, 0x01).r(this, FUNC(sacstate_state::port01_r));
+ map(0x04, 0x04).r(this, FUNC(sacstate_state::port04_r));
+ map(0x08, 0x08).w(this, FUNC(sacstate_state::port08_w));
+ map(0x16, 0x16).w(m_terminal, FUNC(generic_terminal_device::write));
+ map(0x17, 0x1f).nopw();
+}
/* Input ports */
static INPUT_PORTS_START( sacstate )