miniforth icon indicating copy to clipboard operation
miniforth copied to clipboard

uefix.s: add CHS mode

Open sirocyl opened this issue 2 years ago • 3 comments

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.

sirocyl avatar Jul 02 '23 09:07 sirocyl

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 uefix, as its changes are low-impact and enable the single-sector Forth to load on such machines (albeit without a functioning LOAD keyword on those machines; and AUTOLOAD disabled), I probably will maintain the vintage-and-floppy-compatible miniforth as a fork, since it changes a lot with regards to the LOAD keyword, and the way --> block continuation works. I'll see how it develops though! I might be able to do it without mucking up the codebase too much.

sirocyl avatar Jul 02 '23 10:07 sirocyl

Nice! Though, uefix is only necessary to work around BIOSes that insist on parsing the partition table portion of the bootsector. In practice, it's only the new UEFI firmware. Floppies commonly didn't have a partition table, so you shouldn't ever need to use uefix on a floppy.

As long as you patch the filesystem code, that is ;3

meithecatte avatar Jul 02 '23 13:07 meithecatte

Nice! Though, uefix is only necessary to work around BIOSes that insist on parsing the partition table portion of the bootsector. In practice, it's only the new UEFI firmware. Floppies commonly didn't have a partition table, so you shouldn't ever need to use uefix on a floppy.

I've dealt with funky vendorized vintage PC-compatible BIOSes that expect more than a 55 AA. Toshiba or Tandy acts like this, I believe. To be clear, no modern BIOS is that weird - they all just see the 55AA signature, and load and run.

As long as you patch the filesystem code, that is ;3

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 load CHS compatibility.

Anyway, about to go in, fix and test the fixes here in a minute.

sirocyl avatar Jul 04 '23 02:07 sirocyl