First post, by analog_programmer
- Rank
- Oldbie
This in not a question, but a "quick" AT (286) BIOS HDD table editing manual and it doesn't fix any BIOS executable bugs.
Brief introduction to the problem:
I couldn't find any instructions (0r properly working tool) on how to (manually) edit the Award BIOS of my 286-board since its all 47 HDD table record entries are populated and because of this I can't use my only working little old HDD with it. Also some of those (if not all) 286 Award BIOSes lack "user defined" option ("Type 47") for manually/auto adding new parameters for hard disk drives non-existing in the BIOS HDD table record entries. I found one very buggy DOS tool named "BIOSUTIL" for adding a new HDD parameters into BIOS dump-file (if there is at least one empty HDD table record entry left different from number 15), which was of no real use in my case with the fully populated BIOS HDD table, but helped me for my research.
And here's what I came with by the method of reverse engineering + some trial & error:
** For AT (286) systems with 256 kbit (32 kB) Award or older Phoenix BIOSes:
The first HDD table record entry usually starts at address 0x6401, the last (number 47) ends at address 0x66F0. Table record entry number 15 (0x64E1 - 0x64F0) is empty and can not be used by standard.
** For AT (286) systems with 512 kbit (64 kB) older AMI, newer AMI "color" (also used in 386 & 486 systems), MR (Microid Research) or newer Phoenix BIOSes (I doubt that these need any manual HDD table editing, but just in case):
The first HDD table record entry usually starts at address 0xE401, the last (number 47) ends at address 0xE6F0. Table record entry number 15 (0xE4E1 - 0xE4F0) is empty and can not be used by standard.
AT (286) BIOS HDD table record entry pattern:
Cy Cy HH 00 00 WP WP 00 >> 00 00 00 PT PT SS 00
+++++ ++ +++++ +++++ ++ ++ ++++++++ +++++ ++ ++
| | | | | | | | | |
| | | | | | | | | V
| | | | | | | | | 1 zero byte (0x00, LE: "00")
| | | | | | | | V
| | | | | | | | 1 byte for number of Sectors,
| | | | | | | | max: 255 (0xFF, LE: "FF")
| | | | | | | V
| | | | | | | 2 bytes for "Parking" Track (Sector) number,
| | | | | | | max: 32767 (0x7FFF, LE:"FF 7F")
| | | | | | V
| | | | | | 3 zero bytes (0x000000, LE: "00 00 00")
| | | | | V
| | | | | 1 byte - if Heads are more than 8: 8 (0x08, LE: "08"),
| | | | | otherwise 1 zero byte (0x00, LE: "00")
| | | | V
| | | | 1 zero byte (0x00, LE: "00")
| | | V
| | | 2 bytes for Write Precompensation Cylinder number,
| | | max: 32767 (0x7FFF, LE: "FF 7F"),
| | | for N/A: 65535 (0xFFFF, LE: "FF FF")
| | V
| | 2 zero bytes (0x0000, LE: "00 00")
| V
| 1 byte for number of Heads, max: 255 (0xFF, LE: "FF")
V
2 bytes for number of Cylinders, max: 32767 (0x7FFF, LE: "FF 7F")
Instructions on BIOS dump-file editing:
1. Get a dump-file of a 286-motherboard BIOS you want to edit.
2. Use your favorite hex-editor to find the HDD table record in your BIOS dump-file.
3. Hex-edit one of these HDD table record entries (or use some empty entry field in ranges 1-14 and 16-47 as the number 15 is always empty and unusable by the standard) according to the given 16 bytes long pattern and your real HDD's CHS specs (convert the decimal values to hex values "little endian" ordered as needed), and voila - you'll get a table entry for your particular model hard disk drive.
4. Don't forget to recalculate a new BIOS checksum!!!
4.1. Checksum correction for 256 kbit (32 kB) Award 286 BIOSes:
8-bit modular sum method (for bytes 0x00 to 0x7FFE) works fine and just write the calculated hex-value in the last byte (at address 0x7FFF) of the BIOS dump-file.
4.2. Checksum correction for 512 kbit (64 kB) MR 286 BIOSes:
8-bit modular sum method (for bytes 0x00 to 0xFFFE) works fine and just write the calculated hex-value in the last byte (at address 0xFFFF) of the BIOS dump-file.
4.3. Checksum correction for older 256 or 512 kbit (32 or 64 kB) AMI 286 BIOSes:
Go figure it out or try to use something like this AMI 286 BIOS checksum hack:
4.4. Checksum correction for newer 512 kbit (64 kB) AMI "color" BIOSes (also used in 386 & 486 systems):
Use my Python checksum bytes calculation and BIOS-dump file auto-parching script attached in this post.
4.5. Checksum correction for older 256 kbit (32 kB) and newer 512 kbit (64 kB) Phoenix BIOSes:
No info.
5. Open a bottle of cold beer and enjoy the good work 😉
Some final notes:
1) All the data bytes in these HDD table record entries are "little endian" (LE) ordered hex numbers;
2) Given "max" values are based on the maximum values accepted by the mentioned cr*ppy DOS tool - "BIOSUTIL" and used only as visual "little endian" ordered hex numbers representation examples. The most realistic acceptable working CHS maximum values are 1024 for Cylinders (0x0400), 16 for Heads (0x10) and 63 for Sectors (0x3F) giving a maximum real HDD volume of 504 MB (1024 * 16 * 63 * 512 / 1024^2) - as Jan Steunebrink (Chkcpu) suggested in his comment:
Chkcpu wrote on 2025-06-18, 18:50:Note that the 286 BIOS is non-translating so it is limited to 504MB, and the maximum CHS values are 1024 Cylinders (400h), 16 Heads (10h), and 63 Sectors/track (3Fh).
3) Table entry number 15 is always empty and can not be used even in the newer BIOSes (for 386, 486, P-class, etc,) - I don't know why, probably some limited 8086/8088 compatibility inheritance. Again Jan Steunebrink (Chkcpu) gave some details in his comment:
Chkcpu wrote on 2025-06-18, 18:50:Table record number 15 is indeed never assigned. Because of the original expectation that there would never be more than 15 driv […]
Table record number 15 is indeed never assigned. Because of the original expectation that there would never be more than 15 drive types in existence, only a single byte of CMOS memory was assigned for 2 drives. Of course, this limit was quickly exceeded, so another extended CMOS byte was assigned for each drive. The extended CMOS byte is used as the drive type when the original CMOS nibble type is 15. This is handled transparently by the setup program, however it explains why drive type 15 can’t be used.
(Book source: “The Undocumented PC, Second Edition” by Frank van Gilluwe.
https://archive.org/details/The_Undocumented_ … rankvan_Gilluwe
page 561.)
4) Don't ask me about the weird ">>" byte with only two valid hex values related to the heads number (0x00 or 0x08) - back in the 70's and 80's there was an unlimited number of PC-engineering idiots with a bunch of limiting standardized ideas. Deunan gave a suggestion in his comment:
Deunan wrote on 2025-06-19, 12:04:As for the weird "over 8 heads" byte, I have some theory about that. There are some MFM controllers (from WD) that handle 8+ heads differently. There's a jumper for that on some cards. Basically it has to do with what head code is stored in the sector header, sometimes only 3 bits are used and thus heads 8-15 are stored as 0-7. This is not a problem as long as the controller that formatted the HDD is used to R/W it, but will fail if the HDD is moved to a card with a different/newer chip that stores all 4 bits. Perhaps the weird byte was some sort of attempt to create an extra flag, which would allow particular HDD types to have a software workaround for controllers that could switch the mode via a register rather than a jumper?
5) Don't ask me about details for Phoenix BIOSes as I don't have such a BIOS for my 286-board. The given HDD table records pattern is one and the same for every BIOS regardless of its manufacturer. Go find the table's address location in the Phoenix BIOS for yourself - it's really easy to spot the populated HDD table records in hex-editor;
6) Don't ask me to share the cr*ppy "BIOSUTIL" DOS tool here - it's "ab*ndonw*re".
Thanks for reading and happy 286 BIOS editing! 😉
EDIT1: Added some byte-size corrections.
EDIT2: Added some explanations and real maximum CHS values in "final notes 2) & 3)" by Mr. Steunebrink (Chkcpu).
EDIT3: Added some notes in "final notes 4)" by Deunan.
EDIT4: Added some AMI 286 BIIOS checksum details in 4.3. - thanks to feipoa.
EDIT5: Deunan pointed me, that there are 286 motherboards with AMI "color" BIOSes - added checksum correction for those in 4.4.
EDIT6: Updated link for my checksum correction script "amichksumcalc3.py" in 4.4.
EDIT7: Added info for BIOS HDD table records in those ancient Phoenix BIOSes.
The word Idiot refers to a person with many ideas, especially stupid and harmful ideas.
This world goes south since everything's run by financiers and economists.
This isn't voice chat, yet some people overusing online communications talk and hear voices.