From 91875099ba88a3cdb177e9d2e14bc549d2400ce2 Mon Sep 17 00:00:00 2001 From: Gerald Schnabel Date: Fri, 14 Jan 2022 21:42:15 +0100 Subject: [PATCH] hdd.c: use H=1, S=32 for hdf files within valid cylinder range --- hdd.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/hdd.c b/hdd.c index 44262ed..aad41d9 100644 --- a/hdd.c +++ b/hdd.c @@ -684,6 +684,12 @@ void GetHardfileGeometry(hdfTYPE *pHDF) if ((head*cyl*32)==total) // Does the geometry match the size of the underlying hard file? return; + // Is hard file size within cyllimit * 32 geometry? + if (total <= cyllimit * 32) { + pHDF->heads = 1; + pHDF->cylinders = (total / 32) + 1; // Add a cylinder for the fake RDB. + return; + } // If not, fall back to regular hardfile geometry aproximations... break; case HDF_FILE: