DiskOnChip

This is a guest post by Nils aka stecdose

What Is DOC?

I would like to present a „storage card“ for the XT bus (8-bit ISA bus) that I built from scrap parts. It is based on a small device called DiskOnChip, or DOC.

8-bit DOC Card

DOC-based storage card

I have been using the card for about 3 years now and it has proven to be quite a handy tool. The storage card shows up as drive C: in a system and it is even bootable!

The PCB was taken from a „safety device“ for school computers. There used to be a flash ROM where the DiskOnChip now resides. This ROM held code to hook INT 13h (disk services). After every reboot, the computer would discard all data written to the disk before reboot. This safety device is called „Dr. Kaiser PC-Wächter“ and could be found in many German school computers from circa 1995 to 2005. There are also PCI and PCIe variants, but I never have seen one myself.

The DiskOnChip device made by M-Systems (“Flash Disk Pioneers”) was taken from a 486 single board computer which features a ROM socket. This particular DOC model offers 4MB of storage space. DIP variants were available in sizes ranging from 2MB to 1024MB.

How does it work?

The DOC shows up as an option ROM using 8K of memory. This option ROM hooks disk services (INT 13h) and emulates a hard disk on the BIOS level. DOS and several other supported operating systems may be installed to this drive like to a regular hard disk.

Here’s a picture of the tiny DOC card in my test system…

DOC in a PC

…and a „screenshot“ of PC DOS 5 booting off the DOC.

Booting off DOC

Building the Card

Since the flash chip was not socketed on the PC-Wächter card, it was a bit difficult to get rid of it. The chip and the traces absorbed much of the heat from a soldering iron. If one uses a pump or similar methods to remove the solder, it will almost certainly end up with one or more traces being ruined.

I decided to cut every single pin of the flash with a side cutter, as close to the chip as possible. The next step was to heat the remaining pins and pull them out from top side with tweezers. That was quite easy.

Finally I soldered on two contact rows. There wasn’t enough space for a ZIF socket. All in all a 10-minute job. Here’s what the card looks like without the DOC plugged in:

DOC carrier and the chip

Configuration

The jumper block on the card allows the user to select the ROM location, choosing from one of three possible segment addresses: C800, D000, or D800.

The DOC can be used like a regular hard disk, formatted with the DOS FORMAT command and made bootable with SYS.

The DOC tool package also contains a custom format tool for DOS, which sets up the DOC at a lower level. The tools also allows the user to specify whether the DOC shows up as the first drive (C:) or as the last drive.

In my 386 test system the DOC card does not work with two hard disks in BIOS, only a configuration with a single hard disk+DOC works.

Performance

I have run a few benchmarks on this device, as well as on a generic IDE hard disk. The host system is a 25MHz 386SX with 8MB RAM, running MS-DOS 6.22. The IDE hard disk is 2.1GB Fujitsu MPB3021ATU. Its full size is not supported by the BIOS, but is the smallest disk I have around.

CheckIt 3.0 results:

Read Avg. Seek Track Seek Rating (x * XT)
IDE HDD 468kb/s 7.2ms 3.3ms 5.51x
DOC 132.8kb/s 4.3ms 16.0ms 1.56x

Track seek is the time needed to seek from one track to the next track. The final rating is meant to compare to a XT hard disk and is calculated by CheckIt.

It looks like the the DOC is slower in read speed, but faster in seeking (as it should be, being a solid-state device). Given its small size and limited write cycles, this makes the DOC a good operating system drive.

GETIMG / PUTIMG results:

M-Systems provided DOS drivers along with a set of utilites. One of these is DOCPMAP.EXE which reads and writes directly to a DOC device. I set up a RAM disk to work on and executed a read and a write for the whole DOC and measured the elapsed time.

Image-size is 4,095,808 bytes.

Time Kbyte/s
Read image  01:54s 35.08kb/s
Write image 03:11s 20.94kb/s

These values seem very poor to me and I checked twice. I suspect the low speed is caused by a different method used to access the disk.

Software/Drivers/Documentation

There are several different operating systems supported by the DOC, such as QNX, Linux, DOS, and Windows. The Linux-driver is a good starting point when writing software for the DOC from scratch.

Most datasheets and application notes have disappeared since M-Systems was bought by SanDisk. Luckily, there is a guy collecting DiskOnChip stuff. There you can get all available datasheets, software, and code examples. There’s also an impressive collection of pictures of different DOCs and batch programming devices (so called gang programmers).

If you’re interested in DOC’s firmware files for dissecting/updating, these are stored within DOS-utilities archives as files with .EXB extension.

My DOC came with firmware V1.21, I successfully upgraded to V4.20 with the firmware image and tools from DOC_V4.20.zip.

