Previous 199869 Revisions Next

r32195 Friday 19th September, 2014 at 07:44:48 UTC by Alex Jackson
addrmap.c: Only install the default device address map if the owner didn't provide one [Alex Jackson]
[src/emu]addrmap.c

trunk/src/emu/addrmap.c
r32194r32195
334334   if (!device.interface(memintf))
335335      throw emu_fatalerror("No memory address space configuration found for device '%s', space %d\n", device.tag(), spacenum);
336336
337   // append the internal device map (first so it takes priority) */
337   // construct the internal device map (first so it takes priority)
338338   if (spaceconfig->m_internal_map != NULL)
339339      (*spaceconfig->m_internal_map)(*this, device);
340340   if (!spaceconfig->m_internal_map_delegate.isnull())
341341      spaceconfig->m_internal_map_delegate(*this, device);
342342
343   // construct the standard map */
343   // append the map provided by the owner
344344   if (memintf->address_map(spacenum) != NULL)
345345      (*memintf->address_map(spacenum))(*this, *device.owner());
346
347   // append the default device map (last so it can be overridden) */
348   if (spaceconfig->m_default_map != NULL)
349      (*spaceconfig->m_default_map)(*this, device);
350   if (!spaceconfig->m_default_map_delegate.isnull())
351      spaceconfig->m_default_map_delegate(*this, device);
346   else
347   {
348      // if the owner didn't provide a map, use the default device map
349      if (spaceconfig->m_default_map != NULL)
350         (*spaceconfig->m_default_map)(*this, device);
351      if (!spaceconfig->m_default_map_delegate.isnull())
352         spaceconfig->m_default_map_delegate(*this, device);
353   }
352354}
353355
354356

Previous 199869 Revisions Next


© 1997-2024 The MAME Team