diff options
author | 2018-03-13 07:36:43 +0100 | |
---|---|---|
committer | 2018-03-14 14:07:14 +0100 | |
commit | 115bb9936c5cd3faf955d7eb1e251a94e4744b7b (patch) | |
tree | f0230f547f6c750f9974c61479eef28cbe4ad571 /src/mame/drivers/instruct.cpp | |
parent | f155992daab88ad024cec995428a67108218b51d (diff) |
Address maps macros removal, pass 1 [O. Galibert]
Diffstat (limited to 'src/mame/drivers/instruct.cpp')
-rw-r--r-- | src/mame/drivers/instruct.cpp | 51 |
1 files changed, 27 insertions, 24 deletions
diff --git a/src/mame/drivers/instruct.cpp b/src/mame/drivers/instruct.cpp index 4141ec76974..c3e95068312 100644 --- a/src/mame/drivers/instruct.cpp +++ b/src/mame/drivers/instruct.cpp @@ -218,30 +218,33 @@ INTERRUPT_GEN_MEMBER( instruct_state::t2l_int ) } } -ADDRESS_MAP_START(instruct_state::mem_map) - ADDRESS_MAP_UNMAP_HIGH - AM_RANGE(0x0000, 0x0ffe) AM_RAM AM_SHARE("mainram") - AM_RANGE(0x0fff, 0x0fff) AM_READWRITE(port_r,port_w) - AM_RANGE(0x1780, 0x17ff) AM_RAM AM_SHARE("smiram") - AM_RANGE(0x1800, 0x1fff) AM_ROM AM_REGION("roms",0) - AM_RANGE(0x2000, 0x7fff) AM_RAM AM_SHARE("extram") -ADDRESS_MAP_END - -ADDRESS_MAP_START(instruct_state::io_map) - ADDRESS_MAP_UNMAP_HIGH - AM_RANGE(0x07, 0x07) AM_READWRITE(port_r,port_w) - AM_RANGE(0xf8, 0xf8) AM_WRITE(portf8_w) - AM_RANGE(0xf9, 0xf9) AM_WRITE(portf9_w) - AM_RANGE(0xfa, 0xfa) AM_WRITE(portfa_w) - AM_RANGE(0xfc, 0xfc) AM_READ(portfc_r) - AM_RANGE(0xfd, 0xfd) AM_READ(portfd_r) - AM_RANGE(0xfe, 0xfe) AM_READ(portfe_r) -ADDRESS_MAP_END - -ADDRESS_MAP_START(instruct_state::data_map) - ADDRESS_MAP_UNMAP_HIGH - AM_RANGE(S2650_DATA_PORT, S2650_DATA_PORT) AM_READWRITE(port_r,port_w) -ADDRESS_MAP_END +void instruct_state::mem_map(address_map &map) +{ + map.unmap_value_high(); + map(0x0000, 0x0ffe).ram().share("mainram"); + map(0x0fff, 0x0fff).rw(this, FUNC(instruct_state::port_r), FUNC(instruct_state::port_w)); + map(0x1780, 0x17ff).ram().share("smiram"); + map(0x1800, 0x1fff).rom().region("roms", 0); + map(0x2000, 0x7fff).ram().share("extram"); +} + +void instruct_state::io_map(address_map &map) +{ + map.unmap_value_high(); + map(0x07, 0x07).rw(this, FUNC(instruct_state::port_r), FUNC(instruct_state::port_w)); + map(0xf8, 0xf8).w(this, FUNC(instruct_state::portf8_w)); + map(0xf9, 0xf9).w(this, FUNC(instruct_state::portf9_w)); + map(0xfa, 0xfa).w(this, FUNC(instruct_state::portfa_w)); + map(0xfc, 0xfc).r(this, FUNC(instruct_state::portfc_r)); + map(0xfd, 0xfd).r(this, FUNC(instruct_state::portfd_r)); + map(0xfe, 0xfe).r(this, FUNC(instruct_state::portfe_r)); +} + +void instruct_state::data_map(address_map &map) +{ + map.unmap_value_high(); + map(S2650_DATA_PORT, S2650_DATA_PORT).rw(this, FUNC(instruct_state::port_r), FUNC(instruct_state::port_w)); +} /* Input ports */ static INPUT_PORTS_START( instruct ) |