Toshiba T5200 BIOS Mods

In Vintage Computing \ Toshiba \ Toshiba T5200
Project Conducted 2019-2020

The Toshiba T5200’s stock BIOS was hard coded to work with certain Hard Drives of the era. Most of those drives have now failed and the hard coded nature of the BIOS can make fitting a new drive difficult.

Toshiba T5200 Stock Award v5.30 BIOS
Toshiba T5200 Stock Award v5.30 BIOS

There are various tactics for retrofitting replacement drives, each with their pros and cons, but this page is about adding native support for other drives to the T5200’s BIOS. Some benefits of native support are…

  • Improved performance vs. option ROM’s like XT-IDE.
  • Zero resource footprint (no RAM memory is consumed vs. other methods)

First I added a way to enter the T5200’s setup by holding DEL during POST. The Stock T5200 BIOS has no way to enter Setup unless triggered by an error or by running a program once booted. This was important for development and testing purposes (and games but more on that later). I found the cleanest method was to add code that checked for the DEL key, if found it set a flag that the stock BIOS checks after POST. Basically the BIOS thinks it should enter Setup even when no error is present. It’s very simple and elegant.

Toshiba T5200 BIOS modified to allow pressing DEL to enter BIOS setup.
Toshiba T5200 BIOS modified to allow pressing DEL to enter BIOS setup.

Next I analyzed the BIOS code to figure out how it works and what modifications would be required for the hard drive situation. I had read on forums that the T5200 BIOS was locked to hard drives whose model string started with the characters ‘CP’ for Conner Peripherals. I discovered this to be false, at least with the Award v5.3 BIOS which is the newest known release for the T5200. Instead it actually just ‘fingerprints’ the drive by querying it’s ATA-ID then comparing the geometry (Cylinders, Heads, Sectors, ECC Bytes) against a hard coded table. If there is a match then you’re in business, right? Well, not so much. You see, apparently the T5200 BIOS is a delicate snowflake and goes to pieces quite easily. There were numerous facets to deal with, each seeming to break something else. But finally I got there.

Entering setup with a different drive opens a whole new can of worms regarding how the drive is displayed, which is based on hard-coded strings. Yes, this is cosmetic but if you’re going to do something then you might as well do it right. The most complicated part of this whole BIOS mod was sorting out the menu system.

NOTE: I found no actual code whose intent was to make life difficult when it comes to replacing drives. It all seems to have a functional purpose.

Image of the T5200 BIOS modified to support a variety drives and flash memory devices.
Image of the T5200 BIOS modified to support a variety drives and flash memory devices.

In the end I made the following changes to my T5200’s BIOS.

  1. Added support for replacing the stock IDE hard drive with IDE adapters for Compact Flash and SD Cards.
  2. Support for common cards from 128mb-512mb with auto-selection of the most appropriate geometry profile for any given card. Devices greater than 512MB will be used as 512MB (additional space above 512MB not accessible on the computer but can be partitioned and used on another device).
  3. Display of the drive’s ‘detected’ geometry, size, and name below the name of the ‘configured’ drive (as actually being used by the BIOS).
  4. Added <Hold DEL for setup> feature to enter Setup on demand.
  5. Integrated some games (intended as boot sector games) from nanochess.org into my BIOS ROM. The games can be launched and played directly from the BIOS Setup menu with no need to boot the computer.

Some existing code was modified but I also added some new code which was written in Assembly Language, embedded, and then the existing code modified to call the new routines.