PSF2VirtualFilesystem

HomePage :: Categories :: Login

PSF2 Virtual Filesystem


The PSF2 virtual filesystem is a directory hierarchy with filenames of up to 36 characters each.

Filenames are case-insensitive and must consist exclusively of characters in the ASCII 32-126 range, with the exception of the forward slash, backslash, and colon (/, \, :) characters. The total length of a path must be no longer than 255 bytes.

All quantities are stored in little-endian unsigned format. All offsets are relative to the beginning of the Reserved section.

Starting at offset 0 is the root directory.

Directory Format


A directory has the following format:


N may be zero to indicate the directory is empty.

Directory Entries


The format of a directory entry is as follows:


If U, B, and O are all zero, then the entry describes a zero-length file. In this case, there is no data.

If U and B are zero and O is nonzero, the entry describes a subdirectory.

Otherwise, the entry describes a regular file.

File Data Format


File data is stored as a sequence of consecutive zlib compress()-format blocks.


Consistency


The offset of any subdirectory or file must be greater than the offset of its directory entry. This provides for easier consistency checks.


CategoryPSF