bool esqimg_format::save(io_generic *io, floppy_image *image) { int track_count, head_count, sector_count; get_geometry_mfm_pc(image, 2000, track_count, head_count, sector_count); if(track_count != 80) track_count = 80; // Happens for a fully unformatted floppy if(!head_count) head_count = 2; if(sector_count != 10) sector_count = 10; UINT8 sectdata[11*512]; int track_size = sector_count*512; for(int track=0; track < track_count; track++) { for(int head=0; head < head_count; head++) { get_track_data_mfm_pc(track, head, image, 2000, 512, sector_count, sectdata); io_generic_write(io, sectdata, (track*head_count + head)*track_size, track_size); } } return true; }
bool st_format::save(io_generic *io, floppy_image *image) { int track_count, head_count, sector_count; get_geometry_mfm_pc(image, 2000, track_count, head_count, sector_count); if(track_count < 80) track_count = 80; else if(track_count > 82) track_count = 82; // Happens for a fully unformatted floppy if(!head_count) head_count = 1; if(sector_count > 11) sector_count = 11; else if(sector_count < 9) sector_count = 9; uint8_t sectdata[11*512]; int track_size = sector_count*512; for(int track=0; track < track_count; track++) { for(int head=0; head < head_count; head++) { get_track_data_mfm_pc(track, head, image, 2000, 512, sector_count, sectdata); io_generic_write(io, sectdata, (track*head_count + head)*track_size, track_size); } } return true; }
bool rx50img_format::save(io_generic *io, floppy_image *image) { int track_count, head_count, sector_count; get_geometry_mfm_pc(image, 2000, track_count, head_count, sector_count); if(track_count != 80) track_count = 80; // Happens for a fully unformatted floppy if(!head_count) head_count = 1; if(sector_count == 9) // [VT180] 9 sector format : no save! return false; if(sector_count != 10) // either 8 or 10 sectors sector_count = 10; // [STANDARD] /* if(sector_count != 10) // either 8 or 10 sectors { if(sector_count == 8) { track_count = 40; // [DOS] } else { sector_count = 10; // [STANDARD] } } */ uint8_t sectdata[11*512]; int track_size = sector_count*512; for(int track=0; track < track_count; track++) { for(int head=0; head < head_count; head++) { get_track_data_mfm_pc(track, head, image, 2000, 512, sector_count, sectdata); io_generic_write(io, sectdata, (track*head_count + head)*track_size, track_size); } } return true; }
bool mgt_format::save(io_generic *io, floppy_image *image) { int track_count, head_count, sector_count; get_geometry_mfm_pc(image, 2000, track_count, head_count, sector_count); if(sector_count > 10) sector_count = 10; else if(sector_count < 9) sector_count = 9; uint8_t sectdata[10*512]; int track_size = sector_count*512; for(int head=0; head < 2; head++) { for(int track=0; track < 80; track++) { get_track_data_mfm_pc(track, head, image, 2000, 512, sector_count, sectdata); io_generic_write(io, sectdata, (head*80 + track)*track_size, track_size); } } return true; }