xref: /freebsd/contrib/file/magic/Magdir/lif (revision 898496ee09ed2b7d25f6807edc4515628196ec0a)
1b6cee71dSXin LI
2b6cee71dSXin LI#------------------------------------------------------------------------------
3*898496eeSXin LI# $File: lif,v 1.11 2022/10/19 20:15:16 christos Exp $
4b6cee71dSXin LI# lif:  file(1) magic for lif
5b6cee71dSXin LI#
6b6cee71dSXin LI# (Daniel Quinlan <quinlan@yggdrasil.com>)
7b6cee71dSXin LI#
843a5ec4eSXin LI# Modified by:	Joerg Jenderek
943a5ec4eSXin LI# URL:		https://www.hp9845.net/9845/projects/hpdir/
1043a5ec4eSXin LI#		https://github.com/bug400/lifutils
1143a5ec4eSXin LI# Reference:	https://www.hp9845.net/9845/downloads/manuals/LIF_excerpt_64941-90906_flpRef_Jan84.pdf
1243a5ec4eSXin LI# Note:		called by TrID "HP Logical Interchange Format disk image"
1343a5ec4eSXin LI0	beshort		0x8000
1443a5ec4eSXin LI# GRR: line above is too general as it catches also compressed DEGAS low-res bitmap *.pc1
1543a5ec4eSXin LI# skip many compressed DEGAS low-res bitmap *.pc1 by test for unused bytes
1643a5ec4eSXin LI>14	beshort		=0
1743a5ec4eSXin LI# skip MUNCHIE.PC1 BOARD.PC1 ENEMIES.PC1 by test for low version number
1843a5ec4eSXin LI>>20	ubeshort	<0x0100
19*898496eeSXin LI# skip DROID fmt-840-signature-id-1195.adx fmt-840-signature-id-1199.adx by test for ASCII like volume name
20*898496eeSXin LI>>>2	ubelong		>0x2020201F
21*898496eeSXin LI>>>>0	use		lif-file
2243a5ec4eSXin LI0	name		lif-file
2343a5ec4eSXin LI# LIF ID
2443a5ec4eSXin LI>0	beshort		x		lif file
2543a5ec4eSXin LI!:mime	application/x-lif-disk
2643a5ec4eSXin LI# lif used by Tony Duell LIF utilities; enhanced version by Joachim Siebold use also dat; hpi used by hpdir
2743a5ec4eSXin LI!:ext	lif/hpi/dat
2843a5ec4eSXin LI# volume label; A-Z 0-9 _ ; default are 6 spaces
2943a5ec4eSXin LI>2	string		x		"%.6s"
30*898496eeSXin LI#>2	ubelong		x		LABEL=%8.8x
3143a5ec4eSXin LI# version number; 0 for systems without extensions or 1 for model 64000
3243a5ec4eSXin LI>20	ubeshort	x		\b, version %u
3343a5ec4eSXin LI# LIF identifier; 010000 for system 3000
3443a5ec4eSXin LI>12	beshort		!0x1000		\b, LIF identifier %#x
3543a5ec4eSXin LI# directory start address in units like: 2
3643a5ec4eSXin LI>8	ubelong		x		\b, directory
3743a5ec4eSXin LI>8	ubelong		!2		start address %u
3843a5ec4eSXin LI# length of directory like: 2 4 7 10 12 14 (for model 64000) 16 18 20 24 30 50 57 77 80
3943a5ec4eSXin LI>16	ubelong		x		length %u
4043a5ec4eSXin LI# level 1 extensions
4143a5ec4eSXin LI>20	beshort		=0
4243a5ec4eSXin LI>>24	ubequad		!0		\b, for extensions %#llx...
4343a5ec4eSXin LI>20	beshort		>0
4443a5ec4eSXin LI>>24	ubequad		!0		\b, extensions %#llx...
4543a5ec4eSXin LI# word 21-126 reserved for extensions and future use; set to nil
4643a5ec4eSXin LI>42	ubequad		!0		\b, RESERVED %#llx
4743a5ec4eSXin LI# lif first file name for standard directory; 0xffff... means uninitialized
4843a5ec4eSXin LI>8	ubelong		2
4943a5ec4eSXin LI>>512	string		<\xff\xff	\b, 1st file %-.10s
5043a5ec4eSXin LI
51