News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu
avatar_d_kef

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

Started by d_kef, 16:48, 30 December 21

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

d_kef

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

JonB

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!

angelcaio

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


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

d_kef

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:
  • 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.

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

JonB

@d_kef how does it detect the interface? Issue an IDE command to the port and check for a response from the IDE device?

d_kef

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

HAL6128

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

d_kef

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

JonB

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

d_kef

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


HAL6128

I don't think that there are as many SF3 available as the M4 board around but definitly a lot. (50-100)?
...proudly supported Schnapps Demo, Pentomino and NQ-Music-Disc with GFX

d_kef

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

HAL6128

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

HAL6128

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

d_kef

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

HAL6128

v2.0.7
Version 1.02 of HDCPM works fine.
...proudly supported Schnapps Demo, Pentomino and NQ-Music-Disc with GFX

d_kef

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

HAL6128

...proudly supported Schnapps Demo, Pentomino and NQ-Music-Disc with GFX

d_kef

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

d_kef

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

d_kef

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

Mark_wllms

Amazing. Now that this is an executable that loads into ram, could it be included in the USIFAC as an RSX?

d_kef

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:
  • |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


Fran123

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

Mark_wllms

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?

Powered by SMFPacks Menu Editor Mod