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