User:Zzo38/Compound NSF

From NESdev Wiki
< User:Zzo38
Revision as of 21:56, 22 March 2015 by Zzo38 (talk | contribs) (Created page with "This is a draft proposal of "Compound NSF" format. The file is a Hamster archive. All chunks are optional other than <tt>PAYLOAD.NSF</tt>. Unrecognized chunks should be ignore...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

This is a draft proposal of "Compound NSF" format. The file is a Hamster archive. All chunks are optional other than PAYLOAD.NSF. Unrecognized chunks should be ignored. An implementation does not need to read all chunks; it can skip any chunk that it doesn't need.

COMPOSER.TXT

List of composers of each song, one per each line. First line for song $00, second line for song $01, etc.

CONTROLS.BIN

Contains a number of small-endian 16-bit numbers for various optional features. List using word offsets (not byte offsets):

  • $00: Start RAM offset to load random data into.
  • $01: End RAM offset to load random data into. If supported, all from the start and end offset but not including the end offset, must be RAM addresses, and are filled with random data before calling init.
  • $02: If nonzero, write to this RAM address (just before calling play) to request to start a sound effect.
  • $03: If nonzero, write to this RAM address to request to stop a sound effect.

DURATION.TXT

Default duration for each song when using with playlists. For minutes:seconds or hours:minutes:seconds you can use colons between the numbers. If there is no colon, it is in frames instead.

PAYLOAD.NSF

This chunk has the same as ordinary NSF (version 1) except the header modified as follows:

  • Offset $006: If this is zero, then there are 256 songs in total.
  • Offset $007: If this is zero, then the default song is number $FF.
  • Offset $07C: Volume controls. Bit3 is MMC5 volume and bit2-bit0 is N163 volume. Other bits should always be clear. (This may be subject to moving to another offset for compatibility with NSF2)

MMC5 volume:

  • 0 = use default (same as 2A03 square waves)
  • 1 = use marked resistance value

N163 volume:

  • 0 = default (automatically)
  • 1 = 3.6x (Final Lap)
  • 2 = 4.0x (Megami Tensei II)
  • 3 = 6.0x
  • 4 = 6.5x (Rolling Thunder)
  • 5 = 7.3x (King of Kings)
  • 6 = 8.0x
  • 7 = 8.5x (Erika to Satoru no Yumebouken)

TITLE.TXT

List of song titles, one per each line. First line for song $00, second line for song $01, etc.