diff options
| author | 2018-02-15 00:43:57 -0500 | |
|---|---|---|
| committer | 2018-02-15 06:43:57 +0100 | |
| commit | 5386ad7284711f64126077aafe810a62f4f16fec (patch) | |
| tree | 3a6c3a45947bcc389e954fe83817dbacf229cb1f /src/emu/addrmap.cpp | |
| parent | 431de71d2033d389cdf1f49878c5b690c03bc891 (diff) | |
Generalized support for byte-smeared accesses (nw) (#3207)
The new cswidth address map constructor method overrides the masking normally performed on narrow-width accesses. This entailed a lot of reconfiguration to make the shifting and masking of subunits independent operations. There is unlikely to have any significant performance impact on drivers that don't frequently reconfigure their memory handlers.
Diffstat (limited to 'src/emu/addrmap.cpp')
| -rw-r--r-- | src/emu/addrmap.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/emu/addrmap.cpp b/src/emu/addrmap.cpp index ccf56f56a83..39d1609e081 100644 --- a/src/emu/addrmap.cpp +++ b/src/emu/addrmap.cpp @@ -69,6 +69,7 @@ address_map_entry::address_map_entry(device_t &device, address_map &map, offs_t m_addrmask(0), m_addrselect(0), m_mask(0), + m_cswidth(0), m_share(nullptr), m_region(nullptr), m_rgnoffs(0), @@ -430,13 +431,13 @@ address_map::address_map(device_t &device, address_map_entry *entry) // address_map - constructor dynamic device mapping case //---------------------------------------------------------- -address_map::address_map(const address_space &space, offs_t start, offs_t end, u64 unitmask, device_t &device, address_map_constructor submap_delegate) +address_map::address_map(const address_space &space, offs_t start, offs_t end, u64 unitmask, int cswidth, device_t &device, address_map_constructor submap_delegate) : m_spacenum(space.spacenum()), m_device(&device), m_unmapval(space.unmap()), m_globalmask(space.addrmask()) { - (*this)(start, end).m(DEVICE_SELF, submap_delegate).umask64(unitmask); + (*this)(start, end).m(DEVICE_SELF, submap_delegate).umask64(unitmask).cswidth(cswidth); } @@ -567,6 +568,8 @@ void address_map::import_submaps(running_machine &machine, device_t &owner, int else subentry->m_mask = entry->m_mask; + subentry->m_cswidth = std::max(subentry->m_cswidth, entry->m_cswidth); + if (subentry->m_addrend > max_end) subentry->m_addrend = max_end; |
