Archive
Projects
About

See figure 1.

Retrocomputing and other indulgences.

Utilities for HOSTCM

Summary: Tools to inspect and extract data from Commodore disk images, tailored for use with HOSTCM. You can download the latest version of the package here.

Most Commodore software is archived in the D64 diskette image format. The Toronto PET Users Group Library is kept in this format, there are thousands of D64 diskette images available on the net, and the format is natively supported by the VICE emulator.

The D64 format is a serialized byte stream of the physical layout of a Commodore 1541 diskette. Other Commodore drives (1571, 1581, 8050, 8250) had slightly different layouts, and they are often stored as D71, D81, D80, and D82 files, respectively (see the extensive discussions of the drives and their archive formats here and here).

Some years ago, Per Olofsson wrote a set of library routines for manipulating D64, D71, and (some) D81 images. I’ve extended this to support D80 and D82 images; the 8050 and 8250 drives were commonly used with SuperPETs, and some software is only available in those formats.

Using these routines, I’ve written two utilities – didir and diextract – that are useful if you’re working with HOSTCM.

didir produces a directory listing for a supplied set of archive images. Usage is

didir [-v][-e fname,fmt] image [image ...] 

    -v 		    verbose, emulates CBM DOS directory output
    -e fname,fmt    list only files matching fname,fmt 

diextract extracts one or more files from a set of images, creating standalone files which are suitable for use with HOSTCM. Usage is

diextract [-v][-f outdir][-e fname,fmt] image [image ...]

    -v		    verbose, list files as they are extracted
    -f outdir	    place extracted files in directory outdir
    -e fname,fmt    extract only files matching fname,fmt

diextract creates files with the same name as they were stored on the diskette, with the following modifications (a) ‘/’ characters in filenames are translated to ‘~’ to avoid conflicts with directory naming, and (b) ‘fixed’ type files have their record lengths prepended to their filename, e.g. (f:80)filename,rel

HOSTCM relies on this record-length information to support the SuperPET’s ‘fixed’ file format semantics.

The original diskimage library is © Per Olofsson. The extensions and utilities are © Rob Ferguson, 2013, and are made available under the BSD 2-clause license. See the LICENSE file included in the distribution for details.

—   15 May 2013
(tags: , , , )