xref: /dragonfly/contrib/file/magic/Magdir/amigaos (revision 7d3e9a5b)
1
2#------------------------------------------------------------------------------
3# $File: amigaos,v 1.18 2020/08/02 16:42:00 christos Exp $
4# amigaos:  file(1) magic for AmigaOS binary formats:
5
6#
7# From ignatios@cs.uni-bonn.de (Ignatios Souvatzis)
8#
90	belong		0x000003fa	AmigaOS shared library
100	belong		0x000003f3	AmigaOS loadseg()ble executable/binary
110	belong		0x000003e7	AmigaOS object/library data
12#
130	beshort		0xe310		Amiga Workbench
14>2	beshort		1
15>>48	byte		1		disk icon
16>>48	byte		2		drawer icon
17>>48	byte		3		tool icon
18>>48	byte		4		project icon
19>>48	byte		5		garbage icon
20>>48	byte		6		device icon
21>>48	byte		7		kickstart icon
22>>48	byte		8		workbench application icon
23>2	beshort		>1		icon, vers. %d
24#
25# various sound formats from the Amiga
26# G=F6tz Waschk <waschk@informatik.uni-rostock.de>
27#
280	string		FC14		Future Composer 1.4 Module sound file
290	string		SMOD		Future Composer 1.3 Module sound file
300	string		AON4artofnoise	Art Of Noise Module sound file
311	string		MUGICIAN/SOFTEYES Mugician Module sound file
3258	string		SIDMON\ II\ -\ THE	Sidmon 2.0 Module sound file
330	string		Synth4.0	Synthesis Module sound file
340	string		ARP.		The Holy Noise Module sound file
350	string		BeEp\0		JamCracker Module sound file
360	string		COSO\0		Hippel-COSO Module sound file
37# Too simple (short, pure ASCII, deep), MPi
38#26	string		V.3		Brian Postma's Soundmon Module sound file v3
39#26	string		BPSM		Brian Postma's Soundmon Module sound file v3
40#26	string		V.2		Brian Postma's Soundmon Module sound file v2
41
42# The following are from: "Stefan A. Haubenthal" <polluks@web.de>
430	beshort		0x0f00		AmigaOS bitmap font
440	beshort		0x0f03		AmigaOS outline font
450	belong		0x80001001	AmigaOS outline tag
460	string		##\ version	catalog translation
470	string		EMOD\0		Amiga E module
488	string		ECXM\0		ECX module
490	string/c	@database	AmigaGuide file
50
51# Amiga disk types
52#	display information like volume name of root block on Amiga (floppy) disk
530	name   	adf-rootblock
54# block primary type = T_HEADER (value 2)
55>0x000	ubelong		!2		\b, type %u
56# header_key; unused in rootblock (value 0)
57>0x004	ubelong		!0		\b, header_key %u
58# high_seq; unused (value 0)
59>0x008	ubelong		!0		\b, high_seq %u
60# ht_size; hash table size; 0x48 for flopies
61>0x00c	ubelong		!0x48		\b, hash table size 0x%x
62# bm_flag; bitmap flag, -1 means VALID
63>0x138	belong		!-1		\b, bitmap flag 0x%x
64# bm_ext; first bitmap extension block (Hard disks only)
65>0x1A0	ubelong		!0		\b, bitmap extension block 0x%x
66# name_len; volume name length; diskname[30]; volume name
67>0x1B0	pstring		>\0		\b, "%s"
68# first directory cache block for FFS; otherwise 0
69>0x1F8	ubelong		!0		\b, directory cache block 0x%x
70# block secondary type = ST_ROOT (value 1)
71>0x1FC	ubelong		!1		\b, sec_type 0x%x
72#
730	string		RDSK		Rigid Disk Block
74>160	string		x		on %.24s
75# URL:		http://fileformats.archiveteam.org/wiki/ADF_(Amiga)
76#		https://en.wikipedia.org/wiki/Amiga_Fast_File_System
77# Reference:	http://lclevy.free.fr/adflib/adf_info.html
78# Update:	Joerg Jenderek
79# Note:		created by ADFOpus.exe
80# 		and verified by `unadf -l TURBO_SILVER_SV.ADF`
810	string		DOS
82# skip DOS Client Message Files like IPXODI.MSG DOSRQSTR.MSG
83>3	ubyte		<8		Amiga
84# https://reposcope.com/mimetype/application/x-amiga-disk-format
85!:mime	application/x-amiga-disk-format
86!:ext	adf
87>>3	ubyte		0		DOS disk
88>>3	ubyte		1		FFS disk
89>>3	ubyte		2		Inter DOS disk
90>>3	ubyte		3		Inter FFS disk
91# For Fastdir mode the international mode is also enabled,
92>>3	ubyte		4		Fastdir DOS disk
93>>3	ubyte		5		Fastdir FFS dis
94# called by TrID "Amiga Disk image File (OFS+INTL+DIRC)"
95>>3	ubyte		6		Inter Fastdir DOS disk
96# called by TrID "Amiga Disk image File (FFS+INTL+DIRC)"
97>>3	ubyte		7		Inter Fastdir FFS disk
98# but according to Wikipedia variants with long name support
99#>>3	ubyte		6		long name DOS disk
100#>>3	ubyte		7		long name FFS disk
101# DOES NOT only work! Partly for file size  ~< FILE_BYTES_MAX=1 MiB defined in ../../src/file.h
102#>>-0		offset	x		\b, %lld bytes
103# Correct file size, but next lines are NOT executed
104#>>-0		offset	901120		(DD 880 KiB floppy)
105# 880 KiB Double Density floppy disk by characteristic hash table size 0x48 and T_HEADER=2
106>>0x6E00C	ubelong	0x48
107>>>0x6E000	ubelong	2		(DD 880 KiB)
108# 1760 KiB High Density floppy disk (1802240 bytes) by characteristic hash table size 0x48
109>>0xDC00C	ubelong	0x48
110>>>0xDC000	ubelong	2		(HD 1760 KiB)
111# Chksum; special block checksum like: 0 0x44ccf4c0 0x51f32cac 0xe33d0e7d ...
112#>>4	ubelong		x		\b, CRC 0x%x
113# Rootblock: 0 880 (often for DD and HD) 1146049280 (IMAGINE_1_0_DISK_01.ADF TURBO_SILVER_SV.ADF)
114>>8	ubelong		>0		\b, probably root block %d
115# bootblock code
116>>12	quad		!0		\b, bootable
117# assembler instructions: lea exp(pc),a1; moveq 25h,d0; jsr -552(a6)
118>>>12	ubequad	=0x43fa003e70254eae	AmigaDOS 3.0
119>>>12	default	x
120>>>>12	ubequad	!0x43fa003e70254eae	0x%llx..
121# 880 KiB Double Density floppy disk (901120 bytes)
122>>0x6E00C	ubelong	0x48
123>>>0x6E000	ubelong	2
124>>>>0x6E000	use			adf-rootblock
125# 1760 KiB High Density floppy disk (1802240 bytes)
126>>0xDC00C	ubelong	0x48
127>>>0xDC000	ubelong	2
128>>>>0xDC000	use			adf-rootblock
129# 1 MiB hard disc by test for T_HEADER=2 and header_key=0=high_seq
130>>0x80000	ubelong	2
131>>>0x80004	quad	0
132>>>>0x80000	use			adf-rootblock
133# 2 MiB hard disc; only works if in ../../src/file.h FILE_BYTES_MAX is raised to 2 MiB
134#>>0x100000	ubelong	x		2 MiB TEST
135#>>0x100000	ubelong	2		\b, 2 MiB hard disc rootblock
136#>>>0x100000	use			adf-rootblock
1370	string		KICK		Kickstart disk
138
139# From: Alex Beregszaszi <alex@fsn.hu>
1400	string		LZX		LZX compressed archive (Amiga)
141
142# From: Przemek Kramarczyk <pkramarczyk@gmail.com>
1430	string 		.KEY		AmigaDOS script
1440	string 		.key		AmigaDOS script
145
146# AMOS Basic file formats
147# https://www.exotica.org.uk/wiki/AMOS_file_formats
1480	string		AMOS\040Basic\040 	AMOS Basic source code
149>11	byte		=0x56 			\b, tested
150>11	byte		=0x76 			\b, untested
1510 	string		AMOS\040Pro		AMOS Basic source code
152>11	byte		=0x56 			\b, tested
153>11	byte		=0x76 			\b, untested
1540	string		AmSp			AMOS Basic sprite bank
155>4	beshort		x			\b, %d sprites
1560	string		AmIc			AMOS Basic icon bank
157>4	beshort		x			\b, %d icons
1580	string		AmBk			AMOS Basic memory bank
159>4	beshort		x			\b, bank number %d
160>8	belong&0xFFFFFFF	x		\b, length %d
161>12	regex		.{8}			\b, type %s
1620	string		AmBs			AMOS Basic memory banks
163>4	beshort		x			\b, %d banks
164