MiniPSF2

HomePage :: Categories :: Login

MiniPSF2


MiniPSF2 files are regular PSF2 files which import filesystem data from one or more PSF2Lib files residing in the same directory. This is useful for shared driver code, sound banks, etc.

PSF2Lib files are also regular PSF2 files. They can also recursively import data from other PSF2Lib files.

This is done via tag variables called _lib, _lib2, _lib3, etc.

Loading Procedure


The proper way to load a MiniPSF2 is as follows:

  1. First, recursively load the virtual filesystems from each PSF2 file named by a library tag.
    • The first tag is "_lib"
    • The remaining tags are "_libN" for N>=2 (use "_lib%d")
    • Stop at the first tag name that doesn't exist.
  2. Then, load the virtual filesystem from the current PSF2 file.

If there are conflicting or redundant filenames, they should be overwritten in memory in the order in which the filesystem data was parsed. Later takes priority.

Path


Filenames given in any _lib* tag are relative to the directory in which the PSF file itself resides. Both forward and backward slashes should be interpreted as path separators. For instance:


Filenames may contain spaces within, but no leading or trailing spaces.

Detection


When determining whether a PSF2 file is a MiniPSF2 and will need additional data, you should use the presence of the _lib tags to decide, rather than the file extension. It's a MiniPSF2 if it includes a "_lib" tag.

Refresh Rate


The behavior of the _refresh tag in MiniPSF2 and PSF2Lib files is identical to the MiniPSF and PSFLib behavior.


CategoryPSF