summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Miodrag Milanovic <mmicko@gmail.com>2011-06-22 12:13:55 +0000
committer Miodrag Milanovic <mmicko@gmail.com>2011-06-22 12:13:55 +0000
commitd0793e644deb26d82b901198d64a28d1c07257e9 (patch)
tree3e930dd510a115b4afe302b4570b7eb8f138c25a
parent181a54588469011e434cd565caf364dfafc5540c (diff)
Fixed AM_REGION to be relative to device (no whatsnew)
-rw-r--r--src/emu/dimemory.c4
-rw-r--r--src/emu/memory.c11
2 files changed, 11 insertions, 4 deletions
diff --git a/src/emu/dimemory.c b/src/emu/dimemory.c
index 95774786bc4..9b793f9d45f 100644
--- a/src/emu/dimemory.c
+++ b/src/emu/dimemory.c
@@ -317,8 +317,10 @@ bool device_memory_interface::interface_validity_check(emu_options &options, con
if (regiontag != NULL)
{
astring fulltag;
+ astring regiontag;
+ device().siblingtag(regiontag, entry->m_region);
rom_region_name(fulltag, &driver, source, romp);
- if (fulltag.cmp(entry->m_region) == 0)
+ if (fulltag.cmp(regiontag) == 0)
{
// verify the address range is within the region's bounds
offs_t length = ROMREGION_GETLENGTH(romp);
diff --git a/src/emu/memory.c b/src/emu/memory.c
index 8a6e1014b68..5d0b10bc3b0 100644
--- a/src/emu/memory.c
+++ b/src/emu/memory.c
@@ -2135,7 +2135,9 @@ void address_space::prepare_map()
// validate adjusted addresses against implicit regions
if (entry->m_region != NULL && entry->m_share == NULL && entry->m_baseptr == NULL)
{
- const memory_region *region = machine().region(entry->m_region);
+ astring regiontag;
+ m_device.siblingtag(regiontag, entry->m_region);
+ const memory_region *region = machine().region(regiontag.cstr());
if (region == NULL)
fatalerror("Error: device '%s' %s space memory map entry %X-%X references non-existant region \"%s\"", m_device.tag(), m_name, entry->m_addrstart, entry->m_addrend, entry->m_region);
@@ -2145,8 +2147,11 @@ void address_space::prepare_map()
}
// convert any region-relative entries to their memory pointers
- if (entry->m_region != NULL)
- entry->m_memory = machine().region(entry->m_region)->base() + entry->m_rgnoffs;
+ if (entry->m_region != NULL) {
+ astring regiontag;
+ m_device.siblingtag(regiontag, entry->m_region);
+ entry->m_memory = machine().region(regiontag.cstr())->base() + entry->m_rgnoffs;
+ }
}
// now loop over all the handlers and enforce the address mask