DOS65, floppy emulator HxC2001, transfer files

Working with a system like DOS65 confronts you with interesting challenges if you want to use the files in modern PC environments. Floppy drives are now quite old-fashioned and the reliability in the old days was already a problem. Old floppies and old drives wear out, new drives and floppies are hard to obtain.
The second challenge on retro systems is how to get data out of the non-standard filesystems. The DOS65 file-system is not compatible at all with MS-DOS FAT for example,  or any known file system. Luckily DOS65 uses standard MFM, so raw access to sectordate is possible, and that enables floppy emulation hardware.

HxC2001 virtual floppy drive

I have found and developed a comfortable method to avoid the floppy blues. The physical problem is solved in the form of a device called HxC2001, which emulates one or two floppy disk and stores the data on an SD card.  Acccessing the DOS65  file system is therefore possible by having my program, DOS65ImageManager, on the PC, access the virtual floppy image on the SD card.

20160304_152932_HDR

The HxC2001 is a small device as can be seen on the photo above. The SD card goes in the front connector. The buttons and the display allow to select a virtual floppy image, a file on the Sd card, as either first or second floppy drive. Jumpers on the back, next to the standard 34 pin floppy connector, allow to select it to action as drive 0 ..3.

DOS65 can boot from the HxC2001 and show two virtual floppy drives. Or combined as one virtual floppy drive with any physical floppy drive. Very flexible, with the right jumper.

The HxC2001 is easy to add as second drive to the DOS65 system of Andrew Gregory, since the external 5 1/4 drive is connected at the back with a standard 34 pin cable connector. The HxC2001 appears a drive 1: and is a DSDD drive as far as DOS65 knows.  This makes it possible to transfer all files on the 3.5 floppies to the SD card. All this is made easy with the solid state disk in the Andrew Gregory system, a 128K third drive 2:

  1. Boot DOS65 from a DOS65 floppy
  2. Copy the COPY and FORMAT program to the solid state drive 2:
  3. Change the virtual floppy in the HxC2001 1: drive to an empty image.
  4. Start COPY and FORMAT from drive 2: to copy all files on the 3,5 inch floppy drive 0: to the virtual floppy image in drive 1:
  5. Repeat step 1 to 4 for every 5 1/4 floppy

But the HxC2001 also can function as drive 0: and the 5 1/4 external drive as drive 1:. This makes it possible to transfer all files on the 5 1/4 floppies to the SD card.

  1. Boot DOS65 from a DOS65 virtual mage
  2. Copy the COPY and FORMAT program to the solid state drive 2:
  3. Change the virtual floppy in the HxC2001 0:0 drive to an empty image.
  4. Start COPY and FORMAT from drive 2: to copy all files on the 5 1/4 inch floppy drive to the virtual floppy image in drive 0:
  5. Repeat step 1 to 4 for every 5 1/4 floppy.

Now we have image files in HxC2001 format on the SD  card. The format is well defined but quite complex to work with. Fortunately with the HxC2001 a program is delivered to manage the virtual floppy images and export to a data dump of the sectors.

HxCFloppyEmulator
The first step to read the files on the PC is to load the  HxC2001 formatted (.hfe filetype) image file and export it  to a raw disk dump format (filetype .IMG) with the export facility. This IMG file is simple a dump of the floppy of all sectors in all tracks of all sides. This is exactly the same physical format DOS65 sees on the floppy drive and the file system can be deducted from the DOS65 specification.

DOS65ImageManager

Program and sources in this archive.

Note: It is assumed in the next steps that the floppy image is formatted on the DOS65 system as double sided, double density, 80 tracks, interleave factor 3. This gives 32 sectors per track (16 per side) . Other formats will either crash the program or hopefully tell you it is not supported!

With the aid of of the DOS65 file system documentation and some experiments I was able to write a program to show the directory and extract files of DOs65 floppy images. The program, called DOS65ImageManager, is written in platform independent Lazarus/Freepascal, so it runs on Windows or in a Linux desktop. Source included, build yourself on Linux,  a Windows executable is included.

Andrew Gregory has written a document after investigating the DOS65 file system when implementing his solid state silicon disc system. I have updated this document when I wrote the program to extract files from the DOS65 image file,  it was incomplete in some TrackSectorList details. Here you can read the updated document in PDF format.

The program allows to inspect the contents of the floppy image. And after loading the directory it may extract one or all files to a directory on the PC. Only reading, no writing!
Some limitations, due to the different platforms, are:

  • Characters in filenames are limited to A..Z, a .. z, 0..9 to avoid illegal name problems on the host.
  • An option page allows to influence the treatment of text files (ASCII called in DOS65) since these are  CR based. DOS/Windows use CR+LF, Unix uses LF.
  • Some text files on DOS65 contain escape sequences, for e.g. bold printing and there can be  other non-printing characters. These can be stripped by using the option StripNonPrinting.
  • Default is DOS/Windows and StripNonPrinting.

The Save All Files delivers a directory with the DOS65 files, including subdirectories A..G if present. Also a logfile is in the directory, as follows:

DOS65 disc name = dos6503
Tracks = 80
Cylinders = 32
Sectors per cylinder = 16
Not bootable
Double Sided Double Density 80 tracks 640K interleave factor 3
1 drivers.MAC ASCII Size=2464 Beginaddr=0000 Runadr=0000
2 syshavi.MAC ASCII Size=051F Beginaddr=0000 Runadr=0000
...

DOS65ImageManager1DOS65ImageManager6DOS65ImageManager4
DOS65ImageManager2DOS65ImageManager3DOS65ImageManager4DOS65ImageManager5jpg