Skip to main content
NESdev Wiki
Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

2A03

The Ricoh RP2A03 is the main processor used in Nintendo Entertainment System (NES) and its region variants. It consists of a MOS Technology 6502 microprocessor core (lacking decimal mode), 5-channel programmable sound generator, joypad I/O, and DMA devices. PAL systems contains RP2A07, which has minor differences compared to the NTSC version, such as a different clock divider, adjusted sampled audio rates, and DMA bugfixes.

2A03 register map

In addition to the registers in the 6502 core, the 2A03 provides its own 22 memory-mapped registers for sound generation (see NES APU), joystick I/O, and OAM DMA transferring. Unlike the addresses of PPU registers and mapper registers, CPU register addresses are completely decoded, which means that the entire space from the end of CPU registers to the top of address space ($4020 through $FFFF) is available to the Game Pak.

The range $4018-$401F does nothing on a retail NES. It was intended for 2A03 functionality that never made it to production. Various revisions of the 2A03 include test registers (which are disabled in normal operation) or remnants of an incompletely implemented IRQ counter that was disconnected from the rest of the circuit. Mappers can place writable registers here without conflicting with the 2A03, but placing readable registers here should be avoided because of conflicts with DMA.

AddressNameWriteRead
$4000SQ1_VOLPulse 1Duty cycle and volumeOpen bus
$4001SQ1_SWEEPSweep control register
$4002SQ1_LOLow byte of period
$4003SQ1_HIHigh byte of period and length counter value
$4004SQ2_VOLPulse 2Duty cycle and volume
$4005SQ2_SWEEPSweep control register
$4006SQ2_LOLow byte of period
$4007SQ2_HIHigh byte of period and length counter value
$4008TRI_LINEARTriangleLinear counter
$4009Unused
$400ATRI_LOLow byte of period
$400BTRI_HIHigh byte of period and length counter value
$400CNOISE_VOLNoiseVolume
$400DUnused
$400ENOISE_LOPeriod and waveform shape
$400FNOISE_HILength counter value
$4010DMC_FREQDMCIRQ flag, loop flag and frequency
$4011DMC_RAW7-bit DAC
$4012DMC_STARTStart address = $C000 + $40*$xx
$4013DMC_LENSample length = $10*$xx + 1 bytes (128*$xx + 8 samples)
$4014OAMDMAOAM DMA: Copy 256 bytes from $xx00-$xxFF into OAM via OAMDATA ($2004)
$4015SND_CHNSound channels enableSound channel and IRQ status
$4016JOY1Joystick strobeJoystick 1 data
$4017JOY2Frame counter controlJoystick 2 data
$4018-$401AAPU test functionality that is normally disabled. See CPU Test Mode.
$401C-$401FUnfinished IRQ timer functionality that is always disabled. See RP2A03 Programmable Interval Timer.

See also

Edit this page on GitHub