<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://oldwiki.cpcwiki.eu/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=D+kef</id>
		<title>CPCWiki - THE Amstrad CPC encyclopedia! - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="https://oldwiki.cpcwiki.eu/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=D+kef"/>
		<link rel="alternate" type="text/html" href="https://oldwiki.cpcwiki.eu/index.php/Special:Contributions/D_kef"/>
		<updated>2026-08-28T11:17:54Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.25.1</generator>

	<entry>
		<id>https://oldwiki.cpcwiki.eu/index.php?title=CP/M_3.0&amp;diff=120987</id>
		<title>CP/M 3.0</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.cpcwiki.eu/index.php?title=CP/M_3.0&amp;diff=120987"/>
				<updated>2024-12-15T17:19:05Z</updated>
		
		<summary type="html">&lt;p&gt;D kef: /* Console Output/Terminal emulation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:cpm30boot.jpg|thumb|300px|CP/M 3.0 after boot]]&lt;br /&gt;
&lt;br /&gt;
CPM 3.0 (also known as CPM+) was available on the 2nd [[System_Disk]] Disc for CPC6128 but there were other implementations available.&lt;br /&gt;
&lt;br /&gt;
== Dobbertin's implementation of CP/M+ ==&lt;br /&gt;
&lt;br /&gt;
* [[Dobbertin CPM+]]&lt;br /&gt;
&lt;br /&gt;
== Graduate Software's implementation of CP/M+ on ROM ==&lt;br /&gt;
&lt;br /&gt;
* [[Graduate Software]]&lt;br /&gt;
&lt;br /&gt;
== Amstrad's implementation of CP/M+ ==&lt;br /&gt;
&lt;br /&gt;
Amstrad distributed CP/M+ on the side 4 of the system discs that came with the CPC6128. It requires a Dk'Tronics compatible ram expansion. It provided 61K TPA. To get 61K TPA, CPM+ uses 'C1' and 'C2' RAM configuration with TPA in the 2nd bank and the CCP, BDOS, BIOS, screen and firmware in the 1st 64KB of RAM. This arrangement allows 61KB useable for programs.&lt;br /&gt;
&lt;br /&gt;
On side 1 of the system discs was CP/M 2.2.&lt;br /&gt;
&lt;br /&gt;
* Amstrad CP/M+ uses Amstrad's &amp;quot;System&amp;quot; format. This is 40 tracks, 1 side, 9 sectors per track numbered &amp;amp;41-&amp;amp;49. Each sector is 512bytes. There are two reserved tracks, then the directory which has 64 entries (which occupies 4 sectors) and then the data area. &lt;br /&gt;
* CP/M is booted using an RSX command &amp;quot;|CPM&amp;quot; which is implemented in the Amstrad disc rom (AMSDOS).&lt;br /&gt;
* |CPM loads track 0, side 0, sector &amp;amp;41 into RAM at &amp;amp;100-&amp;amp;2ff. This is the boot sector and contains the boot program.&lt;br /&gt;
* The boot program then loads the directory from track 2, sector &amp;amp;41.&lt;br /&gt;
* The boot program locates a program with extension &amp;quot;EMS&amp;quot;.&lt;br /&gt;
* This program is loaded into RAM at &amp;amp;c00.&lt;br /&gt;
* This is then executed. (EMS contains the BIOS, BDOS and relocates and re-configures the memory. CP/M doesn't use the CP/M 2.2 BIOS from the Amstrad disc ROM.)&lt;br /&gt;
&lt;br /&gt;
=== Creating a minimal boot disc ===&lt;br /&gt;
&lt;br /&gt;
Using CPM2.2:&lt;br /&gt;
* Use disckit2 to format a vendor format disc&lt;br /&gt;
* Use BOOTGEN to put the CPM+ boot sector onto your disc. (Source is CPM+, Destination is your disk).&lt;br /&gt;
* Use FILECOPY to put C10CPM3.EMS onto your disc (FILECOPY C10CPM3.EMS. Source is CPM+, Destination is your disk).&lt;br /&gt;
* Your minimal CP/M+ disc is bootable.&lt;br /&gt;
&lt;br /&gt;
Using CPM3.3:&lt;br /&gt;
* Use disckit3 to format and install the boot sector onto the disc.&lt;br /&gt;
* Use PIP to copy C10CPM3.EMS to your disc (B:=A:C10CPM3.EMS)&lt;br /&gt;
* Your minimal CP/M+ disc is bootable.&lt;br /&gt;
&lt;br /&gt;
=== Terminal font ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery caption=&amp;quot;CP/M 3.0 terminal font&amp;quot;&amp;gt;&lt;br /&gt;
Image:Cpmplus.png&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Console Input ===&lt;br /&gt;
&lt;br /&gt;
Console input (via BDOS functions) uses firmware functions and returns firmware key codes when a key is pressed. i.e. &amp;amp;f0 is cursor up.&lt;br /&gt;
&lt;br /&gt;
=== Console Output/Terminal emulation ===&lt;br /&gt;
&lt;br /&gt;
Console output is processed via the terminal emulation. Console output doesn't execute firmware control codes.&lt;br /&gt;
&lt;br /&gt;
A simplified VT52 terminal is emulated. Home means the top-left position.&lt;br /&gt;
&lt;br /&gt;
The following are supported:&lt;br /&gt;
&lt;br /&gt;
 ESC 0 - disable status line&lt;br /&gt;
 ESC 1 - enable status line&lt;br /&gt;
 ESC 2 - set language&lt;br /&gt;
 ESC 3 - set screen mode&lt;br /&gt;
 ESC A - cursor up&lt;br /&gt;
 ESC B - cursor down&lt;br /&gt;
 ESC C - cursor right&lt;br /&gt;
 ESC D - cursor left&lt;br /&gt;
 ESC E - clear screen and move cursor to home&lt;br /&gt;
 ESC H - move cursor to home&lt;br /&gt;
 ESC I - reverse line feed&lt;br /&gt;
 ESC J - erase to end of screen&lt;br /&gt;
 ESC K - erase to end of line&lt;br /&gt;
 ESC L - insert line&lt;br /&gt;
 ESC M - delete current&lt;br /&gt;
 ESC N - delete character and move characters up&lt;br /&gt;
 ESC Y - set cursor position&lt;br /&gt;
 ESC d - erase all above&lt;br /&gt;
 ESC b - set foreground&lt;br /&gt;
 ESC c - set background (and border)&lt;br /&gt;
 ESC e - enable cursor&lt;br /&gt;
 ESC f - disable cursor&lt;br /&gt;
 ESC j - save cursor pos&lt;br /&gt;
 ESC k - restore cursor pos&lt;br /&gt;
 ESC l - erase and above cursor&lt;br /&gt;
 ESC o - erase current line&lt;br /&gt;
 ESC p - invert on&lt;br /&gt;
 ESC q - invert off&lt;br /&gt;
 ESC r - select bright (recognised but not implemented)&lt;br /&gt;
 ESC u - cancel bright (recognised but not implemented)&lt;br /&gt;
 ESC v - wrap on&lt;br /&gt;
 ESC w - wrap off&lt;br /&gt;
 ESC x - mono mode&lt;br /&gt;
 ESC y - mono c080 mode&lt;br /&gt;
&lt;br /&gt;
PCW and Spectrum support viewports. This is not supported on CPC. CPC assumes a single viewport covering the entire screen and it is moved up/down using software when using insert line or delete current, but moved up using hardware otherwise.&lt;br /&gt;
&lt;br /&gt;
==== ESC 2 - set language ====&lt;br /&gt;
&lt;br /&gt;
ESC 2 &amp;lt;language&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;language&amp;gt; is 0 based. The value is anded with 7. Internally this will transfer language specific character graphics into the font for display.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== ESC 3 - set display mode ====&lt;br /&gt;
&lt;br /&gt;
Set the display mode:&lt;br /&gt;
&lt;br /&gt;
ESC 3 &amp;lt;mode number&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;mode number&amp;gt; is 0 based. The value is anded with 3.&lt;br /&gt;
&lt;br /&gt;
e.g. to set mode 0:&lt;br /&gt;
&lt;br /&gt;
ESC,3,0&lt;br /&gt;
&lt;br /&gt;
==== ESC b - set foreground ====&lt;br /&gt;
&lt;br /&gt;
Set the foreground (pen 1) colour:&lt;br /&gt;
&lt;br /&gt;
ESC b &amp;lt;colour&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Colour is 0 based with 32 added. It is a 2 bits per pixel %00rrggbb colour.&lt;br /&gt;
&lt;br /&gt;
==== ESC c - set background ====&lt;br /&gt;
&lt;br /&gt;
Set the background (pen 0 and border) colour:&lt;br /&gt;
&lt;br /&gt;
ESC c &amp;lt;colour&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Colour is 0 based with 32 added. It is a 2 bits per pixel %00rrggbb colour.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== ESC Y - set cursor position ====&lt;br /&gt;
&lt;br /&gt;
Set the cursor position:&lt;br /&gt;
&lt;br /&gt;
ESC Y &amp;lt;y&amp;gt; &amp;lt;x&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Coordinates are relative to top-left and are 0 based with 32 added.&lt;br /&gt;
&lt;br /&gt;
e.g. for x,y of 2,10: &lt;br /&gt;
&lt;br /&gt;
 ESC,'Y',10+32,2+32&lt;br /&gt;
&lt;br /&gt;
=== Memory layout ===&lt;br /&gt;
&lt;br /&gt;
* 1st 64KB has Amstrad's XBIOS (callable using 'userf'), CCP, BDOS, BIOS, screen and firmware. Screen is at &amp;amp;4000-&amp;amp;7fff. Firmware is used. AMSDOS is not used.&lt;br /&gt;
## &amp;amp;c1/&amp;amp;c2 are used, so that there is common code at &amp;amp;c000-&amp;amp;ffff. This common code has a small BDOS and BIOS. Most of the functions use trampoline code to transition to bank 0 and call into the XBIOS.&lt;br /&gt;
* 2nd 64KB has the TPA and the shared code.&lt;br /&gt;
## Page C4 has WBOOT and BDOS jump + &amp;amp;100-&amp;amp;3f00 of the TPA. This calls to functions in Page c7.&lt;br /&gt;
## Page C5 has &amp;amp;4000-&amp;amp;7fff of the TPA.&lt;br /&gt;
## Page C6 has &amp;amp;8000-&amp;amp;bfff of the TPA.&lt;br /&gt;
## Page C7 has &amp;amp;c000-&amp;amp;f2fb of the TPA. From &amp;amp;f2fc to &amp;amp;ffff is the trampoline code which transitions * to 1st bank of 64KB.&lt;br /&gt;
&lt;br /&gt;
=== Extra memory ===&lt;br /&gt;
&lt;br /&gt;
CPM+ on the CPC uses 128KB of memory. Therefore selections C4,C5,C6,C7 must be avoided if you have additional memory. Due to the design of DkTronic's compatible RAM expansions all memory accesses to additional RAM must occur from bank 0 (i.e. 'C1') and be transferred to the TPA in bank 1 (i.e. 'C2').&lt;br /&gt;
&lt;br /&gt;
Therefore access to the additional RAM follows a pattern such as this:&lt;br /&gt;
* From running CPM program in bank 1 you need to go via code in C000-FFFF to transition to bank 0. This can be done using 'userf'.&lt;br /&gt;
* Within bank 0, your extra memory access code must lie within the regions 0000-3FFF or  8000-BFFF. 4000-7FFF is where the paging will take place so is out of bounds. C000-FFFF is where the memory trampoline code is paged in and out so using this area is much harder.&lt;br /&gt;
* Remember the current memory configuration (e.g. C1,C3,C0) &lt;br /&gt;
* In bank 0 set the memory selection (e.g. 'CC') then perform your read from the extra RAM into a temporary buffer within one of the safe areas. For write you copy from a safe area into the extra memory.&lt;br /&gt;
* Then you need to restore the memory configuration (e.g. C1,C3,C0) and trampoline back to the TPA.&lt;br /&gt;
&lt;br /&gt;
Therefore extra memory access on the CPC is not as fast as it could be compared to running under AMSDOS.&lt;br /&gt;
&lt;br /&gt;
=== Implementing a storage device driver ===&lt;br /&gt;
&lt;br /&gt;
Using &amp;quot;drvtable&amp;quot; gets the list of DPH addresses for each drive. This is actually fixed at FE2F and is referenced by the XBIOS.&lt;br /&gt;
&lt;br /&gt;
Amstrad implemented the extended DPH in the Digital Research sample BIOS. The ten bytes before a DPH give the addresses of read/write functions:&lt;br /&gt;
&lt;br /&gt;
* -10,-9 - address of sector write function&lt;br /&gt;
* -8,-7 - address of sector read function&lt;br /&gt;
* -6,-5 - address of drive select function&lt;br /&gt;
* -4,-3 - address of drive init function (never called)&lt;br /&gt;
* -2 - physical drive number (for B: this is 0 on a single-drive system and 1 on a two-drive system)&lt;br /&gt;
* -1 - drive type&lt;br /&gt;
&lt;br /&gt;
The XBIOS calls these and assumes bank 0 is active. If you write a driver in TPA space you will need to transition to and from bank 1 using selbnk etc.&lt;br /&gt;
&lt;br /&gt;
The parameters for the read / write functions are at 0BEF0h:&lt;br /&gt;
 	DB	@adrv	;Selected logical drive&lt;br /&gt;
  	DB	@rdrv	;Selected physical drive (from the byte at DPH-2)&lt;br /&gt;
 	DW	@trk	;Track passed to SETTRK.&lt;br /&gt;
 	DW	@sect	;Sector passed to SETSEC.&lt;br /&gt;
 	DW	@dma	;DMA address passed to SETDMA.&lt;br /&gt;
 	DB	@cnt	;Multiple I/O count passed to MULTIO&lt;br /&gt;
 	DB	@dbnk	;DMA bank passed to SETBNK&lt;br /&gt;
&lt;br /&gt;
=== PALETTE.COM ===&lt;br /&gt;
&lt;br /&gt;
PALETTE is a COM program written by Locomotive Software and allows the colours to be changed.&lt;br /&gt;
The syntax is:&lt;br /&gt;
&lt;br /&gt;
 PALETTE &amp;lt;background&amp;gt; &amp;lt;foreground&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;background&amp;gt; and &amp;lt;foreground&amp;gt; are r,g,b colour codes with 2 bits for each colour defined in binary as r1 r0 g1 g0 b1 b0. Therefore black is 000000, bright white is 111111, white (grey) is 010101 and bright red is 110000.&lt;br /&gt;
&lt;br /&gt;
=== Links ===&lt;br /&gt;
* [https://www.seasip.info/Cpm/index.html John Elliott's information about CPM 2.2 and CPM+ on the Amstrad]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:CP/M]][[Category:Operating System]]&lt;/div&gt;</summary>
		<author><name>D kef</name></author>	</entry>

	<entry>
		<id>https://oldwiki.cpcwiki.eu/index.php?title=File:Hdcpm-mount-3.png&amp;diff=116040</id>
		<title>File:Hdcpm-mount-3.png</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.cpcwiki.eu/index.php?title=File:Hdcpm-mount-3.png&amp;diff=116040"/>
				<updated>2024-05-20T12:33:07Z</updated>
		
		<summary type="html">&lt;p&gt;D kef: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>D kef</name></author>	</entry>

	<entry>
		<id>https://oldwiki.cpcwiki.eu/index.php?title=File:Hdcpm-mount-2.png&amp;diff=116039</id>
		<title>File:Hdcpm-mount-2.png</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.cpcwiki.eu/index.php?title=File:Hdcpm-mount-2.png&amp;diff=116039"/>
				<updated>2024-05-20T12:32:24Z</updated>
		
		<summary type="html">&lt;p&gt;D kef: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>D kef</name></author>	</entry>

	<entry>
		<id>https://oldwiki.cpcwiki.eu/index.php?title=File:Hdcpm-mount-1.png&amp;diff=116038</id>
		<title>File:Hdcpm-mount-1.png</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.cpcwiki.eu/index.php?title=File:Hdcpm-mount-1.png&amp;diff=116038"/>
				<updated>2024-05-20T12:31:38Z</updated>
		
		<summary type="html">&lt;p&gt;D kef: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>D kef</name></author>	</entry>

	<entry>
		<id>https://oldwiki.cpcwiki.eu/index.php?title=HDCPM&amp;diff=116037</id>
		<title>HDCPM</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.cpcwiki.eu/index.php?title=HDCPM&amp;diff=116037"/>
				<updated>2024-05-20T12:30:59Z</updated>
		
		<summary type="html">&lt;p&gt;D kef: /* The MOUNT.COM utility */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
HDCPM is a Hard Disk boot loader for [[CP/M]] Plus, developed by d_kef&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can read more about the development of the application here:&amp;lt;br /&amp;gt;&lt;br /&gt;
https://www.cpcwiki.eu/forum/applications/hdcpm-boot-and-run-cpm-plus-from-hard-disk/&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:hdcpm.gif|HDCPM booting CP/M Plus]]&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It comes in the form of:&lt;br /&gt;
* a standard background ROM that can be installed in any available ROM position.&lt;br /&gt;
* a standard binary file that can be loaded from floppy or hard drive.&lt;br /&gt;
&lt;br /&gt;
 	&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following configurations are possible with one hard disk:&lt;br /&gt;
&lt;br /&gt;
* One not partitioned, CP/M formatted hard disk. The whole hard disk is used by CP/M.&lt;br /&gt;
* One to four CP/M formatted partitions. Every partition is accessed as a separate hard disk by CP/M.&lt;br /&gt;
* 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.&lt;br /&gt;
* 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.&lt;br /&gt;
* For interfaces that use SD card or USB flash drive as a mass storage device ([[M4 Board]], [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II], [http://www.tmtlogic.com/ Symbiface III] or [[Albireo]]) the only supported configuration is one to four CP/M disk image files in the root directory of the FAT file system.&lt;br /&gt;
	&lt;br /&gt;
Currently only the master IDE device can be accessed by HDCPM. The slave device is available to be used by your favourite DOS.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
HDCPM can also utilize the RTC found in the [[SYMBiFACE II]] in order to implement CP/M Plus BIOS function 26: TIME.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
HDCPM is compatible and can be used together with the [[Dobbertin Harddisc]].&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
HDCPM has been developed with [[WinApe]] Z80 Assembler and was tested with [[WinApe]], [[CPCemu]], [http://www.roudoudou.com/ACE-DL/ ACE-DL] an Amstrad Plus 464 upgraded to 6128 an Amstrad CPC 6128 and an Amstrad CPC 464 with [https://www.cpcwiki.eu/index.php/Universal_512K_and_1MByte_RAM_Expansions Universal 512K RAM Expansion].&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
HDCPM distribution disk contains the following files:&lt;br /&gt;
* HDCPM.ROM the ROM itself&lt;br /&gt;
* HDCPM.BIN the executable binary file&lt;br /&gt;
* HDMGR.COM Hard Disk Manager utility&lt;br /&gt;
* MOUNT.COM Hard Disk mount utility&lt;br /&gt;
* RTC.COM RTC synchronization utility&lt;br /&gt;
* MAKEIMG.BAS CP/M image file creation utility&lt;br /&gt;
* MAKEIMG.BIN CP/M image file creation binary&lt;br /&gt;
* MAKEIMG.EXE CP/M image file creation utility for [[SymbOS]]&lt;br /&gt;
* HDCPM.DOC the User guide&lt;br /&gt;
&lt;br /&gt;
HDCPM is free software. It can be used and distributed with no restrictions.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Prerequisites==&lt;br /&gt;
* Amstrad CPC/Plus computer capable of running CP/M Plus.&lt;br /&gt;
* ROM box or other ROM expansion hardware if using the ROM.&lt;br /&gt;
* Optionaly a FAT aware DOS like M4 ROM, USIfAC ROM, [[UniDOS]], [https://www.cpcwiki.eu/forum/applications/cubeios-fat16fat32-rom-for-the-cpc's-with-xmass/ CubeMDOS] etc if using the binary.&lt;br /&gt;
* One of the following mass storage interfaces:&lt;br /&gt;
** [[SYMBiFACE II]]&lt;br /&gt;
** [[X-Mass]]&lt;br /&gt;
** [https://github.com/salafek/cyboard-for-cpc Cyboard]&lt;br /&gt;
** [[uIDE 16]] (base address = &amp;amp;FEF0)&lt;br /&gt;
** [[M4 Board]]&lt;br /&gt;
** [[USIFAC]] II/[[ULIfAC]]&lt;br /&gt;
** [http://www.tmtlogic.com/ Symbiface III]&lt;br /&gt;
** [[Albireo]] (SD card only)&lt;br /&gt;
* Compatible storage device with enough free space to accommodate the desirable CP/M hard disk configuration.&lt;br /&gt;
* Floppy disk drive for initialization of the file system.&lt;br /&gt;
* CP/M Plus system disks for making the system bootable.&lt;br /&gt;
* Optionally a [[SYMBiFACE II]] compatible RTC.&lt;br /&gt;
&lt;br /&gt;
==Restrictions==&lt;br /&gt;
* CP/M 2.2 or lower is not supported.&lt;br /&gt;
* 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.&lt;br /&gt;
* Only the master IDE device is accessible by HDCPM.&lt;br /&gt;
* The maximum number of hard disk partition/images supported is four.&lt;br /&gt;
* Only primary partitions are supported.&lt;br /&gt;
* If you want to use CP/M disk images then they must be stored in a FAT16 or FAT32 formatted disk or partition.&lt;br /&gt;
* If the hard disk is partitioned then the CP/M disk images must be placed in the first partition of the disk.&lt;br /&gt;
* The CP/M disk images must be placed in the root directory of the FAT file system.&lt;br /&gt;
* The CP/M disk images must NOT be fragmented and must have the correct size.&lt;br /&gt;
* 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. &lt;br /&gt;
* Only storage devices with 512 bytes sector size are supported.&lt;br /&gt;
* Only storage devices with LBA addressing are supported.&lt;br /&gt;
* Date stamps of CP/M disk image files are not maintained.&lt;br /&gt;
* 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 letters for your IDE media then the corresponding HD20 partitions will be unavailable under CP/M.&lt;br /&gt;
&lt;br /&gt;
==How it works==&lt;br /&gt;
===Using the ROM===&lt;br /&gt;
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:&lt;br /&gt;
|HDCPM (no TIME function support) or |HDCPMT (TIME function support)&amp;lt;br /&amp;gt;&lt;br /&gt;
Alternatively it can be started by holding down the Tab key (no TIME function support) or Shift+Tab (TIME function support), during power-up.&amp;lt;br /&amp;gt;&lt;br /&gt;
===Using the binary===&lt;br /&gt;
HDCPM can be started by running the HDCPM.BIN file from floppy drive or mass storage.&amp;lt;br /&amp;gt;&lt;br /&gt;
===Functions===&lt;br /&gt;
HDCPM will then execute the following functions:&amp;lt;br /&amp;gt;&lt;br /&gt;
* Search for a compatible mass storage interface.&lt;br /&gt;
* Initialize the mass storage interface if needed.&lt;br /&gt;
* Move the boot loader and the CP/M patcher to RAM.&lt;br /&gt;
* Mount 1 to 4 CP/M image files and/or partitions and perform fragmentation and size test.&lt;br /&gt;
* 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.&lt;br /&gt;
* Read the .EMS file from the reserved track and store it in RAM just as the normal CP/M Plus boot loader does.&lt;br /&gt;
* 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 were a normal RSX.&lt;br /&gt;
* Patch the floppy disk drive routines in case a FDC's not been found.&lt;br /&gt;
* Patch the SCB in order to change the startup/default drive.&lt;br /&gt;
* 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 memory expansion]] or [[Dobbertin Memory Expansion]] driver is present.&lt;br /&gt;
* Move the ALV of the Dk'tronics RAM disk if [[Z-System]] has been detected.&lt;br /&gt;
* Patch the CP/M console with the desired colour scheme. &lt;br /&gt;
* Patch the system message.&lt;br /&gt;
* Do a normal CP/M cold start.&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==CP/M Plus disk image files==&lt;br /&gt;
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 [https://hexed.it/ hexed.it] or any hex editor capable of creating binary files filled with a specific pattern.&amp;lt;br /&amp;gt;&lt;br /&gt;
In case of hexed.it select 'New file' fill in 'Size of the new file = 8519680' and 'Fill Pattern = 0xE5' and press apply. Save the file as CPMDSK01.IMG&amp;lt;br /&amp;gt;&lt;br /&gt;
If you have a FAT capable DOS installed in your AMSTRAD you can use the provided MAKEIMG.BAS utility to create your image file. Keep in mind that it takes more than 1.5 hour for a 8MB image file to be created that way.&amp;lt;br /&amp;gt;&lt;br /&gt;
CP/M disk image files can be accessed by a modern computer with [http://www.moria.de/~michael/cpmtools/ cpmtools]. Use the command |HDDEF to see the record you must insert in the diskdefs file.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The HDCPM record for diskdefs is:&lt;br /&gt;
&lt;br /&gt;
       diskdef hdcpm&lt;br /&gt;
          seclen 512&lt;br /&gt;
          tracks 65&lt;br /&gt;
          sectrk 256&lt;br /&gt;
          blocksize 8192&lt;br /&gt;
          maxdir 1024&lt;br /&gt;
          skew 0&lt;br /&gt;
          boottrk 1&lt;br /&gt;
          os 3&lt;br /&gt;
       end&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
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 were 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.&amp;lt;br /&amp;gt;&lt;br /&gt;
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. [https://www.cpcwiki.eu/index.php/Albireo Albireo] incorporates a file management IC that performs FAT file system operations and handles fragmented files properly. In such case fragmented image files is not a problem. HDCPM will never fragment a CP/M image file.&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Hdcpm-boot-m4.png|thumb|HDCPM binary booting on M4 Board]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==CP/M Plus disk/partitions==&lt;br /&gt;
You can also create one or more partitions in order to format them to [http://www.seasip.info/Cpm/format31.html CP/M-80] 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.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM examines the hard disk's MBR upon start and finds the partition information. Then it finds the LBA of the first sector of each partition and passes it to the CP/M hard disk driver. The CP/M hard disk driver doesn't know anything about partitions. It accesses the partition as if it were a real hard disk.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:hdcpm-ui-boot.png|thumb|HDCPM ROM booting on uIDE-16]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
===Using the ROM===&lt;br /&gt;
* Install the HDCPM ROM in a free ROM slot of your ROM box.&lt;br /&gt;
* Plug in your mass storage interface and attach the proper mass storage device.&lt;br /&gt;
* 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 shown inside the parentheses:&amp;lt;br /&amp;gt;&lt;br /&gt;
** (S2): [[SYMBiFACE II]] compatible interface&lt;br /&gt;
** (uI): [[uIDE 16]] interface&lt;br /&gt;
** (M4): [[M4 Board]]&lt;br /&gt;
** (US): [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II]&lt;br /&gt;
** (S3): [http://www.tmtlogic.com/ Symbiface III]&lt;br /&gt;
** (AL): [[Albireo]]&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:hdcpm-s2.png|thumb|HDCPM ROM - SYMBiFACE II]]&lt;br /&gt;
|[[File:hdcpm-ui.png|thumb|HDCPM ROM - uIDE-16]]&lt;br /&gt;
|[[File:hdcpm-m4.png|thumb|HDCPM ROM - M4 Board]]&lt;br /&gt;
|}&lt;br /&gt;
{|&lt;br /&gt;
|[[File:hdcpm-us.png|thumb|HDCPM ROM - USIfAC II]]&lt;br /&gt;
|[[File:hdcpm-s3.png|thumb|HDCPM ROM - Symbiface III]]&lt;br /&gt;
|[[File:hdcpm-al.png|thumb|HDCPM ROM - Albireo]]&lt;br /&gt;
|}&lt;br /&gt;
In case a RTC is detected you will also see the RTC initialization message and the current date and time: ''RTC found: 2021/01/01 12:01:01''&lt;br /&gt;
* Use your original CP/M Plus system disk set to Boot CP/M Plus.&lt;br /&gt;
* 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.&lt;br /&gt;
* Reset your AMSTRAD and boot CP/M from the hard disk with the command |HDCPM. The Boot loader will check your image file(s) against fragmentation and correct size and boot the system to the CP/M command prompt. If the first image file is fragmented or has the wrong length the system will not boot. All other image files will be ignored if found to be fragmented or have the wrong length.&lt;br /&gt;
* In case you don't use CP/M image files just boot the system with |HDCPM or |HDCPMT&lt;br /&gt;
* Copy the files from your CP/M system floppy disks to the first hard disk.&lt;br /&gt;
* Copy any other needed application etc. to your CP/M hard disk(s).&lt;br /&gt;
* You are ready to go.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Using the binary===&lt;br /&gt;
* Plug in your mass storage interface and attach the proper mass storage device.&lt;br /&gt;
* Use your original CP/M Plus system disk set to Boot CP/M Plus.&lt;br /&gt;
* 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.&lt;br /&gt;
* 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.&lt;br /&gt;
* You are ready to go.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==ROM commands==&lt;br /&gt;
[[File:hdcpm-us-boot.png|thumb|HDCPM ROM booting on USIfAC II]]&lt;br /&gt;
* |HDCPM mounts the hard disks and boots CP/M Plus. If [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] is used enable the USB disk with the |USB command first.&lt;br /&gt;
* |HDCPMT works like |HDCPM but also utilizes the RTC.&lt;br /&gt;
* |HDDPB shows the Disk Parameter Block.&lt;br /&gt;
* |HDDEF shows the diskdefs entry for CP/M tools and the file system size.&lt;br /&gt;
* |DATE displays the current date.&lt;br /&gt;
* |TIME displays the current time. If [[M4 Board]] is used |DATE and |TIME will be redirected to M4 |TIME.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==The HDCPM binary file==&lt;br /&gt;
* If [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] is used, use your PC to copy HDCPM.BIN to your USB flash disk. Then insert it to your [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] power up your Amstrad and enable the USB disk with the |USB command.&lt;br /&gt;
* Execute the file from the floppy disk or from your mass storage device with ''RUN&amp;quot;HDCPM&amp;quot;''. 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.&lt;br /&gt;
*  [[M4 Board]] and [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ 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 [https://www.cpcwiki.eu/forum/applications/cubeios-fat16fat32-rom-for-the-cpc's-with-xmass/ CubeMDOS] or [[UniDOS]], installed.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==The MAKEIMG.BAS and MAKEIMG.EXE utilities==&lt;br /&gt;
===MAKEIMG.BAS===&lt;br /&gt;
Although this utility should not be your first option, you can use it to make a new empty CP/M disk image file.&amp;lt;br /&amp;gt;&lt;br /&gt;
In case you decide to use it make sure you have a FAT aware DOS installed in your system. MAKEIMG makes use of the firmware calls CAS_OUT_OPEN, CAS_OUT_CLOSE and CAS_OUT_CHAR so your DOS must support them.&amp;lt;br /&amp;gt;&lt;br /&gt;
Copy the files MAKEIMG.BAS and MAKEIMG.BIN to the root directory of your FAT formatted hard disk and make it your current drive. Run the utility with ''RUN&amp;quot;MAKEIMG&amp;quot;'' and don't hold your breath!&amp;lt;br /&amp;gt;&lt;br /&gt;
Making an image file this way takes more than 1.5 hour for an 8MB file so literally... don't hold your breath.&amp;lt;br /&amp;gt;&lt;br /&gt;
Here is a small tutorial on how to setup and use a CP/M image file: https://youtu.be/GMWsRzNhQTM&amp;lt;br /&amp;gt;&lt;br /&gt;
===MAKEIMG.EXE===&lt;br /&gt;
This utility is a [[SymbOS]] application.&amp;lt;br /&amp;gt;&lt;br /&gt;
Use this utility to create your CP/M hard disk images from within [[SymbOS]]. 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.&amp;lt;br /&amp;gt;&lt;br /&gt;
MAKEIMG.EXE has been developed with [http://www.symbos.de/quigs.htm Quigs] for [[SymbOS]].&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Hdcpm-makeimg-sym1.png|thumb|MAKEIMG.EXE in action]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==The HDMGR.COM utility==&lt;br /&gt;
This is the Hard Disk Manager utility.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can use this utility to get information about your hard disk geometry, disk image files, partitions and boot sector. You have to use this utility to format a hard disk, disk image file or partition to CP/M format or manipulate the boot sector of the hard disk and/or transfer an .EMS system file to the reserved track of the hard disk.&amp;lt;br /&amp;gt;&lt;br /&gt;
The boot sector contains information about the CP/M disk drive letters, start-up drive and console colour scheme. All those properties can be changed with HDMGR.COM.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR will perform a fragmentation test of the discovered CP/M hard disk image files uppon execution (not for Albireo).&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
The HDMGR.COM utility is self explanatory. Just run it from the CP/M command prompt.&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Hdcpm-hdmgr-m.png|thumb|HDMGR main menu]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-1.png|thumb|HDMGR Hardware information]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-2.png|thumb|HDMGR Partition information]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-3.png|thumb|HDMGR CP/M disk image information]]&lt;br /&gt;
|}&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Hdcpm-hdmgr-4.png|thumb|HDMGR Boot sector information]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-5.png|thumb|HDMGR Log disk]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-7.png|thumb|HDMGR Manage boot sector]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-8.png|thumb|HDMGR Transfer CP/M to disk]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==The RTC.COM utility==&lt;br /&gt;
You can make use of the RTC.COM utility in order to keep CP/M date and time updated.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can synchronize the date and time of CP/M Plus with the RTC by running ''RTC -G'' manually or via your PROFILE.SUB.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can also set your RTC to the current CP/M date and time by running ''RTC -S'' (not for M4 board)&amp;lt;br /&amp;gt;&lt;br /&gt;
You can see the detected RTC interface type by running ''RTC -I''&amp;lt;br /&amp;gt;&lt;br /&gt;
Currently RTC.COM works with the RTC found in Symbiface II, Symbiface III, M4 board (read only) and [[Nova]].&amp;lt;br /&amp;gt;&lt;br /&gt;
DATE.COM, DIR.COM and SHOW.COM commands, patched for Year 2000 compatibility can be downloaded from the [http://www.cpm.z80.de/binary.html CP/M source archive - Digital Research Binary files section] .&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==The MOUNT.COM utility==&lt;br /&gt;
You can use the MOUNT.COM utility in order to list the mounted CP/M disks, list the available CP/M disks in your mass storage medium and mount a new disk in one of the four available mount points.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can get a list of the already mounted CP/M disks by running ''MOUNT'' without any parameters.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can get a list of the available CP/M disk images or partitions by running ''MOUNT -L''&amp;lt;br /&amp;gt;&lt;br /&gt;
You can mount one of the available CP/M disk images or partitions by running ''MOUNT &amp;lt;mount point&amp;gt;,&amp;lt;hard disk&amp;gt;'' where &amp;lt;mount point&amp;gt; is a number from 1 to 4 indicating the HDCPM disk number and &amp;lt;hard disk&amp;gt; is a two digit number from 00 to 99 for CPMDSK00.IMG to CPMDSK99.IMG respectively, or P1 to P4 for partition 1 to partition 4 respectively.&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Hdcpm-mount-1.png|thumb|MOUNT Help]]&lt;br /&gt;
|[[File:Hdcpm-mount-2.png|thumb|MOUNT Display mounted disks]]&lt;br /&gt;
|[[File:Hdcpm-mount-3.png|thumb|MOUNT List available disks]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Error messages==&lt;br /&gt;
===ROM checksum error===&lt;br /&gt;
* ''*** HDCPM ROM checksum error ***&lt;br /&gt;
	The ROM has failed the checksum test.&lt;br /&gt;
	The contents are probably corrupted. The ROM will not be initialized.&lt;br /&gt;
&lt;br /&gt;
===Hard disk errors===&lt;br /&gt;
* ''*** No mass storage found ***''&lt;br /&gt;
	No compatible mass storage interface can be found.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: DISK I/O''&lt;br /&gt;
	I/O error occurred during the last read/write operation.&lt;br /&gt;
	Your hard disk might be defect or the USB disk is not enabled.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: INVALID BOOT SECTOR''&lt;br /&gt;
	No FAT or CP/M boot sector was found in a not partitioned hard disk.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: INVALID FILE SYSTEM''&lt;br /&gt;
	The first partition in a partitioned hard disk is not a FAT or CP/M-80&lt;br /&gt;
	one.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: INVALID SECTOR SIZE''&lt;br /&gt;
	The hard disk used has a sector size not equal to 512 bytes.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: CPMDSK01.IMG NOT FOUND''&lt;br /&gt;
	The CP/M image file named CPMDSK01.IMG can't be found in the FAT&lt;br /&gt;
	formatted hard disk or partition. &lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: CP/M SYSTEM FILE NOT FOUND''&lt;br /&gt;
	The .EMS CP/M system file can't be found in the system track of your&lt;br /&gt;
	CP/M partition or image file.&lt;br /&gt;
	&lt;br /&gt;
*  ''ERROR: CPMDSK01.IMG IS FRAGMENTED''&lt;br /&gt;
	The first CP/M image file is fragmented, the system won't mount it.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: CPMDSK01.IMG HAS WRONG LENGTH''&lt;br /&gt;
	The first CP/M image file has wrong length, the system won't mount it.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: CPMDSK01.IMG IS NOT FORMATTED''&lt;br /&gt;
	The first CP/M image file is not formatted to CP/M-80 format, the&lt;br /&gt;
	system won't mount it. Use the HDMGR.COM utility to format it.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: INCOMPATIBLE EMS FILE''&lt;br /&gt;
	The .EMS system file that was loaded from the system track is not&lt;br /&gt;
	compatible with HDCPM.&lt;br /&gt;
&lt;br /&gt;
===RTC errors===&lt;br /&gt;
* ''*** Battery depleted ***''&lt;br /&gt;
	The RTC battery is depleted. The RTC driver will continue to operate&lt;br /&gt;
	normally but the readings are not reliable. Replace the RTC battery.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Release info &amp;amp; download==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Version !! Changes !! Download&lt;br /&gt;
|-&lt;br /&gt;
| v1.00 December 2021 || Initial release || [[Media:hdcpm100.dsk|hdcpm100.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.01 January 2022 || HDCPM.ROM, HDMGR.COM: code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: (bug fix) fragmented file detection was not working properly unless the file was CPMDSK01.IMG&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: (bug fix) unformatted image file detection was not working properly. New error message added.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) CP/M drive table wasn't patched properly.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) initialization of floppy drive(s) was corrupted due to misplaced code.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: added .EMS file compatibility check. New error message added.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: added support for Dobbertin RAM disk driver.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: added compatibility with Dobbertin HD20 Harddisc&amp;lt;br /&amp;gt;&lt;br /&gt;
MAKEIMG.EXE: added utility for creating an image file from within SYMBOS.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&lt;br /&gt;
|| [[Media:hdcpm101.dsk|hdcpm101.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.02 March 2022 || HDCPM.ROM, HDMGR.COM: added support for M4 board.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: added support for uIDE-16 interface.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) the ROM was initialized even if no compatible interface was found.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: error message change.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: option &amp;quot;F&amp;quot; has been removed. HDCPM will always do a disk fragmentation test during boot.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: power up message changed in order to provide information about the type of the detected interface.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: two bytes of RAM will be reserved by the ROM for storing the interface type and M4 ROM number.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&lt;br /&gt;
|| [[Media:hdcpm102.dsk|hdcpm102.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.03 April 2022 || HDCPM.ROM, HDMGR.COM: added support for USIfAC II.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) uIDE-16 detection was broken.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&lt;br /&gt;
|| [[Media:hdcpm103.dsk|hdcpm103.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.04 June 2022|| HDCPM.BIN: added executable binary file version of HDCPM.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: code optimization.&lt;br /&gt;
|| [[Media:hdcpm104.dsk|hdcpm104.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.05 July 2022 || HDCPM.ROM, HDCPM.BIN, HDMGR.COM: added support for Symbiface III.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDCPM.BIN:  code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR.COM: Hardware info added for USIfAC II&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR.COM: (bug fix) the 'Select boot file' menu was garbled if there were 8 or more .EMS files present.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&lt;br /&gt;
|| [[Media:hdcpm105.dsk|hdcpm105.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.06 January 2023 || HDCPM.ROM, HDCPM.BIN, HDMGR.COM: added support for Albireo.&amp;lt;br /&amp;gt;&lt;br /&gt;
RTC.COM: added support for M4 Board (r/o) and Symbiface 3.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDCPM.BIN: (bug fix) CPC was freezing after mounting the CP/M disk(s) with incompatible .EMS file.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR.COM: (bug fix) the Stack was overflowed in some rare cases.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&amp;lt;br /&amp;gt;&lt;br /&gt;
|| [[Media:hdcpm106.dsk|hdcpm106.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.10 September 2023 || HDCPM.ROM, HDCPM.BIN: added support for CPC464 with &amp;amp;C3 mode compatible RAM expansion card.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDCPM.BIN: can now boot CP/M Plus on a CPC that has no or faulty Floppy Disc Controller present.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: ROM checksum test and new error message added.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: removed blank line from ROM initialization message.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDCPM.BIN, HDMGR.COM:  code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDCPM.BIN: (bug fix) incorrect patching would corrupt the Dobbertin RAM drive on CP/M Plus v1.1&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) |HDDPB was displaying wrong values&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR.COM: (bug fix) a corruption of the MBR of USB/SD card occured in some rare cases.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&amp;lt;br /&amp;gt;&lt;br /&gt;
|| [[Media:hdcpm110.dsk|hdcpm110.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.11 April 2024 || HDCPM.ROM, HDCPM.BIN: CP/M (virtual) disks are now treated as removable.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDCPM.BIN, HDMGR.COM:  code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDCPM.BIN: (bug fix) uIDE driver was corrupted.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR.COM: (bug fix) CP/M disk image information could skip an image file.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR.COM: More than 8 .EMS files can be displayed and selected.&amp;lt;br /&amp;gt;&lt;br /&gt;
RTC.COM: added support for NOVA, added option to display the RTC interface type.&amp;lt;br /&amp;gt;&lt;br /&gt;
MOUNT.COM: added utility to list and mount CP/M (virtual) disks.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&amp;lt;br /&amp;gt;&lt;br /&gt;
|| [[Media:hdcpm111.dsk|hdcpm111.dsk]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Other downloads==&lt;br /&gt;
*[[Media:CPMDSK01&amp;amp;02.zip|CP/M disk images]] - CPMDSK01.IMG is bootable and contains all the files of the 3 CP/M Plus system disks and year 2000 compliant binaries downloaded from the [http://www.cpm.z80.de/binary.html Digital Research Binary Files]. CPMDSK02.IMG is empty and can also be used as a template.&amp;lt;br /&amp;gt;&lt;br /&gt;
*[[Media:Z3Plus.part1.rar|ZPM3+ZCCP disk image part 1]] , [[Media:Z3Plus.part2.rar|ZPM3+ZCCP disk image part 2]] - The Amstrad BDOS and CCP have been replaced with their counterparts [https://github.com/wwarthen/CPU280/tree/master/ZPM3/zpm3.txt ZPM3] and [https://github.com/wwarthen/CPU280/tree/master/ZCCP/zccp.txt ZCCP] written by Simeon Cran and Randy Winchester respectively. It is [https://www.cpcwiki.eu/index.php/Z-System Z-system, Z3Plus] compatible and contains the Z3Plus system files, all the files of the 3 CP/M Plus system disks, year 2000 compliant binaries and also contains some useful tools, help files and manuals.&amp;lt;br /&amp;gt;&lt;br /&gt;
*[[Media:CPMDSK04.zip|EMS Files]] - CPMDSK04.IMG contains a collection of HDCPM compatible EMS files (see table below) and the latest HDMGR.COM&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! EMS file !! BDOS !! CCP !! BIOS !! Extras !! Description&lt;br /&gt;
|-&lt;br /&gt;
| C10CPM3.EMS || Digital Research || Digital Research || Amstrad v1.0 || - || Original Amstrad CP/M Plus for CPC&lt;br /&gt;
|-&lt;br /&gt;
| C11CPM3.EMS || Digital Research || Digital Research || Amstrad v1.1 || - || Original Amstrad CP/M Plus for CPC&lt;br /&gt;
|-&lt;br /&gt;
| C10ZPM3.EMS || ZPM3 by Simeon Cran  || Digital Research || Amstrad v1.0 || - || The BDOS has been replaced by ZPM3 written in Z80 assembly&lt;br /&gt;
|-&lt;br /&gt;
| C11ZPM3.EMS || ZPM3 by Simeon Cran  || Digital Research || Amstrad v1.1 || - || The BDOS has been replaced by ZPM3 written in Z80 assembly&lt;br /&gt;
|-&lt;br /&gt;
| CPM3SEMI.EMS || Digital Research || Digital Research || Amstrad v1.0 || Dk'tronics RAM drive || Patched with Dk'tronics memory expansion driver&lt;br /&gt;
|-&lt;br /&gt;
| ZPM3SEMI.EMS || ZPM3 by Simeon Cran || Digital Research || Amstrad v1.0 || Dk'tronics RAM drive || Patched with Dk'tronics memory expansion driver and ZPM3&lt;br /&gt;
|-&lt;br /&gt;
| C10ZCPR3.EMS || ZPM3 by Simeon Cran  || ZCCP by Randy Winchester || Amstrad v1.0 || - || The BDOS has been replaced by ZPM3 and the CCP has been replaced by ZCCP, both  written in Z80 assembly. Z-system/Z3Plus compatible. &amp;lt;b&amp;gt;Strartup and default drive must be drive A: (use HDMGR.COM to change). Also several Z-system files must be present ([https://github.com/wwarthen/CPU280/tree/master/ZCCP/zccp.txt read ZCCP.TXT])&amp;lt;/b&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ZCPR3SEM.EMS || ZPM3 by Simeon Cran  || ZCCP by Randy Winchester || Amstrad v1.0 || Dk'tronics RAM drive || The BDOS has been replaced by ZPM3 and the CCP has been replaced by ZCCP, both  written in Z80 assembly. Z-system/Z3Plus compatible. Patched with Dk'tronics memory expansion driver. &amp;lt;b&amp;gt;Strartup and default drive must be drive A: (use HDMGR.COM to change). Also several Z-system files must be present ([https://github.com/wwarthen/CPU280/tree/master/ZCCP/zccp.txt read ZCCP.TXT]) &amp;lt;/b&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| D10CPM3.EMS || Digital Research || Digital Research || Amstrad v1.0 || Dobbertin RAM Drive || Patched with Dobbertin memory expansion driver&lt;br /&gt;
|-&lt;br /&gt;
| D11CPM3.EMS || Digital Research || Digital Research || Amstrad v1.1 || Dobbertin RAM Drive || Patched with Dobbertin memory expansion driver&lt;br /&gt;
|-&lt;br /&gt;
| DX10CPM3.EMS || Digital Research || Digital Research || Amstrad v1.0 || Dobbertin RAM Drive, Vortex format drive B: || Patched with Dobbertin memory expansion driver. Supports Vortex formatted, 80 track, double side floppies, in drive B:&lt;br /&gt;
|-&lt;br /&gt;
| DX11CPM3.EMS || Digital Research || Digital Research || Amstrad v1.1 || Dobbertin RAM Drive, Vortex format drive B: || Patched with Dobbertin memory expansion driver. Supports Vortex formatted, 80 track, double side floppies, in drive B:&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Videos==&lt;br /&gt;
* [https://youtu.be/GMWsRzNhQTM How to create and prepare a CP/M image file in a FAT formatted hard disk]&lt;br /&gt;
* [https://youtu.be/nxow6Y5O4Dc Hard disk utilization and dual boot]&lt;br /&gt;
* [https://youtu.be/em7dHOdaylg How to create a CP/M image file under SYMBOS]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
[[category:Expansion ROM]] [[category:Applications]] [[category:CP/M]]&lt;/div&gt;</summary>
		<author><name>D kef</name></author>	</entry>

	<entry>
		<id>https://oldwiki.cpcwiki.eu/index.php?title=CP/M_3.0&amp;diff=115622</id>
		<title>CP/M 3.0</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.cpcwiki.eu/index.php?title=CP/M_3.0&amp;diff=115622"/>
				<updated>2024-04-28T12:24:42Z</updated>
		
		<summary type="html">&lt;p&gt;D kef: /* Extra memory */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:cpm30boot.jpg|thumb|300px|CP/M 3.0 after boot]]&lt;br /&gt;
&lt;br /&gt;
CPM 3.0 (also known as CPM+) was available on the 2nd [[System_Disk]] Disc for CPC6128 but there were other implementations available.&lt;br /&gt;
&lt;br /&gt;
== Dobbertin's implementation of CP/M+ ==&lt;br /&gt;
&lt;br /&gt;
* [[Dobbertin CPM+]]&lt;br /&gt;
&lt;br /&gt;
== Graduate Software's implementation of CP/M+ on ROM ==&lt;br /&gt;
&lt;br /&gt;
* [[Graduate Software]]&lt;br /&gt;
&lt;br /&gt;
== Amstrad's implementation of CP/M+ ==&lt;br /&gt;
&lt;br /&gt;
Amstrad distributed CP/M+ on the side 4 of the system discs that came with the CPC6128. It requires a Dk'Tronics compatible ram expansion. It provided 61K TPA. To get 61K TPA, CPM+ uses 'C1' and 'C2' RAM configuration with TPA in the 2nd bank and the CCP, BDOS, BIOS, screen and firmware in the 1st 64KB of RAM. This arrangement allows 61KB useable for programs.&lt;br /&gt;
&lt;br /&gt;
On side 1 of the system discs was CP/M 2.2.&lt;br /&gt;
&lt;br /&gt;
* Amstrad CP/M+ uses Amstrad's &amp;quot;System&amp;quot; format. This is 40 tracks, 1 side, 9 sectors per track numbered &amp;amp;41-&amp;amp;49. Each sector is 512bytes. There are two reserved tracks, then the directory which has 64 entries (which occupies 4 sectors) and then the data area. &lt;br /&gt;
* CP/M is booted using an RSX command &amp;quot;|CPM&amp;quot; which is implemented in the Amstrad disc rom (AMSDOS).&lt;br /&gt;
* |CPM loads track 0, side 0, sector &amp;amp;41 into RAM at &amp;amp;100-&amp;amp;2ff. This is the boot sector and contains the boot program.&lt;br /&gt;
* The boot program then loads the directory from track 2, sector &amp;amp;41.&lt;br /&gt;
* The boot program locates a program with extension &amp;quot;EMS&amp;quot;.&lt;br /&gt;
* This program is loaded into RAM at &amp;amp;c00.&lt;br /&gt;
* This is then executed. (EMS contains the BIOS, BDOS and relocates and re-configures the memory. CP/M doesn't use the CP/M 2.2 BIOS from the Amstrad disc ROM.)&lt;br /&gt;
&lt;br /&gt;
=== Creating a minimal boot disc ===&lt;br /&gt;
&lt;br /&gt;
Using CPM2.2:&lt;br /&gt;
* Use disckit2 to format a vendor format disc&lt;br /&gt;
* Use BOOTGEN to put the CPM+ boot sector onto your disc. (Source is CPM+, Destination is your disk).&lt;br /&gt;
* Use FILECOPY to put C10CPM3.EMS onto your disc (FILECOPY C10CPM3.EMS. Source is CPM+, Destination is your disk).&lt;br /&gt;
* Your minimal CP/M+ disc is bootable.&lt;br /&gt;
&lt;br /&gt;
Using CPM3.3:&lt;br /&gt;
* Use disckit3 to format and install the boot sector onto the disc.&lt;br /&gt;
* Use PIP to copy C10CPM3.EMS to your disc (B:=A:C10CPM3.EMS)&lt;br /&gt;
* Your minimal CP/M+ disc is bootable.&lt;br /&gt;
&lt;br /&gt;
=== Terminal font ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery caption=&amp;quot;CP/M 3.0 terminal font&amp;quot;&amp;gt;&lt;br /&gt;
Image:Cpmplus.png&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Console Input ===&lt;br /&gt;
&lt;br /&gt;
Console input (via BDOS functions) uses firmware functions and returns firmware key codes when a key is pressed. i.e. &amp;amp;f0 is cursor up.&lt;br /&gt;
&lt;br /&gt;
=== Console Output/Terminal emulation ===&lt;br /&gt;
&lt;br /&gt;
Console output is processed via the terminal emulation. Console output doesn't execute firmware control codes.&lt;br /&gt;
&lt;br /&gt;
A simplified VT52 terminal is emulated. Home means the top-left position.&lt;br /&gt;
&lt;br /&gt;
The following are supported:&lt;br /&gt;
&lt;br /&gt;
 ESC 0 - disable status line&lt;br /&gt;
 ESC 1 - enable status line&lt;br /&gt;
 ESC 2 - set language&lt;br /&gt;
 ESC 3 - set screen mode&lt;br /&gt;
 ESC A - cursor up&lt;br /&gt;
 ESC B - cursor down&lt;br /&gt;
 ESC C - cursor left&lt;br /&gt;
 ESC D - cursor right&lt;br /&gt;
 ESC E - clear screen and move cursor to home&lt;br /&gt;
 ESC H - move cursor to home&lt;br /&gt;
 ESC I - reverse line feed&lt;br /&gt;
 ESC J - erase to end of screen&lt;br /&gt;
 ESC K - erase to end of line&lt;br /&gt;
 ESC L - insert line&lt;br /&gt;
 ESC M - delete current&lt;br /&gt;
 ESC N - delete character and move characters up&lt;br /&gt;
 ESC Y - set cursor position&lt;br /&gt;
 ESC d - erase all above&lt;br /&gt;
 ESC b - set foreground&lt;br /&gt;
 ESC c - set background (and border)&lt;br /&gt;
 ESC e - enable cursor&lt;br /&gt;
 ESC f - disable cursor&lt;br /&gt;
 ESC j - save cursor pos&lt;br /&gt;
 ESC k - restore cursor pos&lt;br /&gt;
 ESC l - erase and above cursor&lt;br /&gt;
 ESC o - erase current line&lt;br /&gt;
 ESC p - invert on&lt;br /&gt;
 ESC q - invert off&lt;br /&gt;
 ESC r - select bright (recognised but not implemented)&lt;br /&gt;
 ESC u - cancel bright (recognised but not implemented)&lt;br /&gt;
 ESC v - wrap on&lt;br /&gt;
 ESC w - wrap off&lt;br /&gt;
 ESC x - mono mode&lt;br /&gt;
 ESC y - mono c080 mode&lt;br /&gt;
&lt;br /&gt;
PCW and Spectrum support viewports. This is not supported on CPC. CPC assumes a single viewport covering the entire screen and it is moved up/down using software when using insert line or delete current, but moved up using hardware otherwise.&lt;br /&gt;
&lt;br /&gt;
==== ESC 2 - set language ====&lt;br /&gt;
&lt;br /&gt;
ESC 2 &amp;lt;language&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;language&amp;gt; is 0 based. The value is anded with 7. Internally this will transfer language specific character graphics into the font for display.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== ESC 3 - set display mode ====&lt;br /&gt;
&lt;br /&gt;
Set the display mode:&lt;br /&gt;
&lt;br /&gt;
ESC 3 &amp;lt;mode number&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;mode number&amp;gt; is 0 based. The value is anded with 3.&lt;br /&gt;
&lt;br /&gt;
e.g. to set mode 0:&lt;br /&gt;
&lt;br /&gt;
ESC,3,0&lt;br /&gt;
&lt;br /&gt;
==== ESC b - set foreground ====&lt;br /&gt;
&lt;br /&gt;
Set the foreground (pen 1) colour:&lt;br /&gt;
&lt;br /&gt;
ESC b &amp;lt;colour&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Colour is 0 based with 32 added. It is a 2 bits per pixel %00rrggbb colour.&lt;br /&gt;
&lt;br /&gt;
==== ESC c - set background ====&lt;br /&gt;
&lt;br /&gt;
Set the background (pen 0 and border) colour:&lt;br /&gt;
&lt;br /&gt;
ESC c &amp;lt;colour&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Colour is 0 based with 32 added. It is a 2 bits per pixel %00rrggbb colour.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== ESC Y - set cursor position ====&lt;br /&gt;
&lt;br /&gt;
Set the cursor position:&lt;br /&gt;
&lt;br /&gt;
ESC Y &amp;lt;y&amp;gt; &amp;lt;x&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Coordinates are relative to top-left and are 0 based with 32 added.&lt;br /&gt;
&lt;br /&gt;
e.g. for x,y of 2,10: &lt;br /&gt;
&lt;br /&gt;
 ESC,'Y',10+32,2+32&lt;br /&gt;
&lt;br /&gt;
=== Memory layout ===&lt;br /&gt;
&lt;br /&gt;
* 1st 64KB has Amstrad's XBIOS (callable using 'userf'), CCP, BDOS, BIOS, screen and firmware. Screen is at &amp;amp;4000-&amp;amp;7fff. Firmware is used. AMSDOS is not used.&lt;br /&gt;
## &amp;amp;c1/&amp;amp;c2 are used, so that there is common code at &amp;amp;c000-&amp;amp;ffff. This common code has a small BDOS and BIOS. Most of the functions use trampoline code to transition to bank 0 and call into the XBIOS.&lt;br /&gt;
* 2nd 64KB has the TPA and the shared code.&lt;br /&gt;
## Page C4 has WBOOT and BDOS jump + &amp;amp;100-&amp;amp;3f00 of the TPA. This calls to functions in Page c7.&lt;br /&gt;
## Page C5 has &amp;amp;4000-&amp;amp;7fff of the TPA.&lt;br /&gt;
## Page C6 has &amp;amp;8000-&amp;amp;bfff of the TPA.&lt;br /&gt;
## Page C7 has &amp;amp;c000-&amp;amp;f2fb of the TPA. From &amp;amp;f2fc to &amp;amp;ffff is the trampoline code which transitions * to 1st bank of 64KB.&lt;br /&gt;
&lt;br /&gt;
=== Extra memory ===&lt;br /&gt;
&lt;br /&gt;
CPM+ on the CPC uses 128KB of memory. Therefore selections C4,C5,C6,C7 must be avoided if you have additional memory. Due to the design of DkTronic's compatible RAM expansions all memory accesses to additional RAM must occur from bank 0 (i.e. 'C1') and be transferred to the TPA in bank 1 (i.e. 'C2').&lt;br /&gt;
&lt;br /&gt;
Therefore access to the additional RAM follows a pattern such as this:&lt;br /&gt;
* From running CPM program in bank 1 you need to go via code in C000-FFFF to transition to bank 0. This can be done using 'userf'.&lt;br /&gt;
* Within bank 0, your extra memory access code must lie within the regions 0000-3FFF or  8000-BFFF. 4000-7FFF is where the paging will take place so is out of bounds. C000-FFFF is where the memory trampoline code is paged in and out so using this area is much harder.&lt;br /&gt;
* Remember the current memory configuration (e.g. C1,C3,C0) &lt;br /&gt;
* In bank 0 set the memory selection (e.g. 'CC') then perform your read from the extra RAM into a temporary buffer within one of the safe areas. For write you copy from a safe area into the extra memory.&lt;br /&gt;
* Then you need to restore the memory configuration (e.g. C1,C3,C0) and trampoline back to the TPA.&lt;br /&gt;
&lt;br /&gt;
Therefore extra memory access on the CPC is not as fast as it could be compared to running under AMSDOS.&lt;br /&gt;
&lt;br /&gt;
=== Implementing a storage device driver ===&lt;br /&gt;
&lt;br /&gt;
Using &amp;quot;drvtable&amp;quot; gets the list of DPH addresses for each drive. This is actually fixed at FE2F and is referenced by the XBIOS.&lt;br /&gt;
&lt;br /&gt;
Amstrad implemented the extended DPH in the Digital Research sample BIOS. The ten bytes before a DPH give the addresses of read/write functions:&lt;br /&gt;
&lt;br /&gt;
* -10,-9 - address of sector write function&lt;br /&gt;
* -8,-7 - address of sector read function&lt;br /&gt;
* -6,-5 - address of drive select function&lt;br /&gt;
* -4,-3 - address of drive init function (never called)&lt;br /&gt;
* -2 - physical drive number (for B: this is 0 on a single-drive system and 1 on a two-drive system)&lt;br /&gt;
* -1 - drive type&lt;br /&gt;
&lt;br /&gt;
The XBIOS calls these and assumes bank 0 is active. If you write a driver in TPA space you will need to transition to and from bank 1 using selbnk etc.&lt;br /&gt;
&lt;br /&gt;
The parameters for the read / write functions are at 0BEF0h:&lt;br /&gt;
 	DB	@adrv	;Selected logical drive&lt;br /&gt;
  	DB	@rdrv	;Selected physical drive (from the byte at DPH-2)&lt;br /&gt;
 	DW	@trk	;Track passed to SETTRK.&lt;br /&gt;
 	DW	@sect	;Sector passed to SETSEC.&lt;br /&gt;
 	DW	@dma	;DMA address passed to SETDMA.&lt;br /&gt;
 	DB	@cnt	;Multiple I/O count passed to MULTIO&lt;br /&gt;
 	DB	@dbnk	;DMA bank passed to SETBNK&lt;br /&gt;
&lt;br /&gt;
=== PALETTE.COM ===&lt;br /&gt;
&lt;br /&gt;
PALETTE is a COM program written by Locomotive Software and allows the colours to be changed.&lt;br /&gt;
The syntax is:&lt;br /&gt;
&lt;br /&gt;
 PALETTE &amp;lt;background&amp;gt; &amp;lt;foreground&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;background&amp;gt; and &amp;lt;foreground&amp;gt; are r,g,b colour codes with 2 bits for each colour defined in binary as r1 r0 g1 g0 b1 b0. Therefore black is 000000, bright white is 111111, white (grey) is 010101 and bright red is 110000.&lt;br /&gt;
&lt;br /&gt;
=== Links ===&lt;br /&gt;
* [https://www.seasip.info/Cpm/index.html John Elliott's information about CPM 2.2 and CPM+ on the Amstrad]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:CP/M]][[Category:Operating System]]&lt;/div&gt;</summary>
		<author><name>D kef</name></author>	</entry>

	<entry>
		<id>https://oldwiki.cpcwiki.eu/index.php?title=File:Hdcpm111.dsk&amp;diff=115621</id>
		<title>File:Hdcpm111.dsk</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.cpcwiki.eu/index.php?title=File:Hdcpm111.dsk&amp;diff=115621"/>
				<updated>2024-04-27T12:02:33Z</updated>
		
		<summary type="html">&lt;p&gt;D kef: D kef uploaded a new version of File:Hdcpm111.dsk&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>D kef</name></author>	</entry>

	<entry>
		<id>https://oldwiki.cpcwiki.eu/index.php?title=HDCPM&amp;diff=115620</id>
		<title>HDCPM</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.cpcwiki.eu/index.php?title=HDCPM&amp;diff=115620"/>
				<updated>2024-04-27T11:03:36Z</updated>
		
		<summary type="html">&lt;p&gt;D kef: /* Release info &amp;amp; download */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
HDCPM is a Hard Disk boot loader for [[CP/M]] Plus, developed by d_kef&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can read more about the development of the application here:&amp;lt;br /&amp;gt;&lt;br /&gt;
https://www.cpcwiki.eu/forum/applications/hdcpm-boot-and-run-cpm-plus-from-hard-disk/&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:hdcpm.gif|HDCPM booting CP/M Plus]]&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It comes in the form of:&lt;br /&gt;
* a standard background ROM that can be installed in any available ROM position.&lt;br /&gt;
* a standard binary file that can be loaded from floppy or hard drive.&lt;br /&gt;
&lt;br /&gt;
 	&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following configurations are possible with one hard disk:&lt;br /&gt;
&lt;br /&gt;
* One not partitioned, CP/M formatted hard disk. The whole hard disk is used by CP/M.&lt;br /&gt;
* One to four CP/M formatted partitions. Every partition is accessed as a separate hard disk by CP/M.&lt;br /&gt;
* 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.&lt;br /&gt;
* 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.&lt;br /&gt;
* For interfaces that use SD card or USB flash drive as a mass storage device ([[M4 Board]], [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II], [http://www.tmtlogic.com/ Symbiface III] or [[Albireo]]) the only supported configuration is one to four CP/M disk image files in the root directory of the FAT file system.&lt;br /&gt;
	&lt;br /&gt;
Currently only the master IDE device can be accessed by HDCPM. The slave device is available to be used by your favourite DOS.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
HDCPM can also utilize the RTC found in the [[SYMBiFACE II]] in order to implement CP/M Plus BIOS function 26: TIME.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
HDCPM is compatible and can be used together with the [[Dobbertin Harddisc]].&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
HDCPM has been developed with [[WinApe]] Z80 Assembler and was tested with [[WinApe]], [[CPCemu]], [http://www.roudoudou.com/ACE-DL/ ACE-DL] an Amstrad Plus 464 upgraded to 6128 an Amstrad CPC 6128 and an Amstrad CPC 464 with [https://www.cpcwiki.eu/index.php/Universal_512K_and_1MByte_RAM_Expansions Universal 512K RAM Expansion].&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
HDCPM distribution disk contains the following files:&lt;br /&gt;
* HDCPM.ROM the ROM itself&lt;br /&gt;
* HDCPM.BIN the executable binary file&lt;br /&gt;
* HDMGR.COM Hard Disk Manager utility&lt;br /&gt;
* MOUNT.COM Hard Disk mount utility&lt;br /&gt;
* RTC.COM RTC synchronization utility&lt;br /&gt;
* MAKEIMG.BAS CP/M image file creation utility&lt;br /&gt;
* MAKEIMG.BIN CP/M image file creation binary&lt;br /&gt;
* MAKEIMG.EXE CP/M image file creation utility for [[SymbOS]]&lt;br /&gt;
* HDCPM.DOC the User guide&lt;br /&gt;
&lt;br /&gt;
HDCPM is free software. It can be used and distributed with no restrictions.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Prerequisites==&lt;br /&gt;
* Amstrad CPC/Plus computer capable of running CP/M Plus.&lt;br /&gt;
* ROM box or other ROM expansion hardware if using the ROM.&lt;br /&gt;
* Optionaly a FAT aware DOS like M4 ROM, USIfAC ROM, [[UniDOS]], [https://www.cpcwiki.eu/forum/applications/cubeios-fat16fat32-rom-for-the-cpc's-with-xmass/ CubeMDOS] etc if using the binary.&lt;br /&gt;
* One of the following mass storage interfaces:&lt;br /&gt;
** [[SYMBiFACE II]]&lt;br /&gt;
** [[X-Mass]]&lt;br /&gt;
** [https://github.com/salafek/cyboard-for-cpc Cyboard]&lt;br /&gt;
** [[uIDE 16]] (base address = &amp;amp;FEF0)&lt;br /&gt;
** [[M4 Board]]&lt;br /&gt;
** [[USIFAC]] II/[[ULIfAC]]&lt;br /&gt;
** [http://www.tmtlogic.com/ Symbiface III]&lt;br /&gt;
** [[Albireo]] (SD card only)&lt;br /&gt;
* Compatible storage device with enough free space to accommodate the desirable CP/M hard disk configuration.&lt;br /&gt;
* Floppy disk drive for initialization of the file system.&lt;br /&gt;
* CP/M Plus system disks for making the system bootable.&lt;br /&gt;
* Optionally a [[SYMBiFACE II]] compatible RTC.&lt;br /&gt;
&lt;br /&gt;
==Restrictions==&lt;br /&gt;
* CP/M 2.2 or lower is not supported.&lt;br /&gt;
* 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.&lt;br /&gt;
* Only the master IDE device is accessible by HDCPM.&lt;br /&gt;
* The maximum number of hard disk partition/images supported is four.&lt;br /&gt;
* Only primary partitions are supported.&lt;br /&gt;
* If you want to use CP/M disk images then they must be stored in a FAT16 or FAT32 formatted disk or partition.&lt;br /&gt;
* If the hard disk is partitioned then the CP/M disk images must be placed in the first partition of the disk.&lt;br /&gt;
* The CP/M disk images must be placed in the root directory of the FAT file system.&lt;br /&gt;
* The CP/M disk images must NOT be fragmented and must have the correct size.&lt;br /&gt;
* 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. &lt;br /&gt;
* Only storage devices with 512 bytes sector size are supported.&lt;br /&gt;
* Only storage devices with LBA addressing are supported.&lt;br /&gt;
* Date stamps of CP/M disk image files are not maintained.&lt;br /&gt;
* 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 letters for your IDE media then the corresponding HD20 partitions will be unavailable under CP/M.&lt;br /&gt;
&lt;br /&gt;
==How it works==&lt;br /&gt;
===Using the ROM===&lt;br /&gt;
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:&lt;br /&gt;
|HDCPM (no TIME function support) or |HDCPMT (TIME function support)&amp;lt;br /&amp;gt;&lt;br /&gt;
Alternatively it can be started by holding down the Tab key (no TIME function support) or Shift+Tab (TIME function support), during power-up.&amp;lt;br /&amp;gt;&lt;br /&gt;
===Using the binary===&lt;br /&gt;
HDCPM can be started by running the HDCPM.BIN file from floppy drive or mass storage.&amp;lt;br /&amp;gt;&lt;br /&gt;
===Functions===&lt;br /&gt;
HDCPM will then execute the following functions:&amp;lt;br /&amp;gt;&lt;br /&gt;
* Search for a compatible mass storage interface.&lt;br /&gt;
* Initialize the mass storage interface if needed.&lt;br /&gt;
* Move the boot loader and the CP/M patcher to RAM.&lt;br /&gt;
* Mount 1 to 4 CP/M image files and/or partitions and perform fragmentation and size test.&lt;br /&gt;
* 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.&lt;br /&gt;
* Read the .EMS file from the reserved track and store it in RAM just as the normal CP/M Plus boot loader does.&lt;br /&gt;
* 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 were a normal RSX.&lt;br /&gt;
* Patch the floppy disk drive routines in case a FDC's not been found.&lt;br /&gt;
* Patch the SCB in order to change the startup/default drive.&lt;br /&gt;
* 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 memory expansion]] or [[Dobbertin Memory Expansion]] driver is present.&lt;br /&gt;
* Move the ALV of the Dk'tronics RAM disk if [[Z-System]] has been detected.&lt;br /&gt;
* Patch the CP/M console with the desired colour scheme. &lt;br /&gt;
* Patch the system message.&lt;br /&gt;
* Do a normal CP/M cold start.&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==CP/M Plus disk image files==&lt;br /&gt;
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 [https://hexed.it/ hexed.it] or any hex editor capable of creating binary files filled with a specific pattern.&amp;lt;br /&amp;gt;&lt;br /&gt;
In case of hexed.it select 'New file' fill in 'Size of the new file = 8519680' and 'Fill Pattern = 0xE5' and press apply. Save the file as CPMDSK01.IMG&amp;lt;br /&amp;gt;&lt;br /&gt;
If you have a FAT capable DOS installed in your AMSTRAD you can use the provided MAKEIMG.BAS utility to create your image file. Keep in mind that it takes more than 1.5 hour for a 8MB image file to be created that way.&amp;lt;br /&amp;gt;&lt;br /&gt;
CP/M disk image files can be accessed by a modern computer with [http://www.moria.de/~michael/cpmtools/ cpmtools]. Use the command |HDDEF to see the record you must insert in the diskdefs file.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The HDCPM record for diskdefs is:&lt;br /&gt;
&lt;br /&gt;
       diskdef hdcpm&lt;br /&gt;
          seclen 512&lt;br /&gt;
          tracks 65&lt;br /&gt;
          sectrk 256&lt;br /&gt;
          blocksize 8192&lt;br /&gt;
          maxdir 1024&lt;br /&gt;
          skew 0&lt;br /&gt;
          boottrk 1&lt;br /&gt;
          os 3&lt;br /&gt;
       end&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
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 were 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.&amp;lt;br /&amp;gt;&lt;br /&gt;
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. [https://www.cpcwiki.eu/index.php/Albireo Albireo] incorporates a file management IC that performs FAT file system operations and handles fragmented files properly. In such case fragmented image files is not a problem. HDCPM will never fragment a CP/M image file.&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Hdcpm-boot-m4.png|thumb|HDCPM binary booting on M4 Board]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==CP/M Plus disk/partitions==&lt;br /&gt;
You can also create one or more partitions in order to format them to [http://www.seasip.info/Cpm/format31.html CP/M-80] 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.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM examines the hard disk's MBR upon start and finds the partition information. Then it finds the LBA of the first sector of each partition and passes it to the CP/M hard disk driver. The CP/M hard disk driver doesn't know anything about partitions. It accesses the partition as if it were a real hard disk.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:hdcpm-ui-boot.png|thumb|HDCPM ROM booting on uIDE-16]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
===Using the ROM===&lt;br /&gt;
* Install the HDCPM ROM in a free ROM slot of your ROM box.&lt;br /&gt;
* Plug in your mass storage interface and attach the proper mass storage device.&lt;br /&gt;
* 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 shown inside the parentheses:&amp;lt;br /&amp;gt;&lt;br /&gt;
** (S2): [[SYMBiFACE II]] compatible interface&lt;br /&gt;
** (uI): [[uIDE 16]] interface&lt;br /&gt;
** (M4): [[M4 Board]]&lt;br /&gt;
** (US): [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II]&lt;br /&gt;
** (S3): [http://www.tmtlogic.com/ Symbiface III]&lt;br /&gt;
** (AL): [[Albireo]]&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:hdcpm-s2.png|thumb|HDCPM ROM - SYMBiFACE II]]&lt;br /&gt;
|[[File:hdcpm-ui.png|thumb|HDCPM ROM - uIDE-16]]&lt;br /&gt;
|[[File:hdcpm-m4.png|thumb|HDCPM ROM - M4 Board]]&lt;br /&gt;
|}&lt;br /&gt;
{|&lt;br /&gt;
|[[File:hdcpm-us.png|thumb|HDCPM ROM - USIfAC II]]&lt;br /&gt;
|[[File:hdcpm-s3.png|thumb|HDCPM ROM - Symbiface III]]&lt;br /&gt;
|[[File:hdcpm-al.png|thumb|HDCPM ROM - Albireo]]&lt;br /&gt;
|}&lt;br /&gt;
In case a RTC is detected you will also see the RTC initialization message and the current date and time: ''RTC found: 2021/01/01 12:01:01''&lt;br /&gt;
* Use your original CP/M Plus system disk set to Boot CP/M Plus.&lt;br /&gt;
* 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.&lt;br /&gt;
* Reset your AMSTRAD and boot CP/M from the hard disk with the command |HDCPM. The Boot loader will check your image file(s) against fragmentation and correct size and boot the system to the CP/M command prompt. If the first image file is fragmented or has the wrong length the system will not boot. All other image files will be ignored if found to be fragmented or have the wrong length.&lt;br /&gt;
* In case you don't use CP/M image files just boot the system with |HDCPM or |HDCPMT&lt;br /&gt;
* Copy the files from your CP/M system floppy disks to the first hard disk.&lt;br /&gt;
* Copy any other needed application etc. to your CP/M hard disk(s).&lt;br /&gt;
* You are ready to go.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Using the binary===&lt;br /&gt;
* Plug in your mass storage interface and attach the proper mass storage device.&lt;br /&gt;
* Use your original CP/M Plus system disk set to Boot CP/M Plus.&lt;br /&gt;
* 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.&lt;br /&gt;
* 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.&lt;br /&gt;
* You are ready to go.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==ROM commands==&lt;br /&gt;
[[File:hdcpm-us-boot.png|thumb|HDCPM ROM booting on USIfAC II]]&lt;br /&gt;
* |HDCPM mounts the hard disks and boots CP/M Plus. If [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] is used enable the USB disk with the |USB command first.&lt;br /&gt;
* |HDCPMT works like |HDCPM but also utilizes the RTC.&lt;br /&gt;
* |HDDPB shows the Disk Parameter Block.&lt;br /&gt;
* |HDDEF shows the diskdefs entry for CP/M tools and the file system size.&lt;br /&gt;
* |DATE displays the current date.&lt;br /&gt;
* |TIME displays the current time. If [[M4 Board]] is used |DATE and |TIME will be redirected to M4 |TIME.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==The HDCPM binary file==&lt;br /&gt;
* If [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] is used, use your PC to copy HDCPM.BIN to your USB flash disk. Then insert it to your [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] power up your Amstrad and enable the USB disk with the |USB command.&lt;br /&gt;
* Execute the file from the floppy disk or from your mass storage device with ''RUN&amp;quot;HDCPM&amp;quot;''. 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.&lt;br /&gt;
*  [[M4 Board]] and [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ 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 [https://www.cpcwiki.eu/forum/applications/cubeios-fat16fat32-rom-for-the-cpc's-with-xmass/ CubeMDOS] or [[UniDOS]], installed.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==The MAKEIMG.BAS and MAKEIMG.EXE utilities==&lt;br /&gt;
===MAKEIMG.BAS===&lt;br /&gt;
Although this utility should not be your first option, you can use it to make a new empty CP/M disk image file.&amp;lt;br /&amp;gt;&lt;br /&gt;
In case you decide to use it make sure you have a FAT aware DOS installed in your system. MAKEIMG makes use of the firmware calls CAS_OUT_OPEN, CAS_OUT_CLOSE and CAS_OUT_CHAR so your DOS must support them.&amp;lt;br /&amp;gt;&lt;br /&gt;
Copy the files MAKEIMG.BAS and MAKEIMG.BIN to the root directory of your FAT formatted hard disk and make it your current drive. Run the utility with ''RUN&amp;quot;MAKEIMG&amp;quot;'' and don't hold your breath!&amp;lt;br /&amp;gt;&lt;br /&gt;
Making an image file this way takes more than 1.5 hour for an 8MB file so literally... don't hold your breath.&amp;lt;br /&amp;gt;&lt;br /&gt;
Here is a small tutorial on how to setup and use a CP/M image file: https://youtu.be/GMWsRzNhQTM&amp;lt;br /&amp;gt;&lt;br /&gt;
===MAKEIMG.EXE===&lt;br /&gt;
This utility is a [[SymbOS]] application.&amp;lt;br /&amp;gt;&lt;br /&gt;
Use this utility to create your CP/M hard disk images from within [[SymbOS]]. 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.&amp;lt;br /&amp;gt;&lt;br /&gt;
MAKEIMG.EXE has been developed with [http://www.symbos.de/quigs.htm Quigs] for [[SymbOS]].&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Hdcpm-makeimg-sym1.png|thumb|MAKEIMG.EXE in action]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==The HDMGR.COM utility==&lt;br /&gt;
This is the Hard Disk Manager utility.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can use this utility to get information about your hard disk geometry, disk image files, partitions and boot sector. You have to use this utility to format a hard disk, disk image file or partition to CP/M format or manipulate the boot sector of the hard disk and/or transfer an .EMS system file to the reserved track of the hard disk.&amp;lt;br /&amp;gt;&lt;br /&gt;
The boot sector contains information about the CP/M disk drive letters, start-up drive and console colour scheme. All those properties can be changed with HDMGR.COM.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR will perform a fragmentation test of the discovered CP/M hard disk image files uppon execution (not for Albireo).&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
The HDMGR.COM utility is self explanatory. Just run it from the CP/M command prompt.&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Hdcpm-hdmgr-m.png|thumb|HDMGR main menu]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-1.png|thumb|HDMGR Hardware information]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-2.png|thumb|HDMGR Partition information]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-3.png|thumb|HDMGR CP/M disk image information]]&lt;br /&gt;
|}&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Hdcpm-hdmgr-4.png|thumb|HDMGR Boot sector information]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-5.png|thumb|HDMGR Log disk]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-7.png|thumb|HDMGR Manage boot sector]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-8.png|thumb|HDMGR Transfer CP/M to disk]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==The RTC.COM utility==&lt;br /&gt;
You can make use of the RTC.COM utility in order to keep CP/M date and time updated.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can synchronize the date and time of CP/M Plus with the RTC by running ''RTC -G'' manually or via your PROFILE.SUB.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can also set your RTC to the current CP/M date and time by running ''RTC -S'' (not for M4 board)&amp;lt;br /&amp;gt;&lt;br /&gt;
You can see the detected RTC interface type by running ''RTC -I''&amp;lt;br /&amp;gt;&lt;br /&gt;
Currently RTC.COM works with the RTC found in Symbiface II, Symbiface III, M4 board (read only) and [[Nova]].&amp;lt;br /&amp;gt;&lt;br /&gt;
DATE.COM, DIR.COM and SHOW.COM commands, patched for Year 2000 compatibility can be downloaded from the [http://www.cpm.z80.de/binary.html CP/M source archive - Digital Research Binary files section] .&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==The MOUNT.COM utility==&lt;br /&gt;
You can use the MOUNT.COM utility in order to list the mounted CP/M disks, list the available CP/M disks in your mass storage medium and mount a new disk in one of the four available mount points.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can get a list of the already mounted CP/M disks by running ''MOUNT'' without any parameters.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can get a list of the available CP/M disk images or partitions by running ''MOUNT -L''&amp;lt;br /&amp;gt;&lt;br /&gt;
You can mount one of the available CP/M disk images or partitions by running ''MOUNT &amp;lt;mount point&amp;gt;,&amp;lt;hard disk&amp;gt;'' where &amp;lt;mount point&amp;gt; is a number from 1 to 4 indicating the HDCPM disk number and &amp;lt;hard disk&amp;gt; is a two digit number from 00 to 99 for CPMDSK00.IMG to CPMDSK99.IMG respectively, or P1 to P4 for partition 1 to partition 4 respectively.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Error messages==&lt;br /&gt;
===ROM checksum error===&lt;br /&gt;
* ''*** HDCPM ROM checksum error ***&lt;br /&gt;
	The ROM has failed the checksum test.&lt;br /&gt;
	The contents are probably corrupted. The ROM will not be initialized.&lt;br /&gt;
&lt;br /&gt;
===Hard disk errors===&lt;br /&gt;
* ''*** No mass storage found ***''&lt;br /&gt;
	No compatible mass storage interface can be found.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: DISK I/O''&lt;br /&gt;
	I/O error occurred during the last read/write operation.&lt;br /&gt;
	Your hard disk might be defect or the USB disk is not enabled.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: INVALID BOOT SECTOR''&lt;br /&gt;
	No FAT or CP/M boot sector was found in a not partitioned hard disk.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: INVALID FILE SYSTEM''&lt;br /&gt;
	The first partition in a partitioned hard disk is not a FAT or CP/M-80&lt;br /&gt;
	one.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: INVALID SECTOR SIZE''&lt;br /&gt;
	The hard disk used has a sector size not equal to 512 bytes.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: CPMDSK01.IMG NOT FOUND''&lt;br /&gt;
	The CP/M image file named CPMDSK01.IMG can't be found in the FAT&lt;br /&gt;
	formatted hard disk or partition. &lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: CP/M SYSTEM FILE NOT FOUND''&lt;br /&gt;
	The .EMS CP/M system file can't be found in the system track of your&lt;br /&gt;
	CP/M partition or image file.&lt;br /&gt;
	&lt;br /&gt;
*  ''ERROR: CPMDSK01.IMG IS FRAGMENTED''&lt;br /&gt;
	The first CP/M image file is fragmented, the system won't mount it.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: CPMDSK01.IMG HAS WRONG LENGTH''&lt;br /&gt;
	The first CP/M image file has wrong length, the system won't mount it.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: CPMDSK01.IMG IS NOT FORMATTED''&lt;br /&gt;
	The first CP/M image file is not formatted to CP/M-80 format, the&lt;br /&gt;
	system won't mount it. Use the HDMGR.COM utility to format it.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: INCOMPATIBLE EMS FILE''&lt;br /&gt;
	The .EMS system file that was loaded from the system track is not&lt;br /&gt;
	compatible with HDCPM.&lt;br /&gt;
&lt;br /&gt;
===RTC errors===&lt;br /&gt;
* ''*** Battery depleted ***''&lt;br /&gt;
	The RTC battery is depleted. The RTC driver will continue to operate&lt;br /&gt;
	normally but the readings are not reliable. Replace the RTC battery.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Release info &amp;amp; download==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Version !! Changes !! Download&lt;br /&gt;
|-&lt;br /&gt;
| v1.00 December 2021 || Initial release || [[Media:hdcpm100.dsk|hdcpm100.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.01 January 2022 || HDCPM.ROM, HDMGR.COM: code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: (bug fix) fragmented file detection was not working properly unless the file was CPMDSK01.IMG&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: (bug fix) unformatted image file detection was not working properly. New error message added.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) CP/M drive table wasn't patched properly.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) initialization of floppy drive(s) was corrupted due to misplaced code.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: added .EMS file compatibility check. New error message added.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: added support for Dobbertin RAM disk driver.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: added compatibility with Dobbertin HD20 Harddisc&amp;lt;br /&amp;gt;&lt;br /&gt;
MAKEIMG.EXE: added utility for creating an image file from within SYMBOS.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&lt;br /&gt;
|| [[Media:hdcpm101.dsk|hdcpm101.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.02 March 2022 || HDCPM.ROM, HDMGR.COM: added support for M4 board.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: added support for uIDE-16 interface.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) the ROM was initialized even if no compatible interface was found.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: error message change.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: option &amp;quot;F&amp;quot; has been removed. HDCPM will always do a disk fragmentation test during boot.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: power up message changed in order to provide information about the type of the detected interface.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: two bytes of RAM will be reserved by the ROM for storing the interface type and M4 ROM number.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&lt;br /&gt;
|| [[Media:hdcpm102.dsk|hdcpm102.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.03 April 2022 || HDCPM.ROM, HDMGR.COM: added support for USIfAC II.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) uIDE-16 detection was broken.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&lt;br /&gt;
|| [[Media:hdcpm103.dsk|hdcpm103.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.04 June 2022|| HDCPM.BIN: added executable binary file version of HDCPM.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: code optimization.&lt;br /&gt;
|| [[Media:hdcpm104.dsk|hdcpm104.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.05 July 2022 || HDCPM.ROM, HDCPM.BIN, HDMGR.COM: added support for Symbiface III.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDCPM.BIN:  code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR.COM: Hardware info added for USIfAC II&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR.COM: (bug fix) the 'Select boot file' menu was garbled if there were 8 or more .EMS files present.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&lt;br /&gt;
|| [[Media:hdcpm105.dsk|hdcpm105.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.06 January 2023 || HDCPM.ROM, HDCPM.BIN, HDMGR.COM: added support for Albireo.&amp;lt;br /&amp;gt;&lt;br /&gt;
RTC.COM: added support for M4 Board (r/o) and Symbiface 3.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDCPM.BIN: (bug fix) CPC was freezing after mounting the CP/M disk(s) with incompatible .EMS file.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR.COM: (bug fix) the Stack was overflowed in some rare cases.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&amp;lt;br /&amp;gt;&lt;br /&gt;
|| [[Media:hdcpm106.dsk|hdcpm106.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.10 September 2023 || HDCPM.ROM, HDCPM.BIN: added support for CPC464 with &amp;amp;C3 mode compatible RAM expansion card.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDCPM.BIN: can now boot CP/M Plus on a CPC that has no or faulty Floppy Disc Controller present.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: ROM checksum test and new error message added.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: removed blank line from ROM initialization message.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDCPM.BIN, HDMGR.COM:  code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDCPM.BIN: (bug fix) incorrect patching would corrupt the Dobbertin RAM drive on CP/M Plus v1.1&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) |HDDPB was displaying wrong values&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR.COM: (bug fix) a corruption of the MBR of USB/SD card occured in some rare cases.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&amp;lt;br /&amp;gt;&lt;br /&gt;
|| [[Media:hdcpm110.dsk|hdcpm110.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.11 April 2024 || HDCPM.ROM, HDCPM.BIN: CP/M (virtual) disks are now treated as removable.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDCPM.BIN, HDMGR.COM:  code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDCPM.BIN: (bug fix) uIDE driver was corrupted.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR.COM: (bug fix) CP/M disk image information could skip an image file.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR.COM: More than 8 .EMS files can be displayed and selected.&amp;lt;br /&amp;gt;&lt;br /&gt;
RTC.COM: added support for NOVA, added option to display the RTC interface type.&amp;lt;br /&amp;gt;&lt;br /&gt;
MOUNT.COM: added utility to list and mount CP/M (virtual) disks.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&amp;lt;br /&amp;gt;&lt;br /&gt;
|| [[Media:hdcpm111.dsk|hdcpm111.dsk]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Other downloads==&lt;br /&gt;
*[[Media:CPMDSK01&amp;amp;02.zip|CP/M disk images]] - CPMDSK01.IMG is bootable and contains all the files of the 3 CP/M Plus system disks and year 2000 compliant binaries downloaded from the [http://www.cpm.z80.de/binary.html Digital Research Binary Files]. CPMDSK02.IMG is empty and can also be used as a template.&amp;lt;br /&amp;gt;&lt;br /&gt;
*[[Media:Z3Plus.part1.rar|ZPM3+ZCCP disk image part 1]] , [[Media:Z3Plus.part2.rar|ZPM3+ZCCP disk image part 2]] - The Amstrad BDOS and CCP have been replaced with their counterparts [https://github.com/wwarthen/CPU280/tree/master/ZPM3/zpm3.txt ZPM3] and [https://github.com/wwarthen/CPU280/tree/master/ZCCP/zccp.txt ZCCP] written by Simeon Cran and Randy Winchester respectively. It is [https://www.cpcwiki.eu/index.php/Z-System Z-system, Z3Plus] compatible and contains the Z3Plus system files, all the files of the 3 CP/M Plus system disks, year 2000 compliant binaries and also contains some useful tools, help files and manuals.&amp;lt;br /&amp;gt;&lt;br /&gt;
*[[Media:CPMDSK04.zip|EMS Files]] - CPMDSK04.IMG contains a collection of HDCPM compatible EMS files (see table below) and the latest HDMGR.COM&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! EMS file !! BDOS !! CCP !! BIOS !! Extras !! Description&lt;br /&gt;
|-&lt;br /&gt;
| C10CPM3.EMS || Digital Research || Digital Research || Amstrad v1.0 || - || Original Amstrad CP/M Plus for CPC&lt;br /&gt;
|-&lt;br /&gt;
| C11CPM3.EMS || Digital Research || Digital Research || Amstrad v1.1 || - || Original Amstrad CP/M Plus for CPC&lt;br /&gt;
|-&lt;br /&gt;
| C10ZPM3.EMS || ZPM3 by Simeon Cran  || Digital Research || Amstrad v1.0 || - || The BDOS has been replaced by ZPM3 written in Z80 assembly&lt;br /&gt;
|-&lt;br /&gt;
| C11ZPM3.EMS || ZPM3 by Simeon Cran  || Digital Research || Amstrad v1.1 || - || The BDOS has been replaced by ZPM3 written in Z80 assembly&lt;br /&gt;
|-&lt;br /&gt;
| CPM3SEMI.EMS || Digital Research || Digital Research || Amstrad v1.0 || Dk'tronics RAM drive || Patched with Dk'tronics memory expansion driver&lt;br /&gt;
|-&lt;br /&gt;
| ZPM3SEMI.EMS || ZPM3 by Simeon Cran || Digital Research || Amstrad v1.0 || Dk'tronics RAM drive || Patched with Dk'tronics memory expansion driver and ZPM3&lt;br /&gt;
|-&lt;br /&gt;
| C10ZCPR3.EMS || ZPM3 by Simeon Cran  || ZCCP by Randy Winchester || Amstrad v1.0 || - || The BDOS has been replaced by ZPM3 and the CCP has been replaced by ZCCP, both  written in Z80 assembly. Z-system/Z3Plus compatible. &amp;lt;b&amp;gt;Strartup and default drive must be drive A: (use HDMGR.COM to change). Also several Z-system files must be present ([https://github.com/wwarthen/CPU280/tree/master/ZCCP/zccp.txt read ZCCP.TXT])&amp;lt;/b&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ZCPR3SEM.EMS || ZPM3 by Simeon Cran  || ZCCP by Randy Winchester || Amstrad v1.0 || Dk'tronics RAM drive || The BDOS has been replaced by ZPM3 and the CCP has been replaced by ZCCP, both  written in Z80 assembly. Z-system/Z3Plus compatible. Patched with Dk'tronics memory expansion driver. &amp;lt;b&amp;gt;Strartup and default drive must be drive A: (use HDMGR.COM to change). Also several Z-system files must be present ([https://github.com/wwarthen/CPU280/tree/master/ZCCP/zccp.txt read ZCCP.TXT]) &amp;lt;/b&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| D10CPM3.EMS || Digital Research || Digital Research || Amstrad v1.0 || Dobbertin RAM Drive || Patched with Dobbertin memory expansion driver&lt;br /&gt;
|-&lt;br /&gt;
| D11CPM3.EMS || Digital Research || Digital Research || Amstrad v1.1 || Dobbertin RAM Drive || Patched with Dobbertin memory expansion driver&lt;br /&gt;
|-&lt;br /&gt;
| DX10CPM3.EMS || Digital Research || Digital Research || Amstrad v1.0 || Dobbertin RAM Drive, Vortex format drive B: || Patched with Dobbertin memory expansion driver. Supports Vortex formatted, 80 track, double side floppies, in drive B:&lt;br /&gt;
|-&lt;br /&gt;
| DX11CPM3.EMS || Digital Research || Digital Research || Amstrad v1.1 || Dobbertin RAM Drive, Vortex format drive B: || Patched with Dobbertin memory expansion driver. Supports Vortex formatted, 80 track, double side floppies, in drive B:&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Videos==&lt;br /&gt;
* [https://youtu.be/GMWsRzNhQTM How to create and prepare a CP/M image file in a FAT formatted hard disk]&lt;br /&gt;
* [https://youtu.be/nxow6Y5O4Dc Hard disk utilization and dual boot]&lt;br /&gt;
* [https://youtu.be/em7dHOdaylg How to create a CP/M image file under SYMBOS]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
[[category:Expansion ROM]] [[category:Applications]] [[category:CP/M]]&lt;/div&gt;</summary>
		<author><name>D kef</name></author>	</entry>

	<entry>
		<id>https://oldwiki.cpcwiki.eu/index.php?title=HDCPM&amp;diff=115610</id>
		<title>HDCPM</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.cpcwiki.eu/index.php?title=HDCPM&amp;diff=115610"/>
				<updated>2024-04-22T20:00:16Z</updated>
		
		<summary type="html">&lt;p&gt;D kef: /* Other downloads */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
HDCPM is a Hard Disk boot loader for [[CP/M]] Plus, developed by d_kef&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can read more about the development of the application here:&amp;lt;br /&amp;gt;&lt;br /&gt;
https://www.cpcwiki.eu/forum/applications/hdcpm-boot-and-run-cpm-plus-from-hard-disk/&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:hdcpm.gif|HDCPM booting CP/M Plus]]&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It comes in the form of:&lt;br /&gt;
* a standard background ROM that can be installed in any available ROM position.&lt;br /&gt;
* a standard binary file that can be loaded from floppy or hard drive.&lt;br /&gt;
&lt;br /&gt;
 	&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following configurations are possible with one hard disk:&lt;br /&gt;
&lt;br /&gt;
* One not partitioned, CP/M formatted hard disk. The whole hard disk is used by CP/M.&lt;br /&gt;
* One to four CP/M formatted partitions. Every partition is accessed as a separate hard disk by CP/M.&lt;br /&gt;
* 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.&lt;br /&gt;
* 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.&lt;br /&gt;
* For interfaces that use SD card or USB flash drive as a mass storage device ([[M4 Board]], [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II], [http://www.tmtlogic.com/ Symbiface III] or [[Albireo]]) the only supported configuration is one to four CP/M disk image files in the root directory of the FAT file system.&lt;br /&gt;
	&lt;br /&gt;
Currently only the master IDE device can be accessed by HDCPM. The slave device is available to be used by your favourite DOS.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
HDCPM can also utilize the RTC found in the [[SYMBiFACE II]] in order to implement CP/M Plus BIOS function 26: TIME.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
HDCPM is compatible and can be used together with the [[Dobbertin Harddisc]].&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
HDCPM has been developed with [[WinApe]] Z80 Assembler and was tested with [[WinApe]], [[CPCemu]], [http://www.roudoudou.com/ACE-DL/ ACE-DL] an Amstrad Plus 464 upgraded to 6128 an Amstrad CPC 6128 and an Amstrad CPC 464 with [https://www.cpcwiki.eu/index.php/Universal_512K_and_1MByte_RAM_Expansions Universal 512K RAM Expansion].&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
HDCPM distribution disk contains the following files:&lt;br /&gt;
* HDCPM.ROM the ROM itself&lt;br /&gt;
* HDCPM.BIN the executable binary file&lt;br /&gt;
* HDMGR.COM Hard Disk Manager utility&lt;br /&gt;
* MOUNT.COM Hard Disk mount utility&lt;br /&gt;
* RTC.COM RTC synchronization utility&lt;br /&gt;
* MAKEIMG.BAS CP/M image file creation utility&lt;br /&gt;
* MAKEIMG.BIN CP/M image file creation binary&lt;br /&gt;
* MAKEIMG.EXE CP/M image file creation utility for [[SymbOS]]&lt;br /&gt;
* HDCPM.DOC the User guide&lt;br /&gt;
&lt;br /&gt;
HDCPM is free software. It can be used and distributed with no restrictions.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Prerequisites==&lt;br /&gt;
* Amstrad CPC/Plus computer capable of running CP/M Plus.&lt;br /&gt;
* ROM box or other ROM expansion hardware if using the ROM.&lt;br /&gt;
* Optionaly a FAT aware DOS like M4 ROM, USIfAC ROM, [[UniDOS]], [https://www.cpcwiki.eu/forum/applications/cubeios-fat16fat32-rom-for-the-cpc's-with-xmass/ CubeMDOS] etc if using the binary.&lt;br /&gt;
* One of the following mass storage interfaces:&lt;br /&gt;
** [[SYMBiFACE II]]&lt;br /&gt;
** [[X-Mass]]&lt;br /&gt;
** [https://github.com/salafek/cyboard-for-cpc Cyboard]&lt;br /&gt;
** [[uIDE 16]] (base address = &amp;amp;FEF0)&lt;br /&gt;
** [[M4 Board]]&lt;br /&gt;
** [[USIFAC]] II/[[ULIfAC]]&lt;br /&gt;
** [http://www.tmtlogic.com/ Symbiface III]&lt;br /&gt;
** [[Albireo]] (SD card only)&lt;br /&gt;
* Compatible storage device with enough free space to accommodate the desirable CP/M hard disk configuration.&lt;br /&gt;
* Floppy disk drive for initialization of the file system.&lt;br /&gt;
* CP/M Plus system disks for making the system bootable.&lt;br /&gt;
* Optionally a [[SYMBiFACE II]] compatible RTC.&lt;br /&gt;
&lt;br /&gt;
==Restrictions==&lt;br /&gt;
* CP/M 2.2 or lower is not supported.&lt;br /&gt;
* 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.&lt;br /&gt;
* Only the master IDE device is accessible by HDCPM.&lt;br /&gt;
* The maximum number of hard disk partition/images supported is four.&lt;br /&gt;
* Only primary partitions are supported.&lt;br /&gt;
* If you want to use CP/M disk images then they must be stored in a FAT16 or FAT32 formatted disk or partition.&lt;br /&gt;
* If the hard disk is partitioned then the CP/M disk images must be placed in the first partition of the disk.&lt;br /&gt;
* The CP/M disk images must be placed in the root directory of the FAT file system.&lt;br /&gt;
* The CP/M disk images must NOT be fragmented and must have the correct size.&lt;br /&gt;
* 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. &lt;br /&gt;
* Only storage devices with 512 bytes sector size are supported.&lt;br /&gt;
* Only storage devices with LBA addressing are supported.&lt;br /&gt;
* Date stamps of CP/M disk image files are not maintained.&lt;br /&gt;
* 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 letters for your IDE media then the corresponding HD20 partitions will be unavailable under CP/M.&lt;br /&gt;
&lt;br /&gt;
==How it works==&lt;br /&gt;
===Using the ROM===&lt;br /&gt;
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:&lt;br /&gt;
|HDCPM (no TIME function support) or |HDCPMT (TIME function support)&amp;lt;br /&amp;gt;&lt;br /&gt;
Alternatively it can be started by holding down the Tab key (no TIME function support) or Shift+Tab (TIME function support), during power-up.&amp;lt;br /&amp;gt;&lt;br /&gt;
===Using the binary===&lt;br /&gt;
HDCPM can be started by running the HDCPM.BIN file from floppy drive or mass storage.&amp;lt;br /&amp;gt;&lt;br /&gt;
===Functions===&lt;br /&gt;
HDCPM will then execute the following functions:&amp;lt;br /&amp;gt;&lt;br /&gt;
* Search for a compatible mass storage interface.&lt;br /&gt;
* Initialize the mass storage interface if needed.&lt;br /&gt;
* Move the boot loader and the CP/M patcher to RAM.&lt;br /&gt;
* Mount 1 to 4 CP/M image files and/or partitions and perform fragmentation and size test.&lt;br /&gt;
* 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.&lt;br /&gt;
* Read the .EMS file from the reserved track and store it in RAM just as the normal CP/M Plus boot loader does.&lt;br /&gt;
* 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 were a normal RSX.&lt;br /&gt;
* Patch the floppy disk drive routines in case a FDC's not been found.&lt;br /&gt;
* Patch the SCB in order to change the startup/default drive.&lt;br /&gt;
* 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 memory expansion]] or [[Dobbertin Memory Expansion]] driver is present.&lt;br /&gt;
* Move the ALV of the Dk'tronics RAM disk if [[Z-System]] has been detected.&lt;br /&gt;
* Patch the CP/M console with the desired colour scheme. &lt;br /&gt;
* Patch the system message.&lt;br /&gt;
* Do a normal CP/M cold start.&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==CP/M Plus disk image files==&lt;br /&gt;
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 [https://hexed.it/ hexed.it] or any hex editor capable of creating binary files filled with a specific pattern.&amp;lt;br /&amp;gt;&lt;br /&gt;
In case of hexed.it select 'New file' fill in 'Size of the new file = 8519680' and 'Fill Pattern = 0xE5' and press apply. Save the file as CPMDSK01.IMG&amp;lt;br /&amp;gt;&lt;br /&gt;
If you have a FAT capable DOS installed in your AMSTRAD you can use the provided MAKEIMG.BAS utility to create your image file. Keep in mind that it takes more than 1.5 hour for a 8MB image file to be created that way.&amp;lt;br /&amp;gt;&lt;br /&gt;
CP/M disk image files can be accessed by a modern computer with [http://www.moria.de/~michael/cpmtools/ cpmtools]. Use the command |HDDEF to see the record you must insert in the diskdefs file.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The HDCPM record for diskdefs is:&lt;br /&gt;
&lt;br /&gt;
       diskdef hdcpm&lt;br /&gt;
          seclen 512&lt;br /&gt;
          tracks 65&lt;br /&gt;
          sectrk 256&lt;br /&gt;
          blocksize 8192&lt;br /&gt;
          maxdir 1024&lt;br /&gt;
          skew 0&lt;br /&gt;
          boottrk 1&lt;br /&gt;
          os 3&lt;br /&gt;
       end&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
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 were 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.&amp;lt;br /&amp;gt;&lt;br /&gt;
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. [https://www.cpcwiki.eu/index.php/Albireo Albireo] incorporates a file management IC that performs FAT file system operations and handles fragmented files properly. In such case fragmented image files is not a problem. HDCPM will never fragment a CP/M image file.&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Hdcpm-boot-m4.png|thumb|HDCPM binary booting on M4 Board]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==CP/M Plus disk/partitions==&lt;br /&gt;
You can also create one or more partitions in order to format them to [http://www.seasip.info/Cpm/format31.html CP/M-80] 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.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM examines the hard disk's MBR upon start and finds the partition information. Then it finds the LBA of the first sector of each partition and passes it to the CP/M hard disk driver. The CP/M hard disk driver doesn't know anything about partitions. It accesses the partition as if it were a real hard disk.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:hdcpm-ui-boot.png|thumb|HDCPM ROM booting on uIDE-16]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
===Using the ROM===&lt;br /&gt;
* Install the HDCPM ROM in a free ROM slot of your ROM box.&lt;br /&gt;
* Plug in your mass storage interface and attach the proper mass storage device.&lt;br /&gt;
* 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 shown inside the parentheses:&amp;lt;br /&amp;gt;&lt;br /&gt;
** (S2): [[SYMBiFACE II]] compatible interface&lt;br /&gt;
** (uI): [[uIDE 16]] interface&lt;br /&gt;
** (M4): [[M4 Board]]&lt;br /&gt;
** (US): [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II]&lt;br /&gt;
** (S3): [http://www.tmtlogic.com/ Symbiface III]&lt;br /&gt;
** (AL): [[Albireo]]&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:hdcpm-s2.png|thumb|HDCPM ROM - SYMBiFACE II]]&lt;br /&gt;
|[[File:hdcpm-ui.png|thumb|HDCPM ROM - uIDE-16]]&lt;br /&gt;
|[[File:hdcpm-m4.png|thumb|HDCPM ROM - M4 Board]]&lt;br /&gt;
|}&lt;br /&gt;
{|&lt;br /&gt;
|[[File:hdcpm-us.png|thumb|HDCPM ROM - USIfAC II]]&lt;br /&gt;
|[[File:hdcpm-s3.png|thumb|HDCPM ROM - Symbiface III]]&lt;br /&gt;
|[[File:hdcpm-al.png|thumb|HDCPM ROM - Albireo]]&lt;br /&gt;
|}&lt;br /&gt;
In case a RTC is detected you will also see the RTC initialization message and the current date and time: ''RTC found: 2021/01/01 12:01:01''&lt;br /&gt;
* Use your original CP/M Plus system disk set to Boot CP/M Plus.&lt;br /&gt;
* 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.&lt;br /&gt;
* Reset your AMSTRAD and boot CP/M from the hard disk with the command |HDCPM. The Boot loader will check your image file(s) against fragmentation and correct size and boot the system to the CP/M command prompt. If the first image file is fragmented or has the wrong length the system will not boot. All other image files will be ignored if found to be fragmented or have the wrong length.&lt;br /&gt;
* In case you don't use CP/M image files just boot the system with |HDCPM or |HDCPMT&lt;br /&gt;
* Copy the files from your CP/M system floppy disks to the first hard disk.&lt;br /&gt;
* Copy any other needed application etc. to your CP/M hard disk(s).&lt;br /&gt;
* You are ready to go.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Using the binary===&lt;br /&gt;
* Plug in your mass storage interface and attach the proper mass storage device.&lt;br /&gt;
* Use your original CP/M Plus system disk set to Boot CP/M Plus.&lt;br /&gt;
* 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.&lt;br /&gt;
* 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.&lt;br /&gt;
* You are ready to go.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==ROM commands==&lt;br /&gt;
[[File:hdcpm-us-boot.png|thumb|HDCPM ROM booting on USIfAC II]]&lt;br /&gt;
* |HDCPM mounts the hard disks and boots CP/M Plus. If [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] is used enable the USB disk with the |USB command first.&lt;br /&gt;
* |HDCPMT works like |HDCPM but also utilizes the RTC.&lt;br /&gt;
* |HDDPB shows the Disk Parameter Block.&lt;br /&gt;
* |HDDEF shows the diskdefs entry for CP/M tools and the file system size.&lt;br /&gt;
* |DATE displays the current date.&lt;br /&gt;
* |TIME displays the current time. If [[M4 Board]] is used |DATE and |TIME will be redirected to M4 |TIME.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==The HDCPM binary file==&lt;br /&gt;
* If [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] is used, use your PC to copy HDCPM.BIN to your USB flash disk. Then insert it to your [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] power up your Amstrad and enable the USB disk with the |USB command.&lt;br /&gt;
* Execute the file from the floppy disk or from your mass storage device with ''RUN&amp;quot;HDCPM&amp;quot;''. 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.&lt;br /&gt;
*  [[M4 Board]] and [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ 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 [https://www.cpcwiki.eu/forum/applications/cubeios-fat16fat32-rom-for-the-cpc's-with-xmass/ CubeMDOS] or [[UniDOS]], installed.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==The MAKEIMG.BAS and MAKEIMG.EXE utilities==&lt;br /&gt;
===MAKEIMG.BAS===&lt;br /&gt;
Although this utility should not be your first option, you can use it to make a new empty CP/M disk image file.&amp;lt;br /&amp;gt;&lt;br /&gt;
In case you decide to use it make sure you have a FAT aware DOS installed in your system. MAKEIMG makes use of the firmware calls CAS_OUT_OPEN, CAS_OUT_CLOSE and CAS_OUT_CHAR so your DOS must support them.&amp;lt;br /&amp;gt;&lt;br /&gt;
Copy the files MAKEIMG.BAS and MAKEIMG.BIN to the root directory of your FAT formatted hard disk and make it your current drive. Run the utility with ''RUN&amp;quot;MAKEIMG&amp;quot;'' and don't hold your breath!&amp;lt;br /&amp;gt;&lt;br /&gt;
Making an image file this way takes more than 1.5 hour for an 8MB file so literally... don't hold your breath.&amp;lt;br /&amp;gt;&lt;br /&gt;
Here is a small tutorial on how to setup and use a CP/M image file: https://youtu.be/GMWsRzNhQTM&amp;lt;br /&amp;gt;&lt;br /&gt;
===MAKEIMG.EXE===&lt;br /&gt;
This utility is a [[SymbOS]] application.&amp;lt;br /&amp;gt;&lt;br /&gt;
Use this utility to create your CP/M hard disk images from within [[SymbOS]]. 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.&amp;lt;br /&amp;gt;&lt;br /&gt;
MAKEIMG.EXE has been developed with [http://www.symbos.de/quigs.htm Quigs] for [[SymbOS]].&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Hdcpm-makeimg-sym1.png|thumb|MAKEIMG.EXE in action]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==The HDMGR.COM utility==&lt;br /&gt;
This is the Hard Disk Manager utility.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can use this utility to get information about your hard disk geometry, disk image files, partitions and boot sector. You have to use this utility to format a hard disk, disk image file or partition to CP/M format or manipulate the boot sector of the hard disk and/or transfer an .EMS system file to the reserved track of the hard disk.&amp;lt;br /&amp;gt;&lt;br /&gt;
The boot sector contains information about the CP/M disk drive letters, start-up drive and console colour scheme. All those properties can be changed with HDMGR.COM.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR will perform a fragmentation test of the discovered CP/M hard disk image files uppon execution (not for Albireo).&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
The HDMGR.COM utility is self explanatory. Just run it from the CP/M command prompt.&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Hdcpm-hdmgr-m.png|thumb|HDMGR main menu]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-1.png|thumb|HDMGR Hardware information]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-2.png|thumb|HDMGR Partition information]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-3.png|thumb|HDMGR CP/M disk image information]]&lt;br /&gt;
|}&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Hdcpm-hdmgr-4.png|thumb|HDMGR Boot sector information]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-5.png|thumb|HDMGR Log disk]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-7.png|thumb|HDMGR Manage boot sector]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-8.png|thumb|HDMGR Transfer CP/M to disk]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==The RTC.COM utility==&lt;br /&gt;
You can make use of the RTC.COM utility in order to keep CP/M date and time updated.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can synchronize the date and time of CP/M Plus with the RTC by running ''RTC -G'' manually or via your PROFILE.SUB.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can also set your RTC to the current CP/M date and time by running ''RTC -S'' (not for M4 board)&amp;lt;br /&amp;gt;&lt;br /&gt;
You can see the detected RTC interface type by running ''RTC -I''&amp;lt;br /&amp;gt;&lt;br /&gt;
Currently RTC.COM works with the RTC found in Symbiface II, Symbiface III, M4 board (read only) and [[Nova]].&amp;lt;br /&amp;gt;&lt;br /&gt;
DATE.COM, DIR.COM and SHOW.COM commands, patched for Year 2000 compatibility can be downloaded from the [http://www.cpm.z80.de/binary.html CP/M source archive - Digital Research Binary files section] .&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==The MOUNT.COM utility==&lt;br /&gt;
You can use the MOUNT.COM utility in order to list the mounted CP/M disks, list the available CP/M disks in your mass storage medium and mount a new disk in one of the four available mount points.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can get a list of the already mounted CP/M disks by running ''MOUNT'' without any parameters.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can get a list of the available CP/M disk images or partitions by running ''MOUNT -L''&amp;lt;br /&amp;gt;&lt;br /&gt;
You can mount one of the available CP/M disk images or partitions by running ''MOUNT &amp;lt;mount point&amp;gt;,&amp;lt;hard disk&amp;gt;'' where &amp;lt;mount point&amp;gt; is a number from 1 to 4 indicating the HDCPM disk number and &amp;lt;hard disk&amp;gt; is a two digit number from 00 to 99 for CPMDSK00.IMG to CPMDSK99.IMG respectively, or P1 to P4 for partition 1 to partition 4 respectively.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Error messages==&lt;br /&gt;
===ROM checksum error===&lt;br /&gt;
* ''*** HDCPM ROM checksum error ***&lt;br /&gt;
	The ROM has failed the checksum test.&lt;br /&gt;
	The contents are probably corrupted. The ROM will not be initialized.&lt;br /&gt;
&lt;br /&gt;
===Hard disk errors===&lt;br /&gt;
* ''*** No mass storage found ***''&lt;br /&gt;
	No compatible mass storage interface can be found.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: DISK I/O''&lt;br /&gt;
	I/O error occurred during the last read/write operation.&lt;br /&gt;
	Your hard disk might be defect or the USB disk is not enabled.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: INVALID BOOT SECTOR''&lt;br /&gt;
	No FAT or CP/M boot sector was found in a not partitioned hard disk.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: INVALID FILE SYSTEM''&lt;br /&gt;
	The first partition in a partitioned hard disk is not a FAT or CP/M-80&lt;br /&gt;
	one.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: INVALID SECTOR SIZE''&lt;br /&gt;
	The hard disk used has a sector size not equal to 512 bytes.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: CPMDSK01.IMG NOT FOUND''&lt;br /&gt;
	The CP/M image file named CPMDSK01.IMG can't be found in the FAT&lt;br /&gt;
	formatted hard disk or partition. &lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: CP/M SYSTEM FILE NOT FOUND''&lt;br /&gt;
	The .EMS CP/M system file can't be found in the system track of your&lt;br /&gt;
	CP/M partition or image file.&lt;br /&gt;
	&lt;br /&gt;
*  ''ERROR: CPMDSK01.IMG IS FRAGMENTED''&lt;br /&gt;
	The first CP/M image file is fragmented, the system won't mount it.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: CPMDSK01.IMG HAS WRONG LENGTH''&lt;br /&gt;
	The first CP/M image file has wrong length, the system won't mount it.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: CPMDSK01.IMG IS NOT FORMATTED''&lt;br /&gt;
	The first CP/M image file is not formatted to CP/M-80 format, the&lt;br /&gt;
	system won't mount it. Use the HDMGR.COM utility to format it.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: INCOMPATIBLE EMS FILE''&lt;br /&gt;
	The .EMS system file that was loaded from the system track is not&lt;br /&gt;
	compatible with HDCPM.&lt;br /&gt;
&lt;br /&gt;
===RTC errors===&lt;br /&gt;
* ''*** Battery depleted ***''&lt;br /&gt;
	The RTC battery is depleted. The RTC driver will continue to operate&lt;br /&gt;
	normally but the readings are not reliable. Replace the RTC battery.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Release info &amp;amp; download==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Version !! Changes !! Download&lt;br /&gt;
|-&lt;br /&gt;
| v1.00 December 2021 || Initial release || [[Media:hdcpm100.dsk|hdcpm100.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.01 January 2022 || HDCPM.ROM, HDMGR.COM: code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: (bug fix) fragmented file detection was not working properly unless the file was CPMDSK01.IMG&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: (bug fix) unformatted image file detection was not working properly. New error message added.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) CP/M drive table wasn't patched properly.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) initialization of floppy drive(s) was corrupted due to misplaced code.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: added .EMS file compatibility check. New error message added.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: added support for Dobbertin RAM disk driver.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: added compatibility with Dobbertin HD20 Harddisc&amp;lt;br /&amp;gt;&lt;br /&gt;
MAKEIMG.EXE: added utility for creating an image file from within SYMBOS.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&lt;br /&gt;
|| [[Media:hdcpm101.dsk|hdcpm101.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.02 March 2022 || HDCPM.ROM, HDMGR.COM: added support for M4 board.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: added support for uIDE-16 interface.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) the ROM was initialized even if no compatible interface was found.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: error message change.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: option &amp;quot;F&amp;quot; has been removed. HDCPM will always do a disk fragmentation test during boot.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: power up message changed in order to provide information about the type of the detected interface.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: two bytes of RAM will be reserved by the ROM for storing the interface type and M4 ROM number.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&lt;br /&gt;
|| [[Media:hdcpm102.dsk|hdcpm102.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.03 April 2022 || HDCPM.ROM, HDMGR.COM: added support for USIfAC II.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) uIDE-16 detection was broken.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&lt;br /&gt;
|| [[Media:hdcpm103.dsk|hdcpm103.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.04 June 2022|| HDCPM.ROM: code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.BIN: added executable binary file version of HDCPM.&lt;br /&gt;
|| [[Media:hdcpm104.dsk|hdcpm104.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.05 July 2022 || HDCPM.ROM, HDCPM.BIN, HDMGR.COM: added support for Symbiface III.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDCPM.BIN:  code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR.COM: Hardware info added for USIfAC II&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR.COM: (bug fix) the 'Select boot file' menu was garbled if there were 8 or more .EMS files present.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&lt;br /&gt;
|| [[Media:hdcpm105.dsk|hdcpm105.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.06 January 2023 || HDCPM.ROM, HDCPM.BIN, HDMGR.COM: added support for Albireo.&amp;lt;br /&amp;gt;&lt;br /&gt;
RTC.COM: added support for M4 Board (r/o) and Symbiface 3.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDCPM.BIN: (bug fix) CPC was freezing after mounting the CP/M disk(s) with incompatible .EMS file.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR.COM: (bug fix) the Stack was overflowed in some rare cases.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&amp;lt;br /&amp;gt;&lt;br /&gt;
|| [[Media:hdcpm106.dsk|hdcpm106.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.10 September 2023 || HDCPM.ROM, HDCPM.BIN: added support for CPC464 with &amp;amp;C3 mode compatible RAM expansion card.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDCPM.BIN: can now boot CP/M Plus on a CPC that has no or faulty Floppy Disc Controller present.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: ROM checksum test and new error message added.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: removed blank line from ROM initialization message.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDCPM.BIN, HDMGR.COM:  code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDCPM.BIN: (bug fix) incorrect patching would corrupt the Dobbertin RAM drive on CP/M Plus v1.1&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) |HDDPB was displaying wrong values&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR.COM: (bug fix) a corruption of the MBR of USB/SD card occured in some rare cases.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&amp;lt;br /&amp;gt;&lt;br /&gt;
|| [[Media:hdcpm110.dsk|hdcpm110.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.11 April 2024 || HDCPM.ROM, HDCPM.BIN: CP/M (virtual) disks are now treated as removable.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDCPM.BIN, HDMGR.COM:  code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDCPM.BIN: (bug fix) uIDE driver was corrupted.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR.COM: (bug fix) CP/M disk image information could skip an image file.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR.COM: More than 8 .EMS files can be displayed and selected.&amp;lt;br /&amp;gt;&lt;br /&gt;
RTC.COM: added support for NOVA, added option to display the RTC interface type.&amp;lt;br /&amp;gt;&lt;br /&gt;
MOUNT.COM: added utility to list and mount CP/M (virtual) disks.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&amp;lt;br /&amp;gt;&lt;br /&gt;
|| [[Media:hdcpm111.dsk|hdcpm111.dsk]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Other downloads==&lt;br /&gt;
*[[Media:CPMDSK01&amp;amp;02.zip|CP/M disk images]] - CPMDSK01.IMG is bootable and contains all the files of the 3 CP/M Plus system disks and year 2000 compliant binaries downloaded from the [http://www.cpm.z80.de/binary.html Digital Research Binary Files]. CPMDSK02.IMG is empty and can also be used as a template.&amp;lt;br /&amp;gt;&lt;br /&gt;
*[[Media:Z3Plus.part1.rar|ZPM3+ZCCP disk image part 1]] , [[Media:Z3Plus.part2.rar|ZPM3+ZCCP disk image part 2]] - The Amstrad BDOS and CCP have been replaced with their counterparts [https://github.com/wwarthen/CPU280/tree/master/ZPM3/zpm3.txt ZPM3] and [https://github.com/wwarthen/CPU280/tree/master/ZCCP/zccp.txt ZCCP] written by Simeon Cran and Randy Winchester respectively. It is [https://www.cpcwiki.eu/index.php/Z-System Z-system, Z3Plus] compatible and contains the Z3Plus system files, all the files of the 3 CP/M Plus system disks, year 2000 compliant binaries and also contains some useful tools, help files and manuals.&amp;lt;br /&amp;gt;&lt;br /&gt;
*[[Media:CPMDSK04.zip|EMS Files]] - CPMDSK04.IMG contains a collection of HDCPM compatible EMS files (see table below) and the latest HDMGR.COM&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! EMS file !! BDOS !! CCP !! BIOS !! Extras !! Description&lt;br /&gt;
|-&lt;br /&gt;
| C10CPM3.EMS || Digital Research || Digital Research || Amstrad v1.0 || - || Original Amstrad CP/M Plus for CPC&lt;br /&gt;
|-&lt;br /&gt;
| C11CPM3.EMS || Digital Research || Digital Research || Amstrad v1.1 || - || Original Amstrad CP/M Plus for CPC&lt;br /&gt;
|-&lt;br /&gt;
| C10ZPM3.EMS || ZPM3 by Simeon Cran  || Digital Research || Amstrad v1.0 || - || The BDOS has been replaced by ZPM3 written in Z80 assembly&lt;br /&gt;
|-&lt;br /&gt;
| C11ZPM3.EMS || ZPM3 by Simeon Cran  || Digital Research || Amstrad v1.1 || - || The BDOS has been replaced by ZPM3 written in Z80 assembly&lt;br /&gt;
|-&lt;br /&gt;
| CPM3SEMI.EMS || Digital Research || Digital Research || Amstrad v1.0 || Dk'tronics RAM drive || Patched with Dk'tronics memory expansion driver&lt;br /&gt;
|-&lt;br /&gt;
| ZPM3SEMI.EMS || ZPM3 by Simeon Cran || Digital Research || Amstrad v1.0 || Dk'tronics RAM drive || Patched with Dk'tronics memory expansion driver and ZPM3&lt;br /&gt;
|-&lt;br /&gt;
| C10ZCPR3.EMS || ZPM3 by Simeon Cran  || ZCCP by Randy Winchester || Amstrad v1.0 || - || The BDOS has been replaced by ZPM3 and the CCP has been replaced by ZCCP, both  written in Z80 assembly. Z-system/Z3Plus compatible. &amp;lt;b&amp;gt;Strartup and default drive must be drive A: (use HDMGR.COM to change). Also several Z-system files must be present ([https://github.com/wwarthen/CPU280/tree/master/ZCCP/zccp.txt read ZCCP.TXT])&amp;lt;/b&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ZCPR3SEM.EMS || ZPM3 by Simeon Cran  || ZCCP by Randy Winchester || Amstrad v1.0 || Dk'tronics RAM drive || The BDOS has been replaced by ZPM3 and the CCP has been replaced by ZCCP, both  written in Z80 assembly. Z-system/Z3Plus compatible. Patched with Dk'tronics memory expansion driver. &amp;lt;b&amp;gt;Strartup and default drive must be drive A: (use HDMGR.COM to change). Also several Z-system files must be present ([https://github.com/wwarthen/CPU280/tree/master/ZCCP/zccp.txt read ZCCP.TXT]) &amp;lt;/b&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| D10CPM3.EMS || Digital Research || Digital Research || Amstrad v1.0 || Dobbertin RAM Drive || Patched with Dobbertin memory expansion driver&lt;br /&gt;
|-&lt;br /&gt;
| D11CPM3.EMS || Digital Research || Digital Research || Amstrad v1.1 || Dobbertin RAM Drive || Patched with Dobbertin memory expansion driver&lt;br /&gt;
|-&lt;br /&gt;
| DX10CPM3.EMS || Digital Research || Digital Research || Amstrad v1.0 || Dobbertin RAM Drive, Vortex format drive B: || Patched with Dobbertin memory expansion driver. Supports Vortex formatted, 80 track, double side floppies, in drive B:&lt;br /&gt;
|-&lt;br /&gt;
| DX11CPM3.EMS || Digital Research || Digital Research || Amstrad v1.1 || Dobbertin RAM Drive, Vortex format drive B: || Patched with Dobbertin memory expansion driver. Supports Vortex formatted, 80 track, double side floppies, in drive B:&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Videos==&lt;br /&gt;
* [https://youtu.be/GMWsRzNhQTM How to create and prepare a CP/M image file in a FAT formatted hard disk]&lt;br /&gt;
* [https://youtu.be/nxow6Y5O4Dc Hard disk utilization and dual boot]&lt;br /&gt;
* [https://youtu.be/em7dHOdaylg How to create a CP/M image file under SYMBOS]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
[[category:Expansion ROM]] [[category:Applications]] [[category:CP/M]]&lt;/div&gt;</summary>
		<author><name>D kef</name></author>	</entry>

	<entry>
		<id>https://oldwiki.cpcwiki.eu/index.php?title=HDCPM&amp;diff=115609</id>
		<title>HDCPM</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.cpcwiki.eu/index.php?title=HDCPM&amp;diff=115609"/>
				<updated>2024-04-22T19:54:15Z</updated>
		
		<summary type="html">&lt;p&gt;D kef: /* Other downloads */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
HDCPM is a Hard Disk boot loader for [[CP/M]] Plus, developed by d_kef&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can read more about the development of the application here:&amp;lt;br /&amp;gt;&lt;br /&gt;
https://www.cpcwiki.eu/forum/applications/hdcpm-boot-and-run-cpm-plus-from-hard-disk/&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:hdcpm.gif|HDCPM booting CP/M Plus]]&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It comes in the form of:&lt;br /&gt;
* a standard background ROM that can be installed in any available ROM position.&lt;br /&gt;
* a standard binary file that can be loaded from floppy or hard drive.&lt;br /&gt;
&lt;br /&gt;
 	&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following configurations are possible with one hard disk:&lt;br /&gt;
&lt;br /&gt;
* One not partitioned, CP/M formatted hard disk. The whole hard disk is used by CP/M.&lt;br /&gt;
* One to four CP/M formatted partitions. Every partition is accessed as a separate hard disk by CP/M.&lt;br /&gt;
* 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.&lt;br /&gt;
* 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.&lt;br /&gt;
* For interfaces that use SD card or USB flash drive as a mass storage device ([[M4 Board]], [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II], [http://www.tmtlogic.com/ Symbiface III] or [[Albireo]]) the only supported configuration is one to four CP/M disk image files in the root directory of the FAT file system.&lt;br /&gt;
	&lt;br /&gt;
Currently only the master IDE device can be accessed by HDCPM. The slave device is available to be used by your favourite DOS.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
HDCPM can also utilize the RTC found in the [[SYMBiFACE II]] in order to implement CP/M Plus BIOS function 26: TIME.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
HDCPM is compatible and can be used together with the [[Dobbertin Harddisc]].&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
HDCPM has been developed with [[WinApe]] Z80 Assembler and was tested with [[WinApe]], [[CPCemu]], [http://www.roudoudou.com/ACE-DL/ ACE-DL] an Amstrad Plus 464 upgraded to 6128 an Amstrad CPC 6128 and an Amstrad CPC 464 with [https://www.cpcwiki.eu/index.php/Universal_512K_and_1MByte_RAM_Expansions Universal 512K RAM Expansion].&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
HDCPM distribution disk contains the following files:&lt;br /&gt;
* HDCPM.ROM the ROM itself&lt;br /&gt;
* HDCPM.BIN the executable binary file&lt;br /&gt;
* HDMGR.COM Hard Disk Manager utility&lt;br /&gt;
* MOUNT.COM Hard Disk mount utility&lt;br /&gt;
* RTC.COM RTC synchronization utility&lt;br /&gt;
* MAKEIMG.BAS CP/M image file creation utility&lt;br /&gt;
* MAKEIMG.BIN CP/M image file creation binary&lt;br /&gt;
* MAKEIMG.EXE CP/M image file creation utility for [[SymbOS]]&lt;br /&gt;
* HDCPM.DOC the User guide&lt;br /&gt;
&lt;br /&gt;
HDCPM is free software. It can be used and distributed with no restrictions.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Prerequisites==&lt;br /&gt;
* Amstrad CPC/Plus computer capable of running CP/M Plus.&lt;br /&gt;
* ROM box or other ROM expansion hardware if using the ROM.&lt;br /&gt;
* Optionaly a FAT aware DOS like M4 ROM, USIfAC ROM, [[UniDOS]], [https://www.cpcwiki.eu/forum/applications/cubeios-fat16fat32-rom-for-the-cpc's-with-xmass/ CubeMDOS] etc if using the binary.&lt;br /&gt;
* One of the following mass storage interfaces:&lt;br /&gt;
** [[SYMBiFACE II]]&lt;br /&gt;
** [[X-Mass]]&lt;br /&gt;
** [https://github.com/salafek/cyboard-for-cpc Cyboard]&lt;br /&gt;
** [[uIDE 16]] (base address = &amp;amp;FEF0)&lt;br /&gt;
** [[M4 Board]]&lt;br /&gt;
** [[USIFAC]] II/[[ULIfAC]]&lt;br /&gt;
** [http://www.tmtlogic.com/ Symbiface III]&lt;br /&gt;
** [[Albireo]] (SD card only)&lt;br /&gt;
* Compatible storage device with enough free space to accommodate the desirable CP/M hard disk configuration.&lt;br /&gt;
* Floppy disk drive for initialization of the file system.&lt;br /&gt;
* CP/M Plus system disks for making the system bootable.&lt;br /&gt;
* Optionally a [[SYMBiFACE II]] compatible RTC.&lt;br /&gt;
&lt;br /&gt;
==Restrictions==&lt;br /&gt;
* CP/M 2.2 or lower is not supported.&lt;br /&gt;
* 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.&lt;br /&gt;
* Only the master IDE device is accessible by HDCPM.&lt;br /&gt;
* The maximum number of hard disk partition/images supported is four.&lt;br /&gt;
* Only primary partitions are supported.&lt;br /&gt;
* If you want to use CP/M disk images then they must be stored in a FAT16 or FAT32 formatted disk or partition.&lt;br /&gt;
* If the hard disk is partitioned then the CP/M disk images must be placed in the first partition of the disk.&lt;br /&gt;
* The CP/M disk images must be placed in the root directory of the FAT file system.&lt;br /&gt;
* The CP/M disk images must NOT be fragmented and must have the correct size.&lt;br /&gt;
* 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. &lt;br /&gt;
* Only storage devices with 512 bytes sector size are supported.&lt;br /&gt;
* Only storage devices with LBA addressing are supported.&lt;br /&gt;
* Date stamps of CP/M disk image files are not maintained.&lt;br /&gt;
* 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 letters for your IDE media then the corresponding HD20 partitions will be unavailable under CP/M.&lt;br /&gt;
&lt;br /&gt;
==How it works==&lt;br /&gt;
===Using the ROM===&lt;br /&gt;
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:&lt;br /&gt;
|HDCPM (no TIME function support) or |HDCPMT (TIME function support)&amp;lt;br /&amp;gt;&lt;br /&gt;
Alternatively it can be started by holding down the Tab key (no TIME function support) or Shift+Tab (TIME function support), during power-up.&amp;lt;br /&amp;gt;&lt;br /&gt;
===Using the binary===&lt;br /&gt;
HDCPM can be started by running the HDCPM.BIN file from floppy drive or mass storage.&amp;lt;br /&amp;gt;&lt;br /&gt;
===Functions===&lt;br /&gt;
HDCPM will then execute the following functions:&amp;lt;br /&amp;gt;&lt;br /&gt;
* Search for a compatible mass storage interface.&lt;br /&gt;
* Initialize the mass storage interface if needed.&lt;br /&gt;
* Move the boot loader and the CP/M patcher to RAM.&lt;br /&gt;
* Mount 1 to 4 CP/M image files and/or partitions and perform fragmentation and size test.&lt;br /&gt;
* 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.&lt;br /&gt;
* Read the .EMS file from the reserved track and store it in RAM just as the normal CP/M Plus boot loader does.&lt;br /&gt;
* 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 were a normal RSX.&lt;br /&gt;
* Patch the floppy disk drive routines in case a FDC's not been found.&lt;br /&gt;
* Patch the SCB in order to change the startup/default drive.&lt;br /&gt;
* 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 memory expansion]] or [[Dobbertin Memory Expansion]] driver is present.&lt;br /&gt;
* Move the ALV of the Dk'tronics RAM disk if [[Z-System]] has been detected.&lt;br /&gt;
* Patch the CP/M console with the desired colour scheme. &lt;br /&gt;
* Patch the system message.&lt;br /&gt;
* Do a normal CP/M cold start.&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==CP/M Plus disk image files==&lt;br /&gt;
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 [https://hexed.it/ hexed.it] or any hex editor capable of creating binary files filled with a specific pattern.&amp;lt;br /&amp;gt;&lt;br /&gt;
In case of hexed.it select 'New file' fill in 'Size of the new file = 8519680' and 'Fill Pattern = 0xE5' and press apply. Save the file as CPMDSK01.IMG&amp;lt;br /&amp;gt;&lt;br /&gt;
If you have a FAT capable DOS installed in your AMSTRAD you can use the provided MAKEIMG.BAS utility to create your image file. Keep in mind that it takes more than 1.5 hour for a 8MB image file to be created that way.&amp;lt;br /&amp;gt;&lt;br /&gt;
CP/M disk image files can be accessed by a modern computer with [http://www.moria.de/~michael/cpmtools/ cpmtools]. Use the command |HDDEF to see the record you must insert in the diskdefs file.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The HDCPM record for diskdefs is:&lt;br /&gt;
&lt;br /&gt;
       diskdef hdcpm&lt;br /&gt;
          seclen 512&lt;br /&gt;
          tracks 65&lt;br /&gt;
          sectrk 256&lt;br /&gt;
          blocksize 8192&lt;br /&gt;
          maxdir 1024&lt;br /&gt;
          skew 0&lt;br /&gt;
          boottrk 1&lt;br /&gt;
          os 3&lt;br /&gt;
       end&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
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 were 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.&amp;lt;br /&amp;gt;&lt;br /&gt;
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. [https://www.cpcwiki.eu/index.php/Albireo Albireo] incorporates a file management IC that performs FAT file system operations and handles fragmented files properly. In such case fragmented image files is not a problem. HDCPM will never fragment a CP/M image file.&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Hdcpm-boot-m4.png|thumb|HDCPM binary booting on M4 Board]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==CP/M Plus disk/partitions==&lt;br /&gt;
You can also create one or more partitions in order to format them to [http://www.seasip.info/Cpm/format31.html CP/M-80] 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.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM examines the hard disk's MBR upon start and finds the partition information. Then it finds the LBA of the first sector of each partition and passes it to the CP/M hard disk driver. The CP/M hard disk driver doesn't know anything about partitions. It accesses the partition as if it were a real hard disk.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:hdcpm-ui-boot.png|thumb|HDCPM ROM booting on uIDE-16]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
===Using the ROM===&lt;br /&gt;
* Install the HDCPM ROM in a free ROM slot of your ROM box.&lt;br /&gt;
* Plug in your mass storage interface and attach the proper mass storage device.&lt;br /&gt;
* 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 shown inside the parentheses:&amp;lt;br /&amp;gt;&lt;br /&gt;
** (S2): [[SYMBiFACE II]] compatible interface&lt;br /&gt;
** (uI): [[uIDE 16]] interface&lt;br /&gt;
** (M4): [[M4 Board]]&lt;br /&gt;
** (US): [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II]&lt;br /&gt;
** (S3): [http://www.tmtlogic.com/ Symbiface III]&lt;br /&gt;
** (AL): [[Albireo]]&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:hdcpm-s2.png|thumb|HDCPM ROM - SYMBiFACE II]]&lt;br /&gt;
|[[File:hdcpm-ui.png|thumb|HDCPM ROM - uIDE-16]]&lt;br /&gt;
|[[File:hdcpm-m4.png|thumb|HDCPM ROM - M4 Board]]&lt;br /&gt;
|}&lt;br /&gt;
{|&lt;br /&gt;
|[[File:hdcpm-us.png|thumb|HDCPM ROM - USIfAC II]]&lt;br /&gt;
|[[File:hdcpm-s3.png|thumb|HDCPM ROM - Symbiface III]]&lt;br /&gt;
|[[File:hdcpm-al.png|thumb|HDCPM ROM - Albireo]]&lt;br /&gt;
|}&lt;br /&gt;
In case a RTC is detected you will also see the RTC initialization message and the current date and time: ''RTC found: 2021/01/01 12:01:01''&lt;br /&gt;
* Use your original CP/M Plus system disk set to Boot CP/M Plus.&lt;br /&gt;
* 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.&lt;br /&gt;
* Reset your AMSTRAD and boot CP/M from the hard disk with the command |HDCPM. The Boot loader will check your image file(s) against fragmentation and correct size and boot the system to the CP/M command prompt. If the first image file is fragmented or has the wrong length the system will not boot. All other image files will be ignored if found to be fragmented or have the wrong length.&lt;br /&gt;
* In case you don't use CP/M image files just boot the system with |HDCPM or |HDCPMT&lt;br /&gt;
* Copy the files from your CP/M system floppy disks to the first hard disk.&lt;br /&gt;
* Copy any other needed application etc. to your CP/M hard disk(s).&lt;br /&gt;
* You are ready to go.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Using the binary===&lt;br /&gt;
* Plug in your mass storage interface and attach the proper mass storage device.&lt;br /&gt;
* Use your original CP/M Plus system disk set to Boot CP/M Plus.&lt;br /&gt;
* 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.&lt;br /&gt;
* 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.&lt;br /&gt;
* You are ready to go.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==ROM commands==&lt;br /&gt;
[[File:hdcpm-us-boot.png|thumb|HDCPM ROM booting on USIfAC II]]&lt;br /&gt;
* |HDCPM mounts the hard disks and boots CP/M Plus. If [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] is used enable the USB disk with the |USB command first.&lt;br /&gt;
* |HDCPMT works like |HDCPM but also utilizes the RTC.&lt;br /&gt;
* |HDDPB shows the Disk Parameter Block.&lt;br /&gt;
* |HDDEF shows the diskdefs entry for CP/M tools and the file system size.&lt;br /&gt;
* |DATE displays the current date.&lt;br /&gt;
* |TIME displays the current time. If [[M4 Board]] is used |DATE and |TIME will be redirected to M4 |TIME.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==The HDCPM binary file==&lt;br /&gt;
* If [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] is used, use your PC to copy HDCPM.BIN to your USB flash disk. Then insert it to your [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] power up your Amstrad and enable the USB disk with the |USB command.&lt;br /&gt;
* Execute the file from the floppy disk or from your mass storage device with ''RUN&amp;quot;HDCPM&amp;quot;''. 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.&lt;br /&gt;
*  [[M4 Board]] and [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ 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 [https://www.cpcwiki.eu/forum/applications/cubeios-fat16fat32-rom-for-the-cpc's-with-xmass/ CubeMDOS] or [[UniDOS]], installed.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==The MAKEIMG.BAS and MAKEIMG.EXE utilities==&lt;br /&gt;
===MAKEIMG.BAS===&lt;br /&gt;
Although this utility should not be your first option, you can use it to make a new empty CP/M disk image file.&amp;lt;br /&amp;gt;&lt;br /&gt;
In case you decide to use it make sure you have a FAT aware DOS installed in your system. MAKEIMG makes use of the firmware calls CAS_OUT_OPEN, CAS_OUT_CLOSE and CAS_OUT_CHAR so your DOS must support them.&amp;lt;br /&amp;gt;&lt;br /&gt;
Copy the files MAKEIMG.BAS and MAKEIMG.BIN to the root directory of your FAT formatted hard disk and make it your current drive. Run the utility with ''RUN&amp;quot;MAKEIMG&amp;quot;'' and don't hold your breath!&amp;lt;br /&amp;gt;&lt;br /&gt;
Making an image file this way takes more than 1.5 hour for an 8MB file so literally... don't hold your breath.&amp;lt;br /&amp;gt;&lt;br /&gt;
Here is a small tutorial on how to setup and use a CP/M image file: https://youtu.be/GMWsRzNhQTM&amp;lt;br /&amp;gt;&lt;br /&gt;
===MAKEIMG.EXE===&lt;br /&gt;
This utility is a [[SymbOS]] application.&amp;lt;br /&amp;gt;&lt;br /&gt;
Use this utility to create your CP/M hard disk images from within [[SymbOS]]. 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.&amp;lt;br /&amp;gt;&lt;br /&gt;
MAKEIMG.EXE has been developed with [http://www.symbos.de/quigs.htm Quigs] for [[SymbOS]].&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Hdcpm-makeimg-sym1.png|thumb|MAKEIMG.EXE in action]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==The HDMGR.COM utility==&lt;br /&gt;
This is the Hard Disk Manager utility.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can use this utility to get information about your hard disk geometry, disk image files, partitions and boot sector. You have to use this utility to format a hard disk, disk image file or partition to CP/M format or manipulate the boot sector of the hard disk and/or transfer an .EMS system file to the reserved track of the hard disk.&amp;lt;br /&amp;gt;&lt;br /&gt;
The boot sector contains information about the CP/M disk drive letters, start-up drive and console colour scheme. All those properties can be changed with HDMGR.COM.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR will perform a fragmentation test of the discovered CP/M hard disk image files uppon execution (not for Albireo).&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
The HDMGR.COM utility is self explanatory. Just run it from the CP/M command prompt.&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Hdcpm-hdmgr-m.png|thumb|HDMGR main menu]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-1.png|thumb|HDMGR Hardware information]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-2.png|thumb|HDMGR Partition information]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-3.png|thumb|HDMGR CP/M disk image information]]&lt;br /&gt;
|}&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Hdcpm-hdmgr-4.png|thumb|HDMGR Boot sector information]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-5.png|thumb|HDMGR Log disk]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-7.png|thumb|HDMGR Manage boot sector]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-8.png|thumb|HDMGR Transfer CP/M to disk]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==The RTC.COM utility==&lt;br /&gt;
You can make use of the RTC.COM utility in order to keep CP/M date and time updated.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can synchronize the date and time of CP/M Plus with the RTC by running ''RTC -G'' manually or via your PROFILE.SUB.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can also set your RTC to the current CP/M date and time by running ''RTC -S'' (not for M4 board)&amp;lt;br /&amp;gt;&lt;br /&gt;
You can see the detected RTC interface type by running ''RTC -I''&amp;lt;br /&amp;gt;&lt;br /&gt;
Currently RTC.COM works with the RTC found in Symbiface II, Symbiface III, M4 board (read only) and [[Nova]].&amp;lt;br /&amp;gt;&lt;br /&gt;
DATE.COM, DIR.COM and SHOW.COM commands, patched for Year 2000 compatibility can be downloaded from the [http://www.cpm.z80.de/binary.html CP/M source archive - Digital Research Binary files section] .&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==The MOUNT.COM utility==&lt;br /&gt;
You can use the MOUNT.COM utility in order to list the mounted CP/M disks, list the available CP/M disks in your mass storage medium and mount a new disk in one of the four available mount points.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can get a list of the already mounted CP/M disks by running ''MOUNT'' without any parameters.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can get a list of the available CP/M disk images or partitions by running ''MOUNT -L''&amp;lt;br /&amp;gt;&lt;br /&gt;
You can mount one of the available CP/M disk images or partitions by running ''MOUNT &amp;lt;mount point&amp;gt;,&amp;lt;hard disk&amp;gt;'' where &amp;lt;mount point&amp;gt; is a number from 1 to 4 indicating the HDCPM disk number and &amp;lt;hard disk&amp;gt; is a two digit number from 00 to 99 for CPMDSK00.IMG to CPMDSK99.IMG respectively, or P1 to P4 for partition 1 to partition 4 respectively.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Error messages==&lt;br /&gt;
===ROM checksum error===&lt;br /&gt;
* ''*** HDCPM ROM checksum error ***&lt;br /&gt;
	The ROM has failed the checksum test.&lt;br /&gt;
	The contents are probably corrupted. The ROM will not be initialized.&lt;br /&gt;
&lt;br /&gt;
===Hard disk errors===&lt;br /&gt;
* ''*** No mass storage found ***''&lt;br /&gt;
	No compatible mass storage interface can be found.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: DISK I/O''&lt;br /&gt;
	I/O error occurred during the last read/write operation.&lt;br /&gt;
	Your hard disk might be defect or the USB disk is not enabled.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: INVALID BOOT SECTOR''&lt;br /&gt;
	No FAT or CP/M boot sector was found in a not partitioned hard disk.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: INVALID FILE SYSTEM''&lt;br /&gt;
	The first partition in a partitioned hard disk is not a FAT or CP/M-80&lt;br /&gt;
	one.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: INVALID SECTOR SIZE''&lt;br /&gt;
	The hard disk used has a sector size not equal to 512 bytes.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: CPMDSK01.IMG NOT FOUND''&lt;br /&gt;
	The CP/M image file named CPMDSK01.IMG can't be found in the FAT&lt;br /&gt;
	formatted hard disk or partition. &lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: CP/M SYSTEM FILE NOT FOUND''&lt;br /&gt;
	The .EMS CP/M system file can't be found in the system track of your&lt;br /&gt;
	CP/M partition or image file.&lt;br /&gt;
	&lt;br /&gt;
*  ''ERROR: CPMDSK01.IMG IS FRAGMENTED''&lt;br /&gt;
	The first CP/M image file is fragmented, the system won't mount it.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: CPMDSK01.IMG HAS WRONG LENGTH''&lt;br /&gt;
	The first CP/M image file has wrong length, the system won't mount it.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: CPMDSK01.IMG IS NOT FORMATTED''&lt;br /&gt;
	The first CP/M image file is not formatted to CP/M-80 format, the&lt;br /&gt;
	system won't mount it. Use the HDMGR.COM utility to format it.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: INCOMPATIBLE EMS FILE''&lt;br /&gt;
	The .EMS system file that was loaded from the system track is not&lt;br /&gt;
	compatible with HDCPM.&lt;br /&gt;
&lt;br /&gt;
===RTC errors===&lt;br /&gt;
* ''*** Battery depleted ***''&lt;br /&gt;
	The RTC battery is depleted. The RTC driver will continue to operate&lt;br /&gt;
	normally but the readings are not reliable. Replace the RTC battery.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Release info &amp;amp; download==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Version !! Changes !! Download&lt;br /&gt;
|-&lt;br /&gt;
| v1.00 December 2021 || Initial release || [[Media:hdcpm100.dsk|hdcpm100.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.01 January 2022 || HDCPM.ROM, HDMGR.COM: code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: (bug fix) fragmented file detection was not working properly unless the file was CPMDSK01.IMG&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: (bug fix) unformatted image file detection was not working properly. New error message added.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) CP/M drive table wasn't patched properly.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) initialization of floppy drive(s) was corrupted due to misplaced code.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: added .EMS file compatibility check. New error message added.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: added support for Dobbertin RAM disk driver.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: added compatibility with Dobbertin HD20 Harddisc&amp;lt;br /&amp;gt;&lt;br /&gt;
MAKEIMG.EXE: added utility for creating an image file from within SYMBOS.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&lt;br /&gt;
|| [[Media:hdcpm101.dsk|hdcpm101.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.02 March 2022 || HDCPM.ROM, HDMGR.COM: added support for M4 board.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: added support for uIDE-16 interface.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) the ROM was initialized even if no compatible interface was found.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: error message change.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: option &amp;quot;F&amp;quot; has been removed. HDCPM will always do a disk fragmentation test during boot.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: power up message changed in order to provide information about the type of the detected interface.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: two bytes of RAM will be reserved by the ROM for storing the interface type and M4 ROM number.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&lt;br /&gt;
|| [[Media:hdcpm102.dsk|hdcpm102.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.03 April 2022 || HDCPM.ROM, HDMGR.COM: added support for USIfAC II.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) uIDE-16 detection was broken.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&lt;br /&gt;
|| [[Media:hdcpm103.dsk|hdcpm103.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.04 June 2022|| HDCPM.ROM: code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.BIN: added executable binary file version of HDCPM.&lt;br /&gt;
|| [[Media:hdcpm104.dsk|hdcpm104.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.05 July 2022 || HDCPM.ROM, HDCPM.BIN, HDMGR.COM: added support for Symbiface III.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDCPM.BIN:  code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR.COM: Hardware info added for USIfAC II&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR.COM: (bug fix) the 'Select boot file' menu was garbled if there were 8 or more .EMS files present.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&lt;br /&gt;
|| [[Media:hdcpm105.dsk|hdcpm105.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.06 January 2023 || HDCPM.ROM, HDCPM.BIN, HDMGR.COM: added support for Albireo.&amp;lt;br /&amp;gt;&lt;br /&gt;
RTC.COM: added support for M4 Board (r/o) and Symbiface 3.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDCPM.BIN: (bug fix) CPC was freezing after mounting the CP/M disk(s) with incompatible .EMS file.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR.COM: (bug fix) the Stack was overflowed in some rare cases.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&amp;lt;br /&amp;gt;&lt;br /&gt;
|| [[Media:hdcpm106.dsk|hdcpm106.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.10 September 2023 || HDCPM.ROM, HDCPM.BIN: added support for CPC464 with &amp;amp;C3 mode compatible RAM expansion card.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDCPM.BIN: can now boot CP/M Plus on a CPC that has no or faulty Floppy Disc Controller present.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: ROM checksum test and new error message added.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: removed blank line from ROM initialization message.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDCPM.BIN, HDMGR.COM:  code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDCPM.BIN: (bug fix) incorrect patching would corrupt the Dobbertin RAM drive on CP/M Plus v1.1&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) |HDDPB was displaying wrong values&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR.COM: (bug fix) a corruption of the MBR of USB/SD card occured in some rare cases.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&amp;lt;br /&amp;gt;&lt;br /&gt;
|| [[Media:hdcpm110.dsk|hdcpm110.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.11 April 2024 || HDCPM.ROM, HDCPM.BIN: CP/M (virtual) disks are now treated as removable.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDCPM.BIN, HDMGR.COM:  code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDCPM.BIN: (bug fix) uIDE driver was corrupted.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR.COM: (bug fix) CP/M disk image information could skip an image file.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR.COM: More than 8 .EMS files can be displayed and selected.&amp;lt;br /&amp;gt;&lt;br /&gt;
RTC.COM: added support for NOVA, added option to display the RTC interface type.&amp;lt;br /&amp;gt;&lt;br /&gt;
MOUNT.COM: added utility to list and mount CP/M (virtual) disks.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&amp;lt;br /&amp;gt;&lt;br /&gt;
|| [[Media:hdcpm111.dsk|hdcpm111.dsk]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Other downloads==&lt;br /&gt;
*[[Media:CPMDSK01&amp;amp;02.zip|CP/M disk images]] - CPMDSK01.IMG is bootable and contains all the files of the 3 CP/M Plus system disks and year 2000 compliant binaries downloaded from the [http://www.cpm.z80.de/binary.html Digital Research Binary Files]. CPMDSK02.IMG is empty and can also be used as a template.&amp;lt;br /&amp;gt;&lt;br /&gt;
*[[Media:Z3Plus.part1.rar|ZPM3+ZCCP disk image part 1]] , [[Media:Z3Plus.part2.rar|ZPM3+ZCCP disk image part 2]] - The Amstrad BDOS and CCP have been replaced with their counterparts [https://github.com/wwarthen/CPU280/tree/master/ZPM3/zpm3.txt ZPM3] and [https://github.com/wwarthen/CPU280/tree/master/ZCCP/zccp.txt ZCCP] written by Simeon Cran and Randy Winchester respectively. It is [https://www.cpcwiki.eu/index.php/Z-System Z-system, Z3Plus] compatible and contains the Z3Plus system files, all the files of the 3 CP/M Plus system disks, year 2000 compliant binaries and also contains some useful tools, help files and manuals.&amp;lt;br /&amp;gt;&lt;br /&gt;
*[[Media:CPMDSK04.zip|EMS Files]] - CPMDSK04.IMG contains a collection of HDCPM compatible EMS files (see table below) and the latest HDMGR.COM&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! EMS file !! BDOS !! CCP !! BIOS !! Extras !! Description&lt;br /&gt;
|-&lt;br /&gt;
| C10CPM3.EMS || Digital Research || Digital Research || Amstrad v1.0 || - || Original Amstrad CP/M Plus for CPC&lt;br /&gt;
|-&lt;br /&gt;
| C11CPM3.EMS || Digital Research || Digital Research || Amstrad v1.1 || - || Original Amstrad CP/M Plus for CPC&lt;br /&gt;
|-&lt;br /&gt;
| C10ZPM3.EMS || ZPM3 by Simeon Cran  || Digital Research || Amstrad v1.0 || - || The BDOS has been replaced by ZPM3 written in Z80 assembly&lt;br /&gt;
|-&lt;br /&gt;
| C11ZPM3.EMS || ZPM3 by Simeon Cran  || Digital Research || Amstrad v1.1 || - || The BDOS has been replaced by ZPM3 written in Z80 assembly&lt;br /&gt;
|-&lt;br /&gt;
| CPM3SEMI.EMS || Digital Research || Digital Research || Amstrad v1.0 || Dk'tronics RAM drive || Patched with Dk'tronics memory expansion driver&lt;br /&gt;
|-&lt;br /&gt;
| ZPM3SEMI.EMS || ZPM3 by Simeon Cran || Digital Research || Amstrad v1.0 || Dk'tronics RAM drive || Patched with Dk'tronics memory expansion driver and ZPM3&lt;br /&gt;
|-&lt;br /&gt;
| C10ZCPR3.EMS || ZPM3 by Simeon Cran  || ZCCP by Randy Winchester || Amstrad v1.0 || - || The BDOS has been replaced by ZPM3 and the CCP has been replaced by ZCCP, both  written in Z80 assembly. Z-system/Z3Plus compatible. &amp;lt;b&amp;gt;Strartup and default drive must be drive A: (use HDMGR.COM to change). Also several Z-system files must also be present ([https://github.com/wwarthen/CPU280/tree/master/ZCCP/zccp.txt read ZCCP.TXT])&amp;lt;/b&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ZCPR3SEM.EMS || ZPM3 by Simeon Cran  || ZCCP by Randy Winchester || Amstrad v1.0 || Dk'tronics RAM drive || The BDOS has been replaced by ZPM3 and the CCP has been replaced by ZCCP, both  written in Z80 assembly. Z-system/Z3Plus compatible. Patched with Dk'tronics memory expansion driver. &amp;lt;b&amp;gt;Strartup and default drive must be drive A: (use HDMGR.COM to change). Also several Z-system files must also be present ([https://github.com/wwarthen/CPU280/tree/master/ZCCP/zccp.txt read ZCCP.TXT]) &amp;lt;/b&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| D10CPM3.EMS || Digital Research || Digital Research || Amstrad v1.0 || Dobbertin RAM Drive || Patched with Dobbertin memory expansion driver&lt;br /&gt;
|-&lt;br /&gt;
| D11CPM3.EMS || Digital Research || Digital Research || Amstrad v1.1 || Dobbertin RAM Drive || Patched with Dobbertin memory expansion driver&lt;br /&gt;
|-&lt;br /&gt;
| DX10CPM3.EMS || Digital Research || Digital Research || Amstrad v1.0 || Dobbertin RAM Drive, Vortex format drive B: || Patched with Dobbertin memory expansion driver. Supports Vortex formatted, 80 track, double side floppies, in drive B:&lt;br /&gt;
|-&lt;br /&gt;
| DX11CPM3.EMS || Digital Research || Digital Research || Amstrad v1.1 || Dobbertin RAM Drive, Vortex format drive B: || Patched with Dobbertin memory expansion driver. Supports Vortex formatted, 80 track, double side floppies, in drive B:&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Videos==&lt;br /&gt;
* [https://youtu.be/GMWsRzNhQTM How to create and prepare a CP/M image file in a FAT formatted hard disk]&lt;br /&gt;
* [https://youtu.be/nxow6Y5O4Dc Hard disk utilization and dual boot]&lt;br /&gt;
* [https://youtu.be/em7dHOdaylg How to create a CP/M image file under SYMBOS]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
[[category:Expansion ROM]] [[category:Applications]] [[category:CP/M]]&lt;/div&gt;</summary>
		<author><name>D kef</name></author>	</entry>

	<entry>
		<id>https://oldwiki.cpcwiki.eu/index.php?title=HDCPM&amp;diff=115605</id>
		<title>HDCPM</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.cpcwiki.eu/index.php?title=HDCPM&amp;diff=115605"/>
				<updated>2024-04-22T19:35:43Z</updated>
		
		<summary type="html">&lt;p&gt;D kef: /* Release info &amp;amp; download */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
HDCPM is a Hard Disk boot loader for [[CP/M]] Plus, developed by d_kef&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can read more about the development of the application here:&amp;lt;br /&amp;gt;&lt;br /&gt;
https://www.cpcwiki.eu/forum/applications/hdcpm-boot-and-run-cpm-plus-from-hard-disk/&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:hdcpm.gif|HDCPM booting CP/M Plus]]&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It comes in the form of:&lt;br /&gt;
* a standard background ROM that can be installed in any available ROM position.&lt;br /&gt;
* a standard binary file that can be loaded from floppy or hard drive.&lt;br /&gt;
&lt;br /&gt;
 	&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following configurations are possible with one hard disk:&lt;br /&gt;
&lt;br /&gt;
* One not partitioned, CP/M formatted hard disk. The whole hard disk is used by CP/M.&lt;br /&gt;
* One to four CP/M formatted partitions. Every partition is accessed as a separate hard disk by CP/M.&lt;br /&gt;
* 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.&lt;br /&gt;
* 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.&lt;br /&gt;
* For interfaces that use SD card or USB flash drive as a mass storage device ([[M4 Board]], [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II], [http://www.tmtlogic.com/ Symbiface III] or [[Albireo]]) the only supported configuration is one to four CP/M disk image files in the root directory of the FAT file system.&lt;br /&gt;
	&lt;br /&gt;
Currently only the master IDE device can be accessed by HDCPM. The slave device is available to be used by your favourite DOS.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
HDCPM can also utilize the RTC found in the [[SYMBiFACE II]] in order to implement CP/M Plus BIOS function 26: TIME.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
HDCPM is compatible and can be used together with the [[Dobbertin Harddisc]].&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
HDCPM has been developed with [[WinApe]] Z80 Assembler and was tested with [[WinApe]], [[CPCemu]], [http://www.roudoudou.com/ACE-DL/ ACE-DL] an Amstrad Plus 464 upgraded to 6128 an Amstrad CPC 6128 and an Amstrad CPC 464 with [https://www.cpcwiki.eu/index.php/Universal_512K_and_1MByte_RAM_Expansions Universal 512K RAM Expansion].&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
HDCPM distribution disk contains the following files:&lt;br /&gt;
* HDCPM.ROM the ROM itself&lt;br /&gt;
* HDCPM.BIN the executable binary file&lt;br /&gt;
* HDMGR.COM Hard Disk Manager utility&lt;br /&gt;
* MOUNT.COM Hard Disk mount utility&lt;br /&gt;
* RTC.COM RTC synchronization utility&lt;br /&gt;
* MAKEIMG.BAS CP/M image file creation utility&lt;br /&gt;
* MAKEIMG.BIN CP/M image file creation binary&lt;br /&gt;
* MAKEIMG.EXE CP/M image file creation utility for [[SymbOS]]&lt;br /&gt;
* HDCPM.DOC the User guide&lt;br /&gt;
&lt;br /&gt;
HDCPM is free software. It can be used and distributed with no restrictions.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Prerequisites==&lt;br /&gt;
* Amstrad CPC/Plus computer capable of running CP/M Plus.&lt;br /&gt;
* ROM box or other ROM expansion hardware if using the ROM.&lt;br /&gt;
* Optionaly a FAT aware DOS like M4 ROM, USIfAC ROM, [[UniDOS]], [https://www.cpcwiki.eu/forum/applications/cubeios-fat16fat32-rom-for-the-cpc's-with-xmass/ CubeMDOS] etc if using the binary.&lt;br /&gt;
* One of the following mass storage interfaces:&lt;br /&gt;
** [[SYMBiFACE II]]&lt;br /&gt;
** [[X-Mass]]&lt;br /&gt;
** [https://github.com/salafek/cyboard-for-cpc Cyboard]&lt;br /&gt;
** [[uIDE 16]] (base address = &amp;amp;FEF0)&lt;br /&gt;
** [[M4 Board]]&lt;br /&gt;
** [[USIFAC]] II/[[ULIfAC]]&lt;br /&gt;
** [http://www.tmtlogic.com/ Symbiface III]&lt;br /&gt;
** [[Albireo]] (SD card only)&lt;br /&gt;
* Compatible storage device with enough free space to accommodate the desirable CP/M hard disk configuration.&lt;br /&gt;
* Floppy disk drive for initialization of the file system.&lt;br /&gt;
* CP/M Plus system disks for making the system bootable.&lt;br /&gt;
* Optionally a [[SYMBiFACE II]] compatible RTC.&lt;br /&gt;
&lt;br /&gt;
==Restrictions==&lt;br /&gt;
* CP/M 2.2 or lower is not supported.&lt;br /&gt;
* 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.&lt;br /&gt;
* Only the master IDE device is accessible by HDCPM.&lt;br /&gt;
* The maximum number of hard disk partition/images supported is four.&lt;br /&gt;
* Only primary partitions are supported.&lt;br /&gt;
* If you want to use CP/M disk images then they must be stored in a FAT16 or FAT32 formatted disk or partition.&lt;br /&gt;
* If the hard disk is partitioned then the CP/M disk images must be placed in the first partition of the disk.&lt;br /&gt;
* The CP/M disk images must be placed in the root directory of the FAT file system.&lt;br /&gt;
* The CP/M disk images must NOT be fragmented and must have the correct size.&lt;br /&gt;
* 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. &lt;br /&gt;
* Only storage devices with 512 bytes sector size are supported.&lt;br /&gt;
* Only storage devices with LBA addressing are supported.&lt;br /&gt;
* Date stamps of CP/M disk image files are not maintained.&lt;br /&gt;
* 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 letters for your IDE media then the corresponding HD20 partitions will be unavailable under CP/M.&lt;br /&gt;
&lt;br /&gt;
==How it works==&lt;br /&gt;
===Using the ROM===&lt;br /&gt;
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:&lt;br /&gt;
|HDCPM (no TIME function support) or |HDCPMT (TIME function support)&amp;lt;br /&amp;gt;&lt;br /&gt;
Alternatively it can be started by holding down the Tab key (no TIME function support) or Shift+Tab (TIME function support), during power-up.&amp;lt;br /&amp;gt;&lt;br /&gt;
===Using the binary===&lt;br /&gt;
HDCPM can be started by running the HDCPM.BIN file from floppy drive or mass storage.&amp;lt;br /&amp;gt;&lt;br /&gt;
===Functions===&lt;br /&gt;
HDCPM will then execute the following functions:&amp;lt;br /&amp;gt;&lt;br /&gt;
* Search for a compatible mass storage interface.&lt;br /&gt;
* Initialize the mass storage interface if needed.&lt;br /&gt;
* Move the boot loader and the CP/M patcher to RAM.&lt;br /&gt;
* Mount 1 to 4 CP/M image files and/or partitions and perform fragmentation and size test.&lt;br /&gt;
* 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.&lt;br /&gt;
* Read the .EMS file from the reserved track and store it in RAM just as the normal CP/M Plus boot loader does.&lt;br /&gt;
* 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 were a normal RSX.&lt;br /&gt;
* Patch the floppy disk drive routines in case a FDC's not been found.&lt;br /&gt;
* Patch the SCB in order to change the startup/default drive.&lt;br /&gt;
* 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 memory expansion]] or [[Dobbertin Memory Expansion]] driver is present.&lt;br /&gt;
* Move the ALV of the Dk'tronics RAM disk if [[Z-System]] has been detected.&lt;br /&gt;
* Patch the CP/M console with the desired colour scheme. &lt;br /&gt;
* Patch the system message.&lt;br /&gt;
* Do a normal CP/M cold start.&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==CP/M Plus disk image files==&lt;br /&gt;
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 [https://hexed.it/ hexed.it] or any hex editor capable of creating binary files filled with a specific pattern.&amp;lt;br /&amp;gt;&lt;br /&gt;
In case of hexed.it select 'New file' fill in 'Size of the new file = 8519680' and 'Fill Pattern = 0xE5' and press apply. Save the file as CPMDSK01.IMG&amp;lt;br /&amp;gt;&lt;br /&gt;
If you have a FAT capable DOS installed in your AMSTRAD you can use the provided MAKEIMG.BAS utility to create your image file. Keep in mind that it takes more than 1.5 hour for a 8MB image file to be created that way.&amp;lt;br /&amp;gt;&lt;br /&gt;
CP/M disk image files can be accessed by a modern computer with [http://www.moria.de/~michael/cpmtools/ cpmtools]. Use the command |HDDEF to see the record you must insert in the diskdefs file.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The HDCPM record for diskdefs is:&lt;br /&gt;
&lt;br /&gt;
       diskdef hdcpm&lt;br /&gt;
          seclen 512&lt;br /&gt;
          tracks 65&lt;br /&gt;
          sectrk 256&lt;br /&gt;
          blocksize 8192&lt;br /&gt;
          maxdir 1024&lt;br /&gt;
          skew 0&lt;br /&gt;
          boottrk 1&lt;br /&gt;
          os 3&lt;br /&gt;
       end&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
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 were 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.&amp;lt;br /&amp;gt;&lt;br /&gt;
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. [https://www.cpcwiki.eu/index.php/Albireo Albireo] incorporates a file management IC that performs FAT file system operations and handles fragmented files properly. In such case fragmented image files is not a problem. HDCPM will never fragment a CP/M image file.&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Hdcpm-boot-m4.png|thumb|HDCPM binary booting on M4 Board]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==CP/M Plus disk/partitions==&lt;br /&gt;
You can also create one or more partitions in order to format them to [http://www.seasip.info/Cpm/format31.html CP/M-80] 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.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM examines the hard disk's MBR upon start and finds the partition information. Then it finds the LBA of the first sector of each partition and passes it to the CP/M hard disk driver. The CP/M hard disk driver doesn't know anything about partitions. It accesses the partition as if it were a real hard disk.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:hdcpm-ui-boot.png|thumb|HDCPM ROM booting on uIDE-16]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
===Using the ROM===&lt;br /&gt;
* Install the HDCPM ROM in a free ROM slot of your ROM box.&lt;br /&gt;
* Plug in your mass storage interface and attach the proper mass storage device.&lt;br /&gt;
* 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 shown inside the parentheses:&amp;lt;br /&amp;gt;&lt;br /&gt;
** (S2): [[SYMBiFACE II]] compatible interface&lt;br /&gt;
** (uI): [[uIDE 16]] interface&lt;br /&gt;
** (M4): [[M4 Board]]&lt;br /&gt;
** (US): [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II]&lt;br /&gt;
** (S3): [http://www.tmtlogic.com/ Symbiface III]&lt;br /&gt;
** (AL): [[Albireo]]&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:hdcpm-s2.png|thumb|HDCPM ROM - SYMBiFACE II]]&lt;br /&gt;
|[[File:hdcpm-ui.png|thumb|HDCPM ROM - uIDE-16]]&lt;br /&gt;
|[[File:hdcpm-m4.png|thumb|HDCPM ROM - M4 Board]]&lt;br /&gt;
|}&lt;br /&gt;
{|&lt;br /&gt;
|[[File:hdcpm-us.png|thumb|HDCPM ROM - USIfAC II]]&lt;br /&gt;
|[[File:hdcpm-s3.png|thumb|HDCPM ROM - Symbiface III]]&lt;br /&gt;
|[[File:hdcpm-al.png|thumb|HDCPM ROM - Albireo]]&lt;br /&gt;
|}&lt;br /&gt;
In case a RTC is detected you will also see the RTC initialization message and the current date and time: ''RTC found: 2021/01/01 12:01:01''&lt;br /&gt;
* Use your original CP/M Plus system disk set to Boot CP/M Plus.&lt;br /&gt;
* 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.&lt;br /&gt;
* Reset your AMSTRAD and boot CP/M from the hard disk with the command |HDCPM. The Boot loader will check your image file(s) against fragmentation and correct size and boot the system to the CP/M command prompt. If the first image file is fragmented or has the wrong length the system will not boot. All other image files will be ignored if found to be fragmented or have the wrong length.&lt;br /&gt;
* In case you don't use CP/M image files just boot the system with |HDCPM or |HDCPMT&lt;br /&gt;
* Copy the files from your CP/M system floppy disks to the first hard disk.&lt;br /&gt;
* Copy any other needed application etc. to your CP/M hard disk(s).&lt;br /&gt;
* You are ready to go.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Using the binary===&lt;br /&gt;
* Plug in your mass storage interface and attach the proper mass storage device.&lt;br /&gt;
* Use your original CP/M Plus system disk set to Boot CP/M Plus.&lt;br /&gt;
* 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.&lt;br /&gt;
* 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.&lt;br /&gt;
* You are ready to go.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==ROM commands==&lt;br /&gt;
[[File:hdcpm-us-boot.png|thumb|HDCPM ROM booting on USIfAC II]]&lt;br /&gt;
* |HDCPM mounts the hard disks and boots CP/M Plus. If [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] is used enable the USB disk with the |USB command first.&lt;br /&gt;
* |HDCPMT works like |HDCPM but also utilizes the RTC.&lt;br /&gt;
* |HDDPB shows the Disk Parameter Block.&lt;br /&gt;
* |HDDEF shows the diskdefs entry for CP/M tools and the file system size.&lt;br /&gt;
* |DATE displays the current date.&lt;br /&gt;
* |TIME displays the current time. If [[M4 Board]] is used |DATE and |TIME will be redirected to M4 |TIME.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==The HDCPM binary file==&lt;br /&gt;
* If [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] is used, use your PC to copy HDCPM.BIN to your USB flash disk. Then insert it to your [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] power up your Amstrad and enable the USB disk with the |USB command.&lt;br /&gt;
* Execute the file from the floppy disk or from your mass storage device with ''RUN&amp;quot;HDCPM&amp;quot;''. 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.&lt;br /&gt;
*  [[M4 Board]] and [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ 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 [https://www.cpcwiki.eu/forum/applications/cubeios-fat16fat32-rom-for-the-cpc's-with-xmass/ CubeMDOS] or [[UniDOS]], installed.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==The MAKEIMG.BAS and MAKEIMG.EXE utilities==&lt;br /&gt;
===MAKEIMG.BAS===&lt;br /&gt;
Although this utility should not be your first option, you can use it to make a new empty CP/M disk image file.&amp;lt;br /&amp;gt;&lt;br /&gt;
In case you decide to use it make sure you have a FAT aware DOS installed in your system. MAKEIMG makes use of the firmware calls CAS_OUT_OPEN, CAS_OUT_CLOSE and CAS_OUT_CHAR so your DOS must support them.&amp;lt;br /&amp;gt;&lt;br /&gt;
Copy the files MAKEIMG.BAS and MAKEIMG.BIN to the root directory of your FAT formatted hard disk and make it your current drive. Run the utility with ''RUN&amp;quot;MAKEIMG&amp;quot;'' and don't hold your breath!&amp;lt;br /&amp;gt;&lt;br /&gt;
Making an image file this way takes more than 1.5 hour for an 8MB file so literally... don't hold your breath.&amp;lt;br /&amp;gt;&lt;br /&gt;
Here is a small tutorial on how to setup and use a CP/M image file: https://youtu.be/GMWsRzNhQTM&amp;lt;br /&amp;gt;&lt;br /&gt;
===MAKEIMG.EXE===&lt;br /&gt;
This utility is a [[SymbOS]] application.&amp;lt;br /&amp;gt;&lt;br /&gt;
Use this utility to create your CP/M hard disk images from within [[SymbOS]]. 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.&amp;lt;br /&amp;gt;&lt;br /&gt;
MAKEIMG.EXE has been developed with [http://www.symbos.de/quigs.htm Quigs] for [[SymbOS]].&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Hdcpm-makeimg-sym1.png|thumb|MAKEIMG.EXE in action]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==The HDMGR.COM utility==&lt;br /&gt;
This is the Hard Disk Manager utility.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can use this utility to get information about your hard disk geometry, disk image files, partitions and boot sector. You have to use this utility to format a hard disk, disk image file or partition to CP/M format or manipulate the boot sector of the hard disk and/or transfer an .EMS system file to the reserved track of the hard disk.&amp;lt;br /&amp;gt;&lt;br /&gt;
The boot sector contains information about the CP/M disk drive letters, start-up drive and console colour scheme. All those properties can be changed with HDMGR.COM.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR will perform a fragmentation test of the discovered CP/M hard disk image files uppon execution (not for Albireo).&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
The HDMGR.COM utility is self explanatory. Just run it from the CP/M command prompt.&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Hdcpm-hdmgr-m.png|thumb|HDMGR main menu]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-1.png|thumb|HDMGR Hardware information]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-2.png|thumb|HDMGR Partition information]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-3.png|thumb|HDMGR CP/M disk image information]]&lt;br /&gt;
|}&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Hdcpm-hdmgr-4.png|thumb|HDMGR Boot sector information]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-5.png|thumb|HDMGR Log disk]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-7.png|thumb|HDMGR Manage boot sector]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-8.png|thumb|HDMGR Transfer CP/M to disk]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==The RTC.COM utility==&lt;br /&gt;
You can make use of the RTC.COM utility in order to keep CP/M date and time updated.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can synchronize the date and time of CP/M Plus with the RTC by running ''RTC -G'' manually or via your PROFILE.SUB.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can also set your RTC to the current CP/M date and time by running ''RTC -S'' (not for M4 board)&amp;lt;br /&amp;gt;&lt;br /&gt;
You can see the detected RTC interface type by running ''RTC -I''&amp;lt;br /&amp;gt;&lt;br /&gt;
Currently RTC.COM works with the RTC found in Symbiface II, Symbiface III, M4 board (read only) and [[Nova]].&amp;lt;br /&amp;gt;&lt;br /&gt;
DATE.COM, DIR.COM and SHOW.COM commands, patched for Year 2000 compatibility can be downloaded from the [http://www.cpm.z80.de/binary.html CP/M source archive - Digital Research Binary files section] .&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==The MOUNT.COM utility==&lt;br /&gt;
You can use the MOUNT.COM utility in order to list the mounted CP/M disks, list the available CP/M disks in your mass storage medium and mount a new disk in one of the four available mount points.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can get a list of the already mounted CP/M disks by running ''MOUNT'' without any parameters.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can get a list of the available CP/M disk images or partitions by running ''MOUNT -L''&amp;lt;br /&amp;gt;&lt;br /&gt;
You can mount one of the available CP/M disk images or partitions by running ''MOUNT &amp;lt;mount point&amp;gt;,&amp;lt;hard disk&amp;gt;'' where &amp;lt;mount point&amp;gt; is a number from 1 to 4 indicating the HDCPM disk number and &amp;lt;hard disk&amp;gt; is a two digit number from 00 to 99 for CPMDSK00.IMG to CPMDSK99.IMG respectively, or P1 to P4 for partition 1 to partition 4 respectively.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Error messages==&lt;br /&gt;
===ROM checksum error===&lt;br /&gt;
* ''*** HDCPM ROM checksum error ***&lt;br /&gt;
	The ROM has failed the checksum test.&lt;br /&gt;
	The contents are probably corrupted. The ROM will not be initialized.&lt;br /&gt;
&lt;br /&gt;
===Hard disk errors===&lt;br /&gt;
* ''*** No mass storage found ***''&lt;br /&gt;
	No compatible mass storage interface can be found.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: DISK I/O''&lt;br /&gt;
	I/O error occurred during the last read/write operation.&lt;br /&gt;
	Your hard disk might be defect or the USB disk is not enabled.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: INVALID BOOT SECTOR''&lt;br /&gt;
	No FAT or CP/M boot sector was found in a not partitioned hard disk.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: INVALID FILE SYSTEM''&lt;br /&gt;
	The first partition in a partitioned hard disk is not a FAT or CP/M-80&lt;br /&gt;
	one.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: INVALID SECTOR SIZE''&lt;br /&gt;
	The hard disk used has a sector size not equal to 512 bytes.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: CPMDSK01.IMG NOT FOUND''&lt;br /&gt;
	The CP/M image file named CPMDSK01.IMG can't be found in the FAT&lt;br /&gt;
	formatted hard disk or partition. &lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: CP/M SYSTEM FILE NOT FOUND''&lt;br /&gt;
	The .EMS CP/M system file can't be found in the system track of your&lt;br /&gt;
	CP/M partition or image file.&lt;br /&gt;
	&lt;br /&gt;
*  ''ERROR: CPMDSK01.IMG IS FRAGMENTED''&lt;br /&gt;
	The first CP/M image file is fragmented, the system won't mount it.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: CPMDSK01.IMG HAS WRONG LENGTH''&lt;br /&gt;
	The first CP/M image file has wrong length, the system won't mount it.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: CPMDSK01.IMG IS NOT FORMATTED''&lt;br /&gt;
	The first CP/M image file is not formatted to CP/M-80 format, the&lt;br /&gt;
	system won't mount it. Use the HDMGR.COM utility to format it.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: INCOMPATIBLE EMS FILE''&lt;br /&gt;
	The .EMS system file that was loaded from the system track is not&lt;br /&gt;
	compatible with HDCPM.&lt;br /&gt;
&lt;br /&gt;
===RTC errors===&lt;br /&gt;
* ''*** Battery depleted ***''&lt;br /&gt;
	The RTC battery is depleted. The RTC driver will continue to operate&lt;br /&gt;
	normally but the readings are not reliable. Replace the RTC battery.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Release info &amp;amp; download==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Version !! Changes !! Download&lt;br /&gt;
|-&lt;br /&gt;
| v1.00 December 2021 || Initial release || [[Media:hdcpm100.dsk|hdcpm100.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.01 January 2022 || HDCPM.ROM, HDMGR.COM: code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: (bug fix) fragmented file detection was not working properly unless the file was CPMDSK01.IMG&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: (bug fix) unformatted image file detection was not working properly. New error message added.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) CP/M drive table wasn't patched properly.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) initialization of floppy drive(s) was corrupted due to misplaced code.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: added .EMS file compatibility check. New error message added.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: added support for Dobbertin RAM disk driver.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: added compatibility with Dobbertin HD20 Harddisc&amp;lt;br /&amp;gt;&lt;br /&gt;
MAKEIMG.EXE: added utility for creating an image file from within SYMBOS.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&lt;br /&gt;
|| [[Media:hdcpm101.dsk|hdcpm101.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.02 March 2022 || HDCPM.ROM, HDMGR.COM: added support for M4 board.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: added support for uIDE-16 interface.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) the ROM was initialized even if no compatible interface was found.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: error message change.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: option &amp;quot;F&amp;quot; has been removed. HDCPM will always do a disk fragmentation test during boot.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: power up message changed in order to provide information about the type of the detected interface.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: two bytes of RAM will be reserved by the ROM for storing the interface type and M4 ROM number.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&lt;br /&gt;
|| [[Media:hdcpm102.dsk|hdcpm102.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.03 April 2022 || HDCPM.ROM, HDMGR.COM: added support for USIfAC II.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) uIDE-16 detection was broken.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&lt;br /&gt;
|| [[Media:hdcpm103.dsk|hdcpm103.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.04 June 2022|| HDCPM.ROM: code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.BIN: added executable binary file version of HDCPM.&lt;br /&gt;
|| [[Media:hdcpm104.dsk|hdcpm104.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.05 July 2022 || HDCPM.ROM, HDCPM.BIN, HDMGR.COM: added support for Symbiface III.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDCPM.BIN:  code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR.COM: Hardware info added for USIfAC II&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR.COM: (bug fix) the 'Select boot file' menu was garbled if there were 8 or more .EMS files present.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&lt;br /&gt;
|| [[Media:hdcpm105.dsk|hdcpm105.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.06 January 2023 || HDCPM.ROM, HDCPM.BIN, HDMGR.COM: added support for Albireo.&amp;lt;br /&amp;gt;&lt;br /&gt;
RTC.COM: added support for M4 Board (r/o) and Symbiface 3.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDCPM.BIN: (bug fix) CPC was freezing after mounting the CP/M disk(s) with incompatible .EMS file.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR.COM: (bug fix) the Stack was overflowed in some rare cases.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&amp;lt;br /&amp;gt;&lt;br /&gt;
|| [[Media:hdcpm106.dsk|hdcpm106.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.10 September 2023 || HDCPM.ROM, HDCPM.BIN: added support for CPC464 with &amp;amp;C3 mode compatible RAM expansion card.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDCPM.BIN: can now boot CP/M Plus on a CPC that has no or faulty Floppy Disc Controller present.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: ROM checksum test and new error message added.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: removed blank line from ROM initialization message.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDCPM.BIN, HDMGR.COM:  code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDCPM.BIN: (bug fix) incorrect patching would corrupt the Dobbertin RAM drive on CP/M Plus v1.1&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) |HDDPB was displaying wrong values&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR.COM: (bug fix) a corruption of the MBR of USB/SD card occured in some rare cases.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&amp;lt;br /&amp;gt;&lt;br /&gt;
|| [[Media:hdcpm110.dsk|hdcpm110.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.11 April 2024 || HDCPM.ROM, HDCPM.BIN: CP/M (virtual) disks are now treated as removable.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDCPM.BIN, HDMGR.COM:  code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDCPM.BIN: (bug fix) uIDE driver was corrupted.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR.COM: (bug fix) CP/M disk image information could skip an image file.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR.COM: More than 8 .EMS files can be displayed and selected.&amp;lt;br /&amp;gt;&lt;br /&gt;
RTC.COM: added support for NOVA, added option to display the RTC interface type.&amp;lt;br /&amp;gt;&lt;br /&gt;
MOUNT.COM: added utility to list and mount CP/M (virtual) disks.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&amp;lt;br /&amp;gt;&lt;br /&gt;
|| [[Media:hdcpm111.dsk|hdcpm111.dsk]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Other downloads==&lt;br /&gt;
*[[Media:CPMDSK01&amp;amp;02.zip|CP/M disk images]] - CPMDSK01.IMG is bootable and contains all the files of the 3 CP/M Plus system disks and year 2000 compliant binaries downloaded from the [http://www.cpm.z80.de/binary.html Digital Research Binary Files]. CPMDSK02.IMG is empty and can also be used as a template.&amp;lt;br /&amp;gt;&lt;br /&gt;
*[[Media:Z3Plus.part1.rar|ZPM3+ZCCP disk image part 1]] , [[Media:Z3Plus.part2.rar|ZPM3+ZCCP disk image part 2]] - The Amstrad BDOS and CCP have been replaced with their counterparts [https://github.com/wwarthen/CPU280/tree/master/ZPM3/zpm3.txt ZPM3] and [https://github.com/wwarthen/CPU280/tree/master/ZCCP/zccp.txt ZCCP] written by Simeon Cran and Randy Winchester respectively. It is [https://www.cpcwiki.eu/index.php/Z-System Z-system, Z3Plus] compatible and contains the Z3Plus system files, all the files of the 3 CP/M Plus system disks, year 2000 compliant binaries and also contains some useful tools, help files and manuals.&amp;lt;br /&amp;gt;&lt;br /&gt;
*[[Media:CPMDSK04.zip|EMS Files]] - CPMDSK04.IMG contains a collection of HDCPM compatible EMS files (see table below) and the latest HDMGR.COM&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! EMS file !! BDOS !! CCP !! BIOS !! Extras !! Description&lt;br /&gt;
|-&lt;br /&gt;
| C10CPM3.EMS || Digital Research || Digital Research || Amstrad v1.0 || - || Original Amstrad CP/M Plus for CPC&lt;br /&gt;
|-&lt;br /&gt;
| C11CPM3.EMS || Digital Research || Digital Research || Amstrad v1.1 || - || Original Amstrad CP/M Plus for CPC&lt;br /&gt;
|-&lt;br /&gt;
| C10ZPM3.EMS || ZPM3 by Simeon Cran  || Digital Research || Amstrad v1.0 || - || The BDOS has been replaced by ZPM3 written in Z80 assembly&lt;br /&gt;
|-&lt;br /&gt;
| C11ZPM3.EMS || ZPM3 by Simeon Cran  || Digital Research || Amstrad v1.1 || - || The BDOS has been replaced by ZPM3 written in Z80 assembly&lt;br /&gt;
|-&lt;br /&gt;
| CPM3SEMI.EMS || Digital Research || Digital Research || Amstrad v1.0 || Dk'tronics RAM drive || Patched with Dk'tronics memory expansion driver&lt;br /&gt;
|-&lt;br /&gt;
| ZPM3SEMI.EMS || ZPM3 by Simeon Cran || Digital Research || Amstrad v1.0 || Dk'tronics RAM drive || Patched with Dk'tronics memory expansion driver and ZPM3&lt;br /&gt;
|-&lt;br /&gt;
| C10ZCPR3.EMS || ZPM3 by Simeon Cran  || ZCCP by Randy Winchester || Amstrad v1.0 || - || The BDOS has been replaced by ZPM3 and the CCP has been replaced by ZCCP, both  written in Z80 assembly. Z-system/Z3Plus compatible. &amp;lt;b&amp;gt;Strartup and default drive must be drive A: (use HDMGR.COM to change) &amp;lt;/b&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ZCPR3SEM.EMS || ZPM3 by Simeon Cran  || ZCCP by Randy Winchester || Amstrad v1.0 || Dk'tronics RAM drive || The BDOS has been replaced by ZPM3 and the CCP has been replaced by ZCCP, both  written in Z80 assembly. Z-system/Z3Plus compatible. Patched with Dk'tronics memory expansion driver. &amp;lt;b&amp;gt;Strartup and default drive must be drive A: (use HDMGR.COM to change)&amp;lt;/b&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| D10CPM3.EMS || Digital Research || Digital Research || Amstrad v1.0 || Dobbertin RAM Drive || Patched with Dobbertin memory expansion driver&lt;br /&gt;
|-&lt;br /&gt;
| D11CPM3.EMS || Digital Research || Digital Research || Amstrad v1.1 || Dobbertin RAM Drive || Patched with Dobbertin memory expansion driver&lt;br /&gt;
|-&lt;br /&gt;
| DX10CPM3.EMS || Digital Research || Digital Research || Amstrad v1.0 || Dobbertin RAM Drive, Vortex format drive B: || Patched with Dobbertin memory expansion driver. Supports Vortex formatted, 80 track, double side floppies, in drive B:&lt;br /&gt;
|-&lt;br /&gt;
| DX11CPM3.EMS || Digital Research || Digital Research || Amstrad v1.1 || Dobbertin RAM Drive, Vortex format drive B: || Patched with Dobbertin memory expansion driver. Supports Vortex formatted, 80 track, double side floppies, in drive B:&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Videos==&lt;br /&gt;
* [https://youtu.be/GMWsRzNhQTM How to create and prepare a CP/M image file in a FAT formatted hard disk]&lt;br /&gt;
* [https://youtu.be/nxow6Y5O4Dc Hard disk utilization and dual boot]&lt;br /&gt;
* [https://youtu.be/em7dHOdaylg How to create a CP/M image file under SYMBOS]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
[[category:Expansion ROM]] [[category:Applications]] [[category:CP/M]]&lt;/div&gt;</summary>
		<author><name>D kef</name></author>	</entry>

	<entry>
		<id>https://oldwiki.cpcwiki.eu/index.php?title=HDCPM&amp;diff=115603</id>
		<title>HDCPM</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.cpcwiki.eu/index.php?title=HDCPM&amp;diff=115603"/>
				<updated>2024-04-22T18:56:36Z</updated>
		
		<summary type="html">&lt;p&gt;D kef: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
HDCPM is a Hard Disk boot loader for [[CP/M]] Plus, developed by d_kef&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can read more about the development of the application here:&amp;lt;br /&amp;gt;&lt;br /&gt;
https://www.cpcwiki.eu/forum/applications/hdcpm-boot-and-run-cpm-plus-from-hard-disk/&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:hdcpm.gif|HDCPM booting CP/M Plus]]&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It comes in the form of:&lt;br /&gt;
* a standard background ROM that can be installed in any available ROM position.&lt;br /&gt;
* a standard binary file that can be loaded from floppy or hard drive.&lt;br /&gt;
&lt;br /&gt;
 	&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following configurations are possible with one hard disk:&lt;br /&gt;
&lt;br /&gt;
* One not partitioned, CP/M formatted hard disk. The whole hard disk is used by CP/M.&lt;br /&gt;
* One to four CP/M formatted partitions. Every partition is accessed as a separate hard disk by CP/M.&lt;br /&gt;
* 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.&lt;br /&gt;
* 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.&lt;br /&gt;
* For interfaces that use SD card or USB flash drive as a mass storage device ([[M4 Board]], [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II], [http://www.tmtlogic.com/ Symbiface III] or [[Albireo]]) the only supported configuration is one to four CP/M disk image files in the root directory of the FAT file system.&lt;br /&gt;
	&lt;br /&gt;
Currently only the master IDE device can be accessed by HDCPM. The slave device is available to be used by your favourite DOS.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
HDCPM can also utilize the RTC found in the [[SYMBiFACE II]] in order to implement CP/M Plus BIOS function 26: TIME.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
HDCPM is compatible and can be used together with the [[Dobbertin Harddisc]].&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
HDCPM has been developed with [[WinApe]] Z80 Assembler and was tested with [[WinApe]], [[CPCemu]], [http://www.roudoudou.com/ACE-DL/ ACE-DL] an Amstrad Plus 464 upgraded to 6128 an Amstrad CPC 6128 and an Amstrad CPC 464 with [https://www.cpcwiki.eu/index.php/Universal_512K_and_1MByte_RAM_Expansions Universal 512K RAM Expansion].&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
HDCPM distribution disk contains the following files:&lt;br /&gt;
* HDCPM.ROM the ROM itself&lt;br /&gt;
* HDCPM.BIN the executable binary file&lt;br /&gt;
* HDMGR.COM Hard Disk Manager utility&lt;br /&gt;
* MOUNT.COM Hard Disk mount utility&lt;br /&gt;
* RTC.COM RTC synchronization utility&lt;br /&gt;
* MAKEIMG.BAS CP/M image file creation utility&lt;br /&gt;
* MAKEIMG.BIN CP/M image file creation binary&lt;br /&gt;
* MAKEIMG.EXE CP/M image file creation utility for [[SymbOS]]&lt;br /&gt;
* HDCPM.DOC the User guide&lt;br /&gt;
&lt;br /&gt;
HDCPM is free software. It can be used and distributed with no restrictions.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Prerequisites==&lt;br /&gt;
* Amstrad CPC/Plus computer capable of running CP/M Plus.&lt;br /&gt;
* ROM box or other ROM expansion hardware if using the ROM.&lt;br /&gt;
* Optionaly a FAT aware DOS like M4 ROM, USIfAC ROM, [[UniDOS]], [https://www.cpcwiki.eu/forum/applications/cubeios-fat16fat32-rom-for-the-cpc's-with-xmass/ CubeMDOS] etc if using the binary.&lt;br /&gt;
* One of the following mass storage interfaces:&lt;br /&gt;
** [[SYMBiFACE II]]&lt;br /&gt;
** [[X-Mass]]&lt;br /&gt;
** [https://github.com/salafek/cyboard-for-cpc Cyboard]&lt;br /&gt;
** [[uIDE 16]] (base address = &amp;amp;FEF0)&lt;br /&gt;
** [[M4 Board]]&lt;br /&gt;
** [[USIFAC]] II/[[ULIfAC]]&lt;br /&gt;
** [http://www.tmtlogic.com/ Symbiface III]&lt;br /&gt;
** [[Albireo]] (SD card only)&lt;br /&gt;
* Compatible storage device with enough free space to accommodate the desirable CP/M hard disk configuration.&lt;br /&gt;
* Floppy disk drive for initialization of the file system.&lt;br /&gt;
* CP/M Plus system disks for making the system bootable.&lt;br /&gt;
* Optionally a [[SYMBiFACE II]] compatible RTC.&lt;br /&gt;
&lt;br /&gt;
==Restrictions==&lt;br /&gt;
* CP/M 2.2 or lower is not supported.&lt;br /&gt;
* 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.&lt;br /&gt;
* Only the master IDE device is accessible by HDCPM.&lt;br /&gt;
* The maximum number of hard disk partition/images supported is four.&lt;br /&gt;
* Only primary partitions are supported.&lt;br /&gt;
* If you want to use CP/M disk images then they must be stored in a FAT16 or FAT32 formatted disk or partition.&lt;br /&gt;
* If the hard disk is partitioned then the CP/M disk images must be placed in the first partition of the disk.&lt;br /&gt;
* The CP/M disk images must be placed in the root directory of the FAT file system.&lt;br /&gt;
* The CP/M disk images must NOT be fragmented and must have the correct size.&lt;br /&gt;
* 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. &lt;br /&gt;
* Only storage devices with 512 bytes sector size are supported.&lt;br /&gt;
* Only storage devices with LBA addressing are supported.&lt;br /&gt;
* Date stamps of CP/M disk image files are not maintained.&lt;br /&gt;
* 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 letters for your IDE media then the corresponding HD20 partitions will be unavailable under CP/M.&lt;br /&gt;
&lt;br /&gt;
==How it works==&lt;br /&gt;
===Using the ROM===&lt;br /&gt;
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:&lt;br /&gt;
|HDCPM (no TIME function support) or |HDCPMT (TIME function support)&amp;lt;br /&amp;gt;&lt;br /&gt;
Alternatively it can be started by holding down the Tab key (no TIME function support) or Shift+Tab (TIME function support), during power-up.&amp;lt;br /&amp;gt;&lt;br /&gt;
===Using the binary===&lt;br /&gt;
HDCPM can be started by running the HDCPM.BIN file from floppy drive or mass storage.&amp;lt;br /&amp;gt;&lt;br /&gt;
===Functions===&lt;br /&gt;
HDCPM will then execute the following functions:&amp;lt;br /&amp;gt;&lt;br /&gt;
* Search for a compatible mass storage interface.&lt;br /&gt;
* Initialize the mass storage interface if needed.&lt;br /&gt;
* Move the boot loader and the CP/M patcher to RAM.&lt;br /&gt;
* Mount 1 to 4 CP/M image files and/or partitions and perform fragmentation and size test.&lt;br /&gt;
* 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.&lt;br /&gt;
* Read the .EMS file from the reserved track and store it in RAM just as the normal CP/M Plus boot loader does.&lt;br /&gt;
* 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 were a normal RSX.&lt;br /&gt;
* Patch the floppy disk drive routines in case a FDC's not been found.&lt;br /&gt;
* Patch the SCB in order to change the startup/default drive.&lt;br /&gt;
* 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 memory expansion]] or [[Dobbertin Memory Expansion]] driver is present.&lt;br /&gt;
* Move the ALV of the Dk'tronics RAM disk if [[Z-System]] has been detected.&lt;br /&gt;
* Patch the CP/M console with the desired colour scheme. &lt;br /&gt;
* Patch the system message.&lt;br /&gt;
* Do a normal CP/M cold start.&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==CP/M Plus disk image files==&lt;br /&gt;
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 [https://hexed.it/ hexed.it] or any hex editor capable of creating binary files filled with a specific pattern.&amp;lt;br /&amp;gt;&lt;br /&gt;
In case of hexed.it select 'New file' fill in 'Size of the new file = 8519680' and 'Fill Pattern = 0xE5' and press apply. Save the file as CPMDSK01.IMG&amp;lt;br /&amp;gt;&lt;br /&gt;
If you have a FAT capable DOS installed in your AMSTRAD you can use the provided MAKEIMG.BAS utility to create your image file. Keep in mind that it takes more than 1.5 hour for a 8MB image file to be created that way.&amp;lt;br /&amp;gt;&lt;br /&gt;
CP/M disk image files can be accessed by a modern computer with [http://www.moria.de/~michael/cpmtools/ cpmtools]. Use the command |HDDEF to see the record you must insert in the diskdefs file.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The HDCPM record for diskdefs is:&lt;br /&gt;
&lt;br /&gt;
       diskdef hdcpm&lt;br /&gt;
          seclen 512&lt;br /&gt;
          tracks 65&lt;br /&gt;
          sectrk 256&lt;br /&gt;
          blocksize 8192&lt;br /&gt;
          maxdir 1024&lt;br /&gt;
          skew 0&lt;br /&gt;
          boottrk 1&lt;br /&gt;
          os 3&lt;br /&gt;
       end&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
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 were 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.&amp;lt;br /&amp;gt;&lt;br /&gt;
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. [https://www.cpcwiki.eu/index.php/Albireo Albireo] incorporates a file management IC that performs FAT file system operations and handles fragmented files properly. In such case fragmented image files is not a problem. HDCPM will never fragment a CP/M image file.&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Hdcpm-boot-m4.png|thumb|HDCPM binary booting on M4 Board]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==CP/M Plus disk/partitions==&lt;br /&gt;
You can also create one or more partitions in order to format them to [http://www.seasip.info/Cpm/format31.html CP/M-80] 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.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM examines the hard disk's MBR upon start and finds the partition information. Then it finds the LBA of the first sector of each partition and passes it to the CP/M hard disk driver. The CP/M hard disk driver doesn't know anything about partitions. It accesses the partition as if it were a real hard disk.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:hdcpm-ui-boot.png|thumb|HDCPM ROM booting on uIDE-16]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
===Using the ROM===&lt;br /&gt;
* Install the HDCPM ROM in a free ROM slot of your ROM box.&lt;br /&gt;
* Plug in your mass storage interface and attach the proper mass storage device.&lt;br /&gt;
* 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 shown inside the parentheses:&amp;lt;br /&amp;gt;&lt;br /&gt;
** (S2): [[SYMBiFACE II]] compatible interface&lt;br /&gt;
** (uI): [[uIDE 16]] interface&lt;br /&gt;
** (M4): [[M4 Board]]&lt;br /&gt;
** (US): [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II]&lt;br /&gt;
** (S3): [http://www.tmtlogic.com/ Symbiface III]&lt;br /&gt;
** (AL): [[Albireo]]&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:hdcpm-s2.png|thumb|HDCPM ROM - SYMBiFACE II]]&lt;br /&gt;
|[[File:hdcpm-ui.png|thumb|HDCPM ROM - uIDE-16]]&lt;br /&gt;
|[[File:hdcpm-m4.png|thumb|HDCPM ROM - M4 Board]]&lt;br /&gt;
|}&lt;br /&gt;
{|&lt;br /&gt;
|[[File:hdcpm-us.png|thumb|HDCPM ROM - USIfAC II]]&lt;br /&gt;
|[[File:hdcpm-s3.png|thumb|HDCPM ROM - Symbiface III]]&lt;br /&gt;
|[[File:hdcpm-al.png|thumb|HDCPM ROM - Albireo]]&lt;br /&gt;
|}&lt;br /&gt;
In case a RTC is detected you will also see the RTC initialization message and the current date and time: ''RTC found: 2021/01/01 12:01:01''&lt;br /&gt;
* Use your original CP/M Plus system disk set to Boot CP/M Plus.&lt;br /&gt;
* 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.&lt;br /&gt;
* Reset your AMSTRAD and boot CP/M from the hard disk with the command |HDCPM. The Boot loader will check your image file(s) against fragmentation and correct size and boot the system to the CP/M command prompt. If the first image file is fragmented or has the wrong length the system will not boot. All other image files will be ignored if found to be fragmented or have the wrong length.&lt;br /&gt;
* In case you don't use CP/M image files just boot the system with |HDCPM or |HDCPMT&lt;br /&gt;
* Copy the files from your CP/M system floppy disks to the first hard disk.&lt;br /&gt;
* Copy any other needed application etc. to your CP/M hard disk(s).&lt;br /&gt;
* You are ready to go.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Using the binary===&lt;br /&gt;
* Plug in your mass storage interface and attach the proper mass storage device.&lt;br /&gt;
* Use your original CP/M Plus system disk set to Boot CP/M Plus.&lt;br /&gt;
* 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.&lt;br /&gt;
* 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.&lt;br /&gt;
* You are ready to go.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==ROM commands==&lt;br /&gt;
[[File:hdcpm-us-boot.png|thumb|HDCPM ROM booting on USIfAC II]]&lt;br /&gt;
* |HDCPM mounts the hard disks and boots CP/M Plus. If [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] is used enable the USB disk with the |USB command first.&lt;br /&gt;
* |HDCPMT works like |HDCPM but also utilizes the RTC.&lt;br /&gt;
* |HDDPB shows the Disk Parameter Block.&lt;br /&gt;
* |HDDEF shows the diskdefs entry for CP/M tools and the file system size.&lt;br /&gt;
* |DATE displays the current date.&lt;br /&gt;
* |TIME displays the current time. If [[M4 Board]] is used |DATE and |TIME will be redirected to M4 |TIME.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==The HDCPM binary file==&lt;br /&gt;
* If [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] is used, use your PC to copy HDCPM.BIN to your USB flash disk. Then insert it to your [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] power up your Amstrad and enable the USB disk with the |USB command.&lt;br /&gt;
* Execute the file from the floppy disk or from your mass storage device with ''RUN&amp;quot;HDCPM&amp;quot;''. 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.&lt;br /&gt;
*  [[M4 Board]] and [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ 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 [https://www.cpcwiki.eu/forum/applications/cubeios-fat16fat32-rom-for-the-cpc's-with-xmass/ CubeMDOS] or [[UniDOS]], installed.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==The MAKEIMG.BAS and MAKEIMG.EXE utilities==&lt;br /&gt;
===MAKEIMG.BAS===&lt;br /&gt;
Although this utility should not be your first option, you can use it to make a new empty CP/M disk image file.&amp;lt;br /&amp;gt;&lt;br /&gt;
In case you decide to use it make sure you have a FAT aware DOS installed in your system. MAKEIMG makes use of the firmware calls CAS_OUT_OPEN, CAS_OUT_CLOSE and CAS_OUT_CHAR so your DOS must support them.&amp;lt;br /&amp;gt;&lt;br /&gt;
Copy the files MAKEIMG.BAS and MAKEIMG.BIN to the root directory of your FAT formatted hard disk and make it your current drive. Run the utility with ''RUN&amp;quot;MAKEIMG&amp;quot;'' and don't hold your breath!&amp;lt;br /&amp;gt;&lt;br /&gt;
Making an image file this way takes more than 1.5 hour for an 8MB file so literally... don't hold your breath.&amp;lt;br /&amp;gt;&lt;br /&gt;
Here is a small tutorial on how to setup and use a CP/M image file: https://youtu.be/GMWsRzNhQTM&amp;lt;br /&amp;gt;&lt;br /&gt;
===MAKEIMG.EXE===&lt;br /&gt;
This utility is a [[SymbOS]] application.&amp;lt;br /&amp;gt;&lt;br /&gt;
Use this utility to create your CP/M hard disk images from within [[SymbOS]]. 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.&amp;lt;br /&amp;gt;&lt;br /&gt;
MAKEIMG.EXE has been developed with [http://www.symbos.de/quigs.htm Quigs] for [[SymbOS]].&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Hdcpm-makeimg-sym1.png|thumb|MAKEIMG.EXE in action]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==The HDMGR.COM utility==&lt;br /&gt;
This is the Hard Disk Manager utility.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can use this utility to get information about your hard disk geometry, disk image files, partitions and boot sector. You have to use this utility to format a hard disk, disk image file or partition to CP/M format or manipulate the boot sector of the hard disk and/or transfer an .EMS system file to the reserved track of the hard disk.&amp;lt;br /&amp;gt;&lt;br /&gt;
The boot sector contains information about the CP/M disk drive letters, start-up drive and console colour scheme. All those properties can be changed with HDMGR.COM.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR will perform a fragmentation test of the discovered CP/M hard disk image files uppon execution (not for Albireo).&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
The HDMGR.COM utility is self explanatory. Just run it from the CP/M command prompt.&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Hdcpm-hdmgr-m.png|thumb|HDMGR main menu]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-1.png|thumb|HDMGR Hardware information]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-2.png|thumb|HDMGR Partition information]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-3.png|thumb|HDMGR CP/M disk image information]]&lt;br /&gt;
|}&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Hdcpm-hdmgr-4.png|thumb|HDMGR Boot sector information]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-5.png|thumb|HDMGR Log disk]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-7.png|thumb|HDMGR Manage boot sector]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-8.png|thumb|HDMGR Transfer CP/M to disk]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==The RTC.COM utility==&lt;br /&gt;
You can make use of the RTC.COM utility in order to keep CP/M date and time updated.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can synchronize the date and time of CP/M Plus with the RTC by running ''RTC -G'' manually or via your PROFILE.SUB.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can also set your RTC to the current CP/M date and time by running ''RTC -S'' (not for M4 board)&amp;lt;br /&amp;gt;&lt;br /&gt;
You can see the detected RTC interface type by running ''RTC -I''&amp;lt;br /&amp;gt;&lt;br /&gt;
Currently RTC.COM works with the RTC found in Symbiface II, Symbiface III, M4 board (read only) and [[Nova]].&amp;lt;br /&amp;gt;&lt;br /&gt;
DATE.COM, DIR.COM and SHOW.COM commands, patched for Year 2000 compatibility can be downloaded from the [http://www.cpm.z80.de/binary.html CP/M source archive - Digital Research Binary files section] .&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==The MOUNT.COM utility==&lt;br /&gt;
You can use the MOUNT.COM utility in order to list the mounted CP/M disks, list the available CP/M disks in your mass storage medium and mount a new disk in one of the four available mount points.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can get a list of the already mounted CP/M disks by running ''MOUNT'' without any parameters.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can get a list of the available CP/M disk images or partitions by running ''MOUNT -L''&amp;lt;br /&amp;gt;&lt;br /&gt;
You can mount one of the available CP/M disk images or partitions by running ''MOUNT &amp;lt;mount point&amp;gt;,&amp;lt;hard disk&amp;gt;'' where &amp;lt;mount point&amp;gt; is a number from 1 to 4 indicating the HDCPM disk number and &amp;lt;hard disk&amp;gt; is a two digit number from 00 to 99 for CPMDSK00.IMG to CPMDSK99.IMG respectively, or P1 to P4 for partition 1 to partition 4 respectively.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Error messages==&lt;br /&gt;
===ROM checksum error===&lt;br /&gt;
* ''*** HDCPM ROM checksum error ***&lt;br /&gt;
	The ROM has failed the checksum test.&lt;br /&gt;
	The contents are probably corrupted. The ROM will not be initialized.&lt;br /&gt;
&lt;br /&gt;
===Hard disk errors===&lt;br /&gt;
* ''*** No mass storage found ***''&lt;br /&gt;
	No compatible mass storage interface can be found.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: DISK I/O''&lt;br /&gt;
	I/O error occurred during the last read/write operation.&lt;br /&gt;
	Your hard disk might be defect or the USB disk is not enabled.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: INVALID BOOT SECTOR''&lt;br /&gt;
	No FAT or CP/M boot sector was found in a not partitioned hard disk.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: INVALID FILE SYSTEM''&lt;br /&gt;
	The first partition in a partitioned hard disk is not a FAT or CP/M-80&lt;br /&gt;
	one.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: INVALID SECTOR SIZE''&lt;br /&gt;
	The hard disk used has a sector size not equal to 512 bytes.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: CPMDSK01.IMG NOT FOUND''&lt;br /&gt;
	The CP/M image file named CPMDSK01.IMG can't be found in the FAT&lt;br /&gt;
	formatted hard disk or partition. &lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: CP/M SYSTEM FILE NOT FOUND''&lt;br /&gt;
	The .EMS CP/M system file can't be found in the system track of your&lt;br /&gt;
	CP/M partition or image file.&lt;br /&gt;
	&lt;br /&gt;
*  ''ERROR: CPMDSK01.IMG IS FRAGMENTED''&lt;br /&gt;
	The first CP/M image file is fragmented, the system won't mount it.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: CPMDSK01.IMG HAS WRONG LENGTH''&lt;br /&gt;
	The first CP/M image file has wrong length, the system won't mount it.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: CPMDSK01.IMG IS NOT FORMATTED''&lt;br /&gt;
	The first CP/M image file is not formatted to CP/M-80 format, the&lt;br /&gt;
	system won't mount it. Use the HDMGR.COM utility to format it.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: INCOMPATIBLE EMS FILE''&lt;br /&gt;
	The .EMS system file that was loaded from the system track is not&lt;br /&gt;
	compatible with HDCPM.&lt;br /&gt;
&lt;br /&gt;
===RTC errors===&lt;br /&gt;
* ''*** Battery depleted ***''&lt;br /&gt;
	The RTC battery is depleted. The RTC driver will continue to operate&lt;br /&gt;
	normally but the readings are not reliable. Replace the RTC battery.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Release info &amp;amp; download==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Version !! Changes !! Download&lt;br /&gt;
|-&lt;br /&gt;
| v1.00 December 2021 || Initial release || [[Media:hdcpm100.dsk|hdcpm100.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.01 January 2022 || HDCPM.ROM, HDMGR.COM: code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: (bug fix) fragmented file detection was not working properly unless the file was CPMDSK01.IMG&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: (bug fix) unformatted image file detection was not working properly. New error message added.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) CP/M drive table wasn't patched properly.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) initialization of floppy drive(s) was corrupted due to misplaced code.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: added .EMS file compatibility check. New error message added.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: added support for Dobbertin RAM disk driver.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: added compatibility with Dobbertin HD20 Harddisc&amp;lt;br /&amp;gt;&lt;br /&gt;
MAKEIMG.EXE: added utility for creating an image file from within SYMBOS.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&lt;br /&gt;
|| [[Media:hdcpm101.dsk|hdcpm101.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.02 March 2022 || HDCPM.ROM, HDMGR.COM: added support for M4 board.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: added support for uIDE-16 interface.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) the ROM was initialized even if no compatible interface was found.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: error message change.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: option &amp;quot;F&amp;quot; has been removed. HDCPM will always do a disk fragmentation test during boot.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: power up message changed in order to provide information about the type of the detected interface.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: two bytes of RAM will be reserved by the ROM for storing the interface type and M4 ROM number.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&lt;br /&gt;
|| [[Media:hdcpm102.dsk|hdcpm102.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.03 April 2022 || HDCPM.ROM, HDMGR.COM: added support for USIfAC II.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) uIDE-16 detection was broken.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&lt;br /&gt;
|| [[Media:hdcpm103.dsk|hdcpm103.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.04 June 2022|| HDCPM.ROM: code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.BIN: added executable binary file version of HDCPM.&lt;br /&gt;
|| [[Media:hdcpm104.dsk|hdcpm104.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.05 July 2022 || HDCPM.ROM, HDCPM.BIN, HDMGR.COM: added support for Symbiface III.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDCPM.BIN:  code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR.COM: Hardware info added for USIfAC II&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR.COM: (bug fix) the 'Select boot file' menu was garbled if there were 8 or more .EMS files present.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&lt;br /&gt;
|| [[Media:hdcpm105.dsk|hdcpm105.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.06 January 2023 || HDCPM.ROM, HDCPM.BIN, HDMGR.COM: added support for Albireo.&amp;lt;br /&amp;gt;&lt;br /&gt;
RTC.COM: added support for M4 Board (r/o) and Symbiface 3.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDCPM.BIN: (bug fix) CPC was freezing after mounting the CP/M disk(s) with incompatible .EMS file.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR.COM: (bug fix) the Stack was overflowed in some rare cases.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&amp;lt;br /&amp;gt;&lt;br /&gt;
|| [[Media:hdcpm106.dsk|hdcpm106.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.10 September 2023 || HDCPM.ROM, HDCPM.BIN: added support for CPC464 with &amp;amp;C3 mode compatible RAM expansion card.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDCPM.BIN: can now boot CP/M Plus on a CPC that has no or faulty Floppy Disc Controller present.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: ROM checksum test and new error message added.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: removed blank line from ROM initialization message.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDCPM.BIN, HDMGR.COM:  code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDCPM.BIN: (bug fix) incorrect patching would corrupt the Dobbertin RAM drive on CP/M Plus v1.1&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) |HDDPB was displaying wrong values&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR.COM: (bug fix) a corruption of the MBR of USB/SD card occured in some rare cases.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&amp;lt;br /&amp;gt;&lt;br /&gt;
|| [[Media:hdcpm110.dsk|hdcpm110.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.11 April 2024 || HDCPM.ROM, HDCPM.BIN: CP/M (virtual) disks are now treated as removable.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDCPM.BIN, HDMGR.COM:  code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDCPM.BIN: (bug fix) uIDE driver was corrupted.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR.COM: (bug fix) CP/M disk image information could skip an image file.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR.COM: More than 8 .EMS files can be displayed and selected.&amp;lt;br /&amp;gt;&lt;br /&gt;
MOUNT.COM: added utility to list and mount CP/M (virtual) disks.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&amp;lt;br /&amp;gt;&lt;br /&gt;
|| [[Media:hdcpm111.dsk|hdcpm111.dsk]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Other downloads==&lt;br /&gt;
*[[Media:CPMDSK01&amp;amp;02.zip|CP/M disk images]] - CPMDSK01.IMG is bootable and contains all the files of the 3 CP/M Plus system disks and year 2000 compliant binaries downloaded from the [http://www.cpm.z80.de/binary.html Digital Research Binary Files]. CPMDSK02.IMG is empty and can also be used as a template.&amp;lt;br /&amp;gt;&lt;br /&gt;
*[[Media:Z3Plus.part1.rar|ZPM3+ZCCP disk image part 1]] , [[Media:Z3Plus.part2.rar|ZPM3+ZCCP disk image part 2]] - The Amstrad BDOS and CCP have been replaced with their counterparts [https://github.com/wwarthen/CPU280/tree/master/ZPM3/zpm3.txt ZPM3] and [https://github.com/wwarthen/CPU280/tree/master/ZCCP/zccp.txt ZCCP] written by Simeon Cran and Randy Winchester respectively. It is [https://www.cpcwiki.eu/index.php/Z-System Z-system, Z3Plus] compatible and contains the Z3Plus system files, all the files of the 3 CP/M Plus system disks, year 2000 compliant binaries and also contains some useful tools, help files and manuals.&amp;lt;br /&amp;gt;&lt;br /&gt;
*[[Media:CPMDSK04.zip|EMS Files]] - CPMDSK04.IMG contains a collection of HDCPM compatible EMS files (see table below) and the latest HDMGR.COM&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! EMS file !! BDOS !! CCP !! BIOS !! Extras !! Description&lt;br /&gt;
|-&lt;br /&gt;
| C10CPM3.EMS || Digital Research || Digital Research || Amstrad v1.0 || - || Original Amstrad CP/M Plus for CPC&lt;br /&gt;
|-&lt;br /&gt;
| C11CPM3.EMS || Digital Research || Digital Research || Amstrad v1.1 || - || Original Amstrad CP/M Plus for CPC&lt;br /&gt;
|-&lt;br /&gt;
| C10ZPM3.EMS || ZPM3 by Simeon Cran  || Digital Research || Amstrad v1.0 || - || The BDOS has been replaced by ZPM3 written in Z80 assembly&lt;br /&gt;
|-&lt;br /&gt;
| C11ZPM3.EMS || ZPM3 by Simeon Cran  || Digital Research || Amstrad v1.1 || - || The BDOS has been replaced by ZPM3 written in Z80 assembly&lt;br /&gt;
|-&lt;br /&gt;
| CPM3SEMI.EMS || Digital Research || Digital Research || Amstrad v1.0 || Dk'tronics RAM drive || Patched with Dk'tronics memory expansion driver&lt;br /&gt;
|-&lt;br /&gt;
| ZPM3SEMI.EMS || ZPM3 by Simeon Cran || Digital Research || Amstrad v1.0 || Dk'tronics RAM drive || Patched with Dk'tronics memory expansion driver and ZPM3&lt;br /&gt;
|-&lt;br /&gt;
| C10ZCPR3.EMS || ZPM3 by Simeon Cran  || ZCCP by Randy Winchester || Amstrad v1.0 || - || The BDOS has been replaced by ZPM3 and the CCP has been replaced by ZCCP, both  written in Z80 assembly. Z-system/Z3Plus compatible. &amp;lt;b&amp;gt;Strartup and default drive must be drive A: (use HDMGR.COM to change) &amp;lt;/b&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ZCPR3SEM.EMS || ZPM3 by Simeon Cran  || ZCCP by Randy Winchester || Amstrad v1.0 || Dk'tronics RAM drive || The BDOS has been replaced by ZPM3 and the CCP has been replaced by ZCCP, both  written in Z80 assembly. Z-system/Z3Plus compatible. Patched with Dk'tronics memory expansion driver. &amp;lt;b&amp;gt;Strartup and default drive must be drive A: (use HDMGR.COM to change)&amp;lt;/b&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| D10CPM3.EMS || Digital Research || Digital Research || Amstrad v1.0 || Dobbertin RAM Drive || Patched with Dobbertin memory expansion driver&lt;br /&gt;
|-&lt;br /&gt;
| D11CPM3.EMS || Digital Research || Digital Research || Amstrad v1.1 || Dobbertin RAM Drive || Patched with Dobbertin memory expansion driver&lt;br /&gt;
|-&lt;br /&gt;
| DX10CPM3.EMS || Digital Research || Digital Research || Amstrad v1.0 || Dobbertin RAM Drive, Vortex format drive B: || Patched with Dobbertin memory expansion driver. Supports Vortex formatted, 80 track, double side floppies, in drive B:&lt;br /&gt;
|-&lt;br /&gt;
| DX11CPM3.EMS || Digital Research || Digital Research || Amstrad v1.1 || Dobbertin RAM Drive, Vortex format drive B: || Patched with Dobbertin memory expansion driver. Supports Vortex formatted, 80 track, double side floppies, in drive B:&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Videos==&lt;br /&gt;
* [https://youtu.be/GMWsRzNhQTM How to create and prepare a CP/M image file in a FAT formatted hard disk]&lt;br /&gt;
* [https://youtu.be/nxow6Y5O4Dc Hard disk utilization and dual boot]&lt;br /&gt;
* [https://youtu.be/em7dHOdaylg How to create a CP/M image file under SYMBOS]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
[[category:Expansion ROM]] [[category:Applications]] [[category:CP/M]]&lt;/div&gt;</summary>
		<author><name>D kef</name></author>	</entry>

	<entry>
		<id>https://oldwiki.cpcwiki.eu/index.php?title=File:CPMDSK01%2602.zip&amp;diff=115602</id>
		<title>File:CPMDSK01&amp;02.zip</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.cpcwiki.eu/index.php?title=File:CPMDSK01%2602.zip&amp;diff=115602"/>
				<updated>2024-04-22T18:48:38Z</updated>
		
		<summary type="html">&lt;p&gt;D kef: D kef uploaded a new version of File:CPMDSK01&amp;amp;02.zip&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>D kef</name></author>	</entry>

	<entry>
		<id>https://oldwiki.cpcwiki.eu/index.php?title=File:CPMDSK04.zip&amp;diff=115601</id>
		<title>File:CPMDSK04.zip</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.cpcwiki.eu/index.php?title=File:CPMDSK04.zip&amp;diff=115601"/>
				<updated>2024-04-22T18:44:39Z</updated>
		
		<summary type="html">&lt;p&gt;D kef: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>D kef</name></author>	</entry>

	<entry>
		<id>https://oldwiki.cpcwiki.eu/index.php?title=File:Hdcpm111.dsk&amp;diff=115600</id>
		<title>File:Hdcpm111.dsk</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.cpcwiki.eu/index.php?title=File:Hdcpm111.dsk&amp;diff=115600"/>
				<updated>2024-04-22T18:43:48Z</updated>
		
		<summary type="html">&lt;p&gt;D kef: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>D kef</name></author>	</entry>

	<entry>
		<id>https://oldwiki.cpcwiki.eu/index.php?title=HDCPM&amp;diff=115599</id>
		<title>HDCPM</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.cpcwiki.eu/index.php?title=HDCPM&amp;diff=115599"/>
				<updated>2024-04-22T18:43:12Z</updated>
		
		<summary type="html">&lt;p&gt;D kef: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
HDCPM is a Hard Disk boot loader for [[CP/M]] Plus, developed by d_kef&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can read more about the development of the application here:&amp;lt;br /&amp;gt;&lt;br /&gt;
https://www.cpcwiki.eu/forum/applications/hdcpm-boot-and-run-cpm-plus-from-hard-disk/&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:hdcpm.gif|HDCPM booting CP/M Plus]]&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It comes in the form of:&lt;br /&gt;
* a standard background ROM that can be installed in any available ROM position.&lt;br /&gt;
* a standard binary file that can be loaded from floppy or hard drive.&lt;br /&gt;
&lt;br /&gt;
 	&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following configurations are possible with one hard disk:&lt;br /&gt;
&lt;br /&gt;
* One not partitioned, CP/M formatted hard disk. The whole hard disk is used by CP/M.&lt;br /&gt;
* One to four CP/M formatted partitions. Every partition is accessed as a separate hard disk by CP/M.&lt;br /&gt;
* 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.&lt;br /&gt;
* 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.&lt;br /&gt;
* For interfaces that use SD card or USB flash drive as a mass storage device ([[M4 Board]], [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II], [http://www.tmtlogic.com/ Symbiface III] or [[Albireo]]) the only supported configuration is one to four CP/M disk image files in the root directory of the FAT file system.&lt;br /&gt;
	&lt;br /&gt;
Currently only the master IDE device can be accessed by HDCPM. The slave device is available to be used by your favourite DOS.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
HDCPM can also utilize the RTC found in the [[SYMBiFACE II]] in order to implement CP/M Plus BIOS function 26: TIME.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
HDCPM is compatible and can be used together with the [[Dobbertin Harddisc]].&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
HDCPM has been developed with [[WinApe]] Z80 Assembler and was tested with [[WinApe]], [[CPCemu]], [http://www.roudoudou.com/ACE-DL/ ACE-DL] an Amstrad Plus 464 upgraded to 6128 an Amstrad CPC 6128 and an Amstrad CPC 464 with [https://www.cpcwiki.eu/index.php/Universal_512K_and_1MByte_RAM_Expansions Universal 512K RAM Expansion].&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
HDCPM distribution disk contains the following files:&lt;br /&gt;
* HDCPM.ROM the ROM itself&lt;br /&gt;
* HDCPM.BIN the executable binary file&lt;br /&gt;
* HDMGR.COM Hard Disk Manager utility&lt;br /&gt;
* MOUNT.COM Hard Disk mount utility&lt;br /&gt;
* RTC.COM RTC synchronization utility&lt;br /&gt;
* MAKEIMG.BAS CP/M image file creation utility&lt;br /&gt;
* MAKEIMG.BIN CP/M image file creation binary&lt;br /&gt;
* MAKEIMG.EXE CP/M image file creation utility for [[SymbOS]]&lt;br /&gt;
* HDCPM.DOC the User guide&lt;br /&gt;
&lt;br /&gt;
HDCPM is free software. It can be used and distributed with no restrictions.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Prerequisites==&lt;br /&gt;
* Amstrad CPC/Plus computer capable of running CP/M Plus.&lt;br /&gt;
* ROM box or other ROM expansion hardware if using the ROM.&lt;br /&gt;
* Optionaly a FAT aware DOS like M4 ROM, USIfAC ROM, [[UniDOS]], [https://www.cpcwiki.eu/forum/applications/cubeios-fat16fat32-rom-for-the-cpc's-with-xmass/ CubeMDOS] etc if using the binary.&lt;br /&gt;
* One of the following mass storage interfaces:&lt;br /&gt;
** [[SYMBiFACE II]]&lt;br /&gt;
** [[X-Mass]]&lt;br /&gt;
** [https://github.com/salafek/cyboard-for-cpc Cyboard]&lt;br /&gt;
** [[uIDE 16]] (base address = &amp;amp;FEF0)&lt;br /&gt;
** [[M4 Board]]&lt;br /&gt;
** [[USIFAC]] II/[[ULIfAC]]&lt;br /&gt;
** [http://www.tmtlogic.com/ Symbiface III]&lt;br /&gt;
** [[Albireo]] (SD card only)&lt;br /&gt;
* Compatible storage device with enough free space to accommodate the desirable CP/M hard disk configuration.&lt;br /&gt;
* Floppy disk drive for initialization of the file system.&lt;br /&gt;
* CP/M Plus system disks for making the system bootable.&lt;br /&gt;
* Optionally a [[SYMBiFACE II]] compatible RTC.&lt;br /&gt;
&lt;br /&gt;
==Restrictions==&lt;br /&gt;
* CP/M 2.2 or lower is not supported.&lt;br /&gt;
* 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.&lt;br /&gt;
* Only the master IDE device is accessible by HDCPM.&lt;br /&gt;
* The maximum number of hard disk partition/images supported is four.&lt;br /&gt;
* Only primary partitions are supported.&lt;br /&gt;
* If you want to use CP/M disk images then they must be stored in a FAT16 or FAT32 formatted disk or partition.&lt;br /&gt;
* If the hard disk is partitioned then the CP/M disk images must be placed in the first partition of the disk.&lt;br /&gt;
* The CP/M disk images must be placed in the root directory of the FAT file system.&lt;br /&gt;
* The CP/M disk images must NOT be fragmented and must have the correct size.&lt;br /&gt;
* 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. &lt;br /&gt;
* Only storage devices with 512 bytes sector size are supported.&lt;br /&gt;
* Only storage devices with LBA addressing are supported.&lt;br /&gt;
* Date stamps of CP/M disk image files are not maintained.&lt;br /&gt;
* 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 letters for your IDE media then the corresponding HD20 partitions will be unavailable under CP/M.&lt;br /&gt;
&lt;br /&gt;
==How it works==&lt;br /&gt;
===Using the ROM===&lt;br /&gt;
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:&lt;br /&gt;
|HDCPM (no TIME function support) or |HDCPMT (TIME function support)&amp;lt;br /&amp;gt;&lt;br /&gt;
Alternatively it can be started by holding down the Tab key (no TIME function support) or Shift+Tab (TIME function support), during power-up.&amp;lt;br /&amp;gt;&lt;br /&gt;
===Using the binary===&lt;br /&gt;
HDCPM can be started by running the HDCPM.BIN file from floppy drive or mass storage.&amp;lt;br /&amp;gt;&lt;br /&gt;
===Functions===&lt;br /&gt;
HDCPM will then execute the following functions:&amp;lt;br /&amp;gt;&lt;br /&gt;
* Search for a compatible mass storage interface.&lt;br /&gt;
* Initialize the mass storage interface if needed.&lt;br /&gt;
* Move the boot loader and the CP/M patcher to RAM.&lt;br /&gt;
* Mount 1 to 4 CP/M image files and/or partitions and perform fragmentation and size test.&lt;br /&gt;
* 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.&lt;br /&gt;
* Read the .EMS file from the reserved track and store it in RAM just as the normal CP/M Plus boot loader does.&lt;br /&gt;
* 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 were a normal RSX.&lt;br /&gt;
* Patch the floppy disk drive routines in case a FDC's not been found.&lt;br /&gt;
* Patch the SCB in order to change the startup/default drive.&lt;br /&gt;
* 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 memory expansion]] or [[Dobbertin Memory Expansion]] driver is present.&lt;br /&gt;
* Move the ALV of the Dk'tronics RAM disk if [[Z-System]] has been detected.&lt;br /&gt;
* Patch the CP/M console with the desired colour scheme. &lt;br /&gt;
* Patch the system message.&lt;br /&gt;
* Do a normal CP/M cold start.&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==CP/M Plus disk image files==&lt;br /&gt;
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 [https://hexed.it/ hexed.it] or any hex editor capable of creating binary files filled with a specific pattern.&amp;lt;br /&amp;gt;&lt;br /&gt;
In case of hexed.it select 'New file' fill in 'Size of the new file = 8519680' and 'Fill Pattern = 0xE5' and press apply. Save the file as CPMDSK01.IMG&amp;lt;br /&amp;gt;&lt;br /&gt;
If you have a FAT capable DOS installed in your AMSTRAD you can use the provided MAKEIMG.BAS utility to create your image file. Keep in mind that it takes more than 1.5 hour for a 8MB image file to be created that way.&amp;lt;br /&amp;gt;&lt;br /&gt;
CP/M disk image files can be accessed by a modern computer with [http://www.moria.de/~michael/cpmtools/ cpmtools]. Use the command |HDDEF to see the record you must insert in the diskdefs file.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The HDCPM record for diskdefs is:&lt;br /&gt;
&lt;br /&gt;
       diskdef hdcpm&lt;br /&gt;
          seclen 512&lt;br /&gt;
          tracks 65&lt;br /&gt;
          sectrk 256&lt;br /&gt;
          blocksize 8192&lt;br /&gt;
          maxdir 1024&lt;br /&gt;
          skew 0&lt;br /&gt;
          boottrk 1&lt;br /&gt;
          os 3&lt;br /&gt;
       end&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
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 were 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.&amp;lt;br /&amp;gt;&lt;br /&gt;
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. [https://www.cpcwiki.eu/index.php/Albireo Albireo] incorporates a file management IC that performs FAT file system operations and handles fragmented files properly. In such case fragmented image files is not a problem. HDCPM will never fragment a CP/M image file.&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Hdcpm-boot-m4.png|thumb|HDCPM binary booting on M4 Board]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==CP/M Plus disk/partitions==&lt;br /&gt;
You can also create one or more partitions in order to format them to [http://www.seasip.info/Cpm/format31.html CP/M-80] 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.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM examines the hard disk's MBR upon start and finds the partition information. Then it finds the LBA of the first sector of each partition and passes it to the CP/M hard disk driver. The CP/M hard disk driver doesn't know anything about partitions. It accesses the partition as if it were a real hard disk.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:hdcpm-ui-boot.png|thumb|HDCPM ROM booting on uIDE-16]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
===Using the ROM===&lt;br /&gt;
* Install the HDCPM ROM in a free ROM slot of your ROM box.&lt;br /&gt;
* Plug in your mass storage interface and attach the proper mass storage device.&lt;br /&gt;
* 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 shown inside the parentheses:&amp;lt;br /&amp;gt;&lt;br /&gt;
** (S2): [[SYMBiFACE II]] compatible interface&lt;br /&gt;
** (uI): [[uIDE 16]] interface&lt;br /&gt;
** (M4): [[M4 Board]]&lt;br /&gt;
** (US): [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II]&lt;br /&gt;
** (S3): [http://www.tmtlogic.com/ Symbiface III]&lt;br /&gt;
** (AL): [[Albireo]]&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:hdcpm-s2.png|thumb|HDCPM ROM - SYMBiFACE II]]&lt;br /&gt;
|[[File:hdcpm-ui.png|thumb|HDCPM ROM - uIDE-16]]&lt;br /&gt;
|[[File:hdcpm-m4.png|thumb|HDCPM ROM - M4 Board]]&lt;br /&gt;
|}&lt;br /&gt;
{|&lt;br /&gt;
|[[File:hdcpm-us.png|thumb|HDCPM ROM - USIfAC II]]&lt;br /&gt;
|[[File:hdcpm-s3.png|thumb|HDCPM ROM - Symbiface III]]&lt;br /&gt;
|[[File:hdcpm-al.png|thumb|HDCPM ROM - Albireo]]&lt;br /&gt;
|}&lt;br /&gt;
In case a RTC is detected you will also see the RTC initialization message and the current date and time: ''RTC found: 2021/01/01 12:01:01''&lt;br /&gt;
* Use your original CP/M Plus system disk set to Boot CP/M Plus.&lt;br /&gt;
* 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.&lt;br /&gt;
* Reset your AMSTRAD and boot CP/M from the hard disk with the command |HDCPM. The Boot loader will check your image file(s) against fragmentation and correct size and boot the system to the CP/M command prompt. If the first image file is fragmented or has the wrong length the system will not boot. All other image files will be ignored if found to be fragmented or have the wrong length.&lt;br /&gt;
* In case you don't use CP/M image files just boot the system with |HDCPM or |HDCPMT&lt;br /&gt;
* Copy the files from your CP/M system floppy disks to the first hard disk.&lt;br /&gt;
* Copy any other needed application etc. to your CP/M hard disk(s).&lt;br /&gt;
* You are ready to go.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Using the binary===&lt;br /&gt;
* Plug in your mass storage interface and attach the proper mass storage device.&lt;br /&gt;
* Use your original CP/M Plus system disk set to Boot CP/M Plus.&lt;br /&gt;
* 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.&lt;br /&gt;
* 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.&lt;br /&gt;
* You are ready to go.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==ROM commands==&lt;br /&gt;
[[File:hdcpm-us-boot.png|thumb|HDCPM ROM booting on USIfAC II]]&lt;br /&gt;
* |HDCPM mounts the hard disks and boots CP/M Plus. If [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] is used enable the USB disk with the |USB command first.&lt;br /&gt;
* |HDCPMT works like |HDCPM but also utilizes the RTC.&lt;br /&gt;
* |HDDPB shows the Disk Parameter Block.&lt;br /&gt;
* |HDDEF shows the diskdefs entry for CP/M tools and the file system size.&lt;br /&gt;
* |DATE displays the current date.&lt;br /&gt;
* |TIME displays the current time. If [[M4 Board]] is used |DATE and |TIME will be redirected to M4 |TIME.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==The HDCPM binary file==&lt;br /&gt;
* If [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] is used, use your PC to copy HDCPM.BIN to your USB flash disk. Then insert it to your [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] power up your Amstrad and enable the USB disk with the |USB command.&lt;br /&gt;
* Execute the file from the floppy disk or from your mass storage device with ''RUN&amp;quot;HDCPM&amp;quot;''. 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.&lt;br /&gt;
*  [[M4 Board]] and [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ 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 [https://www.cpcwiki.eu/forum/applications/cubeios-fat16fat32-rom-for-the-cpc's-with-xmass/ CubeMDOS] or [[UniDOS]], installed.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==The MAKEIMG.BAS and MAKEIMG.EXE utilities==&lt;br /&gt;
===MAKEIMG.BAS===&lt;br /&gt;
Although this utility should not be your first option, you can use it to make a new empty CP/M disk image file.&amp;lt;br /&amp;gt;&lt;br /&gt;
In case you decide to use it make sure you have a FAT aware DOS installed in your system. MAKEIMG makes use of the firmware calls CAS_OUT_OPEN, CAS_OUT_CLOSE and CAS_OUT_CHAR so your DOS must support them.&amp;lt;br /&amp;gt;&lt;br /&gt;
Copy the files MAKEIMG.BAS and MAKEIMG.BIN to the root directory of your FAT formatted hard disk and make it your current drive. Run the utility with ''RUN&amp;quot;MAKEIMG&amp;quot;'' and don't hold your breath!&amp;lt;br /&amp;gt;&lt;br /&gt;
Making an image file this way takes more than 1.5 hour for an 8MB file so literally... don't hold your breath.&amp;lt;br /&amp;gt;&lt;br /&gt;
Here is a small tutorial on how to setup and use a CP/M image file: https://youtu.be/GMWsRzNhQTM&amp;lt;br /&amp;gt;&lt;br /&gt;
===MAKEIMG.EXE===&lt;br /&gt;
This utility is a [[SymbOS]] application.&amp;lt;br /&amp;gt;&lt;br /&gt;
Use this utility to create your CP/M hard disk images from within [[SymbOS]]. 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.&amp;lt;br /&amp;gt;&lt;br /&gt;
MAKEIMG.EXE has been developed with [http://www.symbos.de/quigs.htm Quigs] for [[SymbOS]].&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Hdcpm-makeimg-sym1.png|thumb|MAKEIMG.EXE in action]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==The HDMGR.COM utility==&lt;br /&gt;
This is the Hard Disk Manager utility.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can use this utility to get information about your hard disk geometry, disk image files, partitions and boot sector. You have to use this utility to format a hard disk, disk image file or partition to CP/M format or manipulate the boot sector of the hard disk and/or transfer an .EMS system file to the reserved track of the hard disk.&amp;lt;br /&amp;gt;&lt;br /&gt;
The boot sector contains information about the CP/M disk drive letters, start-up drive and console colour scheme. All those properties can be changed with HDMGR.COM.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR will perform a fragmentation test of the discovered CP/M hard disk image files uppon execution (not for Albireo).&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
The HDMGR.COM utility is self explanatory. Just run it from the CP/M command prompt.&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Hdcpm-hdmgr-m.png|thumb|HDMGR main menu]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-1.png|thumb|HDMGR Hardware information]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-2.png|thumb|HDMGR Partition information]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-3.png|thumb|HDMGR CP/M disk image information]]&lt;br /&gt;
|}&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Hdcpm-hdmgr-4.png|thumb|HDMGR Boot sector information]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-5.png|thumb|HDMGR Log disk]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-7.png|thumb|HDMGR Manage boot sector]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-8.png|thumb|HDMGR Transfer CP/M to disk]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==The RTC.COM utility==&lt;br /&gt;
You can make use of the RTC.COM utility in order to keep CP/M date and time updated.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can synchronize the date and time of CP/M Plus with the RTC by running ''RTC -G'' manually or via your PROFILE.SUB.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can also set your RTC to the current CP/M date and time by running ''RTC -S'' (not for M4 board)&amp;lt;br /&amp;gt;&lt;br /&gt;
You can see the detected RTC interface type by running ''RTC -I''&amp;lt;br /&amp;gt;&lt;br /&gt;
Currently RTC.COM works with the RTC found in Symbiface II, Symbiface III, M4 board (read only) and [[Nova]].&amp;lt;br /&amp;gt;&lt;br /&gt;
DATE.COM, DIR.COM and SHOW.COM commands, patched for Year 2000 compatibility can be downloaded from the [http://www.cpm.z80.de/binary.html CP/M source archive - Digital Research Binary files section] .&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==The MOUNT.COM utility==&lt;br /&gt;
You can use the MOUNT.COM utility in order to list the mounted CP/M disks, list the available CP/M disks in your mass storage medium and mount a new disk in one of the four available mount points.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can get a list of the already mounted CP/M disks by running ''MOUNT'' without any parameters.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can get a list of the available CP/M disk images or partitions by running ''MOUNT -L''&amp;lt;br /&amp;gt;&lt;br /&gt;
You can mount one of the available CP/M disk images or partitions by running ''MOUNT &amp;lt;mount point&amp;gt;,&amp;lt;hard disk&amp;gt;'' where &amp;lt;mount point&amp;gt; is a number from 1 to 4 indicating the HDCPM disk number and &amp;lt;hard disk&amp;gt; is a two digit number from 00 to 99 for CPMDSK00.IMG to CPMDSK99.IMG respectively, or P1 to P4 for partition 1 to partition 4 respectively.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Error messages==&lt;br /&gt;
===ROM checksum error===&lt;br /&gt;
* ''*** HDCPM ROM checksum error ***&lt;br /&gt;
	The ROM has failed the checksum test.&lt;br /&gt;
	The contents are probably corrupted. The ROM will not be initialized.&lt;br /&gt;
&lt;br /&gt;
===Hard disk errors===&lt;br /&gt;
* ''*** No mass storage found ***''&lt;br /&gt;
	No compatible mass storage interface can be found.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: DISK I/O''&lt;br /&gt;
	I/O error occurred during the last read/write operation.&lt;br /&gt;
	Your hard disk might be defect or the USB disk is not enabled.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: INVALID BOOT SECTOR''&lt;br /&gt;
	No FAT or CP/M boot sector was found in a not partitioned hard disk.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: INVALID FILE SYSTEM''&lt;br /&gt;
	The first partition in a partitioned hard disk is not a FAT or CP/M-80&lt;br /&gt;
	one.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: INVALID SECTOR SIZE''&lt;br /&gt;
	The hard disk used has a sector size not equal to 512 bytes.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: CPMDSK01.IMG NOT FOUND''&lt;br /&gt;
	The CP/M image file named CPMDSK01.IMG can't be found in the FAT&lt;br /&gt;
	formatted hard disk or partition. &lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: CP/M SYSTEM FILE NOT FOUND''&lt;br /&gt;
	The .EMS CP/M system file can't be found in the system track of your&lt;br /&gt;
	CP/M partition or image file.&lt;br /&gt;
	&lt;br /&gt;
*  ''ERROR: CPMDSK01.IMG IS FRAGMENTED''&lt;br /&gt;
	The first CP/M image file is fragmented, the system won't mount it.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: CPMDSK01.IMG HAS WRONG LENGTH''&lt;br /&gt;
	The first CP/M image file has wrong length, the system won't mount it.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: CPMDSK01.IMG IS NOT FORMATTED''&lt;br /&gt;
	The first CP/M image file is not formatted to CP/M-80 format, the&lt;br /&gt;
	system won't mount it. Use the HDMGR.COM utility to format it.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: INCOMPATIBLE EMS FILE''&lt;br /&gt;
	The .EMS system file that was loaded from the system track is not&lt;br /&gt;
	compatible with HDCPM.&lt;br /&gt;
&lt;br /&gt;
===RTC errors===&lt;br /&gt;
* ''*** Battery depleted ***''&lt;br /&gt;
	The RTC battery is depleted. The RTC driver will continue to operate&lt;br /&gt;
	normally but the readings are not reliable. Replace the RTC battery.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Release info &amp;amp; download==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Version !! Changes !! Download&lt;br /&gt;
|-&lt;br /&gt;
| v1.00 December 2021 || Initial release || [[Media:hdcpm100.dsk|hdcpm100.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.01 January 2022 || HDCPM.ROM, HDMGR.COM: code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: (bug fix) fragmented file detection was not working properly unless the file was CPMDSK01.IMG&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: (bug fix) unformatted image file detection was not working properly. New error message added.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) CP/M drive table wasn't patched properly.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) initialization of floppy drive(s) was corrupted due to misplaced code.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: added .EMS file compatibility check. New error message added.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: added support for Dobbertin RAM disk driver.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: added compatibility with Dobbertin HD20 Harddisc&amp;lt;br /&amp;gt;&lt;br /&gt;
MAKEIMG.EXE: added utility for creating an image file from within SYMBOS.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&lt;br /&gt;
|| [[Media:hdcpm101.dsk|hdcpm101.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.02 March 2022 || HDCPM.ROM, HDMGR.COM: added support for M4 board.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: added support for uIDE-16 interface.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) the ROM was initialized even if no compatible interface was found.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: error message change.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: option &amp;quot;F&amp;quot; has been removed. HDCPM will always do a disk fragmentation test during boot.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: power up message changed in order to provide information about the type of the detected interface.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: two bytes of RAM will be reserved by the ROM for storing the interface type and M4 ROM number.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&lt;br /&gt;
|| [[Media:hdcpm102.dsk|hdcpm102.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.03 April 2022 || HDCPM.ROM, HDMGR.COM: added support for USIfAC II.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) uIDE-16 detection was broken.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&lt;br /&gt;
|| [[Media:hdcpm103.dsk|hdcpm103.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.04 June 2022|| HDCPM.ROM: code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.BIN: added executable binary file version of HDCPM.&lt;br /&gt;
|| [[Media:hdcpm104.dsk|hdcpm104.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.05 July 2022 || HDCPM.ROM, HDCPM.BIN, HDMGR.COM: added support for Symbiface III.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDCPM.BIN:  code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR.COM: Hardware info added for USIfAC II&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR.COM: (bug fix) the 'Select boot file' menu was garbled if there were 8 or more .EMS files present.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&lt;br /&gt;
|| [[Media:hdcpm105.dsk|hdcpm105.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.06 January 2023 || HDCPM.ROM, HDCPM.BIN, HDMGR.COM: added support for Albireo.&amp;lt;br /&amp;gt;&lt;br /&gt;
RTC.COM: added support for M4 Board (r/o) and Symbiface 3.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDCPM.BIN: (bug fix) CPC was freezing after mounting the CP/M disk(s) with incompatible .EMS file.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR.COM: (bug fix) the Stack was overflowed in some rare cases.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&amp;lt;br /&amp;gt;&lt;br /&gt;
|| [[Media:hdcpm106.dsk|hdcpm106.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.10 September 2023 || HDCPM.ROM, HDCPM.BIN: added support for CPC464 with &amp;amp;C3 mode compatible RAM expansion card.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDCPM.BIN: can now boot CP/M Plus on a CPC that has no or faulty Floppy Disc Controller present.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: ROM checksum test and new error message added.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: removed blank line from ROM initialization message.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDCPM.BIN, HDMGR.COM:  code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDCPM.BIN: (bug fix) incorrect patching would corrupt the Dobbertin RAM drive on CP/M Plus v1.1&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) |HDDPB was displaying wrong values&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR.COM: (bug fix) a corruption of the MBR of USB/SD card occured in some rare cases.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&amp;lt;br /&amp;gt;&lt;br /&gt;
|| [[Media:hdcpm110.dsk|hdcpm110.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.11 April 2024 || HDCPM.ROM, HDCPM.BIN: CP/M (virtual) disks are now treated as removable.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDCPM.BIN, HDMGR.COM:  code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDCPM.BIN: (bug fix) uIDE driver was corrupted.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR.COM: (bug fix) CP/M disk image information could skip an image file.&amp;lt;br /&amp;gt;&lt;br /&gt;
MOUNT.COM: added utility to list and mount CP/M (virtual) disks.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&amp;lt;br /&amp;gt;&lt;br /&gt;
|| [[Media:hdcpm111.dsk|hdcpm111.dsk]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Other downloads==&lt;br /&gt;
*[[Media:CPMDSK01&amp;amp;02.zip|CP/M disk images]] - CPMDSK01.IMG is bootable and contains all the files of the 3 CP/M Plus system disks and year 2000 compliant binaries downloaded from the [http://www.cpm.z80.de/binary.html Digital Research Binary Files]. CPMDSK02.IMG is empty and can also be used as a template.&amp;lt;br /&amp;gt;&lt;br /&gt;
*[[Media:Z3Plus.part1.rar|ZPM3+ZCCP disk image part 1]] , [[Media:Z3Plus.part2.rar|ZPM3+ZCCP disk image part 2]] - The Amstrad BDOS and CCP have been replaced with their counterparts [https://github.com/wwarthen/CPU280/tree/master/ZPM3/zpm3.txt ZPM3] and [https://github.com/wwarthen/CPU280/tree/master/ZCCP/zccp.txt ZCCP] written by Simeon Cran and Randy Winchester respectively. It is [https://www.cpcwiki.eu/index.php/Z-System Z-system, Z3Plus] compatible and contains the Z3Plus system files, all the files of the 3 CP/M Plus system disks, year 2000 compliant binaries and also contains some useful tools, help files and manuals.&amp;lt;br /&amp;gt;&lt;br /&gt;
*[[Media:CPMDSK04.zip|EMS Files]] - CPMDSK04.IMG contains a collection of HDCPM compatible EMS files (see table below) and the latest HDMGR.COM&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! EMS file !! BDOS !! CCP !! BIOS !! Extras !! Description&lt;br /&gt;
|-&lt;br /&gt;
| C10CPM3.EMS || Digital Research || Digital Research || Amstrad v1.0 || - || Original Amstrad CP/M Plus for CPC&lt;br /&gt;
|-&lt;br /&gt;
| C11CPM3.EMS || Digital Research || Digital Research || Amstrad v1.1 || - || Original Amstrad CP/M Plus for CPC&lt;br /&gt;
|-&lt;br /&gt;
| C10ZPM3.EMS || ZPM3 by Simeon Cran  || Digital Research || Amstrad v1.0 || - || The BDOS has been replaced by ZPM3 written in Z80 assembly&lt;br /&gt;
|-&lt;br /&gt;
| C11ZPM3.EMS || ZPM3 by Simeon Cran  || Digital Research || Amstrad v1.1 || - || The BDOS has been replaced by ZPM3 written in Z80 assembly&lt;br /&gt;
|-&lt;br /&gt;
| CPM3SEMI.EMS || Digital Research || Digital Research || Amstrad v1.0 || Dk'tronics RAM drive || Patched with Dk'tronics memory expansion driver&lt;br /&gt;
|-&lt;br /&gt;
| ZPM3SEMI.EMS || ZPM3 by Simeon Cran || Digital Research || Amstrad v1.0 || Dk'tronics RAM drive || Patched with Dk'tronics memory expansion driver and ZPM3&lt;br /&gt;
|-&lt;br /&gt;
| C10ZCPR3.EMS || ZPM3 by Simeon Cran  || ZCCP by Randy Winchester || Amstrad v1.0 || - || The BDOS has been replaced by ZPM3 and the CCP has been replaced by ZCCP, both  written in Z80 assembly. Z-system/Z3Plus compatible. &amp;lt;b&amp;gt;Strartup and default drive must be drive A: (use HDMGR.COM to change) &amp;lt;/b&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ZCPR3SEM.EMS || ZPM3 by Simeon Cran  || ZCCP by Randy Winchester || Amstrad v1.0 || Dk'tronics RAM drive || The BDOS has been replaced by ZPM3 and the CCP has been replaced by ZCCP, both  written in Z80 assembly. Z-system/Z3Plus compatible. Patched with Dk'tronics memory expansion driver. &amp;lt;b&amp;gt;Strartup and default drive must be drive A: (use HDMGR.COM to change)&amp;lt;/b&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| D10CPM3.EMS || Digital Research || Digital Research || Amstrad v1.0 || Dobbertin RAM Drive || Patched with Dobbertin memory expansion driver&lt;br /&gt;
|-&lt;br /&gt;
| D11CPM3.EMS || Digital Research || Digital Research || Amstrad v1.1 || Dobbertin RAM Drive || Patched with Dobbertin memory expansion driver&lt;br /&gt;
|-&lt;br /&gt;
| DX10CPM3.EMS || Digital Research || Digital Research || Amstrad v1.0 || Dobbertin RAM Drive, Vortex format drive B: || Patched with Dobbertin memory expansion driver. Supports Vortex formatted, 80 track, double side floppies, in drive B:&lt;br /&gt;
|-&lt;br /&gt;
| DX11CPM3.EMS || Digital Research || Digital Research || Amstrad v1.1 || Dobbertin RAM Drive, Vortex format drive B: || Patched with Dobbertin memory expansion driver. Supports Vortex formatted, 80 track, double side floppies, in drive B:&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Videos==&lt;br /&gt;
* [https://youtu.be/GMWsRzNhQTM How to create and prepare a CP/M image file in a FAT formatted hard disk]&lt;br /&gt;
* [https://youtu.be/nxow6Y5O4Dc Hard disk utilization and dual boot]&lt;br /&gt;
* [https://youtu.be/em7dHOdaylg How to create a CP/M image file under SYMBOS]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
[[category:Expansion ROM]] [[category:Applications]] [[category:CP/M]]&lt;/div&gt;</summary>
		<author><name>D kef</name></author>	</entry>

	<entry>
		<id>https://oldwiki.cpcwiki.eu/index.php?title=HDCPM&amp;diff=112669</id>
		<title>HDCPM</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.cpcwiki.eu/index.php?title=HDCPM&amp;diff=112669"/>
				<updated>2023-09-16T11:45:19Z</updated>
		
		<summary type="html">&lt;p&gt;D kef: /* Release info &amp;amp; download */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;HDCPM is a Hard Disk boot loader for [[CP/M]] Plus, developed by d_kef&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can read more about the development of the application here:&amp;lt;br /&amp;gt;&lt;br /&gt;
https://www.cpcwiki.eu/forum/applications/hdcpm-boot-and-run-cpm-plus-from-hard-disk/&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:hdcpm.gif|HDCPM booting CP/M Plus]]&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It comes in the form of:&lt;br /&gt;
* a standard background ROM that can be installed in any available ROM position.&lt;br /&gt;
* a standard binary file that can be loaded from floppy or hard drive.&lt;br /&gt;
&lt;br /&gt;
 	&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following configurations are possible with one hard disk:&lt;br /&gt;
&lt;br /&gt;
* One not partitioned, CP/M formatted hard disk. The whole hard disk is used by CP/M.&lt;br /&gt;
* One to four CP/M formatted partitions. Every partition is accessed as a separate hard disk by CP/M.&lt;br /&gt;
* 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.&lt;br /&gt;
* 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.&lt;br /&gt;
* For interfaces that use SD card or USB flash drive as a mass storage device ([[M4 Board]], [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II], [http://www.tmtlogic.com/ Symbiface III] or [[Albireo]]) the only supported configuration is one to four CP/M disk image files in the root directory of the FAT file system.&lt;br /&gt;
	&lt;br /&gt;
Currently only the master IDE device can be accessed by HDCPM. The slave device is available to be used by your favourite DOS.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
HDCPM can also utilize the RTC found in the [[SYMBiFACE II]] in order to implement CP/M Plus BIOS function 26: TIME.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
HDCPM is compatible and can be used together with the [[Dobbertin Harddisc]].&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
HDCPM has been developed with [[WinApe]] Z80 Assembler and was tested with [[WinApe]], [[CPCemu]], an Amstrad Plus 464 upgraded to 6128 an Amstrad CPC 6128 and an Amstrad CPC 464 with [https://www.cpcwiki.eu/index.php/Universal_512K_and_1MByte_RAM_Expansions Universal 512K RAM Expansion].&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
HDCPM distribution disk contains the following files:&lt;br /&gt;
* HDCPM.ROM the ROM itself&lt;br /&gt;
* HDCPM.BIN the executable binary file&lt;br /&gt;
* HDMGR.COM Hard Disk Manager utility&lt;br /&gt;
* RTC.COM RTC synchronization utility&lt;br /&gt;
* MAKEIMG.BAS CP/M image file creation utility&lt;br /&gt;
* MAKEIMG.BIN CP/M image file creation binary&lt;br /&gt;
* MAKEIMG.EXE CP/M image file creation utility for [[SymbOS]]&lt;br /&gt;
* HDCPM.DOC the User guide&lt;br /&gt;
&lt;br /&gt;
HDCPM is free software. It can be used and distributed with no restrictions.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Prerequisites==&lt;br /&gt;
* Amstrad CPC/Plus computer capable of running CP/M Plus.&lt;br /&gt;
* ROM box or other ROM expansion hardware if using the ROM.&lt;br /&gt;
* Optionaly a FAT aware DOS like M4 ROM, USIfAC ROM, [[UniDOS]], [https://www.cpcwiki.eu/forum/applications/cubeios-fat16fat32-rom-for-the-cpc's-with-xmass/ CubeMDOS] etc if using the binary.&lt;br /&gt;
* One of the following mass storage interfaces:&lt;br /&gt;
** [[SYMBiFACE II]]&lt;br /&gt;
** [[X-Mass]]&lt;br /&gt;
** [https://github.com/salafek/cyboard-for-cpc Cyboard]&lt;br /&gt;
** [[uIDE 16]] (base address = &amp;amp;FEF0)&lt;br /&gt;
** [[M4 Board]]&lt;br /&gt;
** [[USIFAC]] II/[[ULIfAC]]&lt;br /&gt;
** [http://www.tmtlogic.com/ Symbiface III]&lt;br /&gt;
** [[Albireo]] (SD card only)&lt;br /&gt;
* Compatible storage device with enough free space to accommodate the desirable CP/M hard disk configuration.&lt;br /&gt;
* Floppy disk drive for initialization of the file system.&lt;br /&gt;
* CP/M Plus system disks for making the system bootable.&lt;br /&gt;
* Optionally a [[SYMBiFACE II]] compatible RTC.&lt;br /&gt;
&lt;br /&gt;
==Restrictions==&lt;br /&gt;
* CP/M 2.2 or lower is not supported.&lt;br /&gt;
* 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.&lt;br /&gt;
* Only the master IDE device is accessible by HDCPM.&lt;br /&gt;
* The maximum number of hard disk partition/images supported is four.&lt;br /&gt;
* Only primary partitions are supported.&lt;br /&gt;
* If you want to use CP/M disk images then they must be stored in a FAT16 or FAT32 formatted disk or partition.&lt;br /&gt;
* If the hard disk is partitioned then the CP/M disk images must be placed in the first partition of the disk.&lt;br /&gt;
* The CP/M disk images must be placed in the root directory of the FAT file system.&lt;br /&gt;
* The CP/M disk images must NOT be fragmented and must have the correct size.&lt;br /&gt;
* 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. &lt;br /&gt;
* Only storage devices with 512 bytes sector size are supported.&lt;br /&gt;
* Only storage devices with LBA addressing are supported.&lt;br /&gt;
* Date stamps of CP/M disk image files are not maintained.&lt;br /&gt;
* 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 letters for your IDE media then the corresponding HD20 partitions will be unavailable under CP/M.&lt;br /&gt;
&lt;br /&gt;
==How it works==&lt;br /&gt;
===Using the ROM===&lt;br /&gt;
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:&lt;br /&gt;
|HDCPM (no TIME function support) or |HDCPMT (TIME function support)&amp;lt;br /&amp;gt;&lt;br /&gt;
Alternatively it can be started by holding down the Tab key (no TIME function support) or Shift+Tab (TIME function support), during power-up.&amp;lt;br /&amp;gt;&lt;br /&gt;
===Using the binary===&lt;br /&gt;
HDCPM can be started by running the HDCPM.BIN file from floppy drive or mass storage.&amp;lt;br /&amp;gt;&lt;br /&gt;
===Functions===&lt;br /&gt;
HDCPM will then execute the following functions:&amp;lt;br /&amp;gt;&lt;br /&gt;
* Search for a compatible mass storage interface.&lt;br /&gt;
* Initialize the mass storage interface if needed.&lt;br /&gt;
* Move the boot loader and the CP/M patcher to RAM.&lt;br /&gt;
* Mount 1 to 4 CP/M image files and/or partitions and perform fragmentation and size test.&lt;br /&gt;
* 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.&lt;br /&gt;
* Read the .EMS file from the reserved track and store it in RAM just as the normal CP/M Plus boot loader does.&lt;br /&gt;
* 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.&lt;br /&gt;
* Patch the floppy disk drive routines in case a FDC's not been found.&lt;br /&gt;
* Patch the SCB in order to change the startup/default drive.&lt;br /&gt;
* 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 memory expansion]] or [[Dobbertin Memory Expansion]] driver is present.&lt;br /&gt;
* Move the ALV of the Dk'tronics RAM disk if [[Z-System]] has been detected.&lt;br /&gt;
* Patch the CP/M console with the desired colour scheme. &lt;br /&gt;
* Patch the system message.&lt;br /&gt;
* Do a normal CP/M cold start.&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==CP/M Plus disk image files==&lt;br /&gt;
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 [https://hexed.it/ hexed.it] or any hex editor capable of creating binary files filled with a specific pattern.&amp;lt;br /&amp;gt;&lt;br /&gt;
In case of hexed.it select 'New file' fill in 'Size of the new file = 8519680' and 'Fill Pattern = 0xE5' and press apply. Save the file as CPMDSK01.IMG&amp;lt;br /&amp;gt;&lt;br /&gt;
If you have a FAT capable DOS installed in your AMSTRAD you can use the provided MAKEIMG.BAS utility to create your image file. Keep in mind that it takes more than 1.5 hour for a 8MB image file to be created that way.&amp;lt;br /&amp;gt;&lt;br /&gt;
CP/M disk image files can be accessed by a modern computer with [http://www.moria.de/~michael/cpmtools/ cpmtools]. Use the command |HDDEF to see the record you must insert in the diskdefs file.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The HDCPM record for diskdefs is:&lt;br /&gt;
&lt;br /&gt;
       diskdef hdcpm&lt;br /&gt;
          seclen 512&lt;br /&gt;
          tracks 65&lt;br /&gt;
          sectrk 256&lt;br /&gt;
          blocksize 8192&lt;br /&gt;
          maxdir 1024&lt;br /&gt;
          skew 0&lt;br /&gt;
          boottrk 1&lt;br /&gt;
          os 3&lt;br /&gt;
       end&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
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. [https://www.cpcwiki.eu/index.php/Albireo Albireo] incorporates a file management IC that performs FAT file system operations and handles fragmented files properly. In such case fragmented image files is not a problem. HDCPM will never fragment a CP/M image file.&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Hdcpm-boot-m4.png|thumb|HDCPM binary booting on M4 Board]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==CP/M Plus disk/partitions==&lt;br /&gt;
You can also create one or more partitions in order to format them to [http://www.seasip.info/Cpm/format31.html CP/M-80] 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.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM examines the hard disk's MBR upon start and finds the partition information. Then it finds the LBA of the first sector of each partition and passes it to the CP/M hard disk driver. The CP/M hard disk driver doesn't know anything about partitions. It accesses the partition as if it was a real hard disk.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:hdcpm-ui-boot.png|thumb|HDCPM ROM booting on uIDE-16]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
===Using the ROM===&lt;br /&gt;
* Install the HDCPM ROM in a free ROM slot of your ROM box.&lt;br /&gt;
* Plug in your mass storage interface and attach the proper mass storage device.&lt;br /&gt;
* 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 shown inside the parentheses:&amp;lt;br /&amp;gt;&lt;br /&gt;
** (S2): [[SYMBiFACE II]] compatible interface&lt;br /&gt;
** (uI): [[uIDE 16]] interface&lt;br /&gt;
** (M4): [[M4 Board]]&lt;br /&gt;
** (US): [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II]&lt;br /&gt;
** (S3): [http://www.tmtlogic.com/ Symbiface III]&lt;br /&gt;
** (AL): [[Albireo]]&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:hdcpm-s2.png|thumb|HDCPM ROM - SYMBiFACE II]]&lt;br /&gt;
|[[File:hdcpm-ui.png|thumb|HDCPM ROM - uIDE-16]]&lt;br /&gt;
|[[File:hdcpm-m4.png|thumb|HDCPM ROM - M4 Board]]&lt;br /&gt;
|}&lt;br /&gt;
{|&lt;br /&gt;
|[[File:hdcpm-us.png|thumb|HDCPM ROM - USIfAC II]]&lt;br /&gt;
|[[File:hdcpm-s3.png|thumb|HDCPM ROM - Symbiface III]]&lt;br /&gt;
|[[File:hdcpm-al.png|thumb|HDCPM ROM - Albireo]]&lt;br /&gt;
|}&lt;br /&gt;
In case a RTC is detected you will also see the RTC initialization message and the current date and time: ''RTC found: 2021/01/01 12:01:01''&lt;br /&gt;
* Use your original CP/M Plus system disk set to Boot CP/M Plus.&lt;br /&gt;
* 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.&lt;br /&gt;
* Reset your AMSTRAD and boot CP/M from the hard disk with the command |HDCPM. The Boot loader will check your image file(s) against fragmentation and correct size and boot the system to the CP/M command prompt. If the first image file is fragmented or has the wrong length the system will not boot. All other image files will be ignored if found to be fragmented or have the wrong length.&lt;br /&gt;
* In case you don't use CP/M image files just boot the system with |HDCPM or |HDCPMT&lt;br /&gt;
* Copy the files from your CP/M system floppy disks to the first hard disk.&lt;br /&gt;
* Copy any other needed application etc. to your CP/M hard disk(s).&lt;br /&gt;
* You are ready to go.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Using the binary===&lt;br /&gt;
* Plug in your mass storage interface and attach the proper mass storage device.&lt;br /&gt;
* Use your original CP/M Plus system disk set to Boot CP/M Plus.&lt;br /&gt;
* 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.&lt;br /&gt;
* 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.&lt;br /&gt;
* You are ready to go.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==ROM commands==&lt;br /&gt;
[[File:hdcpm-us-boot.png|thumb|HDCPM ROM booting on USIfAC II]]&lt;br /&gt;
* |HDCPM mounts the hard disks and boots CP/M Plus. If [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] is used enable the USB disk with the |USB command first.&lt;br /&gt;
* |HDCPMT works like |HDCPM but also utilizes the RTC.&lt;br /&gt;
* |HDDPB shows the Disk Parameter Block.&lt;br /&gt;
* |HDDEF shows the diskdefs entry for CP/M tools and the file system size.&lt;br /&gt;
* |DATE displays the current date.&lt;br /&gt;
* |TIME displays the current time. If [[M4 Board]] is used |DATE and |TIME will be redirected to M4 |TIME.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==The HDCPM binary file==&lt;br /&gt;
* If [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] is used, use your PC to copy HDCPM.BIN to your USB flash disk. Then insert it to your [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] power up your Amstrad and enable the USB disk with the |USB command.&lt;br /&gt;
* Execute the file from the floppy disk or from your mass storage device with ''RUN&amp;quot;HDCPM&amp;quot;''. 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.&lt;br /&gt;
*  [[M4 Board]] and [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ 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 [https://www.cpcwiki.eu/forum/applications/cubeios-fat16fat32-rom-for-the-cpc's-with-xmass/ CubeMDOS] or [[UniDOS]], installed.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==The MAKEIMG.BAS and MAKEIMG.EXE utilities==&lt;br /&gt;
===MAKEIMG.BAS===&lt;br /&gt;
Although this utility should not be your first option, you can use it to make a new empty CP/M disk image file.&amp;lt;br /&amp;gt;&lt;br /&gt;
In case you decide to use it make sure you have a FAT aware DOS installed in your system. MAKEIMG makes use of the firmware calls CAS_OUT_OPEN, CAS_OUT_CLOSE and CAS_OUT_CHAR so your DOS must support them.&amp;lt;br /&amp;gt;&lt;br /&gt;
Copy the files MAKEIMG.BAS and MAKEIMG.BIN to the root directory of your FAT formatted hard disk and make it your current drive. Run the utility with ''RUN&amp;quot;MAKEIMG&amp;quot;'' and don't hold your breath!&amp;lt;br /&amp;gt;&lt;br /&gt;
Making an image file this way takes more than 1.5 hour for an 8MB file so literally... don't hold your breath.&amp;lt;br /&amp;gt;&lt;br /&gt;
Here is a small tutorial on how to setup and use a CP/M image file: https://youtu.be/GMWsRzNhQTM&amp;lt;br /&amp;gt;&lt;br /&gt;
===MAKEIMG.EXE===&lt;br /&gt;
This utility is a [[SymbOS]] application.&amp;lt;br /&amp;gt;&lt;br /&gt;
Use this utility to create your CP/M hard disk images from within [[SymbOS]]. 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.&amp;lt;br /&amp;gt;&lt;br /&gt;
MAKEIMG.EXE has been developed with [http://www.symbos.de/quigs.htm Quigs] for [[SymbOS]].&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Hdcpm-makeimg-sym1.png|thumb|MAKEIMG.EXE in action]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==The HDMGR.COM utility==&lt;br /&gt;
This is the Hard Disk Manager utility.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can use this utility to get information about your hard disk geometry, disk image files, partitions and boot sector. You have to use this utility to format a hard disk, disk image file or partition to CP/M format or manipulate the boot sector of the hard disk and/or transfer an .EMS system file to the reserved track of the hard disk.&amp;lt;br /&amp;gt;&lt;br /&gt;
The boot sector contains information about the CP/M disk drive letters, start-up drive and console colour scheme. All those properties can be changed with HDMGR.COM.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR will perform a fragmentation test of the discovered CP/M hard disk image files uppon execution (not for Albireo).&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
The HDMGR.COM utility is self explanatory. Just run it from the CP/M command prompt.&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Hdcpm-hdmgr-m.png|thumb|HDMGR main menu]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-1.png|thumb|HDMGR Hardware information]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-2.png|thumb|HDMGR Partition information]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-3.png|thumb|HDMGR CP/M disk image information]]&lt;br /&gt;
|}&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Hdcpm-hdmgr-4.png|thumb|HDMGR Boot sector information]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-5.png|thumb|HDMGR Log disk]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-7.png|thumb|HDMGR Manage boot sector]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-8.png|thumb|HDMGR Transfer CP/M to disk]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==The RTC.COM utility==&lt;br /&gt;
You can make use of the RTC.COM utility in order to keep CP/M date and time updated.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can synchronize the date and time of CP/M Plus with the RTC by running ''RTC -G'' manually or via your PROFILE.SUB.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can also set your RTC to the current CP/M date and time by running ''RTC -S'' (not for M4 board)&amp;lt;br /&amp;gt;&lt;br /&gt;
Currently RTC.COM works with the RTC found in Symbiface II, Symbiface III and M4 board (read only).&amp;lt;br /&amp;gt;&lt;br /&gt;
DATE.COM, DIR.COM and SHOW.COM commands, patched for Year 2000 compatibility can be downloaded from the [http://www.cpm.z80.de/binary.html CP/M source archive - Digital Research Binary files section] .&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Error messages==&lt;br /&gt;
===ROM checksum error===&lt;br /&gt;
* ''*** HDCPM ROM checksum error ***&lt;br /&gt;
	The ROM has failed the checksum test.&lt;br /&gt;
	The contents are probably corrupted. The ROM will not be initialized.&lt;br /&gt;
&lt;br /&gt;
===Hard disk errors===&lt;br /&gt;
* ''*** No mass storage found ***''&lt;br /&gt;
	No compatible mass storage interface can be found.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: DISK I/O''&lt;br /&gt;
	I/O error occurred during the last read/write operation.&lt;br /&gt;
	Your hard disk might be defect or the USB disk is not enabled.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: INVALID BOOT SECTOR''&lt;br /&gt;
	No FAT or CP/M boot sector was found in a not partitioned hard disk.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: INVALID FILE SYSTEM''&lt;br /&gt;
	The first partition in a partitioned hard disk is not a FAT or CP/M-80&lt;br /&gt;
	one.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: INVALID SECTOR SIZE''&lt;br /&gt;
	The hard disk used has a sector size not equal to 512 bytes.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: CPMDSK01.IMG NOT FOUND''&lt;br /&gt;
	The CP/M image file named CPMDSK01.IMG can't be found in the FAT&lt;br /&gt;
	formatted hard disk or partition. &lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: CP/M SYSTEM FILE NOT FOUND''&lt;br /&gt;
	The .EMS CP/M system file can't be found in the system track of your&lt;br /&gt;
	CP/M partition or image file.&lt;br /&gt;
	&lt;br /&gt;
*  ''ERROR: CPMDSK01.IMG IS FRAGMENTED''&lt;br /&gt;
	The first CP/M image file is fragmented, the system won't mount it.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: CPMDSK01.IMG HAS WRONG LENGTH''&lt;br /&gt;
	The first CP/M image file has wrong length, the system won't mount it.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: CPMDSK01.IMG IS NOT FORMATTED''&lt;br /&gt;
	The first CP/M image file is not formatted to CP/M-80 format, the&lt;br /&gt;
	system won't mount it. Use the HDMGR.COM utility to format it.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: INCOMPATIBLE EMS FILE''&lt;br /&gt;
	The .EMS system file that was loaded from the system track is not&lt;br /&gt;
	compatible with HDCPM.&lt;br /&gt;
&lt;br /&gt;
===RTC errors===&lt;br /&gt;
* ''*** Battery depleted ***''&lt;br /&gt;
	The RTC battery is depleted. The RTC driver will continue to operate&lt;br /&gt;
	normally but the readings are not reliable. Replace the RTC battery.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Release info &amp;amp; download==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Version !! Changes !! Download&lt;br /&gt;
|-&lt;br /&gt;
| v1.00 December 2021 || Initial release || [[Media:hdcpm100.dsk|hdcpm100.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.01 January 2022 || HDCPM.ROM, HDMGR.COM: code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: (bug fix) fragmented file detection was not working properly unless the file was CPMDSK01.IMG&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: (bug fix) unformatted image file detection was not working properly. New error message added.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) CP/M drive table wasn't patched properly.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) initialization of floppy drive(s) was corrupted due to misplaced code.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: added .EMS file compatibility check. New error message added.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: added support for Dobbertin RAM disk driver.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: added compatibility with Dobbertin HD20 Harddisc&amp;lt;br /&amp;gt;&lt;br /&gt;
MAKEIMG.EXE: added utility for creating an image file from within SYMBOS.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&lt;br /&gt;
|| [[Media:hdcpm101.dsk|hdcpm101.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.02 March 2022 || HDCPM.ROM, HDMGR.COM: added support for M4 board.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: added support for uIDE-16 interface.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) the ROM was initialized even if no compatible interface was found.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: error message change.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: option &amp;quot;F&amp;quot; has been removed. HDCPM will always do a disk fragmentation test during boot.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: power up message changed in order to provide information about the type of the detected interface.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: two bytes of RAM will be reserved by the ROM for storing the interface type and M4 ROM number.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&lt;br /&gt;
|| [[Media:hdcpm102.dsk|hdcpm102.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.03 April 2022 || HDCPM.ROM, HDMGR.COM: added support for USIfAC II.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) uIDE-16 detection was broken.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&lt;br /&gt;
|| [[Media:hdcpm103.dsk|hdcpm103.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.04 June 2022|| HDCPM.ROM: code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.BIN: added executable binary file version of HDCPM.&lt;br /&gt;
|| [[Media:hdcpm104.dsk|hdcpm104.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.05 July 2022 || HDCPM.ROM, HDCPM.BIN, HDMGR.COM: added support for Symbiface III.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDCPM.BIN:  code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR.COM: Hardware info added for USIfAC II&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR.COM: (bug fix) the 'Select boot file' menu was garbled if there were 8 or more .EMS files present.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&lt;br /&gt;
|| [[Media:hdcpm105.dsk|hdcpm105.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.06 January 2023 || HDCPM.ROM, HDCPM.BIN, HDMGR.COM: added support for Albireo.&amp;lt;br /&amp;gt;&lt;br /&gt;
RTC.COM: added support for M4 Board (r/o) and Symbiface 3.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDCPM.BIN: (bug fix) CPC was freezing after mounting the CP/M disk(s) with incompatible .EMS file.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR.COM: (bug fix) the Stack was overflowed in some rare cases.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&amp;lt;br /&amp;gt;&lt;br /&gt;
|| [[Media:hdcpm106.dsk|hdcpm106.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.10 September 2023 || HDCPM.ROM, HDCPM.BIN: added support for CPC464 with &amp;amp;C3 mode compatible RAM expansion card.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDCPM.BIN: can now boot CP/M Plus on a CPC that has no or faulty Floppy Disc Controller present.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: ROM checksum test and new error message added.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: removed blank line from ROM initialization message.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDCPM.BIN, HDMGR.COM:  code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDCPM.BIN: (bug fix) incorrect patching would corrupt the Dobbertin RAM drive on CP/M Plus v1.1&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) |HDDPB was displaying wrong values&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR.COM: (bug fix) a corruption of the MBR of USB/SD card occured in some rare cases.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&amp;lt;br /&amp;gt;&lt;br /&gt;
|| [[Media:hdcpm110.dsk|hdcpm110.dsk]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Other downloads==&lt;br /&gt;
*[[Media:CPMDSK01&amp;amp;02.zip|CP/M disk images]] - CPMDSK01.IMG is bootable and contains all the files of the 3 CP/M Plus system disks and year 2000 compliant binaries downloaded from the [http://www.cpm.z80.de/binary.html Digital Research Binary Files]. CPMDSK02.IMG is empty and can also be used as a template.&amp;lt;br /&amp;gt;&lt;br /&gt;
*[[Media:Z3Plus.part1.rar|ZPM3+ZCCP disk image part 1]] , [[Media:Z3Plus.part2.rar|ZPM3+ZCCP disk image part 2]] - The Amstrad BDOS and CCP have been replaced with their counterparts [https://github.com/wwarthen/CPU280/tree/master/ZPM3/zpm3.txt ZPM3] and [https://github.com/wwarthen/CPU280/tree/master/ZCCP/zccp.txt ZCCP] written by Simeon Cran. It is [https://www.cpcwiki.eu/index.php/Z-System Z-system, Z3Plus] compatible and contains the Z3Plus system files, all the files of the 3 CP/M Plus system disks, year 2000 compliant binaries and also contains some useful tools, help files and manuals.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Videos==&lt;br /&gt;
* [https://youtu.be/GMWsRzNhQTM How to create and prepare a CP/M image file in a FAT formatted hard disk]&lt;br /&gt;
* [https://youtu.be/nxow6Y5O4Dc Hard disk utilization and dual boot]&lt;br /&gt;
* [https://youtu.be/em7dHOdaylg How to create a CP/M image file under SYMBOS]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
[[category:Expansion ROM]] [[category:Applications]] [[category:CP/M]]&lt;/div&gt;</summary>
		<author><name>D kef</name></author>	</entry>

	<entry>
		<id>https://oldwiki.cpcwiki.eu/index.php?title=File:Hdcpm110.dsk&amp;diff=112668</id>
		<title>File:Hdcpm110.dsk</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.cpcwiki.eu/index.php?title=File:Hdcpm110.dsk&amp;diff=112668"/>
				<updated>2023-09-16T09:30:03Z</updated>
		
		<summary type="html">&lt;p&gt;D kef: D kef uploaded a new version of File:Hdcpm110.dsk&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>D kef</name></author>	</entry>

	<entry>
		<id>https://oldwiki.cpcwiki.eu/index.php?title=File:Hdcpm110.dsk&amp;diff=112667</id>
		<title>File:Hdcpm110.dsk</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.cpcwiki.eu/index.php?title=File:Hdcpm110.dsk&amp;diff=112667"/>
				<updated>2023-09-16T09:25:06Z</updated>
		
		<summary type="html">&lt;p&gt;D kef: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>D kef</name></author>	</entry>

	<entry>
		<id>https://oldwiki.cpcwiki.eu/index.php?title=HDCPM&amp;diff=112666</id>
		<title>HDCPM</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.cpcwiki.eu/index.php?title=HDCPM&amp;diff=112666"/>
				<updated>2023-09-16T09:15:38Z</updated>
		
		<summary type="html">&lt;p&gt;D kef: /* Release info &amp;amp; download */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;HDCPM is a Hard Disk boot loader for [[CP/M]] Plus, developed by d_kef&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can read more about the development of the application here:&amp;lt;br /&amp;gt;&lt;br /&gt;
https://www.cpcwiki.eu/forum/applications/hdcpm-boot-and-run-cpm-plus-from-hard-disk/&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:hdcpm.gif|HDCPM booting CP/M Plus]]&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It comes in the form of:&lt;br /&gt;
* a standard background ROM that can be installed in any available ROM position.&lt;br /&gt;
* a standard binary file that can be loaded from floppy or hard drive.&lt;br /&gt;
&lt;br /&gt;
 	&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following configurations are possible with one hard disk:&lt;br /&gt;
&lt;br /&gt;
* One not partitioned, CP/M formatted hard disk. The whole hard disk is used by CP/M.&lt;br /&gt;
* One to four CP/M formatted partitions. Every partition is accessed as a separate hard disk by CP/M.&lt;br /&gt;
* 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.&lt;br /&gt;
* 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.&lt;br /&gt;
* For interfaces that use SD card or USB flash drive as a mass storage device ([[M4 Board]], [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II], [http://www.tmtlogic.com/ Symbiface III] or [[Albireo]]) the only supported configuration is one to four CP/M disk image files in the root directory of the FAT file system.&lt;br /&gt;
	&lt;br /&gt;
Currently only the master IDE device can be accessed by HDCPM. The slave device is available to be used by your favourite DOS.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
HDCPM can also utilize the RTC found in the [[SYMBiFACE II]] in order to implement CP/M Plus BIOS function 26: TIME.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
HDCPM is compatible and can be used together with the [[Dobbertin Harddisc]].&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
HDCPM has been developed with [[WinApe]] Z80 Assembler and was tested with [[WinApe]], [[CPCemu]], an Amstrad Plus 464 upgraded to 6128 an Amstrad CPC 6128 and an Amstrad CPC 464 with [https://www.cpcwiki.eu/index.php/Universal_512K_and_1MByte_RAM_Expansions Universal 512K RAM Expansion].&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
HDCPM distribution disk contains the following files:&lt;br /&gt;
* HDCPM.ROM the ROM itself&lt;br /&gt;
* HDCPM.BIN the executable binary file&lt;br /&gt;
* HDMGR.COM Hard Disk Manager utility&lt;br /&gt;
* RTC.COM RTC synchronization utility&lt;br /&gt;
* MAKEIMG.BAS CP/M image file creation utility&lt;br /&gt;
* MAKEIMG.BIN CP/M image file creation binary&lt;br /&gt;
* MAKEIMG.EXE CP/M image file creation utility for [[SymbOS]]&lt;br /&gt;
* HDCPM.DOC the User guide&lt;br /&gt;
&lt;br /&gt;
HDCPM is free software. It can be used and distributed with no restrictions.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Prerequisites==&lt;br /&gt;
* Amstrad CPC/Plus computer capable of running CP/M Plus.&lt;br /&gt;
* ROM box or other ROM expansion hardware if using the ROM.&lt;br /&gt;
* Optionaly a FAT aware DOS like M4 ROM, USIfAC ROM, [[UniDOS]], [https://www.cpcwiki.eu/forum/applications/cubeios-fat16fat32-rom-for-the-cpc's-with-xmass/ CubeMDOS] etc if using the binary.&lt;br /&gt;
* One of the following mass storage interfaces:&lt;br /&gt;
** [[SYMBiFACE II]]&lt;br /&gt;
** [[X-Mass]]&lt;br /&gt;
** [https://github.com/salafek/cyboard-for-cpc Cyboard]&lt;br /&gt;
** [[uIDE 16]] (base address = &amp;amp;FEF0)&lt;br /&gt;
** [[M4 Board]]&lt;br /&gt;
** [[USIFAC]] II/[[ULIfAC]]&lt;br /&gt;
** [http://www.tmtlogic.com/ Symbiface III]&lt;br /&gt;
** [[Albireo]] (SD card only)&lt;br /&gt;
* Compatible storage device with enough free space to accommodate the desirable CP/M hard disk configuration.&lt;br /&gt;
* Floppy disk drive for initialization of the file system.&lt;br /&gt;
* CP/M Plus system disks for making the system bootable.&lt;br /&gt;
* Optionally a [[SYMBiFACE II]] compatible RTC.&lt;br /&gt;
&lt;br /&gt;
==Restrictions==&lt;br /&gt;
* CP/M 2.2 or lower is not supported.&lt;br /&gt;
* 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.&lt;br /&gt;
* Only the master IDE device is accessible by HDCPM.&lt;br /&gt;
* The maximum number of hard disk partition/images supported is four.&lt;br /&gt;
* Only primary partitions are supported.&lt;br /&gt;
* If you want to use CP/M disk images then they must be stored in a FAT16 or FAT32 formatted disk or partition.&lt;br /&gt;
* If the hard disk is partitioned then the CP/M disk images must be placed in the first partition of the disk.&lt;br /&gt;
* The CP/M disk images must be placed in the root directory of the FAT file system.&lt;br /&gt;
* The CP/M disk images must NOT be fragmented and must have the correct size.&lt;br /&gt;
* 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. &lt;br /&gt;
* Only storage devices with 512 bytes sector size are supported.&lt;br /&gt;
* Only storage devices with LBA addressing are supported.&lt;br /&gt;
* Date stamps of CP/M disk image files are not maintained.&lt;br /&gt;
* 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 letters for your IDE media then the corresponding HD20 partitions will be unavailable under CP/M.&lt;br /&gt;
&lt;br /&gt;
==How it works==&lt;br /&gt;
===Using the ROM===&lt;br /&gt;
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:&lt;br /&gt;
|HDCPM (no TIME function support) or |HDCPMT (TIME function support)&amp;lt;br /&amp;gt;&lt;br /&gt;
Alternatively it can be started by holding down the Tab key (no TIME function support) or Shift+Tab (TIME function support), during power-up.&amp;lt;br /&amp;gt;&lt;br /&gt;
===Using the binary===&lt;br /&gt;
HDCPM can be started by running the HDCPM.BIN file from floppy drive or mass storage.&amp;lt;br /&amp;gt;&lt;br /&gt;
===Functions===&lt;br /&gt;
HDCPM will then execute the following functions:&amp;lt;br /&amp;gt;&lt;br /&gt;
* Search for a compatible mass storage interface.&lt;br /&gt;
* Initialize the mass storage interface if needed.&lt;br /&gt;
* Move the boot loader and the CP/M patcher to RAM.&lt;br /&gt;
* Mount 1 to 4 CP/M image files and/or partitions and perform fragmentation and size test.&lt;br /&gt;
* 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.&lt;br /&gt;
* Read the .EMS file from the reserved track and store it in RAM just as the normal CP/M Plus boot loader does.&lt;br /&gt;
* 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.&lt;br /&gt;
* Patch the floppy disk drive routines in case a FDC's not been found.&lt;br /&gt;
* Patch the SCB in order to change the startup/default drive.&lt;br /&gt;
* 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 memory expansion]] or [[Dobbertin Memory Expansion]] driver is present.&lt;br /&gt;
* Move the ALV of the Dk'tronics RAM disk if [[Z-System]] has been detected.&lt;br /&gt;
* Patch the CP/M console with the desired colour scheme. &lt;br /&gt;
* Patch the system message.&lt;br /&gt;
* Do a normal CP/M cold start.&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==CP/M Plus disk image files==&lt;br /&gt;
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 [https://hexed.it/ hexed.it] or any hex editor capable of creating binary files filled with a specific pattern.&amp;lt;br /&amp;gt;&lt;br /&gt;
In case of hexed.it select 'New file' fill in 'Size of the new file = 8519680' and 'Fill Pattern = 0xE5' and press apply. Save the file as CPMDSK01.IMG&amp;lt;br /&amp;gt;&lt;br /&gt;
If you have a FAT capable DOS installed in your AMSTRAD you can use the provided MAKEIMG.BAS utility to create your image file. Keep in mind that it takes more than 1.5 hour for a 8MB image file to be created that way.&amp;lt;br /&amp;gt;&lt;br /&gt;
CP/M disk image files can be accessed by a modern computer with [http://www.moria.de/~michael/cpmtools/ cpmtools]. Use the command |HDDEF to see the record you must insert in the diskdefs file.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The HDCPM record for diskdefs is:&lt;br /&gt;
&lt;br /&gt;
       diskdef hdcpm&lt;br /&gt;
          seclen 512&lt;br /&gt;
          tracks 65&lt;br /&gt;
          sectrk 256&lt;br /&gt;
          blocksize 8192&lt;br /&gt;
          maxdir 1024&lt;br /&gt;
          skew 0&lt;br /&gt;
          boottrk 1&lt;br /&gt;
          os 3&lt;br /&gt;
       end&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
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. [https://www.cpcwiki.eu/index.php/Albireo Albireo] incorporates a file management IC that performs FAT file system operations and handles fragmented files properly. In such case fragmented image files is not a problem. HDCPM will never fragment a CP/M image file.&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Hdcpm-boot-m4.png|thumb|HDCPM binary booting on M4 Board]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==CP/M Plus disk/partitions==&lt;br /&gt;
You can also create one or more partitions in order to format them to [http://www.seasip.info/Cpm/format31.html CP/M-80] 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.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM examines the hard disk's MBR upon start and finds the partition information. Then it finds the LBA of the first sector of each partition and passes it to the CP/M hard disk driver. The CP/M hard disk driver doesn't know anything about partitions. It accesses the partition as if it was a real hard disk.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:hdcpm-ui-boot.png|thumb|HDCPM ROM booting on uIDE-16]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
===Using the ROM===&lt;br /&gt;
* Install the HDCPM ROM in a free ROM slot of your ROM box.&lt;br /&gt;
* Plug in your mass storage interface and attach the proper mass storage device.&lt;br /&gt;
* 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 shown inside the parentheses:&amp;lt;br /&amp;gt;&lt;br /&gt;
** (S2): [[SYMBiFACE II]] compatible interface&lt;br /&gt;
** (uI): [[uIDE 16]] interface&lt;br /&gt;
** (M4): [[M4 Board]]&lt;br /&gt;
** (US): [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II]&lt;br /&gt;
** (S3): [http://www.tmtlogic.com/ Symbiface III]&lt;br /&gt;
** (AL): [[Albireo]]&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:hdcpm-s2.png|thumb|HDCPM ROM - SYMBiFACE II]]&lt;br /&gt;
|[[File:hdcpm-ui.png|thumb|HDCPM ROM - uIDE-16]]&lt;br /&gt;
|[[File:hdcpm-m4.png|thumb|HDCPM ROM - M4 Board]]&lt;br /&gt;
|}&lt;br /&gt;
{|&lt;br /&gt;
|[[File:hdcpm-us.png|thumb|HDCPM ROM - USIfAC II]]&lt;br /&gt;
|[[File:hdcpm-s3.png|thumb|HDCPM ROM - Symbiface III]]&lt;br /&gt;
|[[File:hdcpm-al.png|thumb|HDCPM ROM - Albireo]]&lt;br /&gt;
|}&lt;br /&gt;
In case a RTC is detected you will also see the RTC initialization message and the current date and time: ''RTC found: 2021/01/01 12:01:01''&lt;br /&gt;
* Use your original CP/M Plus system disk set to Boot CP/M Plus.&lt;br /&gt;
* 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.&lt;br /&gt;
* Reset your AMSTRAD and boot CP/M from the hard disk with the command |HDCPM. The Boot loader will check your image file(s) against fragmentation and correct size and boot the system to the CP/M command prompt. If the first image file is fragmented or has the wrong length the system will not boot. All other image files will be ignored if found to be fragmented or have the wrong length.&lt;br /&gt;
* In case you don't use CP/M image files just boot the system with |HDCPM or |HDCPMT&lt;br /&gt;
* Copy the files from your CP/M system floppy disks to the first hard disk.&lt;br /&gt;
* Copy any other needed application etc. to your CP/M hard disk(s).&lt;br /&gt;
* You are ready to go.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Using the binary===&lt;br /&gt;
* Plug in your mass storage interface and attach the proper mass storage device.&lt;br /&gt;
* Use your original CP/M Plus system disk set to Boot CP/M Plus.&lt;br /&gt;
* 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.&lt;br /&gt;
* 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.&lt;br /&gt;
* You are ready to go.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==ROM commands==&lt;br /&gt;
[[File:hdcpm-us-boot.png|thumb|HDCPM ROM booting on USIfAC II]]&lt;br /&gt;
* |HDCPM mounts the hard disks and boots CP/M Plus. If [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] is used enable the USB disk with the |USB command first.&lt;br /&gt;
* |HDCPMT works like |HDCPM but also utilizes the RTC.&lt;br /&gt;
* |HDDPB shows the Disk Parameter Block.&lt;br /&gt;
* |HDDEF shows the diskdefs entry for CP/M tools and the file system size.&lt;br /&gt;
* |DATE displays the current date.&lt;br /&gt;
* |TIME displays the current time. If [[M4 Board]] is used |DATE and |TIME will be redirected to M4 |TIME.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==The HDCPM binary file==&lt;br /&gt;
* If [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] is used, use your PC to copy HDCPM.BIN to your USB flash disk. Then insert it to your [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] power up your Amstrad and enable the USB disk with the |USB command.&lt;br /&gt;
* Execute the file from the floppy disk or from your mass storage device with ''RUN&amp;quot;HDCPM&amp;quot;''. 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.&lt;br /&gt;
*  [[M4 Board]] and [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ 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 [https://www.cpcwiki.eu/forum/applications/cubeios-fat16fat32-rom-for-the-cpc's-with-xmass/ CubeMDOS] or [[UniDOS]], installed.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==The MAKEIMG.BAS and MAKEIMG.EXE utilities==&lt;br /&gt;
===MAKEIMG.BAS===&lt;br /&gt;
Although this utility should not be your first option, you can use it to make a new empty CP/M disk image file.&amp;lt;br /&amp;gt;&lt;br /&gt;
In case you decide to use it make sure you have a FAT aware DOS installed in your system. MAKEIMG makes use of the firmware calls CAS_OUT_OPEN, CAS_OUT_CLOSE and CAS_OUT_CHAR so your DOS must support them.&amp;lt;br /&amp;gt;&lt;br /&gt;
Copy the files MAKEIMG.BAS and MAKEIMG.BIN to the root directory of your FAT formatted hard disk and make it your current drive. Run the utility with ''RUN&amp;quot;MAKEIMG&amp;quot;'' and don't hold your breath!&amp;lt;br /&amp;gt;&lt;br /&gt;
Making an image file this way takes more than 1.5 hour for an 8MB file so literally... don't hold your breath.&amp;lt;br /&amp;gt;&lt;br /&gt;
Here is a small tutorial on how to setup and use a CP/M image file: https://youtu.be/GMWsRzNhQTM&amp;lt;br /&amp;gt;&lt;br /&gt;
===MAKEIMG.EXE===&lt;br /&gt;
This utility is a [[SymbOS]] application.&amp;lt;br /&amp;gt;&lt;br /&gt;
Use this utility to create your CP/M hard disk images from within [[SymbOS]]. 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.&amp;lt;br /&amp;gt;&lt;br /&gt;
MAKEIMG.EXE has been developed with [http://www.symbos.de/quigs.htm Quigs] for [[SymbOS]].&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Hdcpm-makeimg-sym1.png|thumb|MAKEIMG.EXE in action]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==The HDMGR.COM utility==&lt;br /&gt;
This is the Hard Disk Manager utility.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can use this utility to get information about your hard disk geometry, disk image files, partitions and boot sector. You have to use this utility to format a hard disk, disk image file or partition to CP/M format or manipulate the boot sector of the hard disk and/or transfer an .EMS system file to the reserved track of the hard disk.&amp;lt;br /&amp;gt;&lt;br /&gt;
The boot sector contains information about the CP/M disk drive letters, start-up drive and console colour scheme. All those properties can be changed with HDMGR.COM.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR will perform a fragmentation test of the discovered CP/M hard disk image files uppon execution (not for Albireo).&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
The HDMGR.COM utility is self explanatory. Just run it from the CP/M command prompt.&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Hdcpm-hdmgr-m.png|thumb|HDMGR main menu]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-1.png|thumb|HDMGR Hardware information]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-2.png|thumb|HDMGR Partition information]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-3.png|thumb|HDMGR CP/M disk image information]]&lt;br /&gt;
|}&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Hdcpm-hdmgr-4.png|thumb|HDMGR Boot sector information]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-5.png|thumb|HDMGR Log disk]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-7.png|thumb|HDMGR Manage boot sector]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-8.png|thumb|HDMGR Transfer CP/M to disk]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==The RTC.COM utility==&lt;br /&gt;
You can make use of the RTC.COM utility in order to keep CP/M date and time updated.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can synchronize the date and time of CP/M Plus with the RTC by running ''RTC -G'' manually or via your PROFILE.SUB.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can also set your RTC to the current CP/M date and time by running ''RTC -S'' (not for M4 board)&amp;lt;br /&amp;gt;&lt;br /&gt;
Currently RTC.COM works with the RTC found in Symbiface II, Symbiface III and M4 board (read only).&amp;lt;br /&amp;gt;&lt;br /&gt;
DATE.COM, DIR.COM and SHOW.COM commands, patched for Year 2000 compatibility can be downloaded from the [http://www.cpm.z80.de/binary.html CP/M source archive - Digital Research Binary files section] .&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Error messages==&lt;br /&gt;
===ROM checksum error===&lt;br /&gt;
* ''*** HDCPM ROM checksum error ***&lt;br /&gt;
	The ROM has failed the checksum test.&lt;br /&gt;
	The contents are probably corrupted. The ROM will not be initialized.&lt;br /&gt;
&lt;br /&gt;
===Hard disk errors===&lt;br /&gt;
* ''*** No mass storage found ***''&lt;br /&gt;
	No compatible mass storage interface can be found.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: DISK I/O''&lt;br /&gt;
	I/O error occurred during the last read/write operation.&lt;br /&gt;
	Your hard disk might be defect or the USB disk is not enabled.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: INVALID BOOT SECTOR''&lt;br /&gt;
	No FAT or CP/M boot sector was found in a not partitioned hard disk.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: INVALID FILE SYSTEM''&lt;br /&gt;
	The first partition in a partitioned hard disk is not a FAT or CP/M-80&lt;br /&gt;
	one.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: INVALID SECTOR SIZE''&lt;br /&gt;
	The hard disk used has a sector size not equal to 512 bytes.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: CPMDSK01.IMG NOT FOUND''&lt;br /&gt;
	The CP/M image file named CPMDSK01.IMG can't be found in the FAT&lt;br /&gt;
	formatted hard disk or partition. &lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: CP/M SYSTEM FILE NOT FOUND''&lt;br /&gt;
	The .EMS CP/M system file can't be found in the system track of your&lt;br /&gt;
	CP/M partition or image file.&lt;br /&gt;
	&lt;br /&gt;
*  ''ERROR: CPMDSK01.IMG IS FRAGMENTED''&lt;br /&gt;
	The first CP/M image file is fragmented, the system won't mount it.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: CPMDSK01.IMG HAS WRONG LENGTH''&lt;br /&gt;
	The first CP/M image file has wrong length, the system won't mount it.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: CPMDSK01.IMG IS NOT FORMATTED''&lt;br /&gt;
	The first CP/M image file is not formatted to CP/M-80 format, the&lt;br /&gt;
	system won't mount it. Use the HDMGR.COM utility to format it.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: INCOMPATIBLE EMS FILE''&lt;br /&gt;
	The .EMS system file that was loaded from the system track is not&lt;br /&gt;
	compatible with HDCPM.&lt;br /&gt;
&lt;br /&gt;
===RTC errors===&lt;br /&gt;
* ''*** Battery depleted ***''&lt;br /&gt;
	The RTC battery is depleted. The RTC driver will continue to operate&lt;br /&gt;
	normally but the readings are not reliable. Replace the RTC battery.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Release info &amp;amp; download==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Version !! Changes !! Download&lt;br /&gt;
|-&lt;br /&gt;
| v1.00 December 2021 || Initial release || [[Media:hdcpm100.dsk|hdcpm100.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.01 January 2022 || HDCPM.ROM, HDMGR.COM: code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: (bug fix) fragmented file detection was not working properly unless the file was CPMDSK01.IMG&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: (bug fix) unformatted image file detection was not working properly. New error message added.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) CP/M drive table wasn't patched properly.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) initialization of floppy drive(s) was corrupted due to misplaced code.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: added .EMS file compatibility check. New error message added.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: added support for Dobbertin RAM disk driver.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: added compatibility with Dobbertin HD20 Harddisc&amp;lt;br /&amp;gt;&lt;br /&gt;
MAKEIMG.EXE: added utility for creating an image file from within SYMBOS.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&lt;br /&gt;
|| [[Media:hdcpm101.dsk|hdcpm101.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.02 March 2022 || HDCPM.ROM, HDMGR.COM: added support for M4 board.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: added support for uIDE-16 interface.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) the ROM was initialized even if no compatible interface was found.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: error message change.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: option &amp;quot;F&amp;quot; has been removed. HDCPM will always do a disk fragmentation test during boot.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: power up message changed in order to provide information about the type of the detected interface.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: two bytes of RAM will be reserved by the ROM for storing the interface type and M4 ROM number.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&lt;br /&gt;
|| [[Media:hdcpm102.dsk|hdcpm102.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.03 April 2022 || HDCPM.ROM, HDMGR.COM: added support for USIfAC II.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) uIDE-16 detection was broken.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&lt;br /&gt;
|| [[Media:hdcpm103.dsk|hdcpm103.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.04 June 2022|| HDCPM.ROM: code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.BIN: added executable binary file version of HDCPM.&lt;br /&gt;
|| [[Media:hdcpm104.dsk|hdcpm104.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.05 July 2022 || HDCPM.ROM, HDCPM.BIN, HDMGR.COM: added support for Symbiface III.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDCPM.BIN:  code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR.COM: Hardware info added for USIfAC II&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR.COM: (bug fix) the 'Select boot file' menu was garbled if there were 8 or more .EMS files present.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&lt;br /&gt;
|| [[Media:hdcpm105.dsk|hdcpm105.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.06 January 2023 || HDCPM.ROM, HDCPM.BIN, HDMGR.COM: added support for Albireo.&amp;lt;br /&amp;gt;&lt;br /&gt;
RTC.COM: added support for M4 Board (r/o) and Symbiface 3.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDCPM.BIN: (bug fix) CPC was freezing after mounting the CP/M disk(s) with incompatible .EMS file.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR.COM: (bug fix) the Stack was overflowed in some rare cases.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&amp;lt;br /&amp;gt;&lt;br /&gt;
|| [[Media:hdcpm106.dsk|hdcpm106.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.10 September 2023 || HDCPM.ROM, HDCPM.BIN: added support for CPC464 with #C3 mode compatible RAM expansion card.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDCPM.BIN: can now boot CP/M Plus on a CPC that has no or faulty Floppy Disc Controller present.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: ROM checksum test and new error message added.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: removed blank line from ROM initialization message.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDCPM.BIN, HDMGR.COM:  code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDCPM.BIN: (bug fix) incorrect patching would corrupt the Dobbertin RAM drive on CP/M Plus v1.1&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) |HDDPB was displaying wrong values&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR.COM: (bug fix) a corruption of the MBR of USB/SD card occured in some rare cases.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&amp;lt;br /&amp;gt;&lt;br /&gt;
|| [[Media:hdcpm110.dsk|hdcpm110.dsk]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Other downloads==&lt;br /&gt;
*[[Media:CPMDSK01&amp;amp;02.zip|CP/M disk images]] - CPMDSK01.IMG is bootable and contains all the files of the 3 CP/M Plus system disks and year 2000 compliant binaries downloaded from the [http://www.cpm.z80.de/binary.html Digital Research Binary Files]. CPMDSK02.IMG is empty and can also be used as a template.&amp;lt;br /&amp;gt;&lt;br /&gt;
*[[Media:Z3Plus.part1.rar|ZPM3+ZCCP disk image part 1]] , [[Media:Z3Plus.part2.rar|ZPM3+ZCCP disk image part 2]] - The Amstrad BDOS and CCP have been replaced with their counterparts [https://github.com/wwarthen/CPU280/tree/master/ZPM3/zpm3.txt ZPM3] and [https://github.com/wwarthen/CPU280/tree/master/ZCCP/zccp.txt ZCCP] written by Simeon Cran. It is [https://www.cpcwiki.eu/index.php/Z-System Z-system, Z3Plus] compatible and contains the Z3Plus system files, all the files of the 3 CP/M Plus system disks, year 2000 compliant binaries and also contains some useful tools, help files and manuals.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Videos==&lt;br /&gt;
* [https://youtu.be/GMWsRzNhQTM How to create and prepare a CP/M image file in a FAT formatted hard disk]&lt;br /&gt;
* [https://youtu.be/nxow6Y5O4Dc Hard disk utilization and dual boot]&lt;br /&gt;
* [https://youtu.be/em7dHOdaylg How to create a CP/M image file under SYMBOS]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
[[category:Expansion ROM]] [[category:Applications]] [[category:CP/M]]&lt;/div&gt;</summary>
		<author><name>D kef</name></author>	</entry>

	<entry>
		<id>https://oldwiki.cpcwiki.eu/index.php?title=HDCPM&amp;diff=112665</id>
		<title>HDCPM</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.cpcwiki.eu/index.php?title=HDCPM&amp;diff=112665"/>
				<updated>2023-09-16T09:13:04Z</updated>
		
		<summary type="html">&lt;p&gt;D kef: /* Using the binary */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;HDCPM is a Hard Disk boot loader for [[CP/M]] Plus, developed by d_kef&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can read more about the development of the application here:&amp;lt;br /&amp;gt;&lt;br /&gt;
https://www.cpcwiki.eu/forum/applications/hdcpm-boot-and-run-cpm-plus-from-hard-disk/&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:hdcpm.gif|HDCPM booting CP/M Plus]]&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It comes in the form of:&lt;br /&gt;
* a standard background ROM that can be installed in any available ROM position.&lt;br /&gt;
* a standard binary file that can be loaded from floppy or hard drive.&lt;br /&gt;
&lt;br /&gt;
 	&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following configurations are possible with one hard disk:&lt;br /&gt;
&lt;br /&gt;
* One not partitioned, CP/M formatted hard disk. The whole hard disk is used by CP/M.&lt;br /&gt;
* One to four CP/M formatted partitions. Every partition is accessed as a separate hard disk by CP/M.&lt;br /&gt;
* 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.&lt;br /&gt;
* 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.&lt;br /&gt;
* For interfaces that use SD card or USB flash drive as a mass storage device ([[M4 Board]], [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II], [http://www.tmtlogic.com/ Symbiface III] or [[Albireo]]) the only supported configuration is one to four CP/M disk image files in the root directory of the FAT file system.&lt;br /&gt;
	&lt;br /&gt;
Currently only the master IDE device can be accessed by HDCPM. The slave device is available to be used by your favourite DOS.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
HDCPM can also utilize the RTC found in the [[SYMBiFACE II]] in order to implement CP/M Plus BIOS function 26: TIME.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
HDCPM is compatible and can be used together with the [[Dobbertin Harddisc]].&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
HDCPM has been developed with [[WinApe]] Z80 Assembler and was tested with [[WinApe]], [[CPCemu]], an Amstrad Plus 464 upgraded to 6128 an Amstrad CPC 6128 and an Amstrad CPC 464 with [https://www.cpcwiki.eu/index.php/Universal_512K_and_1MByte_RAM_Expansions Universal 512K RAM Expansion].&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
HDCPM distribution disk contains the following files:&lt;br /&gt;
* HDCPM.ROM the ROM itself&lt;br /&gt;
* HDCPM.BIN the executable binary file&lt;br /&gt;
* HDMGR.COM Hard Disk Manager utility&lt;br /&gt;
* RTC.COM RTC synchronization utility&lt;br /&gt;
* MAKEIMG.BAS CP/M image file creation utility&lt;br /&gt;
* MAKEIMG.BIN CP/M image file creation binary&lt;br /&gt;
* MAKEIMG.EXE CP/M image file creation utility for [[SymbOS]]&lt;br /&gt;
* HDCPM.DOC the User guide&lt;br /&gt;
&lt;br /&gt;
HDCPM is free software. It can be used and distributed with no restrictions.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Prerequisites==&lt;br /&gt;
* Amstrad CPC/Plus computer capable of running CP/M Plus.&lt;br /&gt;
* ROM box or other ROM expansion hardware if using the ROM.&lt;br /&gt;
* Optionaly a FAT aware DOS like M4 ROM, USIfAC ROM, [[UniDOS]], [https://www.cpcwiki.eu/forum/applications/cubeios-fat16fat32-rom-for-the-cpc's-with-xmass/ CubeMDOS] etc if using the binary.&lt;br /&gt;
* One of the following mass storage interfaces:&lt;br /&gt;
** [[SYMBiFACE II]]&lt;br /&gt;
** [[X-Mass]]&lt;br /&gt;
** [https://github.com/salafek/cyboard-for-cpc Cyboard]&lt;br /&gt;
** [[uIDE 16]] (base address = &amp;amp;FEF0)&lt;br /&gt;
** [[M4 Board]]&lt;br /&gt;
** [[USIFAC]] II/[[ULIfAC]]&lt;br /&gt;
** [http://www.tmtlogic.com/ Symbiface III]&lt;br /&gt;
** [[Albireo]] (SD card only)&lt;br /&gt;
* Compatible storage device with enough free space to accommodate the desirable CP/M hard disk configuration.&lt;br /&gt;
* Floppy disk drive for initialization of the file system.&lt;br /&gt;
* CP/M Plus system disks for making the system bootable.&lt;br /&gt;
* Optionally a [[SYMBiFACE II]] compatible RTC.&lt;br /&gt;
&lt;br /&gt;
==Restrictions==&lt;br /&gt;
* CP/M 2.2 or lower is not supported.&lt;br /&gt;
* 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.&lt;br /&gt;
* Only the master IDE device is accessible by HDCPM.&lt;br /&gt;
* The maximum number of hard disk partition/images supported is four.&lt;br /&gt;
* Only primary partitions are supported.&lt;br /&gt;
* If you want to use CP/M disk images then they must be stored in a FAT16 or FAT32 formatted disk or partition.&lt;br /&gt;
* If the hard disk is partitioned then the CP/M disk images must be placed in the first partition of the disk.&lt;br /&gt;
* The CP/M disk images must be placed in the root directory of the FAT file system.&lt;br /&gt;
* The CP/M disk images must NOT be fragmented and must have the correct size.&lt;br /&gt;
* 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. &lt;br /&gt;
* Only storage devices with 512 bytes sector size are supported.&lt;br /&gt;
* Only storage devices with LBA addressing are supported.&lt;br /&gt;
* Date stamps of CP/M disk image files are not maintained.&lt;br /&gt;
* 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 letters for your IDE media then the corresponding HD20 partitions will be unavailable under CP/M.&lt;br /&gt;
&lt;br /&gt;
==How it works==&lt;br /&gt;
===Using the ROM===&lt;br /&gt;
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:&lt;br /&gt;
|HDCPM (no TIME function support) or |HDCPMT (TIME function support)&amp;lt;br /&amp;gt;&lt;br /&gt;
Alternatively it can be started by holding down the Tab key (no TIME function support) or Shift+Tab (TIME function support), during power-up.&amp;lt;br /&amp;gt;&lt;br /&gt;
===Using the binary===&lt;br /&gt;
HDCPM can be started by running the HDCPM.BIN file from floppy drive or mass storage.&amp;lt;br /&amp;gt;&lt;br /&gt;
===Functions===&lt;br /&gt;
HDCPM will then execute the following functions:&amp;lt;br /&amp;gt;&lt;br /&gt;
* Search for a compatible mass storage interface.&lt;br /&gt;
* Initialize the mass storage interface if needed.&lt;br /&gt;
* Move the boot loader and the CP/M patcher to RAM.&lt;br /&gt;
* Mount 1 to 4 CP/M image files and/or partitions and perform fragmentation and size test.&lt;br /&gt;
* 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.&lt;br /&gt;
* Read the .EMS file from the reserved track and store it in RAM just as the normal CP/M Plus boot loader does.&lt;br /&gt;
* 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.&lt;br /&gt;
* Patch the floppy disk drive routines in case a FDC's not been found.&lt;br /&gt;
* Patch the SCB in order to change the startup/default drive.&lt;br /&gt;
* 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 memory expansion]] or [[Dobbertin Memory Expansion]] driver is present.&lt;br /&gt;
* Move the ALV of the Dk'tronics RAM disk if [[Z-System]] has been detected.&lt;br /&gt;
* Patch the CP/M console with the desired colour scheme. &lt;br /&gt;
* Patch the system message.&lt;br /&gt;
* Do a normal CP/M cold start.&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==CP/M Plus disk image files==&lt;br /&gt;
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 [https://hexed.it/ hexed.it] or any hex editor capable of creating binary files filled with a specific pattern.&amp;lt;br /&amp;gt;&lt;br /&gt;
In case of hexed.it select 'New file' fill in 'Size of the new file = 8519680' and 'Fill Pattern = 0xE5' and press apply. Save the file as CPMDSK01.IMG&amp;lt;br /&amp;gt;&lt;br /&gt;
If you have a FAT capable DOS installed in your AMSTRAD you can use the provided MAKEIMG.BAS utility to create your image file. Keep in mind that it takes more than 1.5 hour for a 8MB image file to be created that way.&amp;lt;br /&amp;gt;&lt;br /&gt;
CP/M disk image files can be accessed by a modern computer with [http://www.moria.de/~michael/cpmtools/ cpmtools]. Use the command |HDDEF to see the record you must insert in the diskdefs file.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The HDCPM record for diskdefs is:&lt;br /&gt;
&lt;br /&gt;
       diskdef hdcpm&lt;br /&gt;
          seclen 512&lt;br /&gt;
          tracks 65&lt;br /&gt;
          sectrk 256&lt;br /&gt;
          blocksize 8192&lt;br /&gt;
          maxdir 1024&lt;br /&gt;
          skew 0&lt;br /&gt;
          boottrk 1&lt;br /&gt;
          os 3&lt;br /&gt;
       end&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
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. [https://www.cpcwiki.eu/index.php/Albireo Albireo] incorporates a file management IC that performs FAT file system operations and handles fragmented files properly. In such case fragmented image files is not a problem. HDCPM will never fragment a CP/M image file.&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Hdcpm-boot-m4.png|thumb|HDCPM binary booting on M4 Board]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==CP/M Plus disk/partitions==&lt;br /&gt;
You can also create one or more partitions in order to format them to [http://www.seasip.info/Cpm/format31.html CP/M-80] 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.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM examines the hard disk's MBR upon start and finds the partition information. Then it finds the LBA of the first sector of each partition and passes it to the CP/M hard disk driver. The CP/M hard disk driver doesn't know anything about partitions. It accesses the partition as if it was a real hard disk.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:hdcpm-ui-boot.png|thumb|HDCPM ROM booting on uIDE-16]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
===Using the ROM===&lt;br /&gt;
* Install the HDCPM ROM in a free ROM slot of your ROM box.&lt;br /&gt;
* Plug in your mass storage interface and attach the proper mass storage device.&lt;br /&gt;
* 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 shown inside the parentheses:&amp;lt;br /&amp;gt;&lt;br /&gt;
** (S2): [[SYMBiFACE II]] compatible interface&lt;br /&gt;
** (uI): [[uIDE 16]] interface&lt;br /&gt;
** (M4): [[M4 Board]]&lt;br /&gt;
** (US): [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II]&lt;br /&gt;
** (S3): [http://www.tmtlogic.com/ Symbiface III]&lt;br /&gt;
** (AL): [[Albireo]]&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:hdcpm-s2.png|thumb|HDCPM ROM - SYMBiFACE II]]&lt;br /&gt;
|[[File:hdcpm-ui.png|thumb|HDCPM ROM - uIDE-16]]&lt;br /&gt;
|[[File:hdcpm-m4.png|thumb|HDCPM ROM - M4 Board]]&lt;br /&gt;
|}&lt;br /&gt;
{|&lt;br /&gt;
|[[File:hdcpm-us.png|thumb|HDCPM ROM - USIfAC II]]&lt;br /&gt;
|[[File:hdcpm-s3.png|thumb|HDCPM ROM - Symbiface III]]&lt;br /&gt;
|[[File:hdcpm-al.png|thumb|HDCPM ROM - Albireo]]&lt;br /&gt;
|}&lt;br /&gt;
In case a RTC is detected you will also see the RTC initialization message and the current date and time: ''RTC found: 2021/01/01 12:01:01''&lt;br /&gt;
* Use your original CP/M Plus system disk set to Boot CP/M Plus.&lt;br /&gt;
* 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.&lt;br /&gt;
* Reset your AMSTRAD and boot CP/M from the hard disk with the command |HDCPM. The Boot loader will check your image file(s) against fragmentation and correct size and boot the system to the CP/M command prompt. If the first image file is fragmented or has the wrong length the system will not boot. All other image files will be ignored if found to be fragmented or have the wrong length.&lt;br /&gt;
* In case you don't use CP/M image files just boot the system with |HDCPM or |HDCPMT&lt;br /&gt;
* Copy the files from your CP/M system floppy disks to the first hard disk.&lt;br /&gt;
* Copy any other needed application etc. to your CP/M hard disk(s).&lt;br /&gt;
* You are ready to go.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Using the binary===&lt;br /&gt;
* Plug in your mass storage interface and attach the proper mass storage device.&lt;br /&gt;
* Use your original CP/M Plus system disk set to Boot CP/M Plus.&lt;br /&gt;
* 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.&lt;br /&gt;
* 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.&lt;br /&gt;
* You are ready to go.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==ROM commands==&lt;br /&gt;
[[File:hdcpm-us-boot.png|thumb|HDCPM ROM booting on USIfAC II]]&lt;br /&gt;
* |HDCPM mounts the hard disks and boots CP/M Plus. If [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] is used enable the USB disk with the |USB command first.&lt;br /&gt;
* |HDCPMT works like |HDCPM but also utilizes the RTC.&lt;br /&gt;
* |HDDPB shows the Disk Parameter Block.&lt;br /&gt;
* |HDDEF shows the diskdefs entry for CP/M tools and the file system size.&lt;br /&gt;
* |DATE displays the current date.&lt;br /&gt;
* |TIME displays the current time. If [[M4 Board]] is used |DATE and |TIME will be redirected to M4 |TIME.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==The HDCPM binary file==&lt;br /&gt;
* If [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] is used, use your PC to copy HDCPM.BIN to your USB flash disk. Then insert it to your [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] power up your Amstrad and enable the USB disk with the |USB command.&lt;br /&gt;
* Execute the file from the floppy disk or from your mass storage device with ''RUN&amp;quot;HDCPM&amp;quot;''. 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.&lt;br /&gt;
*  [[M4 Board]] and [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ 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 [https://www.cpcwiki.eu/forum/applications/cubeios-fat16fat32-rom-for-the-cpc's-with-xmass/ CubeMDOS] or [[UniDOS]], installed.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==The MAKEIMG.BAS and MAKEIMG.EXE utilities==&lt;br /&gt;
===MAKEIMG.BAS===&lt;br /&gt;
Although this utility should not be your first option, you can use it to make a new empty CP/M disk image file.&amp;lt;br /&amp;gt;&lt;br /&gt;
In case you decide to use it make sure you have a FAT aware DOS installed in your system. MAKEIMG makes use of the firmware calls CAS_OUT_OPEN, CAS_OUT_CLOSE and CAS_OUT_CHAR so your DOS must support them.&amp;lt;br /&amp;gt;&lt;br /&gt;
Copy the files MAKEIMG.BAS and MAKEIMG.BIN to the root directory of your FAT formatted hard disk and make it your current drive. Run the utility with ''RUN&amp;quot;MAKEIMG&amp;quot;'' and don't hold your breath!&amp;lt;br /&amp;gt;&lt;br /&gt;
Making an image file this way takes more than 1.5 hour for an 8MB file so literally... don't hold your breath.&amp;lt;br /&amp;gt;&lt;br /&gt;
Here is a small tutorial on how to setup and use a CP/M image file: https://youtu.be/GMWsRzNhQTM&amp;lt;br /&amp;gt;&lt;br /&gt;
===MAKEIMG.EXE===&lt;br /&gt;
This utility is a [[SymbOS]] application.&amp;lt;br /&amp;gt;&lt;br /&gt;
Use this utility to create your CP/M hard disk images from within [[SymbOS]]. 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.&amp;lt;br /&amp;gt;&lt;br /&gt;
MAKEIMG.EXE has been developed with [http://www.symbos.de/quigs.htm Quigs] for [[SymbOS]].&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Hdcpm-makeimg-sym1.png|thumb|MAKEIMG.EXE in action]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==The HDMGR.COM utility==&lt;br /&gt;
This is the Hard Disk Manager utility.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can use this utility to get information about your hard disk geometry, disk image files, partitions and boot sector. You have to use this utility to format a hard disk, disk image file or partition to CP/M format or manipulate the boot sector of the hard disk and/or transfer an .EMS system file to the reserved track of the hard disk.&amp;lt;br /&amp;gt;&lt;br /&gt;
The boot sector contains information about the CP/M disk drive letters, start-up drive and console colour scheme. All those properties can be changed with HDMGR.COM.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR will perform a fragmentation test of the discovered CP/M hard disk image files uppon execution (not for Albireo).&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
The HDMGR.COM utility is self explanatory. Just run it from the CP/M command prompt.&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Hdcpm-hdmgr-m.png|thumb|HDMGR main menu]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-1.png|thumb|HDMGR Hardware information]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-2.png|thumb|HDMGR Partition information]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-3.png|thumb|HDMGR CP/M disk image information]]&lt;br /&gt;
|}&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Hdcpm-hdmgr-4.png|thumb|HDMGR Boot sector information]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-5.png|thumb|HDMGR Log disk]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-7.png|thumb|HDMGR Manage boot sector]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-8.png|thumb|HDMGR Transfer CP/M to disk]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==The RTC.COM utility==&lt;br /&gt;
You can make use of the RTC.COM utility in order to keep CP/M date and time updated.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can synchronize the date and time of CP/M Plus with the RTC by running ''RTC -G'' manually or via your PROFILE.SUB.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can also set your RTC to the current CP/M date and time by running ''RTC -S'' (not for M4 board)&amp;lt;br /&amp;gt;&lt;br /&gt;
Currently RTC.COM works with the RTC found in Symbiface II, Symbiface III and M4 board (read only).&amp;lt;br /&amp;gt;&lt;br /&gt;
DATE.COM, DIR.COM and SHOW.COM commands, patched for Year 2000 compatibility can be downloaded from the [http://www.cpm.z80.de/binary.html CP/M source archive - Digital Research Binary files section] .&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Error messages==&lt;br /&gt;
===ROM checksum error===&lt;br /&gt;
* ''*** HDCPM ROM checksum error ***&lt;br /&gt;
	The ROM has failed the checksum test.&lt;br /&gt;
	The contents are probably corrupted. The ROM will not be initialized.&lt;br /&gt;
&lt;br /&gt;
===Hard disk errors===&lt;br /&gt;
* ''*** No mass storage found ***''&lt;br /&gt;
	No compatible mass storage interface can be found.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: DISK I/O''&lt;br /&gt;
	I/O error occurred during the last read/write operation.&lt;br /&gt;
	Your hard disk might be defect or the USB disk is not enabled.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: INVALID BOOT SECTOR''&lt;br /&gt;
	No FAT or CP/M boot sector was found in a not partitioned hard disk.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: INVALID FILE SYSTEM''&lt;br /&gt;
	The first partition in a partitioned hard disk is not a FAT or CP/M-80&lt;br /&gt;
	one.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: INVALID SECTOR SIZE''&lt;br /&gt;
	The hard disk used has a sector size not equal to 512 bytes.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: CPMDSK01.IMG NOT FOUND''&lt;br /&gt;
	The CP/M image file named CPMDSK01.IMG can't be found in the FAT&lt;br /&gt;
	formatted hard disk or partition. &lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: CP/M SYSTEM FILE NOT FOUND''&lt;br /&gt;
	The .EMS CP/M system file can't be found in the system track of your&lt;br /&gt;
	CP/M partition or image file.&lt;br /&gt;
	&lt;br /&gt;
*  ''ERROR: CPMDSK01.IMG IS FRAGMENTED''&lt;br /&gt;
	The first CP/M image file is fragmented, the system won't mount it.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: CPMDSK01.IMG HAS WRONG LENGTH''&lt;br /&gt;
	The first CP/M image file has wrong length, the system won't mount it.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: CPMDSK01.IMG IS NOT FORMATTED''&lt;br /&gt;
	The first CP/M image file is not formatted to CP/M-80 format, the&lt;br /&gt;
	system won't mount it. Use the HDMGR.COM utility to format it.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: INCOMPATIBLE EMS FILE''&lt;br /&gt;
	The .EMS system file that was loaded from the system track is not&lt;br /&gt;
	compatible with HDCPM.&lt;br /&gt;
&lt;br /&gt;
===RTC errors===&lt;br /&gt;
* ''*** Battery depleted ***''&lt;br /&gt;
	The RTC battery is depleted. The RTC driver will continue to operate&lt;br /&gt;
	normally but the readings are not reliable. Replace the RTC battery.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Release info &amp;amp; download==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Version !! Changes !! Download&lt;br /&gt;
|-&lt;br /&gt;
| v1.00 December 2021 || Initial release || [[Media:hdcpm100.dsk|hdcpm100.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.01 January 2022 || HDCPM.ROM, HDMGR.COM: code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: (bug fix) fragmented file detection was not working properly unless the file was CPMDSK01.IMG&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: (bug fix) unformatted image file detection was not working properly. New error message added.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) CP/M drive table wasn't patched properly.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) initialization of floppy drive(s) was corrupted due to misplaced code.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: added .EMS file compatibility check. New error message added.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: added support for Dobbertin RAM disk driver.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: added compatibility with Dobbertin HD20 Harddisc&amp;lt;br /&amp;gt;&lt;br /&gt;
MAKEIMG.EXE: added utility for creating an image file from within SYMBOS.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&lt;br /&gt;
|| [[Media:hdcpm101.dsk|hdcpm101.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.02 March 2022 || HDCPM.ROM, HDMGR.COM: added support for M4 board.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: added support for uIDE-16 interface.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) the ROM was initialized even if no compatible interface was found.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: error message change.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: option &amp;quot;F&amp;quot; has been removed. HDCPM will always do a disk fragmentation test during boot.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: power up message changed in order to provide information about the type of the detected interface.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: two bytes of RAM will be reserved by the ROM for storing the interface type and M4 ROM number.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&lt;br /&gt;
|| [[Media:hdcpm102.dsk|hdcpm102.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.03 April 2022 || HDCPM.ROM, HDMGR.COM: added support for USIfAC II.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) uIDE-16 detection was broken.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&lt;br /&gt;
|| [[Media:hdcpm103.dsk|hdcpm103.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.04 June 2022|| HDCPM.ROM: code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.BIN: added executable binary file version of HDCPM.&lt;br /&gt;
|| [[Media:hdcpm104.dsk|hdcpm104.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.05 July 2022 || HDCPM.ROM, HDCPM.BIN, HDMGR.COM: added support for Symbiface III.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDCPM.BIN:  code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR.COM: Hardware info added for USIfAC II&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR.COM: (bug fix) the 'Select boot file' menu was garbled if there were 8 or more .EMS files present.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&lt;br /&gt;
|| [[Media:hdcpm105.dsk|hdcpm105.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.06 January 2023 || HDCPM.ROM, HDCPM.BIN, HDMGR.COM: added support for Albireo.&amp;lt;br /&amp;gt;&lt;br /&gt;
RTC.COM: added support for M4 Board (r/o) and Symbiface 3.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDCPM.BIN: (bug fix) CPC was freezing after mounting the CP/M disk(s) with incompatible .EMS file.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR.COM: (bug fix) the Stack was overflowed in some rare cases.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&amp;lt;br /&amp;gt;&lt;br /&gt;
|| [[Media:hdcpm106.dsk|hdcpm106.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.10 ??? 2023 || HDCPM.ROM, HDCPM.BIN: added support for CPC464 with #C3 mode compatible RAM expansion card.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDCPM.BIN: can now boot CP/M Plus on a CPC that has no or faulty Floppy Disc Controller present.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: ROM checksum test and new error message added.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: removed blank line from ROM initialization message.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDCPM.BIN, HDMGR.COM:  code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDCPM.BIN: (bug fix) incorrect patching would corrupt the Dobbertin RAM drive on CP/M Plus v1.1&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) |HDDPB was displaying wrong values&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR.COM: (bug fix) a corruption of the MBR of USB/SD card occured in some rare cases.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&amp;lt;br /&amp;gt;&lt;br /&gt;
|| [[Media:hdcpm110.dsk|hdcpm110.dsk]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Other downloads==&lt;br /&gt;
*[[Media:CPMDSK01&amp;amp;02.zip|CP/M disk images]] - CPMDSK01.IMG is bootable and contains all the files of the 3 CP/M Plus system disks and year 2000 compliant binaries downloaded from the [http://www.cpm.z80.de/binary.html Digital Research Binary Files]. CPMDSK02.IMG is empty and can also be used as a template.&amp;lt;br /&amp;gt;&lt;br /&gt;
*[[Media:Z3Plus.part1.rar|ZPM3+ZCCP disk image part 1]] , [[Media:Z3Plus.part2.rar|ZPM3+ZCCP disk image part 2]] - The Amstrad BDOS and CCP have been replaced with their counterparts [https://github.com/wwarthen/CPU280/tree/master/ZPM3/zpm3.txt ZPM3] and [https://github.com/wwarthen/CPU280/tree/master/ZCCP/zccp.txt ZCCP] written by Simeon Cran. It is [https://www.cpcwiki.eu/index.php/Z-System Z-system, Z3Plus] compatible and contains the Z3Plus system files, all the files of the 3 CP/M Plus system disks, year 2000 compliant binaries and also contains some useful tools, help files and manuals.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Videos==&lt;br /&gt;
* [https://youtu.be/GMWsRzNhQTM How to create and prepare a CP/M image file in a FAT formatted hard disk]&lt;br /&gt;
* [https://youtu.be/nxow6Y5O4Dc Hard disk utilization and dual boot]&lt;br /&gt;
* [https://youtu.be/em7dHOdaylg How to create a CP/M image file under SYMBOS]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
[[category:Expansion ROM]] [[category:Applications]] [[category:CP/M]]&lt;/div&gt;</summary>
		<author><name>D kef</name></author>	</entry>

	<entry>
		<id>https://oldwiki.cpcwiki.eu/index.php?title=HDCPM&amp;diff=112664</id>
		<title>HDCPM</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.cpcwiki.eu/index.php?title=HDCPM&amp;diff=112664"/>
				<updated>2023-09-16T09:11:43Z</updated>
		
		<summary type="html">&lt;p&gt;D kef: /* Using the ROM */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;HDCPM is a Hard Disk boot loader for [[CP/M]] Plus, developed by d_kef&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can read more about the development of the application here:&amp;lt;br /&amp;gt;&lt;br /&gt;
https://www.cpcwiki.eu/forum/applications/hdcpm-boot-and-run-cpm-plus-from-hard-disk/&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:hdcpm.gif|HDCPM booting CP/M Plus]]&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It comes in the form of:&lt;br /&gt;
* a standard background ROM that can be installed in any available ROM position.&lt;br /&gt;
* a standard binary file that can be loaded from floppy or hard drive.&lt;br /&gt;
&lt;br /&gt;
 	&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following configurations are possible with one hard disk:&lt;br /&gt;
&lt;br /&gt;
* One not partitioned, CP/M formatted hard disk. The whole hard disk is used by CP/M.&lt;br /&gt;
* One to four CP/M formatted partitions. Every partition is accessed as a separate hard disk by CP/M.&lt;br /&gt;
* 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.&lt;br /&gt;
* 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.&lt;br /&gt;
* For interfaces that use SD card or USB flash drive as a mass storage device ([[M4 Board]], [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II], [http://www.tmtlogic.com/ Symbiface III] or [[Albireo]]) the only supported configuration is one to four CP/M disk image files in the root directory of the FAT file system.&lt;br /&gt;
	&lt;br /&gt;
Currently only the master IDE device can be accessed by HDCPM. The slave device is available to be used by your favourite DOS.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
HDCPM can also utilize the RTC found in the [[SYMBiFACE II]] in order to implement CP/M Plus BIOS function 26: TIME.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
HDCPM is compatible and can be used together with the [[Dobbertin Harddisc]].&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
HDCPM has been developed with [[WinApe]] Z80 Assembler and was tested with [[WinApe]], [[CPCemu]], an Amstrad Plus 464 upgraded to 6128 an Amstrad CPC 6128 and an Amstrad CPC 464 with [https://www.cpcwiki.eu/index.php/Universal_512K_and_1MByte_RAM_Expansions Universal 512K RAM Expansion].&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
HDCPM distribution disk contains the following files:&lt;br /&gt;
* HDCPM.ROM the ROM itself&lt;br /&gt;
* HDCPM.BIN the executable binary file&lt;br /&gt;
* HDMGR.COM Hard Disk Manager utility&lt;br /&gt;
* RTC.COM RTC synchronization utility&lt;br /&gt;
* MAKEIMG.BAS CP/M image file creation utility&lt;br /&gt;
* MAKEIMG.BIN CP/M image file creation binary&lt;br /&gt;
* MAKEIMG.EXE CP/M image file creation utility for [[SymbOS]]&lt;br /&gt;
* HDCPM.DOC the User guide&lt;br /&gt;
&lt;br /&gt;
HDCPM is free software. It can be used and distributed with no restrictions.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Prerequisites==&lt;br /&gt;
* Amstrad CPC/Plus computer capable of running CP/M Plus.&lt;br /&gt;
* ROM box or other ROM expansion hardware if using the ROM.&lt;br /&gt;
* Optionaly a FAT aware DOS like M4 ROM, USIfAC ROM, [[UniDOS]], [https://www.cpcwiki.eu/forum/applications/cubeios-fat16fat32-rom-for-the-cpc's-with-xmass/ CubeMDOS] etc if using the binary.&lt;br /&gt;
* One of the following mass storage interfaces:&lt;br /&gt;
** [[SYMBiFACE II]]&lt;br /&gt;
** [[X-Mass]]&lt;br /&gt;
** [https://github.com/salafek/cyboard-for-cpc Cyboard]&lt;br /&gt;
** [[uIDE 16]] (base address = &amp;amp;FEF0)&lt;br /&gt;
** [[M4 Board]]&lt;br /&gt;
** [[USIFAC]] II/[[ULIfAC]]&lt;br /&gt;
** [http://www.tmtlogic.com/ Symbiface III]&lt;br /&gt;
** [[Albireo]] (SD card only)&lt;br /&gt;
* Compatible storage device with enough free space to accommodate the desirable CP/M hard disk configuration.&lt;br /&gt;
* Floppy disk drive for initialization of the file system.&lt;br /&gt;
* CP/M Plus system disks for making the system bootable.&lt;br /&gt;
* Optionally a [[SYMBiFACE II]] compatible RTC.&lt;br /&gt;
&lt;br /&gt;
==Restrictions==&lt;br /&gt;
* CP/M 2.2 or lower is not supported.&lt;br /&gt;
* 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.&lt;br /&gt;
* Only the master IDE device is accessible by HDCPM.&lt;br /&gt;
* The maximum number of hard disk partition/images supported is four.&lt;br /&gt;
* Only primary partitions are supported.&lt;br /&gt;
* If you want to use CP/M disk images then they must be stored in a FAT16 or FAT32 formatted disk or partition.&lt;br /&gt;
* If the hard disk is partitioned then the CP/M disk images must be placed in the first partition of the disk.&lt;br /&gt;
* The CP/M disk images must be placed in the root directory of the FAT file system.&lt;br /&gt;
* The CP/M disk images must NOT be fragmented and must have the correct size.&lt;br /&gt;
* 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. &lt;br /&gt;
* Only storage devices with 512 bytes sector size are supported.&lt;br /&gt;
* Only storage devices with LBA addressing are supported.&lt;br /&gt;
* Date stamps of CP/M disk image files are not maintained.&lt;br /&gt;
* 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 letters for your IDE media then the corresponding HD20 partitions will be unavailable under CP/M.&lt;br /&gt;
&lt;br /&gt;
==How it works==&lt;br /&gt;
===Using the ROM===&lt;br /&gt;
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:&lt;br /&gt;
|HDCPM (no TIME function support) or |HDCPMT (TIME function support)&amp;lt;br /&amp;gt;&lt;br /&gt;
Alternatively it can be started by holding down the Tab key (no TIME function support) or Shift+Tab (TIME function support), during power-up.&amp;lt;br /&amp;gt;&lt;br /&gt;
===Using the binary===&lt;br /&gt;
HDCPM can be started by running the HDCPM.BIN file from floppy drive or mass storage.&amp;lt;br /&amp;gt;&lt;br /&gt;
===Functions===&lt;br /&gt;
HDCPM will then execute the following functions:&amp;lt;br /&amp;gt;&lt;br /&gt;
* Search for a compatible mass storage interface.&lt;br /&gt;
* Initialize the mass storage interface if needed.&lt;br /&gt;
* Move the boot loader and the CP/M patcher to RAM.&lt;br /&gt;
* Mount 1 to 4 CP/M image files and/or partitions and perform fragmentation and size test.&lt;br /&gt;
* 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.&lt;br /&gt;
* Read the .EMS file from the reserved track and store it in RAM just as the normal CP/M Plus boot loader does.&lt;br /&gt;
* 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.&lt;br /&gt;
* Patch the floppy disk drive routines in case a FDC's not been found.&lt;br /&gt;
* Patch the SCB in order to change the startup/default drive.&lt;br /&gt;
* 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 memory expansion]] or [[Dobbertin Memory Expansion]] driver is present.&lt;br /&gt;
* Move the ALV of the Dk'tronics RAM disk if [[Z-System]] has been detected.&lt;br /&gt;
* Patch the CP/M console with the desired colour scheme. &lt;br /&gt;
* Patch the system message.&lt;br /&gt;
* Do a normal CP/M cold start.&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==CP/M Plus disk image files==&lt;br /&gt;
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 [https://hexed.it/ hexed.it] or any hex editor capable of creating binary files filled with a specific pattern.&amp;lt;br /&amp;gt;&lt;br /&gt;
In case of hexed.it select 'New file' fill in 'Size of the new file = 8519680' and 'Fill Pattern = 0xE5' and press apply. Save the file as CPMDSK01.IMG&amp;lt;br /&amp;gt;&lt;br /&gt;
If you have a FAT capable DOS installed in your AMSTRAD you can use the provided MAKEIMG.BAS utility to create your image file. Keep in mind that it takes more than 1.5 hour for a 8MB image file to be created that way.&amp;lt;br /&amp;gt;&lt;br /&gt;
CP/M disk image files can be accessed by a modern computer with [http://www.moria.de/~michael/cpmtools/ cpmtools]. Use the command |HDDEF to see the record you must insert in the diskdefs file.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The HDCPM record for diskdefs is:&lt;br /&gt;
&lt;br /&gt;
       diskdef hdcpm&lt;br /&gt;
          seclen 512&lt;br /&gt;
          tracks 65&lt;br /&gt;
          sectrk 256&lt;br /&gt;
          blocksize 8192&lt;br /&gt;
          maxdir 1024&lt;br /&gt;
          skew 0&lt;br /&gt;
          boottrk 1&lt;br /&gt;
          os 3&lt;br /&gt;
       end&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
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. [https://www.cpcwiki.eu/index.php/Albireo Albireo] incorporates a file management IC that performs FAT file system operations and handles fragmented files properly. In such case fragmented image files is not a problem. HDCPM will never fragment a CP/M image file.&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Hdcpm-boot-m4.png|thumb|HDCPM binary booting on M4 Board]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==CP/M Plus disk/partitions==&lt;br /&gt;
You can also create one or more partitions in order to format them to [http://www.seasip.info/Cpm/format31.html CP/M-80] 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.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM examines the hard disk's MBR upon start and finds the partition information. Then it finds the LBA of the first sector of each partition and passes it to the CP/M hard disk driver. The CP/M hard disk driver doesn't know anything about partitions. It accesses the partition as if it was a real hard disk.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:hdcpm-ui-boot.png|thumb|HDCPM ROM booting on uIDE-16]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
===Using the ROM===&lt;br /&gt;
* Install the HDCPM ROM in a free ROM slot of your ROM box.&lt;br /&gt;
* Plug in your mass storage interface and attach the proper mass storage device.&lt;br /&gt;
* 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 shown inside the parentheses:&amp;lt;br /&amp;gt;&lt;br /&gt;
** (S2): [[SYMBiFACE II]] compatible interface&lt;br /&gt;
** (uI): [[uIDE 16]] interface&lt;br /&gt;
** (M4): [[M4 Board]]&lt;br /&gt;
** (US): [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II]&lt;br /&gt;
** (S3): [http://www.tmtlogic.com/ Symbiface III]&lt;br /&gt;
** (AL): [[Albireo]]&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:hdcpm-s2.png|thumb|HDCPM ROM - SYMBiFACE II]]&lt;br /&gt;
|[[File:hdcpm-ui.png|thumb|HDCPM ROM - uIDE-16]]&lt;br /&gt;
|[[File:hdcpm-m4.png|thumb|HDCPM ROM - M4 Board]]&lt;br /&gt;
|}&lt;br /&gt;
{|&lt;br /&gt;
|[[File:hdcpm-us.png|thumb|HDCPM ROM - USIfAC II]]&lt;br /&gt;
|[[File:hdcpm-s3.png|thumb|HDCPM ROM - Symbiface III]]&lt;br /&gt;
|[[File:hdcpm-al.png|thumb|HDCPM ROM - Albireo]]&lt;br /&gt;
|}&lt;br /&gt;
In case a RTC is detected you will also see the RTC initialization message and the current date and time: ''RTC found: 2021/01/01 12:01:01''&lt;br /&gt;
* Use your original CP/M Plus system disk set to Boot CP/M Plus.&lt;br /&gt;
* 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.&lt;br /&gt;
* Reset your AMSTRAD and boot CP/M from the hard disk with the command |HDCPM. The Boot loader will check your image file(s) against fragmentation and correct size and boot the system to the CP/M command prompt. If the first image file is fragmented or has the wrong length the system will not boot. All other image files will be ignored if found to be fragmented or have the wrong length.&lt;br /&gt;
* In case you don't use CP/M image files just boot the system with |HDCPM or |HDCPMT&lt;br /&gt;
* Copy the files from your CP/M system floppy disks to the first hard disk.&lt;br /&gt;
* Copy any other needed application etc. to your CP/M hard disk(s).&lt;br /&gt;
* You are ready to go.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Using the binary===&lt;br /&gt;
* Plug in your [[SYMBiFACE II]] compatible IDE interface, [[uIDE 16]], [[M4 Board]], [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] or [[Albireo]] and attach the proper mass storage device.&lt;br /&gt;
* Use your original CP/M Plus system disk set to Boot CP/M Plus.&lt;br /&gt;
* 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.&lt;br /&gt;
* 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.&lt;br /&gt;
* You are ready to go.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==ROM commands==&lt;br /&gt;
[[File:hdcpm-us-boot.png|thumb|HDCPM ROM booting on USIfAC II]]&lt;br /&gt;
* |HDCPM mounts the hard disks and boots CP/M Plus. If [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] is used enable the USB disk with the |USB command first.&lt;br /&gt;
* |HDCPMT works like |HDCPM but also utilizes the RTC.&lt;br /&gt;
* |HDDPB shows the Disk Parameter Block.&lt;br /&gt;
* |HDDEF shows the diskdefs entry for CP/M tools and the file system size.&lt;br /&gt;
* |DATE displays the current date.&lt;br /&gt;
* |TIME displays the current time. If [[M4 Board]] is used |DATE and |TIME will be redirected to M4 |TIME.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==The HDCPM binary file==&lt;br /&gt;
* If [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] is used, use your PC to copy HDCPM.BIN to your USB flash disk. Then insert it to your [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] power up your Amstrad and enable the USB disk with the |USB command.&lt;br /&gt;
* Execute the file from the floppy disk or from your mass storage device with ''RUN&amp;quot;HDCPM&amp;quot;''. 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.&lt;br /&gt;
*  [[M4 Board]] and [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ 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 [https://www.cpcwiki.eu/forum/applications/cubeios-fat16fat32-rom-for-the-cpc's-with-xmass/ CubeMDOS] or [[UniDOS]], installed.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==The MAKEIMG.BAS and MAKEIMG.EXE utilities==&lt;br /&gt;
===MAKEIMG.BAS===&lt;br /&gt;
Although this utility should not be your first option, you can use it to make a new empty CP/M disk image file.&amp;lt;br /&amp;gt;&lt;br /&gt;
In case you decide to use it make sure you have a FAT aware DOS installed in your system. MAKEIMG makes use of the firmware calls CAS_OUT_OPEN, CAS_OUT_CLOSE and CAS_OUT_CHAR so your DOS must support them.&amp;lt;br /&amp;gt;&lt;br /&gt;
Copy the files MAKEIMG.BAS and MAKEIMG.BIN to the root directory of your FAT formatted hard disk and make it your current drive. Run the utility with ''RUN&amp;quot;MAKEIMG&amp;quot;'' and don't hold your breath!&amp;lt;br /&amp;gt;&lt;br /&gt;
Making an image file this way takes more than 1.5 hour for an 8MB file so literally... don't hold your breath.&amp;lt;br /&amp;gt;&lt;br /&gt;
Here is a small tutorial on how to setup and use a CP/M image file: https://youtu.be/GMWsRzNhQTM&amp;lt;br /&amp;gt;&lt;br /&gt;
===MAKEIMG.EXE===&lt;br /&gt;
This utility is a [[SymbOS]] application.&amp;lt;br /&amp;gt;&lt;br /&gt;
Use this utility to create your CP/M hard disk images from within [[SymbOS]]. 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.&amp;lt;br /&amp;gt;&lt;br /&gt;
MAKEIMG.EXE has been developed with [http://www.symbos.de/quigs.htm Quigs] for [[SymbOS]].&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Hdcpm-makeimg-sym1.png|thumb|MAKEIMG.EXE in action]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==The HDMGR.COM utility==&lt;br /&gt;
This is the Hard Disk Manager utility.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can use this utility to get information about your hard disk geometry, disk image files, partitions and boot sector. You have to use this utility to format a hard disk, disk image file or partition to CP/M format or manipulate the boot sector of the hard disk and/or transfer an .EMS system file to the reserved track of the hard disk.&amp;lt;br /&amp;gt;&lt;br /&gt;
The boot sector contains information about the CP/M disk drive letters, start-up drive and console colour scheme. All those properties can be changed with HDMGR.COM.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR will perform a fragmentation test of the discovered CP/M hard disk image files uppon execution (not for Albireo).&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
The HDMGR.COM utility is self explanatory. Just run it from the CP/M command prompt.&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Hdcpm-hdmgr-m.png|thumb|HDMGR main menu]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-1.png|thumb|HDMGR Hardware information]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-2.png|thumb|HDMGR Partition information]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-3.png|thumb|HDMGR CP/M disk image information]]&lt;br /&gt;
|}&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Hdcpm-hdmgr-4.png|thumb|HDMGR Boot sector information]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-5.png|thumb|HDMGR Log disk]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-7.png|thumb|HDMGR Manage boot sector]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-8.png|thumb|HDMGR Transfer CP/M to disk]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==The RTC.COM utility==&lt;br /&gt;
You can make use of the RTC.COM utility in order to keep CP/M date and time updated.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can synchronize the date and time of CP/M Plus with the RTC by running ''RTC -G'' manually or via your PROFILE.SUB.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can also set your RTC to the current CP/M date and time by running ''RTC -S'' (not for M4 board)&amp;lt;br /&amp;gt;&lt;br /&gt;
Currently RTC.COM works with the RTC found in Symbiface II, Symbiface III and M4 board (read only).&amp;lt;br /&amp;gt;&lt;br /&gt;
DATE.COM, DIR.COM and SHOW.COM commands, patched for Year 2000 compatibility can be downloaded from the [http://www.cpm.z80.de/binary.html CP/M source archive - Digital Research Binary files section] .&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Error messages==&lt;br /&gt;
===ROM checksum error===&lt;br /&gt;
* ''*** HDCPM ROM checksum error ***&lt;br /&gt;
	The ROM has failed the checksum test.&lt;br /&gt;
	The contents are probably corrupted. The ROM will not be initialized.&lt;br /&gt;
&lt;br /&gt;
===Hard disk errors===&lt;br /&gt;
* ''*** No mass storage found ***''&lt;br /&gt;
	No compatible mass storage interface can be found.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: DISK I/O''&lt;br /&gt;
	I/O error occurred during the last read/write operation.&lt;br /&gt;
	Your hard disk might be defect or the USB disk is not enabled.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: INVALID BOOT SECTOR''&lt;br /&gt;
	No FAT or CP/M boot sector was found in a not partitioned hard disk.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: INVALID FILE SYSTEM''&lt;br /&gt;
	The first partition in a partitioned hard disk is not a FAT or CP/M-80&lt;br /&gt;
	one.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: INVALID SECTOR SIZE''&lt;br /&gt;
	The hard disk used has a sector size not equal to 512 bytes.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: CPMDSK01.IMG NOT FOUND''&lt;br /&gt;
	The CP/M image file named CPMDSK01.IMG can't be found in the FAT&lt;br /&gt;
	formatted hard disk or partition. &lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: CP/M SYSTEM FILE NOT FOUND''&lt;br /&gt;
	The .EMS CP/M system file can't be found in the system track of your&lt;br /&gt;
	CP/M partition or image file.&lt;br /&gt;
	&lt;br /&gt;
*  ''ERROR: CPMDSK01.IMG IS FRAGMENTED''&lt;br /&gt;
	The first CP/M image file is fragmented, the system won't mount it.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: CPMDSK01.IMG HAS WRONG LENGTH''&lt;br /&gt;
	The first CP/M image file has wrong length, the system won't mount it.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: CPMDSK01.IMG IS NOT FORMATTED''&lt;br /&gt;
	The first CP/M image file is not formatted to CP/M-80 format, the&lt;br /&gt;
	system won't mount it. Use the HDMGR.COM utility to format it.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: INCOMPATIBLE EMS FILE''&lt;br /&gt;
	The .EMS system file that was loaded from the system track is not&lt;br /&gt;
	compatible with HDCPM.&lt;br /&gt;
&lt;br /&gt;
===RTC errors===&lt;br /&gt;
* ''*** Battery depleted ***''&lt;br /&gt;
	The RTC battery is depleted. The RTC driver will continue to operate&lt;br /&gt;
	normally but the readings are not reliable. Replace the RTC battery.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Release info &amp;amp; download==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Version !! Changes !! Download&lt;br /&gt;
|-&lt;br /&gt;
| v1.00 December 2021 || Initial release || [[Media:hdcpm100.dsk|hdcpm100.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.01 January 2022 || HDCPM.ROM, HDMGR.COM: code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: (bug fix) fragmented file detection was not working properly unless the file was CPMDSK01.IMG&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: (bug fix) unformatted image file detection was not working properly. New error message added.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) CP/M drive table wasn't patched properly.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) initialization of floppy drive(s) was corrupted due to misplaced code.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: added .EMS file compatibility check. New error message added.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: added support for Dobbertin RAM disk driver.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: added compatibility with Dobbertin HD20 Harddisc&amp;lt;br /&amp;gt;&lt;br /&gt;
MAKEIMG.EXE: added utility for creating an image file from within SYMBOS.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&lt;br /&gt;
|| [[Media:hdcpm101.dsk|hdcpm101.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.02 March 2022 || HDCPM.ROM, HDMGR.COM: added support for M4 board.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: added support for uIDE-16 interface.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) the ROM was initialized even if no compatible interface was found.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: error message change.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: option &amp;quot;F&amp;quot; has been removed. HDCPM will always do a disk fragmentation test during boot.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: power up message changed in order to provide information about the type of the detected interface.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: two bytes of RAM will be reserved by the ROM for storing the interface type and M4 ROM number.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&lt;br /&gt;
|| [[Media:hdcpm102.dsk|hdcpm102.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.03 April 2022 || HDCPM.ROM, HDMGR.COM: added support for USIfAC II.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) uIDE-16 detection was broken.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&lt;br /&gt;
|| [[Media:hdcpm103.dsk|hdcpm103.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.04 June 2022|| HDCPM.ROM: code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.BIN: added executable binary file version of HDCPM.&lt;br /&gt;
|| [[Media:hdcpm104.dsk|hdcpm104.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.05 July 2022 || HDCPM.ROM, HDCPM.BIN, HDMGR.COM: added support for Symbiface III.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDCPM.BIN:  code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR.COM: Hardware info added for USIfAC II&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR.COM: (bug fix) the 'Select boot file' menu was garbled if there were 8 or more .EMS files present.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&lt;br /&gt;
|| [[Media:hdcpm105.dsk|hdcpm105.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.06 January 2023 || HDCPM.ROM, HDCPM.BIN, HDMGR.COM: added support for Albireo.&amp;lt;br /&amp;gt;&lt;br /&gt;
RTC.COM: added support for M4 Board (r/o) and Symbiface 3.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDCPM.BIN: (bug fix) CPC was freezing after mounting the CP/M disk(s) with incompatible .EMS file.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR.COM: (bug fix) the Stack was overflowed in some rare cases.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&amp;lt;br /&amp;gt;&lt;br /&gt;
|| [[Media:hdcpm106.dsk|hdcpm106.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.10 ??? 2023 || HDCPM.ROM, HDCPM.BIN: added support for CPC464 with #C3 mode compatible RAM expansion card.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDCPM.BIN: can now boot CP/M Plus on a CPC that has no or faulty Floppy Disc Controller present.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: ROM checksum test and new error message added.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: removed blank line from ROM initialization message.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDCPM.BIN, HDMGR.COM:  code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDCPM.BIN: (bug fix) incorrect patching would corrupt the Dobbertin RAM drive on CP/M Plus v1.1&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) |HDDPB was displaying wrong values&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR.COM: (bug fix) a corruption of the MBR of USB/SD card occured in some rare cases.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&amp;lt;br /&amp;gt;&lt;br /&gt;
|| [[Media:hdcpm110.dsk|hdcpm110.dsk]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Other downloads==&lt;br /&gt;
*[[Media:CPMDSK01&amp;amp;02.zip|CP/M disk images]] - CPMDSK01.IMG is bootable and contains all the files of the 3 CP/M Plus system disks and year 2000 compliant binaries downloaded from the [http://www.cpm.z80.de/binary.html Digital Research Binary Files]. CPMDSK02.IMG is empty and can also be used as a template.&amp;lt;br /&amp;gt;&lt;br /&gt;
*[[Media:Z3Plus.part1.rar|ZPM3+ZCCP disk image part 1]] , [[Media:Z3Plus.part2.rar|ZPM3+ZCCP disk image part 2]] - The Amstrad BDOS and CCP have been replaced with their counterparts [https://github.com/wwarthen/CPU280/tree/master/ZPM3/zpm3.txt ZPM3] and [https://github.com/wwarthen/CPU280/tree/master/ZCCP/zccp.txt ZCCP] written by Simeon Cran. It is [https://www.cpcwiki.eu/index.php/Z-System Z-system, Z3Plus] compatible and contains the Z3Plus system files, all the files of the 3 CP/M Plus system disks, year 2000 compliant binaries and also contains some useful tools, help files and manuals.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Videos==&lt;br /&gt;
* [https://youtu.be/GMWsRzNhQTM How to create and prepare a CP/M image file in a FAT formatted hard disk]&lt;br /&gt;
* [https://youtu.be/nxow6Y5O4Dc Hard disk utilization and dual boot]&lt;br /&gt;
* [https://youtu.be/em7dHOdaylg How to create a CP/M image file under SYMBOS]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
[[category:Expansion ROM]] [[category:Applications]] [[category:CP/M]]&lt;/div&gt;</summary>
		<author><name>D kef</name></author>	</entry>

	<entry>
		<id>https://oldwiki.cpcwiki.eu/index.php?title=HDCPM&amp;diff=112280</id>
		<title>HDCPM</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.cpcwiki.eu/index.php?title=HDCPM&amp;diff=112280"/>
				<updated>2023-08-22T11:06:03Z</updated>
		
		<summary type="html">&lt;p&gt;D kef: /* Release info &amp;amp; download */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;HDCPM is a Hard Disk boot loader for [[CP/M]] Plus, developed by d_kef&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can read more about the development of the application here:&amp;lt;br /&amp;gt;&lt;br /&gt;
https://www.cpcwiki.eu/forum/applications/hdcpm-boot-and-run-cpm-plus-from-hard-disk/&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:hdcpm.gif|HDCPM booting CP/M Plus]]&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It comes in the form of:&lt;br /&gt;
* a standard background ROM that can be installed in any available ROM position.&lt;br /&gt;
* a standard binary file that can be loaded from floppy or hard drive.&lt;br /&gt;
&lt;br /&gt;
 	&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following configurations are possible with one hard disk:&lt;br /&gt;
&lt;br /&gt;
* One not partitioned, CP/M formatted hard disk. The whole hard disk is used by CP/M.&lt;br /&gt;
* One to four CP/M formatted partitions. Every partition is accessed as a separate hard disk by CP/M.&lt;br /&gt;
* 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.&lt;br /&gt;
* 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.&lt;br /&gt;
* For interfaces that use SD card or USB flash drive as a mass storage device ([[M4 Board]], [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II], [http://www.tmtlogic.com/ Symbiface III] or [[Albireo]]) the only supported configuration is one to four CP/M disk image files in the root directory of the FAT file system.&lt;br /&gt;
	&lt;br /&gt;
Currently only the master IDE device can be accessed by HDCPM. The slave device is available to be used by your favourite DOS.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
HDCPM can also utilize the RTC found in the [[SYMBiFACE II]] in order to implement CP/M Plus BIOS function 26: TIME.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
HDCPM is compatible and can be used together with the [[Dobbertin Harddisc]].&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
HDCPM has been developed with [[WinApe]] Z80 Assembler and was tested with [[WinApe]], [[CPCemu]], an Amstrad Plus 464 upgraded to 6128 an Amstrad CPC 6128 and an Amstrad CPC 464 with [https://www.cpcwiki.eu/index.php/Universal_512K_and_1MByte_RAM_Expansions Universal 512K RAM Expansion].&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
HDCPM distribution disk contains the following files:&lt;br /&gt;
* HDCPM.ROM the ROM itself&lt;br /&gt;
* HDCPM.BIN the executable binary file&lt;br /&gt;
* HDMGR.COM Hard Disk Manager utility&lt;br /&gt;
* RTC.COM RTC synchronization utility&lt;br /&gt;
* MAKEIMG.BAS CP/M image file creation utility&lt;br /&gt;
* MAKEIMG.BIN CP/M image file creation binary&lt;br /&gt;
* MAKEIMG.EXE CP/M image file creation utility for [[SymbOS]]&lt;br /&gt;
* HDCPM.DOC the User guide&lt;br /&gt;
&lt;br /&gt;
HDCPM is free software. It can be used and distributed with no restrictions.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Prerequisites==&lt;br /&gt;
* Amstrad CPC/Plus computer capable of running CP/M Plus.&lt;br /&gt;
* ROM box or other ROM expansion hardware if using the ROM.&lt;br /&gt;
* Optionaly a FAT aware DOS like M4 ROM, USIfAC ROM, [[UniDOS]], [https://www.cpcwiki.eu/forum/applications/cubeios-fat16fat32-rom-for-the-cpc's-with-xmass/ CubeMDOS] etc if using the binary.&lt;br /&gt;
* One of the following mass storage interfaces:&lt;br /&gt;
** [[SYMBiFACE II]]&lt;br /&gt;
** [[X-Mass]]&lt;br /&gt;
** [https://github.com/salafek/cyboard-for-cpc Cyboard]&lt;br /&gt;
** [[uIDE 16]] (base address = &amp;amp;FEF0)&lt;br /&gt;
** [[M4 Board]]&lt;br /&gt;
** [[USIFAC]] II/[[ULIfAC]]&lt;br /&gt;
** [http://www.tmtlogic.com/ Symbiface III]&lt;br /&gt;
** [[Albireo]] (SD card only)&lt;br /&gt;
* Compatible storage device with enough free space to accommodate the desirable CP/M hard disk configuration.&lt;br /&gt;
* Floppy disk drive for initialization of the file system.&lt;br /&gt;
* CP/M Plus system disks for making the system bootable.&lt;br /&gt;
* Optionally a [[SYMBiFACE II]] compatible RTC.&lt;br /&gt;
&lt;br /&gt;
==Restrictions==&lt;br /&gt;
* CP/M 2.2 or lower is not supported.&lt;br /&gt;
* 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.&lt;br /&gt;
* Only the master IDE device is accessible by HDCPM.&lt;br /&gt;
* The maximum number of hard disk partition/images supported is four.&lt;br /&gt;
* Only primary partitions are supported.&lt;br /&gt;
* If you want to use CP/M disk images then they must be stored in a FAT16 or FAT32 formatted disk or partition.&lt;br /&gt;
* If the hard disk is partitioned then the CP/M disk images must be placed in the first partition of the disk.&lt;br /&gt;
* The CP/M disk images must be placed in the root directory of the FAT file system.&lt;br /&gt;
* The CP/M disk images must NOT be fragmented and must have the correct size.&lt;br /&gt;
* 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. &lt;br /&gt;
* Only storage devices with 512 bytes sector size are supported.&lt;br /&gt;
* Only storage devices with LBA addressing are supported.&lt;br /&gt;
* Date stamps of CP/M disk image files are not maintained.&lt;br /&gt;
* 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 letters for your IDE media then the corresponding HD20 partitions will be unavailable under CP/M.&lt;br /&gt;
&lt;br /&gt;
==How it works==&lt;br /&gt;
===Using the ROM===&lt;br /&gt;
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:&lt;br /&gt;
|HDCPM (no TIME function support) or |HDCPMT (TIME function support)&amp;lt;br /&amp;gt;&lt;br /&gt;
Alternatively it can be started by holding down the Tab key (no TIME function support) or Shift+Tab (TIME function support), during power-up.&amp;lt;br /&amp;gt;&lt;br /&gt;
===Using the binary===&lt;br /&gt;
HDCPM can be started by running the HDCPM.BIN file from floppy drive or mass storage.&amp;lt;br /&amp;gt;&lt;br /&gt;
===Functions===&lt;br /&gt;
HDCPM will then execute the following functions:&amp;lt;br /&amp;gt;&lt;br /&gt;
* Search for a compatible mass storage interface.&lt;br /&gt;
* Initialize the mass storage interface if needed.&lt;br /&gt;
* Move the boot loader and the CP/M patcher to RAM.&lt;br /&gt;
* Mount 1 to 4 CP/M image files and/or partitions and perform fragmentation and size test.&lt;br /&gt;
* 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.&lt;br /&gt;
* Read the .EMS file from the reserved track and store it in RAM just as the normal CP/M Plus boot loader does.&lt;br /&gt;
* 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.&lt;br /&gt;
* Patch the floppy disk drive routines in case a FDC's not been found.&lt;br /&gt;
* Patch the SCB in order to change the startup/default drive.&lt;br /&gt;
* 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 memory expansion]] or [[Dobbertin Memory Expansion]] driver is present.&lt;br /&gt;
* Move the ALV of the Dk'tronics RAM disk if [[Z-System]] has been detected.&lt;br /&gt;
* Patch the CP/M console with the desired colour scheme. &lt;br /&gt;
* Patch the system message.&lt;br /&gt;
* Do a normal CP/M cold start.&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==CP/M Plus disk image files==&lt;br /&gt;
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 [https://hexed.it/ hexed.it] or any hex editor capable of creating binary files filled with a specific pattern.&amp;lt;br /&amp;gt;&lt;br /&gt;
In case of hexed.it select 'New file' fill in 'Size of the new file = 8519680' and 'Fill Pattern = 0xE5' and press apply. Save the file as CPMDSK01.IMG&amp;lt;br /&amp;gt;&lt;br /&gt;
If you have a FAT capable DOS installed in your AMSTRAD you can use the provided MAKEIMG.BAS utility to create your image file. Keep in mind that it takes more than 1.5 hour for a 8MB image file to be created that way.&amp;lt;br /&amp;gt;&lt;br /&gt;
CP/M disk image files can be accessed by a modern computer with [http://www.moria.de/~michael/cpmtools/ cpmtools]. Use the command |HDDEF to see the record you must insert in the diskdefs file.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The HDCPM record for diskdefs is:&lt;br /&gt;
&lt;br /&gt;
       diskdef hdcpm&lt;br /&gt;
          seclen 512&lt;br /&gt;
          tracks 65&lt;br /&gt;
          sectrk 256&lt;br /&gt;
          blocksize 8192&lt;br /&gt;
          maxdir 1024&lt;br /&gt;
          skew 0&lt;br /&gt;
          boottrk 1&lt;br /&gt;
          os 3&lt;br /&gt;
       end&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
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. [https://www.cpcwiki.eu/index.php/Albireo Albireo] incorporates a file management IC that performs FAT file system operations and handles fragmented files properly. In such case fragmented image files is not a problem. HDCPM will never fragment a CP/M image file.&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Hdcpm-boot-m4.png|thumb|HDCPM binary booting on M4 Board]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==CP/M Plus disk/partitions==&lt;br /&gt;
You can also create one or more partitions in order to format them to [http://www.seasip.info/Cpm/format31.html CP/M-80] 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.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM examines the hard disk's MBR upon start and finds the partition information. Then it finds the LBA of the first sector of each partition and passes it to the CP/M hard disk driver. The CP/M hard disk driver doesn't know anything about partitions. It accesses the partition as if it was a real hard disk.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:hdcpm-ui-boot.png|thumb|HDCPM ROM booting on uIDE-16]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
===Using the ROM===&lt;br /&gt;
* Install the HDCPM ROM in a free ROM slot of your ROM box.&lt;br /&gt;
* Plug in your [[SYMBiFACE II]] compatible IDE interface, [[uIDE 16]], [[M4 Board]], [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] or [[Albireo]] and attach the proper mass storage device.&lt;br /&gt;
* 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 shown inside the parentheses:&amp;lt;br /&amp;gt;&lt;br /&gt;
** (S2): [[SYMBiFACE II]] compatible interface&lt;br /&gt;
** (uI): [[uIDE 16]] interface&lt;br /&gt;
** (M4): [[M4 Board]]&lt;br /&gt;
** (US): [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II]&lt;br /&gt;
** (S3): [http://www.tmtlogic.com/ Symbiface III]&lt;br /&gt;
** (AL): [[Albireo]]&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:hdcpm-s2.png|thumb|HDCPM ROM - SYMBiFACE II]]&lt;br /&gt;
|[[File:hdcpm-ui.png|thumb|HDCPM ROM - uIDE-16]]&lt;br /&gt;
|[[File:hdcpm-m4.png|thumb|HDCPM ROM - M4 Board]]&lt;br /&gt;
|}&lt;br /&gt;
{|&lt;br /&gt;
|[[File:hdcpm-us.png|thumb|HDCPM ROM - USIfAC II]]&lt;br /&gt;
|[[File:hdcpm-s3.png|thumb|HDCPM ROM - Symbiface III]]&lt;br /&gt;
|[[File:hdcpm-al.png|thumb|HDCPM ROM - Albireo]]&lt;br /&gt;
|}&lt;br /&gt;
In case a RTC is detected you will also see the RTC initialization message and the current date and time: ''RTC found: 2021/01/01 12:01:01''&lt;br /&gt;
* Use your original CP/M Plus system disk set to Boot CP/M Plus.&lt;br /&gt;
* 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.&lt;br /&gt;
* Reset your AMSTRAD and boot CP/M from the hard disk with the command |HDCPM. The Boot loader will check your image file(s) against fragmentation and correct size and boot the system to the CP/M command prompt. If the first image file is fragmented or has the wrong length the system will not boot. All other image files will be ignored if found to be fragmented or have the wrong length.&lt;br /&gt;
* In case you don't use CP/M image files just boot the system with |HDCPM or |HDCPMT&lt;br /&gt;
* Copy the files from your CP/M system floppy disks to the first hard disk.&lt;br /&gt;
* Copy any other needed application etc. to your CP/M hard disk(s).&lt;br /&gt;
* You are ready to go.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Using the binary===&lt;br /&gt;
* Plug in your [[SYMBiFACE II]] compatible IDE interface, [[uIDE 16]], [[M4 Board]], [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] or [[Albireo]] and attach the proper mass storage device.&lt;br /&gt;
* Use your original CP/M Plus system disk set to Boot CP/M Plus.&lt;br /&gt;
* 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.&lt;br /&gt;
* 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.&lt;br /&gt;
* You are ready to go.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==ROM commands==&lt;br /&gt;
[[File:hdcpm-us-boot.png|thumb|HDCPM ROM booting on USIfAC II]]&lt;br /&gt;
* |HDCPM mounts the hard disks and boots CP/M Plus. If [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] is used enable the USB disk with the |USB command first.&lt;br /&gt;
* |HDCPMT works like |HDCPM but also utilizes the RTC.&lt;br /&gt;
* |HDDPB shows the Disk Parameter Block.&lt;br /&gt;
* |HDDEF shows the diskdefs entry for CP/M tools and the file system size.&lt;br /&gt;
* |DATE displays the current date.&lt;br /&gt;
* |TIME displays the current time. If [[M4 Board]] is used |DATE and |TIME will be redirected to M4 |TIME.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==The HDCPM binary file==&lt;br /&gt;
* If [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] is used, use your PC to copy HDCPM.BIN to your USB flash disk. Then insert it to your [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] power up your Amstrad and enable the USB disk with the |USB command.&lt;br /&gt;
* Execute the file from the floppy disk or from your mass storage device with ''RUN&amp;quot;HDCPM&amp;quot;''. 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.&lt;br /&gt;
*  [[M4 Board]] and [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ 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 [https://www.cpcwiki.eu/forum/applications/cubeios-fat16fat32-rom-for-the-cpc's-with-xmass/ CubeMDOS] or [[UniDOS]], installed.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==The MAKEIMG.BAS and MAKEIMG.EXE utilities==&lt;br /&gt;
===MAKEIMG.BAS===&lt;br /&gt;
Although this utility should not be your first option, you can use it to make a new empty CP/M disk image file.&amp;lt;br /&amp;gt;&lt;br /&gt;
In case you decide to use it make sure you have a FAT aware DOS installed in your system. MAKEIMG makes use of the firmware calls CAS_OUT_OPEN, CAS_OUT_CLOSE and CAS_OUT_CHAR so your DOS must support them.&amp;lt;br /&amp;gt;&lt;br /&gt;
Copy the files MAKEIMG.BAS and MAKEIMG.BIN to the root directory of your FAT formatted hard disk and make it your current drive. Run the utility with ''RUN&amp;quot;MAKEIMG&amp;quot;'' and don't hold your breath!&amp;lt;br /&amp;gt;&lt;br /&gt;
Making an image file this way takes more than 1.5 hour for an 8MB file so literally... don't hold your breath.&amp;lt;br /&amp;gt;&lt;br /&gt;
Here is a small tutorial on how to setup and use a CP/M image file: https://youtu.be/GMWsRzNhQTM&amp;lt;br /&amp;gt;&lt;br /&gt;
===MAKEIMG.EXE===&lt;br /&gt;
This utility is a [[SymbOS]] application.&amp;lt;br /&amp;gt;&lt;br /&gt;
Use this utility to create your CP/M hard disk images from within [[SymbOS]]. 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.&amp;lt;br /&amp;gt;&lt;br /&gt;
MAKEIMG.EXE has been developed with [http://www.symbos.de/quigs.htm Quigs] for [[SymbOS]].&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Hdcpm-makeimg-sym1.png|thumb|MAKEIMG.EXE in action]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==The HDMGR.COM utility==&lt;br /&gt;
This is the Hard Disk Manager utility.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can use this utility to get information about your hard disk geometry, disk image files, partitions and boot sector. You have to use this utility to format a hard disk, disk image file or partition to CP/M format or manipulate the boot sector of the hard disk and/or transfer an .EMS system file to the reserved track of the hard disk.&amp;lt;br /&amp;gt;&lt;br /&gt;
The boot sector contains information about the CP/M disk drive letters, start-up drive and console colour scheme. All those properties can be changed with HDMGR.COM.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR will perform a fragmentation test of the discovered CP/M hard disk image files uppon execution (not for Albireo).&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
The HDMGR.COM utility is self explanatory. Just run it from the CP/M command prompt.&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Hdcpm-hdmgr-m.png|thumb|HDMGR main menu]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-1.png|thumb|HDMGR Hardware information]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-2.png|thumb|HDMGR Partition information]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-3.png|thumb|HDMGR CP/M disk image information]]&lt;br /&gt;
|}&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Hdcpm-hdmgr-4.png|thumb|HDMGR Boot sector information]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-5.png|thumb|HDMGR Log disk]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-7.png|thumb|HDMGR Manage boot sector]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-8.png|thumb|HDMGR Transfer CP/M to disk]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==The RTC.COM utility==&lt;br /&gt;
You can make use of the RTC.COM utility in order to keep CP/M date and time updated.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can synchronize the date and time of CP/M Plus with the RTC by running ''RTC -G'' manually or via your PROFILE.SUB.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can also set your RTC to the current CP/M date and time by running ''RTC -S'' (not for M4 board)&amp;lt;br /&amp;gt;&lt;br /&gt;
Currently RTC.COM works with the RTC found in Symbiface II, Symbiface III and M4 board (read only).&amp;lt;br /&amp;gt;&lt;br /&gt;
DATE.COM, DIR.COM and SHOW.COM commands, patched for Year 2000 compatibility can be downloaded from the [http://www.cpm.z80.de/binary.html CP/M source archive - Digital Research Binary files section] .&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Error messages==&lt;br /&gt;
===ROM checksum error===&lt;br /&gt;
* ''*** HDCPM ROM checksum error ***&lt;br /&gt;
	The ROM has failed the checksum test.&lt;br /&gt;
	The contents are probably corrupted. The ROM will not be initialized.&lt;br /&gt;
&lt;br /&gt;
===Hard disk errors===&lt;br /&gt;
* ''*** No mass storage found ***''&lt;br /&gt;
	No compatible mass storage interface can be found.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: DISK I/O''&lt;br /&gt;
	I/O error occurred during the last read/write operation.&lt;br /&gt;
	Your hard disk might be defect or the USB disk is not enabled.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: INVALID BOOT SECTOR''&lt;br /&gt;
	No FAT or CP/M boot sector was found in a not partitioned hard disk.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: INVALID FILE SYSTEM''&lt;br /&gt;
	The first partition in a partitioned hard disk is not a FAT or CP/M-80&lt;br /&gt;
	one.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: INVALID SECTOR SIZE''&lt;br /&gt;
	The hard disk used has a sector size not equal to 512 bytes.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: CPMDSK01.IMG NOT FOUND''&lt;br /&gt;
	The CP/M image file named CPMDSK01.IMG can't be found in the FAT&lt;br /&gt;
	formatted hard disk or partition. &lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: CP/M SYSTEM FILE NOT FOUND''&lt;br /&gt;
	The .EMS CP/M system file can't be found in the system track of your&lt;br /&gt;
	CP/M partition or image file.&lt;br /&gt;
	&lt;br /&gt;
*  ''ERROR: CPMDSK01.IMG IS FRAGMENTED''&lt;br /&gt;
	The first CP/M image file is fragmented, the system won't mount it.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: CPMDSK01.IMG HAS WRONG LENGTH''&lt;br /&gt;
	The first CP/M image file has wrong length, the system won't mount it.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: CPMDSK01.IMG IS NOT FORMATTED''&lt;br /&gt;
	The first CP/M image file is not formatted to CP/M-80 format, the&lt;br /&gt;
	system won't mount it. Use the HDMGR.COM utility to format it.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: INCOMPATIBLE EMS FILE''&lt;br /&gt;
	The .EMS system file that was loaded from the system track is not&lt;br /&gt;
	compatible with HDCPM.&lt;br /&gt;
&lt;br /&gt;
===RTC errors===&lt;br /&gt;
* ''*** Battery depleted ***''&lt;br /&gt;
	The RTC battery is depleted. The RTC driver will continue to operate&lt;br /&gt;
	normally but the readings are not reliable. Replace the RTC battery.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Release info &amp;amp; download==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Version !! Changes !! Download&lt;br /&gt;
|-&lt;br /&gt;
| v1.00 December 2021 || Initial release || [[Media:hdcpm100.dsk|hdcpm100.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.01 January 2022 || HDCPM.ROM, HDMGR.COM: code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: (bug fix) fragmented file detection was not working properly unless the file was CPMDSK01.IMG&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: (bug fix) unformatted image file detection was not working properly. New error message added.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) CP/M drive table wasn't patched properly.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) initialization of floppy drive(s) was corrupted due to misplaced code.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: added .EMS file compatibility check. New error message added.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: added support for Dobbertin RAM disk driver.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: added compatibility with Dobbertin HD20 Harddisc&amp;lt;br /&amp;gt;&lt;br /&gt;
MAKEIMG.EXE: added utility for creating an image file from within SYMBOS.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&lt;br /&gt;
|| [[Media:hdcpm101.dsk|hdcpm101.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.02 March 2022 || HDCPM.ROM, HDMGR.COM: added support for M4 board.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: added support for uIDE-16 interface.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) the ROM was initialized even if no compatible interface was found.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: error message change.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: option &amp;quot;F&amp;quot; has been removed. HDCPM will always do a disk fragmentation test during boot.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: power up message changed in order to provide information about the type of the detected interface.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: two bytes of RAM will be reserved by the ROM for storing the interface type and M4 ROM number.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&lt;br /&gt;
|| [[Media:hdcpm102.dsk|hdcpm102.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.03 April 2022 || HDCPM.ROM, HDMGR.COM: added support for USIfAC II.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) uIDE-16 detection was broken.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&lt;br /&gt;
|| [[Media:hdcpm103.dsk|hdcpm103.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.04 June 2022|| HDCPM.ROM: code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.BIN: added executable binary file version of HDCPM.&lt;br /&gt;
|| [[Media:hdcpm104.dsk|hdcpm104.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.05 July 2022 || HDCPM.ROM, HDCPM.BIN, HDMGR.COM: added support for Symbiface III.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDCPM.BIN:  code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR.COM: Hardware info added for USIfAC II&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR.COM: (bug fix) the 'Select boot file' menu was garbled if there were 8 or more .EMS files present.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&lt;br /&gt;
|| [[Media:hdcpm105.dsk|hdcpm105.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.06 January 2023 || HDCPM.ROM, HDCPM.BIN, HDMGR.COM: added support for Albireo.&amp;lt;br /&amp;gt;&lt;br /&gt;
RTC.COM: added support for M4 Board (r/o) and Symbiface 3.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDCPM.BIN: (bug fix) CPC was freezing after mounting the CP/M disk(s) with incompatible .EMS file.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR.COM: (bug fix) the Stack was overflowed in some rare cases.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&amp;lt;br /&amp;gt;&lt;br /&gt;
|| [[Media:hdcpm106.dsk|hdcpm106.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.10 ??? 2023 || HDCPM.ROM, HDCPM.BIN: added support for CPC464 with #C3 mode compatible RAM expansion card.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDCPM.BIN: can now boot CP/M Plus on a CPC that has no or faulty Floppy Disc Controller present.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: ROM checksum test and new error message added.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: removed blank line from ROM initialization message.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDCPM.BIN, HDMGR.COM:  code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDCPM.BIN: (bug fix) incorrect patching would corrupt the Dobbertin RAM drive on CP/M Plus v1.1&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) |HDDPB was displaying wrong values&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR.COM: (bug fix) a corruption of the MBR of USB/SD card occured in some rare cases.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&amp;lt;br /&amp;gt;&lt;br /&gt;
|| [[Media:hdcpm110.dsk|hdcpm110.dsk]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Other downloads==&lt;br /&gt;
*[[Media:CPMDSK01&amp;amp;02.zip|CP/M disk images]] - CPMDSK01.IMG is bootable and contains all the files of the 3 CP/M Plus system disks and year 2000 compliant binaries downloaded from the [http://www.cpm.z80.de/binary.html Digital Research Binary Files]. CPMDSK02.IMG is empty and can also be used as a template.&amp;lt;br /&amp;gt;&lt;br /&gt;
*[[Media:Z3Plus.part1.rar|ZPM3+ZCCP disk image part 1]] , [[Media:Z3Plus.part2.rar|ZPM3+ZCCP disk image part 2]] - The Amstrad BDOS and CCP have been replaced with their counterparts [https://github.com/wwarthen/CPU280/tree/master/ZPM3/zpm3.txt ZPM3] and [https://github.com/wwarthen/CPU280/tree/master/ZCCP/zccp.txt ZCCP] written by Simeon Cran. It is [https://www.cpcwiki.eu/index.php/Z-System Z-system, Z3Plus] compatible and contains the Z3Plus system files, all the files of the 3 CP/M Plus system disks, year 2000 compliant binaries and also contains some useful tools, help files and manuals.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Videos==&lt;br /&gt;
* [https://youtu.be/GMWsRzNhQTM How to create and prepare a CP/M image file in a FAT formatted hard disk]&lt;br /&gt;
* [https://youtu.be/nxow6Y5O4Dc Hard disk utilization and dual boot]&lt;br /&gt;
* [https://youtu.be/em7dHOdaylg How to create a CP/M image file under SYMBOS]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
[[category:Expansion ROM]] [[category:Applications]] [[category:CP/M]]&lt;/div&gt;</summary>
		<author><name>D kef</name></author>	</entry>

	<entry>
		<id>https://oldwiki.cpcwiki.eu/index.php?title=HDCPM&amp;diff=112279</id>
		<title>HDCPM</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.cpcwiki.eu/index.php?title=HDCPM&amp;diff=112279"/>
				<updated>2023-08-22T10:53:46Z</updated>
		
		<summary type="html">&lt;p&gt;D kef: /* Release info &amp;amp; download */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;HDCPM is a Hard Disk boot loader for [[CP/M]] Plus, developed by d_kef&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can read more about the development of the application here:&amp;lt;br /&amp;gt;&lt;br /&gt;
https://www.cpcwiki.eu/forum/applications/hdcpm-boot-and-run-cpm-plus-from-hard-disk/&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:hdcpm.gif|HDCPM booting CP/M Plus]]&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It comes in the form of:&lt;br /&gt;
* a standard background ROM that can be installed in any available ROM position.&lt;br /&gt;
* a standard binary file that can be loaded from floppy or hard drive.&lt;br /&gt;
&lt;br /&gt;
 	&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following configurations are possible with one hard disk:&lt;br /&gt;
&lt;br /&gt;
* One not partitioned, CP/M formatted hard disk. The whole hard disk is used by CP/M.&lt;br /&gt;
* One to four CP/M formatted partitions. Every partition is accessed as a separate hard disk by CP/M.&lt;br /&gt;
* 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.&lt;br /&gt;
* 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.&lt;br /&gt;
* For interfaces that use SD card or USB flash drive as a mass storage device ([[M4 Board]], [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II], [http://www.tmtlogic.com/ Symbiface III] or [[Albireo]]) the only supported configuration is one to four CP/M disk image files in the root directory of the FAT file system.&lt;br /&gt;
	&lt;br /&gt;
Currently only the master IDE device can be accessed by HDCPM. The slave device is available to be used by your favourite DOS.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
HDCPM can also utilize the RTC found in the [[SYMBiFACE II]] in order to implement CP/M Plus BIOS function 26: TIME.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
HDCPM is compatible and can be used together with the [[Dobbertin Harddisc]].&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
HDCPM has been developed with [[WinApe]] Z80 Assembler and was tested with [[WinApe]], [[CPCemu]], an Amstrad Plus 464 upgraded to 6128 an Amstrad CPC 6128 and an Amstrad CPC 464 with [https://www.cpcwiki.eu/index.php/Universal_512K_and_1MByte_RAM_Expansions Universal 512K RAM Expansion].&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
HDCPM distribution disk contains the following files:&lt;br /&gt;
* HDCPM.ROM the ROM itself&lt;br /&gt;
* HDCPM.BIN the executable binary file&lt;br /&gt;
* HDMGR.COM Hard Disk Manager utility&lt;br /&gt;
* RTC.COM RTC synchronization utility&lt;br /&gt;
* MAKEIMG.BAS CP/M image file creation utility&lt;br /&gt;
* MAKEIMG.BIN CP/M image file creation binary&lt;br /&gt;
* MAKEIMG.EXE CP/M image file creation utility for [[SymbOS]]&lt;br /&gt;
* HDCPM.DOC the User guide&lt;br /&gt;
&lt;br /&gt;
HDCPM is free software. It can be used and distributed with no restrictions.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Prerequisites==&lt;br /&gt;
* Amstrad CPC/Plus computer capable of running CP/M Plus.&lt;br /&gt;
* ROM box or other ROM expansion hardware if using the ROM.&lt;br /&gt;
* Optionaly a FAT aware DOS like M4 ROM, USIfAC ROM, [[UniDOS]], [https://www.cpcwiki.eu/forum/applications/cubeios-fat16fat32-rom-for-the-cpc's-with-xmass/ CubeMDOS] etc if using the binary.&lt;br /&gt;
* One of the following mass storage interfaces:&lt;br /&gt;
** [[SYMBiFACE II]]&lt;br /&gt;
** [[X-Mass]]&lt;br /&gt;
** [https://github.com/salafek/cyboard-for-cpc Cyboard]&lt;br /&gt;
** [[uIDE 16]] (base address = &amp;amp;FEF0)&lt;br /&gt;
** [[M4 Board]]&lt;br /&gt;
** [[USIFAC]] II/[[ULIfAC]]&lt;br /&gt;
** [http://www.tmtlogic.com/ Symbiface III]&lt;br /&gt;
** [[Albireo]] (SD card only)&lt;br /&gt;
* Compatible storage device with enough free space to accommodate the desirable CP/M hard disk configuration.&lt;br /&gt;
* Floppy disk drive for initialization of the file system.&lt;br /&gt;
* CP/M Plus system disks for making the system bootable.&lt;br /&gt;
* Optionally a [[SYMBiFACE II]] compatible RTC.&lt;br /&gt;
&lt;br /&gt;
==Restrictions==&lt;br /&gt;
* CP/M 2.2 or lower is not supported.&lt;br /&gt;
* 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.&lt;br /&gt;
* Only the master IDE device is accessible by HDCPM.&lt;br /&gt;
* The maximum number of hard disk partition/images supported is four.&lt;br /&gt;
* Only primary partitions are supported.&lt;br /&gt;
* If you want to use CP/M disk images then they must be stored in a FAT16 or FAT32 formatted disk or partition.&lt;br /&gt;
* If the hard disk is partitioned then the CP/M disk images must be placed in the first partition of the disk.&lt;br /&gt;
* The CP/M disk images must be placed in the root directory of the FAT file system.&lt;br /&gt;
* The CP/M disk images must NOT be fragmented and must have the correct size.&lt;br /&gt;
* 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. &lt;br /&gt;
* Only storage devices with 512 bytes sector size are supported.&lt;br /&gt;
* Only storage devices with LBA addressing are supported.&lt;br /&gt;
* Date stamps of CP/M disk image files are not maintained.&lt;br /&gt;
* 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 letters for your IDE media then the corresponding HD20 partitions will be unavailable under CP/M.&lt;br /&gt;
&lt;br /&gt;
==How it works==&lt;br /&gt;
===Using the ROM===&lt;br /&gt;
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:&lt;br /&gt;
|HDCPM (no TIME function support) or |HDCPMT (TIME function support)&amp;lt;br /&amp;gt;&lt;br /&gt;
Alternatively it can be started by holding down the Tab key (no TIME function support) or Shift+Tab (TIME function support), during power-up.&amp;lt;br /&amp;gt;&lt;br /&gt;
===Using the binary===&lt;br /&gt;
HDCPM can be started by running the HDCPM.BIN file from floppy drive or mass storage.&amp;lt;br /&amp;gt;&lt;br /&gt;
===Functions===&lt;br /&gt;
HDCPM will then execute the following functions:&amp;lt;br /&amp;gt;&lt;br /&gt;
* Search for a compatible mass storage interface.&lt;br /&gt;
* Initialize the mass storage interface if needed.&lt;br /&gt;
* Move the boot loader and the CP/M patcher to RAM.&lt;br /&gt;
* Mount 1 to 4 CP/M image files and/or partitions and perform fragmentation and size test.&lt;br /&gt;
* 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.&lt;br /&gt;
* Read the .EMS file from the reserved track and store it in RAM just as the normal CP/M Plus boot loader does.&lt;br /&gt;
* 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.&lt;br /&gt;
* Patch the floppy disk drive routines in case a FDC's not been found.&lt;br /&gt;
* Patch the SCB in order to change the startup/default drive.&lt;br /&gt;
* 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 memory expansion]] or [[Dobbertin Memory Expansion]] driver is present.&lt;br /&gt;
* Move the ALV of the Dk'tronics RAM disk if [[Z-System]] has been detected.&lt;br /&gt;
* Patch the CP/M console with the desired colour scheme. &lt;br /&gt;
* Patch the system message.&lt;br /&gt;
* Do a normal CP/M cold start.&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==CP/M Plus disk image files==&lt;br /&gt;
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 [https://hexed.it/ hexed.it] or any hex editor capable of creating binary files filled with a specific pattern.&amp;lt;br /&amp;gt;&lt;br /&gt;
In case of hexed.it select 'New file' fill in 'Size of the new file = 8519680' and 'Fill Pattern = 0xE5' and press apply. Save the file as CPMDSK01.IMG&amp;lt;br /&amp;gt;&lt;br /&gt;
If you have a FAT capable DOS installed in your AMSTRAD you can use the provided MAKEIMG.BAS utility to create your image file. Keep in mind that it takes more than 1.5 hour for a 8MB image file to be created that way.&amp;lt;br /&amp;gt;&lt;br /&gt;
CP/M disk image files can be accessed by a modern computer with [http://www.moria.de/~michael/cpmtools/ cpmtools]. Use the command |HDDEF to see the record you must insert in the diskdefs file.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The HDCPM record for diskdefs is:&lt;br /&gt;
&lt;br /&gt;
       diskdef hdcpm&lt;br /&gt;
          seclen 512&lt;br /&gt;
          tracks 65&lt;br /&gt;
          sectrk 256&lt;br /&gt;
          blocksize 8192&lt;br /&gt;
          maxdir 1024&lt;br /&gt;
          skew 0&lt;br /&gt;
          boottrk 1&lt;br /&gt;
          os 3&lt;br /&gt;
       end&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
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. [https://www.cpcwiki.eu/index.php/Albireo Albireo] incorporates a file management IC that performs FAT file system operations and handles fragmented files properly. In such case fragmented image files is not a problem. HDCPM will never fragment a CP/M image file.&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Hdcpm-boot-m4.png|thumb|HDCPM binary booting on M4 Board]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==CP/M Plus disk/partitions==&lt;br /&gt;
You can also create one or more partitions in order to format them to [http://www.seasip.info/Cpm/format31.html CP/M-80] 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.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM examines the hard disk's MBR upon start and finds the partition information. Then it finds the LBA of the first sector of each partition and passes it to the CP/M hard disk driver. The CP/M hard disk driver doesn't know anything about partitions. It accesses the partition as if it was a real hard disk.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:hdcpm-ui-boot.png|thumb|HDCPM ROM booting on uIDE-16]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
===Using the ROM===&lt;br /&gt;
* Install the HDCPM ROM in a free ROM slot of your ROM box.&lt;br /&gt;
* Plug in your [[SYMBiFACE II]] compatible IDE interface, [[uIDE 16]], [[M4 Board]], [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] or [[Albireo]] and attach the proper mass storage device.&lt;br /&gt;
* 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 shown inside the parentheses:&amp;lt;br /&amp;gt;&lt;br /&gt;
** (S2): [[SYMBiFACE II]] compatible interface&lt;br /&gt;
** (uI): [[uIDE 16]] interface&lt;br /&gt;
** (M4): [[M4 Board]]&lt;br /&gt;
** (US): [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II]&lt;br /&gt;
** (S3): [http://www.tmtlogic.com/ Symbiface III]&lt;br /&gt;
** (AL): [[Albireo]]&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:hdcpm-s2.png|thumb|HDCPM ROM - SYMBiFACE II]]&lt;br /&gt;
|[[File:hdcpm-ui.png|thumb|HDCPM ROM - uIDE-16]]&lt;br /&gt;
|[[File:hdcpm-m4.png|thumb|HDCPM ROM - M4 Board]]&lt;br /&gt;
|}&lt;br /&gt;
{|&lt;br /&gt;
|[[File:hdcpm-us.png|thumb|HDCPM ROM - USIfAC II]]&lt;br /&gt;
|[[File:hdcpm-s3.png|thumb|HDCPM ROM - Symbiface III]]&lt;br /&gt;
|[[File:hdcpm-al.png|thumb|HDCPM ROM - Albireo]]&lt;br /&gt;
|}&lt;br /&gt;
In case a RTC is detected you will also see the RTC initialization message and the current date and time: ''RTC found: 2021/01/01 12:01:01''&lt;br /&gt;
* Use your original CP/M Plus system disk set to Boot CP/M Plus.&lt;br /&gt;
* 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.&lt;br /&gt;
* Reset your AMSTRAD and boot CP/M from the hard disk with the command |HDCPM. The Boot loader will check your image file(s) against fragmentation and correct size and boot the system to the CP/M command prompt. If the first image file is fragmented or has the wrong length the system will not boot. All other image files will be ignored if found to be fragmented or have the wrong length.&lt;br /&gt;
* In case you don't use CP/M image files just boot the system with |HDCPM or |HDCPMT&lt;br /&gt;
* Copy the files from your CP/M system floppy disks to the first hard disk.&lt;br /&gt;
* Copy any other needed application etc. to your CP/M hard disk(s).&lt;br /&gt;
* You are ready to go.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Using the binary===&lt;br /&gt;
* Plug in your [[SYMBiFACE II]] compatible IDE interface, [[uIDE 16]], [[M4 Board]], [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] or [[Albireo]] and attach the proper mass storage device.&lt;br /&gt;
* Use your original CP/M Plus system disk set to Boot CP/M Plus.&lt;br /&gt;
* 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.&lt;br /&gt;
* 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.&lt;br /&gt;
* You are ready to go.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==ROM commands==&lt;br /&gt;
[[File:hdcpm-us-boot.png|thumb|HDCPM ROM booting on USIfAC II]]&lt;br /&gt;
* |HDCPM mounts the hard disks and boots CP/M Plus. If [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] is used enable the USB disk with the |USB command first.&lt;br /&gt;
* |HDCPMT works like |HDCPM but also utilizes the RTC.&lt;br /&gt;
* |HDDPB shows the Disk Parameter Block.&lt;br /&gt;
* |HDDEF shows the diskdefs entry for CP/M tools and the file system size.&lt;br /&gt;
* |DATE displays the current date.&lt;br /&gt;
* |TIME displays the current time. If [[M4 Board]] is used |DATE and |TIME will be redirected to M4 |TIME.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==The HDCPM binary file==&lt;br /&gt;
* If [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] is used, use your PC to copy HDCPM.BIN to your USB flash disk. Then insert it to your [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] power up your Amstrad and enable the USB disk with the |USB command.&lt;br /&gt;
* Execute the file from the floppy disk or from your mass storage device with ''RUN&amp;quot;HDCPM&amp;quot;''. 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.&lt;br /&gt;
*  [[M4 Board]] and [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ 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 [https://www.cpcwiki.eu/forum/applications/cubeios-fat16fat32-rom-for-the-cpc's-with-xmass/ CubeMDOS] or [[UniDOS]], installed.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==The MAKEIMG.BAS and MAKEIMG.EXE utilities==&lt;br /&gt;
===MAKEIMG.BAS===&lt;br /&gt;
Although this utility should not be your first option, you can use it to make a new empty CP/M disk image file.&amp;lt;br /&amp;gt;&lt;br /&gt;
In case you decide to use it make sure you have a FAT aware DOS installed in your system. MAKEIMG makes use of the firmware calls CAS_OUT_OPEN, CAS_OUT_CLOSE and CAS_OUT_CHAR so your DOS must support them.&amp;lt;br /&amp;gt;&lt;br /&gt;
Copy the files MAKEIMG.BAS and MAKEIMG.BIN to the root directory of your FAT formatted hard disk and make it your current drive. Run the utility with ''RUN&amp;quot;MAKEIMG&amp;quot;'' and don't hold your breath!&amp;lt;br /&amp;gt;&lt;br /&gt;
Making an image file this way takes more than 1.5 hour for an 8MB file so literally... don't hold your breath.&amp;lt;br /&amp;gt;&lt;br /&gt;
Here is a small tutorial on how to setup and use a CP/M image file: https://youtu.be/GMWsRzNhQTM&amp;lt;br /&amp;gt;&lt;br /&gt;
===MAKEIMG.EXE===&lt;br /&gt;
This utility is a [[SymbOS]] application.&amp;lt;br /&amp;gt;&lt;br /&gt;
Use this utility to create your CP/M hard disk images from within [[SymbOS]]. 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.&amp;lt;br /&amp;gt;&lt;br /&gt;
MAKEIMG.EXE has been developed with [http://www.symbos.de/quigs.htm Quigs] for [[SymbOS]].&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Hdcpm-makeimg-sym1.png|thumb|MAKEIMG.EXE in action]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==The HDMGR.COM utility==&lt;br /&gt;
This is the Hard Disk Manager utility.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can use this utility to get information about your hard disk geometry, disk image files, partitions and boot sector. You have to use this utility to format a hard disk, disk image file or partition to CP/M format or manipulate the boot sector of the hard disk and/or transfer an .EMS system file to the reserved track of the hard disk.&amp;lt;br /&amp;gt;&lt;br /&gt;
The boot sector contains information about the CP/M disk drive letters, start-up drive and console colour scheme. All those properties can be changed with HDMGR.COM.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR will perform a fragmentation test of the discovered CP/M hard disk image files uppon execution (not for Albireo).&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
The HDMGR.COM utility is self explanatory. Just run it from the CP/M command prompt.&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Hdcpm-hdmgr-m.png|thumb|HDMGR main menu]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-1.png|thumb|HDMGR Hardware information]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-2.png|thumb|HDMGR Partition information]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-3.png|thumb|HDMGR CP/M disk image information]]&lt;br /&gt;
|}&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Hdcpm-hdmgr-4.png|thumb|HDMGR Boot sector information]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-5.png|thumb|HDMGR Log disk]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-7.png|thumb|HDMGR Manage boot sector]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-8.png|thumb|HDMGR Transfer CP/M to disk]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==The RTC.COM utility==&lt;br /&gt;
You can make use of the RTC.COM utility in order to keep CP/M date and time updated.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can synchronize the date and time of CP/M Plus with the RTC by running ''RTC -G'' manually or via your PROFILE.SUB.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can also set your RTC to the current CP/M date and time by running ''RTC -S'' (not for M4 board)&amp;lt;br /&amp;gt;&lt;br /&gt;
Currently RTC.COM works with the RTC found in Symbiface II, Symbiface III and M4 board (read only).&amp;lt;br /&amp;gt;&lt;br /&gt;
DATE.COM, DIR.COM and SHOW.COM commands, patched for Year 2000 compatibility can be downloaded from the [http://www.cpm.z80.de/binary.html CP/M source archive - Digital Research Binary files section] .&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Error messages==&lt;br /&gt;
===ROM checksum error===&lt;br /&gt;
* ''*** HDCPM ROM checksum error ***&lt;br /&gt;
	The ROM has failed the checksum test.&lt;br /&gt;
	The contents are probably corrupted. The ROM will not be initialized.&lt;br /&gt;
&lt;br /&gt;
===Hard disk errors===&lt;br /&gt;
* ''*** No mass storage found ***''&lt;br /&gt;
	No compatible mass storage interface can be found.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: DISK I/O''&lt;br /&gt;
	I/O error occurred during the last read/write operation.&lt;br /&gt;
	Your hard disk might be defect or the USB disk is not enabled.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: INVALID BOOT SECTOR''&lt;br /&gt;
	No FAT or CP/M boot sector was found in a not partitioned hard disk.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: INVALID FILE SYSTEM''&lt;br /&gt;
	The first partition in a partitioned hard disk is not a FAT or CP/M-80&lt;br /&gt;
	one.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: INVALID SECTOR SIZE''&lt;br /&gt;
	The hard disk used has a sector size not equal to 512 bytes.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: CPMDSK01.IMG NOT FOUND''&lt;br /&gt;
	The CP/M image file named CPMDSK01.IMG can't be found in the FAT&lt;br /&gt;
	formatted hard disk or partition. &lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: CP/M SYSTEM FILE NOT FOUND''&lt;br /&gt;
	The .EMS CP/M system file can't be found in the system track of your&lt;br /&gt;
	CP/M partition or image file.&lt;br /&gt;
	&lt;br /&gt;
*  ''ERROR: CPMDSK01.IMG IS FRAGMENTED''&lt;br /&gt;
	The first CP/M image file is fragmented, the system won't mount it.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: CPMDSK01.IMG HAS WRONG LENGTH''&lt;br /&gt;
	The first CP/M image file has wrong length, the system won't mount it.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: CPMDSK01.IMG IS NOT FORMATTED''&lt;br /&gt;
	The first CP/M image file is not formatted to CP/M-80 format, the&lt;br /&gt;
	system won't mount it. Use the HDMGR.COM utility to format it.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: INCOMPATIBLE EMS FILE''&lt;br /&gt;
	The .EMS system file that was loaded from the system track is not&lt;br /&gt;
	compatible with HDCPM.&lt;br /&gt;
&lt;br /&gt;
===RTC errors===&lt;br /&gt;
* ''*** Battery depleted ***''&lt;br /&gt;
	The RTC battery is depleted. The RTC driver will continue to operate&lt;br /&gt;
	normally but the readings are not reliable. Replace the RTC battery.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Release info &amp;amp; download==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Version !! Changes !! Download&lt;br /&gt;
|-&lt;br /&gt;
| v1.00 December 2021 || Initial release || [[Media:hdcpm100.dsk|hdcpm100.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.01 January 2022 || HDCPM.ROM, HDMGR.COM: code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: (bug fix) fragmented file detection was not working properly unless the file was CPMDSK01.IMG&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: (bug fix) unformatted image file detection was not working properly. New error message added.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) CP/M drive table wasn't patched properly.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) initialization of floppy drive(s) was corrupted due to misplaced code.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: added .EMS file compatibility check. New error message added.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: added support for Dobbertin RAM disk driver.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: added compatibility with Dobbertin HD20 Harddisc&amp;lt;br /&amp;gt;&lt;br /&gt;
MAKEIMG.EXE: added utility for creating an image file from within SYMBOS.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&lt;br /&gt;
|| [[Media:hdcpm101.dsk|hdcpm101.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.02 March 2022 || HDCPM.ROM, HDMGR.COM: added support for M4 board.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: added support for uIDE-16 interface.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) the ROM was initialized even if no compatible interface was found.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: error message change.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: option &amp;quot;F&amp;quot; has been removed. HDCPM will always do a disk fragmentation test during boot.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: power up message changed in order to provide information about the type of the detected interface.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: two bytes of RAM will be reserved by the ROM for storing the interface type and M4 ROM number.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&lt;br /&gt;
|| [[Media:hdcpm102.dsk|hdcpm102.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.03 April 2022 || HDCPM.ROM, HDMGR.COM: added support for USIfAC II.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) uIDE-16 detection was broken.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&lt;br /&gt;
|| [[Media:hdcpm103.dsk|hdcpm103.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.04 June 2022|| HDCPM.ROM: code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.BIN: added executable binary file version of HDCPM.&lt;br /&gt;
|| [[Media:hdcpm104.dsk|hdcpm104.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.05 July 2022 || HDCPM.ROM, HDCPM.BIN, HDMGR.COM: added support for Symbiface III.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDCPM.BIN:  code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR.COM: Hardware info added for USIfAC II&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR.COM: (bug fix) the 'Select boot file' menu was garbled if there were 8 or more .EMS files present.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&lt;br /&gt;
|| [[Media:hdcpm105.dsk|hdcpm105.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.06 January 2023 || HDCPM.ROM, HDCPM.BIN, HDMGR.COM: added support for Albireo.&amp;lt;br /&amp;gt;&lt;br /&gt;
RTC.COM: added support for M4 Board (r/o) and Symbiface 3.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDCPM.BIN: (bug fix) CPC was freezing after mounting the CP/M disk(s) with incompatible .EMS file.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR.COM: (bug fix) the Stack was overflowed in some rare cases.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&amp;lt;br /&amp;gt;&lt;br /&gt;
|| [[Media:hdcpm106.dsk|hdcpm106.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.10 ??? 2023 || HDCPM.ROM, HDCPM.BIN: added support for CPC464 with #C3 mode compatible RAM expansion card.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDCPM.BIN: can now boot CP/M Plus on a CPC that has no or faulty Floppy Disc Controller present.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: ROM checksum test and new error message added.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDCPM.BIN, HDMGR.COM:  code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDCPM.BIN: (bug fix) incorrect patching would corrupt the Dobbertin RAM drive on CP/M Plus v1.1&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: removed blank line from ROM initialization message.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) |HDDPB was displaying wrong values&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR.COM: (bug fix) a corruption of the MBR of USB/SD card occured in some rare cases.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&amp;lt;br /&amp;gt;&lt;br /&gt;
|| [[Media:hdcpm110.dsk|hdcpm110.dsk]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Other downloads==&lt;br /&gt;
*[[Media:CPMDSK01&amp;amp;02.zip|CP/M disk images]] - CPMDSK01.IMG is bootable and contains all the files of the 3 CP/M Plus system disks and year 2000 compliant binaries downloaded from the [http://www.cpm.z80.de/binary.html Digital Research Binary Files]. CPMDSK02.IMG is empty and can also be used as a template.&amp;lt;br /&amp;gt;&lt;br /&gt;
*[[Media:Z3Plus.part1.rar|ZPM3+ZCCP disk image part 1]] , [[Media:Z3Plus.part2.rar|ZPM3+ZCCP disk image part 2]] - The Amstrad BDOS and CCP have been replaced with their counterparts [https://github.com/wwarthen/CPU280/tree/master/ZPM3/zpm3.txt ZPM3] and [https://github.com/wwarthen/CPU280/tree/master/ZCCP/zccp.txt ZCCP] written by Simeon Cran. It is [https://www.cpcwiki.eu/index.php/Z-System Z-system, Z3Plus] compatible and contains the Z3Plus system files, all the files of the 3 CP/M Plus system disks, year 2000 compliant binaries and also contains some useful tools, help files and manuals.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Videos==&lt;br /&gt;
* [https://youtu.be/GMWsRzNhQTM How to create and prepare a CP/M image file in a FAT formatted hard disk]&lt;br /&gt;
* [https://youtu.be/nxow6Y5O4Dc Hard disk utilization and dual boot]&lt;br /&gt;
* [https://youtu.be/em7dHOdaylg How to create a CP/M image file under SYMBOS]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
[[category:Expansion ROM]] [[category:Applications]] [[category:CP/M]]&lt;/div&gt;</summary>
		<author><name>D kef</name></author>	</entry>

	<entry>
		<id>https://oldwiki.cpcwiki.eu/index.php?title=File:Hdcpm-al.png&amp;diff=112276</id>
		<title>File:Hdcpm-al.png</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.cpcwiki.eu/index.php?title=File:Hdcpm-al.png&amp;diff=112276"/>
				<updated>2023-08-22T06:22:57Z</updated>
		
		<summary type="html">&lt;p&gt;D kef: D kef uploaded a new version of File:Hdcpm-al.png&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>D kef</name></author>	</entry>

	<entry>
		<id>https://oldwiki.cpcwiki.eu/index.php?title=File:Hdcpm-al.png&amp;diff=112275</id>
		<title>File:Hdcpm-al.png</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.cpcwiki.eu/index.php?title=File:Hdcpm-al.png&amp;diff=112275"/>
				<updated>2023-08-22T06:19:02Z</updated>
		
		<summary type="html">&lt;p&gt;D kef: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>D kef</name></author>	</entry>

	<entry>
		<id>https://oldwiki.cpcwiki.eu/index.php?title=HDCPM&amp;diff=112274</id>
		<title>HDCPM</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.cpcwiki.eu/index.php?title=HDCPM&amp;diff=112274"/>
				<updated>2023-08-22T06:15:20Z</updated>
		
		<summary type="html">&lt;p&gt;D kef: /* Using the ROM */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;HDCPM is a Hard Disk boot loader for [[CP/M]] Plus, developed by d_kef&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can read more about the development of the application here:&amp;lt;br /&amp;gt;&lt;br /&gt;
https://www.cpcwiki.eu/forum/applications/hdcpm-boot-and-run-cpm-plus-from-hard-disk/&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:hdcpm.gif|HDCPM booting CP/M Plus]]&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It comes in the form of:&lt;br /&gt;
* a standard background ROM that can be installed in any available ROM position.&lt;br /&gt;
* a standard binary file that can be loaded from floppy or hard drive.&lt;br /&gt;
&lt;br /&gt;
 	&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following configurations are possible with one hard disk:&lt;br /&gt;
&lt;br /&gt;
* One not partitioned, CP/M formatted hard disk. The whole hard disk is used by CP/M.&lt;br /&gt;
* One to four CP/M formatted partitions. Every partition is accessed as a separate hard disk by CP/M.&lt;br /&gt;
* 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.&lt;br /&gt;
* 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.&lt;br /&gt;
* For interfaces that use SD card or USB flash drive as a mass storage device ([[M4 Board]], [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II], [http://www.tmtlogic.com/ Symbiface III] or [[Albireo]]) the only supported configuration is one to four CP/M disk image files in the root directory of the FAT file system.&lt;br /&gt;
	&lt;br /&gt;
Currently only the master IDE device can be accessed by HDCPM. The slave device is available to be used by your favourite DOS.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
HDCPM can also utilize the RTC found in the [[SYMBiFACE II]] in order to implement CP/M Plus BIOS function 26: TIME.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
HDCPM is compatible and can be used together with the [[Dobbertin Harddisc]].&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
HDCPM has been developed with [[WinApe]] Z80 Assembler and was tested with [[WinApe]], [[CPCemu]], an Amstrad Plus 464 upgraded to 6128 an Amstrad CPC 6128 and an Amstrad CPC 464 with [https://www.cpcwiki.eu/index.php/Universal_512K_and_1MByte_RAM_Expansions Universal 512K RAM Expansion].&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
HDCPM distribution disk contains the following files:&lt;br /&gt;
* HDCPM.ROM the ROM itself&lt;br /&gt;
* HDCPM.BIN the executable binary file&lt;br /&gt;
* HDMGR.COM Hard Disk Manager utility&lt;br /&gt;
* RTC.COM RTC synchronization utility&lt;br /&gt;
* MAKEIMG.BAS CP/M image file creation utility&lt;br /&gt;
* MAKEIMG.BIN CP/M image file creation binary&lt;br /&gt;
* MAKEIMG.EXE CP/M image file creation utility for [[SymbOS]]&lt;br /&gt;
* HDCPM.DOC the User guide&lt;br /&gt;
&lt;br /&gt;
HDCPM is free software. It can be used and distributed with no restrictions.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Prerequisites==&lt;br /&gt;
* Amstrad CPC/Plus computer capable of running CP/M Plus.&lt;br /&gt;
* ROM box or other ROM expansion hardware if using the ROM.&lt;br /&gt;
* Optionaly a FAT aware DOS like M4 ROM, USIfAC ROM, [[UniDOS]], [https://www.cpcwiki.eu/forum/applications/cubeios-fat16fat32-rom-for-the-cpc's-with-xmass/ CubeMDOS] etc if using the binary.&lt;br /&gt;
* One of the following mass storage interfaces:&lt;br /&gt;
** [[SYMBiFACE II]]&lt;br /&gt;
** [[X-Mass]]&lt;br /&gt;
** [https://github.com/salafek/cyboard-for-cpc Cyboard]&lt;br /&gt;
** [[uIDE 16]] (base address = &amp;amp;FEF0)&lt;br /&gt;
** [[M4 Board]]&lt;br /&gt;
** [[USIFAC]] II/[[ULIfAC]]&lt;br /&gt;
** [http://www.tmtlogic.com/ Symbiface III]&lt;br /&gt;
** [[Albireo]] (SD card only)&lt;br /&gt;
* Compatible storage device with enough free space to accommodate the desirable CP/M hard disk configuration.&lt;br /&gt;
* Floppy disk drive for initialization of the file system.&lt;br /&gt;
* CP/M Plus system disks for making the system bootable.&lt;br /&gt;
* Optionally a [[SYMBiFACE II]] compatible RTC.&lt;br /&gt;
&lt;br /&gt;
==Restrictions==&lt;br /&gt;
* CP/M 2.2 or lower is not supported.&lt;br /&gt;
* 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.&lt;br /&gt;
* Only the master IDE device is accessible by HDCPM.&lt;br /&gt;
* The maximum number of hard disk partition/images supported is four.&lt;br /&gt;
* Only primary partitions are supported.&lt;br /&gt;
* If you want to use CP/M disk images then they must be stored in a FAT16 or FAT32 formatted disk or partition.&lt;br /&gt;
* If the hard disk is partitioned then the CP/M disk images must be placed in the first partition of the disk.&lt;br /&gt;
* The CP/M disk images must be placed in the root directory of the FAT file system.&lt;br /&gt;
* The CP/M disk images must NOT be fragmented and must have the correct size.&lt;br /&gt;
* 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. &lt;br /&gt;
* Only storage devices with 512 bytes sector size are supported.&lt;br /&gt;
* Only storage devices with LBA addressing are supported.&lt;br /&gt;
* Date stamps of CP/M disk image files are not maintained.&lt;br /&gt;
* 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 letters for your IDE media then the corresponding HD20 partitions will be unavailable under CP/M.&lt;br /&gt;
&lt;br /&gt;
==How it works==&lt;br /&gt;
===Using the ROM===&lt;br /&gt;
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:&lt;br /&gt;
|HDCPM (no TIME function support) or |HDCPMT (TIME function support)&amp;lt;br /&amp;gt;&lt;br /&gt;
Alternatively it can be started by holding down the Tab key (no TIME function support) or Shift+Tab (TIME function support), during power-up.&amp;lt;br /&amp;gt;&lt;br /&gt;
===Using the binary===&lt;br /&gt;
HDCPM can be started by running the HDCPM.BIN file from floppy drive or mass storage.&amp;lt;br /&amp;gt;&lt;br /&gt;
===Functions===&lt;br /&gt;
HDCPM will then execute the following functions:&amp;lt;br /&amp;gt;&lt;br /&gt;
* Search for a compatible mass storage interface.&lt;br /&gt;
* Initialize the mass storage interface if needed.&lt;br /&gt;
* Move the boot loader and the CP/M patcher to RAM.&lt;br /&gt;
* Mount 1 to 4 CP/M image files and/or partitions and perform fragmentation and size test.&lt;br /&gt;
* 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.&lt;br /&gt;
* Read the .EMS file from the reserved track and store it in RAM just as the normal CP/M Plus boot loader does.&lt;br /&gt;
* 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.&lt;br /&gt;
* Patch the floppy disk drive routines in case a FDC's not been found.&lt;br /&gt;
* Patch the SCB in order to change the startup/default drive.&lt;br /&gt;
* 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 memory expansion]] or [[Dobbertin Memory Expansion]] driver is present.&lt;br /&gt;
* Move the ALV of the Dk'tronics RAM disk if [[Z-System]] has been detected.&lt;br /&gt;
* Patch the CP/M console with the desired colour scheme. &lt;br /&gt;
* Patch the system message.&lt;br /&gt;
* Do a normal CP/M cold start.&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==CP/M Plus disk image files==&lt;br /&gt;
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 [https://hexed.it/ hexed.it] or any hex editor capable of creating binary files filled with a specific pattern.&amp;lt;br /&amp;gt;&lt;br /&gt;
In case of hexed.it select 'New file' fill in 'Size of the new file = 8519680' and 'Fill Pattern = 0xE5' and press apply. Save the file as CPMDSK01.IMG&amp;lt;br /&amp;gt;&lt;br /&gt;
If you have a FAT capable DOS installed in your AMSTRAD you can use the provided MAKEIMG.BAS utility to create your image file. Keep in mind that it takes more than 1.5 hour for a 8MB image file to be created that way.&amp;lt;br /&amp;gt;&lt;br /&gt;
CP/M disk image files can be accessed by a modern computer with [http://www.moria.de/~michael/cpmtools/ cpmtools]. Use the command |HDDEF to see the record you must insert in the diskdefs file.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The HDCPM record for diskdefs is:&lt;br /&gt;
&lt;br /&gt;
       diskdef hdcpm&lt;br /&gt;
          seclen 512&lt;br /&gt;
          tracks 65&lt;br /&gt;
          sectrk 256&lt;br /&gt;
          blocksize 8192&lt;br /&gt;
          maxdir 1024&lt;br /&gt;
          skew 0&lt;br /&gt;
          boottrk 1&lt;br /&gt;
          os 3&lt;br /&gt;
       end&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
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. [https://www.cpcwiki.eu/index.php/Albireo Albireo] incorporates a file management IC that performs FAT file system operations and handles fragmented files properly. In such case fragmented image files is not a problem. HDCPM will never fragment a CP/M image file.&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Hdcpm-boot-m4.png|thumb|HDCPM binary booting on M4 Board]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==CP/M Plus disk/partitions==&lt;br /&gt;
You can also create one or more partitions in order to format them to [http://www.seasip.info/Cpm/format31.html CP/M-80] 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.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM examines the hard disk's MBR upon start and finds the partition information. Then it finds the LBA of the first sector of each partition and passes it to the CP/M hard disk driver. The CP/M hard disk driver doesn't know anything about partitions. It accesses the partition as if it was a real hard disk.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:hdcpm-ui-boot.png|thumb|HDCPM ROM booting on uIDE-16]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
===Using the ROM===&lt;br /&gt;
* Install the HDCPM ROM in a free ROM slot of your ROM box.&lt;br /&gt;
* Plug in your [[SYMBiFACE II]] compatible IDE interface, [[uIDE 16]], [[M4 Board]], [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] or [[Albireo]] and attach the proper mass storage device.&lt;br /&gt;
* 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 shown inside the parentheses:&amp;lt;br /&amp;gt;&lt;br /&gt;
** (S2): [[SYMBiFACE II]] compatible interface&lt;br /&gt;
** (uI): [[uIDE 16]] interface&lt;br /&gt;
** (M4): [[M4 Board]]&lt;br /&gt;
** (US): [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II]&lt;br /&gt;
** (S3): [http://www.tmtlogic.com/ Symbiface III]&lt;br /&gt;
** (AL): [[Albireo]]&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:hdcpm-s2.png|thumb|HDCPM ROM - SYMBiFACE II]]&lt;br /&gt;
|[[File:hdcpm-ui.png|thumb|HDCPM ROM - uIDE-16]]&lt;br /&gt;
|[[File:hdcpm-m4.png|thumb|HDCPM ROM - M4 Board]]&lt;br /&gt;
|}&lt;br /&gt;
{|&lt;br /&gt;
|[[File:hdcpm-us.png|thumb|HDCPM ROM - USIfAC II]]&lt;br /&gt;
|[[File:hdcpm-s3.png|thumb|HDCPM ROM - Symbiface III]]&lt;br /&gt;
|[[File:hdcpm-al.png|thumb|HDCPM ROM - Albireo]]&lt;br /&gt;
|}&lt;br /&gt;
In case a RTC is detected you will also see the RTC initialization message and the current date and time: ''RTC found: 2021/01/01 12:01:01''&lt;br /&gt;
* Use your original CP/M Plus system disk set to Boot CP/M Plus.&lt;br /&gt;
* 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.&lt;br /&gt;
* Reset your AMSTRAD and boot CP/M from the hard disk with the command |HDCPM. The Boot loader will check your image file(s) against fragmentation and correct size and boot the system to the CP/M command prompt. If the first image file is fragmented or has the wrong length the system will not boot. All other image files will be ignored if found to be fragmented or have the wrong length.&lt;br /&gt;
* In case you don't use CP/M image files just boot the system with |HDCPM or |HDCPMT&lt;br /&gt;
* Copy the files from your CP/M system floppy disks to the first hard disk.&lt;br /&gt;
* Copy any other needed application etc. to your CP/M hard disk(s).&lt;br /&gt;
* You are ready to go.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Using the binary===&lt;br /&gt;
* Plug in your [[SYMBiFACE II]] compatible IDE interface, [[uIDE 16]], [[M4 Board]], [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] or [[Albireo]] and attach the proper mass storage device.&lt;br /&gt;
* Use your original CP/M Plus system disk set to Boot CP/M Plus.&lt;br /&gt;
* 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.&lt;br /&gt;
* 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.&lt;br /&gt;
* You are ready to go.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==ROM commands==&lt;br /&gt;
[[File:hdcpm-us-boot.png|thumb|HDCPM ROM booting on USIfAC II]]&lt;br /&gt;
* |HDCPM mounts the hard disks and boots CP/M Plus. If [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] is used enable the USB disk with the |USB command first.&lt;br /&gt;
* |HDCPMT works like |HDCPM but also utilizes the RTC.&lt;br /&gt;
* |HDDPB shows the Disk Parameter Block.&lt;br /&gt;
* |HDDEF shows the diskdefs entry for CP/M tools and the file system size.&lt;br /&gt;
* |DATE displays the current date.&lt;br /&gt;
* |TIME displays the current time. If [[M4 Board]] is used |DATE and |TIME will be redirected to M4 |TIME.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==The HDCPM binary file==&lt;br /&gt;
* If [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] is used, use your PC to copy HDCPM.BIN to your USB flash disk. Then insert it to your [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] power up your Amstrad and enable the USB disk with the |USB command.&lt;br /&gt;
* Execute the file from the floppy disk or from your mass storage device with ''RUN&amp;quot;HDCPM&amp;quot;''. 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.&lt;br /&gt;
*  [[M4 Board]] and [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ 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 [https://www.cpcwiki.eu/forum/applications/cubeios-fat16fat32-rom-for-the-cpc's-with-xmass/ CubeMDOS] or [[UniDOS]], installed.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==The MAKEIMG.BAS and MAKEIMG.EXE utilities==&lt;br /&gt;
===MAKEIMG.BAS===&lt;br /&gt;
Although this utility should not be your first option, you can use it to make a new empty CP/M disk image file.&amp;lt;br /&amp;gt;&lt;br /&gt;
In case you decide to use it make sure you have a FAT aware DOS installed in your system. MAKEIMG makes use of the firmware calls CAS_OUT_OPEN, CAS_OUT_CLOSE and CAS_OUT_CHAR so your DOS must support them.&amp;lt;br /&amp;gt;&lt;br /&gt;
Copy the files MAKEIMG.BAS and MAKEIMG.BIN to the root directory of your FAT formatted hard disk and make it your current drive. Run the utility with ''RUN&amp;quot;MAKEIMG&amp;quot;'' and don't hold your breath!&amp;lt;br /&amp;gt;&lt;br /&gt;
Making an image file this way takes more than 1.5 hour for an 8MB file so literally... don't hold your breath.&amp;lt;br /&amp;gt;&lt;br /&gt;
Here is a small tutorial on how to setup and use a CP/M image file: https://youtu.be/GMWsRzNhQTM&amp;lt;br /&amp;gt;&lt;br /&gt;
===MAKEIMG.EXE===&lt;br /&gt;
This utility is a [[SymbOS]] application.&amp;lt;br /&amp;gt;&lt;br /&gt;
Use this utility to create your CP/M hard disk images from within [[SymbOS]]. 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.&amp;lt;br /&amp;gt;&lt;br /&gt;
MAKEIMG.EXE has been developed with [http://www.symbos.de/quigs.htm Quigs] for [[SymbOS]].&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Hdcpm-makeimg-sym1.png|thumb|MAKEIMG.EXE in action]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==The HDMGR.COM utility==&lt;br /&gt;
This is the Hard Disk Manager utility.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can use this utility to get information about your hard disk geometry, disk image files, partitions and boot sector. You have to use this utility to format a hard disk, disk image file or partition to CP/M format or manipulate the boot sector of the hard disk and/or transfer an .EMS system file to the reserved track of the hard disk.&amp;lt;br /&amp;gt;&lt;br /&gt;
The boot sector contains information about the CP/M disk drive letters, start-up drive and console colour scheme. All those properties can be changed with HDMGR.COM.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR will perform a fragmentation test of the discovered CP/M hard disk image files uppon execution (not for Albireo).&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
The HDMGR.COM utility is self explanatory. Just run it from the CP/M command prompt.&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Hdcpm-hdmgr-m.png|thumb|HDMGR main menu]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-1.png|thumb|HDMGR Hardware information]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-2.png|thumb|HDMGR Partition information]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-3.png|thumb|HDMGR CP/M disk image information]]&lt;br /&gt;
|}&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Hdcpm-hdmgr-4.png|thumb|HDMGR Boot sector information]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-5.png|thumb|HDMGR Log disk]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-7.png|thumb|HDMGR Manage boot sector]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-8.png|thumb|HDMGR Transfer CP/M to disk]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==The RTC.COM utility==&lt;br /&gt;
You can make use of the RTC.COM utility in order to keep CP/M date and time updated.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can synchronize the date and time of CP/M Plus with the RTC by running ''RTC -G'' manually or via your PROFILE.SUB.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can also set your RTC to the current CP/M date and time by running ''RTC -S'' (not for M4 board)&amp;lt;br /&amp;gt;&lt;br /&gt;
Currently RTC.COM works with the RTC found in Symbiface II, Symbiface III and M4 board (read only).&amp;lt;br /&amp;gt;&lt;br /&gt;
DATE.COM, DIR.COM and SHOW.COM commands, patched for Year 2000 compatibility can be downloaded from the [http://www.cpm.z80.de/binary.html CP/M source archive - Digital Research Binary files section] .&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Error messages==&lt;br /&gt;
===ROM checksum error===&lt;br /&gt;
* ''*** HDCPM ROM checksum error ***&lt;br /&gt;
	The ROM has failed the checksum test.&lt;br /&gt;
	The contents are probably corrupted. The ROM will not be initialized.&lt;br /&gt;
&lt;br /&gt;
===Hard disk errors===&lt;br /&gt;
* ''*** No mass storage found ***''&lt;br /&gt;
	No compatible mass storage interface can be found.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: DISK I/O''&lt;br /&gt;
	I/O error occurred during the last read/write operation.&lt;br /&gt;
	Your hard disk might be defect or the USB disk is not enabled.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: INVALID BOOT SECTOR''&lt;br /&gt;
	No FAT or CP/M boot sector was found in a not partitioned hard disk.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: INVALID FILE SYSTEM''&lt;br /&gt;
	The first partition in a partitioned hard disk is not a FAT or CP/M-80&lt;br /&gt;
	one.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: INVALID SECTOR SIZE''&lt;br /&gt;
	The hard disk used has a sector size not equal to 512 bytes.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: CPMDSK01.IMG NOT FOUND''&lt;br /&gt;
	The CP/M image file named CPMDSK01.IMG can't be found in the FAT&lt;br /&gt;
	formatted hard disk or partition. &lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: CP/M SYSTEM FILE NOT FOUND''&lt;br /&gt;
	The .EMS CP/M system file can't be found in the system track of your&lt;br /&gt;
	CP/M partition or image file.&lt;br /&gt;
	&lt;br /&gt;
*  ''ERROR: CPMDSK01.IMG IS FRAGMENTED''&lt;br /&gt;
	The first CP/M image file is fragmented, the system won't mount it.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: CPMDSK01.IMG HAS WRONG LENGTH''&lt;br /&gt;
	The first CP/M image file has wrong length, the system won't mount it.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: CPMDSK01.IMG IS NOT FORMATTED''&lt;br /&gt;
	The first CP/M image file is not formatted to CP/M-80 format, the&lt;br /&gt;
	system won't mount it. Use the HDMGR.COM utility to format it.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: INCOMPATIBLE EMS FILE''&lt;br /&gt;
	The .EMS system file that was loaded from the system track is not&lt;br /&gt;
	compatible with HDCPM.&lt;br /&gt;
&lt;br /&gt;
===RTC errors===&lt;br /&gt;
* ''*** Battery depleted ***''&lt;br /&gt;
	The RTC battery is depleted. The RTC driver will continue to operate&lt;br /&gt;
	normally but the readings are not reliable. Replace the RTC battery.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Release info &amp;amp; download==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Version !! Changes !! Download&lt;br /&gt;
|-&lt;br /&gt;
| v1.00 December 2021 || Initial release || [[Media:hdcpm100.dsk|hdcpm100.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.01 January 2022 || HDCPM.ROM, HDMGR.COM: code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: (bug fix) fragmented file detection was not working properly unless the file was CPMDSK01.IMG&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: (bug fix) unformatted image file detection was not working properly. New error message added.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) CP/M drive table wasn't patched properly.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) initialization of floppy drive(s) was corrupted due to misplaced code.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: added .EMS file compatibility check. New error message added.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: added support for Dobbertin RAM disk driver.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: added compatibility with Dobbertin HD20 Harddisc&amp;lt;br /&amp;gt;&lt;br /&gt;
MAKEIMG.EXE: added utility for creating an image file from within SYMBOS.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&lt;br /&gt;
|| [[Media:hdcpm101.dsk|hdcpm101.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.02 March 2022 || HDCPM.ROM, HDMGR.COM: added support for M4 board.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: added support for uIDE-16 interface.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) the ROM was initialized even if no compatible interface was found.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: error message change.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: option &amp;quot;F&amp;quot; has been removed. HDCPM will always do a disk fragmentation test during boot.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: power up message changed in order to provide information about the type of the detected interface.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: two bytes of RAM will be reserved by the ROM for storing the interface type and M4 ROM number.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&lt;br /&gt;
|| [[Media:hdcpm102.dsk|hdcpm102.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.03 April 2022 || HDCPM.ROM, HDMGR.COM: added support for USIfAC II.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) uIDE-16 detection was broken.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&lt;br /&gt;
|| [[Media:hdcpm103.dsk|hdcpm103.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.04 June 2022|| HDCPM.ROM: code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.BIN: added executable binary file version of HDCPM.&lt;br /&gt;
|| [[Media:hdcpm104.dsk|hdcpm104.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.05 July 2022 || HDCPM.ROM, HDCPM.BIN, HDMGR.COM: added support for Symbiface III.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDCPM.BIN:  code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR.COM: Hardware info added for USIfAC II&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR.COM: (bug fix) the 'Select boot file' menu was garbled if there were 8 or more .EMS files present.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&lt;br /&gt;
|| [[Media:hdcpm105.dsk|hdcpm105.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.06 January 2023 || HDCPM.ROM, HDCPM.BIN, HDMGR.COM: added support for Albireo.&amp;lt;br /&amp;gt;&lt;br /&gt;
RTC.COM: added support for M4 Board (r/o) and Symbiface 3.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDCPM.BIN: (bug fix) CPC was freezing after mounting the CP/M disk(s) with incompatible .EMS file.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR.COM: (bug fix) the Stack was overflowed in some rare cases.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&amp;lt;br /&amp;gt;&lt;br /&gt;
|| [[Media:hdcpm106.dsk|hdcpm106.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.10 ??? 2023 || HDCPM.ROM, HDCPM.BIN: added support for CPC464 with #C3 mode compatible RAM expansion card.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDCPM.BIN: can now boot CP/M Plus on a CPC that has no or faulty Floppy Disc Controller present.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: ROM checksum test and new error message added.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDCPM.BIN, HDMGR.COM:  code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDCPM.BIN: (bug fix) incorrect patching would corrupt the Dobbertin RAM drive on CP/M Plus v1.1&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) |HDDPB was displaying wrong values&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR.COM: (bug fix) a corruption of the MBR of USB/SD card occured in some rare cases.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&amp;lt;br /&amp;gt;&lt;br /&gt;
|| [[Media:hdcpm110.dsk|hdcpm110.dsk]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Other downloads==&lt;br /&gt;
*[[Media:CPMDSK01&amp;amp;02.zip|CP/M disk images]] - CPMDSK01.IMG is bootable and contains all the files of the 3 CP/M Plus system disks and year 2000 compliant binaries downloaded from the [http://www.cpm.z80.de/binary.html Digital Research Binary Files]. CPMDSK02.IMG is empty and can also be used as a template.&amp;lt;br /&amp;gt;&lt;br /&gt;
*[[Media:Z3Plus.part1.rar|ZPM3+ZCCP disk image part 1]] , [[Media:Z3Plus.part2.rar|ZPM3+ZCCP disk image part 2]] - The Amstrad BDOS and CCP have been replaced with their counterparts [https://github.com/wwarthen/CPU280/tree/master/ZPM3/zpm3.txt ZPM3] and [https://github.com/wwarthen/CPU280/tree/master/ZCCP/zccp.txt ZCCP] written by Simeon Cran. It is [https://www.cpcwiki.eu/index.php/Z-System Z-system, Z3Plus] compatible and contains the Z3Plus system files, all the files of the 3 CP/M Plus system disks, year 2000 compliant binaries and also contains some useful tools, help files and manuals.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Videos==&lt;br /&gt;
* [https://youtu.be/GMWsRzNhQTM How to create and prepare a CP/M image file in a FAT formatted hard disk]&lt;br /&gt;
* [https://youtu.be/nxow6Y5O4Dc Hard disk utilization and dual boot]&lt;br /&gt;
* [https://youtu.be/em7dHOdaylg How to create a CP/M image file under SYMBOS]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
[[category:Expansion ROM]] [[category:Applications]] [[category:CP/M]]&lt;/div&gt;</summary>
		<author><name>D kef</name></author>	</entry>

	<entry>
		<id>https://oldwiki.cpcwiki.eu/index.php?title=HDCPM&amp;diff=112273</id>
		<title>HDCPM</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.cpcwiki.eu/index.php?title=HDCPM&amp;diff=112273"/>
				<updated>2023-08-22T06:13:28Z</updated>
		
		<summary type="html">&lt;p&gt;D kef: /* Using the ROM */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;HDCPM is a Hard Disk boot loader for [[CP/M]] Plus, developed by d_kef&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can read more about the development of the application here:&amp;lt;br /&amp;gt;&lt;br /&gt;
https://www.cpcwiki.eu/forum/applications/hdcpm-boot-and-run-cpm-plus-from-hard-disk/&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:hdcpm.gif|HDCPM booting CP/M Plus]]&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It comes in the form of:&lt;br /&gt;
* a standard background ROM that can be installed in any available ROM position.&lt;br /&gt;
* a standard binary file that can be loaded from floppy or hard drive.&lt;br /&gt;
&lt;br /&gt;
 	&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following configurations are possible with one hard disk:&lt;br /&gt;
&lt;br /&gt;
* One not partitioned, CP/M formatted hard disk. The whole hard disk is used by CP/M.&lt;br /&gt;
* One to four CP/M formatted partitions. Every partition is accessed as a separate hard disk by CP/M.&lt;br /&gt;
* 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.&lt;br /&gt;
* 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.&lt;br /&gt;
* For interfaces that use SD card or USB flash drive as a mass storage device ([[M4 Board]], [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II], [http://www.tmtlogic.com/ Symbiface III] or [[Albireo]]) the only supported configuration is one to four CP/M disk image files in the root directory of the FAT file system.&lt;br /&gt;
	&lt;br /&gt;
Currently only the master IDE device can be accessed by HDCPM. The slave device is available to be used by your favourite DOS.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
HDCPM can also utilize the RTC found in the [[SYMBiFACE II]] in order to implement CP/M Plus BIOS function 26: TIME.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
HDCPM is compatible and can be used together with the [[Dobbertin Harddisc]].&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
HDCPM has been developed with [[WinApe]] Z80 Assembler and was tested with [[WinApe]], [[CPCemu]], an Amstrad Plus 464 upgraded to 6128 an Amstrad CPC 6128 and an Amstrad CPC 464 with [https://www.cpcwiki.eu/index.php/Universal_512K_and_1MByte_RAM_Expansions Universal 512K RAM Expansion].&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
HDCPM distribution disk contains the following files:&lt;br /&gt;
* HDCPM.ROM the ROM itself&lt;br /&gt;
* HDCPM.BIN the executable binary file&lt;br /&gt;
* HDMGR.COM Hard Disk Manager utility&lt;br /&gt;
* RTC.COM RTC synchronization utility&lt;br /&gt;
* MAKEIMG.BAS CP/M image file creation utility&lt;br /&gt;
* MAKEIMG.BIN CP/M image file creation binary&lt;br /&gt;
* MAKEIMG.EXE CP/M image file creation utility for [[SymbOS]]&lt;br /&gt;
* HDCPM.DOC the User guide&lt;br /&gt;
&lt;br /&gt;
HDCPM is free software. It can be used and distributed with no restrictions.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Prerequisites==&lt;br /&gt;
* Amstrad CPC/Plus computer capable of running CP/M Plus.&lt;br /&gt;
* ROM box or other ROM expansion hardware if using the ROM.&lt;br /&gt;
* Optionaly a FAT aware DOS like M4 ROM, USIfAC ROM, [[UniDOS]], [https://www.cpcwiki.eu/forum/applications/cubeios-fat16fat32-rom-for-the-cpc's-with-xmass/ CubeMDOS] etc if using the binary.&lt;br /&gt;
* One of the following mass storage interfaces:&lt;br /&gt;
** [[SYMBiFACE II]]&lt;br /&gt;
** [[X-Mass]]&lt;br /&gt;
** [https://github.com/salafek/cyboard-for-cpc Cyboard]&lt;br /&gt;
** [[uIDE 16]] (base address = &amp;amp;FEF0)&lt;br /&gt;
** [[M4 Board]]&lt;br /&gt;
** [[USIFAC]] II/[[ULIfAC]]&lt;br /&gt;
** [http://www.tmtlogic.com/ Symbiface III]&lt;br /&gt;
** [[Albireo]] (SD card only)&lt;br /&gt;
* Compatible storage device with enough free space to accommodate the desirable CP/M hard disk configuration.&lt;br /&gt;
* Floppy disk drive for initialization of the file system.&lt;br /&gt;
* CP/M Plus system disks for making the system bootable.&lt;br /&gt;
* Optionally a [[SYMBiFACE II]] compatible RTC.&lt;br /&gt;
&lt;br /&gt;
==Restrictions==&lt;br /&gt;
* CP/M 2.2 or lower is not supported.&lt;br /&gt;
* 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.&lt;br /&gt;
* Only the master IDE device is accessible by HDCPM.&lt;br /&gt;
* The maximum number of hard disk partition/images supported is four.&lt;br /&gt;
* Only primary partitions are supported.&lt;br /&gt;
* If you want to use CP/M disk images then they must be stored in a FAT16 or FAT32 formatted disk or partition.&lt;br /&gt;
* If the hard disk is partitioned then the CP/M disk images must be placed in the first partition of the disk.&lt;br /&gt;
* The CP/M disk images must be placed in the root directory of the FAT file system.&lt;br /&gt;
* The CP/M disk images must NOT be fragmented and must have the correct size.&lt;br /&gt;
* 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. &lt;br /&gt;
* Only storage devices with 512 bytes sector size are supported.&lt;br /&gt;
* Only storage devices with LBA addressing are supported.&lt;br /&gt;
* Date stamps of CP/M disk image files are not maintained.&lt;br /&gt;
* 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 letters for your IDE media then the corresponding HD20 partitions will be unavailable under CP/M.&lt;br /&gt;
&lt;br /&gt;
==How it works==&lt;br /&gt;
===Using the ROM===&lt;br /&gt;
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:&lt;br /&gt;
|HDCPM (no TIME function support) or |HDCPMT (TIME function support)&amp;lt;br /&amp;gt;&lt;br /&gt;
Alternatively it can be started by holding down the Tab key (no TIME function support) or Shift+Tab (TIME function support), during power-up.&amp;lt;br /&amp;gt;&lt;br /&gt;
===Using the binary===&lt;br /&gt;
HDCPM can be started by running the HDCPM.BIN file from floppy drive or mass storage.&amp;lt;br /&amp;gt;&lt;br /&gt;
===Functions===&lt;br /&gt;
HDCPM will then execute the following functions:&amp;lt;br /&amp;gt;&lt;br /&gt;
* Search for a compatible mass storage interface.&lt;br /&gt;
* Initialize the mass storage interface if needed.&lt;br /&gt;
* Move the boot loader and the CP/M patcher to RAM.&lt;br /&gt;
* Mount 1 to 4 CP/M image files and/or partitions and perform fragmentation and size test.&lt;br /&gt;
* 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.&lt;br /&gt;
* Read the .EMS file from the reserved track and store it in RAM just as the normal CP/M Plus boot loader does.&lt;br /&gt;
* 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.&lt;br /&gt;
* Patch the floppy disk drive routines in case a FDC's not been found.&lt;br /&gt;
* Patch the SCB in order to change the startup/default drive.&lt;br /&gt;
* 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 memory expansion]] or [[Dobbertin Memory Expansion]] driver is present.&lt;br /&gt;
* Move the ALV of the Dk'tronics RAM disk if [[Z-System]] has been detected.&lt;br /&gt;
* Patch the CP/M console with the desired colour scheme. &lt;br /&gt;
* Patch the system message.&lt;br /&gt;
* Do a normal CP/M cold start.&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==CP/M Plus disk image files==&lt;br /&gt;
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 [https://hexed.it/ hexed.it] or any hex editor capable of creating binary files filled with a specific pattern.&amp;lt;br /&amp;gt;&lt;br /&gt;
In case of hexed.it select 'New file' fill in 'Size of the new file = 8519680' and 'Fill Pattern = 0xE5' and press apply. Save the file as CPMDSK01.IMG&amp;lt;br /&amp;gt;&lt;br /&gt;
If you have a FAT capable DOS installed in your AMSTRAD you can use the provided MAKEIMG.BAS utility to create your image file. Keep in mind that it takes more than 1.5 hour for a 8MB image file to be created that way.&amp;lt;br /&amp;gt;&lt;br /&gt;
CP/M disk image files can be accessed by a modern computer with [http://www.moria.de/~michael/cpmtools/ cpmtools]. Use the command |HDDEF to see the record you must insert in the diskdefs file.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The HDCPM record for diskdefs is:&lt;br /&gt;
&lt;br /&gt;
       diskdef hdcpm&lt;br /&gt;
          seclen 512&lt;br /&gt;
          tracks 65&lt;br /&gt;
          sectrk 256&lt;br /&gt;
          blocksize 8192&lt;br /&gt;
          maxdir 1024&lt;br /&gt;
          skew 0&lt;br /&gt;
          boottrk 1&lt;br /&gt;
          os 3&lt;br /&gt;
       end&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
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. [https://www.cpcwiki.eu/index.php/Albireo Albireo] incorporates a file management IC that performs FAT file system operations and handles fragmented files properly. In such case fragmented image files is not a problem. HDCPM will never fragment a CP/M image file.&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Hdcpm-boot-m4.png|thumb|HDCPM binary booting on M4 Board]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==CP/M Plus disk/partitions==&lt;br /&gt;
You can also create one or more partitions in order to format them to [http://www.seasip.info/Cpm/format31.html CP/M-80] 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.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM examines the hard disk's MBR upon start and finds the partition information. Then it finds the LBA of the first sector of each partition and passes it to the CP/M hard disk driver. The CP/M hard disk driver doesn't know anything about partitions. It accesses the partition as if it was a real hard disk.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:hdcpm-ui-boot.png|thumb|HDCPM ROM booting on uIDE-16]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
===Using the ROM===&lt;br /&gt;
* Install the HDCPM ROM in a free ROM slot of your ROM box.&lt;br /&gt;
* Plug in your [[SYMBiFACE II]] compatible IDE interface, [[uIDE 16]], [[M4 Board]], [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] or [[Albireo]] and attach the proper mass storage device.&lt;br /&gt;
* 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 shown inside the parentheses:&amp;lt;br /&amp;gt;&lt;br /&gt;
** (S2): [[SYMBiFACE II]] compatible interface&lt;br /&gt;
** (uI): [[uIDE 16]] interface&lt;br /&gt;
** (M4): [[M4 Board]]&lt;br /&gt;
** (US): [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II]&lt;br /&gt;
** (S3): [http://www.tmtlogic.com/ Symbiface III]&lt;br /&gt;
** (AL): [[Albireo]]&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:hdcpm-s2.png|thumb|HDCPM ROM - SYMBiFACE II]]&lt;br /&gt;
|[[File:hdcpm-ui.png|thumb|HDCPM ROM - uIDE-16]]&lt;br /&gt;
|[[File:hdcpm-m4.png|thumb|HDCPM ROM - M4 Board]]&amp;lt;br /&amp;gt;&lt;br /&gt;
|[[File:hdcpm-us.png|thumb|HDCPM ROM - USIfAC II]]&lt;br /&gt;
|[[File:hdcpm-s3.png|thumb|HDCPM ROM - Symbiface III]]&lt;br /&gt;
|[[File:hdcpm-al.png|thumb|HDCPM ROM - Albireo]]&lt;br /&gt;
|}&lt;br /&gt;
In case a RTC is detected you will also see the RTC initialization message and the current date and time: ''RTC found: 2021/01/01 12:01:01''&lt;br /&gt;
* Use your original CP/M Plus system disk set to Boot CP/M Plus.&lt;br /&gt;
* 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.&lt;br /&gt;
* Reset your AMSTRAD and boot CP/M from the hard disk with the command |HDCPM. The Boot loader will check your image file(s) against fragmentation and correct size and boot the system to the CP/M command prompt. If the first image file is fragmented or has the wrong length the system will not boot. All other image files will be ignored if found to be fragmented or have the wrong length.&lt;br /&gt;
* In case you don't use CP/M image files just boot the system with |HDCPM or |HDCPMT&lt;br /&gt;
* Copy the files from your CP/M system floppy disks to the first hard disk.&lt;br /&gt;
* Copy any other needed application etc. to your CP/M hard disk(s).&lt;br /&gt;
* You are ready to go.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Using the binary===&lt;br /&gt;
* Plug in your [[SYMBiFACE II]] compatible IDE interface, [[uIDE 16]], [[M4 Board]], [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] or [[Albireo]] and attach the proper mass storage device.&lt;br /&gt;
* Use your original CP/M Plus system disk set to Boot CP/M Plus.&lt;br /&gt;
* 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.&lt;br /&gt;
* 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.&lt;br /&gt;
* You are ready to go.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==ROM commands==&lt;br /&gt;
[[File:hdcpm-us-boot.png|thumb|HDCPM ROM booting on USIfAC II]]&lt;br /&gt;
* |HDCPM mounts the hard disks and boots CP/M Plus. If [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] is used enable the USB disk with the |USB command first.&lt;br /&gt;
* |HDCPMT works like |HDCPM but also utilizes the RTC.&lt;br /&gt;
* |HDDPB shows the Disk Parameter Block.&lt;br /&gt;
* |HDDEF shows the diskdefs entry for CP/M tools and the file system size.&lt;br /&gt;
* |DATE displays the current date.&lt;br /&gt;
* |TIME displays the current time. If [[M4 Board]] is used |DATE and |TIME will be redirected to M4 |TIME.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==The HDCPM binary file==&lt;br /&gt;
* If [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] is used, use your PC to copy HDCPM.BIN to your USB flash disk. Then insert it to your [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] power up your Amstrad and enable the USB disk with the |USB command.&lt;br /&gt;
* Execute the file from the floppy disk or from your mass storage device with ''RUN&amp;quot;HDCPM&amp;quot;''. 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.&lt;br /&gt;
*  [[M4 Board]] and [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ 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 [https://www.cpcwiki.eu/forum/applications/cubeios-fat16fat32-rom-for-the-cpc's-with-xmass/ CubeMDOS] or [[UniDOS]], installed.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==The MAKEIMG.BAS and MAKEIMG.EXE utilities==&lt;br /&gt;
===MAKEIMG.BAS===&lt;br /&gt;
Although this utility should not be your first option, you can use it to make a new empty CP/M disk image file.&amp;lt;br /&amp;gt;&lt;br /&gt;
In case you decide to use it make sure you have a FAT aware DOS installed in your system. MAKEIMG makes use of the firmware calls CAS_OUT_OPEN, CAS_OUT_CLOSE and CAS_OUT_CHAR so your DOS must support them.&amp;lt;br /&amp;gt;&lt;br /&gt;
Copy the files MAKEIMG.BAS and MAKEIMG.BIN to the root directory of your FAT formatted hard disk and make it your current drive. Run the utility with ''RUN&amp;quot;MAKEIMG&amp;quot;'' and don't hold your breath!&amp;lt;br /&amp;gt;&lt;br /&gt;
Making an image file this way takes more than 1.5 hour for an 8MB file so literally... don't hold your breath.&amp;lt;br /&amp;gt;&lt;br /&gt;
Here is a small tutorial on how to setup and use a CP/M image file: https://youtu.be/GMWsRzNhQTM&amp;lt;br /&amp;gt;&lt;br /&gt;
===MAKEIMG.EXE===&lt;br /&gt;
This utility is a [[SymbOS]] application.&amp;lt;br /&amp;gt;&lt;br /&gt;
Use this utility to create your CP/M hard disk images from within [[SymbOS]]. 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.&amp;lt;br /&amp;gt;&lt;br /&gt;
MAKEIMG.EXE has been developed with [http://www.symbos.de/quigs.htm Quigs] for [[SymbOS]].&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Hdcpm-makeimg-sym1.png|thumb|MAKEIMG.EXE in action]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==The HDMGR.COM utility==&lt;br /&gt;
This is the Hard Disk Manager utility.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can use this utility to get information about your hard disk geometry, disk image files, partitions and boot sector. You have to use this utility to format a hard disk, disk image file or partition to CP/M format or manipulate the boot sector of the hard disk and/or transfer an .EMS system file to the reserved track of the hard disk.&amp;lt;br /&amp;gt;&lt;br /&gt;
The boot sector contains information about the CP/M disk drive letters, start-up drive and console colour scheme. All those properties can be changed with HDMGR.COM.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR will perform a fragmentation test of the discovered CP/M hard disk image files uppon execution (not for Albireo).&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
The HDMGR.COM utility is self explanatory. Just run it from the CP/M command prompt.&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Hdcpm-hdmgr-m.png|thumb|HDMGR main menu]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-1.png|thumb|HDMGR Hardware information]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-2.png|thumb|HDMGR Partition information]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-3.png|thumb|HDMGR CP/M disk image information]]&lt;br /&gt;
|}&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Hdcpm-hdmgr-4.png|thumb|HDMGR Boot sector information]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-5.png|thumb|HDMGR Log disk]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-7.png|thumb|HDMGR Manage boot sector]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-8.png|thumb|HDMGR Transfer CP/M to disk]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==The RTC.COM utility==&lt;br /&gt;
You can make use of the RTC.COM utility in order to keep CP/M date and time updated.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can synchronize the date and time of CP/M Plus with the RTC by running ''RTC -G'' manually or via your PROFILE.SUB.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can also set your RTC to the current CP/M date and time by running ''RTC -S'' (not for M4 board)&amp;lt;br /&amp;gt;&lt;br /&gt;
Currently RTC.COM works with the RTC found in Symbiface II, Symbiface III and M4 board (read only).&amp;lt;br /&amp;gt;&lt;br /&gt;
DATE.COM, DIR.COM and SHOW.COM commands, patched for Year 2000 compatibility can be downloaded from the [http://www.cpm.z80.de/binary.html CP/M source archive - Digital Research Binary files section] .&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Error messages==&lt;br /&gt;
===ROM checksum error===&lt;br /&gt;
* ''*** HDCPM ROM checksum error ***&lt;br /&gt;
	The ROM has failed the checksum test.&lt;br /&gt;
	The contents are probably corrupted. The ROM will not be initialized.&lt;br /&gt;
&lt;br /&gt;
===Hard disk errors===&lt;br /&gt;
* ''*** No mass storage found ***''&lt;br /&gt;
	No compatible mass storage interface can be found.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: DISK I/O''&lt;br /&gt;
	I/O error occurred during the last read/write operation.&lt;br /&gt;
	Your hard disk might be defect or the USB disk is not enabled.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: INVALID BOOT SECTOR''&lt;br /&gt;
	No FAT or CP/M boot sector was found in a not partitioned hard disk.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: INVALID FILE SYSTEM''&lt;br /&gt;
	The first partition in a partitioned hard disk is not a FAT or CP/M-80&lt;br /&gt;
	one.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: INVALID SECTOR SIZE''&lt;br /&gt;
	The hard disk used has a sector size not equal to 512 bytes.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: CPMDSK01.IMG NOT FOUND''&lt;br /&gt;
	The CP/M image file named CPMDSK01.IMG can't be found in the FAT&lt;br /&gt;
	formatted hard disk or partition. &lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: CP/M SYSTEM FILE NOT FOUND''&lt;br /&gt;
	The .EMS CP/M system file can't be found in the system track of your&lt;br /&gt;
	CP/M partition or image file.&lt;br /&gt;
	&lt;br /&gt;
*  ''ERROR: CPMDSK01.IMG IS FRAGMENTED''&lt;br /&gt;
	The first CP/M image file is fragmented, the system won't mount it.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: CPMDSK01.IMG HAS WRONG LENGTH''&lt;br /&gt;
	The first CP/M image file has wrong length, the system won't mount it.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: CPMDSK01.IMG IS NOT FORMATTED''&lt;br /&gt;
	The first CP/M image file is not formatted to CP/M-80 format, the&lt;br /&gt;
	system won't mount it. Use the HDMGR.COM utility to format it.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: INCOMPATIBLE EMS FILE''&lt;br /&gt;
	The .EMS system file that was loaded from the system track is not&lt;br /&gt;
	compatible with HDCPM.&lt;br /&gt;
&lt;br /&gt;
===RTC errors===&lt;br /&gt;
* ''*** Battery depleted ***''&lt;br /&gt;
	The RTC battery is depleted. The RTC driver will continue to operate&lt;br /&gt;
	normally but the readings are not reliable. Replace the RTC battery.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Release info &amp;amp; download==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Version !! Changes !! Download&lt;br /&gt;
|-&lt;br /&gt;
| v1.00 December 2021 || Initial release || [[Media:hdcpm100.dsk|hdcpm100.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.01 January 2022 || HDCPM.ROM, HDMGR.COM: code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: (bug fix) fragmented file detection was not working properly unless the file was CPMDSK01.IMG&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: (bug fix) unformatted image file detection was not working properly. New error message added.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) CP/M drive table wasn't patched properly.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) initialization of floppy drive(s) was corrupted due to misplaced code.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: added .EMS file compatibility check. New error message added.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: added support for Dobbertin RAM disk driver.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: added compatibility with Dobbertin HD20 Harddisc&amp;lt;br /&amp;gt;&lt;br /&gt;
MAKEIMG.EXE: added utility for creating an image file from within SYMBOS.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&lt;br /&gt;
|| [[Media:hdcpm101.dsk|hdcpm101.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.02 March 2022 || HDCPM.ROM, HDMGR.COM: added support for M4 board.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: added support for uIDE-16 interface.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) the ROM was initialized even if no compatible interface was found.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: error message change.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: option &amp;quot;F&amp;quot; has been removed. HDCPM will always do a disk fragmentation test during boot.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: power up message changed in order to provide information about the type of the detected interface.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: two bytes of RAM will be reserved by the ROM for storing the interface type and M4 ROM number.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&lt;br /&gt;
|| [[Media:hdcpm102.dsk|hdcpm102.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.03 April 2022 || HDCPM.ROM, HDMGR.COM: added support for USIfAC II.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) uIDE-16 detection was broken.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&lt;br /&gt;
|| [[Media:hdcpm103.dsk|hdcpm103.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.04 June 2022|| HDCPM.ROM: code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.BIN: added executable binary file version of HDCPM.&lt;br /&gt;
|| [[Media:hdcpm104.dsk|hdcpm104.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.05 July 2022 || HDCPM.ROM, HDCPM.BIN, HDMGR.COM: added support for Symbiface III.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDCPM.BIN:  code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR.COM: Hardware info added for USIfAC II&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR.COM: (bug fix) the 'Select boot file' menu was garbled if there were 8 or more .EMS files present.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&lt;br /&gt;
|| [[Media:hdcpm105.dsk|hdcpm105.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.06 January 2023 || HDCPM.ROM, HDCPM.BIN, HDMGR.COM: added support for Albireo.&amp;lt;br /&amp;gt;&lt;br /&gt;
RTC.COM: added support for M4 Board (r/o) and Symbiface 3.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDCPM.BIN: (bug fix) CPC was freezing after mounting the CP/M disk(s) with incompatible .EMS file.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR.COM: (bug fix) the Stack was overflowed in some rare cases.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&amp;lt;br /&amp;gt;&lt;br /&gt;
|| [[Media:hdcpm106.dsk|hdcpm106.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.10 ??? 2023 || HDCPM.ROM, HDCPM.BIN: added support for CPC464 with #C3 mode compatible RAM expansion card.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDCPM.BIN: can now boot CP/M Plus on a CPC that has no or faulty Floppy Disc Controller present.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: ROM checksum test and new error message added.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDCPM.BIN, HDMGR.COM:  code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDCPM.BIN: (bug fix) incorrect patching would corrupt the Dobbertin RAM drive on CP/M Plus v1.1&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) |HDDPB was displaying wrong values&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR.COM: (bug fix) a corruption of the MBR of USB/SD card occured in some rare cases.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&amp;lt;br /&amp;gt;&lt;br /&gt;
|| [[Media:hdcpm110.dsk|hdcpm110.dsk]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Other downloads==&lt;br /&gt;
*[[Media:CPMDSK01&amp;amp;02.zip|CP/M disk images]] - CPMDSK01.IMG is bootable and contains all the files of the 3 CP/M Plus system disks and year 2000 compliant binaries downloaded from the [http://www.cpm.z80.de/binary.html Digital Research Binary Files]. CPMDSK02.IMG is empty and can also be used as a template.&amp;lt;br /&amp;gt;&lt;br /&gt;
*[[Media:Z3Plus.part1.rar|ZPM3+ZCCP disk image part 1]] , [[Media:Z3Plus.part2.rar|ZPM3+ZCCP disk image part 2]] - The Amstrad BDOS and CCP have been replaced with their counterparts [https://github.com/wwarthen/CPU280/tree/master/ZPM3/zpm3.txt ZPM3] and [https://github.com/wwarthen/CPU280/tree/master/ZCCP/zccp.txt ZCCP] written by Simeon Cran. It is [https://www.cpcwiki.eu/index.php/Z-System Z-system, Z3Plus] compatible and contains the Z3Plus system files, all the files of the 3 CP/M Plus system disks, year 2000 compliant binaries and also contains some useful tools, help files and manuals.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Videos==&lt;br /&gt;
* [https://youtu.be/GMWsRzNhQTM How to create and prepare a CP/M image file in a FAT formatted hard disk]&lt;br /&gt;
* [https://youtu.be/nxow6Y5O4Dc Hard disk utilization and dual boot]&lt;br /&gt;
* [https://youtu.be/em7dHOdaylg How to create a CP/M image file under SYMBOS]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
[[category:Expansion ROM]] [[category:Applications]] [[category:CP/M]]&lt;/div&gt;</summary>
		<author><name>D kef</name></author>	</entry>

	<entry>
		<id>https://oldwiki.cpcwiki.eu/index.php?title=HDCPM&amp;diff=112010</id>
		<title>HDCPM</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.cpcwiki.eu/index.php?title=HDCPM&amp;diff=112010"/>
				<updated>2023-08-14T20:34:30Z</updated>
		
		<summary type="html">&lt;p&gt;D kef: /* Prerequisites */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;HDCPM is a Hard Disk boot loader for [[CP/M]] Plus, developed by d_kef&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can read more about the development of the application here:&amp;lt;br /&amp;gt;&lt;br /&gt;
https://www.cpcwiki.eu/forum/applications/hdcpm-boot-and-run-cpm-plus-from-hard-disk/&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:hdcpm.gif|HDCPM booting CP/M Plus]]&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It comes in the form of:&lt;br /&gt;
* a standard background ROM that can be installed in any available ROM position.&lt;br /&gt;
* a standard binary file that can be loaded from floppy or hard drive.&lt;br /&gt;
&lt;br /&gt;
 	&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following configurations are possible with one hard disk:&lt;br /&gt;
&lt;br /&gt;
* One not partitioned, CP/M formatted hard disk. The whole hard disk is used by CP/M.&lt;br /&gt;
* One to four CP/M formatted partitions. Every partition is accessed as a separate hard disk by CP/M.&lt;br /&gt;
* 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.&lt;br /&gt;
* 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.&lt;br /&gt;
* For interfaces that use SD card or USB flash drive as a mass storage device ([[M4 Board]], [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II], [http://www.tmtlogic.com/ Symbiface III] or [[Albireo]]) the only supported configuration is one to four CP/M disk image files in the root directory of the FAT file system.&lt;br /&gt;
	&lt;br /&gt;
Currently only the master IDE device can be accessed by HDCPM. The slave device is available to be used by your favourite DOS.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
HDCPM can also utilize the RTC found in the [[SYMBiFACE II]] in order to implement CP/M Plus BIOS function 26: TIME.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
HDCPM is compatible and can be used together with the [[Dobbertin Harddisc]].&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
HDCPM has been developed with [[WinApe]] Z80 Assembler and was tested with [[WinApe]], [[CPCemu]], an Amstrad Plus 464 upgraded to 6128 an Amstrad CPC 6128 and an Amstrad CPC 464 with [https://www.cpcwiki.eu/index.php/Universal_512K_and_1MByte_RAM_Expansions Universal 512K RAM Expansion].&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
HDCPM distribution disk contains the following files:&lt;br /&gt;
* HDCPM.ROM the ROM itself&lt;br /&gt;
* HDCPM.BIN the executable binary file&lt;br /&gt;
* HDMGR.COM Hard Disk Manager utility&lt;br /&gt;
* RTC.COM RTC synchronization utility&lt;br /&gt;
* MAKEIMG.BAS CP/M image file creation utility&lt;br /&gt;
* MAKEIMG.BIN CP/M image file creation binary&lt;br /&gt;
* MAKEIMG.EXE CP/M image file creation utility for [[SymbOS]]&lt;br /&gt;
* HDCPM.DOC the User guide&lt;br /&gt;
&lt;br /&gt;
HDCPM is free software. It can be used and distributed with no restrictions.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Prerequisites==&lt;br /&gt;
* Amstrad CPC/Plus computer capable of running CP/M Plus.&lt;br /&gt;
* ROM box or other ROM expansion hardware if using the ROM.&lt;br /&gt;
* Optionaly a FAT aware DOS like M4 ROM, USIfAC ROM, [[UniDOS]], [https://www.cpcwiki.eu/forum/applications/cubeios-fat16fat32-rom-for-the-cpc's-with-xmass/ CubeMDOS] etc if using the binary.&lt;br /&gt;
* One of the following mass storage interfaces:&lt;br /&gt;
** [[SYMBiFACE II]]&lt;br /&gt;
** [[X-Mass]]&lt;br /&gt;
** [https://github.com/salafek/cyboard-for-cpc Cyboard]&lt;br /&gt;
** [[uIDE 16]] (base address = &amp;amp;FEF0)&lt;br /&gt;
** [[M4 Board]]&lt;br /&gt;
** [[USIFAC]] II/[[ULIfAC]]&lt;br /&gt;
** [http://www.tmtlogic.com/ Symbiface III]&lt;br /&gt;
** [[Albireo]] (SD card only)&lt;br /&gt;
* Compatible storage device with enough free space to accommodate the desirable CP/M hard disk configuration.&lt;br /&gt;
* Floppy disk drive for initialization of the file system.&lt;br /&gt;
* CP/M Plus system disks for making the system bootable.&lt;br /&gt;
* Optionally a [[SYMBiFACE II]] compatible RTC.&lt;br /&gt;
&lt;br /&gt;
==Restrictions==&lt;br /&gt;
* CP/M 2.2 or lower is not supported.&lt;br /&gt;
* 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.&lt;br /&gt;
* Only the master IDE device is accessible by HDCPM.&lt;br /&gt;
* The maximum number of hard disk partition/images supported is four.&lt;br /&gt;
* Only primary partitions are supported.&lt;br /&gt;
* If you want to use CP/M disk images then they must be stored in a FAT16 or FAT32 formatted disk or partition.&lt;br /&gt;
* If the hard disk is partitioned then the CP/M disk images must be placed in the first partition of the disk.&lt;br /&gt;
* The CP/M disk images must be placed in the root directory of the FAT file system.&lt;br /&gt;
* The CP/M disk images must NOT be fragmented and must have the correct size.&lt;br /&gt;
* 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. &lt;br /&gt;
* Only storage devices with 512 bytes sector size are supported.&lt;br /&gt;
* Only storage devices with LBA addressing are supported.&lt;br /&gt;
* Date stamps of CP/M disk image files are not maintained.&lt;br /&gt;
* 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 letters for your IDE media then the corresponding HD20 partitions will be unavailable under CP/M.&lt;br /&gt;
&lt;br /&gt;
==How it works==&lt;br /&gt;
===Using the ROM===&lt;br /&gt;
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:&lt;br /&gt;
|HDCPM (no TIME function support) or |HDCPMT (TIME function support)&amp;lt;br /&amp;gt;&lt;br /&gt;
Alternatively it can be started by holding down the Tab key (no TIME function support) or Shift+Tab (TIME function support), during power-up.&amp;lt;br /&amp;gt;&lt;br /&gt;
===Using the binary===&lt;br /&gt;
HDCPM can be started by running the HDCPM.BIN file from floppy drive or mass storage.&amp;lt;br /&amp;gt;&lt;br /&gt;
===Functions===&lt;br /&gt;
HDCPM will then execute the following functions:&amp;lt;br /&amp;gt;&lt;br /&gt;
* Search for a compatible mass storage interface.&lt;br /&gt;
* Initialize the mass storage interface if needed.&lt;br /&gt;
* Move the boot loader and the CP/M patcher to RAM.&lt;br /&gt;
* Mount 1 to 4 CP/M image files and/or partitions and perform fragmentation and size test.&lt;br /&gt;
* 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.&lt;br /&gt;
* Read the .EMS file from the reserved track and store it in RAM just as the normal CP/M Plus boot loader does.&lt;br /&gt;
* 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.&lt;br /&gt;
* Patch the floppy disk drive routines in case a FDC's not been found.&lt;br /&gt;
* Patch the SCB in order to change the startup/default drive.&lt;br /&gt;
* 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 memory expansion]] or [[Dobbertin Memory Expansion]] driver is present.&lt;br /&gt;
* Move the ALV of the Dk'tronics RAM disk if [[Z-System]] has been detected.&lt;br /&gt;
* Patch the CP/M console with the desired colour scheme. &lt;br /&gt;
* Patch the system message.&lt;br /&gt;
* Do a normal CP/M cold start.&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==CP/M Plus disk image files==&lt;br /&gt;
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 [https://hexed.it/ hexed.it] or any hex editor capable of creating binary files filled with a specific pattern.&amp;lt;br /&amp;gt;&lt;br /&gt;
In case of hexed.it select 'New file' fill in 'Size of the new file = 8519680' and 'Fill Pattern = 0xE5' and press apply. Save the file as CPMDSK01.IMG&amp;lt;br /&amp;gt;&lt;br /&gt;
If you have a FAT capable DOS installed in your AMSTRAD you can use the provided MAKEIMG.BAS utility to create your image file. Keep in mind that it takes more than 1.5 hour for a 8MB image file to be created that way.&amp;lt;br /&amp;gt;&lt;br /&gt;
CP/M disk image files can be accessed by a modern computer with [http://www.moria.de/~michael/cpmtools/ cpmtools]. Use the command |HDDEF to see the record you must insert in the diskdefs file.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The HDCPM record for diskdefs is:&lt;br /&gt;
&lt;br /&gt;
       diskdef hdcpm&lt;br /&gt;
          seclen 512&lt;br /&gt;
          tracks 65&lt;br /&gt;
          sectrk 256&lt;br /&gt;
          blocksize 8192&lt;br /&gt;
          maxdir 1024&lt;br /&gt;
          skew 0&lt;br /&gt;
          boottrk 1&lt;br /&gt;
          os 3&lt;br /&gt;
       end&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
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. [https://www.cpcwiki.eu/index.php/Albireo Albireo] incorporates a file management IC that performs FAT file system operations and handles fragmented files properly. In such case fragmented image files is not a problem. HDCPM will never fragment a CP/M image file.&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Hdcpm-boot-m4.png|thumb|HDCPM binary booting on M4 Board]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==CP/M Plus disk/partitions==&lt;br /&gt;
You can also create one or more partitions in order to format them to [http://www.seasip.info/Cpm/format31.html CP/M-80] 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.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM examines the hard disk's MBR upon start and finds the partition information. Then it finds the LBA of the first sector of each partition and passes it to the CP/M hard disk driver. The CP/M hard disk driver doesn't know anything about partitions. It accesses the partition as if it was a real hard disk.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:hdcpm-ui-boot.png|thumb|HDCPM ROM booting on uIDE-16]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
===Using the ROM===&lt;br /&gt;
* Install the HDCPM ROM in a free ROM slot of your ROM box.&lt;br /&gt;
* Plug in your [[SYMBiFACE II]] compatible IDE interface, [[uIDE 16]], [[M4 Board]], [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] or [[Albireo]] and attach the proper mass storage device.&lt;br /&gt;
* 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 shown inside the parentheses:&amp;lt;br /&amp;gt;&lt;br /&gt;
** (S2): [[SYMBiFACE II]] compatible interface&lt;br /&gt;
** (uI): [[uIDE 16]] interface&lt;br /&gt;
** (M4): [[M4 Board]]&lt;br /&gt;
** (US): [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II]&lt;br /&gt;
** (S3): [http://www.tmtlogic.com/ Symbiface III]&lt;br /&gt;
** (AL): [[Albireo]]&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:hdcpm-s2.png|thumb|HDCPM ROM - SYMBiFACE II]]&lt;br /&gt;
|[[File:hdcpm-ui.png|thumb|HDCPM ROM - uIDE-16]]&lt;br /&gt;
|[[File:hdcpm-m4.png|thumb|HDCPM ROM - M4 Board]]&lt;br /&gt;
|[[File:hdcpm-us.png|thumb|HDCPM ROM - USIfAC II]]&lt;br /&gt;
|[[File:hdcpm-s3.png|thumb|HDCPM ROM - Symbiface III]]&lt;br /&gt;
|}&lt;br /&gt;
In case a RTC is detected you will also see the RTC initialization message and the current date and time: ''RTC found: 2021/01/01 12:01:01''&lt;br /&gt;
* Use your original CP/M Plus system disk set to Boot CP/M Plus.&lt;br /&gt;
* 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.&lt;br /&gt;
* Reset your AMSTRAD and boot CP/M from the hard disk with the command |HDCPM. The Boot loader will check your image file(s) against fragmentation and correct size and boot the system to the CP/M command prompt. If the first image file is fragmented or has the wrong length the system will not boot. All other image files will be ignored if found to be fragmented or have the wrong length.&lt;br /&gt;
* In case you don't use CP/M image files just boot the system with |HDCPM or |HDCPMT&lt;br /&gt;
* Copy the files from your CP/M system floppy disks to the first hard disk.&lt;br /&gt;
* Copy any other needed application etc. to your CP/M hard disk(s).&lt;br /&gt;
* You are ready to go.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Using the binary===&lt;br /&gt;
* Plug in your [[SYMBiFACE II]] compatible IDE interface, [[uIDE 16]], [[M4 Board]], [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] or [[Albireo]] and attach the proper mass storage device.&lt;br /&gt;
* Use your original CP/M Plus system disk set to Boot CP/M Plus.&lt;br /&gt;
* 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.&lt;br /&gt;
* 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.&lt;br /&gt;
* You are ready to go.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==ROM commands==&lt;br /&gt;
[[File:hdcpm-us-boot.png|thumb|HDCPM ROM booting on USIfAC II]]&lt;br /&gt;
* |HDCPM mounts the hard disks and boots CP/M Plus. If [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] is used enable the USB disk with the |USB command first.&lt;br /&gt;
* |HDCPMT works like |HDCPM but also utilizes the RTC.&lt;br /&gt;
* |HDDPB shows the Disk Parameter Block.&lt;br /&gt;
* |HDDEF shows the diskdefs entry for CP/M tools and the file system size.&lt;br /&gt;
* |DATE displays the current date.&lt;br /&gt;
* |TIME displays the current time. If [[M4 Board]] is used |DATE and |TIME will be redirected to M4 |TIME.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==The HDCPM binary file==&lt;br /&gt;
* If [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] is used, use your PC to copy HDCPM.BIN to your USB flash disk. Then insert it to your [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] power up your Amstrad and enable the USB disk with the |USB command.&lt;br /&gt;
* Execute the file from the floppy disk or from your mass storage device with ''RUN&amp;quot;HDCPM&amp;quot;''. 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.&lt;br /&gt;
*  [[M4 Board]] and [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ 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 [https://www.cpcwiki.eu/forum/applications/cubeios-fat16fat32-rom-for-the-cpc's-with-xmass/ CubeMDOS] or [[UniDOS]], installed.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==The MAKEIMG.BAS and MAKEIMG.EXE utilities==&lt;br /&gt;
===MAKEIMG.BAS===&lt;br /&gt;
Although this utility should not be your first option, you can use it to make a new empty CP/M disk image file.&amp;lt;br /&amp;gt;&lt;br /&gt;
In case you decide to use it make sure you have a FAT aware DOS installed in your system. MAKEIMG makes use of the firmware calls CAS_OUT_OPEN, CAS_OUT_CLOSE and CAS_OUT_CHAR so your DOS must support them.&amp;lt;br /&amp;gt;&lt;br /&gt;
Copy the files MAKEIMG.BAS and MAKEIMG.BIN to the root directory of your FAT formatted hard disk and make it your current drive. Run the utility with ''RUN&amp;quot;MAKEIMG&amp;quot;'' and don't hold your breath!&amp;lt;br /&amp;gt;&lt;br /&gt;
Making an image file this way takes more than 1.5 hour for an 8MB file so literally... don't hold your breath.&amp;lt;br /&amp;gt;&lt;br /&gt;
Here is a small tutorial on how to setup and use a CP/M image file: https://youtu.be/GMWsRzNhQTM&amp;lt;br /&amp;gt;&lt;br /&gt;
===MAKEIMG.EXE===&lt;br /&gt;
This utility is a [[SymbOS]] application.&amp;lt;br /&amp;gt;&lt;br /&gt;
Use this utility to create your CP/M hard disk images from within [[SymbOS]]. 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.&amp;lt;br /&amp;gt;&lt;br /&gt;
MAKEIMG.EXE has been developed with [http://www.symbos.de/quigs.htm Quigs] for [[SymbOS]].&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Hdcpm-makeimg-sym1.png|thumb|MAKEIMG.EXE in action]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==The HDMGR.COM utility==&lt;br /&gt;
This is the Hard Disk Manager utility.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can use this utility to get information about your hard disk geometry, disk image files, partitions and boot sector. You have to use this utility to format a hard disk, disk image file or partition to CP/M format or manipulate the boot sector of the hard disk and/or transfer an .EMS system file to the reserved track of the hard disk.&amp;lt;br /&amp;gt;&lt;br /&gt;
The boot sector contains information about the CP/M disk drive letters, start-up drive and console colour scheme. All those properties can be changed with HDMGR.COM.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR will perform a fragmentation test of the discovered CP/M hard disk image files uppon execution (not for Albireo).&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
The HDMGR.COM utility is self explanatory. Just run it from the CP/M command prompt.&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Hdcpm-hdmgr-m.png|thumb|HDMGR main menu]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-1.png|thumb|HDMGR Hardware information]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-2.png|thumb|HDMGR Partition information]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-3.png|thumb|HDMGR CP/M disk image information]]&lt;br /&gt;
|}&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Hdcpm-hdmgr-4.png|thumb|HDMGR Boot sector information]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-5.png|thumb|HDMGR Log disk]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-7.png|thumb|HDMGR Manage boot sector]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-8.png|thumb|HDMGR Transfer CP/M to disk]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==The RTC.COM utility==&lt;br /&gt;
You can make use of the RTC.COM utility in order to keep CP/M date and time updated.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can synchronize the date and time of CP/M Plus with the RTC by running ''RTC -G'' manually or via your PROFILE.SUB.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can also set your RTC to the current CP/M date and time by running ''RTC -S'' (not for M4 board)&amp;lt;br /&amp;gt;&lt;br /&gt;
Currently RTC.COM works with the RTC found in Symbiface II, Symbiface III and M4 board (read only).&amp;lt;br /&amp;gt;&lt;br /&gt;
DATE.COM, DIR.COM and SHOW.COM commands, patched for Year 2000 compatibility can be downloaded from the [http://www.cpm.z80.de/binary.html CP/M source archive - Digital Research Binary files section] .&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Error messages==&lt;br /&gt;
===ROM checksum error===&lt;br /&gt;
* ''*** HDCPM ROM checksum error ***&lt;br /&gt;
	The ROM has failed the checksum test.&lt;br /&gt;
	The contents are probably corrupted. The ROM will not be initialized.&lt;br /&gt;
&lt;br /&gt;
===Hard disk errors===&lt;br /&gt;
* ''*** No mass storage found ***''&lt;br /&gt;
	No compatible mass storage interface can be found.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: DISK I/O''&lt;br /&gt;
	I/O error occurred during the last read/write operation.&lt;br /&gt;
	Your hard disk might be defect or the USB disk is not enabled.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: INVALID BOOT SECTOR''&lt;br /&gt;
	No FAT or CP/M boot sector was found in a not partitioned hard disk.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: INVALID FILE SYSTEM''&lt;br /&gt;
	The first partition in a partitioned hard disk is not a FAT or CP/M-80&lt;br /&gt;
	one.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: INVALID SECTOR SIZE''&lt;br /&gt;
	The hard disk used has a sector size not equal to 512 bytes.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: CPMDSK01.IMG NOT FOUND''&lt;br /&gt;
	The CP/M image file named CPMDSK01.IMG can't be found in the FAT&lt;br /&gt;
	formatted hard disk or partition. &lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: CP/M SYSTEM FILE NOT FOUND''&lt;br /&gt;
	The .EMS CP/M system file can't be found in the system track of your&lt;br /&gt;
	CP/M partition or image file.&lt;br /&gt;
	&lt;br /&gt;
*  ''ERROR: CPMDSK01.IMG IS FRAGMENTED''&lt;br /&gt;
	The first CP/M image file is fragmented, the system won't mount it.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: CPMDSK01.IMG HAS WRONG LENGTH''&lt;br /&gt;
	The first CP/M image file has wrong length, the system won't mount it.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: CPMDSK01.IMG IS NOT FORMATTED''&lt;br /&gt;
	The first CP/M image file is not formatted to CP/M-80 format, the&lt;br /&gt;
	system won't mount it. Use the HDMGR.COM utility to format it.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: INCOMPATIBLE EMS FILE''&lt;br /&gt;
	The .EMS system file that was loaded from the system track is not&lt;br /&gt;
	compatible with HDCPM.&lt;br /&gt;
&lt;br /&gt;
===RTC errors===&lt;br /&gt;
* ''*** Battery depleted ***''&lt;br /&gt;
	The RTC battery is depleted. The RTC driver will continue to operate&lt;br /&gt;
	normally but the readings are not reliable. Replace the RTC battery.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Release info &amp;amp; download==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Version !! Changes !! Download&lt;br /&gt;
|-&lt;br /&gt;
| v1.00 December 2021 || Initial release || [[Media:hdcpm100.dsk|hdcpm100.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.01 January 2022 || HDCPM.ROM, HDMGR.COM: code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: (bug fix) fragmented file detection was not working properly unless the file was CPMDSK01.IMG&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: (bug fix) unformatted image file detection was not working properly. New error message added.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) CP/M drive table wasn't patched properly.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) initialization of floppy drive(s) was corrupted due to misplaced code.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: added .EMS file compatibility check. New error message added.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: added support for Dobbertin RAM disk driver.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: added compatibility with Dobbertin HD20 Harddisc&amp;lt;br /&amp;gt;&lt;br /&gt;
MAKEIMG.EXE: added utility for creating an image file from within SYMBOS.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&lt;br /&gt;
|| [[Media:hdcpm101.dsk|hdcpm101.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.02 March 2022 || HDCPM.ROM, HDMGR.COM: added support for M4 board.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: added support for uIDE-16 interface.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) the ROM was initialized even if no compatible interface was found.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: error message change.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: option &amp;quot;F&amp;quot; has been removed. HDCPM will always do a disk fragmentation test during boot.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: power up message changed in order to provide information about the type of the detected interface.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: two bytes of RAM will be reserved by the ROM for storing the interface type and M4 ROM number.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&lt;br /&gt;
|| [[Media:hdcpm102.dsk|hdcpm102.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.03 April 2022 || HDCPM.ROM, HDMGR.COM: added support for USIfAC II.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) uIDE-16 detection was broken.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&lt;br /&gt;
|| [[Media:hdcpm103.dsk|hdcpm103.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.04 June 2022|| HDCPM.ROM: code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.BIN: added executable binary file version of HDCPM.&lt;br /&gt;
|| [[Media:hdcpm104.dsk|hdcpm104.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.05 July 2022 || HDCPM.ROM, HDCPM.BIN, HDMGR.COM: added support for Symbiface III.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDCPM.BIN:  code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR.COM: Hardware info added for USIfAC II&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR.COM: (bug fix) the 'Select boot file' menu was garbled if there were 8 or more .EMS files present.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&lt;br /&gt;
|| [[Media:hdcpm105.dsk|hdcpm105.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.06 January 2023 || HDCPM.ROM, HDCPM.BIN, HDMGR.COM: added support for Albireo.&amp;lt;br /&amp;gt;&lt;br /&gt;
RTC.COM: added support for M4 Board (r/o) and Symbiface 3.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDCPM.BIN: (bug fix) CPC was freezing after mounting the CP/M disk(s) with incompatible .EMS file.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR.COM: (bug fix) the Stack was overflowed in some rare cases.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&amp;lt;br /&amp;gt;&lt;br /&gt;
|| [[Media:hdcpm106.dsk|hdcpm106.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.10 ??? 2023 || HDCPM.ROM, HDCPM.BIN: added support for CPC464 with #C3 mode compatible RAM expansion card.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDCPM.BIN: can now boot CP/M Plus on a CPC that has no or faulty Floppy Disc Controller present.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: ROM checksum test and new error message added.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDCPM.BIN, HDMGR.COM:  code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDCPM.BIN: (bug fix) incorrect patching would corrupt the Dobbertin RAM drive on CP/M Plus v1.1&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) |HDDPB was displaying wrong values&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR.COM: (bug fix) a corruption of the MBR of USB/SD card occured in some rare cases.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&amp;lt;br /&amp;gt;&lt;br /&gt;
|| [[Media:hdcpm110.dsk|hdcpm110.dsk]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Other downloads==&lt;br /&gt;
*[[Media:CPMDSK01&amp;amp;02.zip|CP/M disk images]] - CPMDSK01.IMG is bootable and contains all the files of the 3 CP/M Plus system disks and year 2000 compliant binaries downloaded from the [http://www.cpm.z80.de/binary.html Digital Research Binary Files]. CPMDSK02.IMG is empty and can also be used as a template.&amp;lt;br /&amp;gt;&lt;br /&gt;
*[[Media:Z3Plus.part1.rar|ZPM3+ZCCP disk image part 1]] , [[Media:Z3Plus.part2.rar|ZPM3+ZCCP disk image part 2]] - The Amstrad BDOS and CCP have been replaced with their counterparts [https://github.com/wwarthen/CPU280/tree/master/ZPM3/zpm3.txt ZPM3] and [https://github.com/wwarthen/CPU280/tree/master/ZCCP/zccp.txt ZCCP] written by Simeon Cran. It is [https://www.cpcwiki.eu/index.php/Z-System Z-system, Z3Plus] compatible and contains the Z3Plus system files, all the files of the 3 CP/M Plus system disks, year 2000 compliant binaries and also contains some useful tools, help files and manuals.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Videos==&lt;br /&gt;
* [https://youtu.be/GMWsRzNhQTM How to create and prepare a CP/M image file in a FAT formatted hard disk]&lt;br /&gt;
* [https://youtu.be/nxow6Y5O4Dc Hard disk utilization and dual boot]&lt;br /&gt;
* [https://youtu.be/em7dHOdaylg How to create a CP/M image file under SYMBOS]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
[[category:Expansion ROM]] [[category:Applications]] [[category:CP/M]]&lt;/div&gt;</summary>
		<author><name>D kef</name></author>	</entry>

	<entry>
		<id>https://oldwiki.cpcwiki.eu/index.php?title=HDCPM&amp;diff=112009</id>
		<title>HDCPM</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.cpcwiki.eu/index.php?title=HDCPM&amp;diff=112009"/>
				<updated>2023-08-14T20:28:43Z</updated>
		
		<summary type="html">&lt;p&gt;D kef: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;HDCPM is a Hard Disk boot loader for [[CP/M]] Plus, developed by d_kef&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can read more about the development of the application here:&amp;lt;br /&amp;gt;&lt;br /&gt;
https://www.cpcwiki.eu/forum/applications/hdcpm-boot-and-run-cpm-plus-from-hard-disk/&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:hdcpm.gif|HDCPM booting CP/M Plus]]&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It comes in the form of:&lt;br /&gt;
* a standard background ROM that can be installed in any available ROM position.&lt;br /&gt;
* a standard binary file that can be loaded from floppy or hard drive.&lt;br /&gt;
&lt;br /&gt;
 	&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following configurations are possible with one hard disk:&lt;br /&gt;
&lt;br /&gt;
* One not partitioned, CP/M formatted hard disk. The whole hard disk is used by CP/M.&lt;br /&gt;
* One to four CP/M formatted partitions. Every partition is accessed as a separate hard disk by CP/M.&lt;br /&gt;
* 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.&lt;br /&gt;
* 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.&lt;br /&gt;
* For interfaces that use SD card or USB flash drive as a mass storage device ([[M4 Board]], [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II], [http://www.tmtlogic.com/ Symbiface III] or [[Albireo]]) the only supported configuration is one to four CP/M disk image files in the root directory of the FAT file system.&lt;br /&gt;
	&lt;br /&gt;
Currently only the master IDE device can be accessed by HDCPM. The slave device is available to be used by your favourite DOS.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
HDCPM can also utilize the RTC found in the [[SYMBiFACE II]] in order to implement CP/M Plus BIOS function 26: TIME.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
HDCPM is compatible and can be used together with the [[Dobbertin Harddisc]].&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
HDCPM has been developed with [[WinApe]] Z80 Assembler and was tested with [[WinApe]], [[CPCemu]], an Amstrad Plus 464 upgraded to 6128 an Amstrad CPC 6128 and an Amstrad CPC 464 with [https://www.cpcwiki.eu/index.php/Universal_512K_and_1MByte_RAM_Expansions Universal 512K RAM Expansion].&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
HDCPM distribution disk contains the following files:&lt;br /&gt;
* HDCPM.ROM the ROM itself&lt;br /&gt;
* HDCPM.BIN the executable binary file&lt;br /&gt;
* HDMGR.COM Hard Disk Manager utility&lt;br /&gt;
* RTC.COM RTC synchronization utility&lt;br /&gt;
* MAKEIMG.BAS CP/M image file creation utility&lt;br /&gt;
* MAKEIMG.BIN CP/M image file creation binary&lt;br /&gt;
* MAKEIMG.EXE CP/M image file creation utility for [[SymbOS]]&lt;br /&gt;
* HDCPM.DOC the User guide&lt;br /&gt;
&lt;br /&gt;
HDCPM is free software. It can be used and distributed with no restrictions.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Prerequisites==&lt;br /&gt;
* Amstrad CPC/Plus computer capable of running CP/M Plus.&lt;br /&gt;
* ROM box or other ROM expansion hardware if using the ROM.&lt;br /&gt;
* Optionaly a FAT aware DOS like M4 ROM, USIfAC ROM, [[UniDOS]], [https://www.cpcwiki.eu/forum/applications/cubeios-fat16fat32-rom-for-the-cpc's-with-xmass/ CubeMDOS] etc if using the binary.&lt;br /&gt;
* One of the following mass storage interfaces:&lt;br /&gt;
** [[SYMBiFACE II]]&lt;br /&gt;
** [[X-Mass]]&lt;br /&gt;
** [https://github.com/salafek/cyboard-for-cpc Cyboard]&lt;br /&gt;
** [[uIDE 16]] (base address = &amp;amp;FEF0)&lt;br /&gt;
** [[M4 Board]]&lt;br /&gt;
** [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II]&lt;br /&gt;
** [http://www.tmtlogic.com/ Symbiface III]&lt;br /&gt;
** [[Albireo]] (SD card only)&lt;br /&gt;
* Compatible storage device with enough free space to accommodate the desirable CP/M hard disk configuration.&lt;br /&gt;
* Floppy disk drive for initialization of the file system.&lt;br /&gt;
* CP/M Plus system disks for making the system bootable.&lt;br /&gt;
* Optionally a [[SYMBiFACE II]] compatible RTC.&lt;br /&gt;
&lt;br /&gt;
==Restrictions==&lt;br /&gt;
* CP/M 2.2 or lower is not supported.&lt;br /&gt;
* 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.&lt;br /&gt;
* Only the master IDE device is accessible by HDCPM.&lt;br /&gt;
* The maximum number of hard disk partition/images supported is four.&lt;br /&gt;
* Only primary partitions are supported.&lt;br /&gt;
* If you want to use CP/M disk images then they must be stored in a FAT16 or FAT32 formatted disk or partition.&lt;br /&gt;
* If the hard disk is partitioned then the CP/M disk images must be placed in the first partition of the disk.&lt;br /&gt;
* The CP/M disk images must be placed in the root directory of the FAT file system.&lt;br /&gt;
* The CP/M disk images must NOT be fragmented and must have the correct size.&lt;br /&gt;
* 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. &lt;br /&gt;
* Only storage devices with 512 bytes sector size are supported.&lt;br /&gt;
* Only storage devices with LBA addressing are supported.&lt;br /&gt;
* Date stamps of CP/M disk image files are not maintained.&lt;br /&gt;
* 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 letters for your IDE media then the corresponding HD20 partitions will be unavailable under CP/M.&lt;br /&gt;
&lt;br /&gt;
==How it works==&lt;br /&gt;
===Using the ROM===&lt;br /&gt;
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:&lt;br /&gt;
|HDCPM (no TIME function support) or |HDCPMT (TIME function support)&amp;lt;br /&amp;gt;&lt;br /&gt;
Alternatively it can be started by holding down the Tab key (no TIME function support) or Shift+Tab (TIME function support), during power-up.&amp;lt;br /&amp;gt;&lt;br /&gt;
===Using the binary===&lt;br /&gt;
HDCPM can be started by running the HDCPM.BIN file from floppy drive or mass storage.&amp;lt;br /&amp;gt;&lt;br /&gt;
===Functions===&lt;br /&gt;
HDCPM will then execute the following functions:&amp;lt;br /&amp;gt;&lt;br /&gt;
* Search for a compatible mass storage interface.&lt;br /&gt;
* Initialize the mass storage interface if needed.&lt;br /&gt;
* Move the boot loader and the CP/M patcher to RAM.&lt;br /&gt;
* Mount 1 to 4 CP/M image files and/or partitions and perform fragmentation and size test.&lt;br /&gt;
* 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.&lt;br /&gt;
* Read the .EMS file from the reserved track and store it in RAM just as the normal CP/M Plus boot loader does.&lt;br /&gt;
* 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.&lt;br /&gt;
* Patch the floppy disk drive routines in case a FDC's not been found.&lt;br /&gt;
* Patch the SCB in order to change the startup/default drive.&lt;br /&gt;
* 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 memory expansion]] or [[Dobbertin Memory Expansion]] driver is present.&lt;br /&gt;
* Move the ALV of the Dk'tronics RAM disk if [[Z-System]] has been detected.&lt;br /&gt;
* Patch the CP/M console with the desired colour scheme. &lt;br /&gt;
* Patch the system message.&lt;br /&gt;
* Do a normal CP/M cold start.&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==CP/M Plus disk image files==&lt;br /&gt;
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 [https://hexed.it/ hexed.it] or any hex editor capable of creating binary files filled with a specific pattern.&amp;lt;br /&amp;gt;&lt;br /&gt;
In case of hexed.it select 'New file' fill in 'Size of the new file = 8519680' and 'Fill Pattern = 0xE5' and press apply. Save the file as CPMDSK01.IMG&amp;lt;br /&amp;gt;&lt;br /&gt;
If you have a FAT capable DOS installed in your AMSTRAD you can use the provided MAKEIMG.BAS utility to create your image file. Keep in mind that it takes more than 1.5 hour for a 8MB image file to be created that way.&amp;lt;br /&amp;gt;&lt;br /&gt;
CP/M disk image files can be accessed by a modern computer with [http://www.moria.de/~michael/cpmtools/ cpmtools]. Use the command |HDDEF to see the record you must insert in the diskdefs file.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The HDCPM record for diskdefs is:&lt;br /&gt;
&lt;br /&gt;
       diskdef hdcpm&lt;br /&gt;
          seclen 512&lt;br /&gt;
          tracks 65&lt;br /&gt;
          sectrk 256&lt;br /&gt;
          blocksize 8192&lt;br /&gt;
          maxdir 1024&lt;br /&gt;
          skew 0&lt;br /&gt;
          boottrk 1&lt;br /&gt;
          os 3&lt;br /&gt;
       end&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
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. [https://www.cpcwiki.eu/index.php/Albireo Albireo] incorporates a file management IC that performs FAT file system operations and handles fragmented files properly. In such case fragmented image files is not a problem. HDCPM will never fragment a CP/M image file.&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Hdcpm-boot-m4.png|thumb|HDCPM binary booting on M4 Board]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==CP/M Plus disk/partitions==&lt;br /&gt;
You can also create one or more partitions in order to format them to [http://www.seasip.info/Cpm/format31.html CP/M-80] 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.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM examines the hard disk's MBR upon start and finds the partition information. Then it finds the LBA of the first sector of each partition and passes it to the CP/M hard disk driver. The CP/M hard disk driver doesn't know anything about partitions. It accesses the partition as if it was a real hard disk.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:hdcpm-ui-boot.png|thumb|HDCPM ROM booting on uIDE-16]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
===Using the ROM===&lt;br /&gt;
* Install the HDCPM ROM in a free ROM slot of your ROM box.&lt;br /&gt;
* Plug in your [[SYMBiFACE II]] compatible IDE interface, [[uIDE 16]], [[M4 Board]], [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] or [[Albireo]] and attach the proper mass storage device.&lt;br /&gt;
* 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 shown inside the parentheses:&amp;lt;br /&amp;gt;&lt;br /&gt;
** (S2): [[SYMBiFACE II]] compatible interface&lt;br /&gt;
** (uI): [[uIDE 16]] interface&lt;br /&gt;
** (M4): [[M4 Board]]&lt;br /&gt;
** (US): [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II]&lt;br /&gt;
** (S3): [http://www.tmtlogic.com/ Symbiface III]&lt;br /&gt;
** (AL): [[Albireo]]&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:hdcpm-s2.png|thumb|HDCPM ROM - SYMBiFACE II]]&lt;br /&gt;
|[[File:hdcpm-ui.png|thumb|HDCPM ROM - uIDE-16]]&lt;br /&gt;
|[[File:hdcpm-m4.png|thumb|HDCPM ROM - M4 Board]]&lt;br /&gt;
|[[File:hdcpm-us.png|thumb|HDCPM ROM - USIfAC II]]&lt;br /&gt;
|[[File:hdcpm-s3.png|thumb|HDCPM ROM - Symbiface III]]&lt;br /&gt;
|}&lt;br /&gt;
In case a RTC is detected you will also see the RTC initialization message and the current date and time: ''RTC found: 2021/01/01 12:01:01''&lt;br /&gt;
* Use your original CP/M Plus system disk set to Boot CP/M Plus.&lt;br /&gt;
* 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.&lt;br /&gt;
* Reset your AMSTRAD and boot CP/M from the hard disk with the command |HDCPM. The Boot loader will check your image file(s) against fragmentation and correct size and boot the system to the CP/M command prompt. If the first image file is fragmented or has the wrong length the system will not boot. All other image files will be ignored if found to be fragmented or have the wrong length.&lt;br /&gt;
* In case you don't use CP/M image files just boot the system with |HDCPM or |HDCPMT&lt;br /&gt;
* Copy the files from your CP/M system floppy disks to the first hard disk.&lt;br /&gt;
* Copy any other needed application etc. to your CP/M hard disk(s).&lt;br /&gt;
* You are ready to go.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Using the binary===&lt;br /&gt;
* Plug in your [[SYMBiFACE II]] compatible IDE interface, [[uIDE 16]], [[M4 Board]], [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] or [[Albireo]] and attach the proper mass storage device.&lt;br /&gt;
* Use your original CP/M Plus system disk set to Boot CP/M Plus.&lt;br /&gt;
* 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.&lt;br /&gt;
* 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.&lt;br /&gt;
* You are ready to go.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==ROM commands==&lt;br /&gt;
[[File:hdcpm-us-boot.png|thumb|HDCPM ROM booting on USIfAC II]]&lt;br /&gt;
* |HDCPM mounts the hard disks and boots CP/M Plus. If [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] is used enable the USB disk with the |USB command first.&lt;br /&gt;
* |HDCPMT works like |HDCPM but also utilizes the RTC.&lt;br /&gt;
* |HDDPB shows the Disk Parameter Block.&lt;br /&gt;
* |HDDEF shows the diskdefs entry for CP/M tools and the file system size.&lt;br /&gt;
* |DATE displays the current date.&lt;br /&gt;
* |TIME displays the current time. If [[M4 Board]] is used |DATE and |TIME will be redirected to M4 |TIME.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==The HDCPM binary file==&lt;br /&gt;
* If [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] is used, use your PC to copy HDCPM.BIN to your USB flash disk. Then insert it to your [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] power up your Amstrad and enable the USB disk with the |USB command.&lt;br /&gt;
* Execute the file from the floppy disk or from your mass storage device with ''RUN&amp;quot;HDCPM&amp;quot;''. 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.&lt;br /&gt;
*  [[M4 Board]] and [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ 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 [https://www.cpcwiki.eu/forum/applications/cubeios-fat16fat32-rom-for-the-cpc's-with-xmass/ CubeMDOS] or [[UniDOS]], installed.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==The MAKEIMG.BAS and MAKEIMG.EXE utilities==&lt;br /&gt;
===MAKEIMG.BAS===&lt;br /&gt;
Although this utility should not be your first option, you can use it to make a new empty CP/M disk image file.&amp;lt;br /&amp;gt;&lt;br /&gt;
In case you decide to use it make sure you have a FAT aware DOS installed in your system. MAKEIMG makes use of the firmware calls CAS_OUT_OPEN, CAS_OUT_CLOSE and CAS_OUT_CHAR so your DOS must support them.&amp;lt;br /&amp;gt;&lt;br /&gt;
Copy the files MAKEIMG.BAS and MAKEIMG.BIN to the root directory of your FAT formatted hard disk and make it your current drive. Run the utility with ''RUN&amp;quot;MAKEIMG&amp;quot;'' and don't hold your breath!&amp;lt;br /&amp;gt;&lt;br /&gt;
Making an image file this way takes more than 1.5 hour for an 8MB file so literally... don't hold your breath.&amp;lt;br /&amp;gt;&lt;br /&gt;
Here is a small tutorial on how to setup and use a CP/M image file: https://youtu.be/GMWsRzNhQTM&amp;lt;br /&amp;gt;&lt;br /&gt;
===MAKEIMG.EXE===&lt;br /&gt;
This utility is a [[SymbOS]] application.&amp;lt;br /&amp;gt;&lt;br /&gt;
Use this utility to create your CP/M hard disk images from within [[SymbOS]]. 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.&amp;lt;br /&amp;gt;&lt;br /&gt;
MAKEIMG.EXE has been developed with [http://www.symbos.de/quigs.htm Quigs] for [[SymbOS]].&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Hdcpm-makeimg-sym1.png|thumb|MAKEIMG.EXE in action]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==The HDMGR.COM utility==&lt;br /&gt;
This is the Hard Disk Manager utility.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can use this utility to get information about your hard disk geometry, disk image files, partitions and boot sector. You have to use this utility to format a hard disk, disk image file or partition to CP/M format or manipulate the boot sector of the hard disk and/or transfer an .EMS system file to the reserved track of the hard disk.&amp;lt;br /&amp;gt;&lt;br /&gt;
The boot sector contains information about the CP/M disk drive letters, start-up drive and console colour scheme. All those properties can be changed with HDMGR.COM.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR will perform a fragmentation test of the discovered CP/M hard disk image files uppon execution (not for Albireo).&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
The HDMGR.COM utility is self explanatory. Just run it from the CP/M command prompt.&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Hdcpm-hdmgr-m.png|thumb|HDMGR main menu]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-1.png|thumb|HDMGR Hardware information]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-2.png|thumb|HDMGR Partition information]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-3.png|thumb|HDMGR CP/M disk image information]]&lt;br /&gt;
|}&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Hdcpm-hdmgr-4.png|thumb|HDMGR Boot sector information]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-5.png|thumb|HDMGR Log disk]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-7.png|thumb|HDMGR Manage boot sector]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-8.png|thumb|HDMGR Transfer CP/M to disk]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==The RTC.COM utility==&lt;br /&gt;
You can make use of the RTC.COM utility in order to keep CP/M date and time updated.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can synchronize the date and time of CP/M Plus with the RTC by running ''RTC -G'' manually or via your PROFILE.SUB.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can also set your RTC to the current CP/M date and time by running ''RTC -S'' (not for M4 board)&amp;lt;br /&amp;gt;&lt;br /&gt;
Currently RTC.COM works with the RTC found in Symbiface II, Symbiface III and M4 board (read only).&amp;lt;br /&amp;gt;&lt;br /&gt;
DATE.COM, DIR.COM and SHOW.COM commands, patched for Year 2000 compatibility can be downloaded from the [http://www.cpm.z80.de/binary.html CP/M source archive - Digital Research Binary files section] .&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Error messages==&lt;br /&gt;
===ROM checksum error===&lt;br /&gt;
* ''*** HDCPM ROM checksum error ***&lt;br /&gt;
	The ROM has failed the checksum test.&lt;br /&gt;
	The contents are probably corrupted. The ROM will not be initialized.&lt;br /&gt;
&lt;br /&gt;
===Hard disk errors===&lt;br /&gt;
* ''*** No mass storage found ***''&lt;br /&gt;
	No compatible mass storage interface can be found.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: DISK I/O''&lt;br /&gt;
	I/O error occurred during the last read/write operation.&lt;br /&gt;
	Your hard disk might be defect or the USB disk is not enabled.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: INVALID BOOT SECTOR''&lt;br /&gt;
	No FAT or CP/M boot sector was found in a not partitioned hard disk.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: INVALID FILE SYSTEM''&lt;br /&gt;
	The first partition in a partitioned hard disk is not a FAT or CP/M-80&lt;br /&gt;
	one.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: INVALID SECTOR SIZE''&lt;br /&gt;
	The hard disk used has a sector size not equal to 512 bytes.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: CPMDSK01.IMG NOT FOUND''&lt;br /&gt;
	The CP/M image file named CPMDSK01.IMG can't be found in the FAT&lt;br /&gt;
	formatted hard disk or partition. &lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: CP/M SYSTEM FILE NOT FOUND''&lt;br /&gt;
	The .EMS CP/M system file can't be found in the system track of your&lt;br /&gt;
	CP/M partition or image file.&lt;br /&gt;
	&lt;br /&gt;
*  ''ERROR: CPMDSK01.IMG IS FRAGMENTED''&lt;br /&gt;
	The first CP/M image file is fragmented, the system won't mount it.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: CPMDSK01.IMG HAS WRONG LENGTH''&lt;br /&gt;
	The first CP/M image file has wrong length, the system won't mount it.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: CPMDSK01.IMG IS NOT FORMATTED''&lt;br /&gt;
	The first CP/M image file is not formatted to CP/M-80 format, the&lt;br /&gt;
	system won't mount it. Use the HDMGR.COM utility to format it.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: INCOMPATIBLE EMS FILE''&lt;br /&gt;
	The .EMS system file that was loaded from the system track is not&lt;br /&gt;
	compatible with HDCPM.&lt;br /&gt;
&lt;br /&gt;
===RTC errors===&lt;br /&gt;
* ''*** Battery depleted ***''&lt;br /&gt;
	The RTC battery is depleted. The RTC driver will continue to operate&lt;br /&gt;
	normally but the readings are not reliable. Replace the RTC battery.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Release info &amp;amp; download==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Version !! Changes !! Download&lt;br /&gt;
|-&lt;br /&gt;
| v1.00 December 2021 || Initial release || [[Media:hdcpm100.dsk|hdcpm100.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.01 January 2022 || HDCPM.ROM, HDMGR.COM: code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: (bug fix) fragmented file detection was not working properly unless the file was CPMDSK01.IMG&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: (bug fix) unformatted image file detection was not working properly. New error message added.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) CP/M drive table wasn't patched properly.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) initialization of floppy drive(s) was corrupted due to misplaced code.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: added .EMS file compatibility check. New error message added.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: added support for Dobbertin RAM disk driver.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: added compatibility with Dobbertin HD20 Harddisc&amp;lt;br /&amp;gt;&lt;br /&gt;
MAKEIMG.EXE: added utility for creating an image file from within SYMBOS.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&lt;br /&gt;
|| [[Media:hdcpm101.dsk|hdcpm101.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.02 March 2022 || HDCPM.ROM, HDMGR.COM: added support for M4 board.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: added support for uIDE-16 interface.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) the ROM was initialized even if no compatible interface was found.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: error message change.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: option &amp;quot;F&amp;quot; has been removed. HDCPM will always do a disk fragmentation test during boot.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: power up message changed in order to provide information about the type of the detected interface.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: two bytes of RAM will be reserved by the ROM for storing the interface type and M4 ROM number.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&lt;br /&gt;
|| [[Media:hdcpm102.dsk|hdcpm102.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.03 April 2022 || HDCPM.ROM, HDMGR.COM: added support for USIfAC II.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) uIDE-16 detection was broken.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&lt;br /&gt;
|| [[Media:hdcpm103.dsk|hdcpm103.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.04 June 2022|| HDCPM.ROM: code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.BIN: added executable binary file version of HDCPM.&lt;br /&gt;
|| [[Media:hdcpm104.dsk|hdcpm104.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.05 July 2022 || HDCPM.ROM, HDCPM.BIN, HDMGR.COM: added support for Symbiface III.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDCPM.BIN:  code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR.COM: Hardware info added for USIfAC II&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR.COM: (bug fix) the 'Select boot file' menu was garbled if there were 8 or more .EMS files present.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&lt;br /&gt;
|| [[Media:hdcpm105.dsk|hdcpm105.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.06 January 2023 || HDCPM.ROM, HDCPM.BIN, HDMGR.COM: added support for Albireo.&amp;lt;br /&amp;gt;&lt;br /&gt;
RTC.COM: added support for M4 Board (r/o) and Symbiface 3.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDCPM.BIN: (bug fix) CPC was freezing after mounting the CP/M disk(s) with incompatible .EMS file.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR.COM: (bug fix) the Stack was overflowed in some rare cases.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&amp;lt;br /&amp;gt;&lt;br /&gt;
|| [[Media:hdcpm106.dsk|hdcpm106.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.10 ??? 2023 || HDCPM.ROM, HDCPM.BIN: added support for CPC464 with #C3 mode compatible RAM expansion card.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDCPM.BIN: can now boot CP/M Plus on a CPC that has no or faulty Floppy Disc Controller present.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: ROM checksum test and new error message added.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDCPM.BIN, HDMGR.COM:  code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDCPM.BIN: (bug fix) incorrect patching would corrupt the Dobbertin RAM drive on CP/M Plus v1.1&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) |HDDPB was displaying wrong values&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR.COM: (bug fix) a corruption of the MBR of USB/SD card occured in some rare cases.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&amp;lt;br /&amp;gt;&lt;br /&gt;
|| [[Media:hdcpm110.dsk|hdcpm110.dsk]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Other downloads==&lt;br /&gt;
*[[Media:CPMDSK01&amp;amp;02.zip|CP/M disk images]] - CPMDSK01.IMG is bootable and contains all the files of the 3 CP/M Plus system disks and year 2000 compliant binaries downloaded from the [http://www.cpm.z80.de/binary.html Digital Research Binary Files]. CPMDSK02.IMG is empty and can also be used as a template.&amp;lt;br /&amp;gt;&lt;br /&gt;
*[[Media:Z3Plus.part1.rar|ZPM3+ZCCP disk image part 1]] , [[Media:Z3Plus.part2.rar|ZPM3+ZCCP disk image part 2]] - The Amstrad BDOS and CCP have been replaced with their counterparts [https://github.com/wwarthen/CPU280/tree/master/ZPM3/zpm3.txt ZPM3] and [https://github.com/wwarthen/CPU280/tree/master/ZCCP/zccp.txt ZCCP] written by Simeon Cran. It is [https://www.cpcwiki.eu/index.php/Z-System Z-system, Z3Plus] compatible and contains the Z3Plus system files, all the files of the 3 CP/M Plus system disks, year 2000 compliant binaries and also contains some useful tools, help files and manuals.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Videos==&lt;br /&gt;
* [https://youtu.be/GMWsRzNhQTM How to create and prepare a CP/M image file in a FAT formatted hard disk]&lt;br /&gt;
* [https://youtu.be/nxow6Y5O4Dc Hard disk utilization and dual boot]&lt;br /&gt;
* [https://youtu.be/em7dHOdaylg How to create a CP/M image file under SYMBOS]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
[[category:Expansion ROM]] [[category:Applications]] [[category:CP/M]]&lt;/div&gt;</summary>
		<author><name>D kef</name></author>	</entry>

	<entry>
		<id>https://oldwiki.cpcwiki.eu/index.php?title=HDCPM&amp;diff=112008</id>
		<title>HDCPM</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.cpcwiki.eu/index.php?title=HDCPM&amp;diff=112008"/>
				<updated>2023-08-14T20:27:25Z</updated>
		
		<summary type="html">&lt;p&gt;D kef: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;HDCPM is a Hard Disk boot loader for [[CP/M]] Plus, developed by d_kef&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can read more about the development of the application here:&amp;lt;br /&amp;gt;&lt;br /&gt;
https://www.cpcwiki.eu/forum/applications/hdcpm-boot-and-run-cpm-plus-from-hard-disk/&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:hdcpm.gif|HDCPM booting CP/M Plus]]&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It comes in the form of:&lt;br /&gt;
* a standard background ROM that can be installed in any available ROM position.&lt;br /&gt;
* a standard binary file that can be loaded from floppy or hard drive.&lt;br /&gt;
&lt;br /&gt;
 	&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following configurations are possible with one hard disk:&lt;br /&gt;
&lt;br /&gt;
* One not partitioned, CP/M formatted hard disk. The whole hard disk is used by CP/M.&lt;br /&gt;
* One to four CP/M formatted partitions. Every partition is accessed as a separate hard disk by CP/M.&lt;br /&gt;
* 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.&lt;br /&gt;
* 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.&lt;br /&gt;
* For interfaces that use SD card or USB flash drive as a mass storage device ([[M4 Board]], [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II], [http://www.tmtlogic.com/ Symbiface III] or [https://www.cpcwiki.eu/index.php/Albireo Albireo]) the only supported configuration is one to four CP/M disk image files in the root directory of the FAT file system.&lt;br /&gt;
	&lt;br /&gt;
Currently only the master IDE device can be accessed by HDCPM. The slave device is available to be used by your favourite DOS.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
HDCPM can also utilize the RTC found in the [[SYMBiFACE II]] in order to implement CP/M Plus BIOS function 26: TIME.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
HDCPM is compatible and can be used together with the [[Dobbertin Harddisc]].&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
HDCPM has been developed with [[WinApe]] Z80 Assembler and was tested with [[WinApe]], [[CPCemu]], an Amstrad Plus 464 upgraded to 6128 an Amstrad CPC 6128 and an Amstrad CPC 464 with [https://www.cpcwiki.eu/index.php/Universal_512K_and_1MByte_RAM_Expansions Universal 512K RAM Expansion].&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
HDCPM distribution disk contains the following files:&lt;br /&gt;
* HDCPM.ROM the ROM itself&lt;br /&gt;
* HDCPM.BIN the executable binary file&lt;br /&gt;
* HDMGR.COM Hard Disk Manager utility&lt;br /&gt;
* RTC.COM RTC synchronization utility&lt;br /&gt;
* MAKEIMG.BAS CP/M image file creation utility&lt;br /&gt;
* MAKEIMG.BIN CP/M image file creation binary&lt;br /&gt;
* MAKEIMG.EXE CP/M image file creation utility for [[SymbOS]]&lt;br /&gt;
* HDCPM.DOC the User guide&lt;br /&gt;
&lt;br /&gt;
HDCPM is free software. It can be used and distributed with no restrictions.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Prerequisites==&lt;br /&gt;
* Amstrad CPC/Plus computer capable of running CP/M Plus.&lt;br /&gt;
* ROM box or other ROM expansion hardware if using the ROM.&lt;br /&gt;
* Optionaly a FAT aware DOS like M4 ROM, USIfAC ROM, [[UniDOS]], [https://www.cpcwiki.eu/forum/applications/cubeios-fat16fat32-rom-for-the-cpc's-with-xmass/ CubeMDOS] etc if using the binary.&lt;br /&gt;
* One of the following mass storage interfaces:&lt;br /&gt;
** [[SYMBiFACE II]]&lt;br /&gt;
** [[X-Mass]]&lt;br /&gt;
** [https://github.com/salafek/cyboard-for-cpc Cyboard]&lt;br /&gt;
** [[uIDE 16]] (base address = &amp;amp;FEF0)&lt;br /&gt;
** [[M4 Board]]&lt;br /&gt;
** [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II]&lt;br /&gt;
** [http://www.tmtlogic.com/ Symbiface III]&lt;br /&gt;
** [[Albireo]] (SD card only)&lt;br /&gt;
* Compatible storage device with enough free space to accommodate the desirable CP/M hard disk configuration.&lt;br /&gt;
* Floppy disk drive for initialization of the file system.&lt;br /&gt;
* CP/M Plus system disks for making the system bootable.&lt;br /&gt;
* Optionally a [[SYMBiFACE II]] compatible RTC.&lt;br /&gt;
&lt;br /&gt;
==Restrictions==&lt;br /&gt;
* CP/M 2.2 or lower is not supported.&lt;br /&gt;
* 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.&lt;br /&gt;
* Only the master IDE device is accessible by HDCPM.&lt;br /&gt;
* The maximum number of hard disk partition/images supported is four.&lt;br /&gt;
* Only primary partitions are supported.&lt;br /&gt;
* If you want to use CP/M disk images then they must be stored in a FAT16 or FAT32 formatted disk or partition.&lt;br /&gt;
* If the hard disk is partitioned then the CP/M disk images must be placed in the first partition of the disk.&lt;br /&gt;
* The CP/M disk images must be placed in the root directory of the FAT file system.&lt;br /&gt;
* The CP/M disk images must NOT be fragmented and must have the correct size.&lt;br /&gt;
* 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. &lt;br /&gt;
* Only storage devices with 512 bytes sector size are supported.&lt;br /&gt;
* Only storage devices with LBA addressing are supported.&lt;br /&gt;
* Date stamps of CP/M disk image files are not maintained.&lt;br /&gt;
* 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 letters for your IDE media then the corresponding HD20 partitions will be unavailable under CP/M.&lt;br /&gt;
&lt;br /&gt;
==How it works==&lt;br /&gt;
===Using the ROM===&lt;br /&gt;
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:&lt;br /&gt;
|HDCPM (no TIME function support) or |HDCPMT (TIME function support)&amp;lt;br /&amp;gt;&lt;br /&gt;
Alternatively it can be started by holding down the Tab key (no TIME function support) or Shift+Tab (TIME function support), during power-up.&amp;lt;br /&amp;gt;&lt;br /&gt;
===Using the binary===&lt;br /&gt;
HDCPM can be started by running the HDCPM.BIN file from floppy drive or mass storage.&amp;lt;br /&amp;gt;&lt;br /&gt;
===Functions===&lt;br /&gt;
HDCPM will then execute the following functions:&amp;lt;br /&amp;gt;&lt;br /&gt;
* Search for a compatible mass storage interface.&lt;br /&gt;
* Initialize the mass storage interface if needed.&lt;br /&gt;
* Move the boot loader and the CP/M patcher to RAM.&lt;br /&gt;
* Mount 1 to 4 CP/M image files and/or partitions and perform fragmentation and size test.&lt;br /&gt;
* 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.&lt;br /&gt;
* Read the .EMS file from the reserved track and store it in RAM just as the normal CP/M Plus boot loader does.&lt;br /&gt;
* 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.&lt;br /&gt;
* Patch the floppy disk drive routines in case a FDC's not been found.&lt;br /&gt;
* Patch the SCB in order to change the startup/default drive.&lt;br /&gt;
* 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 memory expansion]] or [[Dobbertin Memory Expansion]] driver is present.&lt;br /&gt;
* Move the ALV of the Dk'tronics RAM disk if [[Z-System]] has been detected.&lt;br /&gt;
* Patch the CP/M console with the desired colour scheme. &lt;br /&gt;
* Patch the system message.&lt;br /&gt;
* Do a normal CP/M cold start.&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==CP/M Plus disk image files==&lt;br /&gt;
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 [https://hexed.it/ hexed.it] or any hex editor capable of creating binary files filled with a specific pattern.&amp;lt;br /&amp;gt;&lt;br /&gt;
In case of hexed.it select 'New file' fill in 'Size of the new file = 8519680' and 'Fill Pattern = 0xE5' and press apply. Save the file as CPMDSK01.IMG&amp;lt;br /&amp;gt;&lt;br /&gt;
If you have a FAT capable DOS installed in your AMSTRAD you can use the provided MAKEIMG.BAS utility to create your image file. Keep in mind that it takes more than 1.5 hour for a 8MB image file to be created that way.&amp;lt;br /&amp;gt;&lt;br /&gt;
CP/M disk image files can be accessed by a modern computer with [http://www.moria.de/~michael/cpmtools/ cpmtools]. Use the command |HDDEF to see the record you must insert in the diskdefs file.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The HDCPM record for diskdefs is:&lt;br /&gt;
&lt;br /&gt;
       diskdef hdcpm&lt;br /&gt;
          seclen 512&lt;br /&gt;
          tracks 65&lt;br /&gt;
          sectrk 256&lt;br /&gt;
          blocksize 8192&lt;br /&gt;
          maxdir 1024&lt;br /&gt;
          skew 0&lt;br /&gt;
          boottrk 1&lt;br /&gt;
          os 3&lt;br /&gt;
       end&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
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. [https://www.cpcwiki.eu/index.php/Albireo Albireo] incorporates a file management IC that performs FAT file system operations and handles fragmented files properly. In such case fragmented image files is not a problem. HDCPM will never fragment a CP/M image file.&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Hdcpm-boot-m4.png|thumb|HDCPM binary booting on M4 Board]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==CP/M Plus disk/partitions==&lt;br /&gt;
You can also create one or more partitions in order to format them to [http://www.seasip.info/Cpm/format31.html CP/M-80] 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.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM examines the hard disk's MBR upon start and finds the partition information. Then it finds the LBA of the first sector of each partition and passes it to the CP/M hard disk driver. The CP/M hard disk driver doesn't know anything about partitions. It accesses the partition as if it was a real hard disk.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:hdcpm-ui-boot.png|thumb|HDCPM ROM booting on uIDE-16]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
===Using the ROM===&lt;br /&gt;
* Install the HDCPM ROM in a free ROM slot of your ROM box.&lt;br /&gt;
* Plug in your [[SYMBiFACE II]] compatible IDE interface, [[uIDE 16]], [[M4 Board]], [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] or [[Albireo]] and attach the proper mass storage device.&lt;br /&gt;
* 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 shown inside the parentheses:&amp;lt;br /&amp;gt;&lt;br /&gt;
** (S2): [[SYMBiFACE II]] compatible interface&lt;br /&gt;
** (uI): [[uIDE 16]] interface&lt;br /&gt;
** (M4): [[M4 Board]]&lt;br /&gt;
** (US): [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II]&lt;br /&gt;
** (S3): [http://www.tmtlogic.com/ Symbiface III]&lt;br /&gt;
** (AL): [[Albireo]]&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:hdcpm-s2.png|thumb|HDCPM ROM - SYMBiFACE II]]&lt;br /&gt;
|[[File:hdcpm-ui.png|thumb|HDCPM ROM - uIDE-16]]&lt;br /&gt;
|[[File:hdcpm-m4.png|thumb|HDCPM ROM - M4 Board]]&lt;br /&gt;
|[[File:hdcpm-us.png|thumb|HDCPM ROM - USIfAC II]]&lt;br /&gt;
|[[File:hdcpm-s3.png|thumb|HDCPM ROM - Symbiface III]]&lt;br /&gt;
|}&lt;br /&gt;
In case a RTC is detected you will also see the RTC initialization message and the current date and time: ''RTC found: 2021/01/01 12:01:01''&lt;br /&gt;
* Use your original CP/M Plus system disk set to Boot CP/M Plus.&lt;br /&gt;
* 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.&lt;br /&gt;
* Reset your AMSTRAD and boot CP/M from the hard disk with the command |HDCPM. The Boot loader will check your image file(s) against fragmentation and correct size and boot the system to the CP/M command prompt. If the first image file is fragmented or has the wrong length the system will not boot. All other image files will be ignored if found to be fragmented or have the wrong length.&lt;br /&gt;
* In case you don't use CP/M image files just boot the system with |HDCPM or |HDCPMT&lt;br /&gt;
* Copy the files from your CP/M system floppy disks to the first hard disk.&lt;br /&gt;
* Copy any other needed application etc. to your CP/M hard disk(s).&lt;br /&gt;
* You are ready to go.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Using the binary===&lt;br /&gt;
* Plug in your [[SYMBiFACE II]] compatible IDE interface, [[uIDE 16]], [[M4 Board]], [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] or [[Albireo]] and attach the proper mass storage device.&lt;br /&gt;
* Use your original CP/M Plus system disk set to Boot CP/M Plus.&lt;br /&gt;
* 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.&lt;br /&gt;
* 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.&lt;br /&gt;
* You are ready to go.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==ROM commands==&lt;br /&gt;
[[File:hdcpm-us-boot.png|thumb|HDCPM ROM booting on USIfAC II]]&lt;br /&gt;
* |HDCPM mounts the hard disks and boots CP/M Plus. If [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] is used enable the USB disk with the |USB command first.&lt;br /&gt;
* |HDCPMT works like |HDCPM but also utilizes the RTC.&lt;br /&gt;
* |HDDPB shows the Disk Parameter Block.&lt;br /&gt;
* |HDDEF shows the diskdefs entry for CP/M tools and the file system size.&lt;br /&gt;
* |DATE displays the current date.&lt;br /&gt;
* |TIME displays the current time. If [[M4 Board]] is used |DATE and |TIME will be redirected to M4 |TIME.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==The HDCPM binary file==&lt;br /&gt;
* If [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] is used, use your PC to copy HDCPM.BIN to your USB flash disk. Then insert it to your [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] power up your Amstrad and enable the USB disk with the |USB command.&lt;br /&gt;
* Execute the file from the floppy disk or from your mass storage device with ''RUN&amp;quot;HDCPM&amp;quot;''. 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.&lt;br /&gt;
*  [[M4 Board]] and [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ 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 [https://www.cpcwiki.eu/forum/applications/cubeios-fat16fat32-rom-for-the-cpc's-with-xmass/ CubeMDOS] or [[UniDOS]], installed.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==The MAKEIMG.BAS and MAKEIMG.EXE utilities==&lt;br /&gt;
===MAKEIMG.BAS===&lt;br /&gt;
Although this utility should not be your first option, you can use it to make a new empty CP/M disk image file.&amp;lt;br /&amp;gt;&lt;br /&gt;
In case you decide to use it make sure you have a FAT aware DOS installed in your system. MAKEIMG makes use of the firmware calls CAS_OUT_OPEN, CAS_OUT_CLOSE and CAS_OUT_CHAR so your DOS must support them.&amp;lt;br /&amp;gt;&lt;br /&gt;
Copy the files MAKEIMG.BAS and MAKEIMG.BIN to the root directory of your FAT formatted hard disk and make it your current drive. Run the utility with ''RUN&amp;quot;MAKEIMG&amp;quot;'' and don't hold your breath!&amp;lt;br /&amp;gt;&lt;br /&gt;
Making an image file this way takes more than 1.5 hour for an 8MB file so literally... don't hold your breath.&amp;lt;br /&amp;gt;&lt;br /&gt;
Here is a small tutorial on how to setup and use a CP/M image file: https://youtu.be/GMWsRzNhQTM&amp;lt;br /&amp;gt;&lt;br /&gt;
===MAKEIMG.EXE===&lt;br /&gt;
This utility is a [[SymbOS]] application.&amp;lt;br /&amp;gt;&lt;br /&gt;
Use this utility to create your CP/M hard disk images from within [[SymbOS]]. 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.&amp;lt;br /&amp;gt;&lt;br /&gt;
MAKEIMG.EXE has been developed with [http://www.symbos.de/quigs.htm Quigs] for [[SymbOS]].&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Hdcpm-makeimg-sym1.png|thumb|MAKEIMG.EXE in action]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==The HDMGR.COM utility==&lt;br /&gt;
This is the Hard Disk Manager utility.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can use this utility to get information about your hard disk geometry, disk image files, partitions and boot sector. You have to use this utility to format a hard disk, disk image file or partition to CP/M format or manipulate the boot sector of the hard disk and/or transfer an .EMS system file to the reserved track of the hard disk.&amp;lt;br /&amp;gt;&lt;br /&gt;
The boot sector contains information about the CP/M disk drive letters, start-up drive and console colour scheme. All those properties can be changed with HDMGR.COM.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR will perform a fragmentation test of the discovered CP/M hard disk image files uppon execution (not for Albireo).&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
The HDMGR.COM utility is self explanatory. Just run it from the CP/M command prompt.&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Hdcpm-hdmgr-m.png|thumb|HDMGR main menu]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-1.png|thumb|HDMGR Hardware information]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-2.png|thumb|HDMGR Partition information]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-3.png|thumb|HDMGR CP/M disk image information]]&lt;br /&gt;
|}&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Hdcpm-hdmgr-4.png|thumb|HDMGR Boot sector information]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-5.png|thumb|HDMGR Log disk]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-7.png|thumb|HDMGR Manage boot sector]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-8.png|thumb|HDMGR Transfer CP/M to disk]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==The RTC.COM utility==&lt;br /&gt;
You can make use of the RTC.COM utility in order to keep CP/M date and time updated.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can synchronize the date and time of CP/M Plus with the RTC by running ''RTC -G'' manually or via your PROFILE.SUB.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can also set your RTC to the current CP/M date and time by running ''RTC -S'' (not for M4 board)&amp;lt;br /&amp;gt;&lt;br /&gt;
Currently RTC.COM works with the RTC found in Symbiface II, Symbiface III and M4 board (read only).&amp;lt;br /&amp;gt;&lt;br /&gt;
DATE.COM, DIR.COM and SHOW.COM commands, patched for Year 2000 compatibility can be downloaded from the [http://www.cpm.z80.de/binary.html CP/M source archive - Digital Research Binary files section] .&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Error messages==&lt;br /&gt;
===ROM checksum error===&lt;br /&gt;
* ''*** HDCPM ROM checksum error ***&lt;br /&gt;
	The ROM has failed the checksum test.&lt;br /&gt;
	The contents are probably corrupted. The ROM will not be initialized.&lt;br /&gt;
&lt;br /&gt;
===Hard disk errors===&lt;br /&gt;
* ''*** No mass storage found ***''&lt;br /&gt;
	No compatible mass storage interface can be found.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: DISK I/O''&lt;br /&gt;
	I/O error occurred during the last read/write operation.&lt;br /&gt;
	Your hard disk might be defect or the USB disk is not enabled.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: INVALID BOOT SECTOR''&lt;br /&gt;
	No FAT or CP/M boot sector was found in a not partitioned hard disk.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: INVALID FILE SYSTEM''&lt;br /&gt;
	The first partition in a partitioned hard disk is not a FAT or CP/M-80&lt;br /&gt;
	one.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: INVALID SECTOR SIZE''&lt;br /&gt;
	The hard disk used has a sector size not equal to 512 bytes.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: CPMDSK01.IMG NOT FOUND''&lt;br /&gt;
	The CP/M image file named CPMDSK01.IMG can't be found in the FAT&lt;br /&gt;
	formatted hard disk or partition. &lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: CP/M SYSTEM FILE NOT FOUND''&lt;br /&gt;
	The .EMS CP/M system file can't be found in the system track of your&lt;br /&gt;
	CP/M partition or image file.&lt;br /&gt;
	&lt;br /&gt;
*  ''ERROR: CPMDSK01.IMG IS FRAGMENTED''&lt;br /&gt;
	The first CP/M image file is fragmented, the system won't mount it.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: CPMDSK01.IMG HAS WRONG LENGTH''&lt;br /&gt;
	The first CP/M image file has wrong length, the system won't mount it.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: CPMDSK01.IMG IS NOT FORMATTED''&lt;br /&gt;
	The first CP/M image file is not formatted to CP/M-80 format, the&lt;br /&gt;
	system won't mount it. Use the HDMGR.COM utility to format it.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: INCOMPATIBLE EMS FILE''&lt;br /&gt;
	The .EMS system file that was loaded from the system track is not&lt;br /&gt;
	compatible with HDCPM.&lt;br /&gt;
&lt;br /&gt;
===RTC errors===&lt;br /&gt;
* ''*** Battery depleted ***''&lt;br /&gt;
	The RTC battery is depleted. The RTC driver will continue to operate&lt;br /&gt;
	normally but the readings are not reliable. Replace the RTC battery.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Release info &amp;amp; download==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Version !! Changes !! Download&lt;br /&gt;
|-&lt;br /&gt;
| v1.00 December 2021 || Initial release || [[Media:hdcpm100.dsk|hdcpm100.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.01 January 2022 || HDCPM.ROM, HDMGR.COM: code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: (bug fix) fragmented file detection was not working properly unless the file was CPMDSK01.IMG&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: (bug fix) unformatted image file detection was not working properly. New error message added.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) CP/M drive table wasn't patched properly.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) initialization of floppy drive(s) was corrupted due to misplaced code.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: added .EMS file compatibility check. New error message added.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: added support for Dobbertin RAM disk driver.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: added compatibility with Dobbertin HD20 Harddisc&amp;lt;br /&amp;gt;&lt;br /&gt;
MAKEIMG.EXE: added utility for creating an image file from within SYMBOS.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&lt;br /&gt;
|| [[Media:hdcpm101.dsk|hdcpm101.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.02 March 2022 || HDCPM.ROM, HDMGR.COM: added support for M4 board.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: added support for uIDE-16 interface.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) the ROM was initialized even if no compatible interface was found.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: error message change.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: option &amp;quot;F&amp;quot; has been removed. HDCPM will always do a disk fragmentation test during boot.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: power up message changed in order to provide information about the type of the detected interface.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: two bytes of RAM will be reserved by the ROM for storing the interface type and M4 ROM number.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&lt;br /&gt;
|| [[Media:hdcpm102.dsk|hdcpm102.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.03 April 2022 || HDCPM.ROM, HDMGR.COM: added support for USIfAC II.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) uIDE-16 detection was broken.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&lt;br /&gt;
|| [[Media:hdcpm103.dsk|hdcpm103.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.04 June 2022|| HDCPM.ROM: code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.BIN: added executable binary file version of HDCPM.&lt;br /&gt;
|| [[Media:hdcpm104.dsk|hdcpm104.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.05 July 2022 || HDCPM.ROM, HDCPM.BIN, HDMGR.COM: added support for Symbiface III.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDCPM.BIN:  code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR.COM: Hardware info added for USIfAC II&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR.COM: (bug fix) the 'Select boot file' menu was garbled if there were 8 or more .EMS files present.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&lt;br /&gt;
|| [[Media:hdcpm105.dsk|hdcpm105.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.06 January 2023 || HDCPM.ROM, HDCPM.BIN, HDMGR.COM: added support for Albireo.&amp;lt;br /&amp;gt;&lt;br /&gt;
RTC.COM: added support for M4 Board (r/o) and Symbiface 3.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDCPM.BIN: (bug fix) CPC was freezing after mounting the CP/M disk(s) with incompatible .EMS file.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR.COM: (bug fix) the Stack was overflowed in some rare cases.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&amp;lt;br /&amp;gt;&lt;br /&gt;
|| [[Media:hdcpm106.dsk|hdcpm106.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.10 ??? 2023 || HDCPM.ROM, HDCPM.BIN: added support for CPC464 with #C3 mode compatible RAM expansion card.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDCPM.BIN: can now boot CP/M Plus on a CPC that has no or faulty Floppy Disc Controller present.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: ROM checksum test and new error message added.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDCPM.BIN, HDMGR.COM:  code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDCPM.BIN: (bug fix) incorrect patching would corrupt the Dobbertin RAM drive on CP/M Plus v1.1&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) |HDDPB was displaying wrong values&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR.COM: (bug fix) a corruption of the MBR of USB/SD card occured in some rare cases.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&amp;lt;br /&amp;gt;&lt;br /&gt;
|| [[Media:hdcpm110.dsk|hdcpm110.dsk]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Other downloads==&lt;br /&gt;
*[[Media:CPMDSK01&amp;amp;02.zip|CP/M disk images]] - CPMDSK01.IMG is bootable and contains all the files of the 3 CP/M Plus system disks and year 2000 compliant binaries downloaded from the [http://www.cpm.z80.de/binary.html Digital Research Binary Files]. CPMDSK02.IMG is empty and can also be used as a template.&amp;lt;br /&amp;gt;&lt;br /&gt;
*[[Media:Z3Plus.part1.rar|ZPM3+ZCCP disk image part 1]] , [[Media:Z3Plus.part2.rar|ZPM3+ZCCP disk image part 2]] - The Amstrad BDOS and CCP have been replaced with their counterparts [https://github.com/wwarthen/CPU280/tree/master/ZPM3/zpm3.txt ZPM3] and [https://github.com/wwarthen/CPU280/tree/master/ZCCP/zccp.txt ZCCP] written by Simeon Cran. It is [https://www.cpcwiki.eu/index.php/Z-System Z-system, Z3Plus] compatible and contains the Z3Plus system files, all the files of the 3 CP/M Plus system disks, year 2000 compliant binaries and also contains some useful tools, help files and manuals.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Videos==&lt;br /&gt;
* [https://youtu.be/GMWsRzNhQTM How to create and prepare a CP/M image file in a FAT formatted hard disk]&lt;br /&gt;
* [https://youtu.be/nxow6Y5O4Dc Hard disk utilization and dual boot]&lt;br /&gt;
* [https://youtu.be/em7dHOdaylg How to create a CP/M image file under SYMBOS]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
[[category:Expansion ROM]] [[category:Applications]] [[category:CP/M]]&lt;/div&gt;</summary>
		<author><name>D kef</name></author>	</entry>

	<entry>
		<id>https://oldwiki.cpcwiki.eu/index.php?title=HDCPM&amp;diff=109900</id>
		<title>HDCPM</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.cpcwiki.eu/index.php?title=HDCPM&amp;diff=109900"/>
				<updated>2023-01-28T18:37:05Z</updated>
		
		<summary type="html">&lt;p&gt;D kef: /* Other downloads */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;HDCPM is a Hard Disk boot loader for [[CP/M]] plus developed by d_kef&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can read more about the development of the application here:&amp;lt;br /&amp;gt;&lt;br /&gt;
https://www.cpcwiki.eu/forum/applications/hdcpm-boot-and-run-cpm-plus-from-hard-disk/&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:hdcpm.gif|HDCPM booting CP/M Plus]]&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It comes in the form of:&lt;br /&gt;
* a standard background ROM that can be installed in any available ROM position.&lt;br /&gt;
* a standard binary file that can be loaded from floppy or hard drive.&lt;br /&gt;
&lt;br /&gt;
 	&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following configurations are possible with one hard disk:&lt;br /&gt;
&lt;br /&gt;
* One not partitioned, CP/M formatted hard disk. The whole hard disk is used by CP/M.&lt;br /&gt;
* One to four CP/M formatted partitions. Every partition is accessed as a separate hard disk by CP/M.&lt;br /&gt;
* 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.&lt;br /&gt;
* 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.&lt;br /&gt;
* For interfaces that use SD card or USB flash drive as a mass storage device ([[M4 Board]], [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II], [http://www.tmtlogic.com/ Symbiface III] or [https://www.cpcwiki.eu/index.php/Albireo Albireo]) the only supported configuration is one to four CP/M disk image files in the root directory of the FAT file system.&lt;br /&gt;
	&lt;br /&gt;
Currently only the master IDE device can be accessed by HDCPM. The slave device is available to be used by your favourite DOS.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
HDCPM can also utilize the RTC found in the [[SYMBiFACE II]] in order to implement CP/M Plus BIOS function 26: TIME.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
HDCPM is compatible and can be used together with the [[Dobbertin Harddisc]].&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
HDCPM distribution disk contains the following files:&lt;br /&gt;
* HDCPM.ROM the ROM itself&lt;br /&gt;
* HDCPM.BIN the executable binary file&lt;br /&gt;
* HDMGR.COM Hard Disk Manager utility&lt;br /&gt;
* RTC.COM RTC synchronization utility&lt;br /&gt;
* MAKEIMG.BAS CP/M image file creation utility&lt;br /&gt;
* MAKEIMG.BIN CP/M image file creation binary&lt;br /&gt;
* MAKEIMG.EXE CP/M image file creation utility for [[SymbOS]]&lt;br /&gt;
* HDCPM.DOC the User guide&lt;br /&gt;
&lt;br /&gt;
HDCPM is free software. It can be used and distributed with no restrictions.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Prerequisites==&lt;br /&gt;
* Amstrad CPC/Plus computer capable of running CP/M Plus.&lt;br /&gt;
* ROM box or other ROM expansion hardware if using the ROM.&lt;br /&gt;
* Optionaly a FAT aware DOS like M4 ROM, USIfAC ROM, [[UniDOS]], [https://www.cpcwiki.eu/forum/applications/cubeios-fat16fat32-rom-for-the-cpc's-with-xmass/ CubeMDOS] etc if using the binary.&lt;br /&gt;
* One of the following mass storage interfaces:&lt;br /&gt;
** [[SYMBiFACE II]]&lt;br /&gt;
** [[X-Mass]]&lt;br /&gt;
** [[uIDE 16]] (base address = &amp;amp;FEF0)&lt;br /&gt;
** [[M4 Board]]&lt;br /&gt;
** [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II]&lt;br /&gt;
** [http://www.tmtlogic.com/ Symbiface III]&lt;br /&gt;
** [https://www.cpcwiki.eu/index.php/Albireo Albireo] (SD card only)&lt;br /&gt;
* Compatible storage device with enough free space to accommodate the desirable CP/M hard disk configuration.&lt;br /&gt;
* Floppy disk drive for initialization of the file system.&lt;br /&gt;
* CP/M Plus system disks for making the system bootable.&lt;br /&gt;
* Optionally a [[SYMBiFACE II]] compatible RTC.&lt;br /&gt;
&lt;br /&gt;
==Restrictions==&lt;br /&gt;
* CP/M 2.2 or lower is not supported.&lt;br /&gt;
* 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.&lt;br /&gt;
* Only the master IDE device is accessible by HDCPM.&lt;br /&gt;
* The maximum number of hard disk partition/images supported is four.&lt;br /&gt;
* Only primary partitions are supported.&lt;br /&gt;
* If you want to use CP/M disk images then they must be stored in a FAT16 or FAT32 formatted disk or partition.&lt;br /&gt;
* If the hard disk is partitioned then the CP/M disk images must be placed in the first partition of the disk.&lt;br /&gt;
* The CP/M disk images must be placed in the root directory of the FAT file system.&lt;br /&gt;
* The CP/M disk images must NOT be fragmented and must have the correct size.&lt;br /&gt;
* 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. &lt;br /&gt;
* Only storage devices with 512 bytes sector size are supported.&lt;br /&gt;
* Only storage devices with LBA addressing are supported.&lt;br /&gt;
* Date stamps of CP/M disk image files are not maintained.&lt;br /&gt;
* 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 letters for your IDE media then the corresponding HD20 partitions will be unavailable under CP/M.&lt;br /&gt;
&lt;br /&gt;
==How it works==&lt;br /&gt;
===Using the ROM===&lt;br /&gt;
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:&lt;br /&gt;
|HDCPM (no TIME function support) or |HDCPMT (TIME function support)&amp;lt;br /&amp;gt;&lt;br /&gt;
Alternatively it can be started by holding down the Tab key (no TIME function support) or Shift+Tab (TIME function support), during power-up.&amp;lt;br /&amp;gt;&lt;br /&gt;
===Using the binary===&lt;br /&gt;
HDCPM can be started by running the HDCPM.BIN file from floppy drive or mass storage.&amp;lt;br /&amp;gt;&lt;br /&gt;
===Functions===&lt;br /&gt;
HDCPM will then execute the following functions:&amp;lt;br /&amp;gt;&lt;br /&gt;
* Search for a compatible mass storage interface.&lt;br /&gt;
* Initialize the mass storage interface if needed.&lt;br /&gt;
* Move the boot loader and the CP/M patcher to RAM.&lt;br /&gt;
* Mount 1 to 4 CP/M image files and/or partitions and perform fragmentation and size test.&lt;br /&gt;
* 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.&lt;br /&gt;
* Read the .EMS file from the reserved track and store it in RAM just as the normal CP/M Plus boot loader does.&lt;br /&gt;
* 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.&lt;br /&gt;
* Patch the SCB in order to change the startup/default drive.&lt;br /&gt;
* 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 memory expansion]] or [[Dobbertin Memory Expansion]] driver is present.&lt;br /&gt;
* Move the ALV of the Dk'tronics RAM disk if [[Z-System]] is detected.&lt;br /&gt;
* Patch the CP/M console with the desired colour scheme. &lt;br /&gt;
* Patch the system message.&lt;br /&gt;
* Do a normal CP/M cold start.&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==CP/M Plus disk image files==&lt;br /&gt;
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 [https://hexed.it/ hexed.it] or any hex editor capable of creating binary files filled with a specific pattern.&amp;lt;br /&amp;gt;&lt;br /&gt;
In case of hexed.it select 'New file' fill in 'Size of the new file = 8519680' and 'Fill Pattern = 0xE5' and press apply. Save the file as CPMDSK01.IMG&amp;lt;br /&amp;gt;&lt;br /&gt;
If you have a FAT capable DOS installed in your AMSTRAD you can use the provided MAKEIMG.BAS utility to create your image file. Keep in mind that it takes more than 1.5 hour for a 8MB image file to be created that way.&amp;lt;br /&amp;gt;&lt;br /&gt;
CP/M disk image files can be accessed by a modern computer with [http://www.moria.de/~michael/cpmtools/ cpmtools]. Use the command |HDDEF to see the record you must insert in the diskdefs file.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The HDCPM record for diskdefs is:&lt;br /&gt;
&lt;br /&gt;
       diskdef hdcpm&lt;br /&gt;
          seclen 512&lt;br /&gt;
          tracks 65&lt;br /&gt;
          sectrk 256&lt;br /&gt;
          blocksize 8192&lt;br /&gt;
          maxdir 1024&lt;br /&gt;
          skew 0&lt;br /&gt;
          boottrk 1&lt;br /&gt;
          os 3&lt;br /&gt;
       end&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
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. [https://www.cpcwiki.eu/index.php/Albireo Albireo] incorporates a file management IC that performs FAT file system operations and handles fragmented files properly. In such case fragmented image files is not a problem. HDCPM will never fragment a CP/M image file.&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Hdcpm-boot-m4.png|thumb|HDCPM binary booting on M4 Board]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==CP/M Plus disk/partitions==&lt;br /&gt;
You can also create one or more partitions in order to format them to [http://www.seasip.info/Cpm/format31.html CP/M-80] 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.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM examines the hard disk's MBR upon start and finds the partition information. Then it finds the LBA of the first sector of each partition and passes it to the CP/M hard disk driver. The CP/M hard disk driver doesn't know anything about partitions. It accesses the partition as if it was a real hard disk.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:hdcpm-ui-boot.png|thumb|HDCPM ROM booting on uIDE-16]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
===Using the ROM===&lt;br /&gt;
* Install the HDCPM ROM in a free ROM slot of your ROM box.&lt;br /&gt;
* Plug in your [[SYMBiFACE II]] compatible IDE interface, [[uIDE 16]], [[M4 Board]] or [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] and attach the proper mass storage device.&lt;br /&gt;
* 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 shown inside the parentheses:&amp;lt;br /&amp;gt;&lt;br /&gt;
** (S2): [[SYMBiFACE II]] compatible interface&lt;br /&gt;
** (uI): [[uIDE 16]] interface&lt;br /&gt;
** (M4): [[M4 Board]]&lt;br /&gt;
** (US): [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II]&lt;br /&gt;
** (S3): [http://www.tmtlogic.com/ Symbiface III]&lt;br /&gt;
** (AL): [https://www.cpcwiki.eu/index.php/Albireo Albireo]&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:hdcpm-s2.png|thumb|HDCPM ROM - SYMBiFACE II]]&lt;br /&gt;
|[[File:hdcpm-ui.png|thumb|HDCPM ROM - uIDE-16]]&lt;br /&gt;
|[[File:hdcpm-m4.png|thumb|HDCPM ROM - M4 Board]]&lt;br /&gt;
|[[File:hdcpm-us.png|thumb|HDCPM ROM - USIfAC II]]&lt;br /&gt;
|[[File:hdcpm-s3.png|thumb|HDCPM ROM - Symbiface III]]&lt;br /&gt;
|}&lt;br /&gt;
In case a RTC is detected you will also see the RTC initialization message and the current date and time: ''RTC found: 2021/01/01 12:01:01''&lt;br /&gt;
* Use your original CP/M Plus system disk set to Boot CP/M Plus.&lt;br /&gt;
* 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.&lt;br /&gt;
* Reset your AMSTRAD and boot CP/M from the hard disk with the command |HDCPM. The Boot loader will check your image file(s) against fragmentation and correct size and boot the system to the CP/M command prompt. If the first image file is fragmented or has the wrong length the system will not boot. All other image files will be ignored if found to be fragmented or have the wrong length.&lt;br /&gt;
* In case you don't use CP/M image files just boot the system with |HDCPM or |HDCPMT&lt;br /&gt;
* Copy the files from your CP/M system floppy disks to the first hard disk.&lt;br /&gt;
* Copy any other needed application etc. to your CP/M hard disk(s).&lt;br /&gt;
* You are ready to go.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Using the binary===&lt;br /&gt;
* Plug in your [[SYMBiFACE II]] compatible IDE interface, [[uIDE 16]], [[M4 Board]] or [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] and attach the proper mass storage device.&lt;br /&gt;
* Use your original CP/M Plus system disk set to Boot CP/M Plus.&lt;br /&gt;
* 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.&lt;br /&gt;
* 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.&lt;br /&gt;
* You are ready to go.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==ROM commands==&lt;br /&gt;
[[File:hdcpm-us-boot.png|thumb|HDCPM ROM booting on USIfAC II]]&lt;br /&gt;
* |HDCPM mounts the hard disks and boots CP/M Plus. If [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] is used enable the USB disk with the |USB command first.&lt;br /&gt;
* |HDCPMT works like |HDCPM but also utilizes the RTC.&lt;br /&gt;
* |HDDPB shows the Disk Parameter Block.&lt;br /&gt;
* |HDDEF shows the diskdefs entry for CP/M tools and the file system size.&lt;br /&gt;
* |DATE displays the current date.&lt;br /&gt;
* |TIME displays the current time. If [[M4 Board]] is used |DATE and |TIME will be redirected to M4 |TIME.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==The HDCPM binary file==&lt;br /&gt;
* If [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] is used, use your PC to copy HDCPM.BIN to your USB flash disk. Then insert it to your [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] power up your Amstrad and enable the USB disk with the |USB command.&lt;br /&gt;
* Execute the file from the floppy disk or from your mass storage device with ''RUN&amp;quot;HDCPM&amp;quot;''. 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.&lt;br /&gt;
*  [[M4 Board]] and [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ 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 [https://www.cpcwiki.eu/forum/applications/cubeios-fat16fat32-rom-for-the-cpc's-with-xmass/ CubeMDOS] or [[UniDOS]], installed.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==The MAKEIMG.BAS and MAKEIMG.EXE utilities==&lt;br /&gt;
===MAKEIMG.BAS===&lt;br /&gt;
Although this utility should not be your first option, you can use it to make a new empty CP/M disk image file.&amp;lt;br /&amp;gt;&lt;br /&gt;
In case you decide to use it make sure you have a FAT aware DOS installed in your system. MAKEIMG makes use of the firmware calls CAS_OUT_OPEN, CAS_OUT_CLOSE and CAS_OUT_CHAR so your DOS must support them.&amp;lt;br /&amp;gt;&lt;br /&gt;
Copy the files MAKEIMG.BAS and MAKEIMG.BIN to the root directory of your FAT formatted hard disk and make it your current drive. Run the utility with ''RUN&amp;quot;MAKEIMG&amp;quot;'' and don't hold your breath!&amp;lt;br /&amp;gt;&lt;br /&gt;
Making an image file this way takes more than 1.5 hour for an 8MB file so literally... don't hold your breath.&amp;lt;br /&amp;gt;&lt;br /&gt;
Here is a small tutorial on how to setup and use a CP/M image file: https://youtu.be/GMWsRzNhQTM&amp;lt;br /&amp;gt;&lt;br /&gt;
===MAKEIMG.EXE===&lt;br /&gt;
This utility is a [[SymbOS]] application.&amp;lt;br /&amp;gt;&lt;br /&gt;
Use this utility to create your CP/M hard disk images from within [[SymbOS]]. 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.&amp;lt;br /&amp;gt;&lt;br /&gt;
MAKEIMG.EXE has been developed with [http://www.symbos.de/quigs.htm Quigs] for [[SymbOS]].&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Hdcpm-makeimg-sym1.png|thumb|MAKEIMG.EXE in action]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==The HDMGR.COM utility==&lt;br /&gt;
This is the Hard Disk Manager utility.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can use this utility to get information about your hard disk geometry, disk image files, partitions and boot sector. You have to use this utility to format a hard disk, disk image file or partition to CP/M format or manipulate the boot sector of the hard disk and/or transfer an .EMS system file to the reserved track of the hard disk.&amp;lt;br /&amp;gt;&lt;br /&gt;
The boot sector contains information about the CP/M disk drive letters, start-up drive and console colour scheme. All those properties can be changed with HDMGR.COM.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR will perform a fragmentation test of the discovered CP/M hard disk image files uppon execution.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
The HDMGR.COM utility is self explanatory. Just run it from the CP/M command prompt.&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Hdcpm-hdmgr-m.png|thumb|HDMGR main menu]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-1.png|thumb|HDMGR Hardware information]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-2.png|thumb|HDMGR Partition information]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-3.png|thumb|HDMGR CP/M disk image information]]&lt;br /&gt;
|}&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Hdcpm-hdmgr-4.png|thumb|HDMGR Boot sector information]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-5.png|thumb|HDMGR Log disk]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-7.png|thumb|HDMGR Manage boot sector]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-8.png|thumb|HDMGR Transfer CP/M to disk]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==The RTC.COM utility==&lt;br /&gt;
You can make use of the RTC.COM utility in order to keep CP/M date and time updated.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can synchronize the date and time of CP/M Plus with the RTC by running ''RTC -G'' manually or via your PROFILE.SUB.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can also set your RTC to the current CP/M date and time by running ''RTC -S'' (not for M4 board)&amp;lt;br /&amp;gt;&lt;br /&gt;
Currently RTC.COM works with the RTC found in Symbiface II, Symbiface III and M4 board (read only).&amp;lt;br /&amp;gt;&lt;br /&gt;
DATE.COM, DIR.COM and SHOW.COM commands, patched for Year 2000 compatibility can be downloaded from the [http://www.cpm.z80.de/binary.html CP/M source archive - Digital Research Binary files section] .&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Error messages==&lt;br /&gt;
===Hard disk errors===&lt;br /&gt;
* ''*** No mass storage found ***''&lt;br /&gt;
	No compatible mass storage interface can be found.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: DISK I/O''&lt;br /&gt;
I/O error occurred during the last read/write operation.&lt;br /&gt;
	Your hard disk might be defect or the USB disk is not enabled.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: INVALID BOOT SECTOR''&lt;br /&gt;
	No FAT or CP/M boot sector was found in a not partitioned hard disk.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: INVALID FILE SYSTEM''&lt;br /&gt;
	The first partition in a partitioned hard disk is not a FAT or CP/M-80&lt;br /&gt;
	one.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: INVALID SECTOR SIZE''&lt;br /&gt;
	The hard disk used has a sector size not equal to 512 bytes.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: CPMDSK01.IMG NOT FOUND''&lt;br /&gt;
	The CP/M image file named CPMDSK01.IMG can't be found in the FAT&lt;br /&gt;
	formatted hard disk or partition. &lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: CP/M SYSTEM FILE NOT FOUND''&lt;br /&gt;
	The .EMS CP/M system file can't be found in the system track of your&lt;br /&gt;
	CP/M partition or image file.&lt;br /&gt;
	&lt;br /&gt;
*  ''ERROR: CPMDSK01.IMG IS FRAGMENTED''&lt;br /&gt;
	The first CP/M image file is fragmented, the system won't mount it.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: CPMDSK01.IMG HAS WRONG LENGTH''&lt;br /&gt;
	The first CP/M image file has wrong length, the system won't mount it.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: CPMDSK01.IMG IS NOT FORMATTED''&lt;br /&gt;
	The first CP/M image file is not formatted to CP/M-80 format, the&lt;br /&gt;
	system won't mount it. Use the HDMGR.COM utility to format it.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: INCOMPATIBLE EMS FILE''&lt;br /&gt;
	The .EMS system file that was loaded from the system track is not&lt;br /&gt;
	compatible with HDCPM.&lt;br /&gt;
&lt;br /&gt;
===RTC errors===&lt;br /&gt;
* ''*** Battery depleted ***''&lt;br /&gt;
	The RTC battery is depleted. The RTC driver will continue to operate&lt;br /&gt;
	normally but the readings are not reliable. Replace the RTC battery.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Release info &amp;amp; download==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Version !! Changes !! Download&lt;br /&gt;
|-&lt;br /&gt;
| v1.00 December 2021 || Initial release || [[Media:hdcpm100.dsk|hdcpm100.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.01 January 2022 || HDCPM.ROM, HDMGR.COM: code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: (bug fix) fragmented file detection was not working properly unless the file was CPMDSK01.IMG&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: (bug fix) unformatted image file detection was not working properly. New error message added.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) CP/M drive table wasn't patched properly.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) initialization of floppy drive(s) was corrupted due to misplaced code.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: added .EMS file compatibility check. New error message added.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: added support for Dobbertin RAM disk driver.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: added compatibility with Dobbertin HD20 Harddisc&amp;lt;br /&amp;gt;&lt;br /&gt;
MAKEIMG.EXE: added utility for creating an image file from within SYMBOS.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&lt;br /&gt;
|| [[Media:hdcpm101.dsk|hdcpm101.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.02 March 2022 || HDCPM.ROM, HDMGR.COM: added support for M4 board.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: added support for uIDE-16 interface.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) the ROM was initialized even if no compatible interface was found.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: error message change.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: option &amp;quot;F&amp;quot; has been removed. HDCPM will always do a disk fragmentation test during boot.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: power up message changed in order to provide information about the type of the detected interface.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: two bytes of RAM will be reserved by the ROM for storing the interface type and M4 ROM number.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&lt;br /&gt;
|| [[Media:hdcpm102.dsk|hdcpm102.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.03 April 2022 || HDCPM.ROM, HDMGR.COM: added support for USIfAC II.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) uIDE-16 detection was broken.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&lt;br /&gt;
|| [[Media:hdcpm103.dsk|hdcpm103.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.04 June 2022|| HDCPM.ROM: code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.BIN: added executable binary file version of HDCPM.&lt;br /&gt;
|| [[Media:hdcpm104.dsk|hdcpm104.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.05 July 2022 || HDCPM.ROM, HDCPM.BIN, HDMGR.COM: added support for Symbiface III.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDCPM.BIN:  code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR.COM: Hardware info added for USIfAC II&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR.COM: (bug fix) the 'Select boot file' menu was garbled if there were 8 or more .EMS files present.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&lt;br /&gt;
|| [[Media:hdcpm105.dsk|hdcpm105.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.06 January 2023 || HDCPM.ROM, HDCPM.BIN, HDMGR.COM: added support for Albireo.&amp;lt;br /&amp;gt;&lt;br /&gt;
RTC.COM: added support for M4 Board (r/o) and Symbiface 3.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDCPM.BIN: (bug fix) CPC was freezing after mounting the CP/M disk(s) with incompatible .EMS file.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR.COM: (bug fix) the Stack was overflowed in some rare cases.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&amp;lt;br /&amp;gt;&lt;br /&gt;
|| [[Media:hdcpm106.dsk|hdcpm106.dsk]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Other downloads==&lt;br /&gt;
*[[Media:CPMDSK01&amp;amp;02.zip|CP/M disk images]] - CPMDSK01.IMG is bootable and contains all the files of the 3 CP/M Plus system disks and year 2000 compliant binaries downloaded from the [http://www.cpm.z80.de/binary.html Digital Research Binary Files]. CPMDSK02.IMG is empty and can also be used as a template.&amp;lt;br /&amp;gt;&lt;br /&gt;
*[[Media:Z3Plus.part1.rar|ZPM3+ZCCP disk image part 1]] , [[Media:Z3Plus.part2.rar|ZPM3+ZCCP disk image part 2]] - The Amstrad BDOS and CCP have been replaced with their counterparts [https://github.com/wwarthen/CPU280/tree/master/ZPM3/zpm3.txt ZPM3] and [https://github.com/wwarthen/CPU280/tree/master/ZCCP/zccp.txt ZCCP] written by Simeon Cran. It is [https://www.cpcwiki.eu/index.php/Z-System Z-system, Z3Plus] compatible and contains the Z3Plus system files, all the files of the 3 CP/M Plus system disks, year 2000 compliant binaries and also contains some useful tools, help files and manuals.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Videos==&lt;br /&gt;
* [https://youtu.be/GMWsRzNhQTM How to create and prepare a CP/M image file in a FAT formatted hard disk]&lt;br /&gt;
* [https://youtu.be/nxow6Y5O4Dc Hard disk utilization and dual boot]&lt;br /&gt;
* [https://youtu.be/em7dHOdaylg How to create a CP/M image file under SYMBOS]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
[[category:Expansion ROM]] [[category:Applications]] [[category:CP/M]]&lt;/div&gt;</summary>
		<author><name>D kef</name></author>	</entry>

	<entry>
		<id>https://oldwiki.cpcwiki.eu/index.php?title=File:Z3Plus.part2.rar&amp;diff=109899</id>
		<title>File:Z3Plus.part2.rar</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.cpcwiki.eu/index.php?title=File:Z3Plus.part2.rar&amp;diff=109899"/>
				<updated>2023-01-28T18:35:25Z</updated>
		
		<summary type="html">&lt;p&gt;D kef: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>D kef</name></author>	</entry>

	<entry>
		<id>https://oldwiki.cpcwiki.eu/index.php?title=File:Z3Plus.part1.rar&amp;diff=109898</id>
		<title>File:Z3Plus.part1.rar</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.cpcwiki.eu/index.php?title=File:Z3Plus.part1.rar&amp;diff=109898"/>
				<updated>2023-01-28T18:34:50Z</updated>
		
		<summary type="html">&lt;p&gt;D kef: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>D kef</name></author>	</entry>

	<entry>
		<id>https://oldwiki.cpcwiki.eu/index.php?title=HDCPM&amp;diff=109897</id>
		<title>HDCPM</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.cpcwiki.eu/index.php?title=HDCPM&amp;diff=109897"/>
				<updated>2023-01-28T18:34:20Z</updated>
		
		<summary type="html">&lt;p&gt;D kef: /* Other downloads */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;HDCPM is a Hard Disk boot loader for [[CP/M]] plus developed by d_kef&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can read more about the development of the application here:&amp;lt;br /&amp;gt;&lt;br /&gt;
https://www.cpcwiki.eu/forum/applications/hdcpm-boot-and-run-cpm-plus-from-hard-disk/&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:hdcpm.gif|HDCPM booting CP/M Plus]]&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It comes in the form of:&lt;br /&gt;
* a standard background ROM that can be installed in any available ROM position.&lt;br /&gt;
* a standard binary file that can be loaded from floppy or hard drive.&lt;br /&gt;
&lt;br /&gt;
 	&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following configurations are possible with one hard disk:&lt;br /&gt;
&lt;br /&gt;
* One not partitioned, CP/M formatted hard disk. The whole hard disk is used by CP/M.&lt;br /&gt;
* One to four CP/M formatted partitions. Every partition is accessed as a separate hard disk by CP/M.&lt;br /&gt;
* 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.&lt;br /&gt;
* 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.&lt;br /&gt;
* For interfaces that use SD card or USB flash drive as a mass storage device ([[M4 Board]], [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II], [http://www.tmtlogic.com/ Symbiface III] or [https://www.cpcwiki.eu/index.php/Albireo Albireo]) the only supported configuration is one to four CP/M disk image files in the root directory of the FAT file system.&lt;br /&gt;
	&lt;br /&gt;
Currently only the master IDE device can be accessed by HDCPM. The slave device is available to be used by your favourite DOS.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
HDCPM can also utilize the RTC found in the [[SYMBiFACE II]] in order to implement CP/M Plus BIOS function 26: TIME.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
HDCPM is compatible and can be used together with the [[Dobbertin Harddisc]].&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
HDCPM distribution disk contains the following files:&lt;br /&gt;
* HDCPM.ROM the ROM itself&lt;br /&gt;
* HDCPM.BIN the executable binary file&lt;br /&gt;
* HDMGR.COM Hard Disk Manager utility&lt;br /&gt;
* RTC.COM RTC synchronization utility&lt;br /&gt;
* MAKEIMG.BAS CP/M image file creation utility&lt;br /&gt;
* MAKEIMG.BIN CP/M image file creation binary&lt;br /&gt;
* MAKEIMG.EXE CP/M image file creation utility for [[SymbOS]]&lt;br /&gt;
* HDCPM.DOC the User guide&lt;br /&gt;
&lt;br /&gt;
HDCPM is free software. It can be used and distributed with no restrictions.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Prerequisites==&lt;br /&gt;
* Amstrad CPC/Plus computer capable of running CP/M Plus.&lt;br /&gt;
* ROM box or other ROM expansion hardware if using the ROM.&lt;br /&gt;
* Optionaly a FAT aware DOS like M4 ROM, USIfAC ROM, [[UniDOS]], [https://www.cpcwiki.eu/forum/applications/cubeios-fat16fat32-rom-for-the-cpc's-with-xmass/ CubeMDOS] etc if using the binary.&lt;br /&gt;
* One of the following mass storage interfaces:&lt;br /&gt;
** [[SYMBiFACE II]]&lt;br /&gt;
** [[X-Mass]]&lt;br /&gt;
** [[uIDE 16]] (base address = &amp;amp;FEF0)&lt;br /&gt;
** [[M4 Board]]&lt;br /&gt;
** [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II]&lt;br /&gt;
** [http://www.tmtlogic.com/ Symbiface III]&lt;br /&gt;
** [https://www.cpcwiki.eu/index.php/Albireo Albireo] (SD card only)&lt;br /&gt;
* Compatible storage device with enough free space to accommodate the desirable CP/M hard disk configuration.&lt;br /&gt;
* Floppy disk drive for initialization of the file system.&lt;br /&gt;
* CP/M Plus system disks for making the system bootable.&lt;br /&gt;
* Optionally a [[SYMBiFACE II]] compatible RTC.&lt;br /&gt;
&lt;br /&gt;
==Restrictions==&lt;br /&gt;
* CP/M 2.2 or lower is not supported.&lt;br /&gt;
* 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.&lt;br /&gt;
* Only the master IDE device is accessible by HDCPM.&lt;br /&gt;
* The maximum number of hard disk partition/images supported is four.&lt;br /&gt;
* Only primary partitions are supported.&lt;br /&gt;
* If you want to use CP/M disk images then they must be stored in a FAT16 or FAT32 formatted disk or partition.&lt;br /&gt;
* If the hard disk is partitioned then the CP/M disk images must be placed in the first partition of the disk.&lt;br /&gt;
* The CP/M disk images must be placed in the root directory of the FAT file system.&lt;br /&gt;
* The CP/M disk images must NOT be fragmented and must have the correct size.&lt;br /&gt;
* 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. &lt;br /&gt;
* Only storage devices with 512 bytes sector size are supported.&lt;br /&gt;
* Only storage devices with LBA addressing are supported.&lt;br /&gt;
* Date stamps of CP/M disk image files are not maintained.&lt;br /&gt;
* 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 letters for your IDE media then the corresponding HD20 partitions will be unavailable under CP/M.&lt;br /&gt;
&lt;br /&gt;
==How it works==&lt;br /&gt;
===Using the ROM===&lt;br /&gt;
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:&lt;br /&gt;
|HDCPM (no TIME function support) or |HDCPMT (TIME function support)&amp;lt;br /&amp;gt;&lt;br /&gt;
Alternatively it can be started by holding down the Tab key (no TIME function support) or Shift+Tab (TIME function support), during power-up.&amp;lt;br /&amp;gt;&lt;br /&gt;
===Using the binary===&lt;br /&gt;
HDCPM can be started by running the HDCPM.BIN file from floppy drive or mass storage.&amp;lt;br /&amp;gt;&lt;br /&gt;
===Functions===&lt;br /&gt;
HDCPM will then execute the following functions:&amp;lt;br /&amp;gt;&lt;br /&gt;
* Search for a compatible mass storage interface.&lt;br /&gt;
* Initialize the mass storage interface if needed.&lt;br /&gt;
* Move the boot loader and the CP/M patcher to RAM.&lt;br /&gt;
* Mount 1 to 4 CP/M image files and/or partitions and perform fragmentation and size test.&lt;br /&gt;
* 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.&lt;br /&gt;
* Read the .EMS file from the reserved track and store it in RAM just as the normal CP/M Plus boot loader does.&lt;br /&gt;
* 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.&lt;br /&gt;
* Patch the SCB in order to change the startup/default drive.&lt;br /&gt;
* 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 memory expansion]] or [[Dobbertin Memory Expansion]] driver is present.&lt;br /&gt;
* Move the ALV of the Dk'tronics RAM disk if [[Z-System]] is detected.&lt;br /&gt;
* Patch the CP/M console with the desired colour scheme. &lt;br /&gt;
* Patch the system message.&lt;br /&gt;
* Do a normal CP/M cold start.&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==CP/M Plus disk image files==&lt;br /&gt;
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 [https://hexed.it/ hexed.it] or any hex editor capable of creating binary files filled with a specific pattern.&amp;lt;br /&amp;gt;&lt;br /&gt;
In case of hexed.it select 'New file' fill in 'Size of the new file = 8519680' and 'Fill Pattern = 0xE5' and press apply. Save the file as CPMDSK01.IMG&amp;lt;br /&amp;gt;&lt;br /&gt;
If you have a FAT capable DOS installed in your AMSTRAD you can use the provided MAKEIMG.BAS utility to create your image file. Keep in mind that it takes more than 1.5 hour for a 8MB image file to be created that way.&amp;lt;br /&amp;gt;&lt;br /&gt;
CP/M disk image files can be accessed by a modern computer with [http://www.moria.de/~michael/cpmtools/ cpmtools]. Use the command |HDDEF to see the record you must insert in the diskdefs file.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The HDCPM record for diskdefs is:&lt;br /&gt;
&lt;br /&gt;
       diskdef hdcpm&lt;br /&gt;
          seclen 512&lt;br /&gt;
          tracks 65&lt;br /&gt;
          sectrk 256&lt;br /&gt;
          blocksize 8192&lt;br /&gt;
          maxdir 1024&lt;br /&gt;
          skew 0&lt;br /&gt;
          boottrk 1&lt;br /&gt;
          os 3&lt;br /&gt;
       end&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
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. [https://www.cpcwiki.eu/index.php/Albireo Albireo] incorporates a file management IC that performs FAT file system operations and handles fragmented files properly. In such case fragmented image files is not a problem. HDCPM will never fragment a CP/M image file.&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Hdcpm-boot-m4.png|thumb|HDCPM binary booting on M4 Board]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==CP/M Plus disk/partitions==&lt;br /&gt;
You can also create one or more partitions in order to format them to [http://www.seasip.info/Cpm/format31.html CP/M-80] 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.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM examines the hard disk's MBR upon start and finds the partition information. Then it finds the LBA of the first sector of each partition and passes it to the CP/M hard disk driver. The CP/M hard disk driver doesn't know anything about partitions. It accesses the partition as if it was a real hard disk.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:hdcpm-ui-boot.png|thumb|HDCPM ROM booting on uIDE-16]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
===Using the ROM===&lt;br /&gt;
* Install the HDCPM ROM in a free ROM slot of your ROM box.&lt;br /&gt;
* Plug in your [[SYMBiFACE II]] compatible IDE interface, [[uIDE 16]], [[M4 Board]] or [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] and attach the proper mass storage device.&lt;br /&gt;
* 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 shown inside the parentheses:&amp;lt;br /&amp;gt;&lt;br /&gt;
** (S2): [[SYMBiFACE II]] compatible interface&lt;br /&gt;
** (uI): [[uIDE 16]] interface&lt;br /&gt;
** (M4): [[M4 Board]]&lt;br /&gt;
** (US): [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II]&lt;br /&gt;
** (S3): [http://www.tmtlogic.com/ Symbiface III]&lt;br /&gt;
** (AL): [https://www.cpcwiki.eu/index.php/Albireo Albireo]&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:hdcpm-s2.png|thumb|HDCPM ROM - SYMBiFACE II]]&lt;br /&gt;
|[[File:hdcpm-ui.png|thumb|HDCPM ROM - uIDE-16]]&lt;br /&gt;
|[[File:hdcpm-m4.png|thumb|HDCPM ROM - M4 Board]]&lt;br /&gt;
|[[File:hdcpm-us.png|thumb|HDCPM ROM - USIfAC II]]&lt;br /&gt;
|[[File:hdcpm-s3.png|thumb|HDCPM ROM - Symbiface III]]&lt;br /&gt;
|}&lt;br /&gt;
In case a RTC is detected you will also see the RTC initialization message and the current date and time: ''RTC found: 2021/01/01 12:01:01''&lt;br /&gt;
* Use your original CP/M Plus system disk set to Boot CP/M Plus.&lt;br /&gt;
* 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.&lt;br /&gt;
* Reset your AMSTRAD and boot CP/M from the hard disk with the command |HDCPM. The Boot loader will check your image file(s) against fragmentation and correct size and boot the system to the CP/M command prompt. If the first image file is fragmented or has the wrong length the system will not boot. All other image files will be ignored if found to be fragmented or have the wrong length.&lt;br /&gt;
* In case you don't use CP/M image files just boot the system with |HDCPM or |HDCPMT&lt;br /&gt;
* Copy the files from your CP/M system floppy disks to the first hard disk.&lt;br /&gt;
* Copy any other needed application etc. to your CP/M hard disk(s).&lt;br /&gt;
* You are ready to go.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Using the binary===&lt;br /&gt;
* Plug in your [[SYMBiFACE II]] compatible IDE interface, [[uIDE 16]], [[M4 Board]] or [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] and attach the proper mass storage device.&lt;br /&gt;
* Use your original CP/M Plus system disk set to Boot CP/M Plus.&lt;br /&gt;
* 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.&lt;br /&gt;
* 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.&lt;br /&gt;
* You are ready to go.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==ROM commands==&lt;br /&gt;
[[File:hdcpm-us-boot.png|thumb|HDCPM ROM booting on USIfAC II]]&lt;br /&gt;
* |HDCPM mounts the hard disks and boots CP/M Plus. If [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] is used enable the USB disk with the |USB command first.&lt;br /&gt;
* |HDCPMT works like |HDCPM but also utilizes the RTC.&lt;br /&gt;
* |HDDPB shows the Disk Parameter Block.&lt;br /&gt;
* |HDDEF shows the diskdefs entry for CP/M tools and the file system size.&lt;br /&gt;
* |DATE displays the current date.&lt;br /&gt;
* |TIME displays the current time. If [[M4 Board]] is used |DATE and |TIME will be redirected to M4 |TIME.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==The HDCPM binary file==&lt;br /&gt;
* If [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] is used, use your PC to copy HDCPM.BIN to your USB flash disk. Then insert it to your [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] power up your Amstrad and enable the USB disk with the |USB command.&lt;br /&gt;
* Execute the file from the floppy disk or from your mass storage device with ''RUN&amp;quot;HDCPM&amp;quot;''. 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.&lt;br /&gt;
*  [[M4 Board]] and [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ 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 [https://www.cpcwiki.eu/forum/applications/cubeios-fat16fat32-rom-for-the-cpc's-with-xmass/ CubeMDOS] or [[UniDOS]], installed.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==The MAKEIMG.BAS and MAKEIMG.EXE utilities==&lt;br /&gt;
===MAKEIMG.BAS===&lt;br /&gt;
Although this utility should not be your first option, you can use it to make a new empty CP/M disk image file.&amp;lt;br /&amp;gt;&lt;br /&gt;
In case you decide to use it make sure you have a FAT aware DOS installed in your system. MAKEIMG makes use of the firmware calls CAS_OUT_OPEN, CAS_OUT_CLOSE and CAS_OUT_CHAR so your DOS must support them.&amp;lt;br /&amp;gt;&lt;br /&gt;
Copy the files MAKEIMG.BAS and MAKEIMG.BIN to the root directory of your FAT formatted hard disk and make it your current drive. Run the utility with ''RUN&amp;quot;MAKEIMG&amp;quot;'' and don't hold your breath!&amp;lt;br /&amp;gt;&lt;br /&gt;
Making an image file this way takes more than 1.5 hour for an 8MB file so literally... don't hold your breath.&amp;lt;br /&amp;gt;&lt;br /&gt;
Here is a small tutorial on how to setup and use a CP/M image file: https://youtu.be/GMWsRzNhQTM&amp;lt;br /&amp;gt;&lt;br /&gt;
===MAKEIMG.EXE===&lt;br /&gt;
This utility is a [[SymbOS]] application.&amp;lt;br /&amp;gt;&lt;br /&gt;
Use this utility to create your CP/M hard disk images from within [[SymbOS]]. 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.&amp;lt;br /&amp;gt;&lt;br /&gt;
MAKEIMG.EXE has been developed with [http://www.symbos.de/quigs.htm Quigs] for [[SymbOS]].&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Hdcpm-makeimg-sym1.png|thumb|MAKEIMG.EXE in action]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==The HDMGR.COM utility==&lt;br /&gt;
This is the Hard Disk Manager utility.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can use this utility to get information about your hard disk geometry, disk image files, partitions and boot sector. You have to use this utility to format a hard disk, disk image file or partition to CP/M format or manipulate the boot sector of the hard disk and/or transfer an .EMS system file to the reserved track of the hard disk.&amp;lt;br /&amp;gt;&lt;br /&gt;
The boot sector contains information about the CP/M disk drive letters, start-up drive and console colour scheme. All those properties can be changed with HDMGR.COM.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR will perform a fragmentation test of the discovered CP/M hard disk image files uppon execution.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
The HDMGR.COM utility is self explanatory. Just run it from the CP/M command prompt.&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Hdcpm-hdmgr-m.png|thumb|HDMGR main menu]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-1.png|thumb|HDMGR Hardware information]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-2.png|thumb|HDMGR Partition information]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-3.png|thumb|HDMGR CP/M disk image information]]&lt;br /&gt;
|}&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Hdcpm-hdmgr-4.png|thumb|HDMGR Boot sector information]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-5.png|thumb|HDMGR Log disk]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-7.png|thumb|HDMGR Manage boot sector]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-8.png|thumb|HDMGR Transfer CP/M to disk]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==The RTC.COM utility==&lt;br /&gt;
You can make use of the RTC.COM utility in order to keep CP/M date and time updated.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can synchronize the date and time of CP/M Plus with the RTC by running ''RTC -G'' manually or via your PROFILE.SUB.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can also set your RTC to the current CP/M date and time by running ''RTC -S'' (not for M4 board)&amp;lt;br /&amp;gt;&lt;br /&gt;
Currently RTC.COM works with the RTC found in Symbiface II, Symbiface III and M4 board (read only).&amp;lt;br /&amp;gt;&lt;br /&gt;
DATE.COM, DIR.COM and SHOW.COM commands, patched for Year 2000 compatibility can be downloaded from the [http://www.cpm.z80.de/binary.html CP/M source archive - Digital Research Binary files section] .&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Error messages==&lt;br /&gt;
===Hard disk errors===&lt;br /&gt;
* ''*** No mass storage found ***''&lt;br /&gt;
	No compatible mass storage interface can be found.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: DISK I/O''&lt;br /&gt;
I/O error occurred during the last read/write operation.&lt;br /&gt;
	Your hard disk might be defect or the USB disk is not enabled.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: INVALID BOOT SECTOR''&lt;br /&gt;
	No FAT or CP/M boot sector was found in a not partitioned hard disk.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: INVALID FILE SYSTEM''&lt;br /&gt;
	The first partition in a partitioned hard disk is not a FAT or CP/M-80&lt;br /&gt;
	one.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: INVALID SECTOR SIZE''&lt;br /&gt;
	The hard disk used has a sector size not equal to 512 bytes.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: CPMDSK01.IMG NOT FOUND''&lt;br /&gt;
	The CP/M image file named CPMDSK01.IMG can't be found in the FAT&lt;br /&gt;
	formatted hard disk or partition. &lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: CP/M SYSTEM FILE NOT FOUND''&lt;br /&gt;
	The .EMS CP/M system file can't be found in the system track of your&lt;br /&gt;
	CP/M partition or image file.&lt;br /&gt;
	&lt;br /&gt;
*  ''ERROR: CPMDSK01.IMG IS FRAGMENTED''&lt;br /&gt;
	The first CP/M image file is fragmented, the system won't mount it.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: CPMDSK01.IMG HAS WRONG LENGTH''&lt;br /&gt;
	The first CP/M image file has wrong length, the system won't mount it.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: CPMDSK01.IMG IS NOT FORMATTED''&lt;br /&gt;
	The first CP/M image file is not formatted to CP/M-80 format, the&lt;br /&gt;
	system won't mount it. Use the HDMGR.COM utility to format it.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: INCOMPATIBLE EMS FILE''&lt;br /&gt;
	The .EMS system file that was loaded from the system track is not&lt;br /&gt;
	compatible with HDCPM.&lt;br /&gt;
&lt;br /&gt;
===RTC errors===&lt;br /&gt;
* ''*** Battery depleted ***''&lt;br /&gt;
	The RTC battery is depleted. The RTC driver will continue to operate&lt;br /&gt;
	normally but the readings are not reliable. Replace the RTC battery.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Release info &amp;amp; download==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Version !! Changes !! Download&lt;br /&gt;
|-&lt;br /&gt;
| v1.00 December 2021 || Initial release || [[Media:hdcpm100.dsk|hdcpm100.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.01 January 2022 || HDCPM.ROM, HDMGR.COM: code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: (bug fix) fragmented file detection was not working properly unless the file was CPMDSK01.IMG&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: (bug fix) unformatted image file detection was not working properly. New error message added.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) CP/M drive table wasn't patched properly.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) initialization of floppy drive(s) was corrupted due to misplaced code.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: added .EMS file compatibility check. New error message added.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: added support for Dobbertin RAM disk driver.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: added compatibility with Dobbertin HD20 Harddisc&amp;lt;br /&amp;gt;&lt;br /&gt;
MAKEIMG.EXE: added utility for creating an image file from within SYMBOS.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&lt;br /&gt;
|| [[Media:hdcpm101.dsk|hdcpm101.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.02 March 2022 || HDCPM.ROM, HDMGR.COM: added support for M4 board.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: added support for uIDE-16 interface.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) the ROM was initialized even if no compatible interface was found.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: error message change.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: option &amp;quot;F&amp;quot; has been removed. HDCPM will always do a disk fragmentation test during boot.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: power up message changed in order to provide information about the type of the detected interface.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: two bytes of RAM will be reserved by the ROM for storing the interface type and M4 ROM number.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&lt;br /&gt;
|| [[Media:hdcpm102.dsk|hdcpm102.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.03 April 2022 || HDCPM.ROM, HDMGR.COM: added support for USIfAC II.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) uIDE-16 detection was broken.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&lt;br /&gt;
|| [[Media:hdcpm103.dsk|hdcpm103.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.04 June 2022|| HDCPM.ROM: code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.BIN: added executable binary file version of HDCPM.&lt;br /&gt;
|| [[Media:hdcpm104.dsk|hdcpm104.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.05 July 2022 || HDCPM.ROM, HDCPM.BIN, HDMGR.COM: added support for Symbiface III.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDCPM.BIN:  code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR.COM: Hardware info added for USIfAC II&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR.COM: (bug fix) the 'Select boot file' menu was garbled if there were 8 or more .EMS files present.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&lt;br /&gt;
|| [[Media:hdcpm105.dsk|hdcpm105.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.06 January 2023 || HDCPM.ROM, HDCPM.BIN, HDMGR.COM: added support for Albireo.&amp;lt;br /&amp;gt;&lt;br /&gt;
RTC.COM: added support for M4 Board (r/o) and Symbiface 3.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDCPM.BIN: (bug fix) CPC was freezing after mounting the CP/M disk(s) with incompatible .EMS file.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR.COM: (bug fix) the Stack was overflowed in some rare cases.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&amp;lt;br /&amp;gt;&lt;br /&gt;
|| [[Media:hdcpm106.dsk|hdcpm106.dsk]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Other downloads==&lt;br /&gt;
*[[Media:CPMDSK01&amp;amp;02.zip|CP/M disk images]] - CPMDSK01.IMG is bootable and contains all the files of the 3 CP/M Plus system disks and year 2000 compliant binaries downloaded from the [http://www.cpm.z80.de/binary.html Digital Research Binary Files]. CPMDSK02.IMG is empty and can also be used as a template.&amp;lt;br /&amp;gt;&lt;br /&gt;
*[[Media:Z3Plus.part1.rar|ZPM3+ZCCP disk image part 1]] , [[Media:Z3Plus.part2.rar|ZPM3+ZCCP disk image part 2]] - The Amstrad BDOS and CCP have been replaced with their counterparts [https://github.com/wwarthen/CPU280/tree/master/ZPM3/zpm3.txt ZPM3] and [https://github.com/wwarthen/CPU280/tree/master/ZCCP/zccp.txt ZCCP] written by Simeon Cran. It is [https://www.cpcwiki.eu/index.php/Z-System Z-system, Z3Plus] compatible and contains the Z3Plus system files, all the files of the 3 CP/M Plus system disks, year 2000 compliant binaries. It also contains some useful tools, help and manual files.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Videos==&lt;br /&gt;
* [https://youtu.be/GMWsRzNhQTM How to create and prepare a CP/M image file in a FAT formatted hard disk]&lt;br /&gt;
* [https://youtu.be/nxow6Y5O4Dc Hard disk utilization and dual boot]&lt;br /&gt;
* [https://youtu.be/em7dHOdaylg How to create a CP/M image file under SYMBOS]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
[[category:Expansion ROM]] [[category:Applications]] [[category:CP/M]]&lt;/div&gt;</summary>
		<author><name>D kef</name></author>	</entry>

	<entry>
		<id>https://oldwiki.cpcwiki.eu/index.php?title=HDCPM&amp;diff=109896</id>
		<title>HDCPM</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.cpcwiki.eu/index.php?title=HDCPM&amp;diff=109896"/>
				<updated>2023-01-28T18:08:52Z</updated>
		
		<summary type="html">&lt;p&gt;D kef: /* Other downloads */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;HDCPM is a Hard Disk boot loader for [[CP/M]] plus developed by d_kef&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can read more about the development of the application here:&amp;lt;br /&amp;gt;&lt;br /&gt;
https://www.cpcwiki.eu/forum/applications/hdcpm-boot-and-run-cpm-plus-from-hard-disk/&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:hdcpm.gif|HDCPM booting CP/M Plus]]&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It comes in the form of:&lt;br /&gt;
* a standard background ROM that can be installed in any available ROM position.&lt;br /&gt;
* a standard binary file that can be loaded from floppy or hard drive.&lt;br /&gt;
&lt;br /&gt;
 	&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following configurations are possible with one hard disk:&lt;br /&gt;
&lt;br /&gt;
* One not partitioned, CP/M formatted hard disk. The whole hard disk is used by CP/M.&lt;br /&gt;
* One to four CP/M formatted partitions. Every partition is accessed as a separate hard disk by CP/M.&lt;br /&gt;
* 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.&lt;br /&gt;
* 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.&lt;br /&gt;
* For interfaces that use SD card or USB flash drive as a mass storage device ([[M4 Board]], [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II], [http://www.tmtlogic.com/ Symbiface III] or [https://www.cpcwiki.eu/index.php/Albireo Albireo]) the only supported configuration is one to four CP/M disk image files in the root directory of the FAT file system.&lt;br /&gt;
	&lt;br /&gt;
Currently only the master IDE device can be accessed by HDCPM. The slave device is available to be used by your favourite DOS.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
HDCPM can also utilize the RTC found in the [[SYMBiFACE II]] in order to implement CP/M Plus BIOS function 26: TIME.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
HDCPM is compatible and can be used together with the [[Dobbertin Harddisc]].&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
HDCPM distribution disk contains the following files:&lt;br /&gt;
* HDCPM.ROM the ROM itself&lt;br /&gt;
* HDCPM.BIN the executable binary file&lt;br /&gt;
* HDMGR.COM Hard Disk Manager utility&lt;br /&gt;
* RTC.COM RTC synchronization utility&lt;br /&gt;
* MAKEIMG.BAS CP/M image file creation utility&lt;br /&gt;
* MAKEIMG.BIN CP/M image file creation binary&lt;br /&gt;
* MAKEIMG.EXE CP/M image file creation utility for [[SymbOS]]&lt;br /&gt;
* HDCPM.DOC the User guide&lt;br /&gt;
&lt;br /&gt;
HDCPM is free software. It can be used and distributed with no restrictions.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Prerequisites==&lt;br /&gt;
* Amstrad CPC/Plus computer capable of running CP/M Plus.&lt;br /&gt;
* ROM box or other ROM expansion hardware if using the ROM.&lt;br /&gt;
* Optionaly a FAT aware DOS like M4 ROM, USIfAC ROM, [[UniDOS]], [https://www.cpcwiki.eu/forum/applications/cubeios-fat16fat32-rom-for-the-cpc's-with-xmass/ CubeMDOS] etc if using the binary.&lt;br /&gt;
* One of the following mass storage interfaces:&lt;br /&gt;
** [[SYMBiFACE II]]&lt;br /&gt;
** [[X-Mass]]&lt;br /&gt;
** [[uIDE 16]] (base address = &amp;amp;FEF0)&lt;br /&gt;
** [[M4 Board]]&lt;br /&gt;
** [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II]&lt;br /&gt;
** [http://www.tmtlogic.com/ Symbiface III]&lt;br /&gt;
** [https://www.cpcwiki.eu/index.php/Albireo Albireo] (SD card only)&lt;br /&gt;
* Compatible storage device with enough free space to accommodate the desirable CP/M hard disk configuration.&lt;br /&gt;
* Floppy disk drive for initialization of the file system.&lt;br /&gt;
* CP/M Plus system disks for making the system bootable.&lt;br /&gt;
* Optionally a [[SYMBiFACE II]] compatible RTC.&lt;br /&gt;
&lt;br /&gt;
==Restrictions==&lt;br /&gt;
* CP/M 2.2 or lower is not supported.&lt;br /&gt;
* 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.&lt;br /&gt;
* Only the master IDE device is accessible by HDCPM.&lt;br /&gt;
* The maximum number of hard disk partition/images supported is four.&lt;br /&gt;
* Only primary partitions are supported.&lt;br /&gt;
* If you want to use CP/M disk images then they must be stored in a FAT16 or FAT32 formatted disk or partition.&lt;br /&gt;
* If the hard disk is partitioned then the CP/M disk images must be placed in the first partition of the disk.&lt;br /&gt;
* The CP/M disk images must be placed in the root directory of the FAT file system.&lt;br /&gt;
* The CP/M disk images must NOT be fragmented and must have the correct size.&lt;br /&gt;
* 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. &lt;br /&gt;
* Only storage devices with 512 bytes sector size are supported.&lt;br /&gt;
* Only storage devices with LBA addressing are supported.&lt;br /&gt;
* Date stamps of CP/M disk image files are not maintained.&lt;br /&gt;
* 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 letters for your IDE media then the corresponding HD20 partitions will be unavailable under CP/M.&lt;br /&gt;
&lt;br /&gt;
==How it works==&lt;br /&gt;
===Using the ROM===&lt;br /&gt;
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:&lt;br /&gt;
|HDCPM (no TIME function support) or |HDCPMT (TIME function support)&amp;lt;br /&amp;gt;&lt;br /&gt;
Alternatively it can be started by holding down the Tab key (no TIME function support) or Shift+Tab (TIME function support), during power-up.&amp;lt;br /&amp;gt;&lt;br /&gt;
===Using the binary===&lt;br /&gt;
HDCPM can be started by running the HDCPM.BIN file from floppy drive or mass storage.&amp;lt;br /&amp;gt;&lt;br /&gt;
===Functions===&lt;br /&gt;
HDCPM will then execute the following functions:&amp;lt;br /&amp;gt;&lt;br /&gt;
* Search for a compatible mass storage interface.&lt;br /&gt;
* Initialize the mass storage interface if needed.&lt;br /&gt;
* Move the boot loader and the CP/M patcher to RAM.&lt;br /&gt;
* Mount 1 to 4 CP/M image files and/or partitions and perform fragmentation and size test.&lt;br /&gt;
* 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.&lt;br /&gt;
* Read the .EMS file from the reserved track and store it in RAM just as the normal CP/M Plus boot loader does.&lt;br /&gt;
* 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.&lt;br /&gt;
* Patch the SCB in order to change the startup/default drive.&lt;br /&gt;
* 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 memory expansion]] or [[Dobbertin Memory Expansion]] driver is present.&lt;br /&gt;
* Move the ALV of the Dk'tronics RAM disk if [[Z-System]] is detected.&lt;br /&gt;
* Patch the CP/M console with the desired colour scheme. &lt;br /&gt;
* Patch the system message.&lt;br /&gt;
* Do a normal CP/M cold start.&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==CP/M Plus disk image files==&lt;br /&gt;
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 [https://hexed.it/ hexed.it] or any hex editor capable of creating binary files filled with a specific pattern.&amp;lt;br /&amp;gt;&lt;br /&gt;
In case of hexed.it select 'New file' fill in 'Size of the new file = 8519680' and 'Fill Pattern = 0xE5' and press apply. Save the file as CPMDSK01.IMG&amp;lt;br /&amp;gt;&lt;br /&gt;
If you have a FAT capable DOS installed in your AMSTRAD you can use the provided MAKEIMG.BAS utility to create your image file. Keep in mind that it takes more than 1.5 hour for a 8MB image file to be created that way.&amp;lt;br /&amp;gt;&lt;br /&gt;
CP/M disk image files can be accessed by a modern computer with [http://www.moria.de/~michael/cpmtools/ cpmtools]. Use the command |HDDEF to see the record you must insert in the diskdefs file.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The HDCPM record for diskdefs is:&lt;br /&gt;
&lt;br /&gt;
       diskdef hdcpm&lt;br /&gt;
          seclen 512&lt;br /&gt;
          tracks 65&lt;br /&gt;
          sectrk 256&lt;br /&gt;
          blocksize 8192&lt;br /&gt;
          maxdir 1024&lt;br /&gt;
          skew 0&lt;br /&gt;
          boottrk 1&lt;br /&gt;
          os 3&lt;br /&gt;
       end&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
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. [https://www.cpcwiki.eu/index.php/Albireo Albireo] incorporates a file management IC that performs FAT file system operations and handles fragmented files properly. In such case fragmented image files is not a problem. HDCPM will never fragment a CP/M image file.&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Hdcpm-boot-m4.png|thumb|HDCPM binary booting on M4 Board]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==CP/M Plus disk/partitions==&lt;br /&gt;
You can also create one or more partitions in order to format them to [http://www.seasip.info/Cpm/format31.html CP/M-80] 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.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM examines the hard disk's MBR upon start and finds the partition information. Then it finds the LBA of the first sector of each partition and passes it to the CP/M hard disk driver. The CP/M hard disk driver doesn't know anything about partitions. It accesses the partition as if it was a real hard disk.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:hdcpm-ui-boot.png|thumb|HDCPM ROM booting on uIDE-16]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
===Using the ROM===&lt;br /&gt;
* Install the HDCPM ROM in a free ROM slot of your ROM box.&lt;br /&gt;
* Plug in your [[SYMBiFACE II]] compatible IDE interface, [[uIDE 16]], [[M4 Board]] or [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] and attach the proper mass storage device.&lt;br /&gt;
* 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 shown inside the parentheses:&amp;lt;br /&amp;gt;&lt;br /&gt;
** (S2): [[SYMBiFACE II]] compatible interface&lt;br /&gt;
** (uI): [[uIDE 16]] interface&lt;br /&gt;
** (M4): [[M4 Board]]&lt;br /&gt;
** (US): [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II]&lt;br /&gt;
** (S3): [http://www.tmtlogic.com/ Symbiface III]&lt;br /&gt;
** (AL): [https://www.cpcwiki.eu/index.php/Albireo Albireo]&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:hdcpm-s2.png|thumb|HDCPM ROM - SYMBiFACE II]]&lt;br /&gt;
|[[File:hdcpm-ui.png|thumb|HDCPM ROM - uIDE-16]]&lt;br /&gt;
|[[File:hdcpm-m4.png|thumb|HDCPM ROM - M4 Board]]&lt;br /&gt;
|[[File:hdcpm-us.png|thumb|HDCPM ROM - USIfAC II]]&lt;br /&gt;
|[[File:hdcpm-s3.png|thumb|HDCPM ROM - Symbiface III]]&lt;br /&gt;
|}&lt;br /&gt;
In case a RTC is detected you will also see the RTC initialization message and the current date and time: ''RTC found: 2021/01/01 12:01:01''&lt;br /&gt;
* Use your original CP/M Plus system disk set to Boot CP/M Plus.&lt;br /&gt;
* 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.&lt;br /&gt;
* Reset your AMSTRAD and boot CP/M from the hard disk with the command |HDCPM. The Boot loader will check your image file(s) against fragmentation and correct size and boot the system to the CP/M command prompt. If the first image file is fragmented or has the wrong length the system will not boot. All other image files will be ignored if found to be fragmented or have the wrong length.&lt;br /&gt;
* In case you don't use CP/M image files just boot the system with |HDCPM or |HDCPMT&lt;br /&gt;
* Copy the files from your CP/M system floppy disks to the first hard disk.&lt;br /&gt;
* Copy any other needed application etc. to your CP/M hard disk(s).&lt;br /&gt;
* You are ready to go.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Using the binary===&lt;br /&gt;
* Plug in your [[SYMBiFACE II]] compatible IDE interface, [[uIDE 16]], [[M4 Board]] or [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] and attach the proper mass storage device.&lt;br /&gt;
* Use your original CP/M Plus system disk set to Boot CP/M Plus.&lt;br /&gt;
* 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.&lt;br /&gt;
* 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.&lt;br /&gt;
* You are ready to go.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==ROM commands==&lt;br /&gt;
[[File:hdcpm-us-boot.png|thumb|HDCPM ROM booting on USIfAC II]]&lt;br /&gt;
* |HDCPM mounts the hard disks and boots CP/M Plus. If [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] is used enable the USB disk with the |USB command first.&lt;br /&gt;
* |HDCPMT works like |HDCPM but also utilizes the RTC.&lt;br /&gt;
* |HDDPB shows the Disk Parameter Block.&lt;br /&gt;
* |HDDEF shows the diskdefs entry for CP/M tools and the file system size.&lt;br /&gt;
* |DATE displays the current date.&lt;br /&gt;
* |TIME displays the current time. If [[M4 Board]] is used |DATE and |TIME will be redirected to M4 |TIME.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==The HDCPM binary file==&lt;br /&gt;
* If [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] is used, use your PC to copy HDCPM.BIN to your USB flash disk. Then insert it to your [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] power up your Amstrad and enable the USB disk with the |USB command.&lt;br /&gt;
* Execute the file from the floppy disk or from your mass storage device with ''RUN&amp;quot;HDCPM&amp;quot;''. 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.&lt;br /&gt;
*  [[M4 Board]] and [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ 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 [https://www.cpcwiki.eu/forum/applications/cubeios-fat16fat32-rom-for-the-cpc's-with-xmass/ CubeMDOS] or [[UniDOS]], installed.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==The MAKEIMG.BAS and MAKEIMG.EXE utilities==&lt;br /&gt;
===MAKEIMG.BAS===&lt;br /&gt;
Although this utility should not be your first option, you can use it to make a new empty CP/M disk image file.&amp;lt;br /&amp;gt;&lt;br /&gt;
In case you decide to use it make sure you have a FAT aware DOS installed in your system. MAKEIMG makes use of the firmware calls CAS_OUT_OPEN, CAS_OUT_CLOSE and CAS_OUT_CHAR so your DOS must support them.&amp;lt;br /&amp;gt;&lt;br /&gt;
Copy the files MAKEIMG.BAS and MAKEIMG.BIN to the root directory of your FAT formatted hard disk and make it your current drive. Run the utility with ''RUN&amp;quot;MAKEIMG&amp;quot;'' and don't hold your breath!&amp;lt;br /&amp;gt;&lt;br /&gt;
Making an image file this way takes more than 1.5 hour for an 8MB file so literally... don't hold your breath.&amp;lt;br /&amp;gt;&lt;br /&gt;
Here is a small tutorial on how to setup and use a CP/M image file: https://youtu.be/GMWsRzNhQTM&amp;lt;br /&amp;gt;&lt;br /&gt;
===MAKEIMG.EXE===&lt;br /&gt;
This utility is a [[SymbOS]] application.&amp;lt;br /&amp;gt;&lt;br /&gt;
Use this utility to create your CP/M hard disk images from within [[SymbOS]]. 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.&amp;lt;br /&amp;gt;&lt;br /&gt;
MAKEIMG.EXE has been developed with [http://www.symbos.de/quigs.htm Quigs] for [[SymbOS]].&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Hdcpm-makeimg-sym1.png|thumb|MAKEIMG.EXE in action]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==The HDMGR.COM utility==&lt;br /&gt;
This is the Hard Disk Manager utility.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can use this utility to get information about your hard disk geometry, disk image files, partitions and boot sector. You have to use this utility to format a hard disk, disk image file or partition to CP/M format or manipulate the boot sector of the hard disk and/or transfer an .EMS system file to the reserved track of the hard disk.&amp;lt;br /&amp;gt;&lt;br /&gt;
The boot sector contains information about the CP/M disk drive letters, start-up drive and console colour scheme. All those properties can be changed with HDMGR.COM.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR will perform a fragmentation test of the discovered CP/M hard disk image files uppon execution.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
The HDMGR.COM utility is self explanatory. Just run it from the CP/M command prompt.&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Hdcpm-hdmgr-m.png|thumb|HDMGR main menu]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-1.png|thumb|HDMGR Hardware information]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-2.png|thumb|HDMGR Partition information]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-3.png|thumb|HDMGR CP/M disk image information]]&lt;br /&gt;
|}&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Hdcpm-hdmgr-4.png|thumb|HDMGR Boot sector information]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-5.png|thumb|HDMGR Log disk]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-7.png|thumb|HDMGR Manage boot sector]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-8.png|thumb|HDMGR Transfer CP/M to disk]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==The RTC.COM utility==&lt;br /&gt;
You can make use of the RTC.COM utility in order to keep CP/M date and time updated.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can synchronize the date and time of CP/M Plus with the RTC by running ''RTC -G'' manually or via your PROFILE.SUB.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can also set your RTC to the current CP/M date and time by running ''RTC -S'' (not for M4 board)&amp;lt;br /&amp;gt;&lt;br /&gt;
Currently RTC.COM works with the RTC found in Symbiface II, Symbiface III and M4 board (read only).&amp;lt;br /&amp;gt;&lt;br /&gt;
DATE.COM, DIR.COM and SHOW.COM commands, patched for Year 2000 compatibility can be downloaded from the [http://www.cpm.z80.de/binary.html CP/M source archive - Digital Research Binary files section] .&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Error messages==&lt;br /&gt;
===Hard disk errors===&lt;br /&gt;
* ''*** No mass storage found ***''&lt;br /&gt;
	No compatible mass storage interface can be found.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: DISK I/O''&lt;br /&gt;
I/O error occurred during the last read/write operation.&lt;br /&gt;
	Your hard disk might be defect or the USB disk is not enabled.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: INVALID BOOT SECTOR''&lt;br /&gt;
	No FAT or CP/M boot sector was found in a not partitioned hard disk.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: INVALID FILE SYSTEM''&lt;br /&gt;
	The first partition in a partitioned hard disk is not a FAT or CP/M-80&lt;br /&gt;
	one.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: INVALID SECTOR SIZE''&lt;br /&gt;
	The hard disk used has a sector size not equal to 512 bytes.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: CPMDSK01.IMG NOT FOUND''&lt;br /&gt;
	The CP/M image file named CPMDSK01.IMG can't be found in the FAT&lt;br /&gt;
	formatted hard disk or partition. &lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: CP/M SYSTEM FILE NOT FOUND''&lt;br /&gt;
	The .EMS CP/M system file can't be found in the system track of your&lt;br /&gt;
	CP/M partition or image file.&lt;br /&gt;
	&lt;br /&gt;
*  ''ERROR: CPMDSK01.IMG IS FRAGMENTED''&lt;br /&gt;
	The first CP/M image file is fragmented, the system won't mount it.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: CPMDSK01.IMG HAS WRONG LENGTH''&lt;br /&gt;
	The first CP/M image file has wrong length, the system won't mount it.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: CPMDSK01.IMG IS NOT FORMATTED''&lt;br /&gt;
	The first CP/M image file is not formatted to CP/M-80 format, the&lt;br /&gt;
	system won't mount it. Use the HDMGR.COM utility to format it.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: INCOMPATIBLE EMS FILE''&lt;br /&gt;
	The .EMS system file that was loaded from the system track is not&lt;br /&gt;
	compatible with HDCPM.&lt;br /&gt;
&lt;br /&gt;
===RTC errors===&lt;br /&gt;
* ''*** Battery depleted ***''&lt;br /&gt;
	The RTC battery is depleted. The RTC driver will continue to operate&lt;br /&gt;
	normally but the readings are not reliable. Replace the RTC battery.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Release info &amp;amp; download==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Version !! Changes !! Download&lt;br /&gt;
|-&lt;br /&gt;
| v1.00 December 2021 || Initial release || [[Media:hdcpm100.dsk|hdcpm100.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.01 January 2022 || HDCPM.ROM, HDMGR.COM: code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: (bug fix) fragmented file detection was not working properly unless the file was CPMDSK01.IMG&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: (bug fix) unformatted image file detection was not working properly. New error message added.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) CP/M drive table wasn't patched properly.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) initialization of floppy drive(s) was corrupted due to misplaced code.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: added .EMS file compatibility check. New error message added.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: added support for Dobbertin RAM disk driver.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: added compatibility with Dobbertin HD20 Harddisc&amp;lt;br /&amp;gt;&lt;br /&gt;
MAKEIMG.EXE: added utility for creating an image file from within SYMBOS.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&lt;br /&gt;
|| [[Media:hdcpm101.dsk|hdcpm101.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.02 March 2022 || HDCPM.ROM, HDMGR.COM: added support for M4 board.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: added support for uIDE-16 interface.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) the ROM was initialized even if no compatible interface was found.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: error message change.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: option &amp;quot;F&amp;quot; has been removed. HDCPM will always do a disk fragmentation test during boot.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: power up message changed in order to provide information about the type of the detected interface.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: two bytes of RAM will be reserved by the ROM for storing the interface type and M4 ROM number.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&lt;br /&gt;
|| [[Media:hdcpm102.dsk|hdcpm102.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.03 April 2022 || HDCPM.ROM, HDMGR.COM: added support for USIfAC II.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) uIDE-16 detection was broken.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&lt;br /&gt;
|| [[Media:hdcpm103.dsk|hdcpm103.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.04 June 2022|| HDCPM.ROM: code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.BIN: added executable binary file version of HDCPM.&lt;br /&gt;
|| [[Media:hdcpm104.dsk|hdcpm104.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.05 July 2022 || HDCPM.ROM, HDCPM.BIN, HDMGR.COM: added support for Symbiface III.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDCPM.BIN:  code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR.COM: Hardware info added for USIfAC II&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR.COM: (bug fix) the 'Select boot file' menu was garbled if there were 8 or more .EMS files present.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&lt;br /&gt;
|| [[Media:hdcpm105.dsk|hdcpm105.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.06 January 2023 || HDCPM.ROM, HDCPM.BIN, HDMGR.COM: added support for Albireo.&amp;lt;br /&amp;gt;&lt;br /&gt;
RTC.COM: added support for M4 Board (r/o) and Symbiface 3.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDCPM.BIN: (bug fix) CPC was freezing after mounting the CP/M disk(s) with incompatible .EMS file.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR.COM: (bug fix) the Stack was overflowed in some rare cases.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&amp;lt;br /&amp;gt;&lt;br /&gt;
|| [[Media:hdcpm106.dsk|hdcpm106.dsk]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Other downloads==&lt;br /&gt;
*[[Media:CPMDSK01&amp;amp;02.zip|CP/M disk images]] - CPMDSK01.IMG is bootable and contains all the files of the 3 CP/M Plus system disks and year 2000 compliant binaries downloaded from the [http://www.cpm.z80.de/binary.html Digital Research Binary Files]. CPMDSK02.IMG is empty and can also be used as a template.&amp;lt;br /&amp;gt;&lt;br /&gt;
*[[Media:Z3Plus_CPMDSK01.zip|ZPM3+ZCCP disk image]] - The Amstrad BDOS and CCP have been replaced with their counterparts [https://github.com/wwarthen/CPU280/tree/master/ZPM3/zpm3.txt ZPM3] and [https://github.com/wwarthen/CPU280/tree/master/ZCCP/zccp.txt ZCCP] written by Simeon Cran. It is [https://www.cpcwiki.eu/index.php/Z-System Z-system, Z3Plus] compatible and contains the Z3Plus system files, all the files of the 3 CP/M Plus system disks, year 2000 compliant binaries. It also contains some useful tools, help and manual files.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Videos==&lt;br /&gt;
* [https://youtu.be/GMWsRzNhQTM How to create and prepare a CP/M image file in a FAT formatted hard disk]&lt;br /&gt;
* [https://youtu.be/nxow6Y5O4Dc Hard disk utilization and dual boot]&lt;br /&gt;
* [https://youtu.be/em7dHOdaylg How to create a CP/M image file under SYMBOS]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
[[category:Expansion ROM]] [[category:Applications]] [[category:CP/M]]&lt;/div&gt;</summary>
		<author><name>D kef</name></author>	</entry>

	<entry>
		<id>https://oldwiki.cpcwiki.eu/index.php?title=Albireo&amp;diff=109871</id>
		<title>Albireo</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.cpcwiki.eu/index.php?title=Albireo&amp;diff=109871"/>
				<updated>2023-01-23T21:50:23Z</updated>
		
		<summary type="html">&lt;p&gt;D kef: /* Software supporting the Albireo */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== General ==&lt;br /&gt;
&lt;br /&gt;
=== Intro ===&lt;br /&gt;
&lt;br /&gt;
Albireo is an expansion for the Amstrad CPC computers (all models). Its main goal is to provide reliable, fast, cheap and large storage, which it achieves by using a MicroSD card. But the board has a lot of features packed in:&lt;br /&gt;
* USB host port, allowing to connect USB mass storage, mouse, and other USB peripherals&lt;br /&gt;
* USB device port, allowing to link the CPC to a modern computer with maximal link speed (faster than the z80 can handle, and with on-board buffer and hardware flow control).&lt;br /&gt;
&lt;br /&gt;
The interface is based on the WCH CH376 chip and allows access to USB mass storage and other USB devices on CPC.&lt;br /&gt;
&lt;br /&gt;
The CH376 chip implements FAT32 in hardware, which means no filesystem driver is needed on the CPC side. It also implements the lower level aspects of USB, making it relatively easy to write drivers for other USB devices (mouse, joystick, ...).&lt;br /&gt;
&lt;br /&gt;
=== What's in it? ===&lt;br /&gt;
* SD and SDHC card mass storage support with fast (6 MHz) SPI link with the SD card. Hardware FAT32 support for easy file access. Raw sector access also possible for homegrown file-systems and other advanced applications.&lt;br /&gt;
* USB host support with built in mass storage driver, also with FAT32 and direct sector access.&lt;br /&gt;
* Generic USB host with direct control of USB endpoints, for connecting other kinds of USB devices.&lt;br /&gt;
* High-speed (1.5 Mbaud) serial link with built-in USB interface for linking with other computers for fast data exchange. Includes flow control, 16 byte FIFO on CPC side, and 512 byte FIFO on remote side, allowing fast buffered and interrupt-driven operation.&lt;br /&gt;
* Software configurable interrupt routing to either NMI or INT, or interrupt masking. Multiplexing of several interrupt sources: USB host controller, UART, remotely triggered, and CRTC CURSOR signal interrupts are gathered and easily accessible from a single interrupt status register.&lt;br /&gt;
&lt;br /&gt;
=== Board revisions ===&lt;br /&gt;
&lt;br /&gt;
The hardware went through multiple iterations before reaching final state. Each version identifies itself on the USB link and the version should be visible in Windows device manager or lsusb on Linux.&lt;br /&gt;
&lt;br /&gt;
==== Initial prototypes ====&lt;br /&gt;
&lt;br /&gt;
The first prototype was an hand-wired one. There were some changes to I/O ports used since then, so it is not usable anymore.&lt;br /&gt;
&lt;br /&gt;
==== Version 0.9 ====&lt;br /&gt;
&lt;br /&gt;
The first 5 boards were manufactured with an early PCB design, which required some wire-patches to get things working. With the wire-patches, this version behaves the same as 1.0.&lt;br /&gt;
&lt;br /&gt;
==== Version 1.0 ====&lt;br /&gt;
&lt;br /&gt;
About 20 boards were shipped with version 1.0. Unfortunately, as people started to write software using it it turned out that the serial port chip has compatibility problems with the z80 timings. As a result, this version of the board can use the serial port only with the FIFO disabled, which makes it impossible to reach high baudrates. The board is still perfectly usable if you are interested only in the microSD and USB host port.&lt;br /&gt;
&lt;br /&gt;
==== Version 1.1 ====&lt;br /&gt;
&lt;br /&gt;
This version of the board replaces the serial chip with a slightly different one. The board still reads &amp;quot;v1.0&amp;quot; as it is the same PCB, only the chip used has changed.&lt;br /&gt;
&lt;br /&gt;
You can identify your board from the info it sends on the USB device port, or by checking the serial chip (square chip on the back of the board).&lt;br /&gt;
Version 1.0 uses a TI TL16C550D chip. Version 1.1 uses a NXP SC16C650B chip.&lt;br /&gt;
&lt;br /&gt;
=== How does it work? ===&lt;br /&gt;
* There are two main devices: the CH376 handles the USB host and SD card side of things, and is accessed at FE80 (data) and FE81 (command/status). The communication side is handled by a SC16C650B, mapped at FEB0-FEB7. This is similar to the chip used on most PC hardware and some Amiga expansions like the SilverSurfer.&lt;br /&gt;
* There is an FT230X chip to convert the UART to USB for connecting with a modern PC (standard serial ports are not that common anymore, and they wouldn't be fast enough anyway). The FT230X also generates 12MHz and 48MHz clocks for the two other chips.&lt;br /&gt;
* The 16C650 &amp;quot;modem control&amp;quot; lines are connected to various things (CH376 interrupt, FT230X general IO pin for remote control) and turns them into interrupts.&lt;br /&gt;
&lt;br /&gt;
=== What is it useful for? ===&lt;br /&gt;
Not much currently because there is no software yet, but in the future:&lt;br /&gt;
&lt;br /&gt;
* Use the USB key or SD card directly from BASIC and well-behaving apps (which support extra disk ROMs and a C drive). Load games and tools from the mass storage media&lt;br /&gt;
* Connect to another computer like the CPC Booster, load snapshot, DSK or other files from it and write them to floppies or the mass storage media. A snapshot of 128K could be loaded in 0.86 seconds, a snapshot of 64K in less than 0.43 seconds.&lt;br /&gt;
* Use SLIP (serial line IP) and a properly setup gateway (Linux machine or similar) to connect the CPC to the Internet.&lt;br /&gt;
&lt;br /&gt;
There are a drivers in FutureOS and SymbOS to use Albireo with an USB mouse.&lt;br /&gt;
&lt;br /&gt;
== Hardware ==&lt;br /&gt;
&lt;br /&gt;
=== I/O ports ===&lt;br /&gt;
&lt;br /&gt;
The decoding is clean, this means there aren't any mirror ports or undecoded address bits. Just the addresses listed below are used.&lt;br /&gt;
&lt;br /&gt;
The addresses are in the I/O range, which means you access them with the OUT and IN instructions. They are not memory mapped, and to match with the CPC address decoding, the address is decoded on 16 bytes. This makes using OTIR and similar looped instructions tricky, but is required for compatibility with the CPC.&lt;br /&gt;
&lt;br /&gt;
==== CH376 registers ====&lt;br /&gt;
&lt;br /&gt;
* FE80: &amp;quot;DATA&amp;quot; port (read/write)&lt;br /&gt;
* FE81: &amp;quot;COMMAND&amp;quot; (write) and &amp;quot;STATUS&amp;quot; (read) port&lt;br /&gt;
&lt;br /&gt;
==== SC16C650B registers ==== &lt;br /&gt;
&lt;br /&gt;
Some of the registers are sharing the same address. A register bit (DLAB) is used to switch between the two groups.&lt;br /&gt;
&amp;lt;tt&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
! Address !! DLAB !! Description&lt;br /&gt;
|-&lt;br /&gt;
| FEB0 || 0  || RBR/THR: RX buffer (read), TX buffer (write)&lt;br /&gt;
|-&lt;br /&gt;
| FEB1 || 0|| IER: Interrupt enable&lt;br /&gt;
|-&lt;br /&gt;
| FEB0 || 1|| DLL: Divisor latch LSB&lt;br /&gt;
|-&lt;br /&gt;
| FEB1 || 1|| DLM: Divisor latch MSB&lt;br /&gt;
|-&lt;br /&gt;
| FEB2 || || IIR/FCR: Interrupt status (read), FIFO control (write)&lt;br /&gt;
|-&lt;br /&gt;
| FEB3 || || LCR: Line control&lt;br /&gt;
|-&lt;br /&gt;
| FEB4 || || MCR: Modem control&lt;br /&gt;
|-&lt;br /&gt;
| FEB5 ||  || LSR: Line status&lt;br /&gt;
|-&lt;br /&gt;
| FEB6 || || MSR: Modem status&lt;br /&gt;
|-&lt;br /&gt;
| FEB7 || || SCR: Scratch register&lt;br /&gt;
|}&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== DIP switches ===&lt;br /&gt;
The board holds 4 DIP switches for configuration. From top to bottom:&lt;br /&gt;
&lt;br /&gt;
==== S1 - CH376 interrupt enable ====&lt;br /&gt;
&lt;br /&gt;
* When this switch is ON, the usb controller is allowed to generate interrupts to signal the CPC when it is done performing an operation.&lt;br /&gt;
* When this switch is OFF, the usb controller is not allowed to generate interrupts. The CPC must then poll the CH376 STATUS register to know wether the operation is finished.&lt;br /&gt;
&lt;br /&gt;
==== S2 - CH376 reset enable====&lt;br /&gt;
&lt;br /&gt;
* When this switch is ON, the CH376 will be reset at the same time as the CPC (hardware reset only).&lt;br /&gt;
* When this switch is OFF, the CH376 will not be reset, and the CPC must initialize it using the reset command (software reset). In this case, the CH376 internal buffer may be used to store reset resident data (but I don't know if this is of any practical use, yet).&lt;br /&gt;
&lt;br /&gt;
==== S3 - Remote reset enable ====&lt;br /&gt;
&lt;br /&gt;
* When this switch is ON, the DTR signal from the remote side of the serial link is connected to the CPC reset. This means that the remote side computer can trigger the CPC reset by toggling that line. &lt;br /&gt;
* When the switch is OFF, such reset is not allowed and the CPC is safe.&lt;br /&gt;
&lt;br /&gt;
==== S4 - Remote interrupt enable ====&lt;br /&gt;
&lt;br /&gt;
* When this switch is ON, the DTR signal from the remote side of the serial link is plugged to the DSR line of the UART controller. It then generates an interrupt which the CPC can process.&lt;br /&gt;
&lt;br /&gt;
[http://pulkomandy.github.io/shinra.github.io/albireo.html Albireo interface homepage]&lt;br /&gt;
&lt;br /&gt;
== Software ==&lt;br /&gt;
=== Software supporting the Albireo ===&lt;br /&gt;
* [[AlbiDOS]] ([[AMSDOS]] compatible DOS driver; see [https://framagit.org/shinra/albireo/albireodos/-/wikis/home AlbiDOS documentation]) &lt;br /&gt;
* [[Arkos_Tracker]] 2 (use the CPC AY chip through the USB serial port)&lt;br /&gt;
* [[FutureOS]] (USB mouse support)&lt;br /&gt;
* [[SymbOS]] (USB mouse support)&lt;br /&gt;
* [[HDCPM]] (Support booting and running CP/M Plus from SD card)&lt;br /&gt;
&lt;br /&gt;
=== Upcoming software ===&lt;br /&gt;
* Serial communication to communicate with a PC&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:DATA Storage]]&lt;br /&gt;
[[Category:Peripherals]]&lt;br /&gt;
[[Category:FutureOS]]&lt;/div&gt;</summary>
		<author><name>D kef</name></author>	</entry>

	<entry>
		<id>https://oldwiki.cpcwiki.eu/index.php?title=HDCPM&amp;diff=109870</id>
		<title>HDCPM</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.cpcwiki.eu/index.php?title=HDCPM&amp;diff=109870"/>
				<updated>2023-01-23T20:57:33Z</updated>
		
		<summary type="html">&lt;p&gt;D kef: /* Release info &amp;amp; download */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;HDCPM is a Hard Disk boot loader for [[CP/M]] plus developed by d_kef&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can read more about the development of the application here:&amp;lt;br /&amp;gt;&lt;br /&gt;
https://www.cpcwiki.eu/forum/applications/hdcpm-boot-and-run-cpm-plus-from-hard-disk/&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:hdcpm.gif|HDCPM booting CP/M Plus]]&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It comes in the form of:&lt;br /&gt;
* a standard background ROM that can be installed in any available ROM position.&lt;br /&gt;
* a standard binary file that can be loaded from floppy or hard drive.&lt;br /&gt;
&lt;br /&gt;
 	&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following configurations are possible with one hard disk:&lt;br /&gt;
&lt;br /&gt;
* One not partitioned, CP/M formatted hard disk. The whole hard disk is used by CP/M.&lt;br /&gt;
* One to four CP/M formatted partitions. Every partition is accessed as a separate hard disk by CP/M.&lt;br /&gt;
* 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.&lt;br /&gt;
* 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.&lt;br /&gt;
* For interfaces that use SD card or USB flash drive as a mass storage device ([[M4 Board]], [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II], [http://www.tmtlogic.com/ Symbiface III] or [https://www.cpcwiki.eu/index.php/Albireo Albireo]) the only supported configuration is one to four CP/M disk image files in the root directory of the FAT file system.&lt;br /&gt;
	&lt;br /&gt;
Currently only the master IDE device can be accessed by HDCPM. The slave device is available to be used by your favourite DOS.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
HDCPM can also utilize the RTC found in the [[SYMBiFACE II]] in order to implement CP/M Plus BIOS function 26: TIME.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
HDCPM is compatible and can be used together with the [[Dobbertin Harddisc]].&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
HDCPM distribution disk contains the following files:&lt;br /&gt;
* HDCPM.ROM the ROM itself&lt;br /&gt;
* HDCPM.BIN the executable binary file&lt;br /&gt;
* HDMGR.COM Hard Disk Manager utility&lt;br /&gt;
* RTC.COM RTC synchronization utility&lt;br /&gt;
* MAKEIMG.BAS CP/M image file creation utility&lt;br /&gt;
* MAKEIMG.BIN CP/M image file creation binary&lt;br /&gt;
* MAKEIMG.EXE CP/M image file creation utility for [[SymbOS]]&lt;br /&gt;
* HDCPM.DOC the User guide&lt;br /&gt;
&lt;br /&gt;
HDCPM is free software. It can be used and distributed with no restrictions.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Prerequisites==&lt;br /&gt;
* Amstrad CPC/Plus computer capable of running CP/M Plus.&lt;br /&gt;
* ROM box or other ROM expansion hardware if using the ROM.&lt;br /&gt;
* Optionaly a FAT aware DOS like M4 ROM, USIfAC ROM, [[UniDOS]], [https://www.cpcwiki.eu/forum/applications/cubeios-fat16fat32-rom-for-the-cpc's-with-xmass/ CubeMDOS] etc if using the binary.&lt;br /&gt;
* One of the following mass storage interfaces:&lt;br /&gt;
** [[SYMBiFACE II]]&lt;br /&gt;
** [[X-Mass]]&lt;br /&gt;
** [[uIDE 16]] (base address = &amp;amp;FEF0)&lt;br /&gt;
** [[M4 Board]]&lt;br /&gt;
** [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II]&lt;br /&gt;
** [http://www.tmtlogic.com/ Symbiface III]&lt;br /&gt;
** [https://www.cpcwiki.eu/index.php/Albireo Albireo] (SD card only)&lt;br /&gt;
* Compatible storage device with enough free space to accommodate the desirable CP/M hard disk configuration.&lt;br /&gt;
* Floppy disk drive for initialization of the file system.&lt;br /&gt;
* CP/M Plus system disks for making the system bootable.&lt;br /&gt;
* Optionally a [[SYMBiFACE II]] compatible RTC.&lt;br /&gt;
&lt;br /&gt;
==Restrictions==&lt;br /&gt;
* CP/M 2.2 or lower is not supported.&lt;br /&gt;
* 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.&lt;br /&gt;
* Only the master IDE device is accessible by HDCPM.&lt;br /&gt;
* The maximum number of hard disk partition/images supported is four.&lt;br /&gt;
* Only primary partitions are supported.&lt;br /&gt;
* If you want to use CP/M disk images then they must be stored in a FAT16 or FAT32 formatted disk or partition.&lt;br /&gt;
* If the hard disk is partitioned then the CP/M disk images must be placed in the first partition of the disk.&lt;br /&gt;
* The CP/M disk images must be placed in the root directory of the FAT file system.&lt;br /&gt;
* The CP/M disk images must NOT be fragmented and must have the correct size.&lt;br /&gt;
* 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. &lt;br /&gt;
* Only storage devices with 512 bytes sector size are supported.&lt;br /&gt;
* Only storage devices with LBA addressing are supported.&lt;br /&gt;
* Date stamps of CP/M disk image files are not maintained.&lt;br /&gt;
* 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 letters for your IDE media then the corresponding HD20 partitions will be unavailable under CP/M.&lt;br /&gt;
&lt;br /&gt;
==How it works==&lt;br /&gt;
===Using the ROM===&lt;br /&gt;
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:&lt;br /&gt;
|HDCPM (no TIME function support) or |HDCPMT (TIME function support)&amp;lt;br /&amp;gt;&lt;br /&gt;
Alternatively it can be started by holding down the Tab key (no TIME function support) or Shift+Tab (TIME function support), during power-up.&amp;lt;br /&amp;gt;&lt;br /&gt;
===Using the binary===&lt;br /&gt;
HDCPM can be started by running the HDCPM.BIN file from floppy drive or mass storage.&amp;lt;br /&amp;gt;&lt;br /&gt;
===Functions===&lt;br /&gt;
HDCPM will then execute the following functions:&amp;lt;br /&amp;gt;&lt;br /&gt;
* Search for a compatible mass storage interface.&lt;br /&gt;
* Initialize the mass storage interface if needed.&lt;br /&gt;
* Move the boot loader and the CP/M patcher to RAM.&lt;br /&gt;
* Mount 1 to 4 CP/M image files and/or partitions and perform fragmentation and size test.&lt;br /&gt;
* 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.&lt;br /&gt;
* Read the .EMS file from the reserved track and store it in RAM just as the normal CP/M Plus boot loader does.&lt;br /&gt;
* 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.&lt;br /&gt;
* Patch the SCB in order to change the startup/default drive.&lt;br /&gt;
* 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 memory expansion]] or [[Dobbertin Memory Expansion]] driver is present.&lt;br /&gt;
* Move the ALV of the Dk'tronics RAM disk if [[Z-System]] is detected.&lt;br /&gt;
* Patch the CP/M console with the desired colour scheme. &lt;br /&gt;
* Patch the system message.&lt;br /&gt;
* Do a normal CP/M cold start.&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==CP/M Plus disk image files==&lt;br /&gt;
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 [https://hexed.it/ hexed.it] or any hex editor capable of creating binary files filled with a specific pattern.&amp;lt;br /&amp;gt;&lt;br /&gt;
In case of hexed.it select 'New file' fill in 'Size of the new file = 8519680' and 'Fill Pattern = 0xE5' and press apply. Save the file as CPMDSK01.IMG&amp;lt;br /&amp;gt;&lt;br /&gt;
If you have a FAT capable DOS installed in your AMSTRAD you can use the provided MAKEIMG.BAS utility to create your image file. Keep in mind that it takes more than 1.5 hour for a 8MB image file to be created that way.&amp;lt;br /&amp;gt;&lt;br /&gt;
CP/M disk image files can be accessed by a modern computer with [http://www.moria.de/~michael/cpmtools/ cpmtools]. Use the command |HDDEF to see the record you must insert in the diskdefs file.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The HDCPM record for diskdefs is:&lt;br /&gt;
&lt;br /&gt;
       diskdef hdcpm&lt;br /&gt;
          seclen 512&lt;br /&gt;
          tracks 65&lt;br /&gt;
          sectrk 256&lt;br /&gt;
          blocksize 8192&lt;br /&gt;
          maxdir 1024&lt;br /&gt;
          skew 0&lt;br /&gt;
          boottrk 1&lt;br /&gt;
          os 3&lt;br /&gt;
       end&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
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. [https://www.cpcwiki.eu/index.php/Albireo Albireo] incorporates a file management IC that performs FAT file system operations and handles fragmented files properly. In such case fragmented image files is not a problem. HDCPM will never fragment a CP/M image file.&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Hdcpm-boot-m4.png|thumb|HDCPM binary booting on M4 Board]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==CP/M Plus disk/partitions==&lt;br /&gt;
You can also create one or more partitions in order to format them to [http://www.seasip.info/Cpm/format31.html CP/M-80] 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.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM examines the hard disk's MBR upon start and finds the partition information. Then it finds the LBA of the first sector of each partition and passes it to the CP/M hard disk driver. The CP/M hard disk driver doesn't know anything about partitions. It accesses the partition as if it was a real hard disk.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:hdcpm-ui-boot.png|thumb|HDCPM ROM booting on uIDE-16]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
===Using the ROM===&lt;br /&gt;
* Install the HDCPM ROM in a free ROM slot of your ROM box.&lt;br /&gt;
* Plug in your [[SYMBiFACE II]] compatible IDE interface, [[uIDE 16]], [[M4 Board]] or [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] and attach the proper mass storage device.&lt;br /&gt;
* 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 shown inside the parentheses:&amp;lt;br /&amp;gt;&lt;br /&gt;
** (S2): [[SYMBiFACE II]] compatible interface&lt;br /&gt;
** (uI): [[uIDE 16]] interface&lt;br /&gt;
** (M4): [[M4 Board]]&lt;br /&gt;
** (US): [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II]&lt;br /&gt;
** (S3): [http://www.tmtlogic.com/ Symbiface III]&lt;br /&gt;
** (AL): [https://www.cpcwiki.eu/index.php/Albireo Albireo]&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:hdcpm-s2.png|thumb|HDCPM ROM - SYMBiFACE II]]&lt;br /&gt;
|[[File:hdcpm-ui.png|thumb|HDCPM ROM - uIDE-16]]&lt;br /&gt;
|[[File:hdcpm-m4.png|thumb|HDCPM ROM - M4 Board]]&lt;br /&gt;
|[[File:hdcpm-us.png|thumb|HDCPM ROM - USIfAC II]]&lt;br /&gt;
|[[File:hdcpm-s3.png|thumb|HDCPM ROM - Symbiface III]]&lt;br /&gt;
|}&lt;br /&gt;
In case a RTC is detected you will also see the RTC initialization message and the current date and time: ''RTC found: 2021/01/01 12:01:01''&lt;br /&gt;
* Use your original CP/M Plus system disk set to Boot CP/M Plus.&lt;br /&gt;
* 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.&lt;br /&gt;
* Reset your AMSTRAD and boot CP/M from the hard disk with the command |HDCPM. The Boot loader will check your image file(s) against fragmentation and correct size and boot the system to the CP/M command prompt. If the first image file is fragmented or has the wrong length the system will not boot. All other image files will be ignored if found to be fragmented or have the wrong length.&lt;br /&gt;
* In case you don't use CP/M image files just boot the system with |HDCPM or |HDCPMT&lt;br /&gt;
* Copy the files from your CP/M system floppy disks to the first hard disk.&lt;br /&gt;
* Copy any other needed application etc. to your CP/M hard disk(s).&lt;br /&gt;
* You are ready to go.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Using the binary===&lt;br /&gt;
* Plug in your [[SYMBiFACE II]] compatible IDE interface, [[uIDE 16]], [[M4 Board]] or [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] and attach the proper mass storage device.&lt;br /&gt;
* Use your original CP/M Plus system disk set to Boot CP/M Plus.&lt;br /&gt;
* 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.&lt;br /&gt;
* 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.&lt;br /&gt;
* You are ready to go.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==ROM commands==&lt;br /&gt;
[[File:hdcpm-us-boot.png|thumb|HDCPM ROM booting on USIfAC II]]&lt;br /&gt;
* |HDCPM mounts the hard disks and boots CP/M Plus. If [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] is used enable the USB disk with the |USB command first.&lt;br /&gt;
* |HDCPMT works like |HDCPM but also utilizes the RTC.&lt;br /&gt;
* |HDDPB shows the Disk Parameter Block.&lt;br /&gt;
* |HDDEF shows the diskdefs entry for CP/M tools and the file system size.&lt;br /&gt;
* |DATE displays the current date.&lt;br /&gt;
* |TIME displays the current time. If [[M4 Board]] is used |DATE and |TIME will be redirected to M4 |TIME.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==The HDCPM binary file==&lt;br /&gt;
* If [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] is used, use your PC to copy HDCPM.BIN to your USB flash disk. Then insert it to your [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] power up your Amstrad and enable the USB disk with the |USB command.&lt;br /&gt;
* Execute the file from the floppy disk or from your mass storage device with ''RUN&amp;quot;HDCPM&amp;quot;''. 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.&lt;br /&gt;
*  [[M4 Board]] and [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ 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 [https://www.cpcwiki.eu/forum/applications/cubeios-fat16fat32-rom-for-the-cpc's-with-xmass/ CubeMDOS] or [[UniDOS]], installed.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==The MAKEIMG.BAS and MAKEIMG.EXE utilities==&lt;br /&gt;
===MAKEIMG.BAS===&lt;br /&gt;
Although this utility should not be your first option, you can use it to make a new empty CP/M disk image file.&amp;lt;br /&amp;gt;&lt;br /&gt;
In case you decide to use it make sure you have a FAT aware DOS installed in your system. MAKEIMG makes use of the firmware calls CAS_OUT_OPEN, CAS_OUT_CLOSE and CAS_OUT_CHAR so your DOS must support them.&amp;lt;br /&amp;gt;&lt;br /&gt;
Copy the files MAKEIMG.BAS and MAKEIMG.BIN to the root directory of your FAT formatted hard disk and make it your current drive. Run the utility with ''RUN&amp;quot;MAKEIMG&amp;quot;'' and don't hold your breath!&amp;lt;br /&amp;gt;&lt;br /&gt;
Making an image file this way takes more than 1.5 hour for an 8MB file so literally... don't hold your breath.&amp;lt;br /&amp;gt;&lt;br /&gt;
Here is a small tutorial on how to setup and use a CP/M image file: https://youtu.be/GMWsRzNhQTM&amp;lt;br /&amp;gt;&lt;br /&gt;
===MAKEIMG.EXE===&lt;br /&gt;
This utility is a [[SymbOS]] application.&amp;lt;br /&amp;gt;&lt;br /&gt;
Use this utility to create your CP/M hard disk images from within [[SymbOS]]. 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.&amp;lt;br /&amp;gt;&lt;br /&gt;
MAKEIMG.EXE has been developed with [http://www.symbos.de/quigs.htm Quigs] for [[SymbOS]].&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Hdcpm-makeimg-sym1.png|thumb|MAKEIMG.EXE in action]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==The HDMGR.COM utility==&lt;br /&gt;
This is the Hard Disk Manager utility.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can use this utility to get information about your hard disk geometry, disk image files, partitions and boot sector. You have to use this utility to format a hard disk, disk image file or partition to CP/M format or manipulate the boot sector of the hard disk and/or transfer an .EMS system file to the reserved track of the hard disk.&amp;lt;br /&amp;gt;&lt;br /&gt;
The boot sector contains information about the CP/M disk drive letters, start-up drive and console colour scheme. All those properties can be changed with HDMGR.COM.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR will perform a fragmentation test of the discovered CP/M hard disk image files uppon execution.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
The HDMGR.COM utility is self explanatory. Just run it from the CP/M command prompt.&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Hdcpm-hdmgr-m.png|thumb|HDMGR main menu]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-1.png|thumb|HDMGR Hardware information]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-2.png|thumb|HDMGR Partition information]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-3.png|thumb|HDMGR CP/M disk image information]]&lt;br /&gt;
|}&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Hdcpm-hdmgr-4.png|thumb|HDMGR Boot sector information]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-5.png|thumb|HDMGR Log disk]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-7.png|thumb|HDMGR Manage boot sector]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-8.png|thumb|HDMGR Transfer CP/M to disk]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==The RTC.COM utility==&lt;br /&gt;
You can make use of the RTC.COM utility in order to keep CP/M date and time updated.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can synchronize the date and time of CP/M Plus with the RTC by running ''RTC -G'' manually or via your PROFILE.SUB.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can also set your RTC to the current CP/M date and time by running ''RTC -S'' (not for M4 board)&amp;lt;br /&amp;gt;&lt;br /&gt;
Currently RTC.COM works with the RTC found in Symbiface II, Symbiface III and M4 board (read only).&amp;lt;br /&amp;gt;&lt;br /&gt;
DATE.COM, DIR.COM and SHOW.COM commands, patched for Year 2000 compatibility can be downloaded from the [http://www.cpm.z80.de/binary.html CP/M source archive - Digital Research Binary files section] .&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Error messages==&lt;br /&gt;
===Hard disk errors===&lt;br /&gt;
* ''*** No mass storage found ***''&lt;br /&gt;
	No compatible mass storage interface can be found.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: DISK I/O''&lt;br /&gt;
I/O error occurred during the last read/write operation.&lt;br /&gt;
	Your hard disk might be defect or the USB disk is not enabled.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: INVALID BOOT SECTOR''&lt;br /&gt;
	No FAT or CP/M boot sector was found in a not partitioned hard disk.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: INVALID FILE SYSTEM''&lt;br /&gt;
	The first partition in a partitioned hard disk is not a FAT or CP/M-80&lt;br /&gt;
	one.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: INVALID SECTOR SIZE''&lt;br /&gt;
	The hard disk used has a sector size not equal to 512 bytes.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: CPMDSK01.IMG NOT FOUND''&lt;br /&gt;
	The CP/M image file named CPMDSK01.IMG can't be found in the FAT&lt;br /&gt;
	formatted hard disk or partition. &lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: CP/M SYSTEM FILE NOT FOUND''&lt;br /&gt;
	The .EMS CP/M system file can't be found in the system track of your&lt;br /&gt;
	CP/M partition or image file.&lt;br /&gt;
	&lt;br /&gt;
*  ''ERROR: CPMDSK01.IMG IS FRAGMENTED''&lt;br /&gt;
	The first CP/M image file is fragmented, the system won't mount it.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: CPMDSK01.IMG HAS WRONG LENGTH''&lt;br /&gt;
	The first CP/M image file has wrong length, the system won't mount it.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: CPMDSK01.IMG IS NOT FORMATTED''&lt;br /&gt;
	The first CP/M image file is not formatted to CP/M-80 format, the&lt;br /&gt;
	system won't mount it. Use the HDMGR.COM utility to format it.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: INCOMPATIBLE EMS FILE''&lt;br /&gt;
	The .EMS system file that was loaded from the system track is not&lt;br /&gt;
	compatible with HDCPM.&lt;br /&gt;
&lt;br /&gt;
===RTC errors===&lt;br /&gt;
* ''*** Battery depleted ***''&lt;br /&gt;
	The RTC battery is depleted. The RTC driver will continue to operate&lt;br /&gt;
	normally but the readings are not reliable. Replace the RTC battery.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Release info &amp;amp; download==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Version !! Changes !! Download&lt;br /&gt;
|-&lt;br /&gt;
| v1.00 December 2021 || Initial release || [[Media:hdcpm100.dsk|hdcpm100.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.01 January 2022 || HDCPM.ROM, HDMGR.COM: code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: (bug fix) fragmented file detection was not working properly unless the file was CPMDSK01.IMG&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: (bug fix) unformatted image file detection was not working properly. New error message added.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) CP/M drive table wasn't patched properly.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) initialization of floppy drive(s) was corrupted due to misplaced code.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: added .EMS file compatibility check. New error message added.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: added support for Dobbertin RAM disk driver.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: added compatibility with Dobbertin HD20 Harddisc&amp;lt;br /&amp;gt;&lt;br /&gt;
MAKEIMG.EXE: added utility for creating an image file from within SYMBOS.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&lt;br /&gt;
|| [[Media:hdcpm101.dsk|hdcpm101.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.02 March 2022 || HDCPM.ROM, HDMGR.COM: added support for M4 board.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: added support for uIDE-16 interface.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) the ROM was initialized even if no compatible interface was found.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: error message change.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: option &amp;quot;F&amp;quot; has been removed. HDCPM will always do a disk fragmentation test during boot.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: power up message changed in order to provide information about the type of the detected interface.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: two bytes of RAM will be reserved by the ROM for storing the interface type and M4 ROM number.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&lt;br /&gt;
|| [[Media:hdcpm102.dsk|hdcpm102.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.03 April 2022 || HDCPM.ROM, HDMGR.COM: added support for USIfAC II.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) uIDE-16 detection was broken.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&lt;br /&gt;
|| [[Media:hdcpm103.dsk|hdcpm103.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.04 June 2022|| HDCPM.ROM: code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.BIN: added executable binary file version of HDCPM.&lt;br /&gt;
|| [[Media:hdcpm104.dsk|hdcpm104.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.05 July 2022 || HDCPM.ROM, HDCPM.BIN, HDMGR.COM: added support for Symbiface III.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDCPM.BIN:  code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR.COM: Hardware info added for USIfAC II&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR.COM: (bug fix) the 'Select boot file' menu was garbled if there were 8 or more .EMS files present.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&lt;br /&gt;
|| [[Media:hdcpm105.dsk|hdcpm105.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.06 January 2023 || HDCPM.ROM, HDCPM.BIN, HDMGR.COM: added support for Albireo.&amp;lt;br /&amp;gt;&lt;br /&gt;
RTC.COM: added support for M4 Board (r/o) and Symbiface 3.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDCPM.BIN: (bug fix) CPC was freezing after mounting the CP/M disk(s) with incompatible .EMS file.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR.COM: (bug fix) the Stack was overflowed in some rare cases.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&amp;lt;br /&amp;gt;&lt;br /&gt;
|| [[Media:hdcpm106.dsk|hdcpm106.dsk]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Other downloads==&lt;br /&gt;
*[[Media:CPMDSK01&amp;amp;02.zip|CP/M disk images]] - CPMDSK01.IMG is bootable and contains all the files of the 3 CP/M Plus system disks and year 2000 compliant binaries downloaded from the [http://www.cpm.z80.de/binary.html Digital Research Binary Files]. CPMDSK02.IMG is empty and can also be used as a template.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Videos==&lt;br /&gt;
* [https://youtu.be/GMWsRzNhQTM How to create and prepare a CP/M image file in a FAT formatted hard disk]&lt;br /&gt;
* [https://youtu.be/nxow6Y5O4Dc Hard disk utilization and dual boot]&lt;br /&gt;
* [https://youtu.be/em7dHOdaylg How to create a CP/M image file under SYMBOS]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
[[category:Expansion ROM]] [[category:Applications]] [[category:CP/M]]&lt;/div&gt;</summary>
		<author><name>D kef</name></author>	</entry>

	<entry>
		<id>https://oldwiki.cpcwiki.eu/index.php?title=File:Hdcpm106.dsk&amp;diff=109869</id>
		<title>File:Hdcpm106.dsk</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.cpcwiki.eu/index.php?title=File:Hdcpm106.dsk&amp;diff=109869"/>
				<updated>2023-01-23T20:55:41Z</updated>
		
		<summary type="html">&lt;p&gt;D kef: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>D kef</name></author>	</entry>

	<entry>
		<id>https://oldwiki.cpcwiki.eu/index.php?title=HDCPM&amp;diff=109868</id>
		<title>HDCPM</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.cpcwiki.eu/index.php?title=HDCPM&amp;diff=109868"/>
				<updated>2023-01-23T20:54:52Z</updated>
		
		<summary type="html">&lt;p&gt;D kef: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;HDCPM is a Hard Disk boot loader for [[CP/M]] plus developed by d_kef&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can read more about the development of the application here:&amp;lt;br /&amp;gt;&lt;br /&gt;
https://www.cpcwiki.eu/forum/applications/hdcpm-boot-and-run-cpm-plus-from-hard-disk/&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:hdcpm.gif|HDCPM booting CP/M Plus]]&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It comes in the form of:&lt;br /&gt;
* a standard background ROM that can be installed in any available ROM position.&lt;br /&gt;
* a standard binary file that can be loaded from floppy or hard drive.&lt;br /&gt;
&lt;br /&gt;
 	&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following configurations are possible with one hard disk:&lt;br /&gt;
&lt;br /&gt;
* One not partitioned, CP/M formatted hard disk. The whole hard disk is used by CP/M.&lt;br /&gt;
* One to four CP/M formatted partitions. Every partition is accessed as a separate hard disk by CP/M.&lt;br /&gt;
* 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.&lt;br /&gt;
* 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.&lt;br /&gt;
* For interfaces that use SD card or USB flash drive as a mass storage device ([[M4 Board]], [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II], [http://www.tmtlogic.com/ Symbiface III] or [https://www.cpcwiki.eu/index.php/Albireo Albireo]) the only supported configuration is one to four CP/M disk image files in the root directory of the FAT file system.&lt;br /&gt;
	&lt;br /&gt;
Currently only the master IDE device can be accessed by HDCPM. The slave device is available to be used by your favourite DOS.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
HDCPM can also utilize the RTC found in the [[SYMBiFACE II]] in order to implement CP/M Plus BIOS function 26: TIME.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
HDCPM is compatible and can be used together with the [[Dobbertin Harddisc]].&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
HDCPM distribution disk contains the following files:&lt;br /&gt;
* HDCPM.ROM the ROM itself&lt;br /&gt;
* HDCPM.BIN the executable binary file&lt;br /&gt;
* HDMGR.COM Hard Disk Manager utility&lt;br /&gt;
* RTC.COM RTC synchronization utility&lt;br /&gt;
* MAKEIMG.BAS CP/M image file creation utility&lt;br /&gt;
* MAKEIMG.BIN CP/M image file creation binary&lt;br /&gt;
* MAKEIMG.EXE CP/M image file creation utility for [[SymbOS]]&lt;br /&gt;
* HDCPM.DOC the User guide&lt;br /&gt;
&lt;br /&gt;
HDCPM is free software. It can be used and distributed with no restrictions.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Prerequisites==&lt;br /&gt;
* Amstrad CPC/Plus computer capable of running CP/M Plus.&lt;br /&gt;
* ROM box or other ROM expansion hardware if using the ROM.&lt;br /&gt;
* Optionaly a FAT aware DOS like M4 ROM, USIfAC ROM, [[UniDOS]], [https://www.cpcwiki.eu/forum/applications/cubeios-fat16fat32-rom-for-the-cpc's-with-xmass/ CubeMDOS] etc if using the binary.&lt;br /&gt;
* One of the following mass storage interfaces:&lt;br /&gt;
** [[SYMBiFACE II]]&lt;br /&gt;
** [[X-Mass]]&lt;br /&gt;
** [[uIDE 16]] (base address = &amp;amp;FEF0)&lt;br /&gt;
** [[M4 Board]]&lt;br /&gt;
** [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II]&lt;br /&gt;
** [http://www.tmtlogic.com/ Symbiface III]&lt;br /&gt;
** [https://www.cpcwiki.eu/index.php/Albireo Albireo] (SD card only)&lt;br /&gt;
* Compatible storage device with enough free space to accommodate the desirable CP/M hard disk configuration.&lt;br /&gt;
* Floppy disk drive for initialization of the file system.&lt;br /&gt;
* CP/M Plus system disks for making the system bootable.&lt;br /&gt;
* Optionally a [[SYMBiFACE II]] compatible RTC.&lt;br /&gt;
&lt;br /&gt;
==Restrictions==&lt;br /&gt;
* CP/M 2.2 or lower is not supported.&lt;br /&gt;
* 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.&lt;br /&gt;
* Only the master IDE device is accessible by HDCPM.&lt;br /&gt;
* The maximum number of hard disk partition/images supported is four.&lt;br /&gt;
* Only primary partitions are supported.&lt;br /&gt;
* If you want to use CP/M disk images then they must be stored in a FAT16 or FAT32 formatted disk or partition.&lt;br /&gt;
* If the hard disk is partitioned then the CP/M disk images must be placed in the first partition of the disk.&lt;br /&gt;
* The CP/M disk images must be placed in the root directory of the FAT file system.&lt;br /&gt;
* The CP/M disk images must NOT be fragmented and must have the correct size.&lt;br /&gt;
* 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. &lt;br /&gt;
* Only storage devices with 512 bytes sector size are supported.&lt;br /&gt;
* Only storage devices with LBA addressing are supported.&lt;br /&gt;
* Date stamps of CP/M disk image files are not maintained.&lt;br /&gt;
* 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 letters for your IDE media then the corresponding HD20 partitions will be unavailable under CP/M.&lt;br /&gt;
&lt;br /&gt;
==How it works==&lt;br /&gt;
===Using the ROM===&lt;br /&gt;
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:&lt;br /&gt;
|HDCPM (no TIME function support) or |HDCPMT (TIME function support)&amp;lt;br /&amp;gt;&lt;br /&gt;
Alternatively it can be started by holding down the Tab key (no TIME function support) or Shift+Tab (TIME function support), during power-up.&amp;lt;br /&amp;gt;&lt;br /&gt;
===Using the binary===&lt;br /&gt;
HDCPM can be started by running the HDCPM.BIN file from floppy drive or mass storage.&amp;lt;br /&amp;gt;&lt;br /&gt;
===Functions===&lt;br /&gt;
HDCPM will then execute the following functions:&amp;lt;br /&amp;gt;&lt;br /&gt;
* Search for a compatible mass storage interface.&lt;br /&gt;
* Initialize the mass storage interface if needed.&lt;br /&gt;
* Move the boot loader and the CP/M patcher to RAM.&lt;br /&gt;
* Mount 1 to 4 CP/M image files and/or partitions and perform fragmentation and size test.&lt;br /&gt;
* 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.&lt;br /&gt;
* Read the .EMS file from the reserved track and store it in RAM just as the normal CP/M Plus boot loader does.&lt;br /&gt;
* 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.&lt;br /&gt;
* Patch the SCB in order to change the startup/default drive.&lt;br /&gt;
* 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 memory expansion]] or [[Dobbertin Memory Expansion]] driver is present.&lt;br /&gt;
* Move the ALV of the Dk'tronics RAM disk if [[Z-System]] is detected.&lt;br /&gt;
* Patch the CP/M console with the desired colour scheme. &lt;br /&gt;
* Patch the system message.&lt;br /&gt;
* Do a normal CP/M cold start.&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==CP/M Plus disk image files==&lt;br /&gt;
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 [https://hexed.it/ hexed.it] or any hex editor capable of creating binary files filled with a specific pattern.&amp;lt;br /&amp;gt;&lt;br /&gt;
In case of hexed.it select 'New file' fill in 'Size of the new file = 8519680' and 'Fill Pattern = 0xE5' and press apply. Save the file as CPMDSK01.IMG&amp;lt;br /&amp;gt;&lt;br /&gt;
If you have a FAT capable DOS installed in your AMSTRAD you can use the provided MAKEIMG.BAS utility to create your image file. Keep in mind that it takes more than 1.5 hour for a 8MB image file to be created that way.&amp;lt;br /&amp;gt;&lt;br /&gt;
CP/M disk image files can be accessed by a modern computer with [http://www.moria.de/~michael/cpmtools/ cpmtools]. Use the command |HDDEF to see the record you must insert in the diskdefs file.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The HDCPM record for diskdefs is:&lt;br /&gt;
&lt;br /&gt;
       diskdef hdcpm&lt;br /&gt;
          seclen 512&lt;br /&gt;
          tracks 65&lt;br /&gt;
          sectrk 256&lt;br /&gt;
          blocksize 8192&lt;br /&gt;
          maxdir 1024&lt;br /&gt;
          skew 0&lt;br /&gt;
          boottrk 1&lt;br /&gt;
          os 3&lt;br /&gt;
       end&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
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. [https://www.cpcwiki.eu/index.php/Albireo Albireo] incorporates a file management IC that performs FAT file system operations and handles fragmented files properly. In such case fragmented image files is not a problem. HDCPM will never fragment a CP/M image file.&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Hdcpm-boot-m4.png|thumb|HDCPM binary booting on M4 Board]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==CP/M Plus disk/partitions==&lt;br /&gt;
You can also create one or more partitions in order to format them to [http://www.seasip.info/Cpm/format31.html CP/M-80] 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.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM examines the hard disk's MBR upon start and finds the partition information. Then it finds the LBA of the first sector of each partition and passes it to the CP/M hard disk driver. The CP/M hard disk driver doesn't know anything about partitions. It accesses the partition as if it was a real hard disk.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:hdcpm-ui-boot.png|thumb|HDCPM ROM booting on uIDE-16]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
===Using the ROM===&lt;br /&gt;
* Install the HDCPM ROM in a free ROM slot of your ROM box.&lt;br /&gt;
* Plug in your [[SYMBiFACE II]] compatible IDE interface, [[uIDE 16]], [[M4 Board]] or [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] and attach the proper mass storage device.&lt;br /&gt;
* 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 shown inside the parentheses:&amp;lt;br /&amp;gt;&lt;br /&gt;
** (S2): [[SYMBiFACE II]] compatible interface&lt;br /&gt;
** (uI): [[uIDE 16]] interface&lt;br /&gt;
** (M4): [[M4 Board]]&lt;br /&gt;
** (US): [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II]&lt;br /&gt;
** (S3): [http://www.tmtlogic.com/ Symbiface III]&lt;br /&gt;
** (AL): [https://www.cpcwiki.eu/index.php/Albireo Albireo]&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:hdcpm-s2.png|thumb|HDCPM ROM - SYMBiFACE II]]&lt;br /&gt;
|[[File:hdcpm-ui.png|thumb|HDCPM ROM - uIDE-16]]&lt;br /&gt;
|[[File:hdcpm-m4.png|thumb|HDCPM ROM - M4 Board]]&lt;br /&gt;
|[[File:hdcpm-us.png|thumb|HDCPM ROM - USIfAC II]]&lt;br /&gt;
|[[File:hdcpm-s3.png|thumb|HDCPM ROM - Symbiface III]]&lt;br /&gt;
|}&lt;br /&gt;
In case a RTC is detected you will also see the RTC initialization message and the current date and time: ''RTC found: 2021/01/01 12:01:01''&lt;br /&gt;
* Use your original CP/M Plus system disk set to Boot CP/M Plus.&lt;br /&gt;
* 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.&lt;br /&gt;
* Reset your AMSTRAD and boot CP/M from the hard disk with the command |HDCPM. The Boot loader will check your image file(s) against fragmentation and correct size and boot the system to the CP/M command prompt. If the first image file is fragmented or has the wrong length the system will not boot. All other image files will be ignored if found to be fragmented or have the wrong length.&lt;br /&gt;
* In case you don't use CP/M image files just boot the system with |HDCPM or |HDCPMT&lt;br /&gt;
* Copy the files from your CP/M system floppy disks to the first hard disk.&lt;br /&gt;
* Copy any other needed application etc. to your CP/M hard disk(s).&lt;br /&gt;
* You are ready to go.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Using the binary===&lt;br /&gt;
* Plug in your [[SYMBiFACE II]] compatible IDE interface, [[uIDE 16]], [[M4 Board]] or [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] and attach the proper mass storage device.&lt;br /&gt;
* Use your original CP/M Plus system disk set to Boot CP/M Plus.&lt;br /&gt;
* 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.&lt;br /&gt;
* 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.&lt;br /&gt;
* You are ready to go.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==ROM commands==&lt;br /&gt;
[[File:hdcpm-us-boot.png|thumb|HDCPM ROM booting on USIfAC II]]&lt;br /&gt;
* |HDCPM mounts the hard disks and boots CP/M Plus. If [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] is used enable the USB disk with the |USB command first.&lt;br /&gt;
* |HDCPMT works like |HDCPM but also utilizes the RTC.&lt;br /&gt;
* |HDDPB shows the Disk Parameter Block.&lt;br /&gt;
* |HDDEF shows the diskdefs entry for CP/M tools and the file system size.&lt;br /&gt;
* |DATE displays the current date.&lt;br /&gt;
* |TIME displays the current time. If [[M4 Board]] is used |DATE and |TIME will be redirected to M4 |TIME.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==The HDCPM binary file==&lt;br /&gt;
* If [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] is used, use your PC to copy HDCPM.BIN to your USB flash disk. Then insert it to your [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] power up your Amstrad and enable the USB disk with the |USB command.&lt;br /&gt;
* Execute the file from the floppy disk or from your mass storage device with ''RUN&amp;quot;HDCPM&amp;quot;''. 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.&lt;br /&gt;
*  [[M4 Board]] and [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ 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 [https://www.cpcwiki.eu/forum/applications/cubeios-fat16fat32-rom-for-the-cpc's-with-xmass/ CubeMDOS] or [[UniDOS]], installed.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==The MAKEIMG.BAS and MAKEIMG.EXE utilities==&lt;br /&gt;
===MAKEIMG.BAS===&lt;br /&gt;
Although this utility should not be your first option, you can use it to make a new empty CP/M disk image file.&amp;lt;br /&amp;gt;&lt;br /&gt;
In case you decide to use it make sure you have a FAT aware DOS installed in your system. MAKEIMG makes use of the firmware calls CAS_OUT_OPEN, CAS_OUT_CLOSE and CAS_OUT_CHAR so your DOS must support them.&amp;lt;br /&amp;gt;&lt;br /&gt;
Copy the files MAKEIMG.BAS and MAKEIMG.BIN to the root directory of your FAT formatted hard disk and make it your current drive. Run the utility with ''RUN&amp;quot;MAKEIMG&amp;quot;'' and don't hold your breath!&amp;lt;br /&amp;gt;&lt;br /&gt;
Making an image file this way takes more than 1.5 hour for an 8MB file so literally... don't hold your breath.&amp;lt;br /&amp;gt;&lt;br /&gt;
Here is a small tutorial on how to setup and use a CP/M image file: https://youtu.be/GMWsRzNhQTM&amp;lt;br /&amp;gt;&lt;br /&gt;
===MAKEIMG.EXE===&lt;br /&gt;
This utility is a [[SymbOS]] application.&amp;lt;br /&amp;gt;&lt;br /&gt;
Use this utility to create your CP/M hard disk images from within [[SymbOS]]. 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.&amp;lt;br /&amp;gt;&lt;br /&gt;
MAKEIMG.EXE has been developed with [http://www.symbos.de/quigs.htm Quigs] for [[SymbOS]].&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Hdcpm-makeimg-sym1.png|thumb|MAKEIMG.EXE in action]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==The HDMGR.COM utility==&lt;br /&gt;
This is the Hard Disk Manager utility.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can use this utility to get information about your hard disk geometry, disk image files, partitions and boot sector. You have to use this utility to format a hard disk, disk image file or partition to CP/M format or manipulate the boot sector of the hard disk and/or transfer an .EMS system file to the reserved track of the hard disk.&amp;lt;br /&amp;gt;&lt;br /&gt;
The boot sector contains information about the CP/M disk drive letters, start-up drive and console colour scheme. All those properties can be changed with HDMGR.COM.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR will perform a fragmentation test of the discovered CP/M hard disk image files uppon execution.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
The HDMGR.COM utility is self explanatory. Just run it from the CP/M command prompt.&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Hdcpm-hdmgr-m.png|thumb|HDMGR main menu]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-1.png|thumb|HDMGR Hardware information]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-2.png|thumb|HDMGR Partition information]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-3.png|thumb|HDMGR CP/M disk image information]]&lt;br /&gt;
|}&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Hdcpm-hdmgr-4.png|thumb|HDMGR Boot sector information]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-5.png|thumb|HDMGR Log disk]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-7.png|thumb|HDMGR Manage boot sector]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-8.png|thumb|HDMGR Transfer CP/M to disk]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==The RTC.COM utility==&lt;br /&gt;
You can make use of the RTC.COM utility in order to keep CP/M date and time updated.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can synchronize the date and time of CP/M Plus with the RTC by running ''RTC -G'' manually or via your PROFILE.SUB.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can also set your RTC to the current CP/M date and time by running ''RTC -S'' (not for M4 board)&amp;lt;br /&amp;gt;&lt;br /&gt;
Currently RTC.COM works with the RTC found in Symbiface II, Symbiface III and M4 board (read only).&amp;lt;br /&amp;gt;&lt;br /&gt;
DATE.COM, DIR.COM and SHOW.COM commands, patched for Year 2000 compatibility can be downloaded from the [http://www.cpm.z80.de/binary.html CP/M source archive - Digital Research Binary files section] .&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Error messages==&lt;br /&gt;
===Hard disk errors===&lt;br /&gt;
* ''*** No mass storage found ***''&lt;br /&gt;
	No compatible mass storage interface can be found.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: DISK I/O''&lt;br /&gt;
I/O error occurred during the last read/write operation.&lt;br /&gt;
	Your hard disk might be defect or the USB disk is not enabled.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: INVALID BOOT SECTOR''&lt;br /&gt;
	No FAT or CP/M boot sector was found in a not partitioned hard disk.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: INVALID FILE SYSTEM''&lt;br /&gt;
	The first partition in a partitioned hard disk is not a FAT or CP/M-80&lt;br /&gt;
	one.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: INVALID SECTOR SIZE''&lt;br /&gt;
	The hard disk used has a sector size not equal to 512 bytes.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: CPMDSK01.IMG NOT FOUND''&lt;br /&gt;
	The CP/M image file named CPMDSK01.IMG can't be found in the FAT&lt;br /&gt;
	formatted hard disk or partition. &lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: CP/M SYSTEM FILE NOT FOUND''&lt;br /&gt;
	The .EMS CP/M system file can't be found in the system track of your&lt;br /&gt;
	CP/M partition or image file.&lt;br /&gt;
	&lt;br /&gt;
*  ''ERROR: CPMDSK01.IMG IS FRAGMENTED''&lt;br /&gt;
	The first CP/M image file is fragmented, the system won't mount it.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: CPMDSK01.IMG HAS WRONG LENGTH''&lt;br /&gt;
	The first CP/M image file has wrong length, the system won't mount it.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: CPMDSK01.IMG IS NOT FORMATTED''&lt;br /&gt;
	The first CP/M image file is not formatted to CP/M-80 format, the&lt;br /&gt;
	system won't mount it. Use the HDMGR.COM utility to format it.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: INCOMPATIBLE EMS FILE''&lt;br /&gt;
	The .EMS system file that was loaded from the system track is not&lt;br /&gt;
	compatible with HDCPM.&lt;br /&gt;
&lt;br /&gt;
===RTC errors===&lt;br /&gt;
* ''*** Battery depleted ***''&lt;br /&gt;
	The RTC battery is depleted. The RTC driver will continue to operate&lt;br /&gt;
	normally but the readings are not reliable. Replace the RTC battery.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Release info &amp;amp; download==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Version !! Changes !! Download&lt;br /&gt;
|-&lt;br /&gt;
| v1.00 December 2021 || Initial release || [[Media:hdcpm100.dsk|hdcpm100.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.01 January 2022 || HDCPM.ROM, HDMGR.COM: code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: (bug fix) fragmented file detection was not working properly unless the file was CPMDSK01.IMG&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: (bug fix) unformatted image file detection was not working properly. New error message added.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) CP/M drive table wasn't patched properly.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) initialization of floppy drive(s) was corrupted due to misplaced code.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: added .EMS file compatibility check. New error message added.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: added support for Dobbertin RAM disk driver.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: added compatibility with Dobbertin HD20 Harddisc&amp;lt;br /&amp;gt;&lt;br /&gt;
MAKEIMG.EXE: added utility for creating an image file from within SYMBOS.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&lt;br /&gt;
|| [[Media:hdcpm101.dsk|hdcpm101.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.02 March 2022 || HDCPM.ROM, HDMGR.COM: added support for M4 board.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: added support for uIDE-16 interface.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) the ROM was initialized even if no compatible interface was found.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: error message change.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: option &amp;quot;F&amp;quot; has been removed. HDCPM will always do a disk fragmentation test during boot.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: power up message changed in order to provide information about the type of the detected interface.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: two bytes of RAM will be reserved by the ROM for storing the interface type and M4 ROM number.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&lt;br /&gt;
|| [[Media:hdcpm102.dsk|hdcpm102.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.03 April 2022 || HDCPM.ROM, HDMGR.COM: added support for USIfAC II.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) uIDE-16 detection was broken.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&lt;br /&gt;
|| [[Media:hdcpm103.dsk|hdcpm103.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.04 June 2022|| HDCPM.ROM: code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.BIN: added executable binary file version of HDCPM.&lt;br /&gt;
|| [[Media:hdcpm104.dsk|hdcpm104.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.05 July 2022 || HDCPM.ROM, HDCPM.BIN, HDMGR.COM: added support for Symbiface III.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDCPM.BIN:  code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR.COM: Hardware info added for USIfAC II&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR.COM: (bug fix) the 'Select boot file' menu was garbled if there were 8 or more .EMS files present.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&lt;br /&gt;
|| [[Media:hdcpm105.dsk|hdcpm105.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.06 January 2023 || HDCPM.ROM, HDCPM.BIN, HDMGR.COM: added support for Albireo.&amp;lt;br /&amp;gt;&lt;br /&gt;
RTC.COM: added support for M4 Board (r/o) and Symbiface 3.&lt;br /&gt;
HDCPM.ROM, HDCPM.BIN: (bug fix) CPC was freezing after mounting the CP/M disk(s) with incompatible .EMS file.&lt;br /&gt;
HDMGR.COM: (bug fix) the Stack was overflowed in some rare cases.&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&lt;br /&gt;
|| [[Media:hdcpm106.dsk|hdcpm106.dsk]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Other downloads==&lt;br /&gt;
*[[Media:CPMDSK01&amp;amp;02.zip|CP/M disk images]] - CPMDSK01.IMG is bootable and contains all the files of the 3 CP/M Plus system disks and year 2000 compliant binaries downloaded from the [http://www.cpm.z80.de/binary.html Digital Research Binary Files]. CPMDSK02.IMG is empty and can also be used as a template.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Videos==&lt;br /&gt;
* [https://youtu.be/GMWsRzNhQTM How to create and prepare a CP/M image file in a FAT formatted hard disk]&lt;br /&gt;
* [https://youtu.be/nxow6Y5O4Dc Hard disk utilization and dual boot]&lt;br /&gt;
* [https://youtu.be/em7dHOdaylg How to create a CP/M image file under SYMBOS]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
[[category:Expansion ROM]] [[category:Applications]] [[category:CP/M]]&lt;/div&gt;</summary>
		<author><name>D kef</name></author>	</entry>

	<entry>
		<id>https://oldwiki.cpcwiki.eu/index.php?title=HDCPM&amp;diff=109285</id>
		<title>HDCPM</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.cpcwiki.eu/index.php?title=HDCPM&amp;diff=109285"/>
				<updated>2022-09-24T16:26:36Z</updated>
		
		<summary type="html">&lt;p&gt;D kef: /* Videos */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;HDCPM is a Hard Disk boot loader for [[CP/M]] plus developed by d_kef&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can read more about the development of the application here:&amp;lt;br /&amp;gt;&lt;br /&gt;
https://www.cpcwiki.eu/forum/applications/hdcpm-boot-and-run-cpm-plus-from-hard-disk/&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:hdcpm.gif|HDCPM booting CP/M Plus]]&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It comes in the form of:&lt;br /&gt;
* a standard background ROM that can be installed in any available ROM position.&lt;br /&gt;
* a standard binary file that can be loaded from floppy or hard drive.&lt;br /&gt;
&lt;br /&gt;
 	&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following configurations are possible with one hard disk:&lt;br /&gt;
&lt;br /&gt;
* One not partitioned, CP/M formatted hard disk. The whole hard disk is used by CP/M.&lt;br /&gt;
* One to four CP/M formatted partitions. Every partition is accessed as a separate hard disk by CP/M.&lt;br /&gt;
* 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.&lt;br /&gt;
* 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.&lt;br /&gt;
* For interfaces that use SD card or USB flash drive as a mass storage device ([[M4 Board]], [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] or [http://www.tmtlogic.com/ Symbiface III]) the only supported configuration is one to four CP/M disk image files in the root directory of the FAT file system.&lt;br /&gt;
	&lt;br /&gt;
Currently only the master IDE device can be accessed by HDCPM. The slave device is available to be used by your favourite DOS.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
HDCPM can also utilize the RTC found in the [[SYMBiFACE II]] in order to implement CP/M Plus BIOS function 26: TIME.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
HDCPM is compatible and can be used together with the [[Dobbertin Harddisc]].&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
HDCPM distribution disk contains the following files:&lt;br /&gt;
* HDCPM.ROM the ROM itself&lt;br /&gt;
* HDCPM.BIN the executable binary file&lt;br /&gt;
* HDMGR.COM Hard Disk Manager utility&lt;br /&gt;
* RTC.COM RTC synchronization utility&lt;br /&gt;
* MAKEIMG.BAS CP/M image file creation utility&lt;br /&gt;
* MAKEIMG.BIN CP/M image file creation binary&lt;br /&gt;
* MAKEIMG.EXE CP/M image file creation utility for [[SymbOS]]&lt;br /&gt;
* HDCPM.DOC the User guide&lt;br /&gt;
&lt;br /&gt;
HDCPM is free software. It can be used and distributed with no restrictions.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Prerequisites==&lt;br /&gt;
* Amstrad CPC/Plus computer capable of running CP/M Plus.&lt;br /&gt;
* ROM box or other ROM expansion hardware if using the ROM.&lt;br /&gt;
* Optionaly a FAT aware DOS like M4 ROM, USIfAC ROM, [[UniDOS]], [https://www.cpcwiki.eu/forum/applications/cubeios-fat16fat32-rom-for-the-cpc's-with-xmass/ CubeMDOS] etc if using the binary.&lt;br /&gt;
* One of the following mass storage interfaces:&lt;br /&gt;
** [[SYMBiFACE II]]&lt;br /&gt;
** [[X-Mass]]&lt;br /&gt;
** [[uIDE 16]] (base address = &amp;amp;FEF0)&lt;br /&gt;
** [[M4 Board]]&lt;br /&gt;
** [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II]&lt;br /&gt;
** [http://www.tmtlogic.com/ Symbiface III]&lt;br /&gt;
* Compatible storage device with enough free space to accommodate the desirable CP/M hard disk configuration.&lt;br /&gt;
* Floppy disk drive for initialization of the file system.&lt;br /&gt;
* CP/M Plus system disks for making the system bootable.&lt;br /&gt;
* Optionally a [[SYMBiFACE II]] compatible RTC.&lt;br /&gt;
&lt;br /&gt;
==Restrictions==&lt;br /&gt;
* CP/M 2.2 or lower is not supported.&lt;br /&gt;
* 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.&lt;br /&gt;
* Only the master IDE device is accessible by HDCPM.&lt;br /&gt;
* The maximum number of hard disk partition/images supported is four.&lt;br /&gt;
* Only primary partitions are supported.&lt;br /&gt;
* If you want to use CP/M disk images then they must be stored in a FAT16 or FAT32 formatted disk or partition.&lt;br /&gt;
* If the hard disk is partitioned then the CP/M disk images must be placed in the first partition of the disk.&lt;br /&gt;
* The CP/M disk images must be placed in the root directory of the FAT file system.&lt;br /&gt;
* The CP/M disk images must NOT be fragmented and must have the correct size.&lt;br /&gt;
* 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. &lt;br /&gt;
* Only storage devices with 512 bytes sector size are supported.&lt;br /&gt;
* Only storage devices with LBA addressing are supported.&lt;br /&gt;
* Date stamps of CP/M disk image files are not maintained.&lt;br /&gt;
* 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 letters for your IDE media then the corresponding HD20 partitions will be unavailable under CP/M.&lt;br /&gt;
&lt;br /&gt;
==How it works==&lt;br /&gt;
===Using the ROM===&lt;br /&gt;
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:&lt;br /&gt;
|HDCPM (no TIME function support) or |HDCPMT (TIME function support)&amp;lt;br /&amp;gt;&lt;br /&gt;
Alternatively it can be started by holding down the Tab key (no TIME function support) or Shift+Tab (TIME function support), during power-up.&amp;lt;br /&amp;gt;&lt;br /&gt;
===Using the binary===&lt;br /&gt;
HDCPM can be started by running the HDCPM.BIN file from floppy drive or mass storage.&amp;lt;br /&amp;gt;&lt;br /&gt;
===Functions===&lt;br /&gt;
HDCPM will then execute the following functions:&amp;lt;br /&amp;gt;&lt;br /&gt;
* Search for a compatible mass storage interface.&lt;br /&gt;
* Move the boot loader and the CP/M patcher to RAM.&lt;br /&gt;
* Mount 1 to 4 CP/M image files and/or partitions and perform fragmentation and size test.&lt;br /&gt;
* 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.&lt;br /&gt;
* Read the .EMS file from the reserved track and store it in RAM just as the normal CP/M Plus boot loader does.&lt;br /&gt;
* 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.&lt;br /&gt;
* Patch the SCB in order to change the startup/default drive.&lt;br /&gt;
* 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 memory expansion]] or [[Dobbertin Memory Expansion]] driver is present.&lt;br /&gt;
* Move the ALV of the Dk'tronics RAM disk if [[Z-System]] is detected.&lt;br /&gt;
* Patch the CP/M console with the desired colour scheme. &lt;br /&gt;
* Patch the system message.&lt;br /&gt;
* Do a normal CP/M cold start.&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==CP/M Plus disk image files==&lt;br /&gt;
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 [https://hexed.it/ hexed.it] or any hex editor capable of creating binary files filled with a specific pattern.&amp;lt;br /&amp;gt;&lt;br /&gt;
In case of hexed.it select 'New file' fill in 'Size of the new file = 8519680' and 'Fill Pattern = 0xE5' and press apply. Save the file as CPMDSK01.IMG&amp;lt;br /&amp;gt;&lt;br /&gt;
If you have a FAT capable DOS installed in your AMSTRAD you can use the provided MAKEIMG.BAS utility to create your image file. Keep in mind that it takes more than 1.5 hour for a 8MB image file to be created that way.&amp;lt;br /&amp;gt;&lt;br /&gt;
CP/M disk image files can be accessed by a modern computer with [http://www.moria.de/~michael/cpmtools/ cpmtools]. Use the command |HDDEF to see the record you must insert in the diskdefs file.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The HDCPM record for diskdefs is:&lt;br /&gt;
&lt;br /&gt;
       diskdef hdcpm&lt;br /&gt;
          seclen 512&lt;br /&gt;
          tracks 65&lt;br /&gt;
          sectrk 256&lt;br /&gt;
          blocksize 8192&lt;br /&gt;
          maxdir 1024&lt;br /&gt;
          skew 0&lt;br /&gt;
          boottrk 1&lt;br /&gt;
          os 3&lt;br /&gt;
       end&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Hdcpm-boot-m4.png|thumb|HDCPM binary booting on M4 Board]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==CP/M Plus disk/partitions==&lt;br /&gt;
You can also create one or more partitions in order to format them to [http://www.seasip.info/Cpm/format31.html CP/M-80] 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.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM examines the hard disk's MBR upon start and finds the partition information. Then it finds the LBA of the first sector of each partition and passes it to the CP/M hard disk driver. The CP/M hard disk driver doesn't know anything about partitions. It accesses the partition as if it was a real hard disk.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:hdcpm-ui-boot.png|thumb|HDCPM ROM booting on uIDE-16]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
===Using the ROM===&lt;br /&gt;
* Install the HDCPM ROM in a free ROM slot of your ROM box.&lt;br /&gt;
* Plug in your [[SYMBiFACE II]] compatible IDE interface, [[uIDE 16]], [[M4 Board]] or [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] and attach the proper mass storage device.&lt;br /&gt;
* 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 shown inside the parentheses:&amp;lt;br /&amp;gt;&lt;br /&gt;
** (S2): [[SYMBiFACE II]] compatible interface&lt;br /&gt;
** (uI): [[uIDE 16]] interface&lt;br /&gt;
** (M4): [[M4 Board]]&lt;br /&gt;
** (US): [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II]&lt;br /&gt;
** (S3): [http://www.tmtlogic.com/ Symbiface III]&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:hdcpm-s2.png|thumb|HDCPM ROM - SYMBiFACE II]]&lt;br /&gt;
|[[File:hdcpm-ui.png|thumb|HDCPM ROM - uIDE-16]]&lt;br /&gt;
|[[File:hdcpm-m4.png|thumb|HDCPM ROM - M4 Board]]&lt;br /&gt;
|[[File:hdcpm-us.png|thumb|HDCPM ROM - USIfAC II]]&lt;br /&gt;
|[[File:hdcpm-s3.png|thumb|HDCPM ROM - Symbiface III]]&lt;br /&gt;
|}&lt;br /&gt;
In case a RTC is detected you will also see the RTC initialization message and the current date and time: ''RTC found: 2021/01/01 12:01:01''&lt;br /&gt;
* Use your original CP/M Plus system disk set to Boot CP/M Plus.&lt;br /&gt;
* 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.&lt;br /&gt;
* Reset your AMSTRAD and boot CP/M from the hard disk with the command |HDCPM. The Boot loader will check your image file(s) against fragmentation and correct size and boot the system to the CP/M command prompt. If the first image file is fragmented or has the wrong length the system will not boot. All other image files will be ignored if found to be fragmented or have the wrong length.&lt;br /&gt;
* In case you don't use CP/M image files just boot the system with |HDCPM or |HDCPMT&lt;br /&gt;
* Copy the files from your CP/M system floppy disks to the first hard disk.&lt;br /&gt;
* Copy any other needed application etc. to your CP/M hard disk(s).&lt;br /&gt;
* You are ready to go.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Using the binary===&lt;br /&gt;
* Plug in your [[SYMBiFACE II]] compatible IDE interface, [[uIDE 16]], [[M4 Board]] or [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] and attach the proper mass storage device.&lt;br /&gt;
* Use your original CP/M Plus system disk set to Boot CP/M Plus.&lt;br /&gt;
* 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.&lt;br /&gt;
* 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.&lt;br /&gt;
* You are ready to go.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==ROM commands==&lt;br /&gt;
[[File:hdcpm-us-boot.png|thumb|HDCPM ROM booting on USIfAC II]]&lt;br /&gt;
* |HDCPM mounts the hard disks and boots CP/M Plus. If [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] is used enable the USB disk with the |USB command first.&lt;br /&gt;
* |HDCPMT works like |HDCPM but also utilizes the RTC.&lt;br /&gt;
* |HDDPB shows the Disk Parameter Block.&lt;br /&gt;
* |HDDEF shows the diskdefs entry for CP/M tools and the file system size.&lt;br /&gt;
* |DATE displays the current date.&lt;br /&gt;
* |TIME displays the current time. If [[M4 Board]] is used |DATE and |TIME will be redirected to M4 |TIME.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==The HDCPM binary file==&lt;br /&gt;
* If [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] is used, use your PC to copy HDCPM.BIN to your USB flash disk. Then insert it to your [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] power up your Amstrad and enable the USB disk with the |USB command.&lt;br /&gt;
* Execute the file from the floppy disk or from your mass storage device with ''RUN&amp;quot;HDCPM&amp;quot;''. 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.&lt;br /&gt;
*  [[M4 Board]] and [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ 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 [https://www.cpcwiki.eu/forum/applications/cubeios-fat16fat32-rom-for-the-cpc's-with-xmass/ CubeMDOS] or [[UniDOS]], installed.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==The MAKEIMG.BAS and MAKEIMG.EXE utilities==&lt;br /&gt;
===MAKEIMG.BAS===&lt;br /&gt;
Although this utility should not be your first option, you can use it to make a new empty CP/M disk image file.&amp;lt;br /&amp;gt;&lt;br /&gt;
In case you decide to use it make sure you have a FAT aware DOS installed in your system. MAKEIMG makes use of the firmware calls CAS_OUT_OPEN, CAS_OUT_CLOSE and CAS_OUT_CHAR so your DOS must support them.&amp;lt;br /&amp;gt;&lt;br /&gt;
Copy the files MAKEIMG.BAS and MAKEIMG.BIN to the root directory of your FAT formatted hard disk and make it your current drive. Run the utility with ''RUN&amp;quot;MAKEIMG&amp;quot;'' and don't hold your breath!&amp;lt;br /&amp;gt;&lt;br /&gt;
Making an image file this way takes more than 1.5 hour for an 8MB file so literally... don't hold your breath.&amp;lt;br /&amp;gt;&lt;br /&gt;
Here is a small tutorial on how to setup and use a CP/M image file: https://youtu.be/GMWsRzNhQTM&amp;lt;br /&amp;gt;&lt;br /&gt;
===MAKEIMG.EXE===&lt;br /&gt;
This utility is a [[SymbOS]] application.&amp;lt;br /&amp;gt;&lt;br /&gt;
Use this utility to create your CP/M hard disk images from within [[SymbOS]]. 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.&amp;lt;br /&amp;gt;&lt;br /&gt;
MAKEIMG.EXE has been developed with [http://www.symbos.de/quigs.htm Quigs] for [[SymbOS]].&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Hdcpm-makeimg-sym1.png|thumb|MAKEIMG.EXE in action]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==The HDMGR.COM utility==&lt;br /&gt;
This is the Hard Disk Manager utility.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can use this utility to get information about your hard disk geometry, disk image files, partitions and boot sector. You have to use this utility to format a hard disk, disk image file or partition to CP/M format or manipulate the boot sector of the hard disk and/or transfer an .EMS system file to the reserved track of the hard disk.&amp;lt;br /&amp;gt;&lt;br /&gt;
The boot sector contains information about the CP/M disk drive letters, start-up drive and console colour scheme. All those properties can be changed with HDMGR.COM.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR will perform a fragmentation test of the discovered CP/M hard disk image files uppon execution.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
The HDMGR.COM utility is self explanatory. Just run it from the CP/M command prompt.&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Hdcpm-hdmgr-m.png|thumb|HDMGR main menu]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-1.png|thumb|HDMGR Hardware information]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-2.png|thumb|HDMGR Partition information]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-3.png|thumb|HDMGR CP/M disk image information]]&lt;br /&gt;
|}&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Hdcpm-hdmgr-4.png|thumb|HDMGR Boot sector information]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-5.png|thumb|HDMGR Log disk]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-7.png|thumb|HDMGR Manage boot sector]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-8.png|thumb|HDMGR Transfer CP/M to disk]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==The RTC.COM utility==&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can synchronize the date and time of CP/M Plus with the RTC by running ''RTC -G'' manually or via your PROFILE.SUB&amp;lt;br /&amp;gt;&lt;br /&gt;
You can also set your RTC to the current CP/M date and time by running ''RTC -S''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Error messages==&lt;br /&gt;
===Hard disk errors===&lt;br /&gt;
* ''*** No mass storage found ***''&lt;br /&gt;
	No compatible mass storage interface can be found.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: DISK I/O''&lt;br /&gt;
I/O error occurred during the last read/write operation.&lt;br /&gt;
	Your hard disk might be defect or the USB disk is not enabled.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: INVALID BOOT SECTOR''&lt;br /&gt;
	No FAT or CP/M boot sector was found in a not partitioned hard disk.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: INVALID FILE SYSTEM''&lt;br /&gt;
	The first partition in a partitioned hard disk is not a FAT or CP/M-80&lt;br /&gt;
	one.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: INVALID SECTOR SIZE''&lt;br /&gt;
	The hard disk used has a sector size not equal to 512 bytes.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: CPMDSK01.IMG NOT FOUND''&lt;br /&gt;
	The CP/M image file named CPMDSK01.IMG can't be found in the FAT&lt;br /&gt;
	formatted hard disk or partition. &lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: CP/M SYSTEM FILE NOT FOUND''&lt;br /&gt;
	The .EMS CP/M system file can't be found in the system track of your&lt;br /&gt;
	CP/M partition or image file.&lt;br /&gt;
	&lt;br /&gt;
*  ''ERROR: CPMDSK01.IMG IS FRAGMENTED''&lt;br /&gt;
	The first CP/M image file is fragmented, the system won't mount it.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: CPMDSK01.IMG HAS WRONG LENGTH''&lt;br /&gt;
	The first CP/M image file has wrong length, the system won't mount it.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: CPMDSK01.IMG IS NOT FORMATTED''&lt;br /&gt;
	The first CP/M image file is not formatted to CP/M-80 format, the&lt;br /&gt;
	system won't mount it. Use the HDMGR.COM utility to format it.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: INCOMPATIBLE EMS FILE''&lt;br /&gt;
	The .EMS system file that was loaded from the system track is not&lt;br /&gt;
	compatible with HDCPM.&lt;br /&gt;
&lt;br /&gt;
===RTC errors===&lt;br /&gt;
* ''*** Battery depleted ***''&lt;br /&gt;
	The RTC battery is depleted. The RTC driver will continue to operate&lt;br /&gt;
	normally but the readings are not reliable. Replace the RTC battery.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Release info &amp;amp; download==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Version !! Changes !! Download&lt;br /&gt;
|-&lt;br /&gt;
| v1.00 December 2021 || Initial release || [[Media:hdcpm100.dsk|hdcpm100.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.01 January 2022 || HDCPM.ROM, HDMGR.COM: code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: (bug fix) fragmented file detection was not working properly unless the file was CPMDSK01.IMG&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: (bug fix) unformatted image file detection was not working properly. New error message added.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) CP/M drive table wasn't patched properly.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) initialization of floppy drive(s) was corrupted due to misplaced code.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: added .EMS file compatibility check. New error message added.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: added support for Dobbertin RAM disk driver.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: added compatibility with Dobbertin HD20 Harddisc&amp;lt;br /&amp;gt;&lt;br /&gt;
MAKEIMG.EXE: added utility for creating an image file from within SYMBOS.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&lt;br /&gt;
|| [[Media:hdcpm101.dsk|hdcpm101.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.02 March 2022 || HDCPM.ROM, HDMGR.COM: added support for M4 board.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: added support for uIDE-16 interface.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) the ROM was initialized even if no compatible interface was found.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: error message change.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: option &amp;quot;F&amp;quot; has been removed. HDCPM will always do a disk fragmentation test during boot.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: power up message changed in order to provide information about the type of the detected interface.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: two bytes of RAM will be reserved by the ROM for storing the interface type and M4 ROM number.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&lt;br /&gt;
|| [[Media:hdcpm102.dsk|hdcpm102.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.03 April 2022 || HDCPM.ROM, HDMGR.COM: added support for USIfAC II.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) uIDE-16 detection was broken.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&lt;br /&gt;
|| [[Media:hdcpm103.dsk|hdcpm103.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.04 June 2022|| HDCPM.ROM: code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.BIN: added executable binary file version of HDCPM.&lt;br /&gt;
|| [[Media:hdcpm104.dsk|hdcpm104.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.05 July 2022 || HDCPM.ROM, HDCPM.BIN, HDMGR.COM: added support for Symbiface III&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDCPM.BIN:  code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR.COM: Hardware info added for USIfAC II&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR.COM: (bug fix) the 'Select boot file' menu was garbled if there were 8 or more .EMS files present.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&lt;br /&gt;
|| [[Media:hdcpm105.dsk|hdcpm105.dsk]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Other downloads==&lt;br /&gt;
*[[Media:CPMDSK01&amp;amp;02.zip|CP/M disk images]] - CPMDSK01.IMG is bootable and contains all the files of the 3 CP/M Plus system disks and year 2000 compliant binaries downloaded from the [http://www.cpm.z80.de/binary.html Digital Research Binary Files]. CPMDSK02.IMG is empty and can also be used as a template.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Videos==&lt;br /&gt;
* [https://youtu.be/GMWsRzNhQTM How to create and prepare a CP/M image file in a FAT formatted hard disk]&lt;br /&gt;
* [https://youtu.be/nxow6Y5O4Dc Hard disk utilization and dual boot]&lt;br /&gt;
* [https://youtu.be/em7dHOdaylg How to create a CP/M image file under SYMBOS]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
[[category:Expansion ROM]] [[category:Applications]] [[category:CP/M]]&lt;/div&gt;</summary>
		<author><name>D kef</name></author>	</entry>

	<entry>
		<id>https://oldwiki.cpcwiki.eu/index.php?title=HDCPM&amp;diff=109281</id>
		<title>HDCPM</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.cpcwiki.eu/index.php?title=HDCPM&amp;diff=109281"/>
				<updated>2022-09-18T19:59:13Z</updated>
		
		<summary type="html">&lt;p&gt;D kef: /* Using the ROM */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;HDCPM is a Hard Disk boot loader for [[CP/M]] plus developed by d_kef&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can read more about the development of the application here:&amp;lt;br /&amp;gt;&lt;br /&gt;
https://www.cpcwiki.eu/forum/applications/hdcpm-boot-and-run-cpm-plus-from-hard-disk/&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:hdcpm.gif|HDCPM booting CP/M Plus]]&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It comes in the form of:&lt;br /&gt;
* a standard background ROM that can be installed in any available ROM position.&lt;br /&gt;
* a standard binary file that can be loaded from floppy or hard drive.&lt;br /&gt;
&lt;br /&gt;
 	&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following configurations are possible with one hard disk:&lt;br /&gt;
&lt;br /&gt;
* One not partitioned, CP/M formatted hard disk. The whole hard disk is used by CP/M.&lt;br /&gt;
* One to four CP/M formatted partitions. Every partition is accessed as a separate hard disk by CP/M.&lt;br /&gt;
* 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.&lt;br /&gt;
* 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.&lt;br /&gt;
* For interfaces that use SD card or USB flash drive as a mass storage device ([[M4 Board]], [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] or [http://www.tmtlogic.com/ Symbiface III]) the only supported configuration is one to four CP/M disk image files in the root directory of the FAT file system.&lt;br /&gt;
	&lt;br /&gt;
Currently only the master IDE device can be accessed by HDCPM. The slave device is available to be used by your favourite DOS.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
HDCPM can also utilize the RTC found in the [[SYMBiFACE II]] in order to implement CP/M Plus BIOS function 26: TIME.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
HDCPM is compatible and can be used together with the [[Dobbertin Harddisc]].&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
HDCPM distribution disk contains the following files:&lt;br /&gt;
* HDCPM.ROM the ROM itself&lt;br /&gt;
* HDCPM.BIN the executable binary file&lt;br /&gt;
* HDMGR.COM Hard Disk Manager utility&lt;br /&gt;
* RTC.COM RTC synchronization utility&lt;br /&gt;
* MAKEIMG.BAS CP/M image file creation utility&lt;br /&gt;
* MAKEIMG.BIN CP/M image file creation binary&lt;br /&gt;
* MAKEIMG.EXE CP/M image file creation utility for [[SymbOS]]&lt;br /&gt;
* HDCPM.DOC the User guide&lt;br /&gt;
&lt;br /&gt;
HDCPM is free software. It can be used and distributed with no restrictions.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Prerequisites==&lt;br /&gt;
* Amstrad CPC/Plus computer capable of running CP/M Plus.&lt;br /&gt;
* ROM box or other ROM expansion hardware if using the ROM.&lt;br /&gt;
* Optionaly a FAT aware DOS like M4 ROM, USIfAC ROM, [[UniDOS]], [https://www.cpcwiki.eu/forum/applications/cubeios-fat16fat32-rom-for-the-cpc's-with-xmass/ CubeMDOS] etc if using the binary.&lt;br /&gt;
* One of the following mass storage interfaces:&lt;br /&gt;
** [[SYMBiFACE II]]&lt;br /&gt;
** [[X-Mass]]&lt;br /&gt;
** [[uIDE 16]] (base address = &amp;amp;FEF0)&lt;br /&gt;
** [[M4 Board]]&lt;br /&gt;
** [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II]&lt;br /&gt;
** [http://www.tmtlogic.com/ Symbiface III]&lt;br /&gt;
* Compatible storage device with enough free space to accommodate the desirable CP/M hard disk configuration.&lt;br /&gt;
* Floppy disk drive for initialization of the file system.&lt;br /&gt;
* CP/M Plus system disks for making the system bootable.&lt;br /&gt;
* Optionally a [[SYMBiFACE II]] compatible RTC.&lt;br /&gt;
&lt;br /&gt;
==Restrictions==&lt;br /&gt;
* CP/M 2.2 or lower is not supported.&lt;br /&gt;
* 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.&lt;br /&gt;
* Only the master IDE device is accessible by HDCPM.&lt;br /&gt;
* The maximum number of hard disk partition/images supported is four.&lt;br /&gt;
* Only primary partitions are supported.&lt;br /&gt;
* If you want to use CP/M disk images then they must be stored in a FAT16 or FAT32 formatted disk or partition.&lt;br /&gt;
* If the hard disk is partitioned then the CP/M disk images must be placed in the first partition of the disk.&lt;br /&gt;
* The CP/M disk images must be placed in the root directory of the FAT file system.&lt;br /&gt;
* The CP/M disk images must NOT be fragmented and must have the correct size.&lt;br /&gt;
* 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. &lt;br /&gt;
* Only storage devices with 512 bytes sector size are supported.&lt;br /&gt;
* Only storage devices with LBA addressing are supported.&lt;br /&gt;
* Date stamps of CP/M disk image files are not maintained.&lt;br /&gt;
* 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 letters for your IDE media then the corresponding HD20 partitions will be unavailable under CP/M.&lt;br /&gt;
&lt;br /&gt;
==How it works==&lt;br /&gt;
===Using the ROM===&lt;br /&gt;
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:&lt;br /&gt;
|HDCPM (no TIME function support) or |HDCPMT (TIME function support)&amp;lt;br /&amp;gt;&lt;br /&gt;
Alternatively it can be started by holding down the Tab key (no TIME function support) or Shift+Tab (TIME function support), during power-up.&amp;lt;br /&amp;gt;&lt;br /&gt;
===Using the binary===&lt;br /&gt;
HDCPM can be started by running the HDCPM.BIN file from floppy drive or mass storage.&amp;lt;br /&amp;gt;&lt;br /&gt;
===Functions===&lt;br /&gt;
HDCPM will then execute the following functions:&amp;lt;br /&amp;gt;&lt;br /&gt;
* Search for a compatible mass storage interface.&lt;br /&gt;
* Move the boot loader and the CP/M patcher to RAM.&lt;br /&gt;
* Mount 1 to 4 CP/M image files and/or partitions and perform fragmentation and size test.&lt;br /&gt;
* 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.&lt;br /&gt;
* Read the .EMS file from the reserved track and store it in RAM just as the normal CP/M Plus boot loader does.&lt;br /&gt;
* 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.&lt;br /&gt;
* Patch the SCB in order to change the startup/default drive.&lt;br /&gt;
* 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 memory expansion]] or [[Dobbertin Memory Expansion]] driver is present.&lt;br /&gt;
* Move the ALV of the Dk'tronics RAM disk if [[Z-System]] is detected.&lt;br /&gt;
* Patch the CP/M console with the desired colour scheme. &lt;br /&gt;
* Patch the system message.&lt;br /&gt;
* Do a normal CP/M cold start.&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==CP/M Plus disk image files==&lt;br /&gt;
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 [https://hexed.it/ hexed.it] or any hex editor capable of creating binary files filled with a specific pattern.&amp;lt;br /&amp;gt;&lt;br /&gt;
In case of hexed.it select 'New file' fill in 'Size of the new file = 8519680' and 'Fill Pattern = 0xE5' and press apply. Save the file as CPMDSK01.IMG&amp;lt;br /&amp;gt;&lt;br /&gt;
If you have a FAT capable DOS installed in your AMSTRAD you can use the provided MAKEIMG.BAS utility to create your image file. Keep in mind that it takes more than 1.5 hour for a 8MB image file to be created that way.&amp;lt;br /&amp;gt;&lt;br /&gt;
CP/M disk image files can be accessed by a modern computer with [http://www.moria.de/~michael/cpmtools/ cpmtools]. Use the command |HDDEF to see the record you must insert in the diskdefs file.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The HDCPM record for diskdefs is:&lt;br /&gt;
&lt;br /&gt;
       diskdef hdcpm&lt;br /&gt;
          seclen 512&lt;br /&gt;
          tracks 65&lt;br /&gt;
          sectrk 256&lt;br /&gt;
          blocksize 8192&lt;br /&gt;
          maxdir 1024&lt;br /&gt;
          skew 0&lt;br /&gt;
          boottrk 1&lt;br /&gt;
          os 3&lt;br /&gt;
       end&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Hdcpm-boot-m4.png|thumb|HDCPM binary booting on M4 Board]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==CP/M Plus disk/partitions==&lt;br /&gt;
You can also create one or more partitions in order to format them to [http://www.seasip.info/Cpm/format31.html CP/M-80] 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.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM examines the hard disk's MBR upon start and finds the partition information. Then it finds the LBA of the first sector of each partition and passes it to the CP/M hard disk driver. The CP/M hard disk driver doesn't know anything about partitions. It accesses the partition as if it was a real hard disk.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:hdcpm-ui-boot.png|thumb|HDCPM ROM booting on uIDE-16]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
===Using the ROM===&lt;br /&gt;
* Install the HDCPM ROM in a free ROM slot of your ROM box.&lt;br /&gt;
* Plug in your [[SYMBiFACE II]] compatible IDE interface, [[uIDE 16]], [[M4 Board]] or [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] and attach the proper mass storage device.&lt;br /&gt;
* 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 shown inside the parentheses:&amp;lt;br /&amp;gt;&lt;br /&gt;
** (S2): [[SYMBiFACE II]] compatible interface&lt;br /&gt;
** (uI): [[uIDE 16]] interface&lt;br /&gt;
** (M4): [[M4 Board]]&lt;br /&gt;
** (US): [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II]&lt;br /&gt;
** (S3): [http://www.tmtlogic.com/ Symbiface III]&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:hdcpm-s2.png|thumb|HDCPM ROM - SYMBiFACE II]]&lt;br /&gt;
|[[File:hdcpm-ui.png|thumb|HDCPM ROM - uIDE-16]]&lt;br /&gt;
|[[File:hdcpm-m4.png|thumb|HDCPM ROM - M4 Board]]&lt;br /&gt;
|[[File:hdcpm-us.png|thumb|HDCPM ROM - USIfAC II]]&lt;br /&gt;
|[[File:hdcpm-s3.png|thumb|HDCPM ROM - Symbiface III]]&lt;br /&gt;
|}&lt;br /&gt;
In case a RTC is detected you will also see the RTC initialization message and the current date and time: ''RTC found: 2021/01/01 12:01:01''&lt;br /&gt;
* Use your original CP/M Plus system disk set to Boot CP/M Plus.&lt;br /&gt;
* 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.&lt;br /&gt;
* Reset your AMSTRAD and boot CP/M from the hard disk with the command |HDCPM. The Boot loader will check your image file(s) against fragmentation and correct size and boot the system to the CP/M command prompt. If the first image file is fragmented or has the wrong length the system will not boot. All other image files will be ignored if found to be fragmented or have the wrong length.&lt;br /&gt;
* In case you don't use CP/M image files just boot the system with |HDCPM or |HDCPMT&lt;br /&gt;
* Copy the files from your CP/M system floppy disks to the first hard disk.&lt;br /&gt;
* Copy any other needed application etc. to your CP/M hard disk(s).&lt;br /&gt;
* You are ready to go.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Using the binary===&lt;br /&gt;
* Plug in your [[SYMBiFACE II]] compatible IDE interface, [[uIDE 16]], [[M4 Board]] or [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] and attach the proper mass storage device.&lt;br /&gt;
* Use your original CP/M Plus system disk set to Boot CP/M Plus.&lt;br /&gt;
* 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.&lt;br /&gt;
* 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.&lt;br /&gt;
* You are ready to go.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==ROM commands==&lt;br /&gt;
[[File:hdcpm-us-boot.png|thumb|HDCPM ROM booting on USIfAC II]]&lt;br /&gt;
* |HDCPM mounts the hard disks and boots CP/M Plus. If [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] is used enable the USB disk with the |USB command first.&lt;br /&gt;
* |HDCPMT works like |HDCPM but also utilizes the RTC.&lt;br /&gt;
* |HDDPB shows the Disk Parameter Block.&lt;br /&gt;
* |HDDEF shows the diskdefs entry for CP/M tools and the file system size.&lt;br /&gt;
* |DATE displays the current date.&lt;br /&gt;
* |TIME displays the current time. If [[M4 Board]] is used |DATE and |TIME will be redirected to M4 |TIME.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==The HDCPM binary file==&lt;br /&gt;
* If [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] is used, use your PC to copy HDCPM.BIN to your USB flash disk. Then insert it to your [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] power up your Amstrad and enable the USB disk with the |USB command.&lt;br /&gt;
* Execute the file from the floppy disk or from your mass storage device with ''RUN&amp;quot;HDCPM&amp;quot;''. 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.&lt;br /&gt;
*  [[M4 Board]] and [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ 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 [https://www.cpcwiki.eu/forum/applications/cubeios-fat16fat32-rom-for-the-cpc's-with-xmass/ CubeMDOS] or [[UniDOS]], installed.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==The MAKEIMG.BAS and MAKEIMG.EXE utilities==&lt;br /&gt;
===MAKEIMG.BAS===&lt;br /&gt;
Although this utility should not be your first option, you can use it to make a new empty CP/M disk image file.&amp;lt;br /&amp;gt;&lt;br /&gt;
In case you decide to use it make sure you have a FAT aware DOS installed in your system. MAKEIMG makes use of the firmware calls CAS_OUT_OPEN, CAS_OUT_CLOSE and CAS_OUT_CHAR so your DOS must support them.&amp;lt;br /&amp;gt;&lt;br /&gt;
Copy the files MAKEIMG.BAS and MAKEIMG.BIN to the root directory of your FAT formatted hard disk and make it your current drive. Run the utility with ''RUN&amp;quot;MAKEIMG&amp;quot;'' and don't hold your breath!&amp;lt;br /&amp;gt;&lt;br /&gt;
Making an image file this way takes more than 1.5 hour for an 8MB file so literally... don't hold your breath.&amp;lt;br /&amp;gt;&lt;br /&gt;
Here is a small tutorial on how to setup and use a CP/M image file: https://youtu.be/GMWsRzNhQTM&amp;lt;br /&amp;gt;&lt;br /&gt;
===MAKEIMG.EXE===&lt;br /&gt;
This utility is a [[SymbOS]] application.&amp;lt;br /&amp;gt;&lt;br /&gt;
Use this utility to create your CP/M hard disk images from within [[SymbOS]]. 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.&amp;lt;br /&amp;gt;&lt;br /&gt;
MAKEIMG.EXE has been developed with [http://www.symbos.de/quigs.htm Quigs] for [[SymbOS]].&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Hdcpm-makeimg-sym1.png|thumb|MAKEIMG.EXE in action]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==The HDMGR.COM utility==&lt;br /&gt;
This is the Hard Disk Manager utility.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can use this utility to get information about your hard disk geometry, disk image files, partitions and boot sector. You have to use this utility to format a hard disk, disk image file or partition to CP/M format or manipulate the boot sector of the hard disk and/or transfer an .EMS system file to the reserved track of the hard disk.&amp;lt;br /&amp;gt;&lt;br /&gt;
The boot sector contains information about the CP/M disk drive letters, start-up drive and console colour scheme. All those properties can be changed with HDMGR.COM.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR will perform a fragmentation test of the discovered CP/M hard disk image files uppon execution.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
The HDMGR.COM utility is self explanatory. Just run it from the CP/M command prompt.&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Hdcpm-hdmgr-m.png|thumb|HDMGR main menu]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-1.png|thumb|HDMGR Hardware information]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-2.png|thumb|HDMGR Partition information]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-3.png|thumb|HDMGR CP/M disk image information]]&lt;br /&gt;
|}&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Hdcpm-hdmgr-4.png|thumb|HDMGR Boot sector information]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-5.png|thumb|HDMGR Log disk]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-7.png|thumb|HDMGR Manage boot sector]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-8.png|thumb|HDMGR Transfer CP/M to disk]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==The RTC.COM utility==&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can synchronize the date and time of CP/M Plus with the RTC by running ''RTC -G'' manually or via your PROFILE.SUB&amp;lt;br /&amp;gt;&lt;br /&gt;
You can also set your RTC to the current CP/M date and time by running ''RTC -S''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Error messages==&lt;br /&gt;
===Hard disk errors===&lt;br /&gt;
* ''*** No mass storage found ***''&lt;br /&gt;
	No compatible mass storage interface can be found.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: DISK I/O''&lt;br /&gt;
I/O error occurred during the last read/write operation.&lt;br /&gt;
	Your hard disk might be defect or the USB disk is not enabled.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: INVALID BOOT SECTOR''&lt;br /&gt;
	No FAT or CP/M boot sector was found in a not partitioned hard disk.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: INVALID FILE SYSTEM''&lt;br /&gt;
	The first partition in a partitioned hard disk is not a FAT or CP/M-80&lt;br /&gt;
	one.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: INVALID SECTOR SIZE''&lt;br /&gt;
	The hard disk used has a sector size not equal to 512 bytes.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: CPMDSK01.IMG NOT FOUND''&lt;br /&gt;
	The CP/M image file named CPMDSK01.IMG can't be found in the FAT&lt;br /&gt;
	formatted hard disk or partition. &lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: CP/M SYSTEM FILE NOT FOUND''&lt;br /&gt;
	The .EMS CP/M system file can't be found in the system track of your&lt;br /&gt;
	CP/M partition or image file.&lt;br /&gt;
	&lt;br /&gt;
*  ''ERROR: CPMDSK01.IMG IS FRAGMENTED''&lt;br /&gt;
	The first CP/M image file is fragmented, the system won't mount it.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: CPMDSK01.IMG HAS WRONG LENGTH''&lt;br /&gt;
	The first CP/M image file has wrong length, the system won't mount it.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: CPMDSK01.IMG IS NOT FORMATTED''&lt;br /&gt;
	The first CP/M image file is not formatted to CP/M-80 format, the&lt;br /&gt;
	system won't mount it. Use the HDMGR.COM utility to format it.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: INCOMPATIBLE EMS FILE''&lt;br /&gt;
	The .EMS system file that was loaded from the system track is not&lt;br /&gt;
	compatible with HDCPM.&lt;br /&gt;
&lt;br /&gt;
===RTC errors===&lt;br /&gt;
* ''*** Battery depleted ***''&lt;br /&gt;
	The RTC battery is depleted. The RTC driver will continue to operate&lt;br /&gt;
	normally but the readings are not reliable. Replace the RTC battery.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Release info &amp;amp; download==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Version !! Changes !! Download&lt;br /&gt;
|-&lt;br /&gt;
| v1.00 December 2021 || Initial release || [[Media:hdcpm100.dsk|hdcpm100.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.01 January 2022 || HDCPM.ROM, HDMGR.COM: code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: (bug fix) fragmented file detection was not working properly unless the file was CPMDSK01.IMG&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: (bug fix) unformatted image file detection was not working properly. New error message added.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) CP/M drive table wasn't patched properly.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) initialization of floppy drive(s) was corrupted due to misplaced code.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: added .EMS file compatibility check. New error message added.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: added support for Dobbertin RAM disk driver.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: added compatibility with Dobbertin HD20 Harddisc&amp;lt;br /&amp;gt;&lt;br /&gt;
MAKEIMG.EXE: added utility for creating an image file from within SYMBOS.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&lt;br /&gt;
|| [[Media:hdcpm101.dsk|hdcpm101.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.02 March 2022 || HDCPM.ROM, HDMGR.COM: added support for M4 board.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: added support for uIDE-16 interface.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) the ROM was initialized even if no compatible interface was found.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: error message change.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: option &amp;quot;F&amp;quot; has been removed. HDCPM will always do a disk fragmentation test during boot.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: power up message changed in order to provide information about the type of the detected interface.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: two bytes of RAM will be reserved by the ROM for storing the interface type and M4 ROM number.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&lt;br /&gt;
|| [[Media:hdcpm102.dsk|hdcpm102.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.03 April 2022 || HDCPM.ROM, HDMGR.COM: added support for USIfAC II.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) uIDE-16 detection was broken.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&lt;br /&gt;
|| [[Media:hdcpm103.dsk|hdcpm103.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.04 June 2022|| HDCPM.ROM: code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.BIN: added executable binary file version of HDCPM.&lt;br /&gt;
|| [[Media:hdcpm104.dsk|hdcpm104.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.05 July 2022 || HDCPM.ROM, HDCPM.BIN, HDMGR.COM: added support for Symbiface III&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDCPM.BIN:  code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR.COM: Hardware info added for USIfAC II&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR.COM: (bug fix) the 'Select boot file' menu was garbled if there were 8 or more .EMS files present.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&lt;br /&gt;
|| [[Media:hdcpm105.dsk|hdcpm105.dsk]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Other downloads==&lt;br /&gt;
*[[Media:CPMDSK01&amp;amp;02.zip|CP/M disk images]] - CPMDSK01.IMG is bootable and contains all the files of the 3 CP/M Plus system disks and year 2000 compliant binaries downloaded from the [http://www.cpm.z80.de/binary.html Digital Research Binary Files]. CPMDSK02.IMG is empty and can also be used as a template.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Videos==&lt;br /&gt;
* [https://youtu.be/GMWsRzNhQTM How to create and prepare a CP/M image file in a FAT formatted hard disk]&lt;br /&gt;
* [https://youtu.be/nxow6Y5O4Dc Hard disk utilization and dual boot]&lt;br /&gt;
* [https://youtu.be/em7dHOdaylg How to create a CP/M image file under SYMBOS]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
[[category:Expansion ROM]] [[category:Software]] [[category:Applications]] [[category:CP/M]] [[category:DSK images]]&lt;/div&gt;</summary>
		<author><name>D kef</name></author>	</entry>

	<entry>
		<id>https://oldwiki.cpcwiki.eu/index.php?title=HDCPM&amp;diff=109280</id>
		<title>HDCPM</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.cpcwiki.eu/index.php?title=HDCPM&amp;diff=109280"/>
				<updated>2022-09-18T19:48:01Z</updated>
		
		<summary type="html">&lt;p&gt;D kef: /* Restrictions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;HDCPM is a Hard Disk boot loader for [[CP/M]] plus developed by d_kef&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can read more about the development of the application here:&amp;lt;br /&amp;gt;&lt;br /&gt;
https://www.cpcwiki.eu/forum/applications/hdcpm-boot-and-run-cpm-plus-from-hard-disk/&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:hdcpm.gif|HDCPM booting CP/M Plus]]&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It comes in the form of:&lt;br /&gt;
* a standard background ROM that can be installed in any available ROM position.&lt;br /&gt;
* a standard binary file that can be loaded from floppy or hard drive.&lt;br /&gt;
&lt;br /&gt;
 	&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following configurations are possible with one hard disk:&lt;br /&gt;
&lt;br /&gt;
* One not partitioned, CP/M formatted hard disk. The whole hard disk is used by CP/M.&lt;br /&gt;
* One to four CP/M formatted partitions. Every partition is accessed as a separate hard disk by CP/M.&lt;br /&gt;
* 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.&lt;br /&gt;
* 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.&lt;br /&gt;
* For interfaces that use SD card or USB flash drive as a mass storage device ([[M4 Board]], [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] or [http://www.tmtlogic.com/ Symbiface III]) the only supported configuration is one to four CP/M disk image files in the root directory of the FAT file system.&lt;br /&gt;
	&lt;br /&gt;
Currently only the master IDE device can be accessed by HDCPM. The slave device is available to be used by your favourite DOS.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
HDCPM can also utilize the RTC found in the [[SYMBiFACE II]] in order to implement CP/M Plus BIOS function 26: TIME.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
HDCPM is compatible and can be used together with the [[Dobbertin Harddisc]].&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
HDCPM distribution disk contains the following files:&lt;br /&gt;
* HDCPM.ROM the ROM itself&lt;br /&gt;
* HDCPM.BIN the executable binary file&lt;br /&gt;
* HDMGR.COM Hard Disk Manager utility&lt;br /&gt;
* RTC.COM RTC synchronization utility&lt;br /&gt;
* MAKEIMG.BAS CP/M image file creation utility&lt;br /&gt;
* MAKEIMG.BIN CP/M image file creation binary&lt;br /&gt;
* MAKEIMG.EXE CP/M image file creation utility for [[SymbOS]]&lt;br /&gt;
* HDCPM.DOC the User guide&lt;br /&gt;
&lt;br /&gt;
HDCPM is free software. It can be used and distributed with no restrictions.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Prerequisites==&lt;br /&gt;
* Amstrad CPC/Plus computer capable of running CP/M Plus.&lt;br /&gt;
* ROM box or other ROM expansion hardware if using the ROM.&lt;br /&gt;
* Optionaly a FAT aware DOS like M4 ROM, USIfAC ROM, [[UniDOS]], [https://www.cpcwiki.eu/forum/applications/cubeios-fat16fat32-rom-for-the-cpc's-with-xmass/ CubeMDOS] etc if using the binary.&lt;br /&gt;
* One of the following mass storage interfaces:&lt;br /&gt;
** [[SYMBiFACE II]]&lt;br /&gt;
** [[X-Mass]]&lt;br /&gt;
** [[uIDE 16]] (base address = &amp;amp;FEF0)&lt;br /&gt;
** [[M4 Board]]&lt;br /&gt;
** [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II]&lt;br /&gt;
** [http://www.tmtlogic.com/ Symbiface III]&lt;br /&gt;
* Compatible storage device with enough free space to accommodate the desirable CP/M hard disk configuration.&lt;br /&gt;
* Floppy disk drive for initialization of the file system.&lt;br /&gt;
* CP/M Plus system disks for making the system bootable.&lt;br /&gt;
* Optionally a [[SYMBiFACE II]] compatible RTC.&lt;br /&gt;
&lt;br /&gt;
==Restrictions==&lt;br /&gt;
* CP/M 2.2 or lower is not supported.&lt;br /&gt;
* 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.&lt;br /&gt;
* Only the master IDE device is accessible by HDCPM.&lt;br /&gt;
* The maximum number of hard disk partition/images supported is four.&lt;br /&gt;
* Only primary partitions are supported.&lt;br /&gt;
* If you want to use CP/M disk images then they must be stored in a FAT16 or FAT32 formatted disk or partition.&lt;br /&gt;
* If the hard disk is partitioned then the CP/M disk images must be placed in the first partition of the disk.&lt;br /&gt;
* The CP/M disk images must be placed in the root directory of the FAT file system.&lt;br /&gt;
* The CP/M disk images must NOT be fragmented and must have the correct size.&lt;br /&gt;
* 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. &lt;br /&gt;
* Only storage devices with 512 bytes sector size are supported.&lt;br /&gt;
* Only storage devices with LBA addressing are supported.&lt;br /&gt;
* Date stamps of CP/M disk image files are not maintained.&lt;br /&gt;
* 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 letters for your IDE media then the corresponding HD20 partitions will be unavailable under CP/M.&lt;br /&gt;
&lt;br /&gt;
==How it works==&lt;br /&gt;
===Using the ROM===&lt;br /&gt;
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:&lt;br /&gt;
|HDCPM (no TIME function support) or |HDCPMT (TIME function support)&amp;lt;br /&amp;gt;&lt;br /&gt;
Alternatively it can be started by holding down the Tab key (no TIME function support) or Shift+Tab (TIME function support), during power-up.&amp;lt;br /&amp;gt;&lt;br /&gt;
===Using the binary===&lt;br /&gt;
HDCPM can be started by running the HDCPM.BIN file from floppy drive or mass storage.&amp;lt;br /&amp;gt;&lt;br /&gt;
===Functions===&lt;br /&gt;
HDCPM will then execute the following functions:&amp;lt;br /&amp;gt;&lt;br /&gt;
* Search for a compatible mass storage interface.&lt;br /&gt;
* Move the boot loader and the CP/M patcher to RAM.&lt;br /&gt;
* Mount 1 to 4 CP/M image files and/or partitions and perform fragmentation and size test.&lt;br /&gt;
* 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.&lt;br /&gt;
* Read the .EMS file from the reserved track and store it in RAM just as the normal CP/M Plus boot loader does.&lt;br /&gt;
* 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.&lt;br /&gt;
* Patch the SCB in order to change the startup/default drive.&lt;br /&gt;
* 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 memory expansion]] or [[Dobbertin Memory Expansion]] driver is present.&lt;br /&gt;
* Move the ALV of the Dk'tronics RAM disk if [[Z-System]] is detected.&lt;br /&gt;
* Patch the CP/M console with the desired colour scheme. &lt;br /&gt;
* Patch the system message.&lt;br /&gt;
* Do a normal CP/M cold start.&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==CP/M Plus disk image files==&lt;br /&gt;
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 [https://hexed.it/ hexed.it] or any hex editor capable of creating binary files filled with a specific pattern.&amp;lt;br /&amp;gt;&lt;br /&gt;
In case of hexed.it select 'New file' fill in 'Size of the new file = 8519680' and 'Fill Pattern = 0xE5' and press apply. Save the file as CPMDSK01.IMG&amp;lt;br /&amp;gt;&lt;br /&gt;
If you have a FAT capable DOS installed in your AMSTRAD you can use the provided MAKEIMG.BAS utility to create your image file. Keep in mind that it takes more than 1.5 hour for a 8MB image file to be created that way.&amp;lt;br /&amp;gt;&lt;br /&gt;
CP/M disk image files can be accessed by a modern computer with [http://www.moria.de/~michael/cpmtools/ cpmtools]. Use the command |HDDEF to see the record you must insert in the diskdefs file.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The HDCPM record for diskdefs is:&lt;br /&gt;
&lt;br /&gt;
       diskdef hdcpm&lt;br /&gt;
          seclen 512&lt;br /&gt;
          tracks 65&lt;br /&gt;
          sectrk 256&lt;br /&gt;
          blocksize 8192&lt;br /&gt;
          maxdir 1024&lt;br /&gt;
          skew 0&lt;br /&gt;
          boottrk 1&lt;br /&gt;
          os 3&lt;br /&gt;
       end&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Hdcpm-boot-m4.png|thumb|HDCPM binary booting on M4 Board]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==CP/M Plus disk/partitions==&lt;br /&gt;
You can also create one or more partitions in order to format them to [http://www.seasip.info/Cpm/format31.html CP/M-80] 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.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM examines the hard disk's MBR upon start and finds the partition information. Then it finds the LBA of the first sector of each partition and passes it to the CP/M hard disk driver. The CP/M hard disk driver doesn't know anything about partitions. It accesses the partition as if it was a real hard disk.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:hdcpm-ui-boot.png|thumb|HDCPM ROM booting on uIDE-16]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
===Using the ROM===&lt;br /&gt;
* Install the HDCPM ROM in a free ROM slot of your ROM box.&lt;br /&gt;
* Plug in your [[SYMBiFACE II]] compatible IDE interface, [[uIDE 16]], [[M4 Board]] or [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] and attach the proper mass storage device.&lt;br /&gt;
* 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:&amp;lt;br /&amp;gt;&lt;br /&gt;
** (S2): [[SYMBiFACE II]] compatible interface&lt;br /&gt;
** (uI): [[uIDE 16]] interface&lt;br /&gt;
** (M4): [[M4 Board]]&lt;br /&gt;
** (US): [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II]&lt;br /&gt;
** (S3): [http://www.tmtlogic.com/ Symbiface III]&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:hdcpm-s2.png|thumb|HDCPM ROM - SYMBiFACE II]]&lt;br /&gt;
|[[File:hdcpm-ui.png|thumb|HDCPM ROM - uIDE-16]]&lt;br /&gt;
|[[File:hdcpm-m4.png|thumb|HDCPM ROM - M4 Board]]&lt;br /&gt;
|[[File:hdcpm-us.png|thumb|HDCPM ROM - USIfAC II]]&lt;br /&gt;
|[[File:hdcpm-s3.png|thumb|HDCPM ROM - Symbiface III]]&lt;br /&gt;
|}&lt;br /&gt;
In case a RTC is detected you will also see the RTC initialization message and the current date and time: ''RTC found: 2021/01/01 12:01:01''&lt;br /&gt;
* Use your original CP/M Plus system disk set to Boot CP/M Plus.&lt;br /&gt;
* 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.&lt;br /&gt;
* Reset your AMSTRAD and boot CP/M from the hard disk with the command |HDCPM. The Boot loader will check your image file(s) against fragmentation and correct size and boot the system to the CP/M command prompt. If the first image file is fragmented or has the wrong length the system will not boot. All other image files will be ignored if found to be fragmented or have the wrong length.&lt;br /&gt;
* In case you don't use CP/M image files just boot the system with |HDCPM or |HDCPMT&lt;br /&gt;
* Copy the files from your CP/M system floppy disks to the first hard disk.&lt;br /&gt;
* Copy any other needed application etc. to your CP/M hard disk(s).&lt;br /&gt;
* You are ready to go.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Using the binary===&lt;br /&gt;
* Plug in your [[SYMBiFACE II]] compatible IDE interface, [[uIDE 16]], [[M4 Board]] or [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] and attach the proper mass storage device.&lt;br /&gt;
* Use your original CP/M Plus system disk set to Boot CP/M Plus.&lt;br /&gt;
* 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.&lt;br /&gt;
* 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.&lt;br /&gt;
* You are ready to go.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==ROM commands==&lt;br /&gt;
[[File:hdcpm-us-boot.png|thumb|HDCPM ROM booting on USIfAC II]]&lt;br /&gt;
* |HDCPM mounts the hard disks and boots CP/M Plus. If [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] is used enable the USB disk with the |USB command first.&lt;br /&gt;
* |HDCPMT works like |HDCPM but also utilizes the RTC.&lt;br /&gt;
* |HDDPB shows the Disk Parameter Block.&lt;br /&gt;
* |HDDEF shows the diskdefs entry for CP/M tools and the file system size.&lt;br /&gt;
* |DATE displays the current date.&lt;br /&gt;
* |TIME displays the current time. If [[M4 Board]] is used |DATE and |TIME will be redirected to M4 |TIME.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==The HDCPM binary file==&lt;br /&gt;
* If [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] is used, use your PC to copy HDCPM.BIN to your USB flash disk. Then insert it to your [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] power up your Amstrad and enable the USB disk with the |USB command.&lt;br /&gt;
* Execute the file from the floppy disk or from your mass storage device with ''RUN&amp;quot;HDCPM&amp;quot;''. 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.&lt;br /&gt;
*  [[M4 Board]] and [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ 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 [https://www.cpcwiki.eu/forum/applications/cubeios-fat16fat32-rom-for-the-cpc's-with-xmass/ CubeMDOS] or [[UniDOS]], installed.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==The MAKEIMG.BAS and MAKEIMG.EXE utilities==&lt;br /&gt;
===MAKEIMG.BAS===&lt;br /&gt;
Although this utility should not be your first option, you can use it to make a new empty CP/M disk image file.&amp;lt;br /&amp;gt;&lt;br /&gt;
In case you decide to use it make sure you have a FAT aware DOS installed in your system. MAKEIMG makes use of the firmware calls CAS_OUT_OPEN, CAS_OUT_CLOSE and CAS_OUT_CHAR so your DOS must support them.&amp;lt;br /&amp;gt;&lt;br /&gt;
Copy the files MAKEIMG.BAS and MAKEIMG.BIN to the root directory of your FAT formatted hard disk and make it your current drive. Run the utility with ''RUN&amp;quot;MAKEIMG&amp;quot;'' and don't hold your breath!&amp;lt;br /&amp;gt;&lt;br /&gt;
Making an image file this way takes more than 1.5 hour for an 8MB file so literally... don't hold your breath.&amp;lt;br /&amp;gt;&lt;br /&gt;
Here is a small tutorial on how to setup and use a CP/M image file: https://youtu.be/GMWsRzNhQTM&amp;lt;br /&amp;gt;&lt;br /&gt;
===MAKEIMG.EXE===&lt;br /&gt;
This utility is a [[SymbOS]] application.&amp;lt;br /&amp;gt;&lt;br /&gt;
Use this utility to create your CP/M hard disk images from within [[SymbOS]]. 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.&amp;lt;br /&amp;gt;&lt;br /&gt;
MAKEIMG.EXE has been developed with [http://www.symbos.de/quigs.htm Quigs] for [[SymbOS]].&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Hdcpm-makeimg-sym1.png|thumb|MAKEIMG.EXE in action]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==The HDMGR.COM utility==&lt;br /&gt;
This is the Hard Disk Manager utility.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can use this utility to get information about your hard disk geometry, disk image files, partitions and boot sector. You have to use this utility to format a hard disk, disk image file or partition to CP/M format or manipulate the boot sector of the hard disk and/or transfer an .EMS system file to the reserved track of the hard disk.&amp;lt;br /&amp;gt;&lt;br /&gt;
The boot sector contains information about the CP/M disk drive letters, start-up drive and console colour scheme. All those properties can be changed with HDMGR.COM.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR will perform a fragmentation test of the discovered CP/M hard disk image files uppon execution.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
The HDMGR.COM utility is self explanatory. Just run it from the CP/M command prompt.&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Hdcpm-hdmgr-m.png|thumb|HDMGR main menu]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-1.png|thumb|HDMGR Hardware information]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-2.png|thumb|HDMGR Partition information]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-3.png|thumb|HDMGR CP/M disk image information]]&lt;br /&gt;
|}&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Hdcpm-hdmgr-4.png|thumb|HDMGR Boot sector information]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-5.png|thumb|HDMGR Log disk]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-7.png|thumb|HDMGR Manage boot sector]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-8.png|thumb|HDMGR Transfer CP/M to disk]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==The RTC.COM utility==&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can synchronize the date and time of CP/M Plus with the RTC by running ''RTC -G'' manually or via your PROFILE.SUB&amp;lt;br /&amp;gt;&lt;br /&gt;
You can also set your RTC to the current CP/M date and time by running ''RTC -S''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Error messages==&lt;br /&gt;
===Hard disk errors===&lt;br /&gt;
* ''*** No mass storage found ***''&lt;br /&gt;
	No compatible mass storage interface can be found.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: DISK I/O''&lt;br /&gt;
I/O error occurred during the last read/write operation.&lt;br /&gt;
	Your hard disk might be defect or the USB disk is not enabled.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: INVALID BOOT SECTOR''&lt;br /&gt;
	No FAT or CP/M boot sector was found in a not partitioned hard disk.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: INVALID FILE SYSTEM''&lt;br /&gt;
	The first partition in a partitioned hard disk is not a FAT or CP/M-80&lt;br /&gt;
	one.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: INVALID SECTOR SIZE''&lt;br /&gt;
	The hard disk used has a sector size not equal to 512 bytes.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: CPMDSK01.IMG NOT FOUND''&lt;br /&gt;
	The CP/M image file named CPMDSK01.IMG can't be found in the FAT&lt;br /&gt;
	formatted hard disk or partition. &lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: CP/M SYSTEM FILE NOT FOUND''&lt;br /&gt;
	The .EMS CP/M system file can't be found in the system track of your&lt;br /&gt;
	CP/M partition or image file.&lt;br /&gt;
	&lt;br /&gt;
*  ''ERROR: CPMDSK01.IMG IS FRAGMENTED''&lt;br /&gt;
	The first CP/M image file is fragmented, the system won't mount it.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: CPMDSK01.IMG HAS WRONG LENGTH''&lt;br /&gt;
	The first CP/M image file has wrong length, the system won't mount it.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: CPMDSK01.IMG IS NOT FORMATTED''&lt;br /&gt;
	The first CP/M image file is not formatted to CP/M-80 format, the&lt;br /&gt;
	system won't mount it. Use the HDMGR.COM utility to format it.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: INCOMPATIBLE EMS FILE''&lt;br /&gt;
	The .EMS system file that was loaded from the system track is not&lt;br /&gt;
	compatible with HDCPM.&lt;br /&gt;
&lt;br /&gt;
===RTC errors===&lt;br /&gt;
* ''*** Battery depleted ***''&lt;br /&gt;
	The RTC battery is depleted. The RTC driver will continue to operate&lt;br /&gt;
	normally but the readings are not reliable. Replace the RTC battery.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Release info &amp;amp; download==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Version !! Changes !! Download&lt;br /&gt;
|-&lt;br /&gt;
| v1.00 December 2021 || Initial release || [[Media:hdcpm100.dsk|hdcpm100.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.01 January 2022 || HDCPM.ROM, HDMGR.COM: code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: (bug fix) fragmented file detection was not working properly unless the file was CPMDSK01.IMG&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: (bug fix) unformatted image file detection was not working properly. New error message added.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) CP/M drive table wasn't patched properly.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) initialization of floppy drive(s) was corrupted due to misplaced code.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: added .EMS file compatibility check. New error message added.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: added support for Dobbertin RAM disk driver.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: added compatibility with Dobbertin HD20 Harddisc&amp;lt;br /&amp;gt;&lt;br /&gt;
MAKEIMG.EXE: added utility for creating an image file from within SYMBOS.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&lt;br /&gt;
|| [[Media:hdcpm101.dsk|hdcpm101.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.02 March 2022 || HDCPM.ROM, HDMGR.COM: added support for M4 board.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: added support for uIDE-16 interface.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) the ROM was initialized even if no compatible interface was found.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: error message change.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: option &amp;quot;F&amp;quot; has been removed. HDCPM will always do a disk fragmentation test during boot.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: power up message changed in order to provide information about the type of the detected interface.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: two bytes of RAM will be reserved by the ROM for storing the interface type and M4 ROM number.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&lt;br /&gt;
|| [[Media:hdcpm102.dsk|hdcpm102.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.03 April 2022 || HDCPM.ROM, HDMGR.COM: added support for USIfAC II.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) uIDE-16 detection was broken.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&lt;br /&gt;
|| [[Media:hdcpm103.dsk|hdcpm103.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.04 June 2022|| HDCPM.ROM: code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.BIN: added executable binary file version of HDCPM.&lt;br /&gt;
|| [[Media:hdcpm104.dsk|hdcpm104.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.05 July 2022 || HDCPM.ROM, HDCPM.BIN, HDMGR.COM: added support for Symbiface III&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDCPM.BIN:  code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR.COM: Hardware info added for USIfAC II&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR.COM: (bug fix) the 'Select boot file' menu was garbled if there were 8 or more .EMS files present.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&lt;br /&gt;
|| [[Media:hdcpm105.dsk|hdcpm105.dsk]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Other downloads==&lt;br /&gt;
*[[Media:CPMDSK01&amp;amp;02.zip|CP/M disk images]] - CPMDSK01.IMG is bootable and contains all the files of the 3 CP/M Plus system disks and year 2000 compliant binaries downloaded from the [http://www.cpm.z80.de/binary.html Digital Research Binary Files]. CPMDSK02.IMG is empty and can also be used as a template.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Videos==&lt;br /&gt;
* [https://youtu.be/GMWsRzNhQTM How to create and prepare a CP/M image file in a FAT formatted hard disk]&lt;br /&gt;
* [https://youtu.be/nxow6Y5O4Dc Hard disk utilization and dual boot]&lt;br /&gt;
* [https://youtu.be/em7dHOdaylg How to create a CP/M image file under SYMBOS]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
[[category:Expansion ROM]] [[category:Software]] [[category:Applications]] [[category:CP/M]] [[category:DSK images]]&lt;/div&gt;</summary>
		<author><name>D kef</name></author>	</entry>

	<entry>
		<id>https://oldwiki.cpcwiki.eu/index.php?title=HDCPM&amp;diff=109258</id>
		<title>HDCPM</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.cpcwiki.eu/index.php?title=HDCPM&amp;diff=109258"/>
				<updated>2022-09-04T12:14:09Z</updated>
		
		<summary type="html">&lt;p&gt;D kef: /* Other Downloads */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;HDCPM is a Hard Disk boot loader for [[CP/M]] plus developed by d_kef&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can read more about the development of the application here:&amp;lt;br /&amp;gt;&lt;br /&gt;
https://www.cpcwiki.eu/forum/applications/hdcpm-boot-and-run-cpm-plus-from-hard-disk/&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:hdcpm.gif|HDCPM booting CP/M Plus]]&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It comes in the form of:&lt;br /&gt;
* a standard background ROM that can be installed in any available ROM position.&lt;br /&gt;
* a standard binary file that can be loaded from floppy or hard drive.&lt;br /&gt;
&lt;br /&gt;
 	&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following configurations are possible with one hard disk:&lt;br /&gt;
&lt;br /&gt;
* One not partitioned, CP/M formatted hard disk. The whole hard disk is used by CP/M.&lt;br /&gt;
* One to four CP/M formatted partitions. Every partition is accessed as a separate hard disk by CP/M.&lt;br /&gt;
* 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.&lt;br /&gt;
* 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.&lt;br /&gt;
* For interfaces that use SD card or USB flash drive as a mass storage device ([[M4 Board]], [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] or [http://www.tmtlogic.com/ Symbiface III]) the only supported configuration is one to four CP/M disk image files in the root directory of the FAT file system.&lt;br /&gt;
	&lt;br /&gt;
Currently only the master IDE device can be accessed by HDCPM. The slave device is available to be used by your favourite DOS.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
HDCPM can also utilize the RTC found in the [[SYMBiFACE II]] in order to implement CP/M Plus BIOS function 26: TIME.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
HDCPM is compatible and can be used together with the [[Dobbertin Harddisc]].&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
HDCPM distribution disk contains the following files:&lt;br /&gt;
* HDCPM.ROM the ROM itself&lt;br /&gt;
* HDCPM.BIN the executable binary file&lt;br /&gt;
* HDMGR.COM Hard Disk Manager utility&lt;br /&gt;
* RTC.COM RTC synchronization utility&lt;br /&gt;
* MAKEIMG.BAS CP/M image file creation utility&lt;br /&gt;
* MAKEIMG.BIN CP/M image file creation binary&lt;br /&gt;
* MAKEIMG.EXE CP/M image file creation utility for [[SymbOS]]&lt;br /&gt;
* HDCPM.DOC the User guide&lt;br /&gt;
&lt;br /&gt;
HDCPM is free software. It can be used and distributed with no restrictions.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Prerequisites==&lt;br /&gt;
* Amstrad CPC/Plus computer capable of running CP/M Plus.&lt;br /&gt;
* ROM box or other ROM expansion hardware if using the ROM.&lt;br /&gt;
* Optionaly a FAT aware DOS like M4 ROM, USIfAC ROM, [[UniDOS]], [https://www.cpcwiki.eu/forum/applications/cubeios-fat16fat32-rom-for-the-cpc's-with-xmass/ CubeMDOS] etc if using the binary.&lt;br /&gt;
* One of the following mass storage interfaces:&lt;br /&gt;
** [[SYMBiFACE II]]&lt;br /&gt;
** [[X-Mass]]&lt;br /&gt;
** [[uIDE 16]] (base address = &amp;amp;FEF0)&lt;br /&gt;
** [[M4 Board]]&lt;br /&gt;
** [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II]&lt;br /&gt;
** [http://www.tmtlogic.com/ Symbiface III]&lt;br /&gt;
* Compatible storage device with enough free space to accommodate the desirable CP/M hard disk configuration.&lt;br /&gt;
* Floppy disk drive for initialization of the file system.&lt;br /&gt;
* CP/M Plus system disks for making the system bootable.&lt;br /&gt;
* Optionally a [[SYMBiFACE II]] compatible RTC.&lt;br /&gt;
&lt;br /&gt;
==Restrictions==&lt;br /&gt;
* CP/M 2.2 or lower is not supported.&lt;br /&gt;
* 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.&lt;br /&gt;
* Only the master IDE device is accessible by HDCPM.&lt;br /&gt;
* The maximum number of hard disk partition/images supported is four.&lt;br /&gt;
* Only primary partitions are supported.&lt;br /&gt;
* If you want to use CP/M disk images then they must be stored in a FAT16 or FAT32 formatted disk or partition.&lt;br /&gt;
* If the hard disk is partitioned then the CP/M disk images must be placed in the first partition of the disk.&lt;br /&gt;
* The CP/M disk images must be placed in the root directory of the FAT file system.&lt;br /&gt;
* The CP/M disk images must NOT be fragmented and must have the correct size.&lt;br /&gt;
* 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. &lt;br /&gt;
* Only storage devices with 512 bytes sector size are supported.&lt;br /&gt;
* Only storage devices with LBA addressing are supported.&lt;br /&gt;
* Date stamps of CP/M disk image files are not maintained.&lt;br /&gt;
* 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.&lt;br /&gt;
==How it works==&lt;br /&gt;
===Using the ROM===&lt;br /&gt;
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:&lt;br /&gt;
|HDCPM (no TIME function support) or |HDCPMT (TIME function support)&amp;lt;br /&amp;gt;&lt;br /&gt;
Alternatively it can be started by holding down the Tab key (no TIME function support) or Shift+Tab (TIME function support), during power-up.&amp;lt;br /&amp;gt;&lt;br /&gt;
===Using the binary===&lt;br /&gt;
HDCPM can be started by running the HDCPM.BIN file from floppy drive or mass storage.&amp;lt;br /&amp;gt;&lt;br /&gt;
===Functions===&lt;br /&gt;
HDCPM will then execute the following functions:&amp;lt;br /&amp;gt;&lt;br /&gt;
* Search for a compatible mass storage interface.&lt;br /&gt;
* Move the boot loader and the CP/M patcher to RAM.&lt;br /&gt;
* Mount 1 to 4 CP/M image files and/or partitions and perform fragmentation and size test.&lt;br /&gt;
* 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.&lt;br /&gt;
* Read the .EMS file from the reserved track and store it in RAM just as the normal CP/M Plus boot loader does.&lt;br /&gt;
* 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.&lt;br /&gt;
* Patch the SCB in order to change the startup/default drive.&lt;br /&gt;
* 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 memory expansion]] or [[Dobbertin Memory Expansion]] driver is present.&lt;br /&gt;
* Move the ALV of the Dk'tronics RAM disk if [[Z-System]] is detected.&lt;br /&gt;
* Patch the CP/M console with the desired colour scheme. &lt;br /&gt;
* Patch the system message.&lt;br /&gt;
* Do a normal CP/M cold start.&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==CP/M Plus disk image files==&lt;br /&gt;
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 [https://hexed.it/ hexed.it] or any hex editor capable of creating binary files filled with a specific pattern.&amp;lt;br /&amp;gt;&lt;br /&gt;
In case of hexed.it select 'New file' fill in 'Size of the new file = 8519680' and 'Fill Pattern = 0xE5' and press apply. Save the file as CPMDSK01.IMG&amp;lt;br /&amp;gt;&lt;br /&gt;
If you have a FAT capable DOS installed in your AMSTRAD you can use the provided MAKEIMG.BAS utility to create your image file. Keep in mind that it takes more than 1.5 hour for a 8MB image file to be created that way.&amp;lt;br /&amp;gt;&lt;br /&gt;
CP/M disk image files can be accessed by a modern computer with [http://www.moria.de/~michael/cpmtools/ cpmtools]. Use the command |HDDEF to see the record you must insert in the diskdefs file.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The HDCPM record for diskdefs is:&lt;br /&gt;
&lt;br /&gt;
       diskdef hdcpm&lt;br /&gt;
          seclen 512&lt;br /&gt;
          tracks 65&lt;br /&gt;
          sectrk 256&lt;br /&gt;
          blocksize 8192&lt;br /&gt;
          maxdir 1024&lt;br /&gt;
          skew 0&lt;br /&gt;
          boottrk 1&lt;br /&gt;
          os 3&lt;br /&gt;
       end&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Hdcpm-boot-m4.png|thumb|HDCPM binary booting on M4 Board]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==CP/M Plus disk/partitions==&lt;br /&gt;
You can also create one or more partitions in order to format them to [http://www.seasip.info/Cpm/format31.html CP/M-80] 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.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM examines the hard disk's MBR upon start and finds the partition information. Then it finds the LBA of the first sector of each partition and passes it to the CP/M hard disk driver. The CP/M hard disk driver doesn't know anything about partitions. It accesses the partition as if it was a real hard disk.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:hdcpm-ui-boot.png|thumb|HDCPM ROM booting on uIDE-16]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
===Using the ROM===&lt;br /&gt;
* Install the HDCPM ROM in a free ROM slot of your ROM box.&lt;br /&gt;
* Plug in your [[SYMBiFACE II]] compatible IDE interface, [[uIDE 16]], [[M4 Board]] or [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] and attach the proper mass storage device.&lt;br /&gt;
* 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:&amp;lt;br /&amp;gt;&lt;br /&gt;
** (S2): [[SYMBiFACE II]] compatible interface&lt;br /&gt;
** (uI): [[uIDE 16]] interface&lt;br /&gt;
** (M4): [[M4 Board]]&lt;br /&gt;
** (US): [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II]&lt;br /&gt;
** (S3): [http://www.tmtlogic.com/ Symbiface III]&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:hdcpm-s2.png|thumb|HDCPM ROM - SYMBiFACE II]]&lt;br /&gt;
|[[File:hdcpm-ui.png|thumb|HDCPM ROM - uIDE-16]]&lt;br /&gt;
|[[File:hdcpm-m4.png|thumb|HDCPM ROM - M4 Board]]&lt;br /&gt;
|[[File:hdcpm-us.png|thumb|HDCPM ROM - USIfAC II]]&lt;br /&gt;
|[[File:hdcpm-s3.png|thumb|HDCPM ROM - Symbiface III]]&lt;br /&gt;
|}&lt;br /&gt;
In case a RTC is detected you will also see the RTC initialization message and the current date and time: ''RTC found: 2021/01/01 12:01:01''&lt;br /&gt;
* Use your original CP/M Plus system disk set to Boot CP/M Plus.&lt;br /&gt;
* 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.&lt;br /&gt;
* Reset your AMSTRAD and boot CP/M from the hard disk with the command |HDCPM. The Boot loader will check your image file(s) against fragmentation and correct size and boot the system to the CP/M command prompt. If the first image file is fragmented or has the wrong length the system will not boot. All other image files will be ignored if found to be fragmented or have the wrong length.&lt;br /&gt;
* In case you don't use CP/M image files just boot the system with |HDCPM or |HDCPMT&lt;br /&gt;
* Copy the files from your CP/M system floppy disks to the first hard disk.&lt;br /&gt;
* Copy any other needed application etc. to your CP/M hard disk(s).&lt;br /&gt;
* You are ready to go.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Using the binary===&lt;br /&gt;
* Plug in your [[SYMBiFACE II]] compatible IDE interface, [[uIDE 16]], [[M4 Board]] or [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] and attach the proper mass storage device.&lt;br /&gt;
* Use your original CP/M Plus system disk set to Boot CP/M Plus.&lt;br /&gt;
* 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.&lt;br /&gt;
* 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.&lt;br /&gt;
* You are ready to go.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==ROM commands==&lt;br /&gt;
[[File:hdcpm-us-boot.png|thumb|HDCPM ROM booting on USIfAC II]]&lt;br /&gt;
* |HDCPM mounts the hard disks and boots CP/M Plus. If [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] is used enable the USB disk with the |USB command first.&lt;br /&gt;
* |HDCPMT works like |HDCPM but also utilizes the RTC.&lt;br /&gt;
* |HDDPB shows the Disk Parameter Block.&lt;br /&gt;
* |HDDEF shows the diskdefs entry for CP/M tools and the file system size.&lt;br /&gt;
* |DATE displays the current date.&lt;br /&gt;
* |TIME displays the current time. If [[M4 Board]] is used |DATE and |TIME will be redirected to M4 |TIME.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==The HDCPM binary file==&lt;br /&gt;
* If [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] is used, use your PC to copy HDCPM.BIN to your USB flash disk. Then insert it to your [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] power up your Amstrad and enable the USB disk with the |USB command.&lt;br /&gt;
* Execute the file from the floppy disk or from your mass storage device with ''RUN&amp;quot;HDCPM&amp;quot;''. 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.&lt;br /&gt;
*  [[M4 Board]] and [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ 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 [https://www.cpcwiki.eu/forum/applications/cubeios-fat16fat32-rom-for-the-cpc's-with-xmass/ CubeMDOS] or [[UniDOS]], installed.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==The MAKEIMG.BAS and MAKEIMG.EXE utilities==&lt;br /&gt;
===MAKEIMG.BAS===&lt;br /&gt;
Although this utility should not be your first option, you can use it to make a new empty CP/M disk image file.&amp;lt;br /&amp;gt;&lt;br /&gt;
In case you decide to use it make sure you have a FAT aware DOS installed in your system. MAKEIMG makes use of the firmware calls CAS_OUT_OPEN, CAS_OUT_CLOSE and CAS_OUT_CHAR so your DOS must support them.&amp;lt;br /&amp;gt;&lt;br /&gt;
Copy the files MAKEIMG.BAS and MAKEIMG.BIN to the root directory of your FAT formatted hard disk and make it your current drive. Run the utility with ''RUN&amp;quot;MAKEIMG&amp;quot;'' and don't hold your breath!&amp;lt;br /&amp;gt;&lt;br /&gt;
Making an image file this way takes more than 1.5 hour for an 8MB file so literally... don't hold your breath.&amp;lt;br /&amp;gt;&lt;br /&gt;
Here is a small tutorial on how to setup and use a CP/M image file: https://youtu.be/GMWsRzNhQTM&amp;lt;br /&amp;gt;&lt;br /&gt;
===MAKEIMG.EXE===&lt;br /&gt;
This utility is a [[SymbOS]] application.&amp;lt;br /&amp;gt;&lt;br /&gt;
Use this utility to create your CP/M hard disk images from within [[SymbOS]]. 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.&amp;lt;br /&amp;gt;&lt;br /&gt;
MAKEIMG.EXE has been developed with [http://www.symbos.de/quigs.htm Quigs] for [[SymbOS]].&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Hdcpm-makeimg-sym1.png|thumb|MAKEIMG.EXE in action]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==The HDMGR.COM utility==&lt;br /&gt;
This is the Hard Disk Manager utility.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can use this utility to get information about your hard disk geometry, disk image files, partitions and boot sector. You have to use this utility to format a hard disk, disk image file or partition to CP/M format or manipulate the boot sector of the hard disk and/or transfer an .EMS system file to the reserved track of the hard disk.&amp;lt;br /&amp;gt;&lt;br /&gt;
The boot sector contains information about the CP/M disk drive letters, start-up drive and console colour scheme. All those properties can be changed with HDMGR.COM.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR will perform a fragmentation test of the discovered CP/M hard disk image files uppon execution.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
The HDMGR.COM utility is self explanatory. Just run it from the CP/M command prompt.&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Hdcpm-hdmgr-m.png|thumb|HDMGR main menu]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-1.png|thumb|HDMGR Hardware information]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-2.png|thumb|HDMGR Partition information]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-3.png|thumb|HDMGR CP/M disk image information]]&lt;br /&gt;
|}&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Hdcpm-hdmgr-4.png|thumb|HDMGR Boot sector information]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-5.png|thumb|HDMGR Log disk]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-7.png|thumb|HDMGR Manage boot sector]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-8.png|thumb|HDMGR Transfer CP/M to disk]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==The RTC.COM utility==&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can synchronize the date and time of CP/M Plus with the RTC by running ''RTC -G'' manually or via your PROFILE.SUB&amp;lt;br /&amp;gt;&lt;br /&gt;
You can also set your RTC to the current CP/M date and time by running ''RTC -S''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Error messages==&lt;br /&gt;
===Hard disk errors===&lt;br /&gt;
* ''*** No mass storage found ***''&lt;br /&gt;
	No compatible mass storage interface can be found.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: DISK I/O''&lt;br /&gt;
I/O error occurred during the last read/write operation.&lt;br /&gt;
	Your hard disk might be defect or the USB disk is not enabled.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: INVALID BOOT SECTOR''&lt;br /&gt;
	No FAT or CP/M boot sector was found in a not partitioned hard disk.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: INVALID FILE SYSTEM''&lt;br /&gt;
	The first partition in a partitioned hard disk is not a FAT or CP/M-80&lt;br /&gt;
	one.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: INVALID SECTOR SIZE''&lt;br /&gt;
	The hard disk used has a sector size not equal to 512 bytes.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: CPMDSK01.IMG NOT FOUND''&lt;br /&gt;
	The CP/M image file named CPMDSK01.IMG can't be found in the FAT&lt;br /&gt;
	formatted hard disk or partition. &lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: CP/M SYSTEM FILE NOT FOUND''&lt;br /&gt;
	The .EMS CP/M system file can't be found in the system track of your&lt;br /&gt;
	CP/M partition or image file.&lt;br /&gt;
	&lt;br /&gt;
*  ''ERROR: CPMDSK01.IMG IS FRAGMENTED''&lt;br /&gt;
	The first CP/M image file is fragmented, the system won't mount it.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: CPMDSK01.IMG HAS WRONG LENGTH''&lt;br /&gt;
	The first CP/M image file has wrong length, the system won't mount it.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: CPMDSK01.IMG IS NOT FORMATTED''&lt;br /&gt;
	The first CP/M image file is not formatted to CP/M-80 format, the&lt;br /&gt;
	system won't mount it. Use the HDMGR.COM utility to format it.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: INCOMPATIBLE EMS FILE''&lt;br /&gt;
	The .EMS system file that was loaded from the system track is not&lt;br /&gt;
	compatible with HDCPM.&lt;br /&gt;
&lt;br /&gt;
===RTC errors===&lt;br /&gt;
* ''*** Battery depleted ***''&lt;br /&gt;
	The RTC battery is depleted. The RTC driver will continue to operate&lt;br /&gt;
	normally but the readings are not reliable. Replace the RTC battery.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Release info &amp;amp; download==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Version !! Changes !! Download&lt;br /&gt;
|-&lt;br /&gt;
| v1.00 December 2021 || Initial release || [[Media:hdcpm100.dsk|hdcpm100.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.01 January 2022 || HDCPM.ROM, HDMGR.COM: code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: (bug fix) fragmented file detection was not working properly unless the file was CPMDSK01.IMG&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: (bug fix) unformatted image file detection was not working properly. New error message added.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) CP/M drive table wasn't patched properly.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) initialization of floppy drive(s) was corrupted due to misplaced code.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: added .EMS file compatibility check. New error message added.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: added support for Dobbertin RAM disk driver.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: added compatibility with Dobbertin HD20 Harddisc&amp;lt;br /&amp;gt;&lt;br /&gt;
MAKEIMG.EXE: added utility for creating an image file from within SYMBOS.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&lt;br /&gt;
|| [[Media:hdcpm101.dsk|hdcpm101.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.02 March 2022 || HDCPM.ROM, HDMGR.COM: added support for M4 board.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: added support for uIDE-16 interface.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) the ROM was initialized even if no compatible interface was found.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: error message change.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: option &amp;quot;F&amp;quot; has been removed. HDCPM will always do a disk fragmentation test during boot.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: power up message changed in order to provide information about the type of the detected interface.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: two bytes of RAM will be reserved by the ROM for storing the interface type and M4 ROM number.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&lt;br /&gt;
|| [[Media:hdcpm102.dsk|hdcpm102.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.03 April 2022 || HDCPM.ROM, HDMGR.COM: added support for USIfAC II.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) uIDE-16 detection was broken.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&lt;br /&gt;
|| [[Media:hdcpm103.dsk|hdcpm103.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.04 June 2022|| HDCPM.ROM: code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.BIN: added executable binary file version of HDCPM.&lt;br /&gt;
|| [[Media:hdcpm104.dsk|hdcpm104.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.05 July 2022 || HDCPM.ROM, HDCPM.BIN, HDMGR.COM: added support for Symbiface III&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDCPM.BIN:  code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR.COM: Hardware info added for USIfAC II&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR.COM: (bug fix) the 'Select boot file' menu was garbled if there were 8 or more .EMS files present.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&lt;br /&gt;
|| [[Media:hdcpm105.dsk|hdcpm105.dsk]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Other downloads==&lt;br /&gt;
*[[Media:CPMDSK01&amp;amp;02.zip|CP/M disk images]] - CPMDSK01.IMG is bootable and contains all the files of the 3 CP/M Plus system disks and year 2000 compliant binaries downloaded from the [http://www.cpm.z80.de/binary.html Digital Research Binary Files]. CPMDSK02.IMG is empty and can also be used as a template.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Videos==&lt;br /&gt;
* [https://youtu.be/GMWsRzNhQTM How to create and prepare a CP/M image file in a FAT formatted hard disk]&lt;br /&gt;
* [https://youtu.be/nxow6Y5O4Dc Hard disk utilization and dual boot]&lt;br /&gt;
* [https://youtu.be/em7dHOdaylg How to create a CP/M image file under SYMBOS]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
[[category:Expansion ROM]] [[category:Software]] [[category:Applications]] [[category:CP/M]] [[category:DSK images]]&lt;/div&gt;</summary>
		<author><name>D kef</name></author>	</entry>

	<entry>
		<id>https://oldwiki.cpcwiki.eu/index.php?title=HDCPM&amp;diff=109257</id>
		<title>HDCPM</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.cpcwiki.eu/index.php?title=HDCPM&amp;diff=109257"/>
				<updated>2022-09-04T12:13:55Z</updated>
		
		<summary type="html">&lt;p&gt;D kef: /* Release info */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;HDCPM is a Hard Disk boot loader for [[CP/M]] plus developed by d_kef&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can read more about the development of the application here:&amp;lt;br /&amp;gt;&lt;br /&gt;
https://www.cpcwiki.eu/forum/applications/hdcpm-boot-and-run-cpm-plus-from-hard-disk/&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:hdcpm.gif|HDCPM booting CP/M Plus]]&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It comes in the form of:&lt;br /&gt;
* a standard background ROM that can be installed in any available ROM position.&lt;br /&gt;
* a standard binary file that can be loaded from floppy or hard drive.&lt;br /&gt;
&lt;br /&gt;
 	&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following configurations are possible with one hard disk:&lt;br /&gt;
&lt;br /&gt;
* One not partitioned, CP/M formatted hard disk. The whole hard disk is used by CP/M.&lt;br /&gt;
* One to four CP/M formatted partitions. Every partition is accessed as a separate hard disk by CP/M.&lt;br /&gt;
* 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.&lt;br /&gt;
* 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.&lt;br /&gt;
* For interfaces that use SD card or USB flash drive as a mass storage device ([[M4 Board]], [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] or [http://www.tmtlogic.com/ Symbiface III]) the only supported configuration is one to four CP/M disk image files in the root directory of the FAT file system.&lt;br /&gt;
	&lt;br /&gt;
Currently only the master IDE device can be accessed by HDCPM. The slave device is available to be used by your favourite DOS.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
HDCPM can also utilize the RTC found in the [[SYMBiFACE II]] in order to implement CP/M Plus BIOS function 26: TIME.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
HDCPM is compatible and can be used together with the [[Dobbertin Harddisc]].&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
HDCPM distribution disk contains the following files:&lt;br /&gt;
* HDCPM.ROM the ROM itself&lt;br /&gt;
* HDCPM.BIN the executable binary file&lt;br /&gt;
* HDMGR.COM Hard Disk Manager utility&lt;br /&gt;
* RTC.COM RTC synchronization utility&lt;br /&gt;
* MAKEIMG.BAS CP/M image file creation utility&lt;br /&gt;
* MAKEIMG.BIN CP/M image file creation binary&lt;br /&gt;
* MAKEIMG.EXE CP/M image file creation utility for [[SymbOS]]&lt;br /&gt;
* HDCPM.DOC the User guide&lt;br /&gt;
&lt;br /&gt;
HDCPM is free software. It can be used and distributed with no restrictions.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Prerequisites==&lt;br /&gt;
* Amstrad CPC/Plus computer capable of running CP/M Plus.&lt;br /&gt;
* ROM box or other ROM expansion hardware if using the ROM.&lt;br /&gt;
* Optionaly a FAT aware DOS like M4 ROM, USIfAC ROM, [[UniDOS]], [https://www.cpcwiki.eu/forum/applications/cubeios-fat16fat32-rom-for-the-cpc's-with-xmass/ CubeMDOS] etc if using the binary.&lt;br /&gt;
* One of the following mass storage interfaces:&lt;br /&gt;
** [[SYMBiFACE II]]&lt;br /&gt;
** [[X-Mass]]&lt;br /&gt;
** [[uIDE 16]] (base address = &amp;amp;FEF0)&lt;br /&gt;
** [[M4 Board]]&lt;br /&gt;
** [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II]&lt;br /&gt;
** [http://www.tmtlogic.com/ Symbiface III]&lt;br /&gt;
* Compatible storage device with enough free space to accommodate the desirable CP/M hard disk configuration.&lt;br /&gt;
* Floppy disk drive for initialization of the file system.&lt;br /&gt;
* CP/M Plus system disks for making the system bootable.&lt;br /&gt;
* Optionally a [[SYMBiFACE II]] compatible RTC.&lt;br /&gt;
&lt;br /&gt;
==Restrictions==&lt;br /&gt;
* CP/M 2.2 or lower is not supported.&lt;br /&gt;
* 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.&lt;br /&gt;
* Only the master IDE device is accessible by HDCPM.&lt;br /&gt;
* The maximum number of hard disk partition/images supported is four.&lt;br /&gt;
* Only primary partitions are supported.&lt;br /&gt;
* If you want to use CP/M disk images then they must be stored in a FAT16 or FAT32 formatted disk or partition.&lt;br /&gt;
* If the hard disk is partitioned then the CP/M disk images must be placed in the first partition of the disk.&lt;br /&gt;
* The CP/M disk images must be placed in the root directory of the FAT file system.&lt;br /&gt;
* The CP/M disk images must NOT be fragmented and must have the correct size.&lt;br /&gt;
* 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. &lt;br /&gt;
* Only storage devices with 512 bytes sector size are supported.&lt;br /&gt;
* Only storage devices with LBA addressing are supported.&lt;br /&gt;
* Date stamps of CP/M disk image files are not maintained.&lt;br /&gt;
* 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.&lt;br /&gt;
==How it works==&lt;br /&gt;
===Using the ROM===&lt;br /&gt;
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:&lt;br /&gt;
|HDCPM (no TIME function support) or |HDCPMT (TIME function support)&amp;lt;br /&amp;gt;&lt;br /&gt;
Alternatively it can be started by holding down the Tab key (no TIME function support) or Shift+Tab (TIME function support), during power-up.&amp;lt;br /&amp;gt;&lt;br /&gt;
===Using the binary===&lt;br /&gt;
HDCPM can be started by running the HDCPM.BIN file from floppy drive or mass storage.&amp;lt;br /&amp;gt;&lt;br /&gt;
===Functions===&lt;br /&gt;
HDCPM will then execute the following functions:&amp;lt;br /&amp;gt;&lt;br /&gt;
* Search for a compatible mass storage interface.&lt;br /&gt;
* Move the boot loader and the CP/M patcher to RAM.&lt;br /&gt;
* Mount 1 to 4 CP/M image files and/or partitions and perform fragmentation and size test.&lt;br /&gt;
* 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.&lt;br /&gt;
* Read the .EMS file from the reserved track and store it in RAM just as the normal CP/M Plus boot loader does.&lt;br /&gt;
* 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.&lt;br /&gt;
* Patch the SCB in order to change the startup/default drive.&lt;br /&gt;
* 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 memory expansion]] or [[Dobbertin Memory Expansion]] driver is present.&lt;br /&gt;
* Move the ALV of the Dk'tronics RAM disk if [[Z-System]] is detected.&lt;br /&gt;
* Patch the CP/M console with the desired colour scheme. &lt;br /&gt;
* Patch the system message.&lt;br /&gt;
* Do a normal CP/M cold start.&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==CP/M Plus disk image files==&lt;br /&gt;
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 [https://hexed.it/ hexed.it] or any hex editor capable of creating binary files filled with a specific pattern.&amp;lt;br /&amp;gt;&lt;br /&gt;
In case of hexed.it select 'New file' fill in 'Size of the new file = 8519680' and 'Fill Pattern = 0xE5' and press apply. Save the file as CPMDSK01.IMG&amp;lt;br /&amp;gt;&lt;br /&gt;
If you have a FAT capable DOS installed in your AMSTRAD you can use the provided MAKEIMG.BAS utility to create your image file. Keep in mind that it takes more than 1.5 hour for a 8MB image file to be created that way.&amp;lt;br /&amp;gt;&lt;br /&gt;
CP/M disk image files can be accessed by a modern computer with [http://www.moria.de/~michael/cpmtools/ cpmtools]. Use the command |HDDEF to see the record you must insert in the diskdefs file.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The HDCPM record for diskdefs is:&lt;br /&gt;
&lt;br /&gt;
       diskdef hdcpm&lt;br /&gt;
          seclen 512&lt;br /&gt;
          tracks 65&lt;br /&gt;
          sectrk 256&lt;br /&gt;
          blocksize 8192&lt;br /&gt;
          maxdir 1024&lt;br /&gt;
          skew 0&lt;br /&gt;
          boottrk 1&lt;br /&gt;
          os 3&lt;br /&gt;
       end&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Hdcpm-boot-m4.png|thumb|HDCPM binary booting on M4 Board]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==CP/M Plus disk/partitions==&lt;br /&gt;
You can also create one or more partitions in order to format them to [http://www.seasip.info/Cpm/format31.html CP/M-80] 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.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM examines the hard disk's MBR upon start and finds the partition information. Then it finds the LBA of the first sector of each partition and passes it to the CP/M hard disk driver. The CP/M hard disk driver doesn't know anything about partitions. It accesses the partition as if it was a real hard disk.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:hdcpm-ui-boot.png|thumb|HDCPM ROM booting on uIDE-16]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
===Using the ROM===&lt;br /&gt;
* Install the HDCPM ROM in a free ROM slot of your ROM box.&lt;br /&gt;
* Plug in your [[SYMBiFACE II]] compatible IDE interface, [[uIDE 16]], [[M4 Board]] or [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] and attach the proper mass storage device.&lt;br /&gt;
* 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:&amp;lt;br /&amp;gt;&lt;br /&gt;
** (S2): [[SYMBiFACE II]] compatible interface&lt;br /&gt;
** (uI): [[uIDE 16]] interface&lt;br /&gt;
** (M4): [[M4 Board]]&lt;br /&gt;
** (US): [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II]&lt;br /&gt;
** (S3): [http://www.tmtlogic.com/ Symbiface III]&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:hdcpm-s2.png|thumb|HDCPM ROM - SYMBiFACE II]]&lt;br /&gt;
|[[File:hdcpm-ui.png|thumb|HDCPM ROM - uIDE-16]]&lt;br /&gt;
|[[File:hdcpm-m4.png|thumb|HDCPM ROM - M4 Board]]&lt;br /&gt;
|[[File:hdcpm-us.png|thumb|HDCPM ROM - USIfAC II]]&lt;br /&gt;
|[[File:hdcpm-s3.png|thumb|HDCPM ROM - Symbiface III]]&lt;br /&gt;
|}&lt;br /&gt;
In case a RTC is detected you will also see the RTC initialization message and the current date and time: ''RTC found: 2021/01/01 12:01:01''&lt;br /&gt;
* Use your original CP/M Plus system disk set to Boot CP/M Plus.&lt;br /&gt;
* 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.&lt;br /&gt;
* Reset your AMSTRAD and boot CP/M from the hard disk with the command |HDCPM. The Boot loader will check your image file(s) against fragmentation and correct size and boot the system to the CP/M command prompt. If the first image file is fragmented or has the wrong length the system will not boot. All other image files will be ignored if found to be fragmented or have the wrong length.&lt;br /&gt;
* In case you don't use CP/M image files just boot the system with |HDCPM or |HDCPMT&lt;br /&gt;
* Copy the files from your CP/M system floppy disks to the first hard disk.&lt;br /&gt;
* Copy any other needed application etc. to your CP/M hard disk(s).&lt;br /&gt;
* You are ready to go.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Using the binary===&lt;br /&gt;
* Plug in your [[SYMBiFACE II]] compatible IDE interface, [[uIDE 16]], [[M4 Board]] or [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] and attach the proper mass storage device.&lt;br /&gt;
* Use your original CP/M Plus system disk set to Boot CP/M Plus.&lt;br /&gt;
* 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.&lt;br /&gt;
* 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.&lt;br /&gt;
* You are ready to go.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==ROM commands==&lt;br /&gt;
[[File:hdcpm-us-boot.png|thumb|HDCPM ROM booting on USIfAC II]]&lt;br /&gt;
* |HDCPM mounts the hard disks and boots CP/M Plus. If [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] is used enable the USB disk with the |USB command first.&lt;br /&gt;
* |HDCPMT works like |HDCPM but also utilizes the RTC.&lt;br /&gt;
* |HDDPB shows the Disk Parameter Block.&lt;br /&gt;
* |HDDEF shows the diskdefs entry for CP/M tools and the file system size.&lt;br /&gt;
* |DATE displays the current date.&lt;br /&gt;
* |TIME displays the current time. If [[M4 Board]] is used |DATE and |TIME will be redirected to M4 |TIME.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==The HDCPM binary file==&lt;br /&gt;
* If [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] is used, use your PC to copy HDCPM.BIN to your USB flash disk. Then insert it to your [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] power up your Amstrad and enable the USB disk with the |USB command.&lt;br /&gt;
* Execute the file from the floppy disk or from your mass storage device with ''RUN&amp;quot;HDCPM&amp;quot;''. 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.&lt;br /&gt;
*  [[M4 Board]] and [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ 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 [https://www.cpcwiki.eu/forum/applications/cubeios-fat16fat32-rom-for-the-cpc's-with-xmass/ CubeMDOS] or [[UniDOS]], installed.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==The MAKEIMG.BAS and MAKEIMG.EXE utilities==&lt;br /&gt;
===MAKEIMG.BAS===&lt;br /&gt;
Although this utility should not be your first option, you can use it to make a new empty CP/M disk image file.&amp;lt;br /&amp;gt;&lt;br /&gt;
In case you decide to use it make sure you have a FAT aware DOS installed in your system. MAKEIMG makes use of the firmware calls CAS_OUT_OPEN, CAS_OUT_CLOSE and CAS_OUT_CHAR so your DOS must support them.&amp;lt;br /&amp;gt;&lt;br /&gt;
Copy the files MAKEIMG.BAS and MAKEIMG.BIN to the root directory of your FAT formatted hard disk and make it your current drive. Run the utility with ''RUN&amp;quot;MAKEIMG&amp;quot;'' and don't hold your breath!&amp;lt;br /&amp;gt;&lt;br /&gt;
Making an image file this way takes more than 1.5 hour for an 8MB file so literally... don't hold your breath.&amp;lt;br /&amp;gt;&lt;br /&gt;
Here is a small tutorial on how to setup and use a CP/M image file: https://youtu.be/GMWsRzNhQTM&amp;lt;br /&amp;gt;&lt;br /&gt;
===MAKEIMG.EXE===&lt;br /&gt;
This utility is a [[SymbOS]] application.&amp;lt;br /&amp;gt;&lt;br /&gt;
Use this utility to create your CP/M hard disk images from within [[SymbOS]]. 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.&amp;lt;br /&amp;gt;&lt;br /&gt;
MAKEIMG.EXE has been developed with [http://www.symbos.de/quigs.htm Quigs] for [[SymbOS]].&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Hdcpm-makeimg-sym1.png|thumb|MAKEIMG.EXE in action]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==The HDMGR.COM utility==&lt;br /&gt;
This is the Hard Disk Manager utility.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can use this utility to get information about your hard disk geometry, disk image files, partitions and boot sector. You have to use this utility to format a hard disk, disk image file or partition to CP/M format or manipulate the boot sector of the hard disk and/or transfer an .EMS system file to the reserved track of the hard disk.&amp;lt;br /&amp;gt;&lt;br /&gt;
The boot sector contains information about the CP/M disk drive letters, start-up drive and console colour scheme. All those properties can be changed with HDMGR.COM.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR will perform a fragmentation test of the discovered CP/M hard disk image files uppon execution.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
The HDMGR.COM utility is self explanatory. Just run it from the CP/M command prompt.&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Hdcpm-hdmgr-m.png|thumb|HDMGR main menu]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-1.png|thumb|HDMGR Hardware information]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-2.png|thumb|HDMGR Partition information]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-3.png|thumb|HDMGR CP/M disk image information]]&lt;br /&gt;
|}&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Hdcpm-hdmgr-4.png|thumb|HDMGR Boot sector information]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-5.png|thumb|HDMGR Log disk]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-7.png|thumb|HDMGR Manage boot sector]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-8.png|thumb|HDMGR Transfer CP/M to disk]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==The RTC.COM utility==&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can synchronize the date and time of CP/M Plus with the RTC by running ''RTC -G'' manually or via your PROFILE.SUB&amp;lt;br /&amp;gt;&lt;br /&gt;
You can also set your RTC to the current CP/M date and time by running ''RTC -S''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Error messages==&lt;br /&gt;
===Hard disk errors===&lt;br /&gt;
* ''*** No mass storage found ***''&lt;br /&gt;
	No compatible mass storage interface can be found.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: DISK I/O''&lt;br /&gt;
I/O error occurred during the last read/write operation.&lt;br /&gt;
	Your hard disk might be defect or the USB disk is not enabled.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: INVALID BOOT SECTOR''&lt;br /&gt;
	No FAT or CP/M boot sector was found in a not partitioned hard disk.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: INVALID FILE SYSTEM''&lt;br /&gt;
	The first partition in a partitioned hard disk is not a FAT or CP/M-80&lt;br /&gt;
	one.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: INVALID SECTOR SIZE''&lt;br /&gt;
	The hard disk used has a sector size not equal to 512 bytes.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: CPMDSK01.IMG NOT FOUND''&lt;br /&gt;
	The CP/M image file named CPMDSK01.IMG can't be found in the FAT&lt;br /&gt;
	formatted hard disk or partition. &lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: CP/M SYSTEM FILE NOT FOUND''&lt;br /&gt;
	The .EMS CP/M system file can't be found in the system track of your&lt;br /&gt;
	CP/M partition or image file.&lt;br /&gt;
	&lt;br /&gt;
*  ''ERROR: CPMDSK01.IMG IS FRAGMENTED''&lt;br /&gt;
	The first CP/M image file is fragmented, the system won't mount it.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: CPMDSK01.IMG HAS WRONG LENGTH''&lt;br /&gt;
	The first CP/M image file has wrong length, the system won't mount it.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: CPMDSK01.IMG IS NOT FORMATTED''&lt;br /&gt;
	The first CP/M image file is not formatted to CP/M-80 format, the&lt;br /&gt;
	system won't mount it. Use the HDMGR.COM utility to format it.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: INCOMPATIBLE EMS FILE''&lt;br /&gt;
	The .EMS system file that was loaded from the system track is not&lt;br /&gt;
	compatible with HDCPM.&lt;br /&gt;
&lt;br /&gt;
===RTC errors===&lt;br /&gt;
* ''*** Battery depleted ***''&lt;br /&gt;
	The RTC battery is depleted. The RTC driver will continue to operate&lt;br /&gt;
	normally but the readings are not reliable. Replace the RTC battery.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Release info &amp;amp; download==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Version !! Changes !! Download&lt;br /&gt;
|-&lt;br /&gt;
| v1.00 December 2021 || Initial release || [[Media:hdcpm100.dsk|hdcpm100.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.01 January 2022 || HDCPM.ROM, HDMGR.COM: code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: (bug fix) fragmented file detection was not working properly unless the file was CPMDSK01.IMG&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: (bug fix) unformatted image file detection was not working properly. New error message added.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) CP/M drive table wasn't patched properly.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) initialization of floppy drive(s) was corrupted due to misplaced code.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: added .EMS file compatibility check. New error message added.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: added support for Dobbertin RAM disk driver.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: added compatibility with Dobbertin HD20 Harddisc&amp;lt;br /&amp;gt;&lt;br /&gt;
MAKEIMG.EXE: added utility for creating an image file from within SYMBOS.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&lt;br /&gt;
|| [[Media:hdcpm101.dsk|hdcpm101.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.02 March 2022 || HDCPM.ROM, HDMGR.COM: added support for M4 board.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: added support for uIDE-16 interface.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) the ROM was initialized even if no compatible interface was found.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: error message change.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: option &amp;quot;F&amp;quot; has been removed. HDCPM will always do a disk fragmentation test during boot.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: power up message changed in order to provide information about the type of the detected interface.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: two bytes of RAM will be reserved by the ROM for storing the interface type and M4 ROM number.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&lt;br /&gt;
|| [[Media:hdcpm102.dsk|hdcpm102.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.03 April 2022 || HDCPM.ROM, HDMGR.COM: added support for USIfAC II.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) uIDE-16 detection was broken.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&lt;br /&gt;
|| [[Media:hdcpm103.dsk|hdcpm103.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.04 June 2022|| HDCPM.ROM: code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.BIN: added executable binary file version of HDCPM.&lt;br /&gt;
|| [[Media:hdcpm104.dsk|hdcpm104.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.05 July 2022 || HDCPM.ROM, HDCPM.BIN, HDMGR.COM: added support for Symbiface III&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDCPM.BIN:  code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR.COM: Hardware info added for USIfAC II&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR.COM: (bug fix) the 'Select boot file' menu was garbled if there were 8 or more .EMS files present.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&lt;br /&gt;
|| [[Media:hdcpm105.dsk|hdcpm105.dsk]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Other Downloads==&lt;br /&gt;
*[[Media:CPMDSK01&amp;amp;02.zip|CP/M disk images]] - CPMDSK01.IMG is bootable and contains all the files of the 3 CP/M Plus system disks and year 2000 compliant binaries downloaded from the [http://www.cpm.z80.de/binary.html Digital Research Binary Files]. CPMDSK02.IMG is empty and can also be used as a template.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Videos==&lt;br /&gt;
* [https://youtu.be/GMWsRzNhQTM How to create and prepare a CP/M image file in a FAT formatted hard disk]&lt;br /&gt;
* [https://youtu.be/nxow6Y5O4Dc Hard disk utilization and dual boot]&lt;br /&gt;
* [https://youtu.be/em7dHOdaylg How to create a CP/M image file under SYMBOS]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
[[category:Expansion ROM]] [[category:Software]] [[category:Applications]] [[category:CP/M]] [[category:DSK images]]&lt;/div&gt;</summary>
		<author><name>D kef</name></author>	</entry>

	<entry>
		<id>https://oldwiki.cpcwiki.eu/index.php?title=HDCPM&amp;diff=109256</id>
		<title>HDCPM</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.cpcwiki.eu/index.php?title=HDCPM&amp;diff=109256"/>
				<updated>2022-09-04T12:13:24Z</updated>
		
		<summary type="html">&lt;p&gt;D kef: /* Downloads */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;HDCPM is a Hard Disk boot loader for [[CP/M]] plus developed by d_kef&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can read more about the development of the application here:&amp;lt;br /&amp;gt;&lt;br /&gt;
https://www.cpcwiki.eu/forum/applications/hdcpm-boot-and-run-cpm-plus-from-hard-disk/&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:hdcpm.gif|HDCPM booting CP/M Plus]]&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It comes in the form of:&lt;br /&gt;
* a standard background ROM that can be installed in any available ROM position.&lt;br /&gt;
* a standard binary file that can be loaded from floppy or hard drive.&lt;br /&gt;
&lt;br /&gt;
 	&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following configurations are possible with one hard disk:&lt;br /&gt;
&lt;br /&gt;
* One not partitioned, CP/M formatted hard disk. The whole hard disk is used by CP/M.&lt;br /&gt;
* One to four CP/M formatted partitions. Every partition is accessed as a separate hard disk by CP/M.&lt;br /&gt;
* 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.&lt;br /&gt;
* 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.&lt;br /&gt;
* For interfaces that use SD card or USB flash drive as a mass storage device ([[M4 Board]], [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] or [http://www.tmtlogic.com/ Symbiface III]) the only supported configuration is one to four CP/M disk image files in the root directory of the FAT file system.&lt;br /&gt;
	&lt;br /&gt;
Currently only the master IDE device can be accessed by HDCPM. The slave device is available to be used by your favourite DOS.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
HDCPM can also utilize the RTC found in the [[SYMBiFACE II]] in order to implement CP/M Plus BIOS function 26: TIME.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
HDCPM is compatible and can be used together with the [[Dobbertin Harddisc]].&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
HDCPM distribution disk contains the following files:&lt;br /&gt;
* HDCPM.ROM the ROM itself&lt;br /&gt;
* HDCPM.BIN the executable binary file&lt;br /&gt;
* HDMGR.COM Hard Disk Manager utility&lt;br /&gt;
* RTC.COM RTC synchronization utility&lt;br /&gt;
* MAKEIMG.BAS CP/M image file creation utility&lt;br /&gt;
* MAKEIMG.BIN CP/M image file creation binary&lt;br /&gt;
* MAKEIMG.EXE CP/M image file creation utility for [[SymbOS]]&lt;br /&gt;
* HDCPM.DOC the User guide&lt;br /&gt;
&lt;br /&gt;
HDCPM is free software. It can be used and distributed with no restrictions.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Prerequisites==&lt;br /&gt;
* Amstrad CPC/Plus computer capable of running CP/M Plus.&lt;br /&gt;
* ROM box or other ROM expansion hardware if using the ROM.&lt;br /&gt;
* Optionaly a FAT aware DOS like M4 ROM, USIfAC ROM, [[UniDOS]], [https://www.cpcwiki.eu/forum/applications/cubeios-fat16fat32-rom-for-the-cpc's-with-xmass/ CubeMDOS] etc if using the binary.&lt;br /&gt;
* One of the following mass storage interfaces:&lt;br /&gt;
** [[SYMBiFACE II]]&lt;br /&gt;
** [[X-Mass]]&lt;br /&gt;
** [[uIDE 16]] (base address = &amp;amp;FEF0)&lt;br /&gt;
** [[M4 Board]]&lt;br /&gt;
** [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II]&lt;br /&gt;
** [http://www.tmtlogic.com/ Symbiface III]&lt;br /&gt;
* Compatible storage device with enough free space to accommodate the desirable CP/M hard disk configuration.&lt;br /&gt;
* Floppy disk drive for initialization of the file system.&lt;br /&gt;
* CP/M Plus system disks for making the system bootable.&lt;br /&gt;
* Optionally a [[SYMBiFACE II]] compatible RTC.&lt;br /&gt;
&lt;br /&gt;
==Restrictions==&lt;br /&gt;
* CP/M 2.2 or lower is not supported.&lt;br /&gt;
* 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.&lt;br /&gt;
* Only the master IDE device is accessible by HDCPM.&lt;br /&gt;
* The maximum number of hard disk partition/images supported is four.&lt;br /&gt;
* Only primary partitions are supported.&lt;br /&gt;
* If you want to use CP/M disk images then they must be stored in a FAT16 or FAT32 formatted disk or partition.&lt;br /&gt;
* If the hard disk is partitioned then the CP/M disk images must be placed in the first partition of the disk.&lt;br /&gt;
* The CP/M disk images must be placed in the root directory of the FAT file system.&lt;br /&gt;
* The CP/M disk images must NOT be fragmented and must have the correct size.&lt;br /&gt;
* 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. &lt;br /&gt;
* Only storage devices with 512 bytes sector size are supported.&lt;br /&gt;
* Only storage devices with LBA addressing are supported.&lt;br /&gt;
* Date stamps of CP/M disk image files are not maintained.&lt;br /&gt;
* 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.&lt;br /&gt;
==How it works==&lt;br /&gt;
===Using the ROM===&lt;br /&gt;
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:&lt;br /&gt;
|HDCPM (no TIME function support) or |HDCPMT (TIME function support)&amp;lt;br /&amp;gt;&lt;br /&gt;
Alternatively it can be started by holding down the Tab key (no TIME function support) or Shift+Tab (TIME function support), during power-up.&amp;lt;br /&amp;gt;&lt;br /&gt;
===Using the binary===&lt;br /&gt;
HDCPM can be started by running the HDCPM.BIN file from floppy drive or mass storage.&amp;lt;br /&amp;gt;&lt;br /&gt;
===Functions===&lt;br /&gt;
HDCPM will then execute the following functions:&amp;lt;br /&amp;gt;&lt;br /&gt;
* Search for a compatible mass storage interface.&lt;br /&gt;
* Move the boot loader and the CP/M patcher to RAM.&lt;br /&gt;
* Mount 1 to 4 CP/M image files and/or partitions and perform fragmentation and size test.&lt;br /&gt;
* 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.&lt;br /&gt;
* Read the .EMS file from the reserved track and store it in RAM just as the normal CP/M Plus boot loader does.&lt;br /&gt;
* 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.&lt;br /&gt;
* Patch the SCB in order to change the startup/default drive.&lt;br /&gt;
* 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 memory expansion]] or [[Dobbertin Memory Expansion]] driver is present.&lt;br /&gt;
* Move the ALV of the Dk'tronics RAM disk if [[Z-System]] is detected.&lt;br /&gt;
* Patch the CP/M console with the desired colour scheme. &lt;br /&gt;
* Patch the system message.&lt;br /&gt;
* Do a normal CP/M cold start.&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==CP/M Plus disk image files==&lt;br /&gt;
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 [https://hexed.it/ hexed.it] or any hex editor capable of creating binary files filled with a specific pattern.&amp;lt;br /&amp;gt;&lt;br /&gt;
In case of hexed.it select 'New file' fill in 'Size of the new file = 8519680' and 'Fill Pattern = 0xE5' and press apply. Save the file as CPMDSK01.IMG&amp;lt;br /&amp;gt;&lt;br /&gt;
If you have a FAT capable DOS installed in your AMSTRAD you can use the provided MAKEIMG.BAS utility to create your image file. Keep in mind that it takes more than 1.5 hour for a 8MB image file to be created that way.&amp;lt;br /&amp;gt;&lt;br /&gt;
CP/M disk image files can be accessed by a modern computer with [http://www.moria.de/~michael/cpmtools/ cpmtools]. Use the command |HDDEF to see the record you must insert in the diskdefs file.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The HDCPM record for diskdefs is:&lt;br /&gt;
&lt;br /&gt;
       diskdef hdcpm&lt;br /&gt;
          seclen 512&lt;br /&gt;
          tracks 65&lt;br /&gt;
          sectrk 256&lt;br /&gt;
          blocksize 8192&lt;br /&gt;
          maxdir 1024&lt;br /&gt;
          skew 0&lt;br /&gt;
          boottrk 1&lt;br /&gt;
          os 3&lt;br /&gt;
       end&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Hdcpm-boot-m4.png|thumb|HDCPM binary booting on M4 Board]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==CP/M Plus disk/partitions==&lt;br /&gt;
You can also create one or more partitions in order to format them to [http://www.seasip.info/Cpm/format31.html CP/M-80] 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.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM examines the hard disk's MBR upon start and finds the partition information. Then it finds the LBA of the first sector of each partition and passes it to the CP/M hard disk driver. The CP/M hard disk driver doesn't know anything about partitions. It accesses the partition as if it was a real hard disk.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:hdcpm-ui-boot.png|thumb|HDCPM ROM booting on uIDE-16]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
===Using the ROM===&lt;br /&gt;
* Install the HDCPM ROM in a free ROM slot of your ROM box.&lt;br /&gt;
* Plug in your [[SYMBiFACE II]] compatible IDE interface, [[uIDE 16]], [[M4 Board]] or [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] and attach the proper mass storage device.&lt;br /&gt;
* 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:&amp;lt;br /&amp;gt;&lt;br /&gt;
** (S2): [[SYMBiFACE II]] compatible interface&lt;br /&gt;
** (uI): [[uIDE 16]] interface&lt;br /&gt;
** (M4): [[M4 Board]]&lt;br /&gt;
** (US): [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II]&lt;br /&gt;
** (S3): [http://www.tmtlogic.com/ Symbiface III]&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:hdcpm-s2.png|thumb|HDCPM ROM - SYMBiFACE II]]&lt;br /&gt;
|[[File:hdcpm-ui.png|thumb|HDCPM ROM - uIDE-16]]&lt;br /&gt;
|[[File:hdcpm-m4.png|thumb|HDCPM ROM - M4 Board]]&lt;br /&gt;
|[[File:hdcpm-us.png|thumb|HDCPM ROM - USIfAC II]]&lt;br /&gt;
|[[File:hdcpm-s3.png|thumb|HDCPM ROM - Symbiface III]]&lt;br /&gt;
|}&lt;br /&gt;
In case a RTC is detected you will also see the RTC initialization message and the current date and time: ''RTC found: 2021/01/01 12:01:01''&lt;br /&gt;
* Use your original CP/M Plus system disk set to Boot CP/M Plus.&lt;br /&gt;
* 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.&lt;br /&gt;
* Reset your AMSTRAD and boot CP/M from the hard disk with the command |HDCPM. The Boot loader will check your image file(s) against fragmentation and correct size and boot the system to the CP/M command prompt. If the first image file is fragmented or has the wrong length the system will not boot. All other image files will be ignored if found to be fragmented or have the wrong length.&lt;br /&gt;
* In case you don't use CP/M image files just boot the system with |HDCPM or |HDCPMT&lt;br /&gt;
* Copy the files from your CP/M system floppy disks to the first hard disk.&lt;br /&gt;
* Copy any other needed application etc. to your CP/M hard disk(s).&lt;br /&gt;
* You are ready to go.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Using the binary===&lt;br /&gt;
* Plug in your [[SYMBiFACE II]] compatible IDE interface, [[uIDE 16]], [[M4 Board]] or [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] and attach the proper mass storage device.&lt;br /&gt;
* Use your original CP/M Plus system disk set to Boot CP/M Plus.&lt;br /&gt;
* 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.&lt;br /&gt;
* 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.&lt;br /&gt;
* You are ready to go.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==ROM commands==&lt;br /&gt;
[[File:hdcpm-us-boot.png|thumb|HDCPM ROM booting on USIfAC II]]&lt;br /&gt;
* |HDCPM mounts the hard disks and boots CP/M Plus. If [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] is used enable the USB disk with the |USB command first.&lt;br /&gt;
* |HDCPMT works like |HDCPM but also utilizes the RTC.&lt;br /&gt;
* |HDDPB shows the Disk Parameter Block.&lt;br /&gt;
* |HDDEF shows the diskdefs entry for CP/M tools and the file system size.&lt;br /&gt;
* |DATE displays the current date.&lt;br /&gt;
* |TIME displays the current time. If [[M4 Board]] is used |DATE and |TIME will be redirected to M4 |TIME.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==The HDCPM binary file==&lt;br /&gt;
* If [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] is used, use your PC to copy HDCPM.BIN to your USB flash disk. Then insert it to your [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] power up your Amstrad and enable the USB disk with the |USB command.&lt;br /&gt;
* Execute the file from the floppy disk or from your mass storage device with ''RUN&amp;quot;HDCPM&amp;quot;''. 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.&lt;br /&gt;
*  [[M4 Board]] and [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ 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 [https://www.cpcwiki.eu/forum/applications/cubeios-fat16fat32-rom-for-the-cpc's-with-xmass/ CubeMDOS] or [[UniDOS]], installed.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==The MAKEIMG.BAS and MAKEIMG.EXE utilities==&lt;br /&gt;
===MAKEIMG.BAS===&lt;br /&gt;
Although this utility should not be your first option, you can use it to make a new empty CP/M disk image file.&amp;lt;br /&amp;gt;&lt;br /&gt;
In case you decide to use it make sure you have a FAT aware DOS installed in your system. MAKEIMG makes use of the firmware calls CAS_OUT_OPEN, CAS_OUT_CLOSE and CAS_OUT_CHAR so your DOS must support them.&amp;lt;br /&amp;gt;&lt;br /&gt;
Copy the files MAKEIMG.BAS and MAKEIMG.BIN to the root directory of your FAT formatted hard disk and make it your current drive. Run the utility with ''RUN&amp;quot;MAKEIMG&amp;quot;'' and don't hold your breath!&amp;lt;br /&amp;gt;&lt;br /&gt;
Making an image file this way takes more than 1.5 hour for an 8MB file so literally... don't hold your breath.&amp;lt;br /&amp;gt;&lt;br /&gt;
Here is a small tutorial on how to setup and use a CP/M image file: https://youtu.be/GMWsRzNhQTM&amp;lt;br /&amp;gt;&lt;br /&gt;
===MAKEIMG.EXE===&lt;br /&gt;
This utility is a [[SymbOS]] application.&amp;lt;br /&amp;gt;&lt;br /&gt;
Use this utility to create your CP/M hard disk images from within [[SymbOS]]. 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.&amp;lt;br /&amp;gt;&lt;br /&gt;
MAKEIMG.EXE has been developed with [http://www.symbos.de/quigs.htm Quigs] for [[SymbOS]].&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Hdcpm-makeimg-sym1.png|thumb|MAKEIMG.EXE in action]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==The HDMGR.COM utility==&lt;br /&gt;
This is the Hard Disk Manager utility.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can use this utility to get information about your hard disk geometry, disk image files, partitions and boot sector. You have to use this utility to format a hard disk, disk image file or partition to CP/M format or manipulate the boot sector of the hard disk and/or transfer an .EMS system file to the reserved track of the hard disk.&amp;lt;br /&amp;gt;&lt;br /&gt;
The boot sector contains information about the CP/M disk drive letters, start-up drive and console colour scheme. All those properties can be changed with HDMGR.COM.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR will perform a fragmentation test of the discovered CP/M hard disk image files uppon execution.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
The HDMGR.COM utility is self explanatory. Just run it from the CP/M command prompt.&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Hdcpm-hdmgr-m.png|thumb|HDMGR main menu]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-1.png|thumb|HDMGR Hardware information]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-2.png|thumb|HDMGR Partition information]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-3.png|thumb|HDMGR CP/M disk image information]]&lt;br /&gt;
|}&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Hdcpm-hdmgr-4.png|thumb|HDMGR Boot sector information]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-5.png|thumb|HDMGR Log disk]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-7.png|thumb|HDMGR Manage boot sector]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-8.png|thumb|HDMGR Transfer CP/M to disk]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==The RTC.COM utility==&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can synchronize the date and time of CP/M Plus with the RTC by running ''RTC -G'' manually or via your PROFILE.SUB&amp;lt;br /&amp;gt;&lt;br /&gt;
You can also set your RTC to the current CP/M date and time by running ''RTC -S''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Error messages==&lt;br /&gt;
===Hard disk errors===&lt;br /&gt;
* ''*** No mass storage found ***''&lt;br /&gt;
	No compatible mass storage interface can be found.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: DISK I/O''&lt;br /&gt;
I/O error occurred during the last read/write operation.&lt;br /&gt;
	Your hard disk might be defect or the USB disk is not enabled.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: INVALID BOOT SECTOR''&lt;br /&gt;
	No FAT or CP/M boot sector was found in a not partitioned hard disk.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: INVALID FILE SYSTEM''&lt;br /&gt;
	The first partition in a partitioned hard disk is not a FAT or CP/M-80&lt;br /&gt;
	one.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: INVALID SECTOR SIZE''&lt;br /&gt;
	The hard disk used has a sector size not equal to 512 bytes.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: CPMDSK01.IMG NOT FOUND''&lt;br /&gt;
	The CP/M image file named CPMDSK01.IMG can't be found in the FAT&lt;br /&gt;
	formatted hard disk or partition. &lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: CP/M SYSTEM FILE NOT FOUND''&lt;br /&gt;
	The .EMS CP/M system file can't be found in the system track of your&lt;br /&gt;
	CP/M partition or image file.&lt;br /&gt;
	&lt;br /&gt;
*  ''ERROR: CPMDSK01.IMG IS FRAGMENTED''&lt;br /&gt;
	The first CP/M image file is fragmented, the system won't mount it.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: CPMDSK01.IMG HAS WRONG LENGTH''&lt;br /&gt;
	The first CP/M image file has wrong length, the system won't mount it.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: CPMDSK01.IMG IS NOT FORMATTED''&lt;br /&gt;
	The first CP/M image file is not formatted to CP/M-80 format, the&lt;br /&gt;
	system won't mount it. Use the HDMGR.COM utility to format it.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: INCOMPATIBLE EMS FILE''&lt;br /&gt;
	The .EMS system file that was loaded from the system track is not&lt;br /&gt;
	compatible with HDCPM.&lt;br /&gt;
&lt;br /&gt;
===RTC errors===&lt;br /&gt;
* ''*** Battery depleted ***''&lt;br /&gt;
	The RTC battery is depleted. The RTC driver will continue to operate&lt;br /&gt;
	normally but the readings are not reliable. Replace the RTC battery.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Release info==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Version !! Changes !! Download&lt;br /&gt;
|-&lt;br /&gt;
| v1.00 December 2021 || Initial release || [[Media:hdcpm100.dsk|hdcpm100.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.01 January 2022 || HDCPM.ROM, HDMGR.COM: code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: (bug fix) fragmented file detection was not working properly unless the file was CPMDSK01.IMG&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: (bug fix) unformatted image file detection was not working properly. New error message added.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) CP/M drive table wasn't patched properly.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) initialization of floppy drive(s) was corrupted due to misplaced code.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: added .EMS file compatibility check. New error message added.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: added support for Dobbertin RAM disk driver.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: added compatibility with Dobbertin HD20 Harddisc&amp;lt;br /&amp;gt;&lt;br /&gt;
MAKEIMG.EXE: added utility for creating an image file from within SYMBOS.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&lt;br /&gt;
|| [[Media:hdcpm101.dsk|hdcpm101.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.02 March 2022 || HDCPM.ROM, HDMGR.COM: added support for M4 board.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: added support for uIDE-16 interface.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) the ROM was initialized even if no compatible interface was found.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: error message change.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: option &amp;quot;F&amp;quot; has been removed. HDCPM will always do a disk fragmentation test during boot.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: power up message changed in order to provide information about the type of the detected interface.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: two bytes of RAM will be reserved by the ROM for storing the interface type and M4 ROM number.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&lt;br /&gt;
|| [[Media:hdcpm102.dsk|hdcpm102.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.03 April 2022 || HDCPM.ROM, HDMGR.COM: added support for USIfAC II.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) uIDE-16 detection was broken.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&lt;br /&gt;
|| [[Media:hdcpm103.dsk|hdcpm103.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.04 June 2022|| HDCPM.ROM: code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.BIN: added executable binary file version of HDCPM.&lt;br /&gt;
|| [[Media:hdcpm104.dsk|hdcpm104.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.05 July 2022 || HDCPM.ROM, HDCPM.BIN, HDMGR.COM: added support for Symbiface III&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDCPM.BIN:  code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR.COM: Hardware info added for USIfAC II&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR.COM: (bug fix) the 'Select boot file' menu was garbled if there were 8 or more .EMS files present.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&lt;br /&gt;
|| [[Media:hdcpm105.dsk|hdcpm105.dsk]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Other Downloads==&lt;br /&gt;
*[[Media:CPMDSK01&amp;amp;02.zip|CP/M disk images]] - CPMDSK01.IMG is bootable and contains all the files of the 3 CP/M Plus system disks and year 2000 compliant binaries downloaded from the [http://www.cpm.z80.de/binary.html Digital Research Binary Files]. CPMDSK02.IMG is empty and can also be used as a template.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Videos==&lt;br /&gt;
* [https://youtu.be/GMWsRzNhQTM How to create and prepare a CP/M image file in a FAT formatted hard disk]&lt;br /&gt;
* [https://youtu.be/nxow6Y5O4Dc Hard disk utilization and dual boot]&lt;br /&gt;
* [https://youtu.be/em7dHOdaylg How to create a CP/M image file under SYMBOS]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
[[category:Expansion ROM]] [[category:Software]] [[category:Applications]] [[category:CP/M]] [[category:DSK images]]&lt;/div&gt;</summary>
		<author><name>D kef</name></author>	</entry>

	<entry>
		<id>https://oldwiki.cpcwiki.eu/index.php?title=HDCPM&amp;diff=109255</id>
		<title>HDCPM</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.cpcwiki.eu/index.php?title=HDCPM&amp;diff=109255"/>
				<updated>2022-08-26T12:26:28Z</updated>
		
		<summary type="html">&lt;p&gt;D kef: /* Hard disk errors */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;HDCPM is a Hard Disk boot loader for [[CP/M]] plus developed by d_kef&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can read more about the development of the application here:&amp;lt;br /&amp;gt;&lt;br /&gt;
https://www.cpcwiki.eu/forum/applications/hdcpm-boot-and-run-cpm-plus-from-hard-disk/&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:hdcpm.gif|HDCPM booting CP/M Plus]]&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It comes in the form of:&lt;br /&gt;
* a standard background ROM that can be installed in any available ROM position.&lt;br /&gt;
* a standard binary file that can be loaded from floppy or hard drive.&lt;br /&gt;
&lt;br /&gt;
 	&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following configurations are possible with one hard disk:&lt;br /&gt;
&lt;br /&gt;
* One not partitioned, CP/M formatted hard disk. The whole hard disk is used by CP/M.&lt;br /&gt;
* One to four CP/M formatted partitions. Every partition is accessed as a separate hard disk by CP/M.&lt;br /&gt;
* 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.&lt;br /&gt;
* 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.&lt;br /&gt;
* For interfaces that use SD card or USB flash drive as a mass storage device ([[M4 Board]], [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] or [http://www.tmtlogic.com/ Symbiface III]) the only supported configuration is one to four CP/M disk image files in the root directory of the FAT file system.&lt;br /&gt;
	&lt;br /&gt;
Currently only the master IDE device can be accessed by HDCPM. The slave device is available to be used by your favourite DOS.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
HDCPM can also utilize the RTC found in the [[SYMBiFACE II]] in order to implement CP/M Plus BIOS function 26: TIME.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
HDCPM is compatible and can be used together with the [[Dobbertin Harddisc]].&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
HDCPM distribution disk contains the following files:&lt;br /&gt;
* HDCPM.ROM the ROM itself&lt;br /&gt;
* HDCPM.BIN the executable binary file&lt;br /&gt;
* HDMGR.COM Hard Disk Manager utility&lt;br /&gt;
* RTC.COM RTC synchronization utility&lt;br /&gt;
* MAKEIMG.BAS CP/M image file creation utility&lt;br /&gt;
* MAKEIMG.BIN CP/M image file creation binary&lt;br /&gt;
* MAKEIMG.EXE CP/M image file creation utility for [[SymbOS]]&lt;br /&gt;
* HDCPM.DOC the User guide&lt;br /&gt;
&lt;br /&gt;
HDCPM is free software. It can be used and distributed with no restrictions.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Prerequisites==&lt;br /&gt;
* Amstrad CPC/Plus computer capable of running CP/M Plus.&lt;br /&gt;
* ROM box or other ROM expansion hardware if using the ROM.&lt;br /&gt;
* Optionaly a FAT aware DOS like M4 ROM, USIfAC ROM, [[UniDOS]], [https://www.cpcwiki.eu/forum/applications/cubeios-fat16fat32-rom-for-the-cpc's-with-xmass/ CubeMDOS] etc if using the binary.&lt;br /&gt;
* One of the following mass storage interfaces:&lt;br /&gt;
** [[SYMBiFACE II]]&lt;br /&gt;
** [[X-Mass]]&lt;br /&gt;
** [[uIDE 16]] (base address = &amp;amp;FEF0)&lt;br /&gt;
** [[M4 Board]]&lt;br /&gt;
** [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II]&lt;br /&gt;
** [http://www.tmtlogic.com/ Symbiface III]&lt;br /&gt;
* Compatible storage device with enough free space to accommodate the desirable CP/M hard disk configuration.&lt;br /&gt;
* Floppy disk drive for initialization of the file system.&lt;br /&gt;
* CP/M Plus system disks for making the system bootable.&lt;br /&gt;
* Optionally a [[SYMBiFACE II]] compatible RTC.&lt;br /&gt;
&lt;br /&gt;
==Restrictions==&lt;br /&gt;
* CP/M 2.2 or lower is not supported.&lt;br /&gt;
* 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.&lt;br /&gt;
* Only the master IDE device is accessible by HDCPM.&lt;br /&gt;
* The maximum number of hard disk partition/images supported is four.&lt;br /&gt;
* Only primary partitions are supported.&lt;br /&gt;
* If you want to use CP/M disk images then they must be stored in a FAT16 or FAT32 formatted disk or partition.&lt;br /&gt;
* If the hard disk is partitioned then the CP/M disk images must be placed in the first partition of the disk.&lt;br /&gt;
* The CP/M disk images must be placed in the root directory of the FAT file system.&lt;br /&gt;
* The CP/M disk images must NOT be fragmented and must have the correct size.&lt;br /&gt;
* 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. &lt;br /&gt;
* Only storage devices with 512 bytes sector size are supported.&lt;br /&gt;
* Only storage devices with LBA addressing are supported.&lt;br /&gt;
* Date stamps of CP/M disk image files are not maintained.&lt;br /&gt;
* 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.&lt;br /&gt;
==How it works==&lt;br /&gt;
===Using the ROM===&lt;br /&gt;
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:&lt;br /&gt;
|HDCPM (no TIME function support) or |HDCPMT (TIME function support)&amp;lt;br /&amp;gt;&lt;br /&gt;
Alternatively it can be started by holding down the Tab key (no TIME function support) or Shift+Tab (TIME function support), during power-up.&amp;lt;br /&amp;gt;&lt;br /&gt;
===Using the binary===&lt;br /&gt;
HDCPM can be started by running the HDCPM.BIN file from floppy drive or mass storage.&amp;lt;br /&amp;gt;&lt;br /&gt;
===Functions===&lt;br /&gt;
HDCPM will then execute the following functions:&amp;lt;br /&amp;gt;&lt;br /&gt;
* Search for a compatible mass storage interface.&lt;br /&gt;
* Move the boot loader and the CP/M patcher to RAM.&lt;br /&gt;
* Mount 1 to 4 CP/M image files and/or partitions and perform fragmentation and size test.&lt;br /&gt;
* 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.&lt;br /&gt;
* Read the .EMS file from the reserved track and store it in RAM just as the normal CP/M Plus boot loader does.&lt;br /&gt;
* 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.&lt;br /&gt;
* Patch the SCB in order to change the startup/default drive.&lt;br /&gt;
* 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 memory expansion]] or [[Dobbertin Memory Expansion]] driver is present.&lt;br /&gt;
* Move the ALV of the Dk'tronics RAM disk if [[Z-System]] is detected.&lt;br /&gt;
* Patch the CP/M console with the desired colour scheme. &lt;br /&gt;
* Patch the system message.&lt;br /&gt;
* Do a normal CP/M cold start.&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==CP/M Plus disk image files==&lt;br /&gt;
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 [https://hexed.it/ hexed.it] or any hex editor capable of creating binary files filled with a specific pattern.&amp;lt;br /&amp;gt;&lt;br /&gt;
In case of hexed.it select 'New file' fill in 'Size of the new file = 8519680' and 'Fill Pattern = 0xE5' and press apply. Save the file as CPMDSK01.IMG&amp;lt;br /&amp;gt;&lt;br /&gt;
If you have a FAT capable DOS installed in your AMSTRAD you can use the provided MAKEIMG.BAS utility to create your image file. Keep in mind that it takes more than 1.5 hour for a 8MB image file to be created that way.&amp;lt;br /&amp;gt;&lt;br /&gt;
CP/M disk image files can be accessed by a modern computer with [http://www.moria.de/~michael/cpmtools/ cpmtools]. Use the command |HDDEF to see the record you must insert in the diskdefs file.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The HDCPM record for diskdefs is:&lt;br /&gt;
&lt;br /&gt;
       diskdef hdcpm&lt;br /&gt;
          seclen 512&lt;br /&gt;
          tracks 65&lt;br /&gt;
          sectrk 256&lt;br /&gt;
          blocksize 8192&lt;br /&gt;
          maxdir 1024&lt;br /&gt;
          skew 0&lt;br /&gt;
          boottrk 1&lt;br /&gt;
          os 3&lt;br /&gt;
       end&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Hdcpm-boot-m4.png|thumb|HDCPM binary booting on M4 Board]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==CP/M Plus disk/partitions==&lt;br /&gt;
You can also create one or more partitions in order to format them to [http://www.seasip.info/Cpm/format31.html CP/M-80] 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.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM examines the hard disk's MBR upon start and finds the partition information. Then it finds the LBA of the first sector of each partition and passes it to the CP/M hard disk driver. The CP/M hard disk driver doesn't know anything about partitions. It accesses the partition as if it was a real hard disk.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:hdcpm-ui-boot.png|thumb|HDCPM ROM booting on uIDE-16]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
===Using the ROM===&lt;br /&gt;
* Install the HDCPM ROM in a free ROM slot of your ROM box.&lt;br /&gt;
* Plug in your [[SYMBiFACE II]] compatible IDE interface, [[uIDE 16]], [[M4 Board]] or [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] and attach the proper mass storage device.&lt;br /&gt;
* 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:&amp;lt;br /&amp;gt;&lt;br /&gt;
** (S2): [[SYMBiFACE II]] compatible interface&lt;br /&gt;
** (uI): [[uIDE 16]] interface&lt;br /&gt;
** (M4): [[M4 Board]]&lt;br /&gt;
** (US): [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II]&lt;br /&gt;
** (S3): [http://www.tmtlogic.com/ Symbiface III]&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:hdcpm-s2.png|thumb|HDCPM ROM - SYMBiFACE II]]&lt;br /&gt;
|[[File:hdcpm-ui.png|thumb|HDCPM ROM - uIDE-16]]&lt;br /&gt;
|[[File:hdcpm-m4.png|thumb|HDCPM ROM - M4 Board]]&lt;br /&gt;
|[[File:hdcpm-us.png|thumb|HDCPM ROM - USIfAC II]]&lt;br /&gt;
|[[File:hdcpm-s3.png|thumb|HDCPM ROM - Symbiface III]]&lt;br /&gt;
|}&lt;br /&gt;
In case a RTC is detected you will also see the RTC initialization message and the current date and time: ''RTC found: 2021/01/01 12:01:01''&lt;br /&gt;
* Use your original CP/M Plus system disk set to Boot CP/M Plus.&lt;br /&gt;
* 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.&lt;br /&gt;
* Reset your AMSTRAD and boot CP/M from the hard disk with the command |HDCPM. The Boot loader will check your image file(s) against fragmentation and correct size and boot the system to the CP/M command prompt. If the first image file is fragmented or has the wrong length the system will not boot. All other image files will be ignored if found to be fragmented or have the wrong length.&lt;br /&gt;
* In case you don't use CP/M image files just boot the system with |HDCPM or |HDCPMT&lt;br /&gt;
* Copy the files from your CP/M system floppy disks to the first hard disk.&lt;br /&gt;
* Copy any other needed application etc. to your CP/M hard disk(s).&lt;br /&gt;
* You are ready to go.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Using the binary===&lt;br /&gt;
* Plug in your [[SYMBiFACE II]] compatible IDE interface, [[uIDE 16]], [[M4 Board]] or [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] and attach the proper mass storage device.&lt;br /&gt;
* Use your original CP/M Plus system disk set to Boot CP/M Plus.&lt;br /&gt;
* 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.&lt;br /&gt;
* 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.&lt;br /&gt;
* You are ready to go.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==ROM commands==&lt;br /&gt;
[[File:hdcpm-us-boot.png|thumb|HDCPM ROM booting on USIfAC II]]&lt;br /&gt;
* |HDCPM mounts the hard disks and boots CP/M Plus. If [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] is used enable the USB disk with the |USB command first.&lt;br /&gt;
* |HDCPMT works like |HDCPM but also utilizes the RTC.&lt;br /&gt;
* |HDDPB shows the Disk Parameter Block.&lt;br /&gt;
* |HDDEF shows the diskdefs entry for CP/M tools and the file system size.&lt;br /&gt;
* |DATE displays the current date.&lt;br /&gt;
* |TIME displays the current time. If [[M4 Board]] is used |DATE and |TIME will be redirected to M4 |TIME.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==The HDCPM binary file==&lt;br /&gt;
* If [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] is used, use your PC to copy HDCPM.BIN to your USB flash disk. Then insert it to your [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] power up your Amstrad and enable the USB disk with the |USB command.&lt;br /&gt;
* Execute the file from the floppy disk or from your mass storage device with ''RUN&amp;quot;HDCPM&amp;quot;''. 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.&lt;br /&gt;
*  [[M4 Board]] and [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ 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 [https://www.cpcwiki.eu/forum/applications/cubeios-fat16fat32-rom-for-the-cpc's-with-xmass/ CubeMDOS] or [[UniDOS]], installed.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==The MAKEIMG.BAS and MAKEIMG.EXE utilities==&lt;br /&gt;
===MAKEIMG.BAS===&lt;br /&gt;
Although this utility should not be your first option, you can use it to make a new empty CP/M disk image file.&amp;lt;br /&amp;gt;&lt;br /&gt;
In case you decide to use it make sure you have a FAT aware DOS installed in your system. MAKEIMG makes use of the firmware calls CAS_OUT_OPEN, CAS_OUT_CLOSE and CAS_OUT_CHAR so your DOS must support them.&amp;lt;br /&amp;gt;&lt;br /&gt;
Copy the files MAKEIMG.BAS and MAKEIMG.BIN to the root directory of your FAT formatted hard disk and make it your current drive. Run the utility with ''RUN&amp;quot;MAKEIMG&amp;quot;'' and don't hold your breath!&amp;lt;br /&amp;gt;&lt;br /&gt;
Making an image file this way takes more than 1.5 hour for an 8MB file so literally... don't hold your breath.&amp;lt;br /&amp;gt;&lt;br /&gt;
Here is a small tutorial on how to setup and use a CP/M image file: https://youtu.be/GMWsRzNhQTM&amp;lt;br /&amp;gt;&lt;br /&gt;
===MAKEIMG.EXE===&lt;br /&gt;
This utility is a [[SymbOS]] application.&amp;lt;br /&amp;gt;&lt;br /&gt;
Use this utility to create your CP/M hard disk images from within [[SymbOS]]. 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.&amp;lt;br /&amp;gt;&lt;br /&gt;
MAKEIMG.EXE has been developed with [http://www.symbos.de/quigs.htm Quigs] for [[SymbOS]].&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Hdcpm-makeimg-sym1.png|thumb|MAKEIMG.EXE in action]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==The HDMGR.COM utility==&lt;br /&gt;
This is the Hard Disk Manager utility.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can use this utility to get information about your hard disk geometry, disk image files, partitions and boot sector. You have to use this utility to format a hard disk, disk image file or partition to CP/M format or manipulate the boot sector of the hard disk and/or transfer an .EMS system file to the reserved track of the hard disk.&amp;lt;br /&amp;gt;&lt;br /&gt;
The boot sector contains information about the CP/M disk drive letters, start-up drive and console colour scheme. All those properties can be changed with HDMGR.COM.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR will perform a fragmentation test of the discovered CP/M hard disk image files uppon execution.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
The HDMGR.COM utility is self explanatory. Just run it from the CP/M command prompt.&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Hdcpm-hdmgr-m.png|thumb|HDMGR main menu]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-1.png|thumb|HDMGR Hardware information]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-2.png|thumb|HDMGR Partition information]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-3.png|thumb|HDMGR CP/M disk image information]]&lt;br /&gt;
|}&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Hdcpm-hdmgr-4.png|thumb|HDMGR Boot sector information]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-5.png|thumb|HDMGR Log disk]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-7.png|thumb|HDMGR Manage boot sector]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-8.png|thumb|HDMGR Transfer CP/M to disk]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==The RTC.COM utility==&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can synchronize the date and time of CP/M Plus with the RTC by running ''RTC -G'' manually or via your PROFILE.SUB&amp;lt;br /&amp;gt;&lt;br /&gt;
You can also set your RTC to the current CP/M date and time by running ''RTC -S''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Error messages==&lt;br /&gt;
===Hard disk errors===&lt;br /&gt;
* ''*** No mass storage found ***''&lt;br /&gt;
	No compatible mass storage interface can be found.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: DISK I/O''&lt;br /&gt;
I/O error occurred during the last read/write operation.&lt;br /&gt;
	Your hard disk might be defect or the USB disk is not enabled.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: INVALID BOOT SECTOR''&lt;br /&gt;
	No FAT or CP/M boot sector was found in a not partitioned hard disk.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: INVALID FILE SYSTEM''&lt;br /&gt;
	The first partition in a partitioned hard disk is not a FAT or CP/M-80&lt;br /&gt;
	one.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: INVALID SECTOR SIZE''&lt;br /&gt;
	The hard disk used has a sector size not equal to 512 bytes.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: CPMDSK01.IMG NOT FOUND''&lt;br /&gt;
	The CP/M image file named CPMDSK01.IMG can't be found in the FAT&lt;br /&gt;
	formatted hard disk or partition. &lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: CP/M SYSTEM FILE NOT FOUND''&lt;br /&gt;
	The .EMS CP/M system file can't be found in the system track of your&lt;br /&gt;
	CP/M partition or image file.&lt;br /&gt;
	&lt;br /&gt;
*  ''ERROR: CPMDSK01.IMG IS FRAGMENTED''&lt;br /&gt;
	The first CP/M image file is fragmented, the system won't mount it.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: CPMDSK01.IMG HAS WRONG LENGTH''&lt;br /&gt;
	The first CP/M image file has wrong length, the system won't mount it.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: CPMDSK01.IMG IS NOT FORMATTED''&lt;br /&gt;
	The first CP/M image file is not formatted to CP/M-80 format, the&lt;br /&gt;
	system won't mount it. Use the HDMGR.COM utility to format it.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: INCOMPATIBLE EMS FILE''&lt;br /&gt;
	The .EMS system file that was loaded from the system track is not&lt;br /&gt;
	compatible with HDCPM.&lt;br /&gt;
&lt;br /&gt;
===RTC errors===&lt;br /&gt;
* ''*** Battery depleted ***''&lt;br /&gt;
	The RTC battery is depleted. The RTC driver will continue to operate&lt;br /&gt;
	normally but the readings are not reliable. Replace the RTC battery.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Release info==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Version !! Changes !! Download&lt;br /&gt;
|-&lt;br /&gt;
| v1.00 December 2021 || Initial release || [[Media:hdcpm100.dsk|hdcpm100.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.01 January 2022 || HDCPM.ROM, HDMGR.COM: code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: (bug fix) fragmented file detection was not working properly unless the file was CPMDSK01.IMG&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: (bug fix) unformatted image file detection was not working properly. New error message added.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) CP/M drive table wasn't patched properly.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) initialization of floppy drive(s) was corrupted due to misplaced code.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: added .EMS file compatibility check. New error message added.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: added support for Dobbertin RAM disk driver.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: added compatibility with Dobbertin HD20 Harddisc&amp;lt;br /&amp;gt;&lt;br /&gt;
MAKEIMG.EXE: added utility for creating an image file from within SYMBOS.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&lt;br /&gt;
|| [[Media:hdcpm101.dsk|hdcpm101.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.02 March 2022 || HDCPM.ROM, HDMGR.COM: added support for M4 board.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: added support for uIDE-16 interface.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) the ROM was initialized even if no compatible interface was found.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: error message change.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: option &amp;quot;F&amp;quot; has been removed. HDCPM will always do a disk fragmentation test during boot.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: power up message changed in order to provide information about the type of the detected interface.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: two bytes of RAM will be reserved by the ROM for storing the interface type and M4 ROM number.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&lt;br /&gt;
|| [[Media:hdcpm102.dsk|hdcpm102.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.03 April 2022 || HDCPM.ROM, HDMGR.COM: added support for USIfAC II.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) uIDE-16 detection was broken.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&lt;br /&gt;
|| [[Media:hdcpm103.dsk|hdcpm103.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.04 June 2022|| HDCPM.ROM: code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.BIN: added executable binary file version of HDCPM.&lt;br /&gt;
|| [[Media:hdcpm104.dsk|hdcpm104.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.05 July 2022 || HDCPM.ROM, HDCPM.BIN, HDMGR.COM: added support for Symbiface III&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDCPM.BIN:  code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR.COM: Hardware info added for USIfAC II&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR.COM: (bug fix) the 'Select boot file' menu was garbled if there were 8 or more .EMS files present.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&lt;br /&gt;
|| [[Media:hdcpm105.dsk|hdcpm105.dsk]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Downloads==&lt;br /&gt;
*[[Media:CPMDSK01&amp;amp;02.zip|CP/M disk images]] - CPMDSK01.IMG is bootable and contains all the files of the 3 CP/M Plus system disks and year 2000 compliant binaries downloaded from the [http://www.cpm.z80.de/binary.html Digital Research Binary Files]. CPMDSK02.IMG is empty and can also be used as a template.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Videos==&lt;br /&gt;
* [https://youtu.be/GMWsRzNhQTM How to create and prepare a CP/M image file in a FAT formatted hard disk]&lt;br /&gt;
* [https://youtu.be/nxow6Y5O4Dc Hard disk utilization and dual boot]&lt;br /&gt;
* [https://youtu.be/em7dHOdaylg How to create a CP/M image file under SYMBOS]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
[[category:Expansion ROM]] [[category:Software]] [[category:Applications]] [[category:CP/M]] [[category:DSK images]]&lt;/div&gt;</summary>
		<author><name>D kef</name></author>	</entry>

	<entry>
		<id>https://oldwiki.cpcwiki.eu/index.php?title=HDCPM&amp;diff=109254</id>
		<title>HDCPM</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.cpcwiki.eu/index.php?title=HDCPM&amp;diff=109254"/>
				<updated>2022-08-26T12:23:27Z</updated>
		
		<summary type="html">&lt;p&gt;D kef: /* Hard disk errors */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;HDCPM is a Hard Disk boot loader for [[CP/M]] plus developed by d_kef&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can read more about the development of the application here:&amp;lt;br /&amp;gt;&lt;br /&gt;
https://www.cpcwiki.eu/forum/applications/hdcpm-boot-and-run-cpm-plus-from-hard-disk/&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:hdcpm.gif|HDCPM booting CP/M Plus]]&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It comes in the form of:&lt;br /&gt;
* a standard background ROM that can be installed in any available ROM position.&lt;br /&gt;
* a standard binary file that can be loaded from floppy or hard drive.&lt;br /&gt;
&lt;br /&gt;
 	&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following configurations are possible with one hard disk:&lt;br /&gt;
&lt;br /&gt;
* One not partitioned, CP/M formatted hard disk. The whole hard disk is used by CP/M.&lt;br /&gt;
* One to four CP/M formatted partitions. Every partition is accessed as a separate hard disk by CP/M.&lt;br /&gt;
* 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.&lt;br /&gt;
* 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.&lt;br /&gt;
* For interfaces that use SD card or USB flash drive as a mass storage device ([[M4 Board]], [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] or [http://www.tmtlogic.com/ Symbiface III]) the only supported configuration is one to four CP/M disk image files in the root directory of the FAT file system.&lt;br /&gt;
	&lt;br /&gt;
Currently only the master IDE device can be accessed by HDCPM. The slave device is available to be used by your favourite DOS.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
HDCPM can also utilize the RTC found in the [[SYMBiFACE II]] in order to implement CP/M Plus BIOS function 26: TIME.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
HDCPM is compatible and can be used together with the [[Dobbertin Harddisc]].&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
HDCPM distribution disk contains the following files:&lt;br /&gt;
* HDCPM.ROM the ROM itself&lt;br /&gt;
* HDCPM.BIN the executable binary file&lt;br /&gt;
* HDMGR.COM Hard Disk Manager utility&lt;br /&gt;
* RTC.COM RTC synchronization utility&lt;br /&gt;
* MAKEIMG.BAS CP/M image file creation utility&lt;br /&gt;
* MAKEIMG.BIN CP/M image file creation binary&lt;br /&gt;
* MAKEIMG.EXE CP/M image file creation utility for [[SymbOS]]&lt;br /&gt;
* HDCPM.DOC the User guide&lt;br /&gt;
&lt;br /&gt;
HDCPM is free software. It can be used and distributed with no restrictions.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Prerequisites==&lt;br /&gt;
* Amstrad CPC/Plus computer capable of running CP/M Plus.&lt;br /&gt;
* ROM box or other ROM expansion hardware if using the ROM.&lt;br /&gt;
* Optionaly a FAT aware DOS like M4 ROM, USIfAC ROM, [[UniDOS]], [https://www.cpcwiki.eu/forum/applications/cubeios-fat16fat32-rom-for-the-cpc's-with-xmass/ CubeMDOS] etc if using the binary.&lt;br /&gt;
* One of the following mass storage interfaces:&lt;br /&gt;
** [[SYMBiFACE II]]&lt;br /&gt;
** [[X-Mass]]&lt;br /&gt;
** [[uIDE 16]] (base address = &amp;amp;FEF0)&lt;br /&gt;
** [[M4 Board]]&lt;br /&gt;
** [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II]&lt;br /&gt;
** [http://www.tmtlogic.com/ Symbiface III]&lt;br /&gt;
* Compatible storage device with enough free space to accommodate the desirable CP/M hard disk configuration.&lt;br /&gt;
* Floppy disk drive for initialization of the file system.&lt;br /&gt;
* CP/M Plus system disks for making the system bootable.&lt;br /&gt;
* Optionally a [[SYMBiFACE II]] compatible RTC.&lt;br /&gt;
&lt;br /&gt;
==Restrictions==&lt;br /&gt;
* CP/M 2.2 or lower is not supported.&lt;br /&gt;
* 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.&lt;br /&gt;
* Only the master IDE device is accessible by HDCPM.&lt;br /&gt;
* The maximum number of hard disk partition/images supported is four.&lt;br /&gt;
* Only primary partitions are supported.&lt;br /&gt;
* If you want to use CP/M disk images then they must be stored in a FAT16 or FAT32 formatted disk or partition.&lt;br /&gt;
* If the hard disk is partitioned then the CP/M disk images must be placed in the first partition of the disk.&lt;br /&gt;
* The CP/M disk images must be placed in the root directory of the FAT file system.&lt;br /&gt;
* The CP/M disk images must NOT be fragmented and must have the correct size.&lt;br /&gt;
* 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. &lt;br /&gt;
* Only storage devices with 512 bytes sector size are supported.&lt;br /&gt;
* Only storage devices with LBA addressing are supported.&lt;br /&gt;
* Date stamps of CP/M disk image files are not maintained.&lt;br /&gt;
* 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.&lt;br /&gt;
==How it works==&lt;br /&gt;
===Using the ROM===&lt;br /&gt;
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:&lt;br /&gt;
|HDCPM (no TIME function support) or |HDCPMT (TIME function support)&amp;lt;br /&amp;gt;&lt;br /&gt;
Alternatively it can be started by holding down the Tab key (no TIME function support) or Shift+Tab (TIME function support), during power-up.&amp;lt;br /&amp;gt;&lt;br /&gt;
===Using the binary===&lt;br /&gt;
HDCPM can be started by running the HDCPM.BIN file from floppy drive or mass storage.&amp;lt;br /&amp;gt;&lt;br /&gt;
===Functions===&lt;br /&gt;
HDCPM will then execute the following functions:&amp;lt;br /&amp;gt;&lt;br /&gt;
* Search for a compatible mass storage interface.&lt;br /&gt;
* Move the boot loader and the CP/M patcher to RAM.&lt;br /&gt;
* Mount 1 to 4 CP/M image files and/or partitions and perform fragmentation and size test.&lt;br /&gt;
* 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.&lt;br /&gt;
* Read the .EMS file from the reserved track and store it in RAM just as the normal CP/M Plus boot loader does.&lt;br /&gt;
* 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.&lt;br /&gt;
* Patch the SCB in order to change the startup/default drive.&lt;br /&gt;
* 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 memory expansion]] or [[Dobbertin Memory Expansion]] driver is present.&lt;br /&gt;
* Move the ALV of the Dk'tronics RAM disk if [[Z-System]] is detected.&lt;br /&gt;
* Patch the CP/M console with the desired colour scheme. &lt;br /&gt;
* Patch the system message.&lt;br /&gt;
* Do a normal CP/M cold start.&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==CP/M Plus disk image files==&lt;br /&gt;
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 [https://hexed.it/ hexed.it] or any hex editor capable of creating binary files filled with a specific pattern.&amp;lt;br /&amp;gt;&lt;br /&gt;
In case of hexed.it select 'New file' fill in 'Size of the new file = 8519680' and 'Fill Pattern = 0xE5' and press apply. Save the file as CPMDSK01.IMG&amp;lt;br /&amp;gt;&lt;br /&gt;
If you have a FAT capable DOS installed in your AMSTRAD you can use the provided MAKEIMG.BAS utility to create your image file. Keep in mind that it takes more than 1.5 hour for a 8MB image file to be created that way.&amp;lt;br /&amp;gt;&lt;br /&gt;
CP/M disk image files can be accessed by a modern computer with [http://www.moria.de/~michael/cpmtools/ cpmtools]. Use the command |HDDEF to see the record you must insert in the diskdefs file.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The HDCPM record for diskdefs is:&lt;br /&gt;
&lt;br /&gt;
       diskdef hdcpm&lt;br /&gt;
          seclen 512&lt;br /&gt;
          tracks 65&lt;br /&gt;
          sectrk 256&lt;br /&gt;
          blocksize 8192&lt;br /&gt;
          maxdir 1024&lt;br /&gt;
          skew 0&lt;br /&gt;
          boottrk 1&lt;br /&gt;
          os 3&lt;br /&gt;
       end&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Hdcpm-boot-m4.png|thumb|HDCPM binary booting on M4 Board]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==CP/M Plus disk/partitions==&lt;br /&gt;
You can also create one or more partitions in order to format them to [http://www.seasip.info/Cpm/format31.html CP/M-80] 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.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM examines the hard disk's MBR upon start and finds the partition information. Then it finds the LBA of the first sector of each partition and passes it to the CP/M hard disk driver. The CP/M hard disk driver doesn't know anything about partitions. It accesses the partition as if it was a real hard disk.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:hdcpm-ui-boot.png|thumb|HDCPM ROM booting on uIDE-16]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
===Using the ROM===&lt;br /&gt;
* Install the HDCPM ROM in a free ROM slot of your ROM box.&lt;br /&gt;
* Plug in your [[SYMBiFACE II]] compatible IDE interface, [[uIDE 16]], [[M4 Board]] or [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] and attach the proper mass storage device.&lt;br /&gt;
* 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:&amp;lt;br /&amp;gt;&lt;br /&gt;
** (S2): [[SYMBiFACE II]] compatible interface&lt;br /&gt;
** (uI): [[uIDE 16]] interface&lt;br /&gt;
** (M4): [[M4 Board]]&lt;br /&gt;
** (US): [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II]&lt;br /&gt;
** (S3): [http://www.tmtlogic.com/ Symbiface III]&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:hdcpm-s2.png|thumb|HDCPM ROM - SYMBiFACE II]]&lt;br /&gt;
|[[File:hdcpm-ui.png|thumb|HDCPM ROM - uIDE-16]]&lt;br /&gt;
|[[File:hdcpm-m4.png|thumb|HDCPM ROM - M4 Board]]&lt;br /&gt;
|[[File:hdcpm-us.png|thumb|HDCPM ROM - USIfAC II]]&lt;br /&gt;
|[[File:hdcpm-s3.png|thumb|HDCPM ROM - Symbiface III]]&lt;br /&gt;
|}&lt;br /&gt;
In case a RTC is detected you will also see the RTC initialization message and the current date and time: ''RTC found: 2021/01/01 12:01:01''&lt;br /&gt;
* Use your original CP/M Plus system disk set to Boot CP/M Plus.&lt;br /&gt;
* 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.&lt;br /&gt;
* Reset your AMSTRAD and boot CP/M from the hard disk with the command |HDCPM. The Boot loader will check your image file(s) against fragmentation and correct size and boot the system to the CP/M command prompt. If the first image file is fragmented or has the wrong length the system will not boot. All other image files will be ignored if found to be fragmented or have the wrong length.&lt;br /&gt;
* In case you don't use CP/M image files just boot the system with |HDCPM or |HDCPMT&lt;br /&gt;
* Copy the files from your CP/M system floppy disks to the first hard disk.&lt;br /&gt;
* Copy any other needed application etc. to your CP/M hard disk(s).&lt;br /&gt;
* You are ready to go.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Using the binary===&lt;br /&gt;
* Plug in your [[SYMBiFACE II]] compatible IDE interface, [[uIDE 16]], [[M4 Board]] or [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] and attach the proper mass storage device.&lt;br /&gt;
* Use your original CP/M Plus system disk set to Boot CP/M Plus.&lt;br /&gt;
* 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.&lt;br /&gt;
* 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.&lt;br /&gt;
* You are ready to go.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==ROM commands==&lt;br /&gt;
[[File:hdcpm-us-boot.png|thumb|HDCPM ROM booting on USIfAC II]]&lt;br /&gt;
* |HDCPM mounts the hard disks and boots CP/M Plus. If [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] is used enable the USB disk with the |USB command first.&lt;br /&gt;
* |HDCPMT works like |HDCPM but also utilizes the RTC.&lt;br /&gt;
* |HDDPB shows the Disk Parameter Block.&lt;br /&gt;
* |HDDEF shows the diskdefs entry for CP/M tools and the file system size.&lt;br /&gt;
* |DATE displays the current date.&lt;br /&gt;
* |TIME displays the current time. If [[M4 Board]] is used |DATE and |TIME will be redirected to M4 |TIME.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==The HDCPM binary file==&lt;br /&gt;
* If [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] is used, use your PC to copy HDCPM.BIN to your USB flash disk. Then insert it to your [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ USIfAC II] power up your Amstrad and enable the USB disk with the |USB command.&lt;br /&gt;
* Execute the file from the floppy disk or from your mass storage device with ''RUN&amp;quot;HDCPM&amp;quot;''. 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.&lt;br /&gt;
*  [[M4 Board]] and [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/ 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 [https://www.cpcwiki.eu/forum/applications/cubeios-fat16fat32-rom-for-the-cpc's-with-xmass/ CubeMDOS] or [[UniDOS]], installed.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==The MAKEIMG.BAS and MAKEIMG.EXE utilities==&lt;br /&gt;
===MAKEIMG.BAS===&lt;br /&gt;
Although this utility should not be your first option, you can use it to make a new empty CP/M disk image file.&amp;lt;br /&amp;gt;&lt;br /&gt;
In case you decide to use it make sure you have a FAT aware DOS installed in your system. MAKEIMG makes use of the firmware calls CAS_OUT_OPEN, CAS_OUT_CLOSE and CAS_OUT_CHAR so your DOS must support them.&amp;lt;br /&amp;gt;&lt;br /&gt;
Copy the files MAKEIMG.BAS and MAKEIMG.BIN to the root directory of your FAT formatted hard disk and make it your current drive. Run the utility with ''RUN&amp;quot;MAKEIMG&amp;quot;'' and don't hold your breath!&amp;lt;br /&amp;gt;&lt;br /&gt;
Making an image file this way takes more than 1.5 hour for an 8MB file so literally... don't hold your breath.&amp;lt;br /&amp;gt;&lt;br /&gt;
Here is a small tutorial on how to setup and use a CP/M image file: https://youtu.be/GMWsRzNhQTM&amp;lt;br /&amp;gt;&lt;br /&gt;
===MAKEIMG.EXE===&lt;br /&gt;
This utility is a [[SymbOS]] application.&amp;lt;br /&amp;gt;&lt;br /&gt;
Use this utility to create your CP/M hard disk images from within [[SymbOS]]. 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.&amp;lt;br /&amp;gt;&lt;br /&gt;
MAKEIMG.EXE has been developed with [http://www.symbos.de/quigs.htm Quigs] for [[SymbOS]].&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Hdcpm-makeimg-sym1.png|thumb|MAKEIMG.EXE in action]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==The HDMGR.COM utility==&lt;br /&gt;
This is the Hard Disk Manager utility.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can use this utility to get information about your hard disk geometry, disk image files, partitions and boot sector. You have to use this utility to format a hard disk, disk image file or partition to CP/M format or manipulate the boot sector of the hard disk and/or transfer an .EMS system file to the reserved track of the hard disk.&amp;lt;br /&amp;gt;&lt;br /&gt;
The boot sector contains information about the CP/M disk drive letters, start-up drive and console colour scheme. All those properties can be changed with HDMGR.COM.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR will perform a fragmentation test of the discovered CP/M hard disk image files uppon execution.&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
The HDMGR.COM utility is self explanatory. Just run it from the CP/M command prompt.&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Hdcpm-hdmgr-m.png|thumb|HDMGR main menu]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-1.png|thumb|HDMGR Hardware information]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-2.png|thumb|HDMGR Partition information]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-3.png|thumb|HDMGR CP/M disk image information]]&lt;br /&gt;
|}&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Hdcpm-hdmgr-4.png|thumb|HDMGR Boot sector information]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-5.png|thumb|HDMGR Log disk]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-7.png|thumb|HDMGR Manage boot sector]]&lt;br /&gt;
|[[File:Hdcpm-hdmgr-8.png|thumb|HDMGR Transfer CP/M to disk]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==The RTC.COM utility==&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can synchronize the date and time of CP/M Plus with the RTC by running ''RTC -G'' manually or via your PROFILE.SUB&amp;lt;br /&amp;gt;&lt;br /&gt;
You can also set your RTC to the current CP/M date and time by running ''RTC -S''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Error messages==&lt;br /&gt;
===Hard disk errors===&lt;br /&gt;
* ''*** No mass storage found ***''&lt;br /&gt;
	No compatible mass storage interface can be found.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: DISK I/O''&lt;br /&gt;
I/O error occurred during the last read/write operation.&lt;br /&gt;
	Your hard disk might be defect or the USB disk is not enabled.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: INVALID BOOT SECTOR''&lt;br /&gt;
	No FAT or CP/M boot sector was found in a not partitioned hard disk.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: INVALID FILE SYSTEM''&lt;br /&gt;
	The first partition in a partitioned hard disk is not a FAT nor CP/M-80&lt;br /&gt;
	one.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: INVALID SECTOR SIZE''&lt;br /&gt;
	The hard disk used has a sector size not equal to 512 bytes.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: CPMDSK01.IMG NOT FOUND''&lt;br /&gt;
	The CP/M image file named CPMDSK01.IMG can't be found in the FAT&lt;br /&gt;
	formatted hard disk or partition. &lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: CP/M SYSTEM FILE NOT FOUND''&lt;br /&gt;
	The .EMS CP/M system file can't be found in the system track of your&lt;br /&gt;
	CP/M partition or image file.&lt;br /&gt;
	&lt;br /&gt;
*  ''ERROR: CPMDSK01.IMG IS FRAGMENTED''&lt;br /&gt;
	The first CP/M image file is fragmented, the system won't mount it.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: CPMDSK01.IMG HAS WRONG LENGTH''&lt;br /&gt;
	The first CP/M image file has wrong length, the system won't mount it.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: CPMDSK01.IMG IS NOT FORMATTED''&lt;br /&gt;
	The first CP/M image file is not formatted to CP/M-80 format, the&lt;br /&gt;
	system won't mount it. Use the HDMGR.COM utility to format it.&lt;br /&gt;
	&lt;br /&gt;
* ''ERROR: INCOMPATIBLE EMS FILE''&lt;br /&gt;
	The .EMS system file that was loaded from the system track is not&lt;br /&gt;
	compatible with HDCPM.&lt;br /&gt;
&lt;br /&gt;
===RTC errors===&lt;br /&gt;
* ''*** Battery depleted ***''&lt;br /&gt;
	The RTC battery is depleted. The RTC driver will continue to operate&lt;br /&gt;
	normally but the readings are not reliable. Replace the RTC battery.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Release info==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Version !! Changes !! Download&lt;br /&gt;
|-&lt;br /&gt;
| v1.00 December 2021 || Initial release || [[Media:hdcpm100.dsk|hdcpm100.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.01 January 2022 || HDCPM.ROM, HDMGR.COM: code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: (bug fix) fragmented file detection was not working properly unless the file was CPMDSK01.IMG&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: (bug fix) unformatted image file detection was not working properly. New error message added.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) CP/M drive table wasn't patched properly.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) initialization of floppy drive(s) was corrupted due to misplaced code.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: added .EMS file compatibility check. New error message added.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: added support for Dobbertin RAM disk driver.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: added compatibility with Dobbertin HD20 Harddisc&amp;lt;br /&amp;gt;&lt;br /&gt;
MAKEIMG.EXE: added utility for creating an image file from within SYMBOS.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&lt;br /&gt;
|| [[Media:hdcpm101.dsk|hdcpm101.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.02 March 2022 || HDCPM.ROM, HDMGR.COM: added support for M4 board.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: added support for uIDE-16 interface.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) the ROM was initialized even if no compatible interface was found.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDMGR.COM: error message change.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: option &amp;quot;F&amp;quot; has been removed. HDCPM will always do a disk fragmentation test during boot.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: power up message changed in order to provide information about the type of the detected interface.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: two bytes of RAM will be reserved by the ROM for storing the interface type and M4 ROM number.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&lt;br /&gt;
|| [[Media:hdcpm102.dsk|hdcpm102.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.03 April 2022 || HDCPM.ROM, HDMGR.COM: added support for USIfAC II.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM: (bug fix) uIDE-16 detection was broken.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&lt;br /&gt;
|| [[Media:hdcpm103.dsk|hdcpm103.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.04 June 2022|| HDCPM.ROM: code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.BIN: added executable binary file version of HDCPM.&lt;br /&gt;
|| [[Media:hdcpm104.dsk|hdcpm104.dsk]]&lt;br /&gt;
|-&lt;br /&gt;
| v1.05 July 2022 || HDCPM.ROM, HDCPM.BIN, HDMGR.COM: added support for Symbiface III&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.ROM, HDCPM.BIN:  code optimization.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR.COM: Hardware info added for USIfAC II&amp;lt;br /&amp;gt;&lt;br /&gt;
HDMGR.COM: (bug fix) the 'Select boot file' menu was garbled if there were 8 or more .EMS files present.&amp;lt;br /&amp;gt;&lt;br /&gt;
HDCPM.DOC: various additions and corrections.&lt;br /&gt;
|| [[Media:hdcpm105.dsk|hdcpm105.dsk]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Downloads==&lt;br /&gt;
*[[Media:CPMDSK01&amp;amp;02.zip|CP/M disk images]] - CPMDSK01.IMG is bootable and contains all the files of the 3 CP/M Plus system disks and year 2000 compliant binaries downloaded from the [http://www.cpm.z80.de/binary.html Digital Research Binary Files]. CPMDSK02.IMG is empty and can also be used as a template.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Videos==&lt;br /&gt;
* [https://youtu.be/GMWsRzNhQTM How to create and prepare a CP/M image file in a FAT formatted hard disk]&lt;br /&gt;
* [https://youtu.be/nxow6Y5O4Dc Hard disk utilization and dual boot]&lt;br /&gt;
* [https://youtu.be/em7dHOdaylg How to create a CP/M image file under SYMBOS]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
[[category:Expansion ROM]] [[category:Software]] [[category:Applications]] [[category:CP/M]] [[category:DSK images]]&lt;/div&gt;</summary>
		<author><name>D kef</name></author>	</entry>

	<entry>
		<id>https://oldwiki.cpcwiki.eu/index.php?title=File:Hdcpm104.dsk&amp;diff=109253</id>
		<title>File:Hdcpm104.dsk</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.cpcwiki.eu/index.php?title=File:Hdcpm104.dsk&amp;diff=109253"/>
				<updated>2022-08-26T12:08:01Z</updated>
		
		<summary type="html">&lt;p&gt;D kef: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>D kef</name></author>	</entry>

	<entry>
		<id>https://oldwiki.cpcwiki.eu/index.php?title=File:Hdcpm103.dsk&amp;diff=109252</id>
		<title>File:Hdcpm103.dsk</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.cpcwiki.eu/index.php?title=File:Hdcpm103.dsk&amp;diff=109252"/>
				<updated>2022-08-26T12:07:02Z</updated>
		
		<summary type="html">&lt;p&gt;D kef: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>D kef</name></author>	</entry>

	</feed>