The Wobble That Haunts Retro Gaming

If you've ever played an NES over composite video, you've seen it: static title screens that shimmer and wobble frame to frame. This isn't noise or interference — it's a deliberate design artifact from the PPU's color encoding. The source article (nicole.express) dissects the exact timing reasons behind this three-line pattern and the clever (but imperfect) fix Ricoh implemented.

The Core Problem: 227.33 Color Cycles Per Line

The NES uses a 21.47727 MHz crystal oscillator, exactly six times the NTSC colorburst frequency (3.579545 MHz). The PPU divides this by 12 to get 12 possible phases for color generation, giving the NES its 12-hue palette. The pixel clock is derived by dividing the master oscillator by 4, yielding 5.3693175 MHz. With 341 dots per scanline, the line rate becomes 15.7458 kHz — close to NTSC's 15.734 kHz.

Crucially, the colorburst frequency divided by the line rate gives 227.33 cycles per scanline, not the standard 227.5. This fractional remainder causes the colorburst alignment to shift by 0.5 cycles every three lines, creating a repeating three-line pattern visible as wobble.

The Missing Dot: Lazy Interlacing

Ricoh engineers noticed that across 262 scanlines (including vertical blanking), the 227.33 cycles would produce a three-frame pattern of colorburst alignments. Their solution: alternate the last scanline between 341 and 340 dots — a "missing dot" — effectively reducing the pattern to two frames. This mimics the behavior of a proper 227.5-cycle system, where two alignments alternate every other frame.

This trick only applies when the PPU is rendering. If both background and sprite rendering are disabled (common for CHR-RAM uploads), the missing dot is skipped. Games like Rare's Battletoads (AxROM) exploit this by turning off rendering every frame to maximize VRAM access, inadvertently reverting to the three-frame pattern. The article notes that in Battletoads, the HUD's rainbow banding repeats every three frames, confirming the fix is bypassed.

Comparison with Other Systems

The Apple II (Woz's design) uses 228 color cycles per scanline, breaking the 227.5 standard and allowing luminance to interfere with chrominance — the basis of artifact color. The Sega Master System also uses 228 cycles, but its VDP outputs RGB, with an external encoder (e.g., Sony CXA1145) adding composite artifacts like rainbow banding. The PC Engine (TurboGrafx-16) uses the proper 227.5 cycles, resulting in a two-line pattern visible in static screens.

The NES's lack of an RGB intermediary — the PPU directly outputs composite — makes its timing unique. The palette is defined by 12 hues and 4 brightness levels, mapped directly from the 12-phase color carrier. This contrasts with the Atari 2600, which has 16 hues and an S-Video intermediary.

Practical Implications

For retro developers, understanding this timing is crucial when designing for composite output. The missing dot trick means that static screens appear stable, but scrolling can reveal shimmering artifacts as the colorburst alignment shifts with motion. The article's deep dive into the NES's crystal oscillator and divisors provides a concrete example of how hardware timing constraints shape visual output.

Why It Matters Today

Emulator authors and FPGA implementers must account for this behavior to accurately reproduce NES video. Misunderstanding the missing dot can lead to incorrect color artifacts or missing the three-frame pattern in games that disable rendering. The source article is a must-read for anyone working on NES hardware emulation or composite video signal analysis.