diff options
author | AJR <ajrhacker@users.noreply.github.com> | 2018-09-24 14:39:16 -0400 |
---|---|---|
committer | AJR <ajrhacker@users.noreply.github.com> | 2018-09-24 14:39:20 -0400 |
commit | dd0b82a670e3d62c1f4ba4a4b69c83fd827e6421 (patch) | |
tree | 057fa88a2e46f46b33c394aef2582d25d058e940 | |
parent | 3e94624a08c7074355576021f07ef02b64d08d47 (diff) |
Fix debugger memory view editing for address-shifted spaces
-rw-r--r-- | src/emu/debug/dvmemory.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/emu/debug/dvmemory.cpp b/src/emu/debug/dvmemory.cpp index 63c2f445b30..fd27ca40abd 100644 --- a/src/emu/debug/dvmemory.cpp +++ b/src/emu/debug/dvmemory.cpp @@ -464,14 +464,16 @@ void debug_view_memory::view_char(int chval) if (hexchar == nullptr) break; + const debug_view_memory_source &source = downcast<const debug_view_memory_source &>(*m_source); + offs_t address = (source.m_space != nullptr) ? source.m_space->byte_to_address(pos.m_address) : pos.m_address; u64 data; - bool ismapped = read(m_bytes_per_chunk, pos.m_address, data); + bool ismapped = read(m_bytes_per_chunk, address, data); if (!ismapped) break; data &= ~(u64(0x0f) << pos.m_shift); data |= u64(hexchar - hexvals) << pos.m_shift; - write(m_bytes_per_chunk, pos.m_address, data); + write(m_bytes_per_chunk, address, data); // fall through to the right-arrow press } |