-
-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
uefix.s: add CHS mode #13
base: master
Are you sure you want to change the base?
Conversation
This should enable booting a sector payload from an FDD, and so enabling `-D FLOPPY` on the yasm line will switch to CHS drive logic.
Load the sector after the first one.
Note: This also opens the path for supporting vintage 8088-and-up IBM PC-compatibles, as they do not have INT13h/AH=42 capability, only the old-standard AH=02 CHS. While I'm submitting this for |
Nice! Though, As long as you patch the filesystem code, that is ;3 |
%ifdef FLOPPY | ||
jmp load.chs | ||
%else | ||
jmp load.lba | ||
%endif |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps check whether the drive number provided by BIOS is less than 0x80
, instead of hardcoding this at compile time?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was quick and dirty, but honestly that's probably a better approach. I'll hop on this and the 8 = HDD
comment when I get back from breakfast.
Register DL contains the disk number on boot, so test 0x80, dl
and jnz load.lba
seems correct here, right?
I've dealt with funky vendorized vintage PC-compatible BIOSes that expect more than a
I don't think I'll need to patch the filesystem code, if it's already LBA-aware. I'll explain over in the #6 issue how I'll implement the Anyway, about to go in, fix and test the fixes here in a minute. |
This should enable booting a sector payload from an FDD, and so enabling
-D FLOPPY
on the yasm line will switch to CHS drive logic.