IBM 5162/5170  -  IBM Type 15 in Hard Drive Table


Some people who know how to modify the drive table, see that IBM did not use type 15 (marking it as 'reserved), and incorrectly came to the conclusion that IBM must have intended that type 15 be optionally used by customers for a custom drive type.  (I.e.  Burn a new set of BIOS EPROMS that have something in the type 15 entry of the drive table.)

Type 15 must not be used for that purpose, because of the way in which type 15 ended up being used as a flag in late model IBM 5170s, the IBM 5162, and most 5170 clones.
A technical explanation follows.

Note: "Address" below means address within the RAM component of the CMOS/RTC chip (MC146818).


FIRST IBM 5170 BIOS
----------------------------

In the CMOS/RTC chip, only one byte (at address 18 decimal) is used to store the drive type number of both C: and D: In that byte, the upper nibble is used for drive C: and the lower used for drive D:

   Address 18 (decimal): C_TYPE_NIBBLE/D_TYPE_NIBBLE

Each nibble (being a nibble) can store from 0 to 15, and that is why the first BIOS only goes as high as drive type number 15.
Type 15 is reserved.


SECOND/THIRD 5170 BIOS
----------------------------------

Drive type numbers greater than 15 are now supported.  IBM did this by using the reserved type 15 is a particular way.

If the C: drive nibble at address 18 is set to 15, it means that the C: drive type number is greater than 15, and is stored in a byte at address 25.
If the D: drive nibble at address 18 is set to 15, it means that the D: drive type number is greater than 15, and is stored in a byte at address 26.

   Address 18 (decimal): C_TYPE_NIBBLE/D_TYPE_NIBBLE
   Address 25 (decimal): C_TYPE_BYTE
   Address 26 (decimal): D_TYPE_BYTE

Example:

With drive C: being type number 34, the C_TYPE_NIBBLE at address 18 is set to 15, and the C_TYPE_BYTE at address 25 is set to 34.