NES-style, not NES-accurate
Ettin is NES-style. It is not NES-accurate. This page explains how.
What the 2A03 is
The Ricoh 2A03 is the chip inside the NTSC Nintendo Entertainment System. It is a 6502 processor and a five-channel sound generator on one piece of silicon, clocked at 1.789773 MHz: two pulse channels, a triangle, a noise channel and a sample channel. Ricoh never published a datasheet for the sound side; everything known about it was reverse-engineered by the nesdev.org community. Ettin rebuilds the two pulse channels and nothing else.
Same
The way a note is made. A 2A03 pulse channel counts a timer down, and each time the timer reloads the output flips. Ettin does the same operation in software: a counter wraps and the output flips, and a comparison against the duty setting decides which part of the cycle is high. That is not an imitation of the recipe. It is the recipe, translated from a hardware counter into a few lines of code. The library’s band-limited square wave was thrown out early on for exactly this reason.
The four wave shapes. 12.5%, 25%, 50% and 75% pulse width, the exact set the chip offered. The keycaps step through them in that order. On the chip the 75% shape is the 25% shape inverted, with the same spectrum; that is true of Ettin, too.
No anti-aliasing. The chip’s hard edges produce digital artifacts on top of the note. Ettin does this. Deliberately. There is no band-limiting of any kind in the oscillator.
Two melodic voices, each with a decaying volume envelope. The chip’s pulse channels had a decay-only hardware envelope. Ettin’s voices strike and decay, with no sustain.
Different, on purpose
These are the things the chip could not do, and that Ettin does because it is a modular voice, not a console.
Continuous pitch. The chip’s pitch was a whole-number timer. The frequency of a pulse channel is f = CPU clock / (16 × (t + 1)) where the CPU clock at 1.789773 MHz and t is an 11-bit whole number.
Low notes have plenty of timer values between them; high notes do not. Above about 1 kHz the gaps between the available pitches are large enough to hear, so high notes on the console were audibly out of tune, and any t below 8 silences the channel outright.
Ettin tracks a volt-per-octave control voltage smoothly, with a calibrated pitch input per voice.
Continuous wave-shape control. On top of the four keycap steps, a jack bends the pulse width of both voices up or down with a control voltage. The chip had four settings and no way between them.
A smooth decay. The chip’s volume had sixteen steps, and its envelope unit moved between them about 240 times a second. Ettin’s decay envelope is continuous and runs from a click to about two seconds.
A bitcrusher. Not on the chip. Added because it belongs on a modular, and because it is a different kind of digital damage from the chip’s own aliasing: downsampling distortion on top of the structural artifacts. Also, ettins like to smash things into a pulp.
Two separate outputs. The chip mixed all five channels to one mono output. Ettin gives each voice its own output for further processing.
Different, and not yet done
These are the things the chip did that Ettin does not do yet.
The sweep unit. The chip could slide a note’s pitch automatically at a set rate, and a lot of what sounds like the console comes from it: the falling pitch on a kick drum, the rising pitch on an arpeggio. Ettin has no sweep. Pitch slides have to come from the patch.
The stair-stepped volume. Ettin’s envelope is smooth. The chip’s was sixteen hard steps at the frame-counter rate, and some of the grain of a console envelope comes from those steps.
The output mixer and its colouring. The chip mixed its channels through a specific resistor network, with a non-linear response, and the console’s output circuit rolled off the highs and shaped the artifacts. That colouring is a large part of why a console sounds like a console and not like generic chiptune. Ettin has a clean output stage.
The triangle, noise and sample channels. Looking at it. Triangle and noise are in the backlog, but so far I’ve stayed away from the sample channels.
The verdict
The oscillator core is the 2A03 pulse channel. The chip’s personality around that core, the sweep, the stepped volume, the mixer and the output colouring, is mostly not there. So: NES-style, never NES-accurate. The honest pitch is “the console’s pulse channels, modernised and opened up”, not “a console in a box”.
The plan is to add the missing quirks as optional modes once the hardware has settled: an 11-bit timer quantise mode for the pitch, and a stepped envelope that holds sixteen levels and only moves on the APU’s frame-counter ticks. The rule is that each one must be A/B-testable against an emulator playing the same material. The sweep unit is the undecided one: it sat in the Rev 2 firmware plan as a stretch goal and was never picked up, and the study guide marks it as probably never, since a control voltage into the pitch jack already covers it.
Why not a real chip
The purist’s answer exists: NESizer2, an open-source project that drives a real 2A03 harvested from a dead console. I think it’s super cool, but using a real 2A03 was not a goal of this project.
The chip’s sound registers are only reachable from the 6502 on the same die, so to play a note from outside you need a second microcontroller feeding the chip’s own processor the instructions to write its own registers. Once you are in, you get what the chip offers: four duty settings and sixteen volume steps. And the part itself has to be pulled from a console; nobody makes it.
Ettin wants the wave shape under voltage control and a continuous envelope, on a processor you can buy new. So it runs the chip’s recipe in software instead. If anything, the Daisy is overkill for this, as the total load for everything is only about 1-2% at 48kHz.