2 #------------------------------------------------------------------------------
3 # adventure: file(1) magic for Adventure game files
5 # from Allen Garvin <earendil@faeryland.tamu-commerce.edu>
6 # Edited by Dave Chapeskie <dchapes@ddm.on.ca> Jun 28, 1998
7 # Edited by Chris Chittleborough <cchittleborough@yahoo.com.au>, March 2002
10 # I assume there are other, lower versions, but these are the only ones I
12 0 beshort 0x0206 ALAN game data
13 >2 byte <10 version 2.6%d
16 # Infocom (see z-machine)
17 #------------------------------------------------------------------------------
18 # Z-machine: file(1) magic for Z-machine binaries.
20 # This will match ${TEX_BASE}/texmf/omega/ocp/char2uni/inbig5.ocp which
21 # appears to be a version-0 Z-machine binary.
23 # The (false match) message is to correct that behavior. Perhaps it is
26 16 belong&0xfe00f0f0 0x3030 Infocom game data
27 >0 ubyte 0 (false match)
28 >0 ubyte >0 (Z-machine %d,
29 >>2 ubeshort x Release %d /
30 >>18 string >\0 Serial %.6s)
32 #------------------------------------------------------------------------------
33 # Glulx: file(1) magic for Glulx binaries.
35 # I haven't checked for false matches yet.
37 0 string Glul Glulx game data
38 >4 beshort x (Version %d
41 >36 string Info Compiled by Inform
45 # For Quetzal and blorb magic see iff
48 # TADS (Text Adventure Development System)
49 # All files are machine-independent (games compile to byte-code) and are tagged
50 # with a version string of the form "V2.<digit>.<digit>\0" (but TADS 3 is
52 # Game files start with "TADS2 bin\n\r\032\0" then the compiler version.
53 0 string TADS2\ bin TADS
54 >9 belong !0x0A0D1A00 game data, CORRUPTED
56 >>13 string >\0 %s game data
57 # Resource files start with "TADS2 rsc\n\r\032\0" then the compiler version.
58 0 string TADS2\ rsc TADS
59 >9 belong !0x0A0D1A00 resource data, CORRUPTED
61 >>13 string >\0 %s resource data
62 # Some saved game files start with "TADS2 save/g\n\r\032\0", a little-endian
63 # 2-byte length N, the N-char name of the game file *without* a NUL (darn!),
64 # "TADS2 save\n\r\032\0" and the interpreter version.
65 0 string TADS2\ save/g TADS
66 >12 belong !0x0A0D1A00 saved game data, CORRUPTED
68 >>(16.s+32) string >\0 %s saved game data
69 # Other saved game files start with "TADS2 save\n\r\032\0" and the interpreter
71 0 string TADS2\ save TADS
72 >10 belong !0x0A0D1A00 saved game data, CORRUPTED
74 >>14 string >\0 %s saved game data
76 # Danny Milosavljevic <danny.milo@gmx.net>
77 # this are adrift (adventure game standard) game files, extension .taf
78 # depending on version magic continues with 0x93453E6139FA (V 4.0)
79 # 0x9445376139FA (V 3.90)
80 # 0x9445366139FA (V 3.80)
81 # this is from source (http://www.adrift.org.uk/) and I have some taf
82 # files, and checked them.
84 #>4 belong 0x6A87C2CF Adrift game file
85 #!:mime application/x-adrift