diff --git a/src/emu/addrmap.c b/src/emu/addrmap.c index 12985a49ba7..419e16b056a 100644 --- a/src/emu/addrmap.c +++ b/src/emu/addrmap.c @@ -60,7 +60,7 @@ inline void map_handler_data::set_tag(const device_t &device, const char *tag) m_tag = device.owner()->tag(); } else - m_tag = device.subtag(m_derived_tag, tag); + m_tag = device.siblingtag(m_derived_tag, tag); } @@ -718,7 +718,7 @@ address_map::address_map(const device_t &device, address_spacenum spacenum) // construct the standard map */ if (memintf->address_map(spacenum) != NULL) - (*memintf->address_map(spacenum))(*this, *device.owner()); + (*memintf->address_map(spacenum))(*this, device); // append the default device map (last so it can be overridden) */ if (spaceconfig->m_default_map != NULL) diff --git a/src/emu/addrmap.h b/src/emu/addrmap.h index 9f297b61b21..ce795f93034 100644 --- a/src/emu/addrmap.h +++ b/src/emu/addrmap.h @@ -1073,7 +1073,7 @@ void ADDRESS_MAP_NAME(_name)(address_map &map, const device_t &device) \ #endif - +#define AM_SUBDEVICE(_tag) device.subdevice(_tag)->tag() //************************************************************************** // GLOBAL VARIABLES diff --git a/src/emu/cpu/psx/psx.c b/src/emu/cpu/psx/psx.c index f8373605a57..146ab2d6359 100644 --- a/src/emu/cpu/psx/psx.c +++ b/src/emu/cpu/psx/psx.c @@ -1529,7 +1529,7 @@ static ADDRESS_MAP_START( psxcpu_internal_map, AS_PROGRAM, 32 ) AM_RANGE(0x1f801040, 0x1f80105f) AM_READWRITE(psx_sio_r, psx_sio_w) AM_RANGE(0x1f801060, 0x1f80106f) AM_RAM AM_RANGE(0x1f801070, 0x1f801077) AM_READWRITE(psx_irq_r, psx_irq_w) - AM_RANGE(0x1f801080, 0x1f8010ff) AM_DEVREADWRITE_MODERN("dma", psxdma_device, read, write) + AM_RANGE(0x1f801080, 0x1f8010ff) AM_DEVREADWRITE_MODERN(AM_SUBDEVICE("dma"), psxdma_device, read, write) AM_RANGE(0x1f801100, 0x1f80112f) AM_READWRITE(psx_counter_r, psx_counter_w) AM_RANGE(0x1f801810, 0x1f801817) AM_READWRITE(psx_gpu_r, psx_gpu_w) AM_RANGE(0x1f801820, 0x1f801827) AM_READWRITE(psx_mdec_r, psx_mdec_w) @@ -1553,7 +1553,7 @@ static ADDRESS_MAP_START( cxd8661r_internal_map, AS_PROGRAM, 32 ) AM_RANGE(0x1f801040, 0x1f80105f) AM_READWRITE(psx_sio_r, psx_sio_w) AM_RANGE(0x1f801060, 0x1f80106f) AM_RAM AM_RANGE(0x1f801070, 0x1f801077) AM_READWRITE(psx_irq_r, psx_irq_w) - AM_RANGE(0x1f801080, 0x1f8010ff) AM_DEVREADWRITE_MODERN("dma", psxdma_device, read, write) + AM_RANGE(0x1f801080, 0x1f8010ff) AM_DEVREADWRITE_MODERN(AM_SUBDEVICE("dma"), psxdma_device, read, write) AM_RANGE(0x1f801100, 0x1f80112f) AM_READWRITE(psx_counter_r, psx_counter_w) AM_RANGE(0x1f801810, 0x1f801817) AM_READWRITE(psx_gpu_r, psx_gpu_w) AM_RANGE(0x1f801820, 0x1f801827) AM_READWRITE(psx_mdec_r, psx_mdec_w)