tomas-nestorovic / RIDE

Windows tool for low-level access to any floppy disks, and comfortable high-level access to some legacy filesystems (ZX Spectrum, MS-DOS, etc.).
https://nestorovic.hyperlink.cz/ride/html/index.html
56 stars 0 forks source link

Incorrectly recognized format: 5.25 Floppy, DS 1200kB #71

Closed gorgobacka closed 3 years ago

gorgobacka commented 3 years ago

I have the impression that the 5.25 Floppy, DS 1200kB format is not correctly recognized. Can you please check?

Used version: 1.6.2

Example: 5 25 Floppy, DS 1200kB

tomas-nestorovic commented 3 years ago

Hi Thomas,

oh no no, this is a misunderstanding - the Boot sector tab shows information stored solely in the boot sector (or directly accessible via the boot sector, e.g. volume label is actually stored among directory entries). So your 5.25" HD disk introduces itself to the MS-DOS as 3.5" DD disk. This inconsistency is nothing wrong and I see it relatively often in my original games and other software. I don't know if this is a sort of copy-protection, anyway it has no impact on working with the disk (some information in the boot sector is there just for cosmetical reasons, having no effective use, e.g. the FAT name).

Dialogs like Dump to destination or Format cylinders adopt the official value from the boot sector, anyway you have the possibility to change it there.

You can check that the disk has been correctly recognized by the application by simply being able to see sectors in the Track map tab - 3.5" DD disks, 5.25" DD 360 RMP disks, and HD disks have all different timings, so only when seeing the Track map empty is a sign that the disk has been misrecognized (or has other than MFM encoding or isn't formatted at all).

Thank you for using the app. If you yet stumbled upon something, don't hesistate to create another issue đź‘Ť

Tomas

gorgobacka commented 3 years ago

Hi Tomas, thanks for your explanations.

I expected the description in "Medium" is predicted based on Media descriptor, number of tracks per side and number of sectors per track from the boot sector (see e.g.: https://en.wikipedia.org/wiki/Design_of_the_FAT_file_system#BPB20_OFS_0Ah).

May I ask, where the '5.25" HD disk introduces itself to the MS-DOS as 3.5" DD disk'?

Reading the boot sector is new to me and just recently I started to read more about it. But I'm still in the learning phase.

This is a great software. Thanks for developing it. I'm using it from time to time.

tomas-nestorovic commented 3 years ago

Hi Thomas,

well, I personally prefer this hard-to-find paper which was written in 1999 and gives a clear overview of contemporary FAT design, rid of later modifications: https://www.karry.cz/files/fat.pdf For the _BPBMedia field at Page 9 it gives the following description (I will highlight important words): "0xF8 is the standard value for “fixed” (non-removable) media. For removable media, 0xF0 is frequently used. The legal values for this field are 0xF0, 0xF8, 0xF9, 0xFA, 0xFB, 0xFC, 0xFD, 0xFE, and 0xFF. The only other important point is that whatever value is put in here must also be put in the low byte of the FAT[0] entry. This dates back to the old MS-DOS 1.x media determination noted earlier and is no longer usually used for anything."

Your article at Wikipedia adds: "Versions of DOS before 3.2 totally or partially relied on the media descriptor byte in the BPB or the FAT ID byte in cluster 0 of the first FAT in order to determine FAT12 diskette formats even if a BPB is present."

That said, your 5.25" HD floppy is incompatible with MS-DOS versions older than 3.2. An MS-DOS newer than 3.2 already knows for sure with which medium it's currently working because the disk geometry is stored in the BPB. That it is NOT a 3.5" DD disk is clear even without peeking in the _BPBMedia field - the floppy decoder has been set to HD mode and the disk boot sector successfully read; so technically speaking, it cannot be distinguished wheather it is a 3.5" HD or 5.25" HD disk, as both have the same data rate. And this is when BPB comes handy, clearing out that a track contains only 15 sectors instead of 18, making your disk a candidate for a 5.25" HD disk (candidate = a 3.5" HD disk can also accommodate 15 sectors per track...).

Yet a quick question: The white band in the screenshot you shared - it is not filled with the label "Geometry"? (Btw, this is an original disk from 1995 which apparently has many unimportant fields uninitialized or set to false values) :-)

image

gorgobacka commented 3 years ago

Thanks for explaining it so in detail and for sharing this nice written paper. I understand now, that it's not issue and therefore, I will close the ticket.

Regarding the missing label: I'm using the software on Linux with Wine. It might be related to that. I will check it, when I'm back home.

gorgobacka commented 3 years ago

I check it again. Using my Wine configuration on Linux, the "Geometry"-Label is missing. But it's not a big deal for me. The information that I'm interested in is working fine and I can always use Windows in a VM, if I need to check something more in detail. Maybe I will try different settings in Wine to solve it. I will share it, if I find something out.

tomas-nestorovic commented 2 years ago

Hi Thomas,

as for the missing "Geometry" label in the Boot sector tab, I think I have solved the problem. Can you please try this PropGrid library? Just replace with it the existing library that comes with versions 1.6.2 or current 1.6.3, and please let me when you have time - thanks :-)

.

gorgobacka commented 2 years ago

I just tested with the current version (1.6.3) and it does not have the problem with the "Geometry" label anymore, even without replacing the dll. In 1.6.2 replacing the dll is needed to get rid of the issue.

Thanks for investigating my problem.