Previous 15994 Revisions Next

r15735 Friday 3rd August, 2012 at 18:59:49 UTC by Olivier Galibert
memory: Add support for dynamically mapping devices [O. Galibert]

Just call install_device on the space with as parameters:
- start and end of the mapping zone
- device (not pointer to the device)
- map method

and optionally, if the device data width is not the same than the
space data width:
- device data width (for consistency checking)
- unit mask

For instance, the static mapping:
AM_RANGE(0x02114100, 0x02114107) AM_DEVICE8("fdc", n82077aa_device, amap, 0xffffffff)

can be converted to a dynamic mapping (where fdc is a pointer to the device):
machine().device("maincpu")->memory().space(AS_PROGRAM)->
install_device(0x02114100, 0x02114107, *fdc, &n82077aa_device::amap, 8, 0xffffffff);
[src/emu]addrmap.c addrmap.h memory.c memory.h

Previous 15994 Revisions Next


© 1998-2018 The MESS Team