News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu
avatar_d_kef

HDCPM - boot and run CP/M plus from hard disk

Started by d_kef, 16:48, 30 December 21

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

d_kef

This is my lockdown project that started about 20 months ago.
I think it is quite usable now so here it is.

HDCPM is an Amstrad CPC application that enables your computer to boot and run CP/M Plus from an IDE storage device.
A maximum of four 8MB partitions or virtual disks can be used to make the vast amount of 32MB of data available to CP/M Plus.
It comes in the form of:
- a standard background ROM that can be installed in any available ROM position.
- a standard binary file that can be loaded from floppy or hard drive.

HDCPM has been developed with modern DOSs, that support the FAT file system, in mind.
This means that CP/M can use the same hard disk with other DOSs.

In order to make use of it you will need:
  • Amstrad CPC/Plus computer capable of running CP/M Plus.
  • ROM box or other ROM expansion hardware if using the ROM.
  • Optionaly a FAT aware DOS like M4 ROM, USIfAC ROM, UniDOS, CubeMDOS etc if using the binary.
  • One of the following mass storage interfaces:
    • Symbiface II
    • X-Mass
    • uIDE-16 (base address = &FEF0)
    • M4 board
    • USIfAC II
    • Symbiface III
    • Albireo
      and a compatible storage device with enough free space to accommodate the desirable CP/M hard disk configuration.
  • Floppy disk drive for initialization of the file system.
  • CP/M Plus system disks for making the system bootable.
  • Optionally a Symbiface II compatible RTC.

The ROM file, the binary file the utilities and the manual are contained in the attached dsk file.
The .zip file contains 2 CP/M hard disk image files
CPMDSK01.IMG is bootable and contains all the files of the 3 CP/M Plus system disks.
CPMDSK02.IMG is empty and can also be used as a template.

Don't forget to read the manual (HDCPM.DOC) should you decide to try the ROM.
I did a lot of tests and never had a data corruption of the hard disk/disk images I used but I urge you to make a backup of your hard disk prior to using it with HDCPM
Here is a small tutorial on how to setup and use a CP/M image file:

Please send in any comments, bugs etc.


d_kef


More info



Prodatron

This looks impressive!
Is CP/M Plus itself accessing the ROM, too, or is this "only" required for the setup in Amsdos and for booting CP/M from harddisc?
It seems that you even did a kind of Amsdos extension for accessing the SF2 FAT-formatted harddisc.
(it's funny that the emulator has a depleted RTC battery :D )

GRAPHICAL Z80 MULTITASKING OPERATING SYSTEM

d_kef

Thanks.


Quoting from the manual:
Quote


4. How it works


Upon computer power-up the HDCPM ROM will be initialized and will inform you
of the presence of a compatible IDE interface and RTC. No RAM will be
reserved.
The boot loader can be started by executing one of the following commands:
|HDCPM (no TIME function support) or |HDCPMT (TIME function support)
Alternatively it can be started by holding down the Tab key (no TIME function
support) or Shift+Tab (TIME function support), during power-up.
HDCPM will then execute the following functions:
   - Search for a compatible IDE interface.
   - Move the boot loader and the CP/M patcher to RAM.
   - Mount 1 to 4 CP/M image files and/or partitions and perform
   fragmentation ("F" option) and size test.
   - Read the boot sector of the 1st hard disk and learn about the DPB,
   presence and size of the .EMS file, the startup drive, the drive
   letters and the CP/M console colour scheme.
   - Read the .EMS file from the reserved track and store it in RAM just
   as the normal CP/M Plus boot loader does.
   - Move the top of TPA and transfer the hard disk driver, RTC driver
   (in case of |HDCPMT) and initialize the XDPH, DPB, ALV of the mounted
   hard disks to the memory area just below the normal BDOS base address.
   The newly inserted code will be handled by CP/M as if it was a normal
   RSX.
   - Patch the SCB in order to change the startup/default drive.
   - Patch the drive table records to reassign drive letters for floppy
   drives 1 and 2, hard disks 1,2,3,4 (if any) and ram drive if
   Dk'tronics RAM disk driver is present.
   - Move the ALV of the Dk'tronics RAM disk if ZPM is detected.
   - Patch the CP/M console with the desired colour scheme.
   - Patch the system message.
   - Do a normal CP/M cold start.
Any CP/M 3.0 compatible system that loads the BDOS, BIOS, SCB to the default
AMSTRAD CP/M addresses should work. HDCPM will be able (hopefully) to patch it
on the fly.


So in fact the ROM patches the .EMS file and inserts the hard disk and RTC driver and then moves out of the way and jumps to the CP/M cold start address.
The nice thing is that you don't have to patch your original .EMS file. The ROM does this on the fly.


QuoteIt seems that you even did a kind of Amsdos extension for accessing the SF2 FAT-formatted harddisc.
No I didn't. I only made a small utility that creates an empty hard disk image. I used Unidos but any FAT aware DOS can be used instead if it supports the firmware calls CAS OUT OPEN, CAS OUT CLOSE and CAS OUT CHAR.
One can create the hd image with a hex editor and then copy it in the root directory of the FAT hard disk. This would only take a minute instead of 1.5 hour.
But now that you mention it... It would be nice to have a Unidos node for mounting CP/M hard disk images or partitions.


Quoteit's funny that the emulator has a depleted RTC battery
Well the DS12885/12887 RTCs  have a special bit (bit 7) of the control register D in order to report the battery health. It is really a simple check but it seems that winape doesn't emulate it.
It would be nice if anyone could check it on a real SFII as I don't own one. Maybe I did something wrong.


d_kef






d_kef

It seems that I openned this topic in the wrong category.
Can a moderator move it to Applications please?

d_kef

GUNHED

Quote from: d_kef on 10:55, 31 December 21
Well the DS12885/12887 RTCs  have a special bit (bit 7) of the control register D in order to report the battery health. It is really a simple check but it seems that winape doesn't emulate it.
It would be nice if anyone could check it on a real SFII as I don't own one. Maybe I did something wrong.
d_kef
No, you're fine. It's a problem of the emulator, which does emulate the SF2 only in parts.


But never mind, CONGRATULATIONS to this great project!!! That's super awesome!  :) :) :)


Did you use the Dobbertin CP/M Plus source code to start with or did you start from scratch? However, this looks like you worked long hours for a long time! The result is just awesome.  :) :) :)
http://futureos.de --> Get the revolutionary FutureOS (Update: 2024.10.27)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Updated: 2021.12.26)

