CPCWiki forum

General Category => Applications (CPC and CPC-related) => Topic started by: d_kef on 16:48, 30 December 21

Title: HDCPM - boot and run CP/M plus from hard disk
Post by: d_kef on 16:48, 30 December 21
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:

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: https://youtu.be/GMWsRzNhQTM

Please send in any comments, bugs etc.


d_kef

Latest release: v1.05 July 2022

More info (https://www.cpcwiki.eu/index.php/HDCPM)


Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: Prodatron on 08:31, 31 December 21
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 )
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: d_kef on 10:55, 31 December 21
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





Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: d_kef on 12:05, 31 December 21
It seems that I openned this topic in the wrong category.
Can a moderator move it to Applications please?

d_kef
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: GUNHED on 16:53, 31 December 21
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.  :) :) :)
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: HAL6128 on 17:26, 31 December 21
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?
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: GUNHED on 19:47, 31 December 21
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?
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: angelcaio on 11:56, 02 January 22
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
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: d_kef on 12:54, 02 January 22
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
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: GUNHED on 21:43, 02 January 22
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?
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: d_kef on 22:32, 02 January 22
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
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: GUNHED on 23:23, 02 January 22
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 (https://www.cpcwiki.eu/forum/index.php?action=profile;u=1) to allow files up to 9 MB of space here.
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: HAL6128 on 11:52, 03 January 22
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.
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: d_kef on 12:32, 03 January 22
Maybe something like this.....https://youtu.be/nxow6Y5O4Dc (https://youtu.be/nxow6Y5O4Dc) ... ;D ;D ;D



Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: HAL6128 on 15:41, 03 January 22
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?
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: d_kef on 16:25, 03 January 22
Yes. You can use different .EMS files.

Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: HAL6128 on 15:46, 04 January 22
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.
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: d_kef on 17:42, 04 January 22
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.
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: HAL6128 on 13:12, 05 January 22
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.
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: angelcaio on 11:44, 06 January 22

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

Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: 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
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: angelcaio on 15:28, 06 January 22
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
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: d_kef on 15:46, 06 January 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





Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: angelcaio on 16:14, 09 January 22

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!!!


Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: d_kef on 19:51, 09 January 22
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 (https://www.cpcwiki.eu/index.php/DkTronics_CPM)


d_kef
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: GUNHED on 16:23, 10 January 22
There is also a great CP/M Plus version from Dobbertin, providing a 444 KB RAM drive C: and 0,7 MB formats on drive B. It works very stable and has some further enhancements (quicker text output).


See here:
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: d_kef on 17:11, 10 January 22
Funny....I just found that yesterday...
In fact I did some tests and it seems that Dobbertin's version is compatible also with D'ktronics RAM disk (or at least WinAPE's implementation of D'ktronics RAM disk).
HDCPM v1.00 is not able to detect the Dobbertin driver but it'll be relatively easy to include support for it in v1.01.
Also the RAM drive letter is C: in CP/M 2.2 and M: in CP/M Plus.
You can still use it with HDCPM v1.00 but you can't change the drive letter (M:)
I used the Dobbertin's PATCH30 utility and was able to produce a working C10CPM3.EMS system file. I then used HD manager to transfer the file to my hard disk and it works just fine.


d_kef
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: angelcaio on 16:12, 14 January 22
Hi. I try to install HDCPM in .img files. I have followed the steps in the manual to create them with the hex editor  https://hexed.it (https://hexed.it)

Hi have select and format the CPMDSK01.IMG disk :

But both optios  4. Boot sector information, 7. Manage boot sector  and 8 Transfer CP/M to disk  return: Error  Invalid File System
Partition table information return: Warning MBR not foundAny idea? Thanks
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: d_kef on 13:22, 16 January 22
Quote from: angelcaio on 16:12, 14 January 22Hi. I try to install HDCPM in .img files. I have followed the steps in the manual to create them with the hex editor  https://hexed.it (https://hexed.it) Hi have select and format the CPMDSK01.IMG disk : But both optios  4. Boot sector information, 7. Manage boot sector  and 8 Transfer CP/M to disk  return: Error  Invalid File System Partition table information return: Warning MBR not foundAny idea? Thanks



That's strange....
The only thing I can think of is that the hard disk is somehow in a read only/write protect mode. This happened to me only when I tried to use a .ide disk image, with WinAPE, that was read only. As soon as I removed the read only setting everything worked fine.
My CP/M hard disk driver is accessing the hardware with ATA commands reading and writing sectors directly. So if it can read the disk image sectors it can also write them even if the CP/M disk image is marked as read only on the FAT level. In an emulated environment (like WinAPE) the OS  (Windows) might prevent this kind of access if the file is read only.
Did you try this also with your X-Mass? Did you see the same behaviour there?



Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: angelcaio on 11:52, 17 January 22

I will not have access to my CPC with X-MASS for two or three weeks
I have verified that the FAT partition where Winpe accesses is read/write and the image file is as well.
I have also tried to generate the file from WinApe, with the ACMEDOS ROM in memory, but it does not generate anything, although I have been able to copy the MAKEIMG.BAS and MAKEIMG.BIN files
Is it possible to download an 8MB .IMG file from somewhere to test it instead of the one I generated?
Thanks
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: d_kef on 13:14, 17 January 22

QuoteI have also tried to generate the file from WinApe, with the ACMEDOS ROM in memory, but it does not generate anything, although I have been able to copy the MAKEIMG.BAS and MAKEIMG.BIN files
That's true. Unfortunately only UNIDOS is able to produce the image file. I also did some tests with ACMEDOS and CubeMDOS and both fail.
ACMEDOS doesn't save a file at all.
CubemDOS saves a file that is 0KB.
In all cases the time needed to finish was about 1.5 hour.


QuoteIs it possible to download an 8MB .IMG file from somewhere to test it instead of the one I generated?
I've attached two image files in the first post of the topic.
CPMDSK01.IMG is bootable and contains all the files of the 3 CP/M Plus system disks.
CPMDSK02.IMG is empty (formatted) and can also be used as a template.


d_kef
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: angelcaio on 15:41, 17 January 22
Quote from: d_kef on 13:14, 17 January 22
That's true. Unfortunately only UNIDOS is able to produce the image file. I also did some tests with ACMEDOS and CubeMDOS and both fail.
ACMEDOS doesn't save a file at all.
CubemDOS saves a file that is 0KB.
In all cases the time needed to finish was about 1.5 hour.

I've attached two image files in the first post of the topic.
CPMDSK01.IMG is bootable and contains all the files of the 3 CP/M Plus system disks.
CPMDSK02.IMG is empty (formatted) and can also be used as a template.

d_kef



YES, it work!!!!!
Mani thanks.
When I can try the xmass I'll let you know

Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: HAL6128 on 16:01, 17 January 22
Quote from: d_kef on 13:14, 17 January 22hat's true. Unfortunately only UNIDOS is able to produce the image file. I also did some tests with ACMEDOS and CubeMDOS and both fail.
Does it mean that UniDOS is more compatible to "create" a file filled with bytes? Maybe a bug in CubeMDOS? Should report to SOS.
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: zhulien on 15:56, 21 January 22
Where can I download the ROM and doc file?
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: d_kef on 16:10, 21 January 22
Look at the first post of this topic.


d_kef
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: zhulien on 01:30, 22 January 22
Ah I missed the line saying they are in the disk file
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: GUNHED on 00:19, 23 January 22
For HDCPM the tool takes 1,5 hours (using UniDOS) to create a 9 MB file.


Instead of waiting 1,5 hours would it be possible to attach this file here and use the PC to copy it on the SF2 mass-medium?


... and this was my post #3000.  :o
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: angelcaio on 06:23, 23 January 22
Quote from: GUNHED on 00:19, 23 January 22
For HDCPM the tool takes 1,5 hours (using UniDOS) to create a 9 MB file.


Instead of waiting 1,5 hours would it be possible to attach this file here and use the PC to copy it on the SF2 mass-medium?


... and this was my post #3000.  :o

Hi. Look in the first post. In this attach two .IMG files Of course, you can also copy it to CPMDSK03 and 04
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: angelcaio on 15:36, 23 January 22

My experience with HDCPM:


1.- In WinApe under Windows 10 and Windows 11 with CPMDSK0x.IMG into the DOM:
All four drives are recognized and show the directory and when a file is created or copied it appears in the directory and can be read. But when you exit CP/M and re-enter with |HDCPM, this file is gone!


2.- In WinApe under Windows XP SP2 with CPMDSK0x.IMG disks into the DOM:
Everything works perfectly: Mount all four drives, and the recorded files remain on the next boot.


3.- Under WinApe in any Windows with the DOM (WITHOUT FORMAT) connected to USB through an adapter:
Everything works perfectly: Mount the only drive C:, and the recorded files remain on the next boot.


4.- In real hardware: CPC 464 (big keys) with X-MEM and X-MASS with the DOM:
- With the DOM formatted in FAT and with the four CPMDSK0x.IMG files: The CPC does not start
- With the DOM partitioned with four unformatted partitions: The CPC does not start
- With the DOM without partitioning: Everything works perfectly, after  HDMGR.COM is used,  but with a single C: (It would be great for me that, at this time, the HDMGR.COM utility would allow partitioning)


Still, I'm pretty happy with my 8 MB partition (I'm using USERS AREA for the first time).
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: TotO on 15:48, 23 January 22
Have you tested to have four master partitions and not one primary and three slaves on the DOM?
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: angelcaio on 16:07, 23 January 22
Quote from: TotO on 15:48, 23 January 22
Have you tested to have four master partitions and not one primary and three slaves on the DOM?
Yes. Four master partitions of 9 mb each and the rest of the DOM without partitioning
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: d_kef on 21:57, 23 January 22
Quote from: angelcaio on 15:36, 23 January 22
My experience with HDCPM:


1.- In WinApe under Windows 10 and Windows 11 with CPMDSK0x.IMG into the DOM:
All four drives are recognized and show the directory and when a file is created or copied it appears in the directory and can be read. But when you exit CP/M and re-enter with |HDCPM, this file is gone!
Yes I'm pretty sure I had this problem in the past and I decided to run WinAPE only in WinXP.

Have you tried to run WinAPE in Windows XP compatibility mode?

Quote from: angelcaio on 15:36, 23 January 22
4.- In real hardware: CPC 464 (big keys) with X-MEM and X-MASS with the DOM:
- With the DOM formatted in FAT and with the four CPMDSK0x.IMG files: The CPC does not start
- With the DOM partitioned with four unformatted partitions: The CPC does not start
- With the DOM without partitioning: Everything works perfectly, after  HDMGR.COM is used,  but with a single C: (It would be great for me that, at this time, the HDMGR.COM utility would allow partitioning)


I will soon release v1.01 which fixes some bugs regarding .IMG recognition. Keep an eye on this topic.
Regarding the partitioning with HDMGR I have this in my todo list. Maybe in v1.02.


d_kef
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: angelcaio on 15:38, 24 January 22
Quote from: d_kef on 21:57, 23 January 22Have you tried to run WinAPE in Windows XP compatibility mode?

I just did it and in Compatibility Mode for XP SP2 it works fine. The file remains after exiting to AMSDOS and returning to CP/M in Winape
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: zhulien on 08:04, 27 January 22
where does the 8mb hard drive limit come from within CP/M?
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: d_kef on 09:38, 27 January 22
Quote from: zhulien on 08:04, 27 January 22where does the 8mb hard drive limit come from within CP/M?

The disk size (user data area) for a disk with 512 Bytes sector size, in CP/M Plus is determined by two parameters in the DPB: DSM=number of blocks -1 and BLM=block size mask.
From the CP/M Plus System Guide:
QuoteDSM is one less than the total number of blocks on the drive.
DSM must be less than or equal to 7FFFH. If the disk uses 1024 byte blocks (BSH=3, BLM~=7), DSM must be less than or equal to OOFFH. The product BLS* (DSM+l) is the total number of bytes the drive holds and must be within the capacity of the physical disk.
It does not include the reserved operating system tracks.
So the theoretical maximum disk size is (DSM=7FFFH, BLM=7FH=>BLS=16KB blocks) 32768*16384=536870912 or 512MB
Of course for every disk you also need to reserve RAM for the disk allocation table. For a 512MB hard disk the amount of needed RAM for a banked system is (DSM+1)/4 bytes => 32768/4=8192 or 8KB.

So I chose an 8MB disk size basically following the rule of thumb  :D
It seemed to me a good compromise between disk size and memory reserved.

d_kef


Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: angelcaio on 10:54, 27 January 22
Quote from: d_kef on 09:38, 27 January 22So I chose an 8MB disk size basically following the rule of thumb 
It seemed to me a good compromise between disk size and memory reserved.

Now I understand why with the four partitions C: to F: (32Mb) the TPA drops to 59Kb.
Seems like a good compromise between storage and available RAM
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: d_kef on 17:33, 29 January 22
I've just released HDCPM v1.01


The main changes in this release are:
More info and the new DSK file can be found attached at the first post of this topic.


Here is a small video on how to use the new MAKEIMG.EXE utility: https://youtu.be/em7dHOdaylg (https://youtu.be/em7dHOdaylg)




d_kef

Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: GUNHED on 22:24, 30 January 22
What is the 'MAKEIMG.EXE' utility actually doing? You click at the image and it's written? But it's already on C:. Sorry, if I miss the point here.
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: d_kef on 22:56, 30 January 22
No it's not!
You select the disk and one of the 4 possible names for the image file.
It is even possible to create an image in the slave IDE drive and use it as a template (although in the video there is only one hard disk).


d_kef
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: Prodatron on 12:59, 01 February 22
Quote from: d_kef on 17:33, 29 January 22

       
  • Added MAKEIMG.EXE utility for creating an image file from within SYMBOS.
    That's my first attempt to code anything with Quigs so be gentle with me  ;)
Wow, this is very nice!
AFAIK you did this without any help from Trebmint or Edo, so this is a good achievement and it seems, that it is possible to use Quigs without an external training course :)
Thanks for sharing the video, I wonder if you used some Inline-Assembler code in this app or Quigs functions only.
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: d_kef on 15:07, 01 February 22
Thanks Prodatron.
I thought I'd give it a try before asking for help and it seems that my limited experience with VB was enough to help write a few lines of code in Quigs.
I didn't use any inline assembly code. I tried but failed badly.
With assembly the file creation would probably be faster.


