adventure 2.9 KB

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