Changes
HDCPM
,==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.<br />
* 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 boardBoard]], 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.<br />
* 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[[SymbOS]]
* HDCPM.DOC the User guide
HDCPM is free software. It can be used and distributed with no restrictions.<br />
==Prerequisites==
* Amstrad CPC/Plus computer capable of running CP/M Plus.
** [[X-Mass]]*
** [[uIDE 16]]* (base address = &FEF0)
** [[M4 boardBoard]]*
** [[USIfAC II]]*
** [[Symbiface III]]*
* 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.
* 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:<br />
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 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)<br />
Alternatively it can be started by holding down the Tab key (no TIME function support) or Shift+Tab (TIME function support), during power-up.<br />
* 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.<br />
==CP/M Plus disk image files==
A CP/M Plus disk image file is a raw binary image of a CP/M hard disk or partition. Its name must be in the form CPMDSK0x.IMG where x=1, 2, 3 or 4 in order to be recognized by HDCPM. The size of the file depends on the Disk Parameter Block of the virtual hard disk it represents and for the initial release of HDCPM it is fixed and equal to 1 reserved track * 256 sectors per track * 512 bytes per sector + 8MB data = 8519680 bytes. If possible create your CPMDSK01.IMG file in a modern computer and copy it in the root directory of your FAT formatted medium. You can use the free online hex editor hexed.it or any hex editor capable of creating binary files filled with a specific pattern.<br />
HDCPM is not FAT aware. It utilizes code to search in the root directory of a FAT formatted medium in order to find the CP/M image files. Then it finds the LBA of the first sector of each file and passes it to the CP/M hard disk driver. The CP/M hard disk driver doesn't know anything about FAT or image files. It accesses the image file as if it was a real hard disk. It works on the sector level with LBA addressing so it expects the 'hard disk' to be a continuous block of sectors.<br />
A CP/M image file can easily become fragmented during its creation, especially if the hard disk is nearly full. I advice you to create/copy your CP/M image files to your FAT formatted hard disk/partition while it is still empty. HDCPM will never fragment a CP/M image file.<br />
==CP/M Plus disk/partitions==
You can also create one or more partitions in order to format them to CP/M file system and use them exclusively for CP/M. In such case you must make sure that the size of the partition is big enough to accommodate your file system.<br />
HDCPM can't be used to partition your hard disk. In order to create partitions you must connect the hard disk to a modern computer and use its partitioning utility.<br />
Use the command |HDDEF to find the exact length of the file system/partition. When you have created the partition use the HDMGR.COM utility in order to format it.<br />
This configuration is only to be used with Symbiface II or [[uIDE-16]]. USB flash disks and SD cards should not be partitioned as they will not be detected by their interface ROM.<br /><br />
==Installation==
Using the ROM:<br />
* Install the HDCPM ROM in a free ROM slot of your ROM box.
* Plug in your Symbiface II compatible IDE interface, [[uIDE-16]], [[M4 board Board]] or USIfAC II and attach the proper mass storage device.
* Power on your Amstrad. You should see the ROM initialization message: 'CP/M+ Hard Disk boot loader v1.04 (S2)'. The type of interface found will be show inside the parentheses:<br />
** (S2): Symbiface II compatible interface
** (uI): [[uIDE-16 ]] interface** (M4): [[M4 Board]]
** (US): USIfAC II
** (S3): Symbiface III<br />
<br />
Using the binary:<br />
* Plug in your Symbiface II compatible IDE interface, [[uIDE-16]], [[M4 board Board]] or USIfAC II and attach the proper mass storage device.
* Use your original CP/M Plus system disk set to Boot CP/M Plus.
* Use the provided HDMGR.COM utility in order to format the disk image or partition and transfer the .EMS file to the reserved track. Change the start-up drive letter to that of your first CP/M hard disk.
* Reset your AMSTRAD and insert the HDCPM floppy disk. If using a FAT aware DOS you can copy HDCPM.BIN to your mass storage device.
* You are ready to go.<br />
==ROM commands==
* |HDCPM mounts the hard disks and boots CP/M Plus. If USIfAC II is used enable the USB disk with the |USB command first.
* |HDDEF shows the diskdefs entry for CP/M tools and the file system size.
* |DATE displays the current date.
* |TIME displays the current time. If [[M4 Board ]] is used |DATE and |TIME will be redirected to M4 |TIME.<br /><br />
==The HDCPM binary file==
* If USIfAC II is used, use your PC to copy HDCPM.BIN to your USB flash disk. Then insert it to your USIfAC II power up your Amstrad and enable the USB disk with the |USB command.
* Execute the file from the floppy disk or from your mass storage device with RUN"HDCPM". HDCPM will detect your mass storage interface and you will see the initialization message: 'CP/M+ Hard Disk boot loader v1.04' Then it will mount any available hard disk images and boot CP/M Plus.
* [[M4 board Board]] and USIfAC II use their own FAT aware DOS so you can run HDCPM.BIN directly from their mass storage device. For all the other interfaces you will need to have a FAT aware DOS, like CubeMDOS or UNIDOS, installed.<br /><br />
==The MAKEIMG.BAS and MAKEIMG.EXE utilities==
MAKEIMG.BAS<br />
<br />
MAKEIMG.EXE<br />
This utility is a SYMBOS[[SymbOS]]* application.<br />Use this utility to create your CP/M hard disk images from within SYMBOSSymbOS. It is a bit faster than its Basic counterpart. It takes between 25 and 60 (or more) minutes for your image file to be created, depending on the characteristics of your media. Disable your screen saver before using it in order to gain some speed.<br />MAKEIMG.EXE has been developed with [Quigs]* for SymbosSymbOS.<br /><br />
==The HDMGR.COM utility==
This is the Hard Disk Manager utility.<br />
You can't use this utility to re-partition your hard disk or make a new CP/M image file or manipulate a file system other than CP/M.<br />
The HDMGR.COM utility is self explanatory. Just run it from the CP/M command prompt.<br />
==The RTC.COM utility==
If you need the 470 bytes of RAM that the integrated RTC driver occupies then you can make use of the RTC.COM utility in order to keep CP/M date and time updated.<br />
You can synchronize the date and time of CP/M Plus with the RTC by running 'RTC -G' manually or via your PROFILE.SUB<br />
You can also set your RTC to the current CP/M date and time by running 'RTC -S'<br />
==Error messages==
'''Hard disk errors:'''<br />
* ''*** No mass storage found ***''
No compatible mass storage interface can be found.
compatible with HDCPM.
'''RTC errors:'''<br />
* ''*** Battery depleted ***''
The RTC battery is depleted. The RTC driver will continue to operate
normally but the readings are not reliable. Replace the RTC battery.