[File] [PATCH] of Magdir/archive for old Apple disk images (*.image)

Jörg Jenderek joerg.jen.der.ek at gmx.net
Sun May 26 19:03:30 UTC 2019


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,
some days ago i inspect some old Apple Office disk images with file
name extension "image". I run file command version 5.37 on such
images and the images are described as "data".

The file identifying tool TrID ( http://mark0.net/soft-trid-e.html )
describes inspected examples like "DiskCopy 4.2 1440k MFM disk image".

Droid, the UK government national archives program describes such
examples general as "Apple DiskCopy image" by fmt/625.

So i add lines to Magdir/archive after TTComp section. Luckily the
Trid tool mentions a URL for such disk images. So i add comment line
with that URL like
 # URL: https://wiki.68kmla.org/DiskCopy_4.2_format_specification

According to that site start magic is expressed by line
 0x52	ubeshort	0x0100

Two byte magic is not so strong. So i look for more test lines.
According to website lowest disk size is 400K. So test for such or
bigger disk sizes by line
 >0x40	ubelong		>409599	Apple DiskCopy 4.2 image
Later show this stored disk data size like 409600 by line
 >>0x40	ubelong		x	\b, %u bytes

At the beginning a disc image name is stored as pascal string.
So show this name by line
 >>00	pstring/B	x	%s
Often this name is the same as the file name.

Apple id and file name extensions are shown by lines
 !:apple	dCpydImg
 !:ext		image/dc42

After applying the above mentioned modifications by patch
file-5.37-archive-dc42.diff then such old Apple disc images are
identified and described like:

Disco 12.image:       Apple DiskCopy 4.2 image Disco 12,
	1474560 bytes, MFM CAV dshd (1440k),
	0x22 format
Microsoft Mail.image: Apple DiskCopy 4.2 image Microsoft Mail,
	819200 bytes, 0x4b00 tag size, GCR CLV dsdd (800k),
	0x22 format

I hope my diff file can be applied in future version of
file utility.

With best wishes
Jörg Jenderek
- --
Jörg Jenderek








-----BEGIN PGP SIGNATURE-----
Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/

iF0EARECAB0WIQS5/qNWKD4ASGOJGL+v8rHJQhrU1gUCXOri+gAKCRCv8rHJQhrU
1tlqAJwJk1u+/zlwIo4rwZ7wSOhL++lbKgCg0d+YbMIx8+Z0tLLvF7LkuJIJVD4=
=hBup
-----END PGP SIGNATURE-----
-------------- next part --------------
--- file-5.37/magic/Magdir/archive.old	2019-05-09 18:58:02 +0000
+++ file-5.37/magic/Magdir/archive	2019-05-26 18:55:42 +0000
@@ -441,2 +441,30 @@
 # (version 5.25) labeled the above entry as "TTComp archive data"
+# From:		Joerg Jenderek
+# URL:		https://wiki.68kmla.org/DiskCopy_4.2_format_specification
+# reference:	http://nulib.com/library/FTN.e00005.htm
+0x52	ubeshort	0x0100
+# test for disk size equal or above 400k
+>0x40	ubelong		>409599	Apple DiskCopy 4.2 image
+#!:mime	application/octet-stream
+!:apple	dCpydImg
+!:ext	image/dc42
+# image pascal name padded with NULs like Microsoft Mail
+>>00	pstring/B	x	%s
+# data size in bytes like 409600
+>>0x40	ubelong		x	\b, %u bytes
+# tag size in bytes
+>>0x44	ubelong		>0	\b, 0x%x tag size
+# data checksum
+#>>0x48	ubelong		x	\b, 0x%x checksum
+# tag checksum
+#>>0x4c	ubelong		x	\b, 0x%x tag checksum
+# disk encoding
+>>0x50	ubyte		0	\b, GCR CLV ssdd (400k)
+>>0x50	ubyte		1	\b, GCR CLV dsdd (800k)
+>>0x50	ubyte		2	\b, MFM CAV dsdd (720k)
+>>0x50	ubyte		3	\b, MFM CAV dshd (1440k)
+>>0x50	ubyte		>3	\b, 0x%x encoding
+# format byte
+>>0x51	ubyte		x	\b, 0x%x format
+#>>0x54	ubequad		x	\b, data 0x%16.16llx
 # ESP, could this conflict with Easy Software Products' (e.g.ESP ghostscript) documentation?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: file-5.37-archive-dc42.diff.sig
Type: application/octet-stream
Size: 95 bytes
Desc: not available
URL: <https://mailman.astron.com/pipermail/file/attachments/20190526/1fd4dc33/attachment.obj>


More information about the File mailing list