NSFe

From NESdev Wiki
Revision as of 21:09, 16 November 2012 by Rainwarrior (talk | contribs) (filling out definition)
Jump to navigationJump to search


NSFe is the Extended Nintendo Sound Format created by Disch and popularized by the NotSoFatso NSF player. It is based on the original NSF file format, but its data is organized differently and is not backward compatible.

Structure

The NSFe begins with a four byte header, containing the four characters 'NSFE'.

offset  # of bytes   Function
----------------------------
$0000   4   FOURCC   'N','S','F','E' (header)

After the header, a series of chunks will appear.

Chunks

All chunks have the same primary structure:

offset  # of bytes   Function
----------------------------
$0000   4   DWORD    Length of chunk data (n). Does not include the chunk's 8 byte header.
$0004   4   FOURCC   Four character chunk ID.
$0008   n   ----     Chunk data of specified length.

There are three chunks that are required for a well formed NSFe:

  • 'INFO' - Similar to an NSF header, must appear before 'DATA' chunk.
  • 'DATA' - Raw ROM data.
  • 'NEND' - Last NSFe chunk in file.

Note the 'INFO' chunk must precede the 'DATA' chunk, and the 'NEND' chunk marks the end of the file; no further chunks should be read past 'NEND'.

If the first byte of a chunk's FourCC ID is a capital letter (i.e. 'A' to 'Z'), it indicates that this chunk is mandatory, and if the NSFe player cannot read this type of chunk it should not attempt to play the file. All other chunks are considered optional, and may be skipped by the NSFe player if necessary.

To do: describe chunk types.

INFO

DATA

NEND

BANK

plst

time

fade

tlbl

auth

text

References