This ZIP file also contains the tools needed to operate a DiskOnChip:

  • DFORMAT.EXE to prepare
  • DUPDATE.EXE to write a new bootimage (.EXB file)
  • DOCPMAP.EXE to read/write images
  • DINFO.EXE to show information
  • DPROTECT.EXE to make it read-only
  • UNMOUNT.EXE to „eject“ a DOC from system (maybe useful for handhelds?)
  • DDEFRAG.EXE obvious what this does

There are also 8086 versions of these tools as well as 8086 boot images and two more programs, which seem to be installable DOS drivers:

  • DOC2SS.COM
  • DOC2TFFS.COM

I haven’t tried them so far, but there is a corresponding application note (AP-DOC-012).

Example output of DINFO:

DOC dinfo utility

Building an ISA card

M-Systems offered a simple schematic for the building a PC compatible carrier card, and they also provided a good application note on the subject.

There were a few ISA and PCI cards made by M-Systems. Here’s a picture of an ISA card with a ZIF socket and the example schematic:

M-Systems example card and schematic

I think it is not too hard to build a small ISA card based on the above schematic, but I have almost no experience in making PCBs or ordering them from China. If any reader is more into this, I could give it a try, draw schematics and board and send it over. Preferably in Eagle. Some time ago I already drafted  a few things in Eagle (https://github.com/spacerace/Eagle-Libraries).

Where to get one?

If you want one of these DOC gadgets, I don’t have any to sell. 

On eBay, DOCs of this model (MD2200) are usually sold for something between 2€/pc to 20€/pc, in different sizes. Sometimes the Dr. Kaiser PC-Wächter ISA boards also show up for sale

Other Applications

It ought to be possible to plug a DOC DIP-28 chip into the boot ROM socket of many ISA network cards. In theory it should be possible to set up a NIC that is bootable (locally, not over the network)  and comes with its own network stack (MS network client, NetWare client, whatever). A network card is a class of device that’s unusual in that in can have its own bootable ROM but the ROM isn’t needed for normal operation.

This entry was posted in Hardware Hacks, PC hardware. Bookmark the permalink.

11 Responses to DiskOnChip

  1. ynari says:

    It’s neat and all, but I’d much rather use a DOM. They appear to be quite fast, and they generally work seamlessly in an IDE controller. They’re not always that cheap, though.

    For modern systems (where ‘modern’ is something that doesn’t expire at the thought of >32GB space), an SSD with IDE to SATA converter worls well.

  2. Michal Necasek says:

    Sure, but try that in an XT with only 8-bit slots.

    For faster and more modern machines, yeah, CF cards with simple adapters or SATA SSDs are a much better option.

  3. Richard Wells says:

    The XT-IDE and related projects manage to make 16-bit IDE work with a card that can be installed in an IBM PC 8-bit slot.

  4. Michal Necasek says:

    Of course. But that’s another rather special piece of hardware.

  5. Nils says:

    Mostly usable for stuff without IDE. I use it when nothing comes up on a computer from disk, to test a board/some hardware on workbench, …

    Just found this: https://www.lo-tech.co.uk/wiki/ISA-ROM-Board
    This should also work with DOCs.

  6. Jack says:

    The XT-IDE may be a specialized piece of hardware but it appears to be mostly 74 series discrete logic to me – not exactly the kinds of chips that are hard to find.

  7. dieymir says:

    Perhaps more interesting than the XT-IDE itself is the XT Universal BIOS (XUB). I have a cheap RTL8019 network card with XUB glued with a floppy BIOS (supports HD formats) and a 16 bit multi I/O card in another slot. The XUB is in “16 bit on 8 bit slot” mode and I have a IDE2CF adapter with a 32MB CF from an old Cisco switch (It’s very much like one of those HardCards popular at the era). So I have HD floppy support + networking + 32 MB HDD + serial,parallel & game ports all in two cheap readily available cards. You really do not need any special HW.

    A question, The DOC (TrueFFS) eats conventional memoy to simulate the HDD, isn’t it?

  8. Michal Necasek says:

    I don’t think the DOC needs conventional memory (but not 100% sure about that). It provides a BIOS INT 13h interface and I believe the “disk” parameters are stored in the flash.

  9. Nils says:

    No it isn’t eating any convential memory. Just like Michal said. It works with every OS’s bootsector, which are using different memory layouts. So TrueFFS keeps out of “OS-RAM area”.

  10. neko says:

    Think this would work in a network card’s ROM socket? I have a PS/2 Model 25 and with only two ISA slots, upgrades are limited. Would like to have network, hard disk and Sound Blaster if I could…

  11. Michal Necasek says:

    It ought to work in a network card’s ROM socket. Untested but there’s no obvious reason why it shouldn’t work, as long as the network card can work with an 8K ROM.

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.