VOGONS


Reply 20 of 22, by Ringding

User metadata
Rank Member
Rank
Member
wierd_w wrote on Yesterday, 14:32:

Which is VERY close to his suggested 519 cyl.

He might have backed off on the cyl count for other reasons.

Yes. I configured this many years ago, and I remember that I wanted to use the same image for DOSBox svn (at the time), DOSBox-X and DOSBox-staging, one of which had problems with 520, so I backed off by one cylinder for safety. I don’t remember which one it was, though, and I could probably also not reproduce it, as I am many Fedora versions later than back then – which matters because I build all DOSBox versions that I use from source.

Reply 21 of 22, by davidmorom

User metadata
Rank Newbie
Rank
Newbie
jmarsh wrote on Yesterday, 15:58:
wierd_w wrote on Yesterday, 15:01:

So, 'an actually 2GiB volume' has an ECHS geometry of

512, 32,128,1024

There are very valid reasons for not wanting to have exactly the max cyl count.

The most valid reason is that 1024 doesn't fit in 10 bits, making it an invalid value.

1024 cylinders, numbered from 0 to 1023, should fit on 10 bits, unless the all zeroes or all ones combinations have some special meaning, which it shouldn't. Indeed, MS-DOS 6.22 fdisk is perfectly capable to detect the HDD size increase when going from 1023 to 1024 cylinders. Maybe there are some good reasons to not use 1024 cylinders (there are for not using 256 heads), but I made a DOS 6.22 install on DOSBox with 512,63,255,1024 geometry and it worked fine.

Reply 22 of 22, by jmarsh

User metadata
Rank Oldbie
Rank
Oldbie
davidmorom wrote on Yesterday, 18:20:

I made a DOS 6.22 install on DOSBox with 512,63,255,1024 geometry and it worked fine.

Using a size that large is definitely asking for trouble - as I mentioned earlier, DOSBox uses regular buffered file I/O functions (fseek, ftell, fread, etc.) which do not handle file offsets larger than 2GB. Any tool/program that tries to access the drive beyond 2GB will likely fail, in the worst case experiencing an integer overflow that could position the file pointer at the beginning of the file when writing.