Saturday, December 19, 2020

Jesse Booth's Disk Analysis with Scott Baker's CTOS Tool

Dec 17, 2020, 6:23 PM 

Looking for anything CTOS on github, I stumbled across this from Scott Baker (the NGEN guy):


I ran it on the raw image of that B20CL8-1 disk ('python2 ctostool.py B20.RAW dump'). Could be a useful tool in case you hadn't already run across it.

This was the output of the dump command:
== Backup VHB
            Checksum 31373
     LfaSysImagebase 309248
      CPagesSysImage 0
       LfaBadBlkbase 512
        CPagesBadBlk 1
    LfaCrashDumpbase 311296
     CPagesCrashDump 0
             VolNameB20CL8-1
         VolPassword
              LfaVHB 311296
       LfaInitialVHB 0
          CreationDT 1696011993
      ModificationDT 1696011993
          LfaMFDbase 311808
           CPagedMFD 1
          LfaLogbase 1024
           CPagesLog 2
      CurrentLogPage 0
     CurrentLogBytes 0
  LfaFileHeadersbase 312320
  CPagesFilesHeaders 30
AllFileHeaderPageOffset 0
     IFreeFileHeader 1
    CFreeFileHeaders 29
       ClusterFactor 1
       DefaultExtend 1
        AllocSkipCnt 0
  LfaAllocBitMapbase 310784
   CPagesAllocBitMap 1
 LastAllocBitMapPage 0
       LastAllocWord 0
        LastAllocBit 4
          CFreePages 1192
                IDev 0
     RgLruDirEntries
             MagicWd 31801
  SysImageBaseSector 0
    SysImageBaseHead 0
SysImageBaseCylinder 0
SysImageMaxPageCount 0
    BadBlkBaseSector 1
      BadBlkBaseHead 0
  BadBlkBaseCylinder 0
BadBlkBaseMaxPageCouint 1
      DumpBaseSector 0
        DumpBaseHead 0
    DumpBaseCylinder 0
DumpBaseMaxPageCount 0
      BytesPerSector 512
     SectorsPerTrack 8
   TracksPerCylinder 2
    CylindersPerDisk 77
    InterleaveFactor 1
          SectorSize 606
        SpiralFactor 3
      StartingSector 1
            Reserved 0

== Active VHB
311296
            Checksum 4213
     LfaSysImagebase 309248
      CPagesSysImage 0
       LfaBadBlkbase 512
        CPagesBadBlk 1
    LfaCrashDumpbase 311296
     CPagesCrashDump 0
             VolNameB20CL8-1
         VolPassword
              LfaVHB 311296
       LfaInitialVHB 0
          CreationDT 1696011993
      ModificationDT 1696102487
          LfaMFDbase 311808
           CPagedMFD 1
          LfaLogbase 1024
           CPagesLog 2
      CurrentLogPage 0
     CurrentLogBytes 0
  LfaFileHeadersbase 312320
  CPagesFilesHeaders 30
AllFileHeaderPageOffset 0
     IFreeFileHeader 18
    CFreeFileHeaders 12
       ClusterFactor 1
       DefaultExtend 1
        AllocSkipCnt 0
  LfaAllocBitMapbase 310784
   CPagesAllocBitMap 1
 LastAllocBitMapPage 0
       LastAllocWord 35
        LastAllocBit 12
          CFreePages 621
                IDev 0
     RgLruDirEntries SYS�Unisys,
             MagicWd 31801
  SysImageBaseSector 0
    SysImageBaseHead 0
SysImageBaseCylinder 0
SysImageMaxPageCount 0
    BadBlkBaseSector 1
      BadBlkBaseHead 0
  BadBlkBaseCylinder 0
BadBlkBaseMaxPageCouint 1
      DumpBaseSector 0
        DumpBaseHead 0
    DumpBaseCylinder 0
DumpBaseMaxPageCount 0
      BytesPerSector 512
     SectorsPerTrack 8
   TracksPerCylinder 2
    CylindersPerDisk 77
    InterleaveFactor 1
          SectorSize 606
        SpiralFactor 3
      StartingSector 1
            Reserved 0
