diff options
author | Olivier Galibert <galibert@pobox.com> | 2022-11-12 11:51:19 +0100 |
---|---|---|
committer | Olivier Galibert <galibert@pobox.com> | 2022-11-12 11:52:03 +0100 |
commit | 1b0163f8d2cae5fe9ce8e9849b418a2ed68d96b6 (patch) | |
tree | 12fe7f4d21d6d9e38eab4e76f751f4a051bbc2d5 /src/emu | |
parent | 7fadefda15a5f382fc75bbdd317f3a060e1359ea (diff) |
mview: Don't forget to select the correct page when installing handlers, especially dynamically.
Diffstat (limited to 'src/emu')
-rw-r--r-- | src/emu/emumem_mview.cpp | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/src/emu/emumem_mview.cpp b/src/emu/emumem_mview.cpp index becf9fcf7d8..9fc7a0e0f6e 100644 --- a/src/emu/emumem_mview.cpp +++ b/src/emu/emumem_mview.cpp @@ -339,6 +339,9 @@ public: 8 << Width, 8 << AccessWidth, handler_r.name(), data_width() / 4, unitmask); + r()->select_u(m_id); + w()->select_u(m_id); + offs_t nstart, nend, nmask, nmirror; u64 nunitmask; int ncswidth; @@ -372,6 +375,9 @@ public: 8 << Width, 8 << AccessWidth, handler_w.name(), data_width() / 4, unitmask); + r()->select_u(m_id); + w()->select_u(m_id); + offs_t nstart, nend, nmask, nmirror; u64 nunitmask; int ncswidth; @@ -406,6 +412,9 @@ public: 8 << Width, 8 << AccessWidth, handler_r.name(), handler_w.name(), data_width() / 4, unitmask); + r()->select_u(m_id); + w()->select_u(m_id); + offs_t nstart, nend, nmask, nmirror; u64 nunitmask; int ncswidth; @@ -484,10 +493,6 @@ memory_view::memory_view_entry &memory_view::operator[](int slot) m_entries.resize(id+1); m_entries[id].reset(e); m_entry_mapping[slot] = id; - if (m_handler_read) { - m_handler_read->select_u(id); - m_handler_write->select_u(id); - } return *e; } else @@ -959,6 +964,10 @@ template<int Level, int Width, int AddrShift> memory_passthrough_handler memory_ template<int Level, int Width, int AddrShift> void memory_view_entry_specific<Level, Width, AddrShift>::install_device_delegate(offs_t addrstart, offs_t addrend, device_t &device, address_map_constructor &delegate, u64 unitmask, int cswidth, u16 flags) { check_range_address("install_device_delegate", addrstart, addrend); + + r()->select_u(m_id); + w()->select_u(m_id); + address_map map(*m_view.m_space, addrstart, addrend, unitmask, cswidth, flags, m_view.m_device, delegate); map.import_submaps(m_manager.machine(), device, data_width(), endianness(), addr_shift()); prepare_device_map(map); |