src/mess/machine/wd17xx.c
| r6645 | r6646 | |
| 1167 | 1167 | logerror("wd17xx_set_drive: $%02x\n", drive); |
| 1168 | 1168 | |
| 1169 | 1169 | if (w->intf->floppy_drive_tags[drive] != NULL) |
| 1170 | | w->drive = devtag_get_device(device->machine, w->intf->floppy_drive_tags[drive]); |
| 1170 | { |
| 1171 | if (device->owner != NULL) |
| 1172 | w->drive = device_find_child_by_tag(device->owner, w->intf->floppy_drive_tags[drive]); |
| 1173 | else |
| 1174 | w->drive = devtag_get_device(device->machine, w->intf->floppy_drive_tags[drive]); |
| 1175 | } |
| 1171 | 1176 | } |
| 1172 | 1177 | |
| 1173 | 1178 | void wd17xx_set_side(const device_config *device, UINT8 head) |
| r6645 | r6646 | |
| 1957 | 1962 | for (i = 0; i < 4; i++) |
| 1958 | 1963 | { |
| 1959 | 1964 | if(w->intf->floppy_drive_tags[i]!=NULL) { |
| 1960 | | const device_config *img = devtag_get_device(device->machine,w->intf->floppy_drive_tags[i]); |
| 1965 | const device_config *img; |
| 1966 | |
| 1967 | if (device->owner != NULL) |
| 1968 | img = device_find_child_by_tag(device->owner, w->intf->floppy_drive_tags[i]); |
| 1969 | else |
| 1970 | img = devtag_get_device(device->machine, w->intf->floppy_drive_tags[i]); |
| 1971 | |
| 1961 | 1972 | if (img!=NULL) { |
| 1962 | 1973 | floppy_drive_set_controller(img,device); |
| 1963 | 1974 | floppy_drive_set_index_pulse_callback(img, wd17xx_index_pulse_callback); |