trunk/src/emu/addrmap.c
| r32194 | r32195 | |
| 334 | 334 | if (!device.interface(memintf)) |
| 335 | 335 | throw emu_fatalerror("No memory address space configuration found for device '%s', space %d\n", device.tag(), spacenum); |
| 336 | 336 | |
| 337 | | // append the internal device map (first so it takes priority) */ |
| 337 | // construct the internal device map (first so it takes priority) |
| 338 | 338 | if (spaceconfig->m_internal_map != NULL) |
| 339 | 339 | (*spaceconfig->m_internal_map)(*this, device); |
| 340 | 340 | if (!spaceconfig->m_internal_map_delegate.isnull()) |
| 341 | 341 | spaceconfig->m_internal_map_delegate(*this, device); |
| 342 | 342 | |
| 343 | | // construct the standard map */ |
| 343 | // append the map provided by the owner |
| 344 | 344 | if (memintf->address_map(spacenum) != NULL) |
| 345 | 345 | (*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 | } |
| 352 | 354 | } |
| 353 | 355 | |
| 354 | 356 | |