News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu
avatar_d_kef

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

Started by d_kef, 16:48, 30 December 21

Previous topic - Next topic

0 Members and 3 Guests are viewing this topic.

d_kef

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

Devlin

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.
CPC464 & CPC6128 + USIfAC II + Revaldinho 512k(universal cpld ver) - Schneider CRT TV
Administrator of Amstrad Discord : https://discord.gg/ksWvApv

d_kef

#127
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.

If you have a compatible setup then you copy HDCPM.BIN and CPMDSK01.IMG 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


Devlin

#128
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.
CPC464 & CPC6128 + USIfAC II + Revaldinho 512k(universal cpld ver) - Schneider CRT TV
Administrator of Amstrad Discord : https://discord.gg/ksWvApv

d_kef

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

Devlin

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)
CPC464 & CPC6128 + USIfAC II + Revaldinho 512k(universal cpld ver) - Schneider CRT TV
Administrator of Amstrad Discord : https://discord.gg/ksWvApv

d_kef

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

revaldinho

There are instructions for running CP/M+ using memory expansions on this CPCWiki page: Running CPM with Memory Expansions.

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.


You cannot view this attachment. You cannot view this attachment.

d_kef

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 

revaldinho

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.






Devlin

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?
CPC464 & CPC6128 + USIfAC II + Revaldinho 512k(universal cpld ver) - Schneider CRT TV
Administrator of Amstrad Discord : https://discord.gg/ksWvApv

revaldinho

Files are available here: Cpcwiki page on Dk'tronics memory expansions

See the links  at the bottom of the page.

d_kef

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



Devlin

Quote from: revaldinho on 07:47, 07 May 23Files are available here: Cpcwiki page on Dk'tronics memory expansions

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
CPC464 & CPC6128 + USIfAC II + Revaldinho 512k(universal cpld ver) - Schneider CRT TV
Administrator of Amstrad Discord : https://discord.gg/ksWvApv

d_kef

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

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

zhulien

@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/

d_kef

#141
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

zhulien

#142
@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.

zhulien

#143
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)

HAL6128

#144
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?
...proudly supported Schnapps Demo, Pentomino and NQ-Music-Disc with GFX

Devlin

#145
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)
CPC464 & CPC6128 + USIfAC II + Revaldinho 512k(universal cpld ver) - Schneider CRT TV
Administrator of Amstrad Discord : https://discord.gg/ksWvApv

revaldinho

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.

d_kef

#147
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:
  • You can format the disk(s) with the HDMGR.COM utility.
  • HDMGR.COM can't change the partitioning of a disk (physical or virtual).
  • HDMGR.COM can't format the disks to anything else than CP/M-80 with a file system size of 8MB.
  • If the physical disk has an MBR then HDMGR.COM can recognise and format 1 to 4 (already defined) primary partitions.
  • If the physical disk has no MBR then HDMGR.COM can only format the whole disk as a singe CP/M-80 8MB file system.
  • If the disk has an MBR and the first primary partition is a FAT16/32 one then you can save 1 to 4 CP/M disk images in the root directory. Those images will automatically recognised and mounted by HDCPM on boot. You can format the remaining 3 partitions to CP/M-80 but HDCPM can and only mount 4 disks. The CP/M images always have higher priority over the physical partitions so if you have 2 images and 3 partitions then HDCPM will mount the 2 images and the first 2 partitions.
  • If the disk has no MBR and it is formated to FAT16/32 then HDCPM can recognise and mount 1 to 4 images that have been saved in the root directory.
  • HDCPM works only with one mass storage interface and one physical disk. It searches for interfaces in the order: SF3, SF2(X-MASS, Cyboard), uIDE, M4, USIfAC II, Albireo. The first interface found is the one used.

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. (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

HAL6128

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. :)
...proudly supported Schnapps Demo, Pentomino and NQ-Music-Disc with GFX

d_kef

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

Powered by SMFPacks Menu Editor Mod