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/sun2.cpp | |
parent | f155992daab88ad024cec995428a67108218b51d (diff) |
Address maps macros removal, pass 1 [O. Galibert]
Diffstat (limited to 'src/mame/drivers/sun2.cpp')
-rw-r--r-- | src/mame/drivers/sun2.cpp | 79 |
1 files changed, 44 insertions, 35 deletions
diff --git a/src/mame/drivers/sun2.cpp b/src/mame/drivers/sun2.cpp index 912a8bdc8c0..e47dbc82237 100644 --- a/src/mame/drivers/sun2.cpp +++ b/src/mame/drivers/sun2.cpp @@ -479,69 +479,78 @@ WRITE16_MEMBER( sun2_state::video_ctrl_w ) COMBINE_DATA(&m_bw2_ctrl); } -ADDRESS_MAP_START(sun2_state::sun2_mem) - AM_RANGE(0x000000, 0xffffff) AM_READWRITE( tl_mmu_r, tl_mmu_w ) -ADDRESS_MAP_END +void sun2_state::sun2_mem(address_map &map) +{ + map(0x000000, 0xffffff).rw(this, FUNC(sun2_state::tl_mmu_r), FUNC(sun2_state::tl_mmu_w)); +} // VME memory spaces // type 0 device space -ADDRESS_MAP_START(sun2_state::vmetype0space_map) - AM_RANGE(0x000000, 0x7fffff) AM_READWRITE(ram_r, ram_w) -ADDRESS_MAP_END +void sun2_state::vmetype0space_map(address_map &map) +{ + map(0x000000, 0x7fffff).rw(this, FUNC(sun2_state::ram_r), FUNC(sun2_state::ram_w)); +} // type 1 device space -ADDRESS_MAP_START(sun2_state::vmetype1space_map) - AM_RANGE(0x000000, 0x01ffff) AM_RAM AM_SHARE("bw2_vram") - AM_RANGE(0x020000, 0x020001) AM_READWRITE( video_ctrl_r, video_ctrl_w ) - AM_RANGE(0x7f0000, 0x7f07ff) AM_ROM AM_REGION("bootprom", 0) // uses MMU loophole to read 32k from a 2k window +void sun2_state::vmetype1space_map(address_map &map) +{ + map(0x000000, 0x01ffff).ram().share("bw2_vram"); + map(0x020000, 0x020001).rw(this, FUNC(sun2_state::video_ctrl_r), FUNC(sun2_state::video_ctrl_w)); + map(0x7f0000, 0x7f07ff).rom().region("bootprom", 0); // uses MMU loophole to read 32k from a 2k window // 7f0800-7f0fff: Ethernet interface // 7f1000-7f17ff: AM9518 encryption processor //AM_RANGE(0x7f1800, 0x7f1801) AM_DEVREADWRITE8(SCC1_TAG, z80scc_device, cb_r, cb_w, 0xff00) //AM_RANGE(0x7f1802, 0x7f1803) AM_DEVREADWRITE8(SCC1_TAG, z80scc_device, db_r, db_w, 0xff00) //AM_RANGE(0x7f1804, 0x7f1805) AM_DEVREADWRITE8(SCC1_TAG, z80scc_device, ca_r, ca_w, 0xff00) //AM_RANGE(0x7f1806, 0x7f1807) AM_DEVREADWRITE8(SCC1_TAG, z80scc_device, da_r, da_w, 0xff00) - AM_RANGE(0x7f2000, 0x7f2001) AM_DEVREADWRITE8(SCC2_TAG, z80scc_device, cb_r, cb_w, 0xff00) - AM_RANGE(0x7f2002, 0x7f2003) AM_DEVREADWRITE8(SCC2_TAG, z80scc_device, db_r, db_w, 0xff00) - AM_RANGE(0x7f2004, 0x7f2005) AM_DEVREADWRITE8(SCC2_TAG, z80scc_device, ca_r, ca_w, 0xff00) - AM_RANGE(0x7f2006, 0x7f2007) AM_DEVREADWRITE8(SCC2_TAG, z80scc_device, da_r, da_w, 0xff00) - AM_RANGE(0x7f2800, 0x7f2803) AM_MIRROR(0x7fc) AM_DEVREADWRITE("timer", am9513_device, read16, write16) -ADDRESS_MAP_END + map(0x7f2000, 0x7f2000).rw(SCC2_TAG, FUNC(z80scc_device::cb_r), FUNC(z80scc_device::cb_w)); + map(0x7f2002, 0x7f2002).rw(SCC2_TAG, FUNC(z80scc_device::db_r), FUNC(z80scc_device::db_w)); + map(0x7f2004, 0x7f2004).rw(SCC2_TAG, FUNC(z80scc_device::ca_r), FUNC(z80scc_device::ca_w)); + map(0x7f2006, 0x7f2006).rw(SCC2_TAG, FUNC(z80scc_device::da_r), FUNC(z80scc_device::da_w)); + map(0x7f2800, 0x7f2803).mirror(0x7fc).rw("timer", FUNC(am9513_device::read16), FUNC(am9513_device::write16)); +} // type 2 device space -ADDRESS_MAP_START(sun2_state::vmetype2space_map) -ADDRESS_MAP_END +void sun2_state::vmetype2space_map(address_map &map) +{ +} // type 3 device space -ADDRESS_MAP_START(sun2_state::vmetype3space_map) -ADDRESS_MAP_END +void sun2_state::vmetype3space_map(address_map &map) +{ +} // Multibus memory spaces // type 0 device space -ADDRESS_MAP_START(sun2_state::mbustype0space_map) - AM_RANGE(0x000000, 0x3fffff) AM_READWRITE(ram_r, ram_w) +void sun2_state::mbustype0space_map(address_map &map) +{ + map(0x000000, 0x3fffff).rw(this, FUNC(sun2_state::ram_r), FUNC(sun2_state::ram_w)); // 7f80000-7f807ff: Keyboard/mouse SCC8530 //AM_RANGE(0x7f8000, 0x7f8007) AM_DEVREADWRITE8(SCC1_TAG, z80scc_device, ba_cd_inv_r, ba_cd_inv_w, 0xff00) - AM_RANGE(0x700000, 0x71ffff) AM_RAM AM_SHARE("bw2_vram") - AM_RANGE(0x781800, 0x781801) AM_READWRITE( video_ctrl_r, video_ctrl_w ) -ADDRESS_MAP_END + map(0x700000, 0x71ffff).ram().share("bw2_vram"); + map(0x781800, 0x781801).rw(this, FUNC(sun2_state::video_ctrl_r), FUNC(sun2_state::video_ctrl_w)); +} // type 1 device space -ADDRESS_MAP_START(sun2_state::mbustype1space_map) - AM_RANGE(0x000000, 0x0007ff) AM_ROM AM_REGION("bootprom", 0) // uses MMU loophole to read 32k from a 2k window +void sun2_state::mbustype1space_map(address_map &map) +{ + map(0x000000, 0x0007ff).rom().region("bootprom", 0); // uses MMU loophole to read 32k from a 2k window // 001000-0017ff: AM9518 encryption processor // 001800-001fff: Parallel port - AM_RANGE(0x002000, 0x0027ff) AM_DEVREADWRITE8(SCC2_TAG, z80scc_device, ba_cd_inv_r, ba_cd_inv_w, 0xff00) - AM_RANGE(0x002800, 0x002803) AM_MIRROR(0x7fc) AM_DEVREADWRITE("timer", am9513_device, read16, write16) - AM_RANGE(0x003800, 0x00383f) AM_MIRROR(0x7c0) AM_DEVREADWRITE8("rtc", mm58167_device, read, write, 0xff00) // 12 wait states generated by PAL16R6 (U415) -ADDRESS_MAP_END + map(0x002000, 0x0027ff).rw(SCC2_TAG, FUNC(z80scc_device::ba_cd_inv_r), FUNC(z80scc_device::ba_cd_inv_w)).umask16(0xff00); + map(0x002800, 0x002803).mirror(0x7fc).rw("timer", FUNC(am9513_device::read16), FUNC(am9513_device::write16)); + map(0x003800, 0x00383f).mirror(0x7c0).rw("rtc", FUNC(mm58167_device::read), FUNC(mm58167_device::write)).umask16(0xff00); // 12 wait states generated by PAL16R6 (U415) +} // type 2 device space (Multibus memory space) -ADDRESS_MAP_START(sun2_state::mbustype2space_map) -ADDRESS_MAP_END +void sun2_state::mbustype2space_map(address_map &map) +{ +} // type 3 device space (Multibus I/O space) -ADDRESS_MAP_START(sun2_state::mbustype3space_map) -ADDRESS_MAP_END +void sun2_state::mbustype3space_map(address_map &map) +{ +} uint32_t sun2_state::bw2_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) { |