tunozemichanの日記 / tunozemichan's diary

SORD社のコンピューターM68やM68MXの解析についての備忘録です。This blog is a memorandum about the analysis of SORD's computers M68 and M68MX.

How to access the disk image of CP/M-68K for SORD M68 using cpmtools (PART 2)

I have found even more reasonable parameters for the SORD M68 CP/M-68K disk. I have written a similar article in the past, but I am posting it as a new article.

 

I received a disk image of CP/M-68K (here called cpm68k_image.hfe) from a kind person on Facebook, and I would like to access this disk using cpmtools.

 

The disk image I received was in hfe format for the HxCFDD emulator.

 

As it is, the disk image in hfe format is basically useless except for booting with SORD M68 with FDD emulator. So, first, run the HxC utility HxCFloppyEmulator.exe to convert it to a raw sector image. This is easy to do, load cpm68k_image.hfe into HxCFloppyEmulator.exe, go to Floppy image->Export disk/Save As, and select "IMG file(RAW Sector file format)" as the file type on the save screen. )" as the file type on the save screen. Select "IMG file(RAW Sector file format )" as the file type on the save screen. This time, the file name is cpm68k_image.img. 

 

The FDD installed in the SORD M68 is the Mitsubishi M4854-342M (there is also a version without a branch number). The main feature of this FDD is that it can be run with almost the same parameters as an 8-inch FDD.

 

This feature is evident in HxCFloppyEmulator's Track Analyzer, which can analyze disk images as 5.25" 96TPI or 8" 48TPI without any problem.

 

f:id:tunozemichan:20211118191710p:plain

 

This Track Analyzer provides so much data that I have not been able to use it. However, the values you can easily get from this utility are the number of heads, number of tracks, sector size, number of sectors, and skew values.

 

From cpm68k_image.img, the number of heads was 2, the number of tracks was 77, the sector size was 256, the number of sectors was 26, and the skew was 13.

 

Next, download cpmtools (http://www.moria.de/~michael/cpmtools/).
). This tool is also available for Windows, but I used the Linux version on WSL2. After extracting the files, open diskdefs, the disk definition file, in an editor and add the following entries.

 

diskdef m68disk
  seclen 256
  tracks 154
  sectrk 26
  blocksize 4096
  maxdir 317
  skew 13
  boottrk 2
  os 2.2
end

 

The space to the left of the seclen is a tab, otherwise, an error will occur.

 

"tracks" is the number of tracks, but since the number of heads is 2, it seems to be 77 x 2 = 154.

What bothered me was determining the value of maxdir. This problem is not a hardware problem of FDD, but a problem of CP/M disk structure. Normally, maxdir is 64, 128, 256, 512, etc., and I don't think it should be a half-baked value like 317 as shown above, but I can see the contents of the disk with this.

 


From the prompt, type the following to see the contents of the disk.


>cpmls -f m68disk cpm68k_image.img

 

The contents of cpm68k_image.img contains a large number of files. It contains both an assembler and a C compiler.


AR68    .68K    16K     97 R
AS68    .68K    44K    352 R
AS68INIT.        8K     34 R
AS68SYMB.DAT     8K     44 R
BACKUP  .SUB     4K      1 R
BOOT    .SYS     8K     34 R
C       .SUB     4K      1 R
C068    .68K    32K    252 R
C168    .68K    36K    261 R
CC      .SUB     4K      1 R
CLIB    .       68K    519 R
CLINK   .SUB     4K      1 R
COPYDISK.68K    20K    132 R
CP68    .68K    16K    125 R
CPM     .H       8K     53 R
CPM     .SYS   132K   1040 RS
CTYPE   .H       4K     11 R
DDT     .68K     4K     15 R
DDT1    .68K    36K    270 R
DUMP    .68K     8K     60 R
ED      .68K    12K     94 R
ERRNO   .H       4K      7 R
FORMAT  .68K    20K    158 R
FUNC    .68K    16K    112 R
IB      .H       4K     13 R
IBLIB   .       20K    156 R
INIT    .68K     4K     14 R
LO68    .68K    16K    126 R
NM68    .68K    12K     67 R
PIP     .68K    12K     68 R
POFF    .68K     8K     56 R
PORTAB  .H       4K     17 R
REBOOT  .68K    20K    150 R
RELOC   .68K    16K    102 R
REZERO  .68K    12K     72 R
S       .O       4K      8 R
SAMPLE  .C       4K      5 R
SE      .68K    44K    333 R
SENDC68 .68K    12K     71 R
SETJMP  .H       4K     12 R
SIGNAL  .H       4K     14 R
SIZE68  .68K     8K     61 R
STAT    .68K    12K     73 R
STDIO   .H       4K     25 R
STDRCS  .68K    16K     99 R
STSCON  .68K    36K    282 R
STSCON  .FMT     8K     43
SYSGEN  .68K    20K    131 R
SYSLIB  .        4K     20 R
TOD     .68K    16K    112 R

 

You should now be able to see the contents of the disk. Furthermore, to copy the files to your PC, type the following

 

>cpmco -f m68disk cpm68k_image.img 0:*.* .

 

By typing the above, all files on the disk will be copied to the current directory on the PC.

You can also copy them from your PC to the disk. You can also copy the files from your PC to the disk, see the cpmtools page for details.

 

Incidentally, I dumped the contents of the resulting CPM.SYS file, and it seems to be correct. However, the contents of text files such as STDIO.H are sometimes messed up, so I think it is still not set up correctly.

If the contents of CPM.SYS and BOOT.SYS are legitimate, we can say that the analysis of SORD M68 is one step ahead.