adventure 3.0 KB

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