| Previous | 15994 Revisions | Next |
| r2192 Tuesday 1st April, 2008 at 01:36:28 UTC by Nathan Woods |
|---|
| Removed image_device() |
| [src/mess] | image.c image.h |
| [src/mess/devices] | appldriv.c idedrive.c mflopimg.c snapquik.c |
| [src/mess/osd/windows] | menu.c |
| [src/mess/tools/messtest] | testmess.c |
| r2191 | r2192 | |
|---|---|---|
| 20 | 20 | device_image_load_func *parent_load, |
| 21 | 21 | device_image_unload_func *parent_unload) |
| 22 | 22 | { |
| 23 | const mess_device_class *devclass = &im | |
| 23 | const mess_device_class *devclass = &mess_device_from_core_device(image)->devclass; | |
| 24 | 24 | mess_device_class parent_devclass; |
| 25 | 25 | |
| 26 | 26 | *which_bus = image_index_in_device(image); |
| r2191 | r2192 | |
|---|---|---|
| 279 | 279 | flopimg = get_flopimg(image); |
| 280 | 280 | |
| 281 | 281 | /* figure out the floppy options */ |
| 282 | dev = im | |
| 282 | dev = mess_device_from_core_device(image); | |
| 283 | 283 | floppy_options = mess_device_get_info_ptr(&dev->devclass, MESS_DEVINFO_PTR_FLOPPY_OPTIONS); |
| 284 | 284 | |
| 285 | 285 | if (image_has_been_created(image)) |
| r2191 | r2192 | |
| 308 | 308 | apply double steps. Setting the track count of the drive to the |
| 309 | 309 | medium track count will then lead to unreachable tracks. |
| 310 | 310 | */ |
| 311 | keep_geometry = (int)mess_device_get_info_int(&im | |
| 311 | keep_geometry = (int)mess_device_get_info_int(&mess_device_from_core_device(image)->devclass, MESS_DEVINFO_INT_KEEP_DRIVE_GEOMETRY); | |
| 312 | 312 | |
| 313 | 313 | if (!keep_geometry |
| 314 | 314 | && floppy_callbacks(flopimg->floppy)->get_heads_per_disk |
| r2191 | r2192 | |
|---|---|---|
| 175 | 175 | const struct IODevice *dev; |
| 176 | 176 | |
| 177 | 177 | disk = (struct apple525_disk *) image_lookuptag(img, APPLE525TAG); |
| 178 | dev = im | |
| 178 | dev = mess_device_from_core_device(img); | |
| 179 | 179 | spinfract_dividend = (int) mess_device_get_info_int(&dev->devclass, MESS_DEVINFO_INT_APPLE525_SPINFRACT_DIVIDEND); |
| 180 | 180 | spinfract_divisor = (int) mess_device_get_info_int(&dev->devclass, MESS_DEVINFO_INT_APPLE525_SPINFRACT_DIVISOR); |
| 181 | 181 |
| r2191 | r2192 | |
|---|---|---|
| 53 | 53 | if (!si) |
| 54 | 54 | return INIT_FAIL; |
| 55 | 55 | |
| 56 | dev = im | |
| 56 | dev = mess_device_from_core_device(image); | |
| 57 | 57 | assert(dev); |
| 58 | 58 | |
| 59 | 59 | si->dev = dev; |
| r2191 | r2192 | |
|---|---|---|
| 690 | 690 | device_typename(device_type), device_slot); |
| 691 | 691 | return; |
| 692 | 692 | } |
| 693 | dev = im | |
| 693 | dev = mess_device_from_core_device(image); | |
| 694 | 694 | file_extensions = dev->file_extensions; |
| 695 | 695 | |
| 696 | 696 | /* is an image format specified? */ |
| r2191 | r2192 | |
|---|---|---|
| 1047 | 1047 | ****************************************************************************/ |
| 1048 | 1048 | |
| 1049 | 1049 | /*------------------------------------------------- |
| 1050 | image_device | |
| 1051 | -------------------------------------------------*/ | |
| 1052 | ||
| 1053 | const struct IODevice *image_device(const device_config *image) | |
| 1054 | { | |
| 1055 | return mess_device_from_core_device(image); | |
| 1056 | } | |
| 1057 | ||
| 1058 | ||
| 1059 | ||
| 1060 | /*------------------------------------------------- | |
| 1061 | 1050 | image_exists |
| 1062 | 1051 | -------------------------------------------------*/ |
| 1063 | 1052 |
| r2191 | r2192 | |
|---|---|---|
| 125 | 125 | These provide information about the device; and about the mounted image |
| 126 | 126 | ****************************************************************************/ |
| 127 | 127 | |
| 128 | const struct IODevice *image_device(const device_config *image); | |
| 129 | 128 | int image_exists(const device_config *image); |
| 130 | 129 | int image_slotexists(const device_config *image); |
| 131 | 130 |
| r2191 | r2192 | |
|---|---|---|
| 824 | 824 | char filter[2048]; |
| 825 | 825 | char filename[MAX_PATH]; |
| 826 | 826 | char buffer[512]; |
| 827 | const struct IODevice *dev = im | |
| 827 | const struct IODevice *dev = mess_device_from_core_device(img); | |
| 828 | 828 | const char *initial_dir; |
| 829 | 829 | BOOL result; |
| 830 | 830 | int create_format = 0; |
| Previous | 15994 Revisions | Next |