summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/divtlb.cpp
diff options
context:
space:
mode:
author AJR <ajrhacker@users.noreply.github.com>2017-07-31 23:47:16 -0400
committer AJR <ajrhacker@users.noreply.github.com>2017-08-01 00:21:19 -0400
commitbb0964f9a284b15851773f5428bd602ca01cc28b (patch)
treee2c7c0dc17e42a88046cf6de8b357daee868b9d9 /src/emu/divtlb.cpp
parentd050ba956ed79015389bc2cba7399db9cbd62684 (diff)
Changes to debugger memory address translation
- memory_translate now returns an address space number rather a boolean flag, permitting addresses in part of one space to map to an entirely different space. This is primarily intended to help MCUs which have blocks of internal memory that can be dynamically remapped, but may also allow for more accurate emulation of MMUs that drive multiple external address spaces, since the old limit of four address spaces per MAME device has been lifted. - memory_translate has also been made a const method, in spite of a couple of badly behaved CPU cores that can't honestly treat it as one. - The (read|write)_(byte|word|dword|qword|memory|opcode) accessors have been transferred from debugger_cpu to device_memory_interface, with somewhat modified arguments corresponding to the translate function it calls through to if requested.
Diffstat (limited to 'src/emu/divtlb.cpp')
-rw-r--r--src/emu/divtlb.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/emu/divtlb.cpp b/src/emu/divtlb.cpp
index 0689bb9c68a..0b379bc08b4 100644
--- a/src/emu/divtlb.cpp
+++ b/src/emu/divtlb.cpp
@@ -143,7 +143,6 @@ bool device_vtlb_interface::vtlb_fill(offs_t address, int intention)
{
offs_t tableindex = address >> m_pageshift;
vtlb_entry entry = m_table[tableindex];
- offs_t taddress;
#if PRINTF_TLB
osd_printf_debug("vtlb_fill: %08X(%X) ... ", address, intention);
@@ -162,8 +161,8 @@ bool device_vtlb_interface::vtlb_fill(offs_t address, int intention)
}
// ask the CPU core to translate for us
- taddress = address;
- if (!device().memory().translate(m_space, intention, taddress))
+ offs_t taddress = address;
+ if (device().memory().translate(m_space, intention, taddress) != m_space)
{
#if PRINTF_TLB
osd_printf_debug("failed: no translation\n");