By request, here’s a quick ‘n dirty test harness, and sample code, for NTSC artifacts in the style of the 8-bit Nintendo Entertainment System (NES):
Click the animation to change scale & scroll speed.
Source code & .fla: nes_ntsc.zip
The .pbk code is not optimized yet. The code is fairly explicit, I tried to explain how it works in the comments. Blargg’s pages have better explanations tho.
The test harness lets you select two flavors of the effect. The numbers 8 and 12 denote the width of the lowpass window used for applying crosstalk. 12 is more processor-intensive, but will look “smoother”, which may not be what you want. The mathematics can be reduced to a few (long) lines, which should reduce processor overhead; I want to do this in the future. unic0rn left some nice comments suggesting more routes to optimization.
The filter still needs some tuning. Areas of solid (non-black) color have diagonal stripes in them. I believe that normalizing the strengths of the filters will fix this.
To be continued…