mirror of
https://github.com/holub/mame
synced 2025-05-01 12:16:56 +03:00
Fix debugger memory view editing for address-shifted spaces
This commit is contained in:
parent
3e94624a08
commit
dd0b82a670
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user