View Single Post
Old 06 June 2018, 20:34   #10
Registered User
Join Date: Aug 2004
Posts: 2,975
Here's how I'd like it to work.

In full drive mode: If there's a geometry entry for the HDF, use the specified sector size(*) & C/H/S for emulated drive geometry (of course almost no programs use that, but it appears in fixed disk parameter mode page data).

In fake-RDB mode: If there's a geometry entry, use the #heads, sector size(*) & sectors/track for for the faked drive, adding some cylinders to give enough space in RDB area. Then the partition can be specified correctly in the fake RDB.

If there is no geometry entry, you could maybe also sanity-check the used geometry. E.g. if DOS\1 in first four bytes, check for root block where it would be if partition occupies entire file. Then adjust the auto-generated geometry to match.

The (*) because it's not quite that easy.
Some emulated-hardware SCSI controller drivers have problems with non-512-byte sectors. For those and all IDE controllers [assuming you're not emulating an ATAPI removable drive...] you can adjust the fake drive's geometry. If I remember correctly FFS earlier than v40 doesn't support SectorsPerBlock, but you don't need to use that.

Suppose geometry in .geo is 24961×1×51 1024-byte sectors. Then have the fake 512-bytes/sector drive size be (24961+n)×2×51 sectors. Mount parameters in the PartitionBlock can still have SizeBlock=256 (i.e. 1024 bytes) and specify Surfaces=1, BlockSize=1024.
mark_k is offline  
Page generated in 0.06725 seconds with 11 queries