HDCPM
Contents
Introduction
HDCPM is an Amstrad CPC application that enables your computer to boot and run CP/M Plus from a mass storage device. A maximum of four 8MB partitions or virtual disks can be used to make the vast amount of 32MB of data available to CP/M Plus.
It comes in the form of:
- a standard background ROM that can be installed in any available ROM position.
- a standard binary file that can be loaded from floppy or hard drive.
HDCPM has been developed with modern DOSs, that support the FAT file system, in mind. This means that CP/M can use the same hard disk with other DOSs.
The following configurations are possible with one hard disk:
- One not partitioned, CP/M formatted hard disk. The whole hard disk is used by CP/M.
- One to four CP/M formatted partitions. Every partition is accessed as a separate hard disk by CP/M.
- One not partitioned FAT16 or FAT32 formatted hard disk. You can place one to four CP/M disk image files in the root directory. Every disk image file is accessed as a separate hard disk by CP/M.
- One FAT16 or FAT32 and one to three CP/M formatted partitions. You can place one to four CP/M disk image files in the root directory of the FAT file system. Every disk image file is accessed as a separate hard disk by CP/M. CP/M disk images have priority over CP/M partitions so if you have three CP/M image files and three CP/M partitions then HDCPM will mount the three CP/M images and only the first CP/M partition. If the first partition on your hard disk is formatted to FAT16 or FAT32 then HDCPM expects to find the file CPMDSK01.IMG in the root directory. Failed to do so the system won't boot.
- For interfaces that use SD card or USB flash drive as a mass storage device (M4 board, USIfAC II or Symbiface III) the only supported configuration is one to four CP/M disk image files in the root directory of the FAT file system.
Currently only the master IDE device can be accessed by HDCPM. The slave device is available to be used by your favourite DOS.
HDCPM can also utilize the RTC found in the Symbiface II in order to implement CP/M Plus BIOS function 26: TIME.
HDCPM is compatible with Dobbertin HD20 Harddisc and can be used together.
HDCPM has been developed with WinAPE* Z80 Assembler and was tested with WinAPE, CPCemu*, an Amstrad Plus 464 upgraded to 6128 and an Amstrad CPC 6128.
Although every effort has been made to ensure that HDCPM works properly, there is a chance of hard disk data corruption in case of a stray bug in the code. So make a backup of your hard disk before installing and trying out the ROM. I'll not be held responsible for any data loss or damage to your hard disk.
HDCPM distribution disk contains the following files:
- HDCPM.ROM the ROM itself
- HDCPM.BIN the executable binary file
- HDMGR.COM Hard Disk Manager utility
- RTC.COM RTC synchronization utility
- MAKEIMG.BAS CP/M image file creation utility
- MAKEIMG.BIN CP/M image file creation binary
- MAKEIMG.EXE CP/M image file creation utility for SYMBOS
- HDCPM.DOC the User guide
HDCPM is free software. It can be used and distributed with no restrictions.
Prerequisites
- Amstrad CPC/Plus computer capable of running CP/M Plus.
- ROM box or other ROM expansion hardware if using the ROM.
- Optionaly a FAT aware DOS like M4 ROM, USIfAC ROM, UniDOS*, CubeMDOS* etc if using the binary.
- One of the following mass storage interfaces:
- Symbiface II*
- X-Mass*
- uIDE-16* (base address = &FEF0)
- M4 board*
- USIfAC II*
- Symbiface III*
- and a compatible storage device with enough free space to accommodate the desirable CP/M hard disk configuration.
- Floppy disk drive for initialization of the file system.
- CP/M Plus system disks for making the system bootable.
- Optionally a Symbiface II compatible RTC.
Restrictions
- CP/M 2.2 or lower is not supported.
- In case of a patched or non AMSTRAD CP/M Plus the BIOS, BDOS, SCB base addresses must be equal to the ones used by the official distribution of the AMSTRAD CP/M Plus.
- Only the master IDE device is accessible by HDCPM.
- The maximum number of hard disk partition/images supported is four.
- Only primary partitions are supported.
- If you want to use CP/M disk images then they must be stored in a FAT16 or FAT32 formatted disk or partition.
- If the hard disk is partitioned then the CP/M disk images must be placed in the first partition of the disk.
- The CP/M disk images must be placed in the root directory of the FAT file system.
- The CP/M disk images must NOT be fragmented and must have the correct size.
- The CP/M partitions must be big enough to accommodate your CP/M file system. Otherwise the file system on the hard disk WILL get corrupted.
- Only storage devices with 512 bytes sector size are supported.
- Only storage devices with LBA addressing are supported.
- Date stamps of CP/M disk image files are not maintained.
- In case a Dobbertin Harddisc is also used you can't change its drive letters (D, E, F, G) as they are hard coded in the Dobbertin driver. Use the HDMGR utility to assign other available drive letters to your IDE drive, images or partitions. If you use the same numbers for your IDE media then the corresponding HD20 partitions will be unavailable under CP/M.
How it works
Using the ROM:
Upon computer power-up the HDCPM ROM will be initialized and will inform you of the presence of a compatible interface and RTC. Two bytes of RAM will be reserved for storing the interface type and M4 board ROM number (if found). The boot loader can be started by executing one of the following commands:
|HDCPM (no TIME function support) or |HDCPMT (TIME function support)
Alternatively it can be started by holding down the Tab key (no TIME function support) or Shift+Tab (TIME function support), during power-up.
Using the binary:
HDCPM can be started by running the HDCPM.BIN file from floppy drive or mass storage.
HDCPM will then execute the following functions:
- Search for a compatible mass storage interface.
- Move the boot loader and the CP/M patcher to RAM.
- Mount 1 to 4 CP/M image files and/or partitions and perform fragmentation and size test.
- Read the boot sector of the 1st hard disk and learn about the DPB, presence and size of the .EMS file, the startup drive, the drive letters and the CP/M console colour scheme.
- Read the .EMS file from the reserved track and store it in RAM just as the normal CP/M Plus boot loader does.
- Move the top of TPA and transfer the hard disk driver, RTC driver (in case of |HDCPMT) and initialize the XDPH, DPB, ALV of the mounted hard disks to the memory area just below the normal BDOS base address. The newly inserted code will be handled by CP/M as if it was a normal RSX.
- Patch the SCB in order to change the startup/default drive.
- Patch the drive table records to reassign drive letters for floppy drives 1 and 2, hard disks 1,2,3,4 (if any) and ram drive if Dk'tronics or Dobbertin RAM disk driver is present.
- Move the ALV of the Dk'tronics RAM disk if ZPM is detected.
- Patch the CP/M console with the desired colour scheme.
- Patch the system message.
- Do a normal CP/M cold start.
Any CP/M 3.0 compatible system that loads the BDOS, BIOS, SCB to the default AMSTRAD CP/M addresses should work. HDCPM will be able (hopefully) to patch it on the fly.