summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author AJR <ajrhacker@users.noreply.github.com>2018-02-01 20:04:37 -0500
committer AJR <ajrhacker@users.noreply.github.com>2018-02-01 20:06:15 -0500
commitfe500377ad3ef1566b4fd7db2700f46223a88407 (patch)
treea907e863b0df206166eb155e8ee50f5a52c232da
parent5ed941c5a53a838e7508fd1f6db65f0e8b9a3a6e (diff)
address_map: Internal maps must now be constructed last to have priority (nw)
This fixes sound in mpatrol.
-rw-r--r--src/emu/addrmap.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/emu/addrmap.cpp b/src/emu/addrmap.cpp
index 0d6ba930022..1b9c5142a0a 100644
--- a/src/emu/addrmap.cpp
+++ b/src/emu/addrmap.cpp
@@ -348,12 +348,6 @@ address_map::address_map(device_t &device, int spacenum)
if (spaceconfig == nullptr)
throw emu_fatalerror("No memory address space configuration found for device '%s', space %d\n", m_device->tag(), spacenum);
- // construct the internal device map (first so it takes priority)
- if (spaceconfig->m_internal_map != nullptr)
- (*spaceconfig->m_internal_map)(*this);
- if (!spaceconfig->m_internal_map_delegate.isnull())
- spaceconfig->m_internal_map_delegate(*this);
-
// append the map provided by the owner
if (memintf->address_map(spacenum) != nullptr)
{
@@ -369,6 +363,12 @@ address_map::address_map(device_t &device, int spacenum)
if (!spaceconfig->m_default_map_delegate.isnull())
spaceconfig->m_default_map_delegate(*this);
}
+
+ // construct the internal device map (last so it takes priority)
+ if (spaceconfig->m_internal_map != nullptr)
+ (*spaceconfig->m_internal_map)(*this);
+ if (!spaceconfig->m_internal_map_delegate.isnull())
+ spaceconfig->m_internal_map_delegate(*this);
}