mirror of
https://github.com/holub/mame
synced 2025-05-20 20:58:51 +03:00
Add DEVICE_SELF_OWNER which allows an address map to refer to the
owner of its owning device. Useful for CPU address map handlers for CPU's that are part of a device.
This commit is contained in:
parent
6387823ea6
commit
7c2a83e1ef
@ -54,6 +54,11 @@ inline void map_handler_data::set_tag(const device_config &devconfig, const char
|
||||
m_tag = NULL;
|
||||
else if (strcmp(tag, DEVICE_SELF) == 0)
|
||||
m_tag = devconfig.tag();
|
||||
else if (strcmp(tag, DEVICE_SELF_OWNER) == 0)
|
||||
{
|
||||
assert(devconfig.owner() != NULL);
|
||||
m_tag = devconfig.owner()->tag();
|
||||
}
|
||||
else
|
||||
m_tag = devconfig.siblingtag(m_derived_tag, tag);
|
||||
}
|
||||
|
@ -1082,5 +1082,8 @@ void ADDRESS_MAP_NAME(_name)(address_map &map, const device_config &devconfig) \
|
||||
// use this to refer to the owning device when providing a device tag
|
||||
static const char DEVICE_SELF[] = "";
|
||||
|
||||
// use this to refer to the owning device's owner when providing a device tag
|
||||
static const char DEVICE_SELF_OWNER[] = "^";
|
||||
|
||||
|
||||
#endif /* __ADDRMAP_H__ */
|
||||
|
Loading…
Reference in New Issue
Block a user