summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Olivier Galibert <galibert@pobox.com>2021-04-12 08:51:17 +0200
committer Olivier Galibert <galibert@pobox.com>2021-04-12 09:27:13 +0200
commit9ff6d01867dac90d6b8927663a44798357866731 (patch)
tree9374f881f4917e637974a43a4edf9110a15476dc
parentb59544c13ce0d2550a45c830050caee8b81ca7b9 (diff)
imd: do the number of tracks test only on 5.25, 8" and 3.5" is always 80, 3" is always 40
-rw-r--r--src/lib/formats/imd_dsk.cpp23
1 files changed, 12 insertions, 11 deletions
diff --git a/src/lib/formats/imd_dsk.cpp b/src/lib/formats/imd_dsk.cpp
index 6dcace2c7bd..d73c8fd78de 100644
--- a/src/lib/formats/imd_dsk.cpp
+++ b/src/lib/formats/imd_dsk.cpp
@@ -493,20 +493,21 @@ bool imd_format::load(io_generic *io, uint32_t form_factor, const std::vector<ui
}
}
- // Check if the drive is QD or HD but we're a 40 track image.
- // If so, put the image on even tracks.
- if ((has_variant(variants, floppy_image::DSQD)) ||
- (has_variant(variants, floppy_image::DSHD)))
+ if(form_factor == floppy_image::FF_525)
{
- if (maxtrack <= 39)
+ // On 5.25, check if the drive is QD or HD but we're a 40 track
+ // image. If so, put the image on even tracks.
+ if ((has_variant(variants, floppy_image::DSQD)) ||
+ (has_variant(variants, floppy_image::DSHD)))
{
- m_trackmult = 2;
+ if (maxtrack <= 39)
+ m_trackmult = 2;
+ }
+ else
+ {
+ if (maxtrack > 42)
+ return false;
}
- }
- else
- {
- if (maxtrack > 42)
- return false;
}
pos = savepos;