apple 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. #------------------------------------------------------------------------------
  2. # apple: file(1) magic for Apple file formats
  3. #
  4. 0 string FiLeStArTfIlEsTaRt binscii (apple ][) text
  5. 0 string \x0aGL Binary II (apple ][) data
  6. 0 string \x76\xff Squeezed (apple ][) data
  7. 0 string NuFile NuFile archive (apple ][) data
  8. 0 string N\xf5F\xe9l\xe5 NuFile archive (apple ][) data
  9. 0 belong 0x00051600 AppleSingle encoded Macintosh file
  10. 0 belong 0x00051607 AppleDouble encoded Macintosh file
  11. # magic for Newton PDA package formats
  12. # from Ruda Moura <ruda@helllabs.org>
  13. 0 string package0 Newton package, NOS 1.x,
  14. >12 belong &0x80000000 AutoRemove,
  15. >12 belong &0x40000000 CopyProtect,
  16. >12 belong &0x10000000 NoCompression,
  17. >12 belong &0x04000000 Relocation,
  18. >12 belong &0x02000000 UseFasterCompression,
  19. >16 belong x version %d
  20. 0 string package1 Newton package, NOS 2.x,
  21. >12 belong &0x80000000 AutoRemove,
  22. >12 belong &0x40000000 CopyProtect,
  23. >12 belong &0x10000000 NoCompression,
  24. >12 belong &0x04000000 Relocation,
  25. >12 belong &0x02000000 UseFasterCompression,
  26. >16 belong x version %d
  27. # The following entries for the Apple II are for files that have
  28. # been transferred as raw binary data from an Apple, without having
  29. # been encapsulated by any of the above archivers.
  30. #
  31. # In general, Apple II formats are hard to identify because Apple DOS
  32. # and especially Apple ProDOS have strong typing in the file system and
  33. # therefore programmers never felt much need to include type information
  34. # in the files themselves.
  35. #
  36. # Eric Fischer <enf@pobox.com>
  37. # AppleWorks word processor:
  38. #
  39. # This matches the standard tab stops for an AppleWorks file, but if
  40. # a file has a tab stop set in the first four columns this will fail.
  41. #
  42. # The "O" is really the magic number, but that's so common that it's
  43. # necessary to check the tab stops that follow it to avoid false positives.
  44. 4 string O==== AppleWorks word processor data
  45. >85 byte&0x01 >0 \b, zoomed
  46. >90 byte&0x01 >0 \b, paginated
  47. >92 byte&0x01 >0 \b, with mail merge
  48. #>91 byte x \b, left margin %d
  49. # AppleWorks database:
  50. #
  51. # This isn't really a magic number, but it's the closest thing to one
  52. # that I could find. The 1 and 2 really mean "order in which you defined
  53. # categories" and "left to right, top to bottom," respectively; the D and R
  54. # mean that the cursor should move either down or right when you press Return.
  55. #30 string \x01D AppleWorks database data
  56. #30 string \x02D AppleWorks database data
  57. #30 string \x01R AppleWorks database data
  58. #30 string \x02R AppleWorks database data
  59. # AppleWorks spreadsheet:
  60. #
  61. # Likewise, this isn't really meant as a magic number. The R or C means
  62. # row- or column-order recalculation; the A or M means automatic or manual
  63. # recalculation.
  64. #131 string RA AppleWorks spreadsheet data
  65. #131 string RM AppleWorks spreadsheet data
  66. #131 string CA AppleWorks spreadsheet data
  67. #131 string CM AppleWorks spreadsheet data
  68. # Applesoft BASIC:
  69. #
  70. # This is incredibly sloppy, but will be true if the program was
  71. # written at its usual memory location of 2048 and its first line
  72. # number is less than 256. Yuck.
  73. 0 belong&0xff00ff 0x80000 Applesoft BASIC program data
  74. #>2 leshort x \b, first line number %d
  75. # ORCA/EZ assembler:
  76. #
  77. # This will not identify ORCA/M source files, since those have
  78. # some sort of date code instead of the two zero bytes at 6 and 7
  79. # XXX Conflicts with ELF
  80. #4 belong&0xff00ffff 0x01000000 ORCA/EZ assembler source data
  81. #>5 byte x \b, build number %d
  82. # Broderbund Fantavision
  83. #
  84. # I don't know what these values really mean, but they seem to recur.
  85. # Will they cause too many conflicts?
  86. # Probably :-)
  87. #2 belong&0xFF00FF 0x040008 Fantavision movie data
  88. # Some attempts at images.
  89. #
  90. # These are actually just bit-for-bit dumps of the frame buffer, so
  91. # there's really no reasonably way to distinguish them except for their
  92. # address (if preserved) -- 8192 or 16384 -- and their length -- 8192
  93. # or, occasionally, 8184.
  94. #
  95. # Nevertheless this will manage to catch a lot of images that happen
  96. # to have a solid-colored line at the bottom of the screen.
  97. 8144 string \x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F Apple II image with white background
  98. 8144 string \x55\x2A\x55\x2A\x55\x2A\x55\x2A Apple II image with purple background
  99. 8144 string \x2A\x55\x2A\x55\x2A\x55\x2A\x55 Apple II image with green background
  100. 8144 string \xD5\xAA\xD5\xAA\xD5\xAA\xD5\xAA Apple II image with blue background
  101. 8144 string \xAA\xD5\xAA\xD5\xAA\xD5\xAA\xD5 Apple II image with orange background
  102. # Beagle Bros. Apple Mechanic fonts
  103. 0 belong&0xFF00FFFF 0x6400D000 Apple Mechanic font