NES Sound Format

NES Sound Format


NSF is the DOS 8.3 filename Filename extension of the audio file format originally designated as NESM (Nintendo Entertainment System Music) by the inventor Kevin Horton. This format was originally designed for playback in a custom hardware device named HardNES by the inventor. Over the years, the NSF format has been implemented for playback on many platforms via plugins, stand-alone players, emulators and also the NES PowerPak.

The particulars of the NSF format resemble the SID format loosely, where a header is prepended and then the original audio data follows. The original audio data commonly has been extracted from a ROM image or disk image and then modified for stand-alone playback by various players. The original audio data is also commonly referred to as an audio driver or music engine. The audio driver is then completely isolated from the rest of the code, data and graphics that have nothing to do with the audio driver. A complete NSF is considered a multiple song and sound effect container for one particular game or composition.

The following 6502 platforms with a RP2A03/RP2A07 microprocessor including some clone units are compatible with the NSF format and current NSF players. These platforms can be PAL or NTSC or dual PAL/NTSC from any region. There are exceptions to the rule where if any part of a platform that has another microprocessor such as the Zilog Z80 will not be supported.

The following chips and components are supported in the NSF specification.

  • RP2A03 APU NTSC
  • RP2A07 APU PAL
  • RP2C33 Audio Channel (FDS)
  • Konami VRC VI Audio
  • Konami VRC VII Audio
  • Namco N106 Audio
  • Nintendo MMC5 Audio
  • Sunsoft 5B Audio (similar to AY-3-8910)

NSF format supports all five normal audio channels of the APU as well as the other audio expansion chips previously listed.

Contents

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.

NSF 2

Currently, NSF is at version 01h. NSF version 2 is a proposal that has been in discussion for a few years and hasn't been finalized as of yet. The reason why version 2 has been proposed is because the current NSF format doesn't support every possible configuration of a NES audio driver, which means that there are some NSFs that cannot be ripped without extensive hacking, or maybe it's impossible. There are also a handful that need to be reripped for this format.

The general idea is to support a initialization routine that never returns, IRQ and a proper NMI instead of a play entry point address call. Generally speaking, the initialization routine should return in 4 or less frames. If the routine does not return in time or not at all then the NSF will not play. The reason why you would need a non-returning routine is for PCM playback and a few NSFs that require a non-returning initialization.

There are some audio drivers that have a play call in the NMI as well as audio code in the IRQ. Since the NSF format currently does not support an additional IRQ address setting, those rips will not play either without extensive modification.

There are only approximately about 40 games that require this function to be ripped properly in NSF format. So, it's unknown as to when this format will be finalized. Quietust has implemented some features of this proposal in his emulator Nintendulator which allows both Battletoads and Battletoads & Double Dragon to play with raw PCM drums. There may be other players that support the watch-dog timer and/or non-returning features as well.

NSFE

NSFE is a 4 character file name extension for a new Extended NSF format. This format was extended by Disch and initially for his NSF Winamp plugin called NotSo Fatso as an extension to the original NSF format invented by Kevin Horton. NSFE was also created to add additional functions to NSFs such as timers for songs, fade-out time, arrange songs in a playlist, labels per song, the person who ripped the NSF and several other features. Since NotSo Fatso supports nearly every feature of the NSF format including all expansion chips, NSFE quickly gained in popularity. In order to implement these additional features, the format is chunked based. Thus, it's not ideal or possible to implement on any type of Famicom/NES hardware or FPGA type system without extensive modification. While the NSFE format shines on modern PC emulation platforms.

NSF hardware players

HardNES is the first NSF hardware player invented by Kevin Horton that is run by a NES CPU and a FPGA. It features a LED, stereo sound and 128 KB RAM chip which contains all the RAM used by the control system and the emulated ROM space that is bank-switched. The maximum NSF size would be under 128 KB.

CopyNES NSF Cart is another invention by Kevin Horton. The NSF Cart is used in combination with a CopyNES. The NSF file is transferred to the CopyNES and then to the NSF Cart for NSF playback. The maximum sized NSF for the original cart is 128 KB. It may be possible to install a larger RAM chip to play back larger NSFs.

NES PowerPak is a NES cartridge that has a CompactFlash card port that enables the transfer of ROM images to this cart. The 512 KB RAM chip and the FPGA circuits allow this cartridge to be flexible enough to support many iNES mappers including the NSF specification. Currently,[when?] NSF support does not include all expansion sound chips. Also, since the NES PowerPak's smallest bank size select is 8 KB and the NSF bank size select is 4 KB, there is a trick involved that effectively doubles the 4 KB banks but also limits the maximum NSF size to 256 KB.

NSF music composition

Over the years, the NSF format became so popular that many composers wished to create their own NES music. That day was realized when Nerdtracker first came out which is probably the first free public domain tracker. Since then, many other trackers and tools came out to compose NES music. All over the world and across the internet many composition contests are held such as the once a year Famicompo mini which is a Japanese hosted competition. The number of original compositions is beginning to rival the number of current commercial NSF game extractions.


See also


Wikimedia Foundation. 2010.

Игры ⚽ Поможем сделать НИР

Look at other dictionaries:

  • NES Sound Format — Das NES Sound Format bzw. Nintendo Sound Format (kurz NSF) ist ein Audio Format, das Anweisungen für die Sound Hardware des Nintendo Entertainment System (NES) enthält. NSF Dateien ähneln den SID Dateien des Commodore. NSF Dateien können aus ROM… …   Deutsch Wikipedia

  • NES Sound Format — Звуковой формат NES формат файла для хранения звука Nintendo Entertainment System. Создан Кевином Хортоном. Многие файлы NSF получают из ROM образов коммерческих игр Nintendo, содержащих все саундтреки, а иногда и звуковые эффекты. Композиторы и… …   Википедия

  • Game Boy Sound System — The Game Boy Sound System (or GBS) for the Game Boy is akin to the sound system of the Nintendo Entertainment System (NES), the difference being that GBS has a higher pitch than NES sound format. The GBS has two pulse waves, a voluntary channel… …   Wikipedia

  • Indiana Jones and the Temple of Doom (NES) — Infobox VG| title = Indiana Jones and the Temple of Doom developer = Atari Games publisher = Mindscapecite web | last = Miller | first = Skyler | title = Indiana Jones and the Temple of Doom | publisher = allgame | date = 2007 | url =… …   Wikipedia

  • List of file formats — This is an incomplete list, which may never be able to satisfy particular standards for completeness. You can help by expanding it with reliably sourced entries. See also: List of file formats (alphabetical) This is a list of file formats… …   Wikipedia

  • Famicon — Nintendo Entertainment System Hersteller …   Deutsch Wikipedia

  • Musikformat — Ein Musikformat ist ein Dateiformat, das den Aufbau eines Musikstückes beschreibt. Im Gegensatz zum Audioformat ist dabei kein vollständiges Tonsignal gespeichert, sondern lediglich einzelne Noten und möglicherweise Informationen über den Aufbau… …   Deutsch Wikipedia

  • Nintendo Entertainment System — Nintendo Entertainment System …   Deutsch Wikipedia

  • Nestopia — В данной статье или разделе имеется список источников или внешних ссылок, но источники отдельных утверждений остаются неясными из за отсутствия сносок …   Википедия

  • WinAMP — Entwickler: Nullsoft Aktuelle Version: 5.552 (21. April 2009) …   Deutsch Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”