blog:pc98_hdd

Replacement IDE BIOS [PC-98]

PC-98 A-Mate series (Ae, Ap, An) all have a limited BIOS which supports IDE drives up to 540MB, some later machines support up to 4.3GB. SCSI controllers and disks can go bigger, up to 30GB-ish in some cases.

However, support for anything bigger is just not possible on the stock system, such as my PC-9821AN. Fortunately someone has developed a custom ROM overlay that replaces the standard BIOS routines that interface with the IDE drive to support up to 120GB (the limit of LBA28 or CHS addressing).

It is technically possible to write this ROM to an unused card on the PC-98 C-Bus and have it initialised at boot time. The most common method would be something like a SCSI card, where the SCSI functions are not needed.

Links:


Install DOS to a supported hard drive, or make a DOS boot floppy and then extract the contents of exid486.lzh to it.

Boot the PC-9821Ap/As/An and run

exide486.com

and you should get a screen as follows:

Select which mode you want the ROM to run in (consult the table). The only option if you want to use the full capacity of a drive up to 120GB is option 1 (how to partition and use that capacity is another exercise for later).

The utility will then generate 3 ROM files for you:

  • EXIDE486.ROM - a 4KB image suitable for flashing to a 4KB or bigger single EPROM
  • EXIDE486.R00 - half of the 4KB image, for writing to the low bank of a dual EPROM board
  • EXIDE486.R01 - half of the 4KB image, for writing to the high bank of a dual EPROM board

In my case I am testing the replacement IDE BIOS ROM on the following SCSI boards (the fact that they're SCSI doesn't matter - it just needs to a board that maps its BIOS into a standard ROM slot in memory; in fact a network card could work too):


IO-Data SC-982A Fast SCSI I interface card

ROM: 1x 27c256, 1x 28c64

In my case I replaced the onboard EPROM of the SC-982A with a 27C128 (creating a file containing 4 copies of the exide486.rom file so that it was padded out to the full 16KB of the chip). On powering up the PC-9821 the memory check ran correctly but, then somewhat surprisingly, I also saw the standard SCSI BIOS of the IO-Data card.

On closer inspection it appears that there are two rom chips on the SCSI card - a socketed 27C256 and a surface mount Atmel AT28C64 and it looks like its the surface mount chip that provides the actual SCSI ROM BIOS. At a guess the socketed ROM could be a SCSI configuration utility or something like that. Whatever the case, the EXIDE BIOS doesn't get run :(


Logitec LHA-201 Fast SCSI I interface card

ROM: 1x 27c256

Flashed a 27C256 EPROM with a 32KB image consisting of 8 copies of the 4KB EXIDE486.ROM, replaced the existing 27C256 containing the Logitec SCSI ROM and…. nothing.

The PC-98 still boots, and my existing IDE disk (512MB CF card) still works correctly, but no EXIDE BIOS messages shown on startup. I even went to the extent of working out all of the DIP switches on the card via the Japanese manual, but that made no difference.

Chalk up this one as another failure.


ICM IF-2767

To be tested


TEAC IF-92B

ROM: 1x 27c256

Swapped in the existing 27C256 that I tested on the Logitec and IO-Data cards and, et-voila! It worked first time:

That's the correct ROM BIOS output from the EXIDE code running from the SCSI card, in this case, the output is coloured red as no IDE disk is detected (which is correct).

With a working disk connected, the above output it shown briefly.


The native utilities in PC-98 MS-DOS 6.2 or lower won't work with large drives; they may be okay with drives appropriate to the original BIOS capacities (512MB, 4GB, 8GB, etc) but they simply don't work with anything bigger.

I tried and failed to get DOS 6.2 FDISK and FORMAT to work, but neither will even start with any of these modern huge disks.

Here are some findings to get access to the full disk capacity once you've for the EXIDE BIOS working:

Disk initialisation

All disks need to be initialised on PC-98 DOS, simply adding a partition table and formatting is not enough - a small data structure called the IPL is needed at the beginning of the drive. The tool in DOS to perform this is DISKINIT. The version that ships with DOS 6.2 won't work, however the PC-98 Windows 98 Second Edition distribution comes with an emergency boot floppy that does work.

  • Tool: DISKINIT
  • Details: Windows 98 SE Emergency Boot Floppy
  • Use: Just run it, it then lists the available hard drives and you press the number indicating the drive you want to init.

Partitioning

