Friday, April 25, 2014

HxC testing with Cromemco format diskettes


This is a practical howto document showing some command line examples tests used to validate the HxC Solid State Diskette Emulator 

The tests relate to a Cromemco CDOS and Cromemco Cromix environment

My setup
Drive A = HxC drive A
Drive B = Physical 3.5" emulating 8"
Drive C = HxC drive B
Drive D = Physical 5.25"

For details of HxC and how to set it up please see this link



Copying from HxC drive 'B'  to HxC drive 'A'

A HxC drive has LGDSDDST.HFE file
B BxC drive has 530CDOS.HFE

rcopy -l 128 -v /dev/fdc /dev/fda    # fails, well my patience exhausted after 15 minutes!

system[21] rcopy -l 128 -v /dev/fdc /tmp/fred

"/dev/fdc" matches "/tmp/fred".

oops  -v is copy and verify!  that is what slowing us down.  Let us repeat without the verify

rcopy -t /dev/fdc /dev/fda
Buffer size: 10,240 bytes.

Read buffer: 123, write   buffer: 123, (1,256,448 bytes)
cdoscopy -l fda
64kz.com            4K
64s.com             4K
68kmemt.com        14K
asm22.com          10K
asmb.com           14K
asmlib.rel          2K
b1.sbr              4K
b2.sbr              4K
b3.sbr              8K
b4.sbr              4K
b5.sbr             10K



Copy with rcopy Cromix B: Large to HxC  A: Large

rcopy -t /dev/fdb /dev/fda
Buffer size: 10,240 bytes.

Read buffer: 16, write   buffer: 15, (153,600 bytes)

 check fda

Device: /dev/fda
End of dcheck


Device: /dev/fda

Blocks missing:                           0
Bad free blocks:                          0
Duplicate blocks in free list:            0
Blocks in files and in free list:         0
Bad blocks:                               0
Duplicate blocks:                         0

Device files:                           132
Ordinary files:                         166
Directories:                             15
Blocks used in files:                 2,289
Free blocks:                             57
Free inodes:                             39
system[29] free fda
/dev/fda        57 blocks      28K       29,184 bytes


Generating a Blank Uniform Format Diskette
The .HFE virtual file contains information about the RPM of the track so  I created an initial Uniform format file on a PC thus


Now,  save this as an actual blank diskette file, copy to the SD card and format and makfs on the Cromix side ...

 initflop
68010 XPU 168   Initflop source 1.8

Press:          RETURN to supply default answers
                CTRL-C to abort program
Warning:        INITFLOP can destroy all disk data

Device name? ufda

Testing:
        Rotational speed:       358 RPM

Formatting
Sector size (0=128, 1=256, 2=512, 3=1024)? <2>
Single or double sided (S/D)? <D>
Single or double density (S/D)? <D>

First cylinder (0-76.)?  <0>
Last cylinder (0-76.)?  <76.>
Surfaces (0-1., All)?  <All>

Surface,Cylinder
1       76
system[44] makfs -b 2 ufda
system[45] free ufda
/dev/ufda    2,188 blocks   1,094K    1,120,256 bytes


Now we have a good blank that I have saved off under the HxC blanks directory as file ULDSDDST.HFE

Ftar on Uniform Large B: to Uniform Blank HxC A:

rcopy -t /dev/ufdb /dev/ufda
Buffer size: 76,800 bytes.

Read buffer: 16, write   buffer: 16, (1,182,720 bytes)


ftar -tv /dev/ufda   # prove the copy is good.  read from HxC



          0 D Jan 05, 2036 06:28  .

    133,752   Dec 02, 1997 08:43  ./cromix.sys

          0 D Jan 19, 1990 13:08  ./tmp
          0 D Jan 19, 1990 13:08  ./usr
          0 D Jan 19, 1990 13:08  ./usr/lib
      6,656   Nov 01, 1989 16:49  ./usr/lib/ksclib.obj
      1,792   May 19, 1987 12:00  ./usr/lib/kslib.rel
     36,864   Nov 01, 1989 17:02  ./usr/lib/syslib.2.4.obj




