wadfs – WAD file system
serves a file tree mounted at
that provides access to a
The command line options are:
Enable 9P debugging messages.
Set read-only file tree.
Post channel on
is a concatenation of uncompressed files, referred to as lumps.
A lump may contain either data,
or be used as a marker to indicate the beginning or end of a section,
segregating lumps of the same format.
represents section start markers as directories,
and regular lumps and end markers as files.
For convenience, lump file names are in lower case,
and are translated to the upper case internally.
At startup, if the path to a
file is provided as argument,
will attempt to parse it and construct a file tree.
starts with a blank tree instead.
Two additional files are provided in the file system’s root directory:
Reading from and writing to
allows accessing and changing the
The only possible values are
(the default) and
returns the new
file resulting from the recompilation of the lump tree.
WAD file structure
There are few restrictions on the structure of
Excepting maps, sections can nest and may have no end marker,
or one named differently than the section itself.
Regular sections typically have one-letter names,
and nested sections use the same name appended by a digit.
lump names may only contain visible printing
excepting lower-case letters.
Map sections do not end at a marker but at the next non map lump,
and use hardcoded names, depending on game version.
imposes a number of additional restrictions on structure and naming:
Lump names may not contain upper-case letters and the
A map section may only contain map lumps, which use hardcoded names.
Ordering is significant, but is handled automatically.
Map sections may not nest.
Regular sections may not nest beyond one level,
and may not contain more than one end marker.
End markers may not exist outside of a section.
Directory names omit the start marker’s
Excepting map lumps, no two lumps, including markers,
may have the same name.
Once created, a lump may not be renamed so as to change its type.
Upon parsing the initial
file, if one of the restrictions for
file structure outlined in the sections above is not respected,
a warning is issued, and the offending lump is potentially skipped.
Some recovery is attempted,
but one must systematically recheck the tree.
When duplicate non marker lumps are encountered,
each will overwrite the previous entry.
and play a MUS file:
% games/wadfs /sys/games/lib/doom/doom2.wad
createfile SW18_7: file already exists
% games/mus /mnt/wad/d_romero | games/midi
Now create a blank
then one section
copy a flat from
to the directory,
then rename the end marker to
to have the
engine find the flat;
finally, compile and save the new
% games/wadfs -m /mnt/wad2
% cd /mnt/wad2
% mkdir ff
adding end marker FF_END
% cp ../wad/f/f1/f_sky1 ff/
% mv ff/ff_end ff/f_end
% cp WAD /sys/games/lib/doom/sky.wad
first appeared in 9front (August, 2017).
files in the wild do not conform to all the rules exposed above,
in particular ones using
using end markers outside of a section,
will lose them.
files can be a pain.