3 wadfs \- WAD file system
19 serves a file tree mounted at
23 that provides access to a
27 The command line options are:
31 Enable 9P debugging messages.
34 Set read-only file tree.
46 is a concatenation of uncompressed files, referred to as lumps.
47 A lump may contain either data,
48 or be used as a marker to indicate the beginning or end of a section,
49 segregating lumps of the same format.
52 represents section start markers as directories,
53 and regular lumps and end markers as files.
54 For convenience, lump file names are in lower case,
55 and are translated to the upper case internally.
57 At startup, if the path to a
59 file is provided as argument,
61 will attempt to parse it and construct a file tree.
64 starts with a blank tree instead.
66 Two additional files are provided in the file system's root directory:
70 Reading from and writing to
72 allows accessing and changing the
75 The only possible values are
83 file resulting from the recompilation of the lump tree.
84 .SS "WAD file structure"
85 There are few restrictions on the structure of
88 Excepting maps, sections can nest and may have no end marker,
89 or one named differently than the section itself.
90 Regular sections typically have one-letter names,
91 and nested sections use the same name appended by a digit.
93 lump names may only contain visible printing
96 excepting lower-case letters.
97 Map sections do not end at a marker but at the next non map lump,
98 and use hardcoded names, depending on game version.
101 imposes a number of additional restrictions on structure and naming:
103 Lump names may not contain upper-case letters and the
107 A map section may only contain map lumps, which use hardcoded names.
108 Ordering is significant, but is handled automatically.
109 Map sections may not nest.
111 Regular sections may not nest beyond one level,
112 and may not contain more than one end marker.
113 End markers may not exist outside of a section.
114 Directory names omit the start marker's
118 Excepting map lumps, no two lumps, including markers,
119 may have the same name.
121 Once created, a lump may not be renamed so as to change its type.
123 Upon parsing the initial
125 file, if one of the restrictions for
127 file structure outlined in the sections above is not respected,
128 a warning is issued, and the offending lump is potentially skipped.
129 Some recovery is attempted,
130 but one must systematically recheck the tree.
131 When duplicate non marker lumps are encountered,
132 each will overwrite the previous entry.
139 % games/wadfs /sys/games/lib/doom/doom2.wad
140 createfile SW18_7: file already exists
141 % games/mus /mnt/wad/d_romero | games/midi
151 then rename the end marker to
155 engine find the flat;
156 finally, compile and save the new
161 % games/wadfs -m /mnt/wad2
164 adding end marker FF_END
165 % cp ../wad/f/f1/f_sky1 ff/
166 % mv ff/ff_end ff/f_end
167 % cp WAD /sys/games/lib/doom/sky.wad
170 .B /sys/src/games/wadfs.c
176 first appeared in 9front (August, 2017).
180 files in the wild do not conform to all the rules exposed above,
181 in particular ones using
183 engine modifications.
185 using end markers outside of a section,