Transferring a file from a Physical to Virtual Cromemco Computer

This test takes a file from a physical 68000 Cromemco machine, writes it to a 360K physical floppy.   Then takes that floppy to a PC running Windows 2012 x64 server.   Using the HxC Floppy Emulator we then read this diskette in a 1.2MB drive and make a HxC image

Finally we test that image in a Virtual Cromix environment


  • Initialise 360K diskette on Cromix 168 in CDOS Format


initflop
68010 XPU 168   Initflop source 1.8

Press:          RETURN to supply default answers
                CTRL-C to abort program
Warning:        INITFLOP can destroy all disk data

Device name? sfdd

Testing:
        Rotational speed:       301 RPM

Formatting
Disk type (C=CDOS, X=CROMIX)? <X> c
Single or double sided (S/D)? <D>
Single or double density (S/D)? <D>

First cylinder (0-39.)?  <0>
Last cylinder (0-39.)?  <39.>
Surfaces (0-1., All)?  <All>

Surface,Cylinder
1       39
Labeling disk
   Disk name (up to 8 characters)? <Userdisk> 531test
   Date on disk (mm/dd/yy)? <03/05/114> 04/05/99
   Number of directory entries (64-512)? <128>


cdoscopy -bvw sfdd *basic**

basic.com                   19,456 bytes
basicgen.com                10,752 bytes
mbasic.com                  24,192 bytes
sbasic.com                  26,112 bytes
sbasic.sbr                     256 bytes
sbasicio.sbr                   512 bytes
sbasicio.z80                26,112 bytes
system[23] cdoscopy -l sfdd
basic.com          20K
basicgen.com       12K
mbasic.com         24K
sbasic.com         26K
sbasic.sbr          2K
sbasicio.sbr        2K
sbasicio.z80       26K




  • Take CDOS format Disk to my Virualisation PC

  • Start HxCFloppy Emulator v2.0.20.1


Disk is now read.  Saved as a .DSK raw image file and loaded to Cromemco CDOS emulator running under Windows Vista 32
So the disk is unreadable.  Lets look at the image by sector ...

The first track is just BLANK.  Lets redo the read and examine what the HxC program tells me

So the diskette reader reading my 360K physical disk can't figure out the data rate on track 0.  It is FM format though!



 I tried reading a regular MSDOS 6.22 boot disk which is of course full MFM format.  Read fine

Result: My Virtualisation PC CANNOT handle FM format on diskettes.  (well in the 1.2MB drive and the 360K drive just does not work well in system at all. So much so I removed the physical 360K diskette from the PC system completely)


Testing 360K Cromix small disk format
Took an existing Image Disk .IMD image and converted it to .HFE using the HxCFloppyEmulator Gui

From the original  061C3105.IMD  I created CSDSDDST.HFE
Put onto SD Card
insert into HxC on Cromemco
select the csdsddst.hfe file to drive a

Formatting under Cromix 168

initflop
68010 XPU 168   Initflop source 1.8

Press:          RETURN to supply default answers
                CTRL-C to abort program
Warning:        INITFLOP can destroy all disk data

Device name? sfda

Testing:
        Rotational speed:       293 RPM
        Speed out of tolerance

Formatting
Disk type (C=CDOS, X=CROMIX)? <X>
Single or double sided (S/D)? <D>
Single or double density (S/D)? <D>

First cylinder (0-39.)?  <0>
Last cylinder (0-39.)?  <39.>
Surfaces (0-1., All)?  <All>

Surface,Cylinder

1       39


Make Filesystem, Write Boot Track, Check
makfs sfda
wboot sfda

rcopy -t -r /dev/sfda
Buffer size: 10,240 bytes.

Read buffer: 3


check sfda


Device: /dev/sfda
End of dcheck


Device: /dev/sfda

Blocks missing:                           0
Bad free blocks:                          0
Duplicate blocks in free list:            0
Blocks in files and in free list:         0
Bad blocks:                               0
Duplicate blocks:                         0

