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(*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 }