Reading floppy sectors across tracks... And also FAST A20...
Posted: Sat Dec 23, 2006 3:00 pm
First, about the floppy...
In bochs and on a recent (about 2001) computer, when I try to use the BIOS to read 62 floppy sectors starting at head 0, cylinder 0, sector 2, it reads fine...
If I go with the same code to an old Olivetti M300-30, i486SX (not very important, but just to help defining the age of the computer!), the read keeps failing (CF=1)...
I've not checked the error code, but with further trials I found that the old Olivetti only reads if I ask 17 or less sectors (in other words, the BIOS cannot read multiple sectors across track boundaries at once... at least on floppies)... this is not very convenient, cause I don't know how large the 2nd stage boot loader will grow (and if I keep adding error-detection code to the boot sector I doubt it will fit in 512 bytes anymore! Also, I want to keep space after 0x1BE to leave space for the partition table)...
And about the Fast A20... in the OSFAQ Wiki (haven't been copied to the OSDEV Wiki yet) it says that the Fast A20 is only available on Pentiums and later... Well, on my old i486DX-based olivetti it worked (I tested removing the code and the A20 was not enabled)...
Well, about the screen-blaking issue, it did not happen... but I've read that this blanking can occur not right following the use of the System Control Port to enable the A20, but later... Unless I didn't understand correctly...
However, I'll rewrite the code that enables the A20 using the keyboard controller later... But now, I'm too lazy for that kind of low-levelness!
Now, and still about the A20 (but not the Fast one!), tell me another thing... I'm short of space in the boot-sector, so is it safe to enable the A20 using the kbd controller and do not run a test routine to check if it had the desired effect, or should I test anyway?
JJ
In bochs and on a recent (about 2001) computer, when I try to use the BIOS to read 62 floppy sectors starting at head 0, cylinder 0, sector 2, it reads fine...
If I go with the same code to an old Olivetti M300-30, i486SX (not very important, but just to help defining the age of the computer!), the read keeps failing (CF=1)...
I've not checked the error code, but with further trials I found that the old Olivetti only reads if I ask 17 or less sectors (in other words, the BIOS cannot read multiple sectors across track boundaries at once... at least on floppies)... this is not very convenient, cause I don't know how large the 2nd stage boot loader will grow (and if I keep adding error-detection code to the boot sector I doubt it will fit in 512 bytes anymore! Also, I want to keep space after 0x1BE to leave space for the partition table)...
And about the Fast A20... in the OSFAQ Wiki (haven't been copied to the OSDEV Wiki yet) it says that the Fast A20 is only available on Pentiums and later... Well, on my old i486DX-based olivetti it worked (I tested removing the code and the A20 was not enabled)...
Well, about the screen-blaking issue, it did not happen... but I've read that this blanking can occur not right following the use of the System Control Port to enable the A20, but later... Unless I didn't understand correctly...
However, I'll rewrite the code that enables the A20 using the keyboard controller later... But now, I'm too lazy for that kind of low-levelness!
Now, and still about the A20 (but not the Fast one!), tell me another thing... I'm short of space in the boot-sector, so is it safe to enable the A20 using the kbd controller and do not run a test routine to check if it had the desired effect, or should I test anyway?
JJ