d_kef
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: JonB on 13:13, 06 February 22
@d_kef (https://www.cpcwiki.eu/forum/index.php?action=profile;u=4731)

I'm a bit late to the party, but I have to say this looks pretty cool.

Can you tell me what I/O addresses the software is using to access the IDE device? As it's CPC I'd expect to see 16 bit addresses. The point I'm getting at is whether or not it is compatible with uIDE-16 (the IDE interface I designed for the 6128 that didn't really catch on becasue I couldn't write drivers for the CP/M Plus implementation)...

The uIDE-16 ports are declared somewhere in the CPCWiki hardware section (couldn't find it today, it is in a huge table), but for reference they are as follows:

CF_BASE      .EQU   0FEF0h      ; IDE I/O Base address
CF_DATA      .EQU   CF_BASE      ; data port
CF_FEATURES   .EQU   CF_BASE+1   ; features (write)
CF_ERROR   .EQU   CF_BASE+1   ; error (read)
CF_SECCOUNT   .EQU   CF_BASE+2   ; multiple sector read count
CF_SECTOR   .EQU   CF_BASE+3   ; sector number
CF_CYL_LOW   .EQU   CF_BASE+4   ; track number, low byte
CF_CYL_HI   .EQU   CF_BASE+5   ; track number, high byte
CF_HEAD      .EQU   CF_BASE+6   ; head number
CF_LBA0      .EQU   CF_BASE+3   ; LBA address, byte 0
CF_LBA1      .EQU   CF_BASE+4   ; LBA address, byte 1
CF_LBA2      .EQU   CF_BASE+5   ; LBA address, byte 2
CF_LBA3      .EQU   CF_BASE+6   ; LBA address, byte 3
CF_COMMAND   .EQU   CF_BASE+7   ; command register (write)
CF_STATUS   .EQU   CF_BASE+7   ; status register (read)

That said, they are also programmable on the board via jumpers, so you can use any base address you want. In other words, what we see here is the default configuration I chose so as to not clash with other peripherals.
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: d_kef on 21:07, 06 February 22
Quote from: JonB on 13:13, 06 February 22
@d_kef (https://www.cpcwiki.eu/forum/index.php?action=profile;u=4731)

I'm a bit late to the party, but I have to say this looks pretty cool.

Can you tell me what I/O addresses the software is using to access the IDE device? As it's CPC I'd expect to see 16 bit addresses. The point I'm getting at is whether or not it is compatible with uIDE-16 (the IDE interface I designed for the 6128 that didn't really catch on becasue I couldn't write drivers for the CP/M Plus implementation)...

The uIDE-16 ports are declared somewhere in the CPCWiki hardware section (couldn't find it today, it is in a huge table), but for reference they are as follows:

CF_BASE      .EQU   0FEF0h      ; IDE I/O Base address
CF_DATA      .EQU   CF_BASE      ; data port
CF_FEATURES   .EQU   CF_BASE+1   ; features (write)
CF_ERROR   .EQU   CF_BASE+1   ; error (read)
CF_SECCOUNT   .EQU   CF_BASE+2   ; multiple sector read count
CF_SECTOR   .EQU   CF_BASE+3   ; sector number
CF_CYL_LOW   .EQU   CF_BASE+4   ; track number, low byte
CF_CYL_HI   .EQU   CF_BASE+5   ; track number, high byte
CF_HEAD      .EQU   CF_BASE+6   ; head number
CF_LBA0      .EQU   CF_BASE+3   ; LBA address, byte 0
CF_LBA1      .EQU   CF_BASE+4   ; LBA address, byte 1
CF_LBA2      .EQU   CF_BASE+5   ; LBA address, byte 2
CF_LBA3      .EQU   CF_BASE+6   ; LBA address, byte 3
CF_COMMAND   .EQU   CF_BASE+7   ; command register (write)
CF_STATUS   .EQU   CF_BASE+7   ; status register (read)

That said, they are also programmable on the board via jumpers, so you can use any base address you want. In other words, what we see here is the default configuration I chose so as to not clash with other peripherals.


HDCPM ROM is indeed using 16 bit adresses. It is compatible with Symbiface II (https://www.cpcwiki.eu/index.php/SYMBiFACE_II:IDE_registers).
Other hardware that uses the same addresses (like the X-Mass) should also be working but it's not been fully tested yet.
I use a DIY SF2 compatible CF card interface and it's working just fine.


d_kef



Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: Prodatron on 22:15, 06 February 22
I wonder if the uIDE-16 would work as a SYMBiFACE II IDE clone (like the X-MASS but with real 16bit support for IDE devices), if the base address is set to #FD08?
I didn't test it, but it seems, that at least my driver doesn't use these #fd06/#fd07 (digital output, drive address) ports, so maybe it will just work.

Then uIDE-16 it could be used for HDCPM as well, and even for UniDos?

I still have the uIDE-16 for the CPC laying around but didn't test it yet, but I should do it (the uIDE-8 works great with my PCW).
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: JonB on 13:43, 08 February 22
Do bear in mind that the 16 in uIDE-16 refers to the 16 bit I/O address decoding, not the data path width. It still requires the CF card / DOM to run in 8-bit transfer mode to work.

@Prodatron (https://www.cpcwiki.eu/forum/index.php?action=profile;u=13) please do some testing with it and let us know how you get on. I'm a bit stuck for time at the moment!
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: d_kef on 15:50, 08 February 22
Quote from: Prodatron on 22:15, 06 February 22
I wonder if the uIDE-16 would work as a SYMBiFACE II IDE clone (like the X-MASS but with real 16bit support for IDE devices), if the base address is set to #FD08?
I didn't test it, but it seems, that at least my driver doesn't use these #fd06/#fd07 (digital output, drive address) ports, so maybe it will just work.

Then uIDE-16 it could be used for HDCPM as well, and even for UniDos?

I still have the uIDE-16 for the CPC laying around but didn't test it yet, but I should do it (the uIDE-8 works great with my PCW).


HDCPM uses the digital output register (#fd06) for sending a soft reset request to the hard disk.
I know that a CF card just ignores it and probably a true IDE HD doesn't need it.
I could send a ROM that doesn't use DOR to anyone willing to test it with uIDE-16.


d_kef
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: angelcaio on 18:14, 13 February 22
Finally, after reformatting the DOM to FAT16 and recopying the SYMBOS files plus the four CPMDSK0x.IMG files, it works. CP/M Plus with four partitions of 8 mb each and SYMBOS coexisting in the same DOM!


Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: d_kef on 18:40, 13 February 22
Quote from: angelcaio on 18:14, 13 February 22Finally, after reformatting the DOM to FAT16 and recopying the SYMBOS files plus the four CPMDSK0x.IMG files, it works. CP/M Plus with four partitions of 8 mb each and SYMBOS coexisting in the same DOM!

I'm glad it works!
I think this is the first proof of concept with a real X-Mass. Well done!

d_kef
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: HAL6128 on 17:08, 20 February 22

I'm trying to find Dobbetin's PATCH30 utility but I can't find it. Is is somewhere to download from?
Quote from: d_kef on 17:11, 10 January 22
Funny....I just found that yesterday...
In fact I did some tests and it seems that Dobbertin's version is compatible also with D'ktronics RAM disk (or at least WinAPE's implementation of D'ktronics RAM disk).
HDCPM v1.00 is not able to detect the Dobbertin driver but it'll be relatively easy to include support for it in v1.01.
Also the RAM drive letter is C: in CP/M 2.2 and M: in CP/M Plus.
You can still use it with HDCPM v1.00 but you can't change the drive letter (M:)
I used the Dobbertin's PATCH30 utility and was able to produce a working C10CPM3.EMS system file. I then used HD manager to transfer the file to my hard disk and it works just fine.


d_kef

Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: d_kef on 17:40, 20 February 22
Quote from: HAL 6128 on 17:08, 20 February 22
I'm trying to find Dobbetin's PATCH30 utility but I can't find it. Is is somewhere to download from?


It's here in the dobbertin512.zip (https://www.cpcwiki.eu/forum/programming/cpm-fast-text-program/#msg120164) file.


d_kef
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: HAL6128 on 18:58, 20 February 22
Thanks a lot!
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: angelcaio on 19:20, 20 February 22
Quote from: HAL 6128 on 17:08, 20 February 22
I'm trying to find Dobbetin's PATCH30 utility but I can't find it. Is is somewhere to download from?


I have installed the CP/M Plus version of Vortex on my CPC464 with X-Mass and X-Mem and it works very well for me, both the 704  Kb drive B: without load SETB.COM, and the RAM disk M: of 444kb.
https://www.cpcwiki.eu/forum/applications/cpm-plus-or-patch-with-80-track-(704k)-support/msg116791/#msg116791 (https://www.cpcwiki.eu/forum/applications/cpm-plus-or-patch-with-80-track-(704k)-support/msg116791/#msg116791)

Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: angelcaio on 16:28, 10 March 22
Hello, Does anyone know of a utility for CP/M similar to NSWEEP (https://www.cpcwiki.eu/forum/applications/nsweep-a-cpm-file-manager/msg179994/#msg179994) but multivolume?
to back up partitions using multiple floppy disks.
Or another similar utility that does this, like ARJ.EXE or AIN.EXE in MS/DOS (Or BACKUP.EXE...)
Thanks in advance.
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: GUNHED on 18:06, 11 March 22
What do you mean by Multivolume? Different source devices at the same time? Well, this can do the filecopy of FutureOS, but not with X-Mass. Nothing else I would know on CPC for more than one source of files.
If I misunderstood you then NSweep.COM actually can log different source devices and users. It has an help function.
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: angelcaio on 20:50, 11 March 22
Quote from: GUNHED on 18:06, 11 March 22What do you mean by Multivolume? Different source devices at the same time? Well, this can do the filecopy of FutureOS, but not with X-Mass. Nothing else I would know on CPC for more than one source of files.
If I misunderstood you then NSweep.COM actually can log different source devices and users. It has an help function.
rather say a copy of content of a partition occupying several destination diskettes like the -v option of arj.exe
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: d_kef on 21:40, 14 March 22
Coming soon in a CPC near you.  ;D

Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: HAL6128 on 10:27, 15 March 22
Wow, looks promising!
Is it possible to (re)use the images from other mass storages?
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: d_kef on 13:29, 15 March 22
Quote from: HAL6128 on 10:27, 15 March 22Wow, looks promising!
Is it possible to (re)use the images from other mass storages?
Absolutely! The images are independent of the mass storage interface and the medium format (FAT16/FAT32).
The difference with the M4 is that you can't have real CP/M partitions.

d_kef
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: d_kef on 16:32, 15 March 22
Next version of HDCPM will be released soon.
I've added support for M4 board and for uIDE-16 but I've only tested it with the M4.
Any uIDE-16 owner willing and having time to test it please PM me.

d_kef
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: d_kef on 17:24, 16 March 22
Quote from: angelcaio on 16:28, 10 March 22Hello, Does anyone know of a utility for CP/M similar to NSWEEP (https://www.cpcwiki.eu/forum/applications/nsweep-a-cpm-file-manager/msg179994/#msg179994) but multivolume?
to back up partitions using multiple floppy disks.
Or another similar utility that does this, like ARJ.EXE or AIN.EXE in MS/DOS (Or BACKUP.EXE...)
Thanks in advance.
Try this one. It works just fine.

d_kef
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: angelcaio on 18:34, 16 March 22
GREAT!!!!!!!!!!
capt.jpg
May thanks d_Kef 
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: HAL6128 on 19:17, 17 March 22
Just for curiosity. Does the M4 version runs a little bit faster than the other one?
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: d_kef on 19:37, 17 March 22
Quote from: HAL6128 on 19:17, 17 March 22Just for curiosity. Does the M4 version runs a little bit faster than the other one?
I don't think so. CP/M on CPC is quite slow so any speed gain is not noticeable.

d_kef 
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: GUNHED on 21:22, 17 March 22
Dobbertin somehow made it faster. Their hard-disc access is even more quick than access to the RAM disc. But CPM is CPM.  ;) :)
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: angelcaio on 17:47, 19 March 22
Testing the hard drive under CP/M+.
Dbase II
1.4MB database with just over 5,000 records of 287 bytes each (some titles are really long)
A global search takes several minutes, but it is amazing to move so much information with a Z80 from 37 years ago
20220319_131423.jpg 20220319_124355.jpg 20220319_123027.jpg 20220319_120545.jpg
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: d_kef on 20:39, 21 March 22
Version 1.02 of HDCPM has been released.
You can find the new ROM and related files in the first post of this topic.

The main change of this release is that it supports two new mass storage interfaces:
uIDE-16 and M4 board ( thanks @Duke ).
The proper interface will be automatically detected and selected.

Another change is that option "F" for disk image fragmentation test has been removed.
During my tests with the M4 I had an SD card file system corruption a couple of times just because I forgot to run a fragmentation test after I copied the CP/M disk image files to the card. That's something that could happen easily especially if you create and delete a lot of small files or the SD card is nearly full.
So now CP/M disk images are always tested against fragmentation at boot time. This makes booting CP/M a bit slower depending on the cluster size of your FAT file system. Bigger cluster size means faster boot time.

Unfortunately I don't have a uIDE-16 interface so no test have been done but given the fact that it just has a different base address than the SF2 and needs to be switched to 8-bit mode, I don't expect any problems.
Any owners of uIDE-16 ( @JonB , @Prodatron , others :D )  if and when you find some time I'd appreciate your feedback.

d_kef
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: JonB on 13:48, 24 March 22
Well it's been a while since I booted up my 6128 but I think it's about time I did some testing with uIDE-16 and this fab utility. It'd be great if it worked - I couldn't understand how to patch CP/M Plus or write a ROM for the 6128 to allow booting, despite doing uIDE-8 on the PCW and Superbrain (the latter with a boot ROM). I will PM d_kef forthwith!
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: angelcaio on 11:08, 02 April 22
Anoter Backup/Restore utility:  IBAK  Same as BACKUP and RESTORE.COM commands in MSDOS compact an multi volume in:
http://cpmarchives.classiccmp.org/ftp.php?b=cpm%2FSoftware%2FWalnutCD%2Fcpm%2Futils%2Fhdutl


  001.jpg 002.jpg 003.jpg 004.jpg 005.jpg
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: d_kef on 09:11, 08 April 22
HDCPM v1.03 has been released.
You will find the .DSK container file in the first post as usual.

The main change of this release is the addition of USIfAC II (thanks @ikonsgr) to the list of supported interfaces.
Also a bug that prevented uIDE-16 ( @JonB ) from being detected has been corrected.

So the list of supported mass storage interfaces is currently:
I think this includes pretty much every mass storage solution currently available for the CPC.

The ROM will auto-detect the installed interface during initialization and will load the correct HD driver during CP/M boot.
So it's one ROM to rule them all!

d_kef
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: JonB on 09:49, 08 April 22
@d_kef how does it detect the interface? Issue an IDE command to the port and check for a response from the IDE device?
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: d_kef on 09:56, 08 April 22
Quote from: JonB on 09:49, 08 April 22@d_kef how does it detect the interface? Issue an IDE command to the port and check for a response from the IDE device?
It reads the status register and expects bit 1=0.

    ld    bc,uidestat
    in    a,(c)
    bit    1,a
    jr    nz,nouide

I found out that I used 'idestat' instead of 'uidestat'

d_kef
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: HAL6128 on 09:59, 08 April 22
Quote from: d_kef on 09:11, 08 April 22So the list of supported mass storage interfaces is currently:
  • Symbiface II
  • X-Mass
  • uIDE-16 (base address = &FEF0)
  • M4 board
  • USIfAC II
I think this includes pretty much every mass storage solution currently available for the CPC.

Very impressive work. Well done!!
One mass storage is missing. :)
The SF3 and RSF3 (both with the same address range). Similar to the M4 I think (I mean the address technic)?
Look at: http://tmtlogic.com/ (With a manual on the support site)
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: d_kef on 10:21, 08 April 22
Quote from: HAL6128 on 09:59, 08 April 22One mass storage is missing. :)
The SF3 and RSF3 (both with the same address range). Similar to the M4 I think?
Well I'm rather positive. But I need someone with a SF3 to test my code.
Are you interested?
On the other hand how many SF3 owners would like to use HDCPM? CP/M is a niche market anyway. :laugh:

d_kef
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: JonB on 10:27, 08 April 22
I call cfWait: from ideinit: and if it times out, there's no interface (or rather, no IDE device connected). This is driven by the busy flag rather than the status flag, which will be 1 if there's nothing connected (or rather, is 1 in testing when nothing is connected).

;-----------------------------------------------------------------------------
; Wait for IDE device to be ready
cfWait:    push    de
    ld    d,CF_WAITRETRY    ; load retry counter
cfLoop:    di            ;
    in     a,(CF_STATUS)    ; get IDE status
    ei
    ld    (laststat),a    ; save it down
    and     CF_MASKBSY    ; check busy bit
    jr    z,cfEnd        ; if clear, drive is ready
    dec    d        ; otherwise decrement retry counter
    jr    z,cfTout    ; if zero, drive has timed out
    jr    cfLoop        ; otherwise loop back for retry

cfTout:    ld    a,CF_TOUT    ; timeout: load rogue value
    jr    cfCcy        ; jump to abnormal return

cfEnd:    ld    a,(laststat)    ; retrieve status
    and    CF_MASKERR    ; check error flag
    jr    nz,cfErr    ; error exit if set
   
cfOK:    scf            ; return with carry set
    pop    de        ; restore
    ret            ; done
   
cfErr:    di            ; error:
    in    a,(CF_ERROR)    ; get error register
    ei            ;
    ld    (lasterr),a    ; save it down

cfCcy:    scf            ; clear carry flag
    ccf            ;
    pop    de        ; restore de
    ret            ; done

;-----------------------------------------------------------------------------
; Initialise IDE device
ideinit:call    cfWait        ; wait for master ide device
    cp    CF_TOUT        ; timeout?
    ret    z        ; yep.. drop out here

                ; --------------------------------------------
                ; Initialise the Master IDE device
    di            ;
    ld    a,CF_MASTER    ; address master device
    out    (CF_HEAD),a    ;
    ld     a,CF_8BIT    ; Set IDE to 8bit transfer mode
    out    (CF_FEATURES),a    ;
    ld    a,CF_SET_FEAT    ;
    out    (CF_COMMAND),a    ;
    ei
    call    cfWait        ; wait for master
    di            ;
    ld    a,CF_MASTER    ; address master device
    out    (CF_HEAD),a    ;
    ld     a,CF_NOCACHE    ; Set IDE to not cache writes
    out    (CF_FEATURES),a    ;
    ld    a,CF_SET_FEAT    ;
    out    (CF_COMMAND),a    ;
    ei
   
    xor    a        ;
    ret            ; done
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: d_kef on 10:56, 08 April 22
Quote from: JonB on 10:27, 08 April 22I call cfWait: from ideinit: and if it times out, there's no interface (or rather, no IDE device connected). This is driven by the busy flag rather than the status flag, which will be 1 if there's nothing connected (or rather, is 1 in testing when nothing is connected).
That's right. But I use this method only during ROM initialization.
It's only detecting the presence of the interface/hard disk as you mention.
A quick and dirty method but it seemed OK at the time.

When accessing the disk the following code (similar to yours) takes place:

;----------------------------------------------------
; Wait for hard disk to become ready
; entry -
;  exit A=status, carry set on timeout
;  uses AF, HL, BC
;----------------------------------------------------
waitrdy:
 ld bc,idestat
 ld hl,timeout ; set timeout
wtnext: or a ; clear carry
 in a,(c)
 bit 7,a ; check if busy
 jr z,wtexit
 dec l
 jr nz,wtnext
 dec h
 jr nz,wtnext
 scf ; set carry on timeout
wtexit: ret

Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: HAL6128 on 11:07, 08 April 22
I don't think that there are as many SF3 available as the M4 board around but definitly a lot. (50-100)?
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: d_kef on 11:32, 08 April 22
Quote from: HAL6128 on 11:07, 08 April 22I don't think that there are as many SF3 available as the M4 board around but definitly a lot. (50-100)?
If the percentage of CP/M users is similar to that of the sum of all other interface owners then you are the only one interested.. :laugh: :laugh: :laugh:

d_kef
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: HAL6128 on 11:49, 08 April 22
By the way:
just tested the version 1.03 on my M4 and it says "Error: Disk I/O. Press any key to reset"
And another thing: it seems that the ROM can't work together with a PlayCity (enhanced Soundcard) card together. Maybe some conflicts? The image won't be loaded after typing |HDCPM. Not a big deal because CP/M enthusiast don't work with PlayCity card :)
( PlayCity - CPCWiki)
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: HAL6128 on 11:51, 08 April 22
Quote from: d_kef on 11:32, 08 April 22
Quote from: HAL6128 on 11:07, 08 April 22I don't think that there are as many SF3 available as the M4 board around but definitly a lot. (50-100)?
If the percentage of CP/M users is similar to that of the sum of all other interface owners then you are the only one interested.. :laugh: :laugh: :laugh:

d_kef
Yeah. We are living in a small community :)
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: d_kef on 11:57, 08 April 22
Quote from: HAL6128 on 11:49, 08 April 22By the way:
just tested the version 1.03 on my M4 and it says "Error: Disk I/O. Press any key to reset"
And another thing: it seems that the ROM can't work together with a PlayCity (enhanced Soundcard) card together. Maybe some conflicts? The image won't be loaded after typing |HDCPM. Not a big deal because CP/M enthusiast don't work with PlayCity card :)
( PlayCity - CPCWiki)
That's strange. I tested v1.03 with my M4, the other day, and worked just fine.
I'll take a look again just in case.
What M4 firmware version do you use?

d_kef
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: HAL6128 on 12:00, 08 April 22
v2.0.7
Version 1.02 of HDCPM works fine.
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: d_kef on 12:15, 08 April 22
Quote from: HAL6128 on 12:00, 08 April 22v2.0.7
Version 1.02 of HDCPM works fine.
My bad!!! :picard: :picard:

I somehow uploaded the wrong file. Now it should be OK.

Can you try now with the new .DSK?

d_kef
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: HAL6128 on 12:41, 08 April 22
No, still the same behavior.
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: d_kef on 13:05, 08 April 22
Quote from: HAL6128 on 12:41, 08 April 22No, still the same behavior.
OK. I've deleted the file until I find some time to investigate what happened.

d_kef
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: d_kef on 11:57, 09 April 22
The correct v1.03 file has now been uploaded.
WinAPE is a bit tricky updating and saving DSK images especially if you run it on a WinXP VM.
I should be more careful next time.

d_kef
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: d_kef on 21:02, 22 June 22
New version of HDCPM is out.
You will find hdcpm104.dsk in the first post of this topic.

The main change of this version is that you don't need a ROM board any more.
HDCPM comes now also in the form of an executable binary file that can be run directly from the Amstrad Basic prompt.
Just give RUN"HDCPM" and boot CP/M from your favourite mass storage interface.
You can run HDCPM.BIN from your floppy drive or copy it to the root directory of your FAT formatted mass storage device and run it from there. Of course a CP/M formated disk/partition/image is still needed.
This is especially useful for people like @Fran123 that have a USIfAC II but no ROM board.

HDCPM.BIN has been tested with USIFfAC II, SF2+UniDOS, SF2+CubeMDOS and M4 Board and seems to work just fine but feel free to send in any comments and/or suggestions.

d_kef
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: Mark_wllms on 08:26, 23 June 22
Amazing. Now that this is an executable that loads into ram, could it be included in the USIFAC as an RSX?
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: d_kef on 08:49, 23 June 22
Quote from: Mark_wllms on 08:26, 23 June 22Amazing. Now that this is an executable that loads into ram, could it be included in the USIFAC as an RSX?
So you mean that it should be turned into a ROM!
Wait..... That's already been done?!?!  :-\

Well, there was a discussion about this in the USIfAC topic and it seems that is not very easy to implement.
That's why I converted it to executable file that can be run from the USB directly.
Compared to the RSX the effort to run it is exactly the same:
RSX:

EXECUTABLE:

Furthermore, it can be upgraded easily. Just plug your USB drive to your PC and copy the new binary.

d_kef

Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: Fran123 on 11:22, 23 June 22
Quote from: d_kef on 21:02, 22 June 22New version of HDCPM is out.
You will find hdcpm104.dsk in the first post of this topic.

The main change of this version is that you don't need a ROM board any more.
HDCPM comes now also in the form of an executable binary file that can be run directly from the Amstrad Basic prompt.
Just give RUN"HDCPM" and boot CP/M from your favourite mass storage interface.
You can run HDCPM.BIN from your floppy drive or copy it to the root directory of your FAT formatted mass storage device and run it from there. Of course a CP/M formated disk/partition/image is still needed.
This is especially useful for people like @Fran123 that have a USIfAC II but no ROM board.

HDCPM.BIN has been tested with USIFfAC II, SF2+UniDOS, SF2+CubeMDOS and M4 Board and seems to work just fine but feel free to send in any comments and/or suggestions.

d_kef
hey! a lot of thanks
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: Mark_wllms on 15:48, 24 June 22
Quote from: d_kef on 08:49, 23 June 22Well, there was a discussion about this in the USIfAC topic and it seems that is not very easy to implement.
That's why I converted it to executable file that can be run from the USB directly.
Compared to the RSX the effort to run it is exactly the same:
RSX:
  • |USB
  • |HDCPM

EXECUTABLE:
  • |USB
  • RUN"HDCPM

Furthermore, it can be upgraded easily. Just plug your USB drive to your PC and copy the new binary.

d_kef



I'm really impressed with this - it loads on my USIFAC from the binary and I can load the CPM hard drives up.

My physical 3" disc drive is playing up, so I love having a virtual CP/M disk drive I can load all my infocom games onto. However, I can't work out how to copy anything into the CP/M hard drives without using the physical drive. Is there a way of adding files to the drives, either on the Amstrad or via a PC?
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: GUNHED on 15:56, 24 June 22
What's about some classic copy tool like NS.COM, FILECOPY.COM or POWER3.COM?
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: d_kef on 16:33, 24 June 22
Quote from: Mark_wllms on 15:48, 24 June 22My physical 3" disc drive is playing up, so I love having a virtual CP/M disk drive I can load all my infocom games onto. However, I can't work out how to copy anything into the CP/M hard drives without using the physical drive. Is there a way of adding files to the drives, either on the Amstrad or via a PC?
You can use cpmtools (http://www.moria.de/~michael/cpmtools/). Full functionality only on Linux I'm afraid.
On a Linux machine you can install them like a normal install package from the main software repository.
eg. on Ubuntu:
sudo apt install cpmtools


You only need to insert the following  record in the /etc/cpmtools/diskdefs file:

diskdef hdcpm
  seclen 512
  tracks 65
  sectrk 256
  blocksize 8192
  maxdir 1024
  skew 0 
  boottrk 1
  os 3
end

Then you can copy files to and from the CP/M disk image with simple commands:
cpmcp -f hdcpm CPMDSK01.IMG myapp.com 1:myapp.com

d_kef

Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: Mark_wllms on 09:20, 27 June 22
Quote from: d_kef on 16:33, 24 June 22You can use cpmtools. Full functionality only on Linux I'm afraid.

It seems the Wild Turkey distribution of cpmtools works pretty well on Windows, so I can add files to the CPM hard drive now. Works well.
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: d_kef on 10:19, 27 June 22
It seems that they have updated the binaries.
IIRC the previous version had some limitations.
Nice!!!

d_kef
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: d_kef on 23:19, 04 July 22
New release coming soon....IMG_20220702_164427.jpg

d_kef
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: d_kef on 09:52, 09 July 22
And here is the new HDCPM v1.05.
.dsk file attached in the first post as usual.

The main change in this version is support for the almighty Symbiface III of @TMTLOGIC .
Both SF3 and RSF3 are supported.
Special thanks to @HAL6128 for beta testing v1.05 as I don't own a SF3.

I hope all you hardcore CP/M users enjoy his version :P

d_kef
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: d_kef on 19:30, 09 August 22
HDCPM has got now its own wiki page: https://www.cpcwiki.eu/index.php/HDCPM (https://www.cpcwiki.eu/index.php/HDCPM)

d_kef
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: angelcaio on 16:46, 20 November 22
HI. seems to be a new batch of Real Time Clock Board cards
https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/real-time-clock-board/250/

Does anyone know if it works with HDCPM?
Thanks
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: GUNHED on 18:25, 20 November 22
Quote from: angelcaio on 16:46, 20 November 22HI. seems to be a new batch of Real Time Clock Board cards
https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/real-time-clock-board/250/

Does anyone know if it works with HDCPM?
Thanks
Of course it does! The software fully supports CP/M Plus and also CP/M 2.2 with 63 KB TPA.
This way it's even supported with the Z-System (that's Z3Plus for CP/M Plus and ZCPR 3.3 for CP/M 2.2 - 63KB).  :)
But it remains to be decided if a new batch is made, if dxs want't to do it, or if somebody else would like to make a batch of the most supported RTC for the CPC.  :)

However HDCPM was made for the Symbiface, and the SF2 already has an RTC.
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: d_kef on 22:07, 20 November 22
Quote from: angelcaio on 16:46, 20 November 22Does anyone know if it works with HDCPM?
Yes and no!
The HDCPM ROM only supports the SF2 RTC. You can boot CP/M with RTC support giving |HDCPMT. This means that if the RTC is detected then the RTC driver will be injected in the CP/M Plus BIOS and DATE.COM will then operate on the hardware clock reading or setting the date and time. And any program that reads the CP/M date and time will get it from the hardware clock. This of course means that 540 bytes of RAM will be occupied by the RTC driver.
The HDCPM.BIN does not support any hardware RTC. Instead you can use the provided utility RTC.COM to set or read the time from the SF2 RTC. This is what I use. I have the command 'RTC -G' in my PROFILE.SUB so the CP/M date and time is set at boot time. If I want to set the RTC date and time then I change the CP/M date and time with the DATE.COM and then give 'RTC -S' to also synchronize the RTC.
So only SF2 RTC is supported at the moment. I'm working on a new version of RTC.COM that will support the M4 (read only) and SF3 RTC.

I suppose TIMEROM.COM works similar to the RTC.COM but for the Dobbertin SmartWatch.

So HDCPM doesn't have driver support for the Dobbertin SmartWatch but you can boot CP/M with HDCPM and then use Dobbertin's utility to manage it.


d_kef
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: GUNHED on 22:54, 20 November 22
TIMEROM#.COM does read the dxs / Dobbertin RTCs and set time and date of CP/M Plus. That's completely independent of the version of CP/M Plus.  :)
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: d_kef on 22:42, 23 January 23
The all new version 1.06 of HDCPM is out!

The new version supports the good old Albireo (https://www.cpcwiki.eu/index.php/Albireo) of @PulkoMandy. Save your CP/M Plus image files in the root directory of the SD card and way you go!

Also a new version of the RTC.COM utility comes bundled in the distribution disk.
The new RTC.COM supports the Symbiface 3 and M4 board RTCs. Special thanks to @HAL6128 for testing the new version.

You can find more info and download the new .dsk file at the HDCPM (https://www.cpcwiki.eu/index.php/HDCPM) wiki page.

d_kef
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: GUNHED on 15:08, 24 January 23
Take my RTC to support Dobbertin / dxs / and LambdaSpeak too. (Source on my hp or somewhere here).
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: d_kef on 19:59, 28 January 23
Since there is some discussions about Z3Plus/Z-System taking place lately, I've uploaded a Z3Plus disk image at the HDCPM wiki page. (https://www.cpcwiki.eu/index.php/HDCPM#Other_downloads)
If you use it don't change its drive letter (A:) as this is hard-coded in the ZCCP and it will make the system unbootable.

You might need some documentation in order to take advantage of all the advanced features of Z3Plus but you can easily find everything on-line.

d_kef
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: HAL6128 on 22:34, 28 January 23
Thank you for uploading the image. I'll give it a try. I don't know much about Z-System and it's major changes under the CPM core.
I have seen that Samarux here (Samarux FloppySoftware (http://www.floppysoftware.es/samarux.html?path=cpm_projects%7Csamarux)) enables CPM to work like a Unix shell. Maybe a little bit easier to install and enhance the system within the given structure of HDCPM.
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: GUNHED on 17:37, 30 January 23
Sorry, but you can't compare a shell to Z3Plus, which even has a shell stack.  :)
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: m_dr_m on 12:49, 27 April 23
Fantastic work, thanks!

Let me know if I understood the limitations correctly:

Even with the current constraints that would be quite handy.
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: HAL6128 on 17:38, 27 April 23
In case of point 2:
I have an albireo and xmass in parallel on a mx4 board. Xmass is formatted with 4 partitions with CP/M file system. Booting the alirero SD card and running from there hdcpm.bin (no rom installed). So the routine accesses (assuming) directly the xmass first partition after booting.
point 3:
attaching the xmass onto a pc let me access the filesystem with cpmtools under linux.
Works fine.
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: d_kef on 21:37, 27 April 23
Quote from: m_dr_m on 12:49, 27 April 23Fantastic work, thanks!

Let me know if I understood the limitations correctly:
  • The ROM itself isn't a complete CP/M system, you'll need the EMS file on the disk image.
  • You access the disc image by direct sector access (so potentially corrupting the host FAT file-system in case of fragmentation or bug).
  • You can copy from floppy to the virtual hard-drive, but there are no options to populate the disk image from the host FAT file-system.

Even with the current constraints that would be quite handy.

Thanks for the support!

Regarding point 1, I believe that being able to change the .ems file you boot CP/M from is more of a convenient feature rather than a limitation. But you are correct. The rom doesn't contain a complete CP/M system.
Regarding point 2, since v1.01 iirc, the fragmentation test and also a file length test is automatically performed at boot time preventing the use of a fragmented or small CP/M image and thus the corruption of the file system. Also the driver for Albireo uses the built in file access system so there is no problem with fragmented files.
Until now, I've never experienced a file system corruption nor have I ever received any complaints from others, but you never know.
Regarding point 3, cpmtools is indeed the recommended method to copy files from the CP/M image files to a physical file system and vice versa.
I had some thoughts on building some CP/M utilities to handle browsing and coping files from the container FAT file system but they never went beyond the flow diagram stage.

d_kef
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: Takis Kalatzis on 16:01, 03 May 23
Hello,

I'm trying to install HDCPM in ULIFAC board (which is practically using a USIFAC II mass storage) and I'm facing problems.

Steps I have done:
1. Created an Image file with the MakeImg utility (took around 7 hours to complete)
2. Had to give IDIS RSX command to disable Direct Access and be able to access the Disk Drive
3. Loaded CPM from Disk Drive with ICPM
4. Executed the HDMGR.COM utility from Disk Drive

And now the strange things:
1. In "CPM Disk Image Information", the Image is listed but with the mention of "UNFORMATTED"
2. The image is not shown in "Log Disk" option, only the Drive 1 is shown there

So, I cannot log the Image and I cannot format it.

Any idea on how to get out of this situation?

Best regards,

Takis
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: d_kef on 16:21, 03 May 23
Wow!!!
You really waited for 7 hours????

You could use the readily provided images from the HDCPM wiki page or use hexed.it to make an image in seconds.

Anyway the condition you describe should not have happened. You might have found a bug.
I suppose you use the latest version v1.06 of HDCPM?
I'll try to reproduce your problem with my USIfAC and report back.

Edit: what is the size of your usb flash disk? Has it been partitioned or formatted with some kind of utility?

D_kef.
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: d_kef on 19:11, 03 May 23
OK. I tried to reproduce your probleb with my USIfAC but it works as it should.

1. made an empty CPMDSK01.IMG (with hexed.it ;) )
2. gave |DIS to disable Direct Mode
3. started CP/M from floppy with |CPM
4 run HDMGR.COM from floppy

see pics.

The 'CP/M disk image information' shows '*** UNFORMATTED ***' because, you know... it is unformatted
The 'Log Disk' shows '2. CPMDSK01.IMG' as the only available option
I was able to format the image and transfer the system file from the floppy to the image to make it bootable.
Then I power-cycled the CPC and I was able to boot CP/M from the newly created image with RUN"HDCPM

d_kef

Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: Takis Kalatzis on 13:47, 04 May 23
Hi d_kef,

I'm using HDCPM v1.5. My USB stick is 1GB, FAT formatted (with Windows 10 Disk Manager if I remember correctly).

I'm sharing my screenshots just for comparison. What I see as major difference is that in the "Log Disk" screen, you only have the Image while I have only the "Disk 1".

I will try again with the ready made images provided in the Wiki page.

Thanks a lot for the testing!

Takis
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: d_kef on 17:20, 04 May 23
Before trying anything else, please upgrade HDCPM.BIN and HDMGR.COM to v1.06 (https://www.cpcwiki.eu/imgs/b/b1/Hdcpm106.dsk).
I don't think the problem is related to the image file.

If the problem persist then it's probably a bug in HDMGR.COM.

d_kef
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: Takis Kalatzis on 18:17, 04 May 23
Nope, same behavior with v1.06.

I also replaced the image file with the second image provided in the Wiki page (changed the name to 01). Same behavior there as well.

Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: d_kef on 20:09, 04 May 23
As I said you probably found a bug.
I'll take a look at my code and see if I can pinpoint it.

d_kef
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: Devlin on 06:28, 06 May 23
Is there a "dummies guide" to setting this up?
I have no idea what i'm doing, or *if* I can run HDCPM.

I have 464 w/512k and usifac2 which i read is supported, but I feel like i'm missing something in putting the files on the usb, and running the binary to launch cpm
- it gets as far as "mounting" the disk images, and then just stops there. pressing a key just makes it refresh the screen.
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: d_kef on 07:17, 06 May 23
Your main problem is that you can't run CP/M Plus with your hardware setup.
You need a CPC6128/6128 Plus or a CPC464 with a memory expansion that supports #C3 memory mode. I think that the only modern memory card that can do this is Revaldinho's Universal Amstrad CPC RAM Card (https://github.com/revaldinho/cpc_ram_expansion/wiki/Universal-Amstrad-CPC-RAM-Card).

If you have a compatible setup then you copy HDCPM.BIN and CPMDSK01.IMG (https://www.cpcwiki.eu/imgs/4/4a/CPMDSK01%2602.zip) in the root directory of your USB stick, plug it in your USIFAC, power-up your Amstrad and enter RUN"HDCPM.
That's it.

Edit: just saw in your signature that you do have the Revaldinho's memory card. Is it the one that supports the #C3 memory mode?

d_kef

Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: Devlin on 09:50, 06 May 23
I've put the card in "full shadow C3 mode" and tried again -

run"hdcpm.bin" with cpmdsk01/2.img all on the root of the usifac2's usb stick

the cpm message comes up on its own screen, says hard disk 1 and 2 are mounted, the screen flashes once and then.. nothing?

seems I can still input text and such, but no amount of tinkering can get text to appear.
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: d_kef on 11:23, 06 May 23
Strange!
The behaviour you describe indicates that #C3 mode is not working.
Do you have any other way to load CP/M Plus? Maybe by using FDC emulation and a CP/M Plus .dsk file (@ikonsgr is this possible?)

d_kef
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: Devlin on 14:36, 06 May 23
CP/M Plus (on the system disks off the wiki)- would come up with an error prompting me to press a key and then reset when I did
>>> "This program will not run in this environment.  Press any key"

I'm guessing my CPC is not up to the task? CP/M 2.2 will launch just fine off the DSKs I used though (the 464/DDI-1 versions off wiki)
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: d_kef on 14:57, 06 May 23
CP/M plus also checks the ROM of the CPC.
Try to replace the C10CPM3.EMS file in the system disc with the one attached.
If it boots then I suppose we'll find a way to also boot it with HDCPM. Otherwise....

CP/M 2.2 was made for 464 and 664 so it works fine with everything but it's not supported by HDCPM. Sorry.

d_kef
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: revaldinho on 18:13, 06 May 23
There are instructions for running CP/M+ using memory expansions on this CPCWiki page: Running CPM with Memory Expansions (https://www.cpcwiki.eu/index.php/DkTronics_CPM).

In short, on a 464 you need to have the CPC6128 OS/BASIC installed and then, to fool the environment check, you need to load the Dk'tronics RSXes and use the new |EMULATE command.  I can confirm that with my universal RAM cards this works fine on a CPC464 with a DDI-3 USB drive, and optionally a Gotek as Drive B. Running BBC BASIC under CP/M+ and booting FutureOS have been part of the development test suite for my universal cards from the start.

I've been meaning to try HDCPM for a while so I thought I should just check it out to see if that works ok on a 464 too with the same setup otherwise.

I have an M4 board, so I installed HDCPM with the |HDCPM command in ROM and tested the installation with a CPC6128 - all good. And it is really good. This is a very nice way of running CP/M+ on modern SD cards.

Next, I discovered that I can't actually find any of my own universal RAM cards. I'm sure I have a couple somewhere, but I could only find Old School RAM cards today after a recent, er, tidy up. So, I had to quickly build another. I tested the new card's &C3 mode with Duke's RAM program and running FutureOS on the '464. Then using the DDI-3 I was able to boot CP/M+ and run BBC BASIC again.

Good so far. But that's the end of the good news. When I use the M4 with the CPC464 and run |HDCPM from ROM, the CP/M+ boot appears to start ok - I see the message that the CPM images are found and mounted ... and then I get a solid blue screen and appears that the machine has locked up.

I don't think it's obviously a RAM card issue because the same card works well with CP/M+ and FutureOS when running with the DDI-3. Something about HPCPM on the M4 in my case seems to have an incompatibility.


IMG_5137.jpeg IMG_5136.jpeg
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: d_kef on 19:03, 06 May 23
Well then, I'll have to dig into this.
The problem is that I don't have a universal RAM card for testing.
Are there any available for purchasing?

d_kef 
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: revaldinho on 21:27, 06 May 23
Quote from: Devlin on 14:36, 06 May 23CP/M Plus (on the system disks off the wiki)- would come up with an error prompting me to press a key and then reset when I did
>>> "This program will not run in this environment.  Press any key"


Definitely worth trying the Dk'Tronics |Emulate RSX at this point. It would be good to know whether the USIfAC II has any more luck than my installation on the M4.

Quote from: d_kef on 19:03, 06 May 23Well then, I'll have to dig into this.
The problem is that I don't have a universal RAM card for testing.
Are there any available for purchasing?

I'm quite happy to use HDCPM on my 6128 and may even change allegiance to the AgonLight once the CP/M installation there matures a bit. So, no need to pursue this on my behalf, but if you're doing this for the greater good then I salute you.  :D

If you're not able to source a card, I will always make them to order for CPCWiki users. I still support all my cards and you, or anyone else, can just PM me.

I think I have enough PCBs and parts here to make 2 or 3 more of the 512K boards at the moment. I am usually cheap compared with other sellers, because this is not really a business for me, but I do find European postage a bit embarrassing. Given that I have the parts already, you can have a RAM board for £22  - prices may go up next time I need to get more parts in - but tracked postage to Europe works out to be about £10 and then you may have to pay customs charges depending on how enthusiastically your local government applies the rules to items from the UK. So, total shipping fees may well equal the price of the board. Also, my last item posted to Germany sat in customs for about a month. It did get there in the end though.

So, I do recommend you have a good look and see if there might be a more local EU seller, but otherwise PM me for payment details etc.





Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: Devlin on 22:55, 06 May 23
Quote from: revaldinho on 21:27, 06 May 23
Quote from: Devlin on 14:36, 06 May 23CP/M Plus (on the system disks off the wiki)- would come up with an error prompting me to press a key and then reset when I did
>>> "This program will not run in this environment.  Press any key"


Definitely worth trying the Dk'Tronics |Emulate RSX at this point. It would be good to know whether the USIfAC II has any more luck than my installation on the M4.
Where does one get the file(s) for this?
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: revaldinho on 07:47, 07 May 23
Files are available here: Cpcwiki page on Dk'tronics memory expansions (https://www.cpcwiki.eu/index.php/Dk'tronics_memory_expansion)

See the links  at the bottom of the page.
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: d_kef on 09:12, 07 May 23
Quote from: revaldinho on 21:27, 06 May 23but if you're doing this for the greater good then I salute you. :D

Nah! Nothing that altruistic.
I'll just do it for the fun of it.  :P
Don't hold your breath though...

d_kef


Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: Devlin on 10:53, 08 May 23
Quote from: revaldinho on 07:47, 07 May 23Files are available here: Cpcwiki page on Dk'tronics memory expansions (https://www.cpcwiki.eu/index.php/Dk'tronics_memory_expansion)

See the links  at the bottom of the page.
Okay, tried the bank program and |emulate and it doesn't let me run HDCPM - exact same behaviour as before.
When mounting the cpm and bank disk images and switching through I can get into cp/m plus though
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: d_kef on 20:34, 11 May 23
Quote from: Devlin on 10:53, 08 May 23
Quote from: revaldinho on 07:47, 07 May 23Files are available here: Cpcwiki page on Dk'tronics memory expansions (https://www.cpcwiki.eu/index.php/Dk'tronics_memory_expansion)

See the links  at the bottom of the page.
Okay, tried the bank program and |emulate and it doesn't let me run HDCPM - exact same behaviour as before.
When mounting the cpm and bank disk images and switching through I can get into cp/m plus though
I've already spotted a bug that prevents HDCPM from patching and starting CP/M plus on a 464.
I also realized that I already have all the main components needed to build revaldinho's universal RAM card. So I've ordered some PCB's and I expect to have them on hand in a couple of weeks.
Then I'll be able (hopefully) to confirm that the new version of HDCPM will work with all mass storage interfaces in combination with the universal RAM card on a CPC464.

d_kef
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: zhulien on 20:59, 11 May 23
@d_kef Does the CPM Plus that I posted in the other thread work for you? It has been patched and used to work on my 664.

https://www.cpcwiki.eu/forum/applications/dragonbreed-patched-cpm-plus/
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: d_kef on 21:25, 11 May 23
Quote from: zhulien on 20:59, 11 May 23@d_kef Does the CPM Plus that I posted in the other thread work for you? It has been patched and used to work on my 664.

https://www.cpcwiki.eu/forum/applications/dragonbreed-patched-cpm-plus/

I've missed that!!!
Do you also use revaldinho's universal RAM card?
Anyway I know that CP/M Plus doesn't use the Basic or the AMSDOS ROM and only makes some calls to specific hardware driving routines in the firmware ROM that reside in the same addresses regardless of the ROM version.
So patching the .EMS file to take out the ROM version check, that prevents CP/M plus from loading, is fairly easy.
The only real prerequisite is support of #C3 RAM mode.
I hope that I'll be able to confirm my points in a few weeks using the universal RAM card. (I've already confirmed them using WinAPE)

Edit: I've just read your post and you refer to CPM 2.2 that works just fine on every CPC. HDCPM can work only with CP/M Plus.
Edit2: with HDCPM you can change the drive letters of the CP/M Plus hard disc/images, floppy disks or RAM drive. It supports the Dobbertin's and the Dk'tronics RAM disk driver. And you can change fonts with my SETCP.COM utility:
https://github.com/salafek/Net4CPC/blob/main/Extra/setcp.zip

d_kef
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: zhulien on 01:07, 12 May 23
@d_def I was referring to Dragonbreed CPM+ that works fine on every CPC - at least as far as I have tested.  And it is now a file on the disc that you just run and can easily copy onto SDCARD for example - although it doesn't have SDCARD support as they didn't exist back then.

I will get to play with HDCPM soon, I am a bit confused how it selects which device to use though.  Does it format the actual device, or use hardfiles, does it try devices in order or do I nominate one?  Do all disks need to be on the same device or can eg. 1 be on Usifac II, 1 on XMass and 1 on M4?  I have all 3 of these in my CPC.
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: zhulien on 01:20, 12 May 23
Thanks for the wiki page btw, any chance HDCPM might be able to support 1024 kb , 2048 kb and 4096 kb RAM drives also?  Where does the 4 drive limit come from?  Any way to remove that?  Perhaps a utility run from CPM that can switch in/out a nominated drive, like a removable media?  Maybe it can be a utility that you can give a name in CP/M which is the same name as an underlying AMSDOS CP/M image file - when you type it in, it looks in AMSDOS, get's the new parameters of the file to be swapped in, patches the CP/M with the new file parameters, then returns to CP/M.  If you have 50 drives to fill up some of your 64gb memory card, then you can of course just copy that utility 50 times with different names.  Alternatively make the last driveletter removable, and introduce a mount and unmount command - unmount with no parameters, mount <amsdos filename>.  Other solutions which are less elegant, allow for pretend folders in the boot drive of CP/M which map to underlying files. i.e. go to C:, change to the 'basic' folder with a new command... CD? and it mounts the 'basic.dsk' into drive F: and automatically changes you to drive F:  or maybe the removable drive should be called M: (for mountable)
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: HAL6128 on 08:28, 12 May 23
Quote from: zhulien on 01:20, 12 May 23Where does the 4 drive limit come from?
I'm not so sure but as far as I know the limitation of drives in CP/M is up to 16 (drive p: ).  The capacity of storage is limited by size of the disk-parameter-block (number of sectors per track (16 Bit number) x numbers of tracks (16 Bit number))... somehow...??
Maybe there are limitations of CP/M if you plug a hard drive with a capacity of 8MB?
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: Devlin on 11:51, 12 May 23
Quote from: d_kef on 20:34, 11 May 23I've already spotted a bug that prevents HDCPM from patching and starting CP/M plus on a 464.
I also realized that I already have all the main components needed to build revaldinho's universal RAM card. So I've ordered some PCB's and I expect to have them on hand in a couple of weeks.
Then I'll be able (hopefully) to confirm that the new version of HDCPM will work with all mass storage interfaces in combination with the universal RAM card on a CPC464.

d_kef

I'd be happy to help with testing, but I also really don't know much about C/PM in general so I don't know how useful my assistance can be outside of just making sure it starts up okay. I was hoping that I could use this as my learning experience, as it's likely the only way i'd be able to use it.

(i'll add the best way to get in touch is to prod me on Discord - the link to my server is in my forum signature)
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: revaldinho on 14:16, 12 May 23
Quote from: Devlin on 11:51, 12 May 23
Quote from: d_kef on 20:34, 11 May 23I've already spotted a bug that prevents HDCPM from patching and starting CP/M plus on a 464.
I also realized that I already have all the main components needed to build revaldinho's universal RAM card. So I've ordered some PCB's and I expect to have them on hand in a couple of weeks.
Then I'll be able (hopefully) to confirm that the new version of HDCPM will work with all mass storage interfaces in combination with the universal RAM card on a CPC464.

d_kef

I'd be happy to help with testing, but I also really don't know much about C/PM in general so I don't know how useful my assistance can be outside of just making sure it starts up okay. I was hoping that I could use this as my learning experience, as it's likely the only way i'd be able to use it.

(i'll add the best way to get in touch is to prod me on Discord - the link to my server is in my forum signature)

Same here - if you'd like to provide a new zip file I'll run it up on my '464 + M4 board to try it out.
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: d_kef on 14:42, 12 May 23
Quote from: zhulien on 01:07, 12 May 23@d_def I was referring to Dragonbreed CPM+ that works fine on every CPC - at least as far as I have tested.  And it is now a file on the disc that you just run and can easily copy onto SDCARD for example - although it doesn't have SDCARD support as they didn't exist back then.
Yes, I finally got it!!!  :D :D :D
I'll test it and report back.


Quote from: zhulien on 01:07, 12 May 23Does it format the actual device, or use hardfiles, does it try devices in order or do I nominate one?

The following statemens answer your questions:

Quote from: zhulien on 01:20, 12 May 23any chance HDCPM might be able to support 1024 kb , 2048 kb and 4096 kb RAM drives also?  Where does the 4 drive limit come from?  Any way to remove that?
4 disks is a limittion of HDCMP not CP/M plus. CP/M indeed supports up to 16 disk drives. It was a decision I took when I started coding HDCPM.
8MB is again a limitation of HDCPM. CP/M has a limit of 512MB per disk drive but I think you have started to forget things. (https://www.cpcwiki.eu/forum/index.php?msg=211588) (Being the same age, I know how this goes  ;) )
for a 512MB disk CP/M needs to reserve 8KB of memory for the disk allocation table. This meens 8KB smaller TPA.
My intention was to make the size of the images/partition selectable up to the 512MB limit but no one asked for such a feature before and although it is a nice to have feature It might not be as useful as it sounds given the fact that CP/M doesn't support directories and even z-system can only support 16 (pseudo)directories per disk. So I think that organising your files on a 512MB CP/M disk would be a chalenging task.
Quote from: zhulien on 01:20, 12 May 23Perhaps a utility run from CPM that can switch in/out a nominated drive, like a removable media? Maybe it can be a utility that you can give a name in CP/M which is the same name as an underlying AMSDOS CP/M image file - when you type it in, it looks in AMSDOS, get's the new parameters of the file to be swapped in, patches the CP/M with the new file parameters, then returns to CP/M.  If you have 50 drives to fill up some of your 64gb memory card, then you can of course just copy that utility 50 times with different names.  Alternatively make the last driveletter removable, and introduce a mount and unmount command - unmount with no parameters, mount <amsdos filename>.  Other solutions which are less elegant, allow for pretend folders in the boot drive of CP/M which map to underlying files. i.e. go to C:, change to the 'basic' folder with a new command... CD? and it mounts the 'basic.dsk' into drive F: and automatically changes you to drive F:  or maybe the removable drive should be called M: (for mountable)
This is certainly a good idea! I might give it a try.
On the other hand, how many people need that much space for storing CP/M files?

d_kef
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: HAL6128 on 15:36, 12 May 23
Yes, it's a week point of CPM not to have directories. The user structure for a single terminal is from a visually view not helpful.
 So for me 8MB disk drives are ok, a little to big. You will need some time to print the catalogue. But organization onto four hard drives plus two floppy drives is more than I ever expected from CPM on a CPC, thanks to @d_kef. :)
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: d_kef on 17:28, 12 May 23
I've attached the test version of HDCPM for @Devlin and @revaldinho and anyone else who is interested in testing it with real 464/664 hardware.
Looking forward to your feedback.

d_kef
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: revaldinho on 23:26, 12 May 23
Right, I've just tried this new version using the ROM from the zipfile.

On my 6128 + M4, all is well and I can see the updated ROM version in the sign-on message. HDCPM boots into CP/M+ normally. All good.

On the 464 + M4, I still don't get to the CP/M+ prompt.

Here's the 464 sign-on screen (with 6128 Firmware/BASIC installed and no ROMs other than the HDCPM and M4 support)

capture6.png

Running |HDCPM directly still fails the environment check

capture7.png

So, rebooting and running the Dk'Tronics BANK.BAS utility to install RSXes and using the |Emulate command, |HDCPM gets past the environment check but ends up with a solid blue screen and the machine locked up as before.

capture8.png

end.png



Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: d_kef on 23:55, 12 May 23
Hm.... Back to the drawing board then... :(

d_kef
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: poulette73 on 10:28, 13 May 23
Hello d_kef,

As already exchanged in PM, congratulations for this great tool!!

it's a must have. 👍

It works really well, and very satisfying to have up to 32 MB of storage available under CP/M Plus, and not to mention the almost instantaneous execution speed of programs.
The ability to retrieve the date and time from the M4 is also a nice feature.

My configuration : Amstrad CPC 6128 with M4 Board. And 1MB memory expansion, like this :
(https://cpcrulez.fr/im4/2/poulette73-img06911.jpg)
github.com/revaldinho/cpc_ram_expansion/wiki/'Old-School'-CPC6128-512KB-and-1MB-RAM-Expansion-Cards (https://github.com/revaldinho/cpc_ram_expansion/wiki/'Old-School'-CPC6128-512KB-and-1MB-RAM-Expansion-Cards)
I have used CPM3SEMI.EMS as intended as the boot file.

The year displayed is not correct but it's quite normal: I used the original CP/M disk, which isn't patched for the year 2000 bug.
To correct this, it's possible to use ZPM3 system disks which is an alternative to CPM Plus with year 2000 compliant binaries.

And the result:
(https://i.servimg.com/u/f59/18/51/04/47/cpm10.jpg)
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: d_kef on 10:50, 13 May 23
You can find a CPMDSK01.IMG containing all the files of the AMSTRAD CP/M Plus system disks and Y2K compatible replacement files, in the HDCPM wiki page.
Then just transfer the CPM3SEMI.EMS using HDMGR.COM to the reserved track.

d_kef
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: Devlin on 12:32, 13 May 23
Quote from: revaldinho on 23:26, 12 May 23Right, I've just tried this new version using the ROM from the zipfile.

On my 6128 + M4, all is well and I can see the updated ROM version in the sign-on message. HDCPM boots into CP/M+ normally. All good.

On the 464 + M4, I still don't get to the CP/M+ prompt.

Here's the 464 sign-on screen (with 6128 Firmware/BASIC installed and no ROMs other than the HDCPM and M4 support)

[url="https://www.cpcwiki.eu/forum/index.php?action=dlattach;attach=39393;type=preview;file"]capture6.png[/url]

Running |HDCPM directly still fails the environment check

[url="https://www.cpcwiki.eu/forum/index.php?action=dlattach;attach=39395;type=preview;file"]capture7.png[/url]

So, rebooting and running the Dk'Tronics BANK.BAS utility to install RSXes and using the |Emulate command, |HDCPM gets past the environment check but ends up with a solid blue screen and the machine locked up as before.

[url="https://www.cpcwiki.eu/forum/index.php?action=dlattach;attach=39397;type=preview;file"]capture8.png[/url]

[url="https://www.cpcwiki.eu/forum/index.php?action=dlattach;attach=39399;type=preview;file"]end.png[/url]




You got pretty much exactly what I got - I don't have a ROM board, so I can only test from the binary, it starts okay, then fails the environment check(i'd say that's progress!) with no tweaking. running |emulate causes the same issue as revaldinho with the crashing though.
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: poulette73 on 12:43, 13 May 23
Quote from: d_kef on 10:50, 13 May 23You can find a CPMDSK01.IMG containing all the files of the AMSTRAD CP/M Plus system disks and Y2K compatible replacement files, in the HDCPM wiki page.
Then just transfer the CPM3SEMI.EMS using HDMGR.COM to the reserved track.

d_kef
That's fine, thank you !

(https://i59.servimg.com/u/f59/18/51/04/47/datecp11.jpg)
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: GUNHED on 15:00, 14 May 23
Regarding CP/M Plus. Please use v 1.1 to have proper SIO support.
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: d_kef on 16:19, 14 May 23
Quote from: GUNHED on 15:00, 14 May 23Regarding CP/M Plus. Please use v 1.1 to have proper SIO support.
Where can we find it?
I searched the wiki and the forum but couldn't find anything.

d_kef
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: d_kef on 16:35, 14 May 23
Quote from: zhulien on 20:59, 11 May 23@d_kef Does the CPM Plus that I posted in the other thread work for you? It has been patched and used to work on my 664.

https://www.cpcwiki.eu/forum/applications/dragonbreed-patched-cpm-plus/

So, I downloaded the .dsk
Unfortunately it doesn't use a normal .EMS file. I suppose the DISC.BIN contains the CP/M Plus BDOS,  BIOS and CCP but it isn't compatible with HDCPM.

d_kef
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: GUNHED on 14:39, 15 May 23
The v 1.1 is surely all over the wiki, I'll try to attach a .dsk here...
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: poulette73 on 17:49, 15 May 23
Thank you @GUNHED for this file, I couldn't find it on the whole wiki either...

Everything is ok : I updated the disk image CPMDSK01.IMG with this version of CP/M Plus v1.1.
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: d_kef on 19:02, 15 May 23
Thanks for the files @GUNHED !!!
Do you know if the first one is an official AMSTRAD release?
I assume the second one is v1.1 patched for Vortex formatted disks?

d_kef
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: d_kef on 21:06, 15 May 23
Quote from: d_kef on 16:35, 14 May 23
Quote from: zhulien on 20:59, 11 May 23@d_kef Does the CPM Plus that I posted in the other thread work for you? It has been patched and used to work on my 664.

https://www.cpcwiki.eu/forum/applications/dragonbreed-patched-cpm-plus/

So, I downloaded the .dsk
Unfortunately it doesn't use a normal .EMS file. I suppose the DISC.BIN contains the CP/M Plus BDOS,  BIOS and CCP but it isn't compatible with HDCPM.

d_kef
@zhulien I did some further testing and the DISC.BIN is indeed a normal .EMS file with an AMSDOS header so it can be run from Basic.
After removing the header I was able to make my CP/M disk image bootable with it.
It loads just fine but not on my 464! It still uses #C3 RAM mode (confirmed with WinAPE) and unless you had a Dk'tronics or revaldinho's RAM card attached I don't see how it could have worked with your 664; Or I miss something here...

I'm attaching the extracted .EMS file here for anyone who wants to test it.

d_kef
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: zhulien on 03:40, 16 May 23
Quote from: d_kef on 21:06, 15 May 23
Quote from: d_kef on 16:35, 14 May 23
Quote from: zhulien on 20:59, 11 May 23@d_kef Does the CPM Plus that I posted in the other thread work for you? It has been patched and used to work on my 664.

https://www.cpcwiki.eu/forum/applications/dragonbreed-patched-cpm-plus/

So, I downloaded the .dsk
Unfortunately it doesn't use a normal .EMS file. I suppose the DISC.BIN contains the CP/M Plus BDOS,  BIOS and CCP but it isn't compatible with HDCPM.

d_kef
@zhulien I did some further testing and the DISC.BIN is indeed a normal .EMS file with an AMSDOS header so it can be run from Basic.
After removing the header I was able to make my CP/M disk image bootable with it.
It loads just fine but not on my 464! It still uses #C3 RAM mode (confirmed with WinAPE) and unless you had a Dk'tronics or revaldinho's RAM card attached I don't see how it could have worked with your 664; Or I miss something here...

I'm attaching the extracted .EMS file here for anyone who wants to test it.

d_kef
Ah ok, I did have a dktronics 64k memory expansion originally before eventually getting a 256k and then 512k.

I've always wondered is a 6128 version of a 256k memory expansion really 256k or is it 192k?
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: d_kef on 09:23, 16 May 23
Quote from: zhulien on 03:40, 16 May 23I've always wondered is a 6128 version of a 256k memory expansion really 256k or is it 192k?
In fact the Dk'tronics memory expansion disables the second 64K bank of the 6128 and replaces it with a 64K bank of its own memory!
So the usable RAM is always 64K + the size of the expansion. In CP/M Plus, the OS reserves 128K so the reported RAM drive size is 64K less than the size of the expansion = 192K.

d_kef
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: GUNHED on 21:52, 17 May 23
Quote from: d_kef on 19:02, 15 May 23Thanks for the files @GUNHED !!!
Do you know if the first one is an official AMSTRAD release?
I assume the second one is v1.1 patched for Vortex formatted disks?

d_kef
v 1.1 was the update from Amstrad to enable proper working SIO (Amstard RS232) support. The patched version supports 0,7 MB format (Vortex).
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: d_kef on 19:13, 05 June 23
Hi all,

I've recently built up a universal 512K RAM card for testing HDCPM with the 464.
I must admit that I am now more confused than ever!!!
Let me explain what I mean.
I have the RAM card and a M4 board attached on my 464. I've used the M4 to replace the 464's ROMs with the 6128 ones (OS, Basic and also AMSDOS).
So my 464 should behave like a 6128 minus the FDC as I don't have a DDI-1.
I know that my universal RAM card works. I've tested it with Future OS in full shadow RAM mode - everything OK.
I've also run @Duke 's RAM test and I've got what I believe were positive results. I only have a question about the C3 mode test when the expansion is configured for Dk'tronics C3 mode. The C3 RAM test reports "-rom remapped 0x4000!" for every memory page. Is that normal?
Anyway, what confuses me is that, the way HDCPM works, there is no obvious reason for my 464 with the above mentioned configuration to refuse loading CP/M. And yet I get the same results as @revaldinho and @Devlin : the CP/M images seem to be mounted and then the screen gets cleared and the system freezes.
I've tried all possible C3 configurations but the result is always the same.
So I had this idea: I could try to load the dragonbreed patched CP/M plus (https://www.cpcwiki.eu/forum/applications/dragonbreed-patched-cpm-plus/) which is a normal .EMS file that can be run from Basic (thanks @zhulien).
So I copied the "DISC.BIN" to the M4 SD card and run it from there. On my 6128 it boots just fine. It also recognizes the RAM card and initializes a 444KB RAM drive. On my 464 I'm getting the same blank screen and then it freezes!!!
But now HDCPM is out of the equation! So now I'm completely confused and don't know how to proceed.
Is it my 464 that has some kind of problem? Is it the .EMS that needs the real FDC to be present? Is it something else?

Any ideas would be more than welcomed!!!
Also If anyone could test the Dragonbreed patched CP/M plus without a DDI-1 attached I'd appreciate it very much.

d_kef
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: zhulien on 23:43, 05 June 23
I will try this if I can as I have a 464 setup - will get back to you
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: zhulien on 10:11, 08 June 23
On my 464 without dd1 but with m4, 6128 roms it locks up. Sorry i dont have a working dd1 interface currently but if my memory is working,  my friend used to use cpm plus on his 464 without issues... with 6128 rom and dd1.

On my 664 if I don't have a disc in drive a when I boot it locks up also, but with a disc it works fine.

I am wondering if it is trying to login the disc.  Maybe I will try on winape, but I am sure you have already?

I will do some more tests with different memory expansions to see if the behaviour changes. I have dktronics, xmem and now Gemini.
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: d_kef on 21:10, 08 June 23
Quote from: zhulien on 10:11, 08 June 23On my 464 without dd1 but with m4, 6128 roms it locks up. Sorry i dont have a working dd1 interface currently but if my memory is working,  my friend used to use cpm plus on his 464 without issues... with 6128 rom and dd1.

On my 664 if I don't have a disc in drive a when I boot it locks up also, but with a disc it works fine.

I am wondering if it is trying to login the disc.  Maybe I will try on winape, but I am sure you have already?

I will do some more tests with different memory expansions to see if the behaviour changes. I have dktronics, xmem and now Gemini.
Thanks for the feedback.
So without a DDI-1 it is impossible to test it on a 464.
I can't even try the USIFAC's FDC emulation because my 464 aparently doesn't like the USIFAC.

Of course I tried it with WinAPE and CPCEMU  and it works great even with the 464 ROMs.

I think I have to try and find some other way to debug HDCPM.

d_kef
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: poulette73 on 06:31, 09 June 23
I also tried on my side to test things since few days, to try to help you.

Quote from: d_kef on 21:10, 08 June 23I can't even try the USIFAC's FDC emulation because my 464 aparently doesn't like the USIFAC.
I also tried this solution with USIfAC II and Dragonbreed patched CP/M on USB mass storage, with FDC emulation.
The CP/M loading is ok, but once the CP/M screen is displayed, the program searches for a floppy disk in drive A.


I don't have a CPC 464, but I also tried a solution to transform my CPC 6128 into a CPC 464, which I sometimes use for other tests and it works fine.
For this, I use on my Mother X4 :

Then I launch the first game of this compilation, and I perform a reset with CONTROL+SHIFT+ESC.
At startup I am exactly like with a CPC 464 : 64k memory, lower OS ROM v1, upper Basic v1.0 ROM, QWERTY keyboard, and no upper Amsdos ROM (so the commands like |DISC, |DIR, |ERA, |CPM, |A, |B do not exist, only |CAT, |TAPE and RUN" are avaiable).
(https://cpcrulez.fr/im4/2/poulette73-46410.jpg)

And to confirm that I'm in a real CPC 464 mode, I use the original tape game Marmelade from MBC Informatique (https://www.cpc-power.com/index.php?page=detail&onglet=dumps&num=1359), which I run with a MaxDuino interface and the CDT image.
This game has many protections, and it checks the presence of Basic v1.1, the presence of internal FDC and external FDC with DDI-1 interface, and it stops as soon as it detects one of these elements.

QuoteThe protection was designed by Frédéric SOL, an engineer from Esat Software, known for his Machiavellian protections.
He is also the illustrious author of the Amiga and Atari ST copier called Discoscopie (I have it in original), and he too is badly protected against copying, that's the mark of the character.
Anyway....Not only does the loader use at least 3 protections, with the following messages: "1987 F.Sol - All rights reserved"

- 1st post: "Please wait. "The program is loading"

* 1st anticopy test: "Please unplug your Multiface"

* 2nd anticopy test if basic v1.1 is detected: "This cassette version will not work on a CPC 664 or 6128. Use the floppy version."

* 3rd anticopy test: "Please turn off your floppy disk drive." Appears if the FDC hardware test is positive... No 464 + floppy drive hehehe!

When everything is good and the loader has been loaded, the message "Code Loaded" appears.
* 4th anticopy test: Then, a key coded on 1 byte and with a value of &80 is read just before the big block of 64 kB, which does not use any CRC, does not tolerate any error, any cut during the loading.

* 5th anticopy test: Data processing is monitored, if it is cut, the game detects it, and freezes or resets as desired.
USIfAC II's FDC emulation fools all the tests and the CDT game starts ! (without USIfAC II, the game detects the internal presence of my 6128 FDC... and it stops)
So I'm exactly in a CPC 464 configuration without DDI-1.

But for now, I still can't get Dragonbreed patched CP/M to work.
I launch it with RUN"CPM+.BAS" (or RUN"DISC.BIN") from the USIfAC II, the CP/M Plus black and white screen appears, but then it tries to continue to the internal drive.
And if I cancel then I get the error : "CP/M Error on A: Disk I/O BDOS Function 15 File = PROFILE.SUB"
If I can help on other tests do not hesitate or in PM if you prefer.

Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: zhulien on 07:28, 09 June 23
Ah that could be the cause.  Disassemble it and look for profile.sub.  comment out the code that opens and processes profile.sub. (put a ret in there somewhere)

That is the first thing I would do.  If that is the cause maybe it requires further checks or patches... to not lock up.
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: d_kef on 22:25, 09 June 23
Thanks for your help guys!!!

I can also confirm that upon loading, the .EMS file is polling the status of the FDC until it is ready. I tested that with my Plus after pulling out the FDC. That's why the CPC freezes when the FDC is absent. This happens in a few places in the code that initializes the floppy drive before even loading the profile.sub.

I think that I can tweak the patcher routines of HDCPM so that if there is no FDC the floppy disk driver will be completely disabled.

Thanks again for your valuable information.

d_kef
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: GUNHED on 13:36, 13 June 23
CP/M Plus also senses if there are one or two floppies. If it finds only one drive then the 2nd drive gets emulated by drive A. So be careful!  :)  
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: d_kef on 15:47, 13 June 23
I know. I was thinking of reading the status register of the FDC and if &ff is returned then the FDC chip is completely missing. So no floppy drives whatsoever and the code that copes with floppy drives can be patched.
I've tried this approach with my Plus and I was able to run HDCPM and boot CP/M Plus with only "hard disks".
I also patched zhulien's disc.bin and my 464 happily booted CP/M Plus without having a DDI-1 attached for the first time!
So now I know that my 464 with revaldinho's universal RAM card in Dk'tronics &C3 mode can run CP/M Plus.
Next I need to find out why the hell HDCPM refuses to cooperate!  :'(

d_kef
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: d_kef on 21:59, 22 June 23
OK. So the problem with HDCPM was the way the boot loader was moving the CP/M patcher code to RAM page 7 (RAM mode &C1).
It seems that when the upper ROM is paged in and RAM mode &C1 is in context then writes to page 7 are failing with corrupted data.
I don't know if this is something known for CPC 464 RAM expansions?

Anyway after rewriting and optimizing parts of the boot loader I'm happy to say that HDCPM can now boot CP/M Plus on my 464.
So here is the test release v1.c7 for anyone who wants to try it.
I tried it with M4, Albireo and USIfAC II (I was surprised to find out that my USIfAC II works just fine when the M4 is also plugged-in working as a ROM board!)
My Cyboard is not working with this configuration but I suspect it's a voltage issue.
The Universal 512K RAM card was tested successfully in both Dk'tronics &C3 and full shadow modes.
Also the 464 booted fine with the 464 OS and Basic ROMs and no AMSDOS ROM or DDI-1 connected! The only minor problem with the 464 ROMs is that when you return to Basic with the AMSDOS.COM command the 464 freezes because the OS ROM can't handle the RAM paging mechanism.
With the 6128 ROMs everything works like in the 6128.

Any kind of feedback and especially tests with SF2/X-Mass, SF3 would be much appreciated!

d_kef
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: pjrodriguez on 16:12, 18 July 23
Hello, I have an Ulifac board and I'm trying to set CP/M to work with it. The easy way seems to use the .img files from the first post but if I run the HDCPM.BIN file I get a message saying that CPMDSK01.IMG is fragmented. Is there a way to defragment it?
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: d_kef on 18:41, 18 July 23
Quote from: Pedro José Rodríguez on 16:12, 18 July 23Hello, I have an Ulifac board and I'm trying to set CP/M to work with it. The easy way seems to use the .img files from the first post but if I run the HDCPM.BIN file I get a message saying that CPMDSK01.IMG is fragmented. Is there a way to defragment it?
You can't do it with your CPC. You have to plug your USB stick to a modern computer and then you have 2 options:
1. Copy the contents of your USB stick to your computer's hard disk, format the USB stick and then copy back first the .img file(s) and then everything else.
2. Use some kind of defrag software, like "disk optimizer" or "defraggler" etc.

d_kef
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: pjrodriguez on 08:39, 19 July 23
That was easy! HDCPM is working great in my Ulifac with two hard drives, one floppy drive and even an 444k M: drive. Thank you!
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: d_kef on 19:04, 21 August 23
For those who want easy file transfers between their (HD)CP/M image files and their PCs, Uwe Merker (https://github.com/ProgrammingHobby) created CP/M Image File Explorer. (https://github.com/ProgrammingHobby/CPM_Image-File_Explorer)
It is based on the source code of Michael Haardt's CP/M tools, version 2.23 (http://www.moria.de/~michael/cpmtools/)
The main difference is that CIFE is a GUI application. So it is much more user friendly.
There are executables for Windows and Linux 32/64bit. You need to copy the executable together with "diskdefs" in the same folder and run it.
Don't forget to add the HDCPM definition record in the "diskdefs" file:

diskdef hdcpm
  seclen 512
  tracks 65
  sectrk 256
  blocksize 8192
  maxdir 1024
  skew 0
  boottrk 1
  os 3
end



CIFE_Linux.jpg

d_kef
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: poulette73 on 23:02, 21 August 23
Thanks for sharing this tool, very useful with HDCPM disk images !
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: poulette73 on 12:52, 22 August 23
Another example with 4 virtual disk images of 8MB each.
Tested with M4 Board and RSF3 (new version of Symbiface III).

This is really awesome app ! 👍

(https://cpcrulez.fr/im4/7/poulette73-img0189.jpg)
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: d_kef on 17:37, 16 September 23
I've just released the new HDCPM v1.10

The new version supports also booting on a CPC464 equipped with a &C3 mode compatible RAM expansion card and on a CPC/Plus that has a faulty or no Floppy Disk Controller present.
Parts of the main ROM code had to be re-written and a couple of bugs were fixed.

Tests with all of my mass storage interfaces were successful, but you can always let me know of any problems you encounter and I'll do my best to fix them, although if they involve a 464, they might take some time to solve as my good old 464 kicked the bucket. But that's for another thread.

You can download the new .dsk file at the HDCPM's wiki page. (https://www.cpcwiki.eu/index.php/HDCPM)
If you are new to it please take some time to read the instructions.
If you are using any of the test versions, 1.a7, 1.b7, 1.c7, please upgrade to the new stable and fully tested version.

A big thanks to @revaldinho, @Devlin and @zhulien for their help and debugging.

d_kef
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: poulette73 on 18:46, 16 September 23
Updated to v1.10.
I confirm that it works correctly with the M4 Board and the RSF3.

Nice job !
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: zhulien on 09:55, 22 September 23
Sorry for delay, it works for me with dktronics as well as xmem
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: zhulien on 10:03, 22 September 23
I had a thought about breaking the 8mb barrier. What if... you had as big a chunk as you needed, but you implement a cd command to change directories, but what it does is change which 8gb hardfile is used. This will keep fcb happy. Given cpc cpm doesn't multi-task with different folders.

Possibly existing commands never need changing. Even nsweep to copy from a to b just change different directories within different drives thst all share the same root.

Make a new did command that lists directories only, these can even be maintained within a file

Cd to change directories actually changes which file is mounted in the drive

Maybe only allow 1 level of directories to simplify it so you never need to track parent
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: poulette73 on 10:21, 22 September 23
Instead of constantly suggesting lots of ideas... and lots of dreams... , always asking almost everywhere in all the cpcwiki topics, why don't you develop it yourself, and share it to the community? 🙄
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: d_kef on 23:55, 22 September 23
Quote from: zhulien on 10:03, 22 September 23I had a thought about breaking the 8mb barrier. What if... you had as big a chunk as you needed, but you implement a cd command to change directories, but what it does is change which 8gb hardfile is used. This will keep fcb happy. Given cpc cpm doesn't multi-task with different folders.

Possibly existing commands never need changing. Even nsweep to copy from a to b just change different directories within different drives thst all share the same root.

Make a new did command that lists directories only, these can even be maintained within a file

Cd to change directories actually changes which file is mounted in the drive

Maybe only allow 1 level of directories to simplify it so you never need to track parent

In fact I do have a "mount" command in my todo list since one of your previous posts, but I'm going at my own pace here.
So I won't give any promises but at some point I might give it a try. 
Anyway, I still think that 32MB of CP/M apps and data is enough for everyone.

d_kef
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: zhulien on 06:14, 23 September 23
Quote from: poulette73 on 10:21, 22 September 23Instead of constantly suggesting lots of ideas... and lots of dreams... , always asking almost everywhere in all the cpcwiki topics, why don't you develop it yourself, and share it to the community? 🙄
I do for projects I am working on, so you dont like feature suggestions in others products? Bad luck for you.

I use their products as those others did a great job.
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: poulette73 on 07:01, 23 September 23
Quote from: zhulien on 06:14, 23 September 23so you dont like feature suggestions in others products?
I use their products as those others did a great job.
Of course I use their product too. This is off-topic.
And I allow myself each time to congratulate the quality of the work provided by all these software and hardware creators, the usefulness, and the sharing with the community.

Look at your interventions: https://www.cpcwiki.eu/forum/profile/?area=showposts;u=58

It doesn't help to be constantly criticizing, and claiming:
- unachievable things.
- impossible to implement.
- require months of development.
- absolutely no one will never use.
- or even completely useless (example here with HDCPM having disks of more than 8 MB... What for? With the 4 disks of 8 MB provided by d_kef, therefore with 32 MB of storage : it is impossible to fill them with all the CP/M content existing in software since the existence of CP/M on CPC...).

Today everything already exists in terms of great interfaces (memory, storage, network, sound, communication, and so on). But there is a big lack of developments to exploit them.

There are 4 MB memory extensions whose capacity is not even used because nothing exists for them. And you asking for memory expansion up to 16 MB or more?
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: zhulien on 07:18, 23 September 23
Quote from: poulette73 on 07:01, 23 September 23
Quote from: zhulien on 06:14, 23 September 23so you dont like feature suggestions in others products?
I use their products as those others did a great job.
Of course I use their product too. This is off-topic.
And I allow myself each time to congratulate the quality of the work provided by all these software and hardware creators, the usefulness, and the sharing with the community.
Look at your interventions:

 https://www.cpcwiki.eu/forum/profile/?area=showposts;u=58

It doesn't help to be constantly criticizing, and claiming:
- unachievable things.
- impossible to implement.
- require months of development.
- absolutely no one will never use.
- or even completely useless (example here with HDCPM having disks of more than 8 MB... What for? With the 4 disks of 8 MB provided by d_kef, therefore with 32 MB of storage : it is impossible to fill them with all the CP/M content existing in software since the existence of CP/M on CPC...).
Today everything already exists in terms of great interfaces (memory, storage, network, sound, communication, and so on). But there is a big lack of developments to exploit them.
There are 4 MB memory extensions whose capacity is not even used because nothing exists for them. And you asking for memory expansion up to 16 MB or more?
I have no need for cpm for more that much storage but... if ibhad directories in cpm that will make it 200% more usable.  The 8mb is a technical issue of cpm and given they are hardfiles in d_kef's implementation it makes it a quite easy solution vs any other solution to have directories.

I don't think I have criticized anything, when?

I have never suggested anything that is impossible.

Some things do require months to develop,  have you never developed anything?

I develop tools mostly, if you don't like to use tool fair enough.  I not sure why people don't want to do certain things on cpc, do you? 

I'm not a hardware person but I do know a tiny bit from uni days.  The cpc community has created some awesome hardware and I try to make tools or experiments with them some which I finish some wip and some seems nobody cares about too. Do I care if you don't like multiple screens on cpc now with the addition of your m4 card?  I don't, but the facility is there and no other developers wanted to utilize it. So be it.

Did you ever use my discology ROMs or CPM ROMs? Here almost ever cpc user was using them. Now we are very few and m4 and xmass with d_kef cpm has removed the need for the cpm ROMs.

Do you want multiprocessing in your cpc? I do and it works so far. 

I also want my compilers to now generate binaries not just z80 source code because I cannot find an assembler that does what I need it to do... so a bit more work on those.

Seems nobody in cpc land like to agree on anything, not standards, not anything at all so everyone has their own solutions that are all incompatible with eachother.  Alternate DOS are examples... thank God for unidos. 

Nobody seems to want to make online games for cpc (incoded backend POCs for anyone to use), nobody cares about the lobby and messaging facilities that are there for in-game for example...and achievements.  Nobodybcares about browsing on cpc even if specific cpc sites... all of which is there for the masses. As the saying goes, you can lead the horse to water...

As for a cpc using a vga monitor I need that because the one monitor I do have is not where I live.  If I could make a vga card myself, I would. Didn't I say I am a software person?
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: poulette73 on 08:09, 23 September 23
Quote from: zhulien on 07:18, 23 September 23Some things do require months to develop,  have you never developed anything?

You don't know me... 40 years that I set foot in computing, including 28 years professionally as an IT and systems engineer...decades of development in different languages & operating systems...in large corporate projects. But it's not a contest for whoever has the biggest, and it's completely off-topic to judge.

The difference is that I don't live in a dream, and I don't ask others for what I am not capable of doing myself.

Now I'm passing my turn...
I prefer to spend my time on concrete things.
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: zhulien on 09:55, 23 September 23
Quote from: poulette73 on 08:09, 23 September 23
Quote from: zhulien on 07:18, 23 September 23Some things do require months to develop,  have you never developed anything?

The difference is that I don't live in a dream, and I don't ask others for what I am not capable of doing myself.

The reason I do is because it lets others know there is a market for at least 1 person and I actually buy hardware and software for my CPC to support them.  Nobody is forced to, but if nobody produces anything I (and others) won't buy it.

Sounds like we both have similar background.  None are dreams here, they are actually being worked on and if you have been following my posts, you may have even tried some things.  Let me see, maybe someone wants to form a development group with me?  (seems nobody is in Australia that wants to to my knowledge...).

Off Topic in the cpm thread...  so I will post a new thread for that and if you want to complain there about the projects I have completed, partically completed or have planned - you can do so there ;)
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: Mark_wllms on 11:17, 01 October 23
Going back to the discussion around directories in CP/M, this is possible already, by installing Z3Plus (https://gryzor.info/index.php/Z-System)
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: poulette73 on 11:38, 01 October 23
Have you implemented it specifically with HDCPM, and validated how it works ?

Can you give us a demo with HDCPM ?
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: d_kef on 14:27, 01 October 23
Quote from: poulette73 on 11:38, 01 October 23Have you implemented it specifically with HDCPM, and validated how it works ?

Can you give us a demo with HDCPM ?
In fact there is a readily available disk image in the HDCPM wiki page that boots directly to Z-System.

Furthermore, Z-System (Z3Plus or ZCPR3) just assigns names to drive/user combinations. So you can refer to them by a 'directory' name.
So there are always 16 'directories' per disk.
For example, if you have stored your basic programs in drive D: , user 3, you can assign directory name 'BASIC' to it.
Next, when you want to change to that 'directory' you can enter 'BASIC:' instead of 'D3:'
If you want to run 'MYPROG.COM', which is saved in D3: you can enter 'BASIC:MYPROG' instead of 'D3:' and then 'MYPROG'.
Of course you need also Z-System compatible apps and tools in order to take full advantage of the directory naming. For example, the standard 'PIP.COM" will produce an error if you enter 'PIP TEMP:=BASIC:MYPROG.COM'

You can find everything Z-System (Z3Plus , ZCPR3) related if you google around.

d_kef
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: pollito on 21:42, 02 January 24
First of all, @d_kef many many thanks for all your hard work on HDCPM, and of course to everyone else who contributed. It is greatly appreciated.

I'm trying to get the latest version working on my CPC 464 with an M4 board, a Revaldinho Universal 512K RAM Expansion board, but no FDI-1/DDI-1. I've tried it with the RAM in DK'Tronics/SymbOS mode, in FutureOS mode, and in Full Shadow mode, but whenever I type |HDCPM or |HDCPMT I get:

This program will not run in this
environment. Press any key


I think it may have something to do with my ROM configuration. The (relevant ROMs) I have configured are as follows:

SLOT / ROM

0 / BASIC v1.1
2 / HDCPM
7 / M4
8 / AMSDOS 0.5
31 / OS6128v1.1

There are other ROMs installed such as SymbOS, RulezCharge and Jetset Willy 2, but I don't believe this should affect HDCPM. I have also tried with and without AMSDOS but I always get the same message.

If anyone has any ideas I would be very grateful!
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: HAL6128 on 22:29, 02 January 24
could you set Amsdos to rom slot 7 and M4 to 6?
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: d_kef on 22:53, 02 January 24
...and disable the SymbOS ROMs.
I know it doesn't make sense but CP/M Plus doesn't like the SymbOS ROMs for some reason. You can run SymbOS directly from your M4's SD card  anyway.


d_kef 
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: pollito on 23:56, 02 January 24
Thanks both for your advice. Unfortunately, the issue persists.

These are now the only ROMs installed:

SLOT / ROM

0 / BASIC v1.1
1 / HDCPM
6 / M4
7 / AMSDOS 0.5
31 / OS6128v1.1

The HDCPM ROM I am using is from Hdcpm110.dsk (https://www.cpcwiki.eu/imgs/c/cc/Hdcpm110.dsk) downloaded from the HDCPM page (https://www.cpcwiki.eu/index.php/HDCPM), with the CP/M disk images (https://www.cpcwiki.eu/imgs/4/4a/CPMDSK01%2602.zip) from the Other downloads section on that page.

Any other ideas?
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: d_kef on 00:14, 03 January 24
You can try the Dk'tronics patched CPM3SEMI.EMS. Use the HDMGR.COM utility to make your CP/M image bootable with it.
It doesn't check for compatible ROMs.

d_kef
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: pollito on 21:24, 03 January 24
Thanks for the suggestion, but don't I need a working CP/M Plus environment in order to run the HDMGR.COM program?

It's not possible to start CP/M with |CPM on a 464 with an M4 but no disk interface - it just gives a red screen with a blue border. I think it's because AMSDOS.ROM is trying to access hardware that doesn't exist.
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: d_kef on 22:57, 03 January 24
Quote from: pollito on 21:24, 03 January 24Thanks for the suggestion, but don't I need a working CP/M Plus environment in order to run the HDMGR.COM program?

It's not possible to start CP/M with |CPM on a 464 with an M4 but no disk interface - it just gives a red screen with a blue border. I think it's because AMSDOS.ROM is trying to access hardware that doesn't exist.
True! My bad  :picard:
I'm attaching a CP/M disk image ready to use.
You can also use the Z3Plus disk image from the HDCPM wiki page.

d_kef

CPMDSK01.zip
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: pollito on 23:37, 03 January 24
@d_kef you are an absolute legend! Thank you so much!

I managed to compile CP/M Image File Explorer for FreeBSD, and then to get CPM3SEMI.EMS onto CPMDSK01.IMG, but I then got stuck trying to work out how to configure WinAPE to accept the CPMDSK01.IMG!

I will also check out the Z3PLUS image when I have chance.

Thanks again! :D
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: d_kef on 23:59, 03 January 24
Quote from: pollito on 23:37, 03 January 24but I then got stuck trying to work out how to configure WinAPE to accept the CPMDSK01.IMG!
An .img file is a raw disk image. So you just have to select it as an IDE file  ;)
Then HDCPM will 'think' it's a physical CP/M formatted disk.

d_kef
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: pollito on 08:02, 06 January 24
Quote from: d_kef on 23:59, 03 January 24
Quote from: pollito on 23:37, 03 January 24but I then got stuck trying to work out how to configure WinAPE to accept the CPMDSK01.IMG!
An .img file is a raw disk image. So you just have to select it as an IDE file  ;)
Then HDCPM will 'think' it's a physical CP/M formatted disk.

d_kef
Thanks for this. I have been playing around with HDCPM in WinAPE now as well as on my CPC, and I have noticed a couple of things:

First of all, on the real CPC, with the RAM board in dk'tronics mode, CP/M gives me a 444K RAM drive. This kind of makes sense because 64K + 512K is 576K, minus the 128K that CP/M uses = 448K (not sure where the other 4K went but never mind  :laugh: ). But in C3 / full shadow mode, the RAM drive is only 254K. This is odd because 512K - 128K = 384K which is way off 254K. Any idea why this would be? It's not a big deal, I am just curious.  :)

Another thing I noticed is that LOGO3.COM on my CPC shows the loading screen, and then returns me to the C> prompt. I tried to reproduce this in WinAPE by setting up a virtual CPC 464 with the HDCPM ROM and the same disk image, but it works fine. The only thing I can think of is that WinAPE emulates a floppy drive (and I can find no way of turning it off), so maybe Logo is checking for the existence of a floppy drive. I thought it was worth pointing out to other users that some CP/M programs may not work without a floppy drive present.

I'm really happy because I can finally use BBC BASIC (https://www.bbcbasic.co.uk/bbcbasic/amstrad.zip) on my CPC!
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: d_kef on 12:22, 06 January 24
Quote from: pollito on 08:02, 06 January 24First of all, on the real CPC, with the RAM board in dk'tronics mode, CP/M gives me a 444K RAM drive. This kind of makes sense because 64K + 512K is 576K, minus the 128K that CP/M uses = 448K (not sure where the other 4K went but never mind  :laugh: ). But in C3 / full shadow mode, the RAM drive is only 254K. This is odd because 512K - 128K = 384K which is way off 254K. Any idea why this would be? It's not a big deal, I am just curious.  :)
That's a Dk'tronics RAM driver 'thing'. During the RAM Drive initialization it searches for either a 256K Silicon Disk (https://www.cpcwiki.eu/imgs/a/a7/256kSiliconTop.jpg) or a 256K Silicon Disk + a 256K RAM (https://www.cpcwiki.eu/imgs/2/29/TriplePacks.jpg).
So if 512K total expansion RAM is detected it reports a 444K RAM drive + 4K directory =448K. If less than 512K total expansion RAM is detected (the case of full shadow mode) then it reports (and initializes) only what appears to be a 256K Silicon Disk. That is 254K RAM drive + 2K directory = 256K.
There is another possibility: 256K RAM only that gives a RAM drive of 190K
In all combinations the first 64K bank of expanded RAM is used by CP/M as main banked memory.

Quote from: pollito on 08:02, 06 January 24Another thing I noticed is that LOGO3.COM (https://www.cpcwiki.eu/forum///logo3.com) on my CPC shows the loading screen, and then returns me to the C> prompt. I tried to reproduce this in WinAPE by setting up a virtual CPC 464 with the HDCPM ROM and the same disk image, but it works fine.
I never tried LOGO3 with a 464 but now I'm curious...

d_kef
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: HAL6128 on 20:24, 06 January 24
working with Amstrads Logo3 always needs a floppy inserted during booting. (working with a X-Mass with 4 cpm partitions) and booting cpm from an albireo (unidos)  and cpc6128 + 512 ram expansion). I was never able to boot it from harddrive without a disc.
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: pollito on 15:10, 23 January 24
@HAL6128 thank you for confirming this. I'm glad it's not just me!  ;D

Not sure if people are aware but MockbaTheBorg, the creator of RunCPM (https://github.com/MockbaTheBorg/RunCPM), has shared his huge CP/M collection here (https://drive.google.com/drive/folders/11WIu8rD_7pIDaET7dqTeA73CvX0jkxz2?usp=sharing). The folder structure is organised for the layout that RunCPM requires, but I've been having fun diving in, and playing around with some of the software on my CPC.
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: HAL6128 on 22:14, 23 January 24
Nice!!!
Thanks for the link. It's a very huge repository for CPM stuff. I also found the "Colossal Cave Adventure" :)
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: d_kef on 20:22, 24 January 24
Quote from: pollito on 15:10, 23 January 24MockbaTheBorg, the creator of RunCPM (https://github.com/MockbaTheBorg/RunCPM), has shared his huge CP/M collection here (https://drive.google.com/drive/folders/11WIu8rD_7pIDaET7dqTeA73CvX0jkxz2?usp=sharing).
That could certainly make the new feature of the next HDCPM release look more useful!!!

mount (4).gif

d_kef
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: zhulien on 13:27, 28 January 24
Quote from: pollito on 15:10, 23 January 24@HAL6128 thank you for confirming this. I'm glad it's not just me!  ;D

Not sure if people are aware but MockbaTheBorg, the creator of RunCPM (https://github.com/MockbaTheBorg/RunCPM), has shared his huge CP/M collection here (https://drive.google.com/drive/folders/11WIu8rD_7pIDaET7dqTeA73CvX0jkxz2?usp=sharing). The folder structure is organised for the layout that RunCPM requires, but I've been having fun diving in, and playing around with some of the software on my CPC.
Likewise If you conver the microbee disk images there is likely some good stuff for your cpc here

https://mame.spludlow.co.uk/SoftwareLists.aspx?List=mbee_flop&Exact=true&Page=2
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: pollito on 18:04, 20 February 24
Just giving an update to report my latest experience on a 464 with an M4 card, 512K RAM expansion, and no FDI-1/DDI-1.

With the M4 ROM moved to slot 6, and the AMSDOS ROM in slot 7, I had a lot of problems with games either crashing on load, or showing strange behaviour. As soon as I removed the AMSDOS ROM and put the M4 ROM back into slot 7, the problem disappeared.

However, HDCPM works fine without the AMSDOS ROM. Even better, having the SymbOS ROMs installed is also fine. Both OSes run perfectly.


This is the ROM layout I'm using:

0  Basic v1.1
1  HDCPM
2  SymbOS A
7  M4
28 SymbOS B
29 SymbOS C
30 SymbOS D
31 OS6128v1.1


CP/M Image File Explorer works fine on FreeBSD 14-RELEASE (amd64) running under XFCE so I'm really happy about that too!
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: cpcoldie on 01:13, 16 March 24
Hello Fellows!

@ first this is a very impressive work!
Thank you d_kef (https://www.cpcwiki.eu/forum/profile/?u=4731) !!

But I have some problems with the uIDE interface and hdcpm.
I partitioned a DiskOnModule 128MB with 4 8MB partitions.
Then I formated the partitions with HDMGR.COM aso.
Finally the CPC128 boots with the uIDE and the C: Prompt appears (uide_hdcpm-5.jpg).
But as you can see, there is obvious no directory.
I add further pics of the HDMGR outputs.
What I'm doing wrong?
 
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: d_kef on 13:12, 16 March 24
Quote from: cpcoldie on 01:13, 16 March 24Hello Fellows!

@ first this is a very impressive work!
Thank you d_kef (https://www.cpcwiki.eu/forum/profile/?u=4731) !!

But I have some problems with the uIDE interface and hdcpm.
I partitioned a DiskOnModule 128MB with 4 8MB partitions.
Then I formated the partitions with HDMGR.COM aso.
Finally the CPC128 boots with the uIDE and the C: Prompt appears (uide_hdcpm-5.jpg).
But as you can see, there is obvious no directory.
I add further pics of the HDMGR outputs.
What I'm doing wrong?
 

I think this is the first ever real uIDE installation (at least that I'm aware of).
It seems that you did everything by the book, but I'll ask anyway are you using the latest HDCPM v1.10?
I remember that some early version had a problem with uIDE.
From the last picture I  see that CP/M is coming up normally. That's been done by the ROM.
Next the system is searching for the PROFILE.SUB and it seems to get an I/O error. That's been done by the HDCPM hard disk driver.
All following commands are giving I/O errors instead of "file not found"
So in my opinion either there's a bug in my driver or the DOM is faulty.
I'm going to examine my code again and see if I can find anything but uIDE and SF2 HDCPM drivers are identical (except for the base IO address) and SF2 driver has been reported to work fine with many different compatible interfaces.
It will take some time before I can do that. In the meantime if you have a spare DOM maybe you can try with it.

d_kef
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: cpcoldie on 13:56, 16 March 24
Hello d_kef,

I tried 2 versions.
First
  hdcpm110.dsk (https://www.cpcwiki.eu/imgs/c/cc/Hdcpm110.dsk)
then
  hdcpm106.dsk (https://www.cpcwiki.eu/imgs/b/b1/Hdcpm106.dsk)
both with the same result.

  And for clearness, I used in this case not the rom-version due to the lack of a rom box.
Maybe this is the issue.
And I have a M4 board with the HDCPM ROM which works as expected (whithout uIDE).
Maybe I miscalculated the size of the partitions.

Cheers
  cpcoldie
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: d_kef on 14:32, 16 March 24
Quote from: cpcoldie on 13:56, 16 March 24Hello d_kef,

I tried 2 versions.
First
  hdcpm110.dsk (https://www.cpcwiki.eu/imgs/c/cc/Hdcpm110.dsk)
then
  hdcpm106.dsk (https://www.cpcwiki.eu/imgs/b/b1/Hdcpm106.dsk)
both with the same result.

  And for clearness, I used in this case not the rom-version due to the lack of a rom box.
Maybe this is the issue.
And I have a M4 board with the HDCPM ROM which works as expected (whithout uIDE).
Maybe I miscalculated the size of the partitions.

Cheers
  cpcoldie

There is no difference between ROM and BIN. Both share the same routines.
The size of your partitions seems just fine. But you could try to make them a bit bigger.

d_kef
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: cpcoldie on 14:33, 16 March 24
(https://www.cpcwiki.eu/forum/index.php?action=dlattach;attach=41731;image) (https://www.cpcwiki.eu/forum/dlattach/?attach=41730;image)
(https://www.cpcwiki.eu/forum/Themes/default/images/icons/clip.png)  (https://www.cpcwiki.eu/forum/dlattach/?attach=41730)


BTW, what does this message mean?
And why is this a warning?
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: d_kef on 14:43, 16 March 24
Quote from: cpcoldie on 14:33, 16 March 24(https://www.cpcwiki.eu/forum/index.php?action=dlattach;attach=41731;image) (https://www.cpcwiki.eu/forum/dlattach/?attach=41730;image)
(https://www.cpcwiki.eu/forum/Themes/default/images/icons/clip.png)  (https://www.cpcwiki.eu/forum/dlattach/?attach=41730)


BTW, what does this message mean?
And why is this a warning?

It means that you asked for image file information (option 3.) but you use real partitions. There is no possibility for virtual/image file disks.
That's only a warning because it is not something critical. It's rather a reminder of your chosen configuration.

d_kef
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: cpcoldie on 14:52, 16 March 24
Quote from: d_kef on 14:32, 16 March 24And do have a ROM board. It's called M4  ;)
Can you disconnect the M4 and run HDCPM.BIN from floppy?
I want to rule out the possibility of my code getting confused by the 2 interfaces, although that shouldn't be possible.
No, the M4 board is disconnected and I run the HDCPM.BIN from floppy. As mentioned.
And the M4 is not a real rom box as you should know. ;)

BTW: when I try to list the directory with cpmtools of your provided images i get some junk (with your suggested diskdefs):

cpmls -f hdcpm -l -T raw  CPMDSK01.IMG

0:
-r-x------140216563771608 Jan 09 12:41
-r-x------140216563771608 Jan 09 12:41
-r-x------140216563771608 Jan 09 12:41
-r-x------140216563771608 Jan 09 12:41
-r-x------140216563771608 Jan 09 12:41
...
1:
-r-x------140216563771608 Jan 09 12:41
-r-x------140216563771608 Jan 09 12:41
-r-x------140216563771608 Jan 09 12:41 .
-r-x------140216563771608 Jan 09 12:41 !.
-r-x------140216563771608 Jan 09 12:41
-r-x------140216563771608 Jan 09 12:41    >.gqa
-r-x------140216563771608 Jan 09 12:41 |=(?.m
-r-x------140216563771608 Jan 09 12:41 (
mz7@.3
-r-x------      0 Jan 09 12:41 .fmc
-r-x------      0 Jan 09 12:41 2m5m.o&
-r-x------      0 Jan 09 12:41 i!+c.{5
-r-x------      0 Jan 09 12:41 m

2:
-r-x------      0 Jan 09 12:41 .
-r-x------      0 Jan 09 12:41 .
-r-x------      0 Jan 09 12:41 aqa]aiee..
-r-x------      0 Jan 09 12:41 h
                                m".h
-r-x------      0 Jan 09 12:41 yk_cz.]*@
...
aso.

Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: cpcoldie on 15:30, 16 March 24
Now I tried a different DOM.
Same result.

My partitioning proceedure:
sfdisk /dev/sde

Disk /dev/sde: 125 MiB, 131072000 bytes, 256000 sectors
Disk model: DiskOnModule   
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x37173dbe

Old situation:

Device     Boot Start    End Sectors  Size Id Type
/dev/sde1  *        0 255999  256000  125M  e W95 FAT16 (LBA)

>>> 1, 16640
Created a new partition 1 of type 'Linux' and of size 8.1 MiB.
   /dev/sde1 :            1        16640 (8.1M) Linux
/dev/sde2: ,16640
Created a new partition 2 of type 'Linux' and of size 8.1 MiB.
   /dev/sde2 :        18432        35071 (8.1M) Linux
/dev/sde3: ,16640
Created a new partition 3 of type 'Linux' and of size 8.1 MiB.
   /dev/sde3 :        36864        53503 (8.1M) Linux
/dev/sde4: ,16640
Created a new partition 4 of type 'Linux' and of size 8.1 MiB.
   /dev/sde4 :        55296        71935 (8.1M) Linux
All partitions used.


The value 16640 comes from bytecount/sectsize = 8519680/512

Is this correct?
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: d_kef on 16:03, 16 March 24
Regarding cpmtools, I know for sure that the image files are good and I'm prety sure that the diskdefs entry is ok too.
Also your maths are good. That's the correct size for the partitions.
Anyway, I'll check everything again but I don't expect to be near my PC for the next few days as I'm a guest of the infamous Greek NHS.

d_kef
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: cpcoldie on 16:26, 16 March 24
Hi d_kef,

it's not a doomsday... ;) .

Enjoy the infamousness... ;D

Thanks for your help!

cpcoldie
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: cpcoldie on 21:43, 16 March 24
Very strange!

With this diskdefs the cpmtools work as expected (at least cpmls and fsck.cpm):

###############
# HDCPM Test
diskdef hdcpmtest1
  seclen 512
  tracks 65
  sectrk 256
  blocksize 8192
  maxdir 1024
  skew 0
  boottrk 5
  os 3                             
end

I found this out with the fsed.cpm.
It counts the tracks not in the way as from the track size expected.
It displays the right offset (131072 (0x00020000)) but jumps to some different location.
And at the directory start it shows:
                                                          Directory area

Byte  655360 (0x000a0000)  Sector  1 (physical  1)  Offset    0  Track    5

e5 e5 e5 e5 e5 e5 e5 e5  e5 e5 e5 e5 e5 e5 e5 e5  ................
e5 e5 e5 e5 e5 e5 e5 e5  e5 e5 e5 e5 e5 e5 e5 e5  ................
e5 e5 e5 e5 e5 e5 e5 e5  e5 e5 e5 e5 e5 e5 e5 e5  ................
e5 e5 e5 e5 e5 e5 e5 e5  e5 e5 e5 e5 e5 e5 e5 e5  ................
e5 e5 e5 e5 e5 e5 e5 e5  e5 e5 e5 e5 e5 e5 e5 e5  ................
e5 e5 e5 e5 e5 e5 e5 e5  e5 e5 e5 e5 e5 e5 e5 e5  ................
e5 e5 e5 e5 e5 e5 e5 e5  e5 e5 e5 e5 e5 e5 e5 e5  ................
e5 e5 e5 e5 e5 e5 e5 e5  e5 e5 e5 e5 e5 e5 e5 e5  ................

Entry  0: Free

Name: eeeeeeee Extension: eee
Extent: 1889 (low: 229, high: 229)
Last extent record count: 229
Last record byte count: 229
Data blocks: 58853 58853 58853 58853 58853 58853 58853 58853

Hmmmmm....
I would say this is a bug in cpmtools...
...but is this bug in amsdos cpm too?
Or is for sectrk just 1 byte reserved?
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: cpcoldie on 16:21, 19 March 24
Hi d_kef,

I,m a little bit confused.
Wherefrom come the addresses 0x1848,  0x182b, 0x1833, 0x1886 and 0x180d ?
Can't found any references about it.
I would have expected somewhere at 0x05ba, 0x05c5 and 0x061c .


Real_uIDE_Init:
    push de            ;064d
    ld de,CF_BASE        ;064e
    ld (01848h),de        ;0651
    ld de,CF_COMMAND        ;0655
    ld (0182bh),de        ;0658
    ld (01833h),de        ;065c
    ld (01868h),de        ;0660
    ld (01886h),de        ;0664
    ld de,CF_SECCOUNT        ;0668
    ld (0180dh),de        ;066b
    ld de,CF_BASE        ;066f
    ld (00632h),de        ;0672
    ld (00641h),de        ;0676
    ld de,CF_COMMAND        ;067a
    ld (005d7h),de        ;067d
    ld (005f5h),de        ;0681
    ld (005fdh),de        ;0685
    ld (00612h),de        ;0689
    ld de,CF_HEAD        ;068d
    ld (IDE_SetHeadTrkSecSecnt+1),de        ;0690
    pop de            ;0694
    ret            ;0695

Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: cpcoldie on 17:47, 19 March 24
@d_kef
I hope you are well and healthy!

Best wishes!
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: d_kef on 23:03, 21 March 24
Quote from: cpcoldie on 21:43, 16 March 24Very strange!

With this diskdefs the cpmtools work as expected (at least cpmls and fsck.cpm):

###############
# HDCPM Test
diskdef hdcpmtest1
  seclen 512
  tracks 65
  sectrk 256
  blocksize 8192
  maxdir 1024
  skew 0
  boottrk 5
  os 3                             
end

I found this out with the fsed.cpm.
It counts the tracks not in the way as from the track size expected.
It displays the right offset (131072 (0x00020000)) but jumps to some different location.
And at the directory start it shows:
                                                          Directory area

Byte  655360 (0x000a0000)  Sector  1 (physical  1)  Offset    0  Track    5

e5 e5 e5 e5 e5 e5 e5 e5  e5 e5 e5 e5 e5 e5 e5 e5  ................
e5 e5 e5 e5 e5 e5 e5 e5  e5 e5 e5 e5 e5 e5 e5 e5  ................
e5 e5 e5 e5 e5 e5 e5 e5  e5 e5 e5 e5 e5 e5 e5 e5  ................
e5 e5 e5 e5 e5 e5 e5 e5  e5 e5 e5 e5 e5 e5 e5 e5  ................
e5 e5 e5 e5 e5 e5 e5 e5  e5 e5 e5 e5 e5 e5 e5 e5  ................
e5 e5 e5 e5 e5 e5 e5 e5  e5 e5 e5 e5 e5 e5 e5 e5  ................
e5 e5 e5 e5 e5 e5 e5 e5  e5 e5 e5 e5 e5 e5 e5 e5  ................
e5 e5 e5 e5 e5 e5 e5 e5  e5 e5 e5 e5 e5 e5 e5 e5  ................

Entry  0: Free

Name: eeeeeeee Extension: eee
Extent: 1889 (low: 229, high: 229)
Last extent record count: 229
Last record byte count: 229
Data blocks: 58853 58853 58853 58853 58853 58853 58853 58853

Hmmmmm....
I would say this is a bug in cpmtools...
...but is this bug in amsdos cpm too?
Or is for sectrk just 1 byte reserved?
Just verified the diskdefs entry and the image files from the wiki page.

They are both OK, as expected.

The correct diskdefs record is (as found in the wiki page or by running |HDDEF with the HDCPM ROM installed):
      diskdef hdcpm
         seclen 512
         tracks 65
         sectrk 256
         blocksize 8192
         maxdir 1024
         skew 0
         boottrk 1
         os 3
      end

The output of the command "cpmls -f hdcpm -l CPMDSK01.IMG", when I run it on my PC, is:
0:
-rwxrwxrwx    1024 Jan 01 1970  amsdos.com
-rwxrwxrwx    8192 Jan 01 1970  asm.com
-rw-rw-rw-     256 Jan 01 1970  assign.sys
-rw-rw-rw-     896 Jan 01 1970  bankman.bas
-rw-rw-rw-    1536 Jan 01 1970  bankman.bin
-rw-rw-rw-   25600 Jan 01 1970  c10cpm3.ems
-rwxrwxrwx    2944 Jan 01 1970  date.com
-rw-rw-rw-   12416 Jan 01 1970  dd-dmp1.prl
-rw-rw-rw-   12288 Jan 01 1970  ddfxlr7.prl
-rw-rw-rw-   11008 Jan 01 1970  ddhp7470.prl
-rw-rw-rw-    3072 Jan 01 1970  ddmode0.prl
-rw-rw-rw-    3072 Jan 01 1970  ddmode1.prl
-rw-rw-rw-    3072 Jan 01 1970  ddmode2.prl
-rw-rw-rw-   12288 Jan 01 1970  ddshinwa.prl
-rwxrwxrwx    7424 Jan 01 1970  device.com
-rwxrwxrwx   14592 Jan 01 1970  dir.com
-rwxrwxrwx    6144 Jan 01 1970  disckit3.com
-rw-rw-rw-    1024 Jan 01 1970  drivers.gsx
-rwxrwxrwx    1024 Jan 01 1970  dump.com
-rwxrwxrwx    9344 Jan 01 1970  ed.com
-rwxrwxrwx    3712 Jan 01 1970  erase.com
-rwxrwxrwx   14848 Jan 01 1970  gencom.com
-rwxrwxrwx    1536 Jan 01 1970  gengraf.com
-rwxrwxrwx    6528 Jan 01 1970  get.com
-rw-rw-rw-    1408 Jan 01 1970  gsx.sys
-rwxrwxrwx    7168 Jan 01 1970  help.com
-rw-rw-rw-   76800 Jan 01 1970  help.hlp
-rwxrwxrwx    1152 Jan 01 1970  hexcom.com
-rw-rw-rw-    1280 Jan 01 1970  hist.utl
-rwxrwxrwx   32000 Jan 01 1970  initdir.com
-rw-rw-rw-     384 Jan 01 1970  keys.ccp
-rw-rw-rw-     256 Jan 01 1970  keys.drl
-rw-rw-rw-     384 Jan 01 1970  keys.wp
-rwxrwxrwx    1024 Jan 01 1970  language.com
-rwxrwxrwx    7168 Jan 01 1970  lib.com
-rwxrwxrwx   15744 Jan 01 1970  link.com
-rwxrwxrwx   49792 Jan 01 1970  logo3.com
-rw-rw-rw-     128 Jan 01 1970  logo3.sub
-rwxrwxrwx   11776 Jan 01 1970  mac.com
-rwxrwxrwx    1024 Jan 01 1970  palette.com
-rwxrwxrwx    2560 Jan 01 1970  patch.com
-rwxrwxrwx    8704 Jan 01 1970  pip.com
-rw-rw-rw-     128 Jan 01 1970  profile.eng
-rwxrwxrwx    7040 Jan 01 1970  put.com
-rwxrwxrwx    2944 Jan 01 1970  rename.com
-rwxrwxrwx   13568 Jan 01 1970  rmac.com
-rwxrwxrwx    1792 Jan 01 1970  save.com
-rwxrwxrwx   10368 Jan 01 1970  set.com
-rwxrwxrwx    1024 Jan 01 1970  set24x80.com
-rwxrwxrwx    4096 Jan 01 1970  setdef.com
-rwxrwxrwx    2048 Jan 01 1970  setkeys.com
-rwxrwxrwx    2048 Jan 01 1970  setlst.com
-rwxrwxrwx    2048 Jan 01 1970  setsio.com
-rwxrwxrwx    8448 Jan 01 1970  show.com
-rwxrwxrwx    8064 Jan 01 1970  sid.com
-rwxrwxrwx    5376 Jan 01 1970  submit.com
-rw-rw-rw-    1280 Jan 01 1970  trace.utl
-rwxrwxrwx    3072 Jan 01 1970  type.com
-rwxrwxrwx   15488 Jan 01 1970  xref.com

fsed.cpm output:
                                                                                  System area

Byte        0 (0x00000000)  Physical sector   1  Offset     0  Track     0

18 28 00 43 50 2f 4d 20  43 50 43 00 02 10 00 04  .(.CP/M CPC.....
06 3f 03 ff 03 ff 03 f0  00 00 80 01 00 02 03 33  .?.............3
3f 01 43 41 42 43 44 45  46 4d c9 00 00 00 00 00  ?.CABCDEFM......
00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................

                                                                                 Directory area

Byte   131072 (0x00020000)  Sector   1 (physical   1)  Offset     0  Track     1

00 43 31 30 43 50 4d 33  20 45 4d 53 01 00 00 48  .C10CPM3 EMS...H
04 00 05 00 06 00 07 00  00 00 00 00 00 00 00 00  ................
00 42 41 4e 4b 4d 41 4e  20 42 41 53 00 00 00 07  .BANKMAN BAS....
08 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
00 50 52 4f 46 49 4c 45  20 45 4e 47 00 00 00 01  .PROFILE ENG....
09 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
00 53 45 54 4b 45 59 53  20 43 4f 4d 00 00 00 10  .SETKEYS COM....
0a 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................

Entry   0: Directory entry

User:  0 Name: C10CPM3  Extension: EMS
Extent:   0 (low:  1, high:  0)
Last extent record count:  72
Last record byte count:   0
Data blocks:     4     5     6     7     0     0     0     0

So, you must be doing something wrong...


Quote from: cpcoldie on 16:21, 19 March 24Hi d_kef,

I,m a little bit confused.
Wherefrom come the addresses 0x1848,  0x182b, 0x1833, 0x1886 and 0x180d ?
Can't found any references about it.
I would have expected somewhere at 0x05ba, 0x05c5 and 0x061c .


Real_uIDE_Init:
    push de            ;064d
    ld de,CF_BASE        ;064e
    ld (01848h),de        ;0651
    ld de,CF_COMMAND        ;0655
    ld (0182bh),de        ;0658
    ld (01833h),de        ;065c
    ld (01868h),de        ;0660
    ld (01886h),de        ;0664
    ld de,CF_SECCOUNT        ;0668
    ld (0180dh),de        ;066b
    ld de,CF_BASE        ;066f
    ld (00632h),de        ;0672
    ld (00641h),de        ;0676
    ld de,CF_COMMAND        ;067a
    ld (005d7h),de        ;067d
    ld (005f5h),de        ;0681
    ld (005fdh),de        ;0685
    ld (00612h),de        ;0689
    ld de,CF_HEAD        ;068d
    ld (IDE_SetHeadTrkSecSecnt+1),de        ;0690
    pop de            ;0694
    ret            ;0695


You might have found something there. The addresses #18xx should realy be #7Cxx. It seems that one of my equates got messed-up at some point.
I'll sent you a new HDCPM.BIN to test.

d_kef
  

Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: cpcoldie on 23:56, 21 March 24
Yeah, this was the trick!!!

Very cool!  8)

Thank you!

BTW cpmtools: No, I made no mistakes, except compiling the tools with libDSK and I'm pretty sure the "bug" is there.
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: d_kef on 00:15, 22 March 24
Quote from: cpcoldie on 23:56, 21 March 24Yeah, this was the trick!!!

Very cool!  8)

Thank you!

BTW cpmtools: No, I made no mistakes, except compiling the tools with libDSK and I'm pretty sure the "bug" is there.


I'm glad it worked.
Many thanks for taking the time to reverse engineer my code and find the problem.
I'll add the fix to the new HDCPM release.

d_kef
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: cpcoldie on 00:31, 22 March 24
Quote from: d_kef on 00:15, 22 March 24Many thanks for taking the time to reverse engineer my code and find the problem.
Thats the point of forums like this. :)

Thanks again!
Title: Re: HDCPM - boot and run CP/M plus from hard disk
Post by: pollito on 20:35, 23 March 24
Quote from: d_kef on 22:57, 03 January 24True! My bad  :picard:
I'm attaching a CP/M disk image ready to use.
You can also use the Z3Plus disk image from the HDCPM wiki page.

d_kef

CPMDSK01.zip

@d_kef would it be possible for you to update the version of the CP/M disk images (https://www.cpcwiki.eu/imgs/4/4a/CPMDSK01%2602.zip) ZIP on the HDCPM wiki page (https://www.cpcwiki.eu/index.php/HDCPM#Other_downloads) to include this version of CPMDSK01.IMG, so my 464 bretheren will suffer no more?  ;)
Powered by SMFPacks Menu Editor Mod