Nintendo Sound Format

From MultimediaWiki
Revision as of 00:58, 20 January 2012 by GreaseMonkey (talk | contribs) (here, have some info)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
  • Extension: nsf

NSF files contain music playback programs extracted from Nintendo Entertainment System (NES) games.

Header

As given in the official specification:

offset  # of bytes   Function
----------------------------

0000    5   STRING  "NESM",01Ah  ; denotes an NES sound format file
0005    1   BYTE    Version number (currently 01h)
0006    1   BYTE    Total songs   (1=1 song, 2=2 songs, etc)
0007    1   BYTE    Starting song (1= 1st song, 2=2nd song, etc)
0008    2   WORD    (lo/hi) load address of data (8000-FFFF)
000a    2   WORD    (lo/hi) init address of data (8000-FFFF)
000c    2   WORD    (lo/hi) play address of data (8000-FFFF)
000e    32  STRING  The name of the song, null terminated
002e    32  STRING  The artist, if known, null terminated
004e    32  STRING  The Copyright holder, null terminated
006e    2   WORD    (lo/hi) speed, in 1/1000000th sec ticks, NTSC (see text)
0070    8   BYTE    Bankswitch Init Values (see text, and FDS section)
0078    2   WORD    (lo/hi) speed, in 1/1000000th sec ticks, PAL (see text)
007a    1   BYTE    PAL/NTSC bits:
                 bit 0: if clear, this is an NTSC tune
                 bit 0: if set, this is a PAL tune
                 bit 1: if set, this is a dual PAL/NTSC tune
                 bits 2-7: not used. they *must* be 0
007b    1   BYTE    Extra Sound Chip Support
                 bit 0: if set, this song uses VRCVI
                 bit 1: if set, this song uses VRCVII
                 bit 2: if set, this song uses FDS Sound
                 bit 3: if set, this song uses MMC5 audio
                 bit 4: if set, this song uses Namco 106
                 bit 5: if set, this song uses Sunsoft FME-07
                 bits 6,7: future expansion: they *must* be 0
007c    4   ----    4 extra bytes for expansion (must be 00h)
0080    nnn ----    The music program/data follows

Note that only the Namco 163 has a sound expansion, not the (very similar) Namco 106 as noted.

External links

TODO: this isn't actually a "music pattern format" - it's an executable one.