NES Sound Format - NESM Header Specification

NESM Header Specification

As said earlier, the NSF header is prepended to the original audio data and code. The header was designed to be as flexible as possible and to allow for hardware and emulation playback. The header supports three specific addresses; the first one is the beginning address of the audio data, the next two are entry points to the play and initialization code respectively.

The header supports PAL, NTSC, dual PAL/NTSC and also allows to adjust the playback speed. This playback speed is not meant to be used to adjust the speed of songs in a rip, but to account for various units with a microprocessor speed that is not considered standard, such as many clone Famicom/NES units from China. Be aware that some players do not support the playback speed.

The header also has an extra sound chip support setting for six expansion chips listed above. No commercial game ever used more than one expansion sound chip. However, many fan compositions do use up to all expansion sounds chips in the NSF format.

The header also has a total number of songs. However, this setting has a limit for 256 songs. In most cases you will never reach this limit.

There are also three slots for name of song, artist and copyright holder. Each one of these has a limit of 32 ASCII characters.

Bankswitching is also supported in the header format. The bank size select is 4KB for a total amount of FF(256) banks or a maximum limit of 1MB. There are 8 bank switching bytes, each one supports a 4KB section of the memory range used which is $6000 - $FFFF depending on if normal or FDS bankswitching is used. These bytes are the initial setting for banks to be loaded on reset.

Read more about this topic:  NES Sound Format