mirror of
https://github.com/mist-devel/mist-firmware.git
synced 2026-02-03 23:03:01 +00:00
Merge pull request #84 from retrofun/minimig-hdd-recognition
hdd.c: use H=1, S=32 for hdf files within valid cylinder range
This commit is contained in:
6
hdd.c
6
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:
|
||||
|
||||
Reference in New Issue
Block a user