diff options
| author | 2012-01-11 15:57:05 +0000 | |
|---|---|---|
| committer | 2012-01-11 15:57:05 +0000 | |
| commit | 17503e2d397dcd53605339d2fcf9a417276ffb77 (patch) | |
| tree | 4eaab7c9ad5d61bc97268282a05f77c4dffcdc56 | |
| parent | 2294b2d7d15e8eb694ae97fde6d01334a06b7b64 (diff) | |
Preps for doing idectrl change to work with more devices (no whatsnew)
| -rw-r--r-- | src/emu/machine/idectrl.c | 7 | ||||
| -rw-r--r-- | src/emu/machine/idectrl.h | 2 |
2 files changed, 6 insertions, 3 deletions
diff --git a/src/emu/machine/idectrl.c b/src/emu/machine/idectrl.c index 544c3674b43..752a5b37201 100644 --- a/src/emu/machine/idectrl.c +++ b/src/emu/machine/idectrl.c @@ -1861,7 +1861,7 @@ static DEVICE_START( ide_controller ) ide->handle = get_disk_handle(device->machine(), (config->master != NULL) ? config->master : device->tag()); ide->disk = hard_disk_open(ide->handle); ide->is_image_device = false; - assert_always(config->slave == NULL, "IDE controller does not yet support slave drives\n"); + //assert_always(config->slave == NULL, "IDE controller does not yet support slave drives\n"); /* find the bus master space */ if (config->bmcpu != NULL) @@ -1972,10 +1972,13 @@ static DEVICE_STOP( ide_controller ) static DEVICE_RESET( ide_controller ) { ide_state *ide = get_safe_token(device); + const ide_config *config = (const ide_config *)downcast<const legacy_device_base *>(device)->inline_config(); LOG(("IDE controller reset performed\n")); astring hardtag; - device->siblingtag(hardtag, "harddisk"); + if (config->master) { + device->siblingtag(hardtag, config->master); + } if (device->machine().device( hardtag.cstr() )) { if (!ide->disk) diff --git a/src/emu/machine/idectrl.h b/src/emu/machine/idectrl.h index 43c121ec6b1..accb148e354 100644 --- a/src/emu/machine/idectrl.h +++ b/src/emu/machine/idectrl.h @@ -53,7 +53,7 @@ struct _ide_config #define MCFG_IDE_CONTROLLER_REGIONS(_master, _slave) \ MCFG_DEVICE_CONFIG_DATAPTR(ide_config, master, _master) \ - MCFG_DEVICE_CONFIG_DATAPTR(ide_config, master, _slave) + MCFG_DEVICE_CONFIG_DATAPTR(ide_config, slave, _slave) #define MCFG_IDE_BUS_MASTER_SPACE(_cpu, _space) \ MCFG_DEVICE_CONFIG_DATAPTR(ide_config, bmcpu, _cpu) \ |
