2A03
The chip after the console

Getting it wrong is easy and audible

Band-limited synthesis, the non-linear mixer and the DMC's CPU stealing are the details that separate an accurate emulator from a plausible one.

A hand adjusts a knob on an old oscilloscope resting on a workbench
FIG. 1A scope on the bench is still how the arguments about band-limited synthesis get settled.Photo: cottonbro studio / Pexels

The gap between plausible and accurate

Silhouetted DJ raises both hands amid orange stage haze, laptops glowing on the decks
FIG. 4A chiptune set: real hardware on stage, and the console’s timing on stage with it.Photo: Maor Attias / Pexels

A plausible NES emulator is not a hard thing to build. Generate square waves at the right pitches, add some noise, fire a sample when the game asks for one — and the result sounds, to most ears, close enough. What it does not sound like is a real 2A03. The gap between plausible and accurate is filled by three problems that took the emulation community years to solve properly: the way the chip generates waveforms without aliasing, the way its five channels combine through a non-linear analog mixer, and the way the DPCM sample channel reaches into the CPU and takes the cycles it needs. Each problem is audible once you know where to listen.

Band-limited synthesis and the staircase that isn't there

A square wave in mathematics is built from an infinite series of odd harmonics: the fundamental, then the third, the fifth, the seventh, climbing forever. Real hardware cannot produce those upper harmonics — filters in the analog output stage round them off well before they cause trouble. A naive software emulator, however, simply flips a digital output between high and low at the right moment, producing a mathematically perfect square wave in software. At audio sample rates, those upper harmonics fold back down into the audible spectrum through a process called aliasing, producing false tones that were never in the original signal. The result is a slightly harsh, gritty edge on the pulse channels that real NES hardware simply does not have.

The fix, developed by the emulation and synthesis communities through the late 1990s and 2000s, is band-limited synthesis — specifically the use of band-limited step functions, often called BLEPs, to model each transition in a waveform so that harmonics above the Nyquist limit are suppressed before they can alias. The approach was documented in synthesis literature before it reached NES emulation, and applying it to the 2A03's pulse channels produces a measurably cleaner match to hardware captures. The difference on a spectrum analyser is unambiguous; in a blind listening test with headphones it is subtle but real — a slight softening that matches what analog circuitry actually does to a chip running at roughly 1.79 MHz.

Nintendo Famicom Disk System console, a red plastic drive unit with a disk slot
FIG. 2The Famicom Disk System RAM adapter, which brought a wavetable channel with it.Photo: Nintendo-Famicom-Disk-System-Deck-01 · Wikimedia Commons

The triangle channel adds its own complication. Unlike the pulse channels, the triangle produces a staircase waveform: not a smooth mathematical triangle but a 32-step approximation, because the channel steps through 32 positions per period, using 16 four-bit amplitude levels. At higher pitches, those steps become audible as a thin, metallic overtone series sitting above the fundamental. Accurate emulation reproduces the staircase rather than interpolating it away. Older emulators sometimes smoothed the triangle into a genuine triangle wave, which sounds cleaner but wrong — the grit is part of the instrument.

The DPCM channel, the chip's one-bit delta sample engine, steals CPU cycles to do its work.

The mixer that does not add

When the 2A03's channels combine, they do not simply sum. The chip uses two separate analog mixing networks, documented in the available die analysis and corroborated by hardware measurement: one for the two pulse channels, another for the triangle, noise and DPCM. Within each network, the relationship between register values and output voltage is non-linear — the curve bends away from what a linear sum would predict. Nintendo published no audio specification for the 2A03; the mixing behaviour has been reverse-engineered from hardware captures by the NESdev community and cross-checked against die photographs.

The practical consequence is that loud simultaneous notes do not sound as loud as a linear emulator says they should. The pulse channels, in particular, compress against each other when both are near full volume. Composers working on real hardware heard this compression and used it; a melody line on pulse one sits against a harmony on pulse two in a relationship that a linear emulator flatters. Turn both to maximum in real hardware and the combined output is lower than the arithmetic suggests. Emulators that treat the mixer as a simple sum reproduce the pitches correctly and the timbres approximately, but the dynamic balance between channels is subtly off — and anyone who has listened carefully to real hardware on a CRT television or on a Famicom's direct audio output will notice it.

The DMC's cycle theft

The DPCM channel, the chip's one-bit delta sample engine, steals CPU cycles to do its work. Every time the sample engine needs a new byte, the CPU is stalled for between one and four cycles while the DMA fetch completes. The timing of those stalls is not random: it is deterministic, governed by which cycle the CPU is on when the fetch is triggered, and game code that reads a controller or writes to a register in the same window as a DPCM fetch will get a subtly different result than it would without the sample running.

A stack of unlabelled cartridges on a plain surface
FIG. 3Cartridge ROM was sold by the kilobyte, which is the whole argument about the sample channel in one photograph.Photo: Famicom Mini collection boxes 1 · Wikimedia Commons

This matters for music because the 2A03's other channels are timed by the CPU writing to their registers. A stalled CPU writes late. A stalled CPU writing late shifts the timing of a note attack or an envelope step by a handful of cycles — inaudible in isolation, but cumulative across a track and measurable against a reference recording of the real hardware. Emulators that model the DMC DMA cycle-accurately reproduce small timing irregularities that are present in the original recordings. Emulators that approximate the stall — getting the byte count right but not the exact cycle position — introduce timing drift that pushes the emulated output microscopically ahead of or behind the hardware original.

None of this was obvious to the composers writing for the chip. Hirokazu Tanaka and Koji Kondo were not reasoning about cycle theft when they scored their games; they were writing to what they heard on the development hardware and the consumer Famicom. The cycle theft was simply part of the substrate, shaping results without being named. That is precisely why accurate emulation demands it be modeled: to reproduce what those composers heard, not what the register values alone would predict.

Why it matters now

The tracker scene, writing for the real chip through tools like FamiTracker, runs its output through emulation before anything reaches actual hardware. A plausible emulator is a plausible preview; an accurate one is the difference between a composition that sounds right on a real NES and one that surprises its creator at the hardware test. Band-limited waveforms, a non-linear mixer and cycle-accurate DPCM are not edge cases for obsessives. They are the documented behaviour of a specific piece of silicon, and the music that was written for that silicon was shaped by all three.