Back to Architecture page

Audio Processing Unit
The NES APU is the audio processing unit in the NES console which generates sound for games.
The NES APU is the audio processing unit in the NES console which generates sound for games. It is implemented in the RP2A03 (NTSC) and RP2A07 (PAL) chips. Its registers are mapped in the range $4000 to $4013, $4015 and $4017. The APU has five channels: two pulse wave generators, a triangle wave, noise, and a delta modulation channel for playing DPCM samples. Each channel has a variable-rate timer clocking a waveform generator, and various modulators driven by low-frequency clocks from the frame counter. The DMC plays samples while the other channels play waveforms. Each sub-unit of a channel generally runs independently and in parallel to other units, and modification of a channel's parameter usually affects only one sub-unit and doesn't take effect until that unit's next internal cycle begins. The read/write status register allows channels to be enabled and disabled, and their current length counter status to be queried. The outputs from all the channels are combined using a non-linear mixing scheme.
Channels
The pulse, triangle, and noise channels will play their corresponding waveforms (at either a constant volume or at a volume controlled by an envelope) only when (and in the model given here, precisely when) their length counters are all non-zero (this includes the linear counter for the triangle channel). There are two exceptions for the pulse channels, which can also be silenced either by having a frequency above a certain threshold (see below), or by a sweep towards lower frequencies (longer periods) reaching the end of the range. The DMC channel always outputs the value of its counter, regardless of the status of the DMC enable bit; the enable bit only controls automatic playback of delta-encoded samples (which is done through counter updates). The pulse channels produce a variable-width pulse signal, controlled by volume, envelope, length, and sweep units. The triangle channel produces a quantized triangle wave. It has no volume control, but it has a length counter as well as a higher resolution linear counter control (called "linear" since it uses the 7-bit value written to $4008 directly instead of a lookup table like the length counter). The noise channel produces noise with a pseudo-random bit generator. It has a volume, envelope, and length counter like the pulse channels. The delta modulation channel outputs a 7-bit PCM signal from a counter that can be driven by DPCM samples.