summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/debug/dvmemory.cpp
diff options
context:
space:
mode:
author AJR <ajrhacker@users.noreply.github.com>2018-03-11 15:23:35 -0400
committer AJR <ajrhacker@users.noreply.github.com>2018-03-11 15:23:35 -0400
commit7f934429fa64c3e0c2fdbc5d525e30de7af9687e (patch)
tree69bc1860ed05d49cd5ba1699251f3874f0edeb26 /src/emu/debug/dvmemory.cpp
parent2529988446be6ef07b47dd75ab46a6e663979311 (diff)
Fix extent of debug view of address-shifted memory spaces
Diffstat (limited to 'src/emu/debug/dvmemory.cpp')
-rw-r--r--src/emu/debug/dvmemory.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/emu/debug/dvmemory.cpp b/src/emu/debug/dvmemory.cpp
index d6038214e2d..86f038e535a 100644
--- a/src/emu/debug/dvmemory.cpp
+++ b/src/emu/debug/dvmemory.cpp
@@ -540,14 +540,16 @@ void debug_view_memory::recompute()
// determine the maximum address and address format string from the raw information
int addrchars;
+ u64 maxbyte;
if (source.m_space != nullptr)
{
m_maxaddr = m_no_translation ? source.m_space->addrmask() : source.m_space->logaddrmask();
+ maxbyte = source.m_space->address_to_byte_end(m_maxaddr);
addrchars = m_no_translation ? source.m_space->addrchars() : source.m_space->logaddrchars();
}
else
{
- m_maxaddr = source.m_length - 1;
+ maxbyte = m_maxaddr = source.m_length - 1;
addrchars = string_format("%X", m_maxaddr).size();
}
@@ -607,7 +609,7 @@ void debug_view_memory::recompute()
}
// derive total sizes from that
- m_total.y = (u64(m_maxaddr) - u64(m_byte_offset) + u64(m_bytes_per_row) /*- 1*/) / m_bytes_per_row;
+ m_total.y = (maxbyte - u64(m_byte_offset) + u64(m_bytes_per_row) /*- 1*/) / m_bytes_per_row;
// reset the current cursor position
set_cursor_pos(pos);