Lines Matching refs:drive

47     drive_t *drive;  in drive_check_image_format()  local
49 drive = drive_context[dnr]->drive; in drive_check_image_format()
56 if (drive->type != DRIVE_TYPE_1540 in drive_check_image_format()
57 && drive->type != DRIVE_TYPE_1541 in drive_check_image_format()
58 && drive->type != DRIVE_TYPE_1541II in drive_check_image_format()
59 && drive->type != DRIVE_TYPE_1551 in drive_check_image_format()
60 && drive->type != DRIVE_TYPE_1570 in drive_check_image_format()
61 && drive->type != DRIVE_TYPE_1571 in drive_check_image_format()
62 && drive->type != DRIVE_TYPE_1571CR in drive_check_image_format()
63 && drive->type != DRIVE_TYPE_2031 in drive_check_image_format()
64 && drive->type != DRIVE_TYPE_2040 /* FIXME: only read compat */ in drive_check_image_format()
65 && drive->type != DRIVE_TYPE_3040 in drive_check_image_format()
66 && drive->type != DRIVE_TYPE_4040) { in drive_check_image_format()
71 if ((drive->type != DRIVE_TYPE_1571) in drive_check_image_format()
72 && (drive->type != DRIVE_TYPE_1571CR)) { in drive_check_image_format()
78 if (drive->type != DRIVE_TYPE_1540 in drive_check_image_format()
79 && drive->type != DRIVE_TYPE_1541 in drive_check_image_format()
80 && drive->type != DRIVE_TYPE_1541II in drive_check_image_format()
81 && drive->type != DRIVE_TYPE_1551 in drive_check_image_format()
82 && drive->type != DRIVE_TYPE_1570 in drive_check_image_format()
83 && drive->type != DRIVE_TYPE_1571 in drive_check_image_format()
84 && drive->type != DRIVE_TYPE_1571CR in drive_check_image_format()
85 && drive->type != DRIVE_TYPE_2031 in drive_check_image_format()
86 && drive->type != DRIVE_TYPE_2040 in drive_check_image_format()
87 && drive->type != DRIVE_TYPE_3040 in drive_check_image_format()
88 && drive->type != DRIVE_TYPE_4040) { in drive_check_image_format()
93 if (drive->type != DRIVE_TYPE_1571 in drive_check_image_format()
94 && drive->type != DRIVE_TYPE_1571CR) { in drive_check_image_format()
99 if (drive->type != DRIVE_TYPE_1581 in drive_check_image_format()
100 && drive->type != DRIVE_TYPE_2000 in drive_check_image_format()
101 && drive->type != DRIVE_TYPE_4000) { in drive_check_image_format()
107 if ((drive->type != DRIVE_TYPE_1001) in drive_check_image_format()
108 && (drive->type != DRIVE_TYPE_8050) in drive_check_image_format()
109 && (drive->type != DRIVE_TYPE_8250)) { in drive_check_image_format()
116 if (drive->type != DRIVE_TYPE_2000 in drive_check_image_format()
117 && drive->type != DRIVE_TYPE_4000) { in drive_check_image_format()
131 drive_t *drive; in drive_image_attach() local
138 drive = drive_context[dnr]->drive; in drive_image_attach()
144 drive->read_only = image->read_only; in drive_image_attach()
145 drive->attach_clk = drive_clk[dnr]; in drive_image_attach()
146 if (drive->detach_clk > (CLOCK)0) { in drive_image_attach()
147 drive->attach_detach_clk = drive_clk[dnr]; in drive_image_attach()
149 drive->ask_extend_disk_image = 1; in drive_image_attach()
165 drive->image = image; in drive_image_attach()
166 drive->image->gcr = drive->gcr; in drive_image_attach()
167 drive->image->p64 = (void*)drive->p64; in drive_image_attach()
169 if (disk_image_read_image(drive->image) < 0) { in drive_image_attach()
170 drive->image = NULL; in drive_image_attach()
173 if (drive->image->type == DISK_IMAGE_TYPE_P64) { in drive_image_attach()
174 drive->P64_image_loaded = 1; in drive_image_attach()
175 drive->P64_dirty = 0; in drive_image_attach()
177 drive->GCR_image_loaded = 1; in drive_image_attach()
179 drive->complicated_image_loaded = ((drive->image->type == DISK_IMAGE_TYPE_P64) in drive_image_attach()
180 || (drive->image->type == DISK_IMAGE_TYPE_G64) in drive_image_attach()
181 || (drive->image->type == DISK_IMAGE_TYPE_G71)); in drive_image_attach()
182 drive_set_half_track(drive->current_half_track, drive->side, drive); in drive_image_attach()
190 drive_t *drive; in drive_image_detach() local
197 drive = drive_context[dnr]->drive; in drive_image_detach()
199 if (drive->image != NULL) { in drive_image_detach()
215 if (drive->P64_image_loaded && drive->P64_dirty) { in drive_image_detach()
216 drive->P64_dirty = 0; in drive_image_detach()
217 if (disk_image_write_p64_image(drive->image) < 0) { in drive_image_detach()
218 log_error(drive->log, "Cannot write disk image back."); in drive_image_detach()
221 drive_gcr_data_writeback(drive); in drive_image_detach()
225 if (drive->gcr->tracks[i].data) { in drive_image_detach()
226 lib_free(drive->gcr->tracks[i].data); in drive_image_detach()
227 drive->gcr->tracks[i].data = NULL; in drive_image_detach()
228 drive->gcr->tracks[i].size = 0; in drive_image_detach()
231 drive->detach_clk = drive_clk[dnr]; in drive_image_detach()
232 drive->GCR_image_loaded = 0; in drive_image_detach()
233 drive->P64_image_loaded = 0; in drive_image_detach()
234 drive->read_only = 0; in drive_image_detach()
235 drive->image = NULL; in drive_image_detach()
236 drive_set_half_track(drive->current_half_track, drive->side, drive); in drive_image_detach()