HAL6128

#5
Congratulations for this success. How cool is that!!
Finally CP/M plus on a modern IDE device.

Thank you very much for your hard work and efforts. Just installed it with four images on CUBEMDOS version and it works great. Will check and test it later after copying files and testing it.

So, it seems that you have just altered the BIOS? BDOS and CCP are not altered?
...proudly supported Schnapps Demo, Pentomino and NQ-Music-Disc with GFX

GUNHED

Looks like you need Cubedos or Unidos. Or iMPdos?
In the video the user needs to wait 1,5 hours for one setup step, using Unidos.
Are Cubedos, iMPdos or Acmedos more quick for this particular step?

Which DOS is the fastest?
http://futureos.de --> Get the revolutionary FutureOS (Update: 2024.10.27)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Updated: 2021.12.26)

angelcaio

Hi, I have a TotO X-Mass with a 128MB DOM running Symbos3. Would it be possible to install CP/M 3 here? That would be a dream for me

d_kef

#8
Quote
No, you're fine. It's a problem of the emulator, which does emulate the SF2 only in parts.But never mind, CONGRATULATIONS to this great project!!! That's super awesome!    Did you use the Dobbertin CP/M Plus source code to start with or did you start from scratch? However, this looks like you worked long hours for a long time! The result is just awesome.   
Thank you.
The code was made from scratch. No CP/M source code was used but I did a lot of CP/M studying to learn how it is working.

QuoteCongratulations for this success. How cool is that!!Finally CP/M plus on a modern IDE device.Thank you very much for your hard work and efforts. Just installed it with four images on CUBEMDOS version and it works great. Will check and test it later after copying files and testing it.
So, it seems that you have just altered the BIOS? BDOS and CCP are not altered?

I'm glad that you like it and thanks for the good words.

The way the HD and RTC drivers work is like a normal RSX. In fact my first tests were with a true RSX that was loaded from within CP/M.
The difference is that the code is injected by the ROM before the initial CP/M cold start and of course the disk drive table and SCB are patched to reflect the new disk configuration.
The only change is the jump to the TIME function when the RTC driver is used.
So no alteration of BIOS, BDOS or CCP was needed.

QuoteLooks like you need Cubedos or Unidos. Or iMPdos?
Well you don't really need any DOS other than AMSDOS if you format your hard disk to CP/M-80 format. ;)
I have to test the other DOSs in order to see if they are faster.


QuoteHi, I have a TotO X-Mass with a 128MB DOM running Symbos3. Would it be possible to install CP/M 3 here? That would be a dream for me
I think that you won't have any problem. X-Mass is compatible with SF2 addressing so it should work but do a full backup of hard disk before installing... just in case...


d_kef

GUNHED

Awsome!

Would it be possible to copy one file 'CPMDSK01.IMG' to another hard-disc or CF-card too? Or is 'CPMDSK01.IMG' in some way hardcoded?
http://futureos.de --> Get the revolutionary FutureOS (Update: 2024.10.27)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Updated: 2021.12.26)

d_kef

Quote from: GUNHED on 21:43, 02 January 22Awsome! Would it be possible to copy one file 'CPMDSK01.IMG' to another hard-disc or CF-card too? Or is 'CPMDSK01.IMG' in some way hardcoded?

Sure it is possible. This is how I backup my CP/M hard disks.
You do of course need to connect your IDE/CF device to a modern computer in order to copy it.

d_kef

GUNHED

