PSFTagFormat

HomePage :: Categories :: Login

PSF Tag Format


The tag in a PSF file is a raw block of 8-bit text consisting of a series of lines of the format variable=value, as in the following example:

  title=Earth Painting
  artist=Yoko Shimomura
  game=Legend of Mana
  year=1999


Parsing details


The tag is to be parsed as follows:


  comment=This is a
  comment=multiple-line
  comment=comment.



Predefined variables


The following variable names are predefined:

title, artist, game, year, genre, comment, copyright
(These are self-explanatory.)

psfby, ssfby, dsfby, usfby, qsfby
The name of the person responsible for creating the file. This does not imply that said person wrote the music driver code.

volume
Relative volume of the PSF as a simple scale coefficient. 1.0 is the default. It can by any real number, even negative.

length
fade
Length of the song, and the length of the ending fadeout. These may be in one of three formats:
The decmial portion may be omitted. Commas are also recognized as decimal separators.

utf8
If the tag contains a variable named "utf8" (it may be set to any non-empty value), then all strings in the tag must be decoded as UTF-8. If this variable is not present, strings may be decoded using the default system code page, or a heuristic may be used to autodetect the code page.

New applications should always encode tags as UTF-8, and should always include a utf8 variable to mark that the tag was encoded as UTF-8.

Reserved variables


The following variables are reserved and should not be used:


These are reserved for information crucial to playing, i.e. the _lib tags in MiniPSF files.



CategoryPSF