Previous 15994 Revisions Next

r6032 Saturday 10th October, 2009 at 18:38:54 UTC by Dirk Best
[NEC765] Fixed to allow it to run inside another device
[src/mess/machine]nec765.c

src/mess/machine/nec765.c
r6031r6032
173173
174174   if (!fdc->intf->get_image)
175175   {
176      if (fdc->intf->floppy_drive_tags[fdc->drive]!=NULL) {
177         image = devtag_get_device(device->machine,fdc->intf->floppy_drive_tags[fdc->drive]);
176      if (fdc->intf->floppy_drive_tags[fdc->drive] != NULL)
177      {
178         if (device->owner != NULL)
179            image = device_find_child_by_tag(device->owner, fdc->intf->floppy_drive_tags[fdc->drive]);
180         else
181            image = devtag_get_device(device->machine, fdc->intf->floppy_drive_tags[fdc->drive]);
178182      }
179183   }
180184   else
r6031r6032
22122216      a_drive_is_ready = 0;
22132217      for (i = 0; i < 4; i++)
22142218      {
2215         if (fdc->intf->floppy_drive_tags[i]!=NULL) {
2216            if (image_exists(devtag_get_device(device->machine,fdc->intf->floppy_drive_tags[i]))) {
2219         if (fdc->intf->floppy_drive_tags[i]!=NULL)
2220         {
2221            const device_config *img;
2222
2223            if (device->owner != NULL)
2224               img = device_find_child_by_tag(device->owner, fdc->intf->floppy_drive_tags[i]);
2225            else
2226               img = devtag_get_device(device->machine, fdc->intf->floppy_drive_tags[i]);
2227
2228            if (image_exists(img))
2229            {
22172230               a_drive_is_ready = 1;
22182231               break;
22192232            }
r6031r6032
23322345   int i;
23332346   nec765_t *fdc = get_safe_token(device);
23342347   for (i = 0; i < 4; i++) {
2335      if (fdc->intf->floppy_drive_tags[i]!=NULL) {
2336         const device_config *img = devtag_get_device(device->machine,fdc->intf->floppy_drive_tags[i]);
2348      if (fdc->intf->floppy_drive_tags[i]!=NULL)
2349      {
2350         const device_config *img;
2351
2352         if (device->owner != NULL)
2353            img = device_find_child_by_tag(device->owner, fdc->intf->floppy_drive_tags[i]);
2354         else
2355            img = devtag_get_device(device->machine, fdc->intf->floppy_drive_tags[i]);
2356
23372357         floppy_drive_set_controller(img, device);
23382358         floppy_drive_set_ready_state_change_callback(img, nec765_set_ready_change_callback);
23392359      }

Previous 15994 Revisions Next


© 1998-2018 The MESS Team