Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This enhancement allows DOS FAT floppy images (specifically containing a validated v3.31 BPB or later) to set the CHS (cylinder, sector and head) values for the BIOS driver, instead of having to probe the floppy. Previously, a valid v4.0 DOS BPB was required.
This change allows the BIOS driver to be used with v3.3 DOS floppies on the MartyPC emulator, since a bug was confirmed in #2678 where MartyPC always returns success to the BIOS from its FDC emulation when a single sector is read, even if the sector is non-existent. This breaks ELKS' BIOS probe routine which results in accepting an incorrect CHS for the media, which results in data corruption on reading/writing that media.
Checking for a valid v3.31+ BPB includes validating the BPB sectors-per-track, head count and number of FATs fields, as well as requiring either 'MS' or 'IB' as the first two characters in the OEM name field.
All floppy images created by ELKS (both MINIX and FAT) contain an additional valid EPB (ELKS Parameter Block) which if present is used by the BIOS driver prior to validating any FAT BPB. Thus this enhancement usually only affects FAT floppies from "in the wild" created outside ELKS builds.