Very decent! Very nice! So I will create my perfect hard-disc once and then everybody can use it. Thinking about a bigger Z3Plus installation (and god give me enough time for that  :laugh: ).


Actually, time for @Gryzor to allow files up to 9 MB of space here.
http://futureos.de --> Get the revolutionary FutureOS (Update: 2024.10.27)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Updated: 2021.12.26)

HAL6128

Yeah. I was also thinking about a Z-System or using SamaruX for bigger stuff. I think with ZCPR you can use directories instead of USER nr. which could for this amount of space very helpful.
...proudly supported Schnapps Demo, Pentomino and NQ-Music-Disc with GFX


HAL6128

Yes, impressive. I see that the HD-Manager is able to set different boot options so your are able to run different CP/M systems?
...proudly supported Schnapps Demo, Pentomino and NQ-Music-Disc with GFX


HAL6128

What is your suggestion if I want to work with both WinApe and real hardware. How to make a data exchange possible. WinApe has special Image-Format for its harddrive emulation.
...proudly supported Schnapps Demo, Pentomino and NQ-Music-Disc with GFX

d_kef

#17
I use a CF card. In fact I've used different CF cards from 128MB up to 4GB without any problems.
Winape has an option to map the emulated device directly to the CF card and it works just fine.
I use the same 'technique' for cubemdos or unidos, symbos and hdcpm (3 OSs installed and accessing the same CF card).
That way I can go portable in minutes. :D
Mind that I run winape on a windows xp vm. I'm not sure if winape can access the CF card that way on windows 7 or 10.

HAL6128

Thanks! I tried this approach with my XMass and an adapter to be plugged into an USB Port on Win10. It works fine together with WinApe where I can access the XMass directly to store data onto it.
...proudly supported Schnapps Demo, Pentomino and NQ-Music-Disc with GFX

angelcaio

#19

Wonderful!!!!!!
Hi. I have tried with a 128 MB DOM and a adapter in WinApe
ROMS:
Lower:   FW315EN
Upper 0: Basic 1.1
Upper 1:  FW31EXP
Upper 6: AcmeDOS
Upper 7: Amsdos
Upper 8: HDCPM
I copy MAKEIMG.BAS and MAKEIMG.BIN files to |D drive with the ACME's |CPH command
The DOM is in RAW format
I have had no problems installing HDCPM on one partition but I don't know how to install the other three
Also doesn't create any .IMG file for me
But i am a PArtition with 8MB!!!!!!   for CP/M
How can I access and format the other partitions?
when ok I will put it in an aX-MASS in real Hardware
Thanks


d_kef

Well I haven't tried AcmeDOS or FW315 to be honest.
Can you send a screenshot of hdmgr.com after you press 2. Partition information, one after you press 3. CP/M disk image information and one after 5. Log disk?


d_kef

angelcaio

#21
Quote from: d_kef on 15:07, 06 January 22
Well I haven't tried AcmeDOS or FW315 to be honest.
Can you send a screenshot of hdmgr.com after you press 2. Partition information, one after you press 3. CP/M disk image information and one after 5. Log disk?


d_kef


Sure,




What other ROM to handle the X-M; ASS advise me instead of ACMEDOS?

Many thanks

d_kef

#22
So you do have only one partition that you have formatted to CP/M-80!!!
That means you can't use the MAKEIMG.BAS utility. This utility is for creating CP/M image files to be saved in a FAT16/FAT32 formatted partition. This works only if your hard disk's first partition is a FAT one.
If you want to use your entire hard disk for CP/M only then you must partition your hard disk in a PC or a MAC.
Make 1 to 4 primary partitions and make sure that they are about 9MB long. The format you chose is not important, you can leave them unformatted. After that you can format them to CP/M with the Hard Disk Manager utility.

The HDCPM.DOC file explains what differrent partition/image configurations are possible.

d_kef






angelcaio

#23

Tested on real hardware on an XMass and my 464.  I couldn't get ACMEDOS to work, but not in FW3.15 and I didn't find UNIDOS,  and therefore cannot copy the .img files to the DOM.
An 8 MB physical partition !!  running CP / M plus patched for 2000 effect, and drive B: with 700KB (Parados).
For now CP / M on User 0 and Turbopascal on User 1...
Only a partition and RAM drive M: d'ont work, but...
I'm enthusiastic with the 8MB hard drive!!!



d_kef

QuoteI'm enthusiastic with the 8MB hard drive!!!
Well...size does matter!!! ;D


QuoteOnly a partition and RAM drive M: d'ont work, but...
You can have up to 4 partitions but you must connect your hard disk to PC or MAC and create them. Then connect your HD/CF/DOM again to your xmass and format the partitions with hd manager.
In order to use the extra memory as a ram disk you must have a CPM3SEMI.EMS file created with the d'ktronics rom utility.
Then transfer the file to the reserved track with hd manager.
https://www.cpcwiki.eu/index.php/DkTronics_CPM


d_kef

Powered by SMFPacks Menu Editor Mod