How to open DOS 1.x 160K/320K disk images in WinImage

edited November 2015 in Software
A few notes in case they might help anybody:

It is sometimes necessary to extract or manipulates files from raw disk sector images using disk image tools rather than directly from DOS. Tools like HxC or WinImage usually can do this easily, however they run in to problems with disk formatted for DOS 1.x.

Disks formatted for use with DOS 1.x are usually missing or have incorrect information in the boot sector's BIOS Parameter Block. The BIOS Parameter Block was not introduced until DOS 2.0, and even then not really used by DOS until version 3.2.

Unless disk imaging tools ever smarten up, the only real workaround is to hex edit the disk image manually.

PBP values that match standard 160K/320K/180K/360K disk FAT formats:

The following entries are PBP bytes for the standard DOS 1.x/2.x sizes. Modifying the image with a hex editor, and these entries may enable you to open the image and extract files with WinImage or similar tools.

Do not change the first three bytes as they are program code, not part of the PBP.

Please do not distribute modified disk images. Some disks may rely on being in their original state.

Additionally, these are not applicable to CP/M-86, USCD P-System disks, and some "booter" games. Some OEMs also used their own proprietary formats, for which the below will not work.
160K: (163,840 bytes)
00000000  xx xx xx 49 42 4D 20 20-32 2E 30 00 02 01 01 00    .'.IBM  2.0.....
00000010  02 40 00 40 01 FD 01 00-08 00 01 00 00 00 00 00    .@.@............

320K: (327,680 bytes)
00000000  xx xx xx 49 42 4D 20 20-32 2E 30 00 02 02 01 00    .'.IBM  2.0.....
00000010  02 70 00 80 02 FF 01 00-08 00 02 00 00 00 00 00    .p..............

180K: (184,320 bytes)
00000000  xx xx xx 49 42 4D 20 20-32 2E 30 00 02 01 01 00    .,.IBM  2.0.....
00000010  02 40 00 68 01 FC 02 00-09 00 01 00 00 00 00 00    .@.h............

360K: (368,640 bytes)
00000000  xx xx xx 49 42 4D 20 20-32 2E 30 00 02 02 01 00    .,.IBM  2.0.....
00000010  02 70 00 D0 02 FD 02 00-09 00 02 00 00 00 00 00    .p..............

For the sake of convenience, you may wish to pre-enter these in to a binary file. Then all you will need to do is copy and past the appropriate bytes in to your image files.

Additionally, some clone BIOSes require the "55 AA" signature at the end of the boot sector (offset 1FE) in order to boot the disk. This signature was only intended for use on hard drives, but incorrectly applied to floppy disks. DOS 1.x, which did not normally support the use of a hard drive, does not write this signature so you may need to add it.

Comments

  • I wonder about the first documented incidence of someone needing to extract or manipulates files on a DOS 1.x disk ;-)
    Other than that: great find, saved the info into my personal vintage knowledge base.
  • Methusalix wrote:
    I wonder about the first documented incidence of someone needing to extract or manipulates files on a DOS 1.x disk ;-)
    Other than that: great find, saved the info into my personal vintage knowledge base.
    Thanks.
    There are actually a number of DOS 1.x formatted application disks on WinWorld. While it may seem rare today, many users stuck with 1.x for several years past the release of DOS 2.x. Microsoft dragged its feet making 2.0 available to some OEMs, and some vendors continued to sell 1.x as a budget option next to 2.0. The end result was many software applications remained 1.x compatible well in to 1984 and used 160K or 320K disk formats. Nobody cared about the bad BPB bytes, because versions of DOS all the way up to 6.22 could magically read these with zero problems.
Sign In or Register to comment.