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.

cpcoldie

@d_kef
I hope you are well and healthy!

Best wishes!

d_kef

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
  


cpcoldie

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.

d_kef

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

cpcoldie

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!

pollito

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

You cannot view this attachment.

@d_kef would it be possible for you to update the version of the CP/M disk images ZIP on the HDCPM wiki page to include this version of CPMDSK01.IMG, so my 464 bretheren will suffer no more?  ;)

Powered by SMFPacks Menu Editor Mod