Active/Backup VHB Mismatch (field=CFreePages, backup=1192, active=621)
Active/Backup VHB Mismatch (field=LastAllocWord, backup=0, active=35)
Active/Backup VHB Mismatch (field=ModificationDT, backup=1696011993, active=1696102487)
Active/Backup VHB Mismatch (field=LastAllocBit, backup=4, active=12)
Active/Backup VHB Mismatch (field=Checksum, backup=31373, active=4213)
Active/Backup VHB Mismatch (field=IFreeFileHeader, backup=1, active=18)
Active/Backup VHB Mismatch (field=RgLruDirEntries, backup=, active=SYS�Unisys,)
Active/Backup VHB Mismatch (field=CFreeFileHeaders, backup=29, active=12)

Allocation Bitmap Bits Set: 621 sectors free

== MFD:
SYS                         309248 (3 pages)
Unisys                      327680 (3 pages)

-- Dir SYS
NAME                 OFFS     SIZE EXTENTS
crashDump.sys           6        0
fdSys.Version           7        5 <offs 2048, len 512>
fileHeaders.sys         1    15360 <offs 312320, len 15360>
mfd.sys                 2      512 <offs 311808, len 512>
sysImage.sys            4        0
Choice.Sub              8      339 <offs 2560, len 512>
Install.Sub             9     2831 <offs 3072, len 3072>
XEInstall.Sub          12     2843 <offs 24064, len 3072>
log.sys                 3     1024 <offs 1024, len 1024>
badBlk.sys              5      512 <offs 512, len 512>
MP.Sub                 10     9226 <offs 6144, len 9728>
SP.Sub                 11     8162 <offs 15872, len 8192>

-- Dir Unisys
NAME                 OFFS     SIZE EXTENTS
ClusterStatus.Run      15    45990 <offs 241152, len 46080>
DisableCluster.Run     16     2982 <offs 287232, len 3072>
ResumeCluster.Run      17     2470 <offs 290304, len 2560>
B211ClstrSp.Run        13    96676 <offs 27136, len 96768>
B22ClstrSpBoot.Run     14   117156 <offs 123904, len 117248>



From: Jesse Booth 
Sent: Thursday, December 17, 2020 5:45 PM
To: Convergent MightyFrame
Cc: Cprossu
Subject: Re: B20 keyboard
 
Yep yep, I saw that UQVQ often with the unixpc images.  I actually just learned about the format -- this guy Arnold Robbins has been helping update the HD image reader/writer and HD support in FreeBee -- Here's the UNIX PC header format :

/*
* As seen in the s4 utils, the UNIX PC was ahead of most of its
* contemporaries, sporting a disk label describing the disk's geometry.
* We read that label and pull the interestings bits out of it.
*/
struct s4_dswprt {
  char     magic[4]; /* magic number */
  int32_t checksum;
  char name[6]; /* name, sort of */
  uint16_t cyls; /* the number of cylinders for this disk */
  uint16_t heads; /* number of heads per cylinder */
  uint16_t psectrk; /* number of physical sectors per track */
  uint16_t pseccyl; /* number of physical sectors per cylinder */
  char flags; /* floppy density and high tech drive flags */
  char step; /* stepper motor rate to controller */
  uint16_t sectorsz; /* physical sector size in bytes */
}  __attribute__((__packed__));

But that is off topic! 

With regards to CTOS, I just took CL8080102-1.IMD and converted it to a raw image.  What I'm seeing is a header similar to the hard drive header, which is consistent with that CTOS Disk Structures doc.  So, for example, some data from the floppy header:
  • volume name: B20CL8-1
  • offset 219, magic word: 7C39 (same in HD image)
  • offset 239, sector size: 512 bytes
  • offset 241, sectors/track: 8 sectors
  • offset 243, tracks/cylinder: 2 tracks (heads?)
  • offset 245, cylinders/disk: 77 cylinders (tracks?)
Now the output from IMDU from CL8080102-1.IMD, says 250 kbps DD 16x256 -- instead of 8x512, but hopefully that's fine since that's the same amount of data.

Anyway, bottom line, looks like the IMD file has the VHB.  And the VHB is saying it should be 77x2x8x512 = 630784 bytes. 

   Jesse


No comments:

Post a Comment