Again, partitioning tools such as FDISK in DOS won't fully work with the large disks. On several drives that I tried it would start the “checking” process then freeze several seconds/minutes in to the process. Use the Windows 98 SE emergency boot floppy instead.

  • Tool: FDISK.EXE (file size: 56416 bytes)
  • Detail: Windows 98 SE Emergency Boot Floppy
  • Use: You may need to experiment with the largest partition the tool will let you create. Both a 60GB and an 80GB disk I tried allowed me to create partitions of that size. You must use % partition sizes when creating individual partitions, otherwise fixed megabyte sizes will be calculated and shown incorrectly. Otherwise choose to use the entire drive when the option is shown.

Formatting

Formatting is an odd one. The DOS 6.2 tool is a no-starter for obvious reasons, but the Win 98 SE format utility looks as if it works:

… but the problem is that regardless of which disk I tried, it always errors out at the end:

That's saying something about not being able to write the boot sector or something along those lines… it's the same regardless of disk. Also notice that it picks up the incorrect size of the partition, in the above image it should be showing a entire-drive partition from a 60GB disk… but it doesn't.

What you actually need to use is a tool called FORMATX which cannot be found on the web any more but can still be found via archive.org, at the links below or, alternatively, download a local copy from here: fmtx128.lzh

Archive.org copy of the HD disk software page - with links to other tools (for reference, the current page is here and has no reference to FORMATX any more).

Archive.org copy of the FORMATX utility information - with information about how it works/what it does.

Archive.org copy of the FORMATX lzh archive - the same file as available locally, above.

And this is how FORMATX works:

Run the tool and it scans for available devices - select the one you want to format - just a single IDE device in the example above.

Select the device and choose the partition you want to format - just a single partition in the example above.

If you have selected a partition that can support multiple cluster sizes, then a menu is shown where you can select the size - anything over 60GB is forced to use 32KB clusters of course, so goes the downside of using huge FAT32 filesystems:

The formatting begins and you can see (blocks/sectors/megabytes?) being initialised. You then get a little synthesised speech fanfare when it finishes!

Once the partition has been formatted, you can use the Windows 98 SE emergency boot disk to SYS the drive and make it bootable.

You may want to create a DOS directory and copy over the contents of the Win 98 boot floppy, as well as extracting the EBD.CAB cab file which contains additional Win 98 SE DOS commands (edit, format, etc).

IBM/PC Compatible Partitions

The PC-98 partition table is not compatible with Windows/Linux by default, even though the filesystems contained in those partitions is. However, once you've fully formatted the disk using FORMATX in PC-98 DOS, you then run a utility named CONV98AT.EXE to make a PC-compatible partition table: http://hp.vector.co.jp/authors/VA012947/hduty/conv98at.html

The image above shows the utility running on the fully partitioned and formatted 80GB IDE drive from the tests below. After this step, the above partition is dual-use and can be used fully in both PC-98 and in Windows and Linux on standard PC hardware.


  • Model: Hitachi 5K500,B-120
  • Type: 2.5“ SATA (using cheap SATA to IDE bridge board)
  • Capacity: 120GB
  • Result: FAILURE

The drive is detected on the ROM screen. Disk initialisation fails, FDISK freezes during partitioning. Cannot be formatted.


  • Model: Toshiba MK1255GSX
  • Type: 2.5” SATA (using cheap SATA to IDE bridge board)
  • Capacity: 120GB
  • Result: FAILURE

The drive is detected on the ROM screen. Disk initialisation fails, cannot be partitioned and formatted.


  • Model: Toshiba MHY2120BH (an Apple OEM drive)
  • Type: 2.5“ SATA (using cheap SATA to IDE bridge board)
  • Capacity: 120GB
  • Result: FAILURE

Drive is detected, but the ROM screen freezes and never attempts to boot from disk.


  • Model: Fujitsu MHV2060AH
  • Type: 2.5” IDE
  • Capacity: 60GB
  • Result: SUCCESS

The drive is detected on the ROM screen.

Disk can be initialised. Initialised disk appears in fdisk and can be partitioned. New drive letter (c:) available within DOS. The FORMATX tool runs correctly and successfully formats the entire partition (60GB). The newly formatted space appears and can be SYS-ed and booted from.


  • Model: Seagate Momentus 5400.3 ST980815A
  • Type: 2.5“ IDE
  • Capacity: 80GB
  • Result: SUCCESS

The drive is detected on the ROM screen.

Disk can be initialised. Initialised disk appears in fdisk and can be partitioned. New drive letter (c:) available within DOS. The FORMATX tool runs correctly and successfully formats the entire partition (80GB). The newly formatted space appears and can be SYS-ed and booted from.

Once processed with CONV98AT the drive also shows up normally within Linux and Windows on a PC. Excellent!

  • blog/pc98_hdd.txt
  • Last modified: 2020/03/28 12:11
  • by john