Device files:                             0
Ordinary files:                           0
Directories:                              1
Blocks used in files:                     0
Free blocks:                            725
Free inodes:                            195



Now lets use the original 061 physical disk (hopefully for the very last time ever) and create a fresh and valid 061C3105.HFE disk

rcopy -v -t /dev/sfdd /dev/sfda
Buffer size: 10,240 bytes.


Read buffer: 8, write   buffer: 7, (71,680 bytes) compared OK
"/dev/sfdd" matches "/dev/sfda".


# try some writing
mount /dev/sfda /da
d /da
find . -type f -a -exec version -v {} > ./cromix3105.versions.txt
ls -l
         25 D  1   rewa re-- re-- bin         Nov-12  1985  bin
          3 D  1   rewa re-- re-- bin         Nov-12  1985  cmd
    129,584    1   rewa ---- ---- bin         Nov-12  1985  cromix.sys
     11,178    1   rewa re-- re-- system      Apr-07 16:16  cromix3105.longlist.txt
      3,087    1   rewa re-- re-- system      Apr-07 16:13  cromix3105.versions.txt
        111 D  1   rewa re-- re-- bin         Nov-12  1985  dev
          0    1   rewa re-- re-- system      Nov-12  1985  drive

         18 D  1   rewa -e-- -e-- bin         Nov-12  1985  etc

All seems great!  Let's see if we can boot from it ...
boot ./cromix
system[26]
System shutdown in progress
System shutdown complete
Address: Memory test by 16K blocks
000000h: ++++++++++++++++++++++++++++++++

Floppy = 1, STDC = 6
Enter major root device number: 1
 fda =  0,  fdb =  1,  fdc =  2,  fdd =  3
sfda =  4, sfdb =  5, sfdc =  6, sfdd =  7
dfda = 16, dfdb = 17, dfdc = 18, dfdd = 19
Enter minor root device number: 4

System initialization complete

Cromix-Plus Operating System version 31.05
Copyright (c) 1985 Cromemco, Inc.
Boot System

PID = 6

This is Phase one of Cromix-Plus installation.
Please note the following installation steps.

1.      After you have noted the information on the screen, hold down
        the CNTRL key and press Q to display the next page of this information.

2.      If the message:

        "Incorrect version of STDC firmware (1.20 or higher required)"

        was displayed during boot procedure, please enter the command "boot"
        to reboot Cromix-Plus. Please see SUDS note Cromix-Plus-1 for details.

3.      The disk on which you plan to install Cromix-Plus must be
        initialized and the file structure must be built on it. (See
        the manuals for the Initstdc, Initsmd, Initflop, Makfs
        utilities).  If your disk already has a file system on it,
        run the Check utility to verify the file system integrity.
        If necessary, run the Check -s utility or take any other
        necessary steps. Do not proceed until Check reports no errors.

4.      Run the Update1 command. The argument to Update1 command must
        be the name of your future root device. The Update1 command
        will rename a few files in your future /etc directory (in case
        they exist already) to names with the extension ".old".  If a brand
        new file structure was generated there will be no ".old" files.
        The Update1 command will then Cptree the current file structure
        to the new disk and invoke the Boot command to reboot the system.
        This time you should designate your new disk as the root device.


Cromix-Plus Operating System version 31.05
Copyright (c) 1985 Cromemco, Inc.
Boot System


Logged in system Apr-07-2014 16:17:56 on tty1

Message of the day:  Welcome to the Cromix-Plus Operating System

sync
# kill -2 1
#
System shutdown in progress
System shutdown complete


Note:
By convention  I use A=D=5.25 inch and B=C=8 inch drives

In other words the A: via the HxC normally has 5.25 inch diskette images not 8".  Since with CDOS (ver >= 1.07) you use CDOSGEN to determine what disk sizes are where this is an important convention to keep.

Summary
The HxC solid state diskette emulator passed all tests and is now in service as the A: and C: drives of my system.