[File] [PATCH] Magdir/filesystems for TransCopy disk image *.tc *.img

Christos Zoulas christos at zoulas.com
Thu Oct 28 10:54:23 UTC 2021


Committed, thanks!

christos

> On Oct 27, 2021, at 3:16 PM, Jörg Jenderek <joerg.jen.der.ek at gmx.net> wrote:
> 
> Hello,
> 
> some times ago i handled some disk images. Some unexpected
> results lead me to inspection of TransCopy disk images with
> file name extension TC and IMG.
> 
> When running running file command version 5.41 on such images and
> related files i get an output like:
> 
> DISK1.TC:                                     data
> VOCALC2.TC:                                   data
> WIZ1_320.IMG:                                 data
> WIZ2_720.IMG:                                 data
> disk02.tc:                                    data
> grub_t400_8mb_libgfxinit_txtmode_colemak.rom: Intel serial flash
> 					      for ICH/PCH ROM <= 5 or
> 					      3400 series A-step
> 
> For comparison reason i run the file format identification utility
> TrID ( See https://mark0.net/soft-trid-e.html). This identifies disc
> examples as "TransCopy disk image" by definition
> tc-transcopy.trid.xml via 2 byte start pattern 5AA5 (See appended
> tc_img-trid-v.txt).
> 
> It also displays an URL on Wikipedia about Central Point Software
> (CPS) and its ISA floppy controller card "Option Board". This
> information is now expressed by comment lines inside
> Magdir/filesystems like:
> # URL:	en.wikipedia.org/wiki/Central_Point_Software#cite_note-6
> # Ref.:	http://mark0.net/download/triddefs_xml.7z
> #	defs/t/tc-transcopy.trid.xml
> With this information i found documents (image_format.txt
> TranscopyFormat.txt) about the Transcopy image format. That
> information is expressed by comment lines like:
> # www.robcraig.com/download/transcopy-5-x-file-format
> # www.robcraig.com/download/transcopy-file-format-by-gene-thompson
> 
> Unfortunately TransCopy files have only a weak 2 byte magic
> pattern 0x5AA5 at offset 0x0. So the displaying part is done by
> sub routine tc-floppy. So tests for more characteristics must be
> added. This sub routine start like:
> 0	name		tc-floppy
> >0	beshort		x		TransCopy disk image
> !:mime	application/x-floppy-image-tc
> !:ext	tc/img
> Instead of generic mime type application/octet-stream a user defined
> one is shown. The original file name extension was 3 byte "IMG", but
> that extension is often used by others. So also 2 byte extension "TC"
> is found, but maybe never used official by CPS.
> 
> After signature 2 description lines are stored, which are optional
> zero-terminated and have a maximal length of 32 characters. So this
> is done by lines like:
> >2		string		>\0		%.32s
> >0x22		string		>\0		"%.32s"
> In first description i found ASCII text like "Project Workbench
> 2.20", "Visi On Calc" or "Wizardry V Disk 1 of 3". In second
> description in found text like "(1988).", "Advanced - Utility" or
> 'Program Disk 2". So that information can be used to skip Intel
> serial flash ROM with unlikely description starting with hexadecimal
> F0F0 by additional line like:
> >>>2		beshort		!0xF00f
> 
> At offset 256 the disk type is stored as byte value. Typical only low
> values (2~MFM High Density 3~MFM Double Density 4~Apple II GCR 5~FM
> Single Density 6~Commodore GCR 7~MFM Double Density 8~Commodore Amiga
> Ch~Atari FM) occur or 0xFF for Unknown. That is often found in my
> inspected example. This information is shown by line like:
> >0x100		ubyte		!0xFF		\b, disk type %u
> 
> So that information can be used to skip Intel serial flash ROM with
> invalid disk types 89h 88h by additional test line like:
> >>>>0x100	byte		!0x89
> 
> Afterwards the starting cylinder number is stored as byte value. In
> my inspected examples this value was 0 as typical expected. So that
> information is shown by line like:
> >0x101		ubyte		x		\b, cylinder
> >0x101		ubyte		!0		start=%u
> So that information can be used to skip Intel serial flash ROM with
> unlikely "high" start cylinder 100 by additional line like:
> >>0x101	ubyte		<100
> 
> Afterwards the ending cylinder number is stored as byte value. In my
> inspected examples this value often was 40, but i also found value 41
> and 79. So that information is shown by line like:
> >0x102		ubyte		x		end=%u
> 
> Afterwards the number of sides is stored. In my examples i only found
> value 2. So that information is shown by line like:
> >0x103		ubyte		!2		\b, %u sides
> Because we consider floppy disc images i only expect also value 1
> here. So i skip Intel serial flash ROM with invalid 0 disk sides by
> second test line like:
> >0x103		ubyte		!0
> 
> After applying the above mentioned modifications by patch
> file-5.41-filesystems-tc.diff then all my inspected disk images
> are now described and no misidentification occurs. This now looks like:
> DISK1.TC:                                     TransCopy disk image
> 					      , cylinder end=41
> VOCALC2.TC:                                   TransCopy disk image
> 					      Visi On Calc
> 					      "Program Disk 2"
> 					      , cylinder end=40
> WIZ1_320.IMG:                                 TransCopy disk image
> 					      Wizardry I Disk 1 of 1
> 					      320kb
> 					      , cylinder end=41
> WIZ2_720.IMG:                                 TransCopy disk image
> 					      Wizardry II Disk 1 of 1
> 					      720kb
> 					      , disk type 7
> 					      , cylinder end=79
> disk02.tc:                                    TransCopy disk image
> 					      Project Workbench 2.20
> 					      "Advanced - Utility"
> 					      , cylinder end=40
> grub_t400_8mb_libgfxinit_txtmode_colemak.rom: Intel serial flash
> 					      for ICH/PCH ROM <= 5 or
> 					      3400 series A-step
> 
> I hope my diff file can be applied in future version of file utility.
> 
> With best wishes
> Jörg Jenderek
> --
> Jörg Jenderek
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> <Nachrichtenteil als Anhang.DEFANGED-3369><tc_img-trid-v.txt.gz><file-5_41-filesystems-tc_diff.DEFANGED-3370><file-5_41-filesystems-tc_diff_sig.DEFANGED-3371>-- 
> File mailing list
> File at astron.com
> https://mailman.astron.com/mailman/listinfo/file
> <sanitizer.log>



More information about the File mailing list