| image = file:RP2A03E.jpg
| caption =
| produced-start = 1982{{Start date and age|1983}}
| produced-end = 2003
| slowest = 1.79 | slow-unit = [[Megahertz|MHz]]
== Technical details ==
The Ricoh 2A03<ref name="visual6502">{{cite web|url=http://visual6502.org/images/pages/Nintendo_RP2A_die_shots.html|title=Nintendo RP2A03 and RP2A07 - an high quality picture of the die|last=Sattler|first=Christian|website=visual6502.org|access-date=2020-08-12}}.</ref> containedcontains aan [[secondunlicensed source]]dderivative of the [[MOS Technology 6502]] core, modified to disable the 6502's [[binary-coded decimal]] mode (possibly to avoid a MOS Technology patent<ref>[https://patents.google.com/patent/US3991307 Patent US3991307]</ref>). It also integratedintegrates a [[programmable sound generator]] (also known as APU, featuring twenty two [[memory-mapped I/O]] registers),<ref>{{Cite web|url=http://www.atkinsoft.com/soundgenerators.html|title=Sound generators of the 1980s home computers|website=www.atkinsoft.com|access-date=2019-12-02}}</ref> rudimentary [[Direct memory access|DMA]], and game controller polling.<ref name="2A03techref">{{cite web|url=https://www.nesdev.com/2A03%20technical%20reference.txt|title=2A03 technical reference|last=Taylor|first=Brad|date=April 23, 2004|website=NesDev.com|archive-url=https://web.archive.org/web/20181017163239/https://www.nesdev.com/2A03%20technical%20reference.txt|archive-date=October 17, 2018|url-status=live|access-date=June 6, 2008}}</ref>
The Ricoh 2A03's sound hardware has 5 channels, separated into two APUs (Audio Processing Unit). The first APU contains two general purpose pulse channels with 4 duty cycles, and the second APU contains a Triangle wave generator, a [[Linear-feedback shift register|LFSR]]-based Noise generator, and one Delta-Modulated PCM (DPCM) channel. While a majority of the NES library used only 4 channels, more games later into the NES's life span used the 5th DPCM channel, as memory mappers became more common and prices of ROM chips became cheaper. For example, [[Super Mario Bros. 3]] uses it for simple drum sounds, while other games like [[Journey to Silius]] use it for sampled basslines. An interesting quirk of the DPCM channel is that the bit order is reversed compared to what is normally expected for input, as a result, many games often ignore this quirk, which results in distorted sounding samples.<ref>{{cite web |url=https://tcrf.net/Ufouria:_The_Saga#Sound_Design_Quirks |website=The Cutting Room Floor |access-date=9 October 2021}}</ref> ▼
▲== Sound Hardwarehardware ==
The sound output by the Ricoh 2A03 is present on two pins, which are then mixed using a non-linear mixing circuit. On Famicom and Dendy systems, this is then output to the cartridge slot, where an expansion sound chip may add its own mixed sound into the resulting output, which is then fed back into the console. International NES systems instead output the 2A03's sound directly to the TV, but expansion sound functionality can be restored by a simple pin mod on the expansion port, allowing the internal mixer to add the cartridge's expansion sound output from the expansion port.<ref>{{cite web |last1=Burke |first1=Kevin |title=NES Expanded Audio: 100k Pot Mod |url=https://curriculumcrasher.com/2017/01/24/nes-expanded-audio-100k-pot-mod/ |website=The Curriculum Crasher |access-date=9 October 2021}}</ref> ▼
▲The Ricoh 2A03's sound hardware has 5 channels, separated into two APUs (Audio Processing UnitUnits). The first APU contains two general purpose pulse channels with 4 duty cycles, and the second APU contains a Triangle[[triangle wave ]] generator, aan [[Linear-feedback shift register|LFSR]]-based Noise generator, and onea 1-bit [[Delta modulation]]- Modulatedencoded PCM (DPCM) channel. While a majority of the NES library useduses only 4 channels, morelater games later into the NES's life span useduse the 5th DPCM channel , asdue memoryto mapperscartridge became more common and prices ofmemory ROMexpansions chips becamebecoming cheaper. For example, [[Super Mario Bros. 3]] uses itthe DPCM channel for simple drum sounds, while other games like [[Journey to Silius]] useuses it for sampled basslines. An interesting quirk of the DPCM channel is that the bit order is reversed compared to what is normally expected for input,1-bit asPCM. aMany result,developers manywere gamesunaware often ignoreof this quirkdetail, whichcausing resultssamples into be distorted soundingduring samplesplayback.<ref>{{cite web |title=Voice Samples in 'Double Dribble (NES)'|url=https://tcrf.net/ Ufouria:_The_SagaDouble_Dribble_(NES)# Sound_Design_QuirksVoice_Samples|access-date=5 April 2023|website=The Cutting Room Floor |access-date=9 October 2021}}</ref>
▲The sound output byof theeach Ricoh 2A03channel is presentmixed onnon-linearly twoin pins,their whichrespective areAPU then mixed using a non-linearbefore mixingbeing circuitcombined. On Famicom and Dendy systems, this is then output to the cartridge slot, where an expansion sound chipchips may add itstheir own mixed sound intoto the resulting output , whichvia isa thenpin fedon backthe intogame the consolecartridge. InternationalExpansion NESaudio systemscapabilities insteadwere outputremoved thefrom 2A03'sinternational soundNES directly to the TVsystems, but expansion sound functionality can be restored by a simple pin mod onmodifying the expansion port , allowinglocated the internal mixer to addon the cartridge'sbottom expansion sound output fromof the expansion portsystem.<ref>{{cite web |last1=Burke |first1=Kevin |title=NES Expanded Audio: 100k Pot Mod |url=https://curriculumcrasher.com/2017/01/24/nes-expanded-audio-100k-pot-mod/ |website=The Curriculum Crasher |date=24 January 2017 |access-date=9 October 2021}}</ref>
== Regional variations ==
PAL versions of the NES (sold in Europe, Asia, and [[Video gaming in Australia|Australia]]) useduse the '''Ricoh 2A07''' or '''RP2A07''' processor, which wasis identical to thea 2A03 exceptwith formodifications ato differentbetter [[Frequency divider|clock divider]] andsuit the 50 [[Hertz|Hz]] [[Refresh rate|vertical refresh rate]] used in the PAL television standard. However, withmost thedevelopers exception oflacked the 16resources hard-codedto samplingproperly ratesadjust fortheir thegames' [[Deltamusic modulation]]-encodedfrom sampleNTSC playbackto unit.PAL, The changes were made in order for sampled soundsleading to maintainmany thePAL originalgames pitchsounding ofslower, theslightly RP2A03lower-pitched, withand thein newsome clock divider. Most developers howevercases, usuallyout-of-tune lacked the resourcescompared to properly convert their gamesoriginal toNTSC thereleases.{{citation 2A07,needed|date=April leading2024|reason=Common toon mostcomputers, gamesbut oftenon sounding out of tune or off-tempo.consoles?}}
==See also==
[[Category:65xx microprocessors]]
[[Category:Sound chips]]
{{Nintendo-stub}}
{{videogame-hardware-stub}}
|