DISCKIT Development
DISCKIT is the diskette format/copy/verify utility supplied with Amstrad CP/M. This page is an attempt to chart its development history.
DISCKIT 1.0 (CPC)
The first version of DISCKIT I have is for the CPC6128. It is supplied in two variants: DISCKIT2 (for CP/M 2) and DISCKIT3 (for CP/M 3).
The program is structured as a number of modules. It's possible to see the boundaries of these because whatever tool Locomotive used to create DISCKIT inserted a fair amount of packing bytes between each module. The modules are:
- Entry
- The first module. Contains startup code, low-level disc I/O functions, and code to manage memory buffers.
- Screen
- Keyboard input and text output functions.
- Menu
- Displays DISCKIT's menu screens.
- Worker
- The implementation of the copy, format and verify functions.
- Error
- Manages the display of error messages and prompts for disc insertion / removal.
- Messages
- Contains all message text, using a compression system for frequently-repeated tokens.
(Module names are my own invention).
The first two modules abstract away all operating system dependencies (CP/M 2 vs CP/M 3); the code in the later ones is pretty much identical.
The CP/M 2 version overwrites the BDOS, using memory up to the base of the BIOS for its buffers. Consequently, after initialisation it only uses BIOS and firmware calls. In addition, it uses sideways RAM for additional buffer space.
Where the CP/M 2 version uses sideways RAM, the CP/M 3 version uses the memory listed in the CP/M buffer table, as returned by CD INFO.
One quirk of this history: there is a function that gets called when the
program shuts down. It only applies in the CP/M 2 version of DISCKIT; in
the CP/M 3 version, it consists only of a RET
operation.
Nevertheless, all CP/M Plus versions of DISCKIT still faithfully call it.
DISCKIT 1.1 (PCW)
Version 1.1 was distributed with early versions of PCW CP/M (BIOS 1.1 and 1.2). Despite the small version number bump from 1.0, it is a fairly large rewrite.
The following details have changed:
- The CP/M buffer table is not used. Rather, a file (M:DISCKIT.$$$) is used to store temporary data.
- Since the PCW does not have CPC firmware, firmware calls have been replaced with calls to the CP/M BDOS (for text output) or the PCW XBIOS.
- Sector size is not assumed to be 512 bytes. In practice all formats supported by DISCKIT do have 512-byte sectors, but at least some of the code is written to support other sizes.
- With the advent of the 720k format, discs are not assumed to be single-sided.
- The internal modules have been rearranged: the order is now Entry, Worker, Error, Menu, Screen, Messages.
- PCW disc formats are supported rather than CPC. Similarly, the PCW8256/8512 drive arrangement is assumed, with A: being 180k and B: being 720k.
- The message compression system has been expanded and is far more systematic.
- In order to format boot discs, DISCKIT contains a copy of the 180k PCW8256 boot sector. This is in contrast to the CPC version, which when formatting a boot disc would prompt for an existing boot disc to copy the system tracks from.
DISCKIT 1.2 (PCW)
This version was distributed with PCW 8256 CP/M BIOS 1.4, and is the most common version for 8000-series PCWs. Changes include:
- The user is prompted to remove discs at startup. On termination, all drives are reset.
- When a disc is being formatted or copied, the first byte of the destination disc is set to 0FFh, marking it as a partial copy. Only when the format/copy has run to completion is the proper boot sector written.
DISCKIT 2.1 (PCW)
Version 2.1 was distributed with PCW9512 CP/M BIOS 2.1. If there was a DISCKIT 2.0, I don't have a copy.
Changes in version 2.1 are minor, and mainly relate to targeting the PCW9512 rather than PCW8000 series:
- Requires that the BIOS major version is 2 (9512) rather than 1 (8256/8512).
- Two boot sectors are included: 180k and 720k.
- Screens have been redesigned to match the PCW9512 keyboard layout (function keys on the left).
- Disc formats are referred to as '180K' and '720K' rather than 'CF2' and 'CF2DD'.
MULTIPLE #93 (PCW)
MULTIPLE.COM is an internal Locomotive build of DISCKIT, for making multiple copies of a single floppy disc. It signs on as 'JOYCE DISC KIT #93'.
It appears to be based on a point somewhere between DISCKIT 2.1 and 3.1, with the following differences:
- Requires that the BIOS major version is 1 (8256/8512) rather than 2 (9512).
- Only the 180k boot sector is included.
- Screens follow the PCW8256 keyboard convention, with function keys on the right.
- Oddly, does not disable the cursor when displaying messages.
- The keystrokes used for 'R'etry, 'I'gnore, 'C'ancel and 'Y'es are now held in the Messages table rather than being hardcoded.
- The 'Copy' function can write multiple copies of a single disc.
DISCKIT 3.1 (Spectrum +3)
Distributed with Spectrum +3 CP/M v1.0.
Changes in this version are:
- Because in some respects the +3 resembles a CPC6128 more than a PCW, some CPC6128 code returns. In particular, the buffer management code is based on the CPC version, using CD_INFO to allocate memory in banks 0 and 2.
- One full boot sector is included — the 180k +3 CP/M boot sector. There is also a 720k disc specification, which isn't used by the program; this appears to be left over from DISCKIT 1.2.
- The message output engine has been rewritten, increasing the number of possible messages. I'm not sure why this would need to be done for the +3, but perhaps DISCKIT 3.0 (if it existed) required the change.
DISCKIT 4.0 (PCW)
Distributed with PCW9256 CP/M (BIOS 1.11), PCW9512+ CP/M (BIOS 2.11) and PCW10 CP/M (BIOS 1.12). Changes in this version are:
- This version was created for the second-generation PCWs: 9256 and 9512+. Unlike 1.x and 2.x versions (which only worked on particular PCW models) this supports all PCW models: 8256, 8512, 9512, 9256 and 9512+.
- Consequently, there are now two copies of each menu screen, one with 8000-style layout and one with 9000-style. This may be why the message system was redesigned in DISCKIT 3.x above.
- Boot sectors are now stored in the code segment, rather than the data segment. There are four boot sectors: Two 3.5" ones for the PCW9256 and PCW9512+, and two 3" ones for the PCW8256 and PCW9512.
- Modules are no longer separated with sequences of packing bytes.
- The code to determine free space on drive M: now checks if there is more than 800k free; if so, it only allocates 800k. In earlier versions, DISCKIT would attempt to allocate all the space, causing a noticeable delay at startup. (For earlier versions, Cirtech supplied a program, DISCFIX.COM, which would patch this code to similar effect).
DISCKIT 4.0 was also supplied with the Silicon City 3.5" drive A: for 8000-series PCWs. In order to make it support a 720k drive A:, a separate utility (DKFIX) was provided, which patched CP/M to return a BIOS version number of 2.1. DISCKIT would then behave as if it was running on a PCW9512, complete with 9512 keyboard layouts in the menu screens.
DISCKIT 4.2 (PCW)
DISCKIT 4.2 was supplied with the most recent PCW CP/M versions, 1.15 / 2.15. Compared to version 4.0, there are a number of changes, mainly to support PCWs with nonstandard drive configurations (eg, PCW8000 series with 3.5" drive A: or 180k drive B:). Consequently, there is no longer any need for patching of CP/M with DKFIX.
I don't have a copy of DISCKIT 4.1, if such a thing existed, so I don't know how many of the changes went into it.
John Elliott, 4 April 2015