diff options
author | 2019-04-11 22:14:30 +0200 | |
---|---|---|
committer | 2019-04-11 22:14:30 +0200 | |
commit | de63141b9470084a413c109daad514ea917f0c89 (patch) | |
tree | e69fc6633ec7708a4ef00268b955a403edc93ce5 /src/lib/formats/hxchfe_dsk.cpp | |
parent | e923b26d00ee92a95843b78c4232b84ad8a33e8f (diff) |
flopimg.h: implemented threshold to accept disk images with a few excess and empty tracks at the end used by HFE and DSK loaders for now
Diffstat (limited to 'src/lib/formats/hxchfe_dsk.cpp')
-rw-r--r-- | src/lib/formats/hxchfe_dsk.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/lib/formats/hxchfe_dsk.cpp b/src/lib/formats/hxchfe_dsk.cpp index 3e972463c93..3fa42793a01 100644 --- a/src/lib/formats/hxchfe_dsk.cpp +++ b/src/lib/formats/hxchfe_dsk.cpp @@ -179,8 +179,18 @@ bool hfe_format::load(io_generic *io, uint32_t form_factor, floppy_image *image) if (drivecyl < m_cylinders) { - osd_printf_error("hxchfe: Floppy disk has too many tracks for this drive (floppy tracks=%d, drive tracks=%d).\n", m_cylinders, drivecyl); - return false; + if (m_cylinders - drivecyl > DUMP_THRESHOLD) + { + osd_printf_error("hxchfe: Floppy disk has too many tracks for this drive (floppy tracks=%d, drive tracks=%d).\n", m_cylinders, drivecyl); + return false; + } + else + { + // Some dumps has a few excess tracks to be safe, + // lets be nice and just skip those tracks + osd_printf_warning("hxchfe: Floppy disk has a slight excess of tracks for this drive that will be discarded (floppy tracks=%d, drive tracks=%d).\n", m_cylinders, drivecyl); + m_cylinders = drivecyl; + } } if (m_cylinders <= drivecyl/2) |