diff options
author | AJR <ajrhacker@users.noreply.github.com> | 2016-04-07 18:59:38 -0400 |
---|---|---|
committer | AJR <ajrhacker@users.noreply.github.com> | 2016-04-07 18:59:38 -0400 |
commit | c0f366c61374775f8f8b7661e84705b568134dea (patch) | |
tree | 626e95fa31e6e8480983abbe305c0415ded783d2 /src/mame/machine/naomim1.cpp | |
parent | 5933d47ed740fd08c2f66f37fdca4f95e08df3d4 (diff) |
Devfind revision phase 1, cleaning out some legacy stuff
- Eliminate the cached device_t::m_region pointer and its region() getter method. Devices that need to bind to a region with the same tag should use optional/required_memory_region or optional/required_region_ptr with DEVICE_SELF as the subtag; this improves error checking. (DEVICE_SELF has been moved to device.h for greater visibility in the source.)
- Allow required/optional_region_ptr to specify a specific length which must match that of the region found.
- Implement finder_base::finder_tag() getter for diagnostic purposes.
- Perform some (not very efficient) validity checks on memory region finders instead of allowing them to automatically pass.
- Privatize device_memory_interface::m_addrspace.
Diffstat (limited to 'src/mame/machine/naomim1.cpp')
-rw-r--r-- | src/mame/machine/naomim1.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/mame/machine/naomim1.cpp b/src/mame/machine/naomim1.cpp index 7e205ce1ee7..a456bc8cdb8 100644 --- a/src/mame/machine/naomim1.cpp +++ b/src/mame/machine/naomim1.cpp @@ -13,15 +13,16 @@ DEVICE_ADDRESS_MAP_START(submap, 16, naomi_m1_board) ADDRESS_MAP_END naomi_m1_board::naomi_m1_board(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) - : naomi_board(mconfig, NAOMI_M1_BOARD, "Sega NAOMI M1 Board", tag, owner, clock, "naomi_m1_board", __FILE__) + : naomi_board(mconfig, NAOMI_M1_BOARD, "Sega NAOMI M1 Board", tag, owner, clock, "naomi_m1_board", __FILE__), + m_region(*this, DEVICE_SELF) { } READ16_MEMBER(naomi_m1_board::actel_id_r) { - if (rombdid_tag && memregion(rombdid_tag) != nullptr) + if (rombdid_tag && owner()->memregion(rombdid_tag) != nullptr) { - const UINT8 *bdid = memregion(rombdid_tag)->base(); + const UINT8 *bdid = owner()->memregion(rombdid_tag)->base(); return bdid[0] | (bdid[1] << 8); } |