NTSC composite video emulator
A test picture is encoded into a continuous, sampled 525-line composite stream with real equalizing and serrated vsync pulses. A software sync processor then clamps, slices, qualifies HSYNC, runs a line PLL, detects VSYNC, identifies the field, and decodes back to progressive RGB. Break the sync and watch the picture roll.
- Sample at 4×fsc. 910 samples per line at 14.318 MHz; one continuous 477,750-sample frame, so field 2 begins at mid-line.
- Clamp & slice. The back porch is measured and subtracted, then a comparator with hysteresis turns the signal into a binary sync stream.
- Qualify HSYNC. Only 3.5–6 µs pulses inside the PLL window count; equalizing pulses and noise are rejected while the flywheel coasts.
- Detect VSYNC. An RC integrator or a >10 µs pulse-width window finds the broad pulses; their offset from HSYNC (0 or ½ line) tells odd from even.
- Skew. Tape jitter, head switching, a slow sync edge from APL tilt or bright-edge bleed, and line-rate offsets all move HSYNC. The PLL gain trades how fast it tracks against how much jitter gets through.
- Split Y and C. Notch/bandpass, a 2-D adaptive comb, or a 3-D filter that mixes in the previous frame where the picture is still.
- Lock to colour burst. A gated phase detector compares the back-porch burst with a local 315/88 MHz oscillator. The PLL loop filter steers it, and a colour killer cuts colour when the burst is too weak.
- Demodulate & de-interlace. Burst-locked U/V demodulation, then fields are woven or bobbed into 60 full frames.
- Composite quirks. Pick "NTSC quirks lab". Dot crawl is real cross-luminance: leftover 3.58 MHz subcarrier stays in the luma. Its phase flips every line and every frame, so the dots crawl. Raise the "Dot crawl" slider or use the 1-D notch to see it clearly. Rainbow banding is fine stripes decoded as colour, the Apple II trick. Colour bleed comes from narrow chroma bandwidth; raise the smear slider. Pseudo-transparency is dithered columns blurred together, the Sonic waterfall trick.