Note: All MB values in this article are 1,048,576 Bytes (1024x1024).
The Interrupt 13h interface
When IBM engineered the AT they put the interface for the harddisk (Int 13h) in the system BIOS.
Whenever an application wants to read from/write to a drive, it calls DOS.
DOS knows the structure of the disk and where the target file is located. It then calculates a CHS (Cylinder, Head, Sector) address and calls the BIOS via Int 13h.
The BIOS then executes the read or write command at this CHS address by accessing the HD controller directly via its I/O-port addresses.
The result is passed back to DOS who passes it back to the application.
This scheme makes DOS (drive) hardware independent and leaves the hardware specifics to the BIOS.
The traditional BIOS Int 13h interface has the following limitations (when called from DOS):
1024 Cylinders, 256 Heads and 63 Sectors/track.
With 512 bytes/sector this counts up to 8 GB (8064 MB)!
The 504 MB BIOS Limit
The (in)famous 504 MB (528 million bytes) limit comes from the fact that the ATA (IDE) specification has different limits than the BIOS. When the traditional BIOS Int 13h interface is used to control an (E)IDE harddisk, the limits are combined as illustrated below.
|Max. Capacity||8 GB||127.5 GB||504 MB|
The CHS which DOS uses to call the BIOS is now called the L-CHS (Logical CHS) and the CHS which the BIOS uses to control the drive is the P-CHS (Physical CHS).
Two translation methods can be distinguished:
The following table illustrates this.
|Actual Cylinders||Actual Heads||Altered Cylinders||Altered Heads||Max. Capacity|
Note: A drive which has 16 Heads and more than 8192 Cylinders (> 4 GB) will be translated to 256 Heads. This is a problem because DOS can’t handle 256 Heads, but there is an easy workaround for that. See The 4 GB Limit below.Because the translation is done with powers of 2, the software inside the BIOS can accomplish this by simply shifting the bit patrons of the Cylinder and Head addresses one or more places to the right respectively to the left.
|Capacity X in bytes||Sectors||Heads||Cylinders|
|1<X< 504 MB||63||16||X/(63*16*512)|
|504 MB<X<1008 MB||63||32||X/(63*32*512)|
|1008 MB<X<2016 MB||63||64||X/(63*64*512)|
|2016 MB<X<4032 MB||63||128||X/(63*128*512)|
|4032 MB<X<8032.5 MB||63||255*||X/(63*255*512)|
Note: The last row of the above table indicates that a drive over 4 GB should be translated to 255 i.s.o. 256 Heads. This to avoid problems with DOS which is unable to handle 256 Heads. For more information see The 4 GB Limit below.
With any translation method, the BIOS has to ensure that the sectors are accessed in the same order as with "untranslated" access.
This however, is NOT always the case. Therefore, it can be DANGEROUS to your data if you change to another translation mode on an already formatted drive!
Does my BIOS support translation?
Now that the theory has been dealt with, it is time to answer this question.
First check your BIOS date. If it is 7/94 or later, chances are pretty good that you have a translating BIOS. With older BIOSes, your chances are reducing.
Secondly, you can check in the BIOS SETUP if you have User definable drive types and if there is a translation MODE selection. MODE indications like LARGE or ECHS are normally used for bit-shifting translation. If you can select LBA mode, your BIOS supports the LBA assisted translation method.
But to know for sure, we have to examine the Fixed Disk Parameter Table (FDPT).
The BIOS maintains such a (16 byte) table for each physical drive it supports.
When a BIOS supports translation it uses an enhanced version of this table, the so-called Enhanced Disk Parameter Table (EDPT)
The location of the FDPT or EDPT for the first drive is stored in Interrupt vector 41h and Interrupt vector 46h holds the location of the table for the second drive.
(There are no pointers to the FDPTs for the third and subsequent drives because direct access to these tables is not used anymore. The pointers for the first two drives are however still there to remain compatible with older software. Nowadays, data from a FDPT/EDPT is provided by the BIOS via Interrupt 13h functions 8h and 48h.)
The table below indicates what is stored in the FDPT or EDPT.
|0-1||Word||Physical Cylinders||Logical Cylinders, limit 1024|
|2||Byte||Physical Heads||Logical Heads, limit 256|
|3||Byte||Reserved||A0h Signature, indicating EDPT|
|5-6||Word||Precompensation (Obsolete)||Precompensation (Obsolete)|
|8||Byte||Drive Control Byte||Drive Control Byte|
|9-10||Word||Reserved||Physical Cylinders, limit 65536|
|11||Byte||Reserved||Physical Heads, limit 16|
|12-13||Word||Landing Zone (Obsolete)||Landing Zone (Obsolete)|
|14||Byte||Physical Sectors/Track||Logical Sectors/Track, limit 63|
There is a problem however. Most translating BIOSes only build an EDPT i.s.o. a FDPT if the drive is accessed in a translation mode. I therefore use the following trick.
This trick assumes a PC with one < 504 MB harddisk and a BIOS with user definable drive types.
There is another way to detect a translating BIOS but you need a > 504 MB (actually > 1024 cylinders) drive for that. Connect this drive as slave on the primary IDE-port and, if possible, have the BIOS setup autodetect this drive’s geometry. After "save and exit" and reboot use the WD utility to check for an Enhanced table on the second drive.
Finally, if you have a BIOS which supports the IBM/Microsoft Int 13h extensions, you do not need all these tricks because all those BIOSes support translation.
These BIOSes started to appear in 1995. See The Int 13h extensions below.
The 2 GB BIOS Limit
All major harddisk manufacturers have reported about a 2 GB BIOS limit.
It appears that a number of translating BIOSes, manufactured before May 1996 have problems translating drives with cylinder values over 4095. This limits the capacity to 2 GB (2015 MB).
To break this limitation, many harddisk manufacturers supply a software solution like Disk Manager or EZ-Drive with their large harddisks.
Alternately, there may be a BIOS upgrade available for your system.
A nice article about this problem and its various solutions is
The other BIOS Limitation! from Western Digital.
Details from one of the BIOS manufacturers can be found in Micro Firmware’s article Notes on Installing Hard Drives Larger Than 2 GB.
Reported problem scenarios for the affected BIOSes are:
BIOSes dated May 1996 or later should be free of these problems and support translation up to the Int 13h interface limit of 8 GB.
Related to the 2 GB limit is the Award BIOS harddisk size display limit bug.
I've found that all Award BIOSes dated July 1994 or later correctly support the LBA assisted translation up to the 8 GB limit. There is however a bug in the BIOSes dated before January 1996 that limits the harddisk size display, on the BIOS Setup and boot screens, to 2015 MB.
Whenever a drive is 2016 MB or larger, the display starts to count from zero again. The same happens at 4032 and 6048 MB.
This looks a lot like the above mentioned 2 GB limit but is actually only a bug in the harddisk size calculation routine, and it doesn't affect the BIOS support for these large drives.
For these Award v4.50(P)(G) BIOSes, just use the HDD AUTO DETECTION feature to Setup the drive, select the option with LBA at the end, and disregard the incorrect HD size display.
The 4 GB Limit
Yes, there is another limit! This is actually an Operating System issue but the appropriate way to deal with this problem is to account for it in the system BIOS.
It appears that DOS and Windows 95/98 are limited to 255 Heads.
A translated geometry of 256 Heads will therefore create a problem.
This can happen when a drive has 16 Heads and more than 8192 Cylinders (> 4032 MB).
As indicated under The translating BIOS the LBA assisted method should translate to 255 i.s.o. 256 Heads when a drive is larger than 4032 MB.
If this is not the case, then the bit-shifting translation (select ECHS or LARGE) should be used with the following workaround:
For more information read the excellent article
Issues with Hard Drives Over 4 GB.
The Int 13h extensions - Breaking the 8 GB barrier
With the rate in which the harddisk technology is progressing, we are now faced with EIDE drives exceeding the 8064 MB limit of the Int 13h interface.
The only way to break this limit is to ditch the CHS system in favor of a direct LBA interface.
The SCSI drive technology uses this kind of LBA interface already for years.
LBA works with a 64-bit sector address, so we can (theoretically) access the staggering amount of 8,796,093,022,208 GB! Due to limitations of the ATA interface, only the lower 28 bits of the LBA address can used by an EIDE drive resulting in a, still formidable, limit of 128 GB.
Windows 95/98 is ready for this because it already uses LBA internally.
Except in Safe or Compatibility Mode, the protected mode diskdriver takes over the BIOS Int 13h interface and can access a drive directly in LBA.
To remain compatible with all the Operating Systems that still use the CHS system to call the BIOS (including Windows 95/98 at boottime), we need an extension on, rather than a replacement of, the Int 13h BIOS interface.
This is where the IBM/Microsoft Int 13h extensions come in.
This specification adds new functions to the Int 13h interface. These new functions are fundamentally different from the conventional Int 13h interface and allow the BIOS to be called directly with the required LBA.
A BIOS with the IBM/Microsoft Int 13h extensions supports both LBA capable and LBA non-capable drives. To do this, such a BIOS must support all of the following translations.
Traditional Int 13h functions:
Just as with the 504 MB barrier, you need one of these solutions to break the 8 GB barrier if you do not have the Int 13h extensions:
Needless to say that the new partition types are invisible to DOS and that compatibility has to be sacrificed in the name of progress.
More information on the net
Possibly the most extensive source of information on this subject is
The Enhanced IDE/Fast-ATA/ATA-2 FAQ by John Wehman and Peter den Haan.
Peter den Haan’s EIDE storage page is the place to look for this FAQ.
This page contains loads of links to other sites as well.
A good starting point for finding a BIOS upgrade is Wim's BIOS page.
Start with the FAQ and then work your way through the other pages.
Back to the Index page