Ricoh RP2A03

From vgmrips
RP2A03
NES APU
Manufacturer(s) Ricoh
Designer(s) Ricoh, Nintendo
Release Date(s) 1982
Type(s) PSG
Amount of channels 2 (mixed to mono)
Amount of voices 5
VGM support since 1.61


The RP2A03 (NES APU, PAL variant known as RP2A07) is the main processor in the Famicom and NES. It was also used as a sound co-processor in some Nintendo arcade games, including Punch-Out!!. Aside from a 6502 CPU core, the RP2A03 also contains a DMA controller and a programmable sound generator, in this context often referred to as the APU.

Sound

The RP2A03's sound capabilities include:

Pulse channels

The pulse of the square wave can be adjusted. The possible modes are:

  • 12.5% pulse
  • 25% pulse
  • 50% pulse
  • inverted 25% pulse (or 75% pulse)

Triangle channel

The triangle wave plays at an octave lower than the square waves. It and the DPCM channels are also the only channel where the volume cannot be controlled directly. (Although, due to the nature of the NES' mixer, the volume can be affected by the state of the DPCM channel)

Noise channel

The frequency of the noise channel can be adjusted in 15 steps.

On the first revision of the RP2A03, only seen in arcade machines and pre-recall Famicom units, the noise generator's sequence length is always 32767 steps. Further revisions of the chip added a mode flag, which could change the sequence length to 31 or 93 steps (the length depends on when the mode flag was set).

DPCM channel

The state of the DPCM channel can be written directly by software. This is most often done in order to change the volume of the triangle and noise channels (Super Mario Bros. does this), however, it can also be used as a 7-bit DAC.

Mixing

The RP2A03 outputs audio to two channels, one for the two square wave channels and one for the triangle, noise and DPCM channels. Since the square wave is calculated independently and the non-linear nature in how the RP2A03's internal DAC is constructed, the state of the DPCM channel (ie, a DC offset) affects the output volume of the noise and triangle channels, but not the square wave channels.

Links

NESDev Wiki page on NES APU

NESDev Wiki pages on expansion audio