adventure 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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. # Conflicts with too much other stuff!
  14. # Infocom
  15. # (Note: to avoid false matches Z-machine version 1 and 2 are not
  16. # recognized since only the oldest Zork I and II used them. Similarly
  17. # there are 4 Infocom games that use version 4 that are not recognized.)
  18. #0 byte 3 Infocom game data (Z-machine 3,
  19. #>2 beshort <0x7fff Release %3d,
  20. #>26 beshort >0 Size %d*2
  21. #>18 string >\0 Serial %.6s)
  22. #0 byte 5 Infocom game data (Z-machine 5,
  23. #>2 beshort <0x7fff Release %3d,
  24. #>26 beshort >0 Size %d*4
  25. #>18 string >\0 Serial %.6s)
  26. #0 byte 6 Infocom game data (Z-machine 6,
  27. #>2 beshort <0x7fff Release %3d,
  28. #>26 beshort >0 Size %d*8
  29. #>18 string >\0 Serial %.6s)
  30. #0 byte 8 Infocom game data (Z-machine 8,
  31. #>2 beshort <0x7fff Release %3d,
  32. #>26 beshort >0 Size %d*8
  33. #>18 string >\0 Serial %.6s)
  34. # TADS (Text Adventure Development System)
  35. # All files are machine-independent (games compile to byte-code) and are tagged
  36. # with a version string of the form "V2.<digit>.<digit>\0" (but TADS 3 is
  37. # on the way).
  38. # Game files start with "TADS2 bin\n\r\032\0" then the compiler version.
  39. 0 string TADS2\ bin TADS
  40. >9 belong !0x0A0D1A00 game data, CORRUPTED
  41. >9 belong 0x0A0D1A00
  42. >>13 string >\0 %s game data
  43. # Resource files start with "TADS2 rsc\n\r\032\0" then the compiler version.
  44. 0 string TADS2\ rsc TADS
  45. >9 belong !0x0A0D1A00 resource data, CORRUPTED
  46. >9 belong 0x0A0D1A00
  47. >>13 string >\0 %s resource data
  48. # Some saved game files start with "TADS2 save/g\n\r\032\0", a little-endian
  49. # 2-byte length N, the N-char name of the game file *without* a NUL (darn!),
  50. # "TADS2 save\n\r\032\0" and the interpreter version.
  51. 0 string TADS2\ save/g TADS
  52. >12 belong !0x0A0D1A00 saved game data, CORRUPTED
  53. >12 belong 0x0A0D1A00
  54. >>(16.s+32) string >\0 %s saved game data
  55. # Other saved game files start with "TADS2 save\n\r\032\0" and the interpreter
  56. # version.
  57. 0 string TADS2\ save TADS
  58. >10 belong !0x0A0D1A00 saved game data, CORRUPTED
  59. >10 belong 0x0A0D1A00
  60. >>14 string >\0 %s saved game data