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