ESP32 PAL/NTSC composite: clean mono, but colour burst creates cross-colour on B/W graphics

Hi everyone,

I’ve been working on an ESP32-based monochrome composite video synthesizer called BLACK DOG SYNTH, and after a fairly absurd amount of PAL/NTSC testing I’ve hit a point where I’d really appreciate input from people who understand composite encoding better than I do.

I’ve also been following LoFi Future / //SimpleViz for a long time. The current SimpleViz hardware I’ve seen in recent posts clearly uses an ESP32, and the output looks remarkably clean on projectors and CRTs. I remember LoFi Future mentioning in Instagram stories that the SimpleViz code was intended to be open-sourced eventually, so if they happen to see this, information about that implementation would be incredibly useful too.

But this is not specifically a request for SimpleViz source — I’m also interested in understanding the underlying signal problem.


Current BLACK DOG architecture

MCU: classic dual-core ESP32 DevKit

Output: internal DAC / composite video

Logical framebuffer:

432×192, 8-bit grayscale

The final architecture currently has two actual low-level transports:

PAL transport

NTSC transport

and each one can run with burst either enabled or suppressed:

PAL MONO — PAL timing, burst suppressed
PAL COMPAT — identical PAL transport, burst enabled
NTSC MONO — NTSC timing, burst suppressed
NTSC COMPAT — identical NTSC transport, burst enabled

MONO and COMPAT for each standard are otherwise the same signal engine:

  • same H/V timing
  • same framebuffer
  • same active window
  • same luma levels
  • same renderer
  • same DMA/presentation model

The only intended difference is the physical colour burst waveform.


The strange part

MONO looks extremely clean on a CRT.

Dense 1-bit black/white graphics can be displayed without coloured halos.

But once valid colour burst is enabled, high-contrast monochrome edges can produce rainbow / RGB halos.

This is especially obvious in PAL.

NTSC COMPAT does it too, but much less strongly — at this point it is almost negligible in normal content.

PAL COMPAT can be quite obvious.

The interesting part is that this is strongly dependent on luminance contrast:

  • black/white thin geometry produces false colour
  • grey geometry in the SAME texture often looks completely clean
  • a 16-level grayscale test looks clean at its boundaries
  • disabling burst removes the RGB artefacts even on dense black/white pixel structures

The artefacts remain visible even when the renderer/animation is paused, so this is not caused by moving artwork.


Receiver testing

I’m testing on several very different receivers:

  1. analogue CRT
  2. Unisheen video recorder/display
  3. cheap AV→HDMI scaler based around MacroSilicon MS1858E
  4. very cheap Chinese projector

I also tested the projector with a real Sony PAL camcorder to verify that it genuinely accepts PAL.

Current COMPAT modes lock well on the digital receivers.

PAL became reliably accepted only after fixing the PAL subcarrier/burst relationship properly.


Major PAL breakthrough

Earlier PAL implementations had valid-looking H/V timing but the projector refused them.

What finally changed this was implementing:

  • coherent PAL subcarrier phase rather than arbitrary per-line reset
  • correct line-to-line PAL phase behaviour
  • proper SCH relationship
  • PAL field sequencing / 8-field behaviour
  • appropriate vertical interval burst blanking

After that, the same projector which previously said NO SIGNAL immediately recognised PAL and displayed a stable image.

So I believe the remaining colour problem is different from the earlier PAL-lock problem.


Things already tested

This has turned into a rather large test campaign.

I have tried roughly a hundred-plus signal/profile variations across the project, including:

Timing / transport

  • several independent PAL implementations
  • several independent NTSC implementations
  • M5GFX / Panel_CVBS-derived experiments
  • Aquaticus-inspired monochrome cores
  • Bitluni-derived tests
  • PAL line/sample-count matrices
  • horizontal frequency sweeps
  • exact-H vs slightly offset H
  • multiple subcarrier clock approaches
  • width sweep approximately 320–480 logical pixels
  • several framebuffer heights
  • field-coherent vertical mapping experiments

Signal levels

  • sync depth
  • blanking level
  • black level
  • white excursion
  • active-edge guards

These did not remove the artefact.

Burst

  • fixed burst
  • alternating PAL burst
  • proper PAL/SCH sequence
  • burst amplitude sweep
  • sparse burst every 2/4/8 lines
  • short burst clusters

Sparse burst progressively destroys digital receiver lock.

Lowering burst amplitude gave a particularly interesting result:

the receiver continued to lock down to surprisingly low burst amplitude,
but the false-colour artefacts became larger and uglier, rather than
disappearing.

At very low burst level the image finally loses lock.

My guess is that chroma AGC / poorer chroma reference is amplifying the
false chroma generated from luma.

Luma processing

I tested:

  • broad 3-tap low-pass
  • sharper 5-tap FIR
  • sharper 7-tap FIR
  • adaptive isolated-pixel suppression
  • narrow IIR/Nyquist notch experiments

All of these provided useful evidence, but I rejected them as product solutions.

Strong enough filtering does remove the rainbow artefacts.

Unfortunately it also causes one or more of:

  • obvious blur
  • lost 1-pixel detail
  • broken circles/lines
  • ringing/ghosting
  • large FPS loss

That is why I’m reluctant to “solve” this with framebuffer post-processing.


Important frequency observation

One earlier PAL transport used approximately:

17.75 MHz sample clock

with:

864 active output samples

and:

432 logical horizontal pixels

so each logical pixel was effectively represented by two output samples.

This places a 1-pixel alternating black/white pattern extremely close to
the PAL chroma subcarrier region.

That explains why pathological 1-pixel textures produce strong colour.

However, changing logical width did not eliminate the problem globally.


13.5 MHz experiment

I also tested a BT.601-style 13.5 MHz transport.

PAL still had coloured edge artefacts.

NTSC at 13.5 MHz produced something especially interesting:

perfectly regular vertical green/blue/red bands moving horizontally
across the image.

The colour bands were extremely periodic, and at geometry boundaries they
formed the same sort of coloured halos seen in the normal content.

The ordinary NTSC transport was dramatically cleaner.

This looked like a useful clue involving the sample grid/subcarrier
relationship rather than random renderer noise.


Raw output purity check

To make sure the renderer/palette was not secretly inserting a periodic
luma pattern, I built direct active-video probes.

For example, in PAL:

normal framebuffer flat field:

MIN = MAX = 64

direct active flat field:

MIN = MAX = 59

unique active sample values:

1

No 2–8 sample repeating modulation was found.

NTSC direct flat tests also produced one constant active level.

So a uniform grayscale framebuffer really does become constant DAC samples.

This makes me think the artefact is not a hidden renderer/palette bug.


Current interpretation

The evidence currently points toward classic cross-colour / Y-C ambiguity:

  1. MONO without burst is visually clean.
  2. Enable valid burst and the receiver enables its chroma decoding.
  3. High-frequency B/W luminance near the chroma band can then be decoded
    as colour.
  4. Lower-contrast grey detail contains less energy and is often visually clean.
  5. Strong luma filtering removes the colour but destroys the image.

This seems physically reasonable.

What I’m trying to understand is how small commercial/D.I.Y. digital
monochrome generators such as //SimpleViz apparently avoid the ugly version
of this while still producing a signal that projectors happily accept.


Questions

I’d really appreciate thoughts on any of these:

1. For a deliberately monochrome composite generator, is emitting a normal
PAL/NTSC colour burst actually the wrong approach if high-frequency 1-bit
detail is important?

Is there a standard/commonly used way to remain widely compatible with
modern decoders while indicating monochrome?

2. Is there a way to generate a burst/reference that keeps digital receiver
lock without causing the chroma decoder to interpret luma as colour?

My sparse/amplitude experiments suggest probably not in the naive way.

3. How do real monochrome composite generators typically control
cross-colour without visibly softening pixel graphics?

Is the answer usually:

  • deliberate luma bandwidth limiting
  • analogue reconstruction/filtering
  • coherent sample clock design
  • different effective horizontal resolution
  • comb-friendly line structure
  • something else?

4. How important is the relationship between DAC/sample clock and Fsc when
synthesising CVBS directly from a microcontroller?

The 13.5 MHz NTSC moving RGB bands made this look much more important than
I originally assumed.

5. Is there a particularly sensible sampling scheme for direct ESP32 DAC
generation?

For example, is staying at an integer multiple of Fsc substantially better
than using a convenient independent sample clock?

6. Could the ESP32 internal DAC / zero-order hold itself be contributing a
significant amount of spectral energy around chroma frequencies?

Would a modest analogue reconstruction network after the DAC make a major
difference even if the digital samples are mathematically clean?

7. For anyone familiar with the current ESP32 //SimpleViz:

I’d be incredibly interested to know:

  • Arduino-ESP32 vs native ESP-IDF / custom low-level code
  • actual framebuffer resolution
  • video sample clock
  • I2S/DAC vs GPIO/resistor output
  • whether burst is present in its B/W output
  • progressive/288p-style vs true interlace
  • analogue output network/filtering

I remember LoFi Future mentioning in Instagram stories that the SimpleViz
firmware/code was intended to be open-sourced eventually. If that code or
even an older ESP32 revision is available anywhere, I’d love to study it.

I’m not asking anyone to debug the whole BLACK DOG codebase. At this point
I mainly want to understand whether I’m missing a fundamental composite
encoder design technique before I declare the current PAL/NTSC engines done.

If it would help, I can post schematics, actual sample/timing values, photos
of the artefacts, or the full test matrix.

Thanks — this forum has been one of the few places where discussions go
deep enough into actual analogue video signal behaviour that I figured this
was worth asking here.

1 Like

…a lot(!) of work has gone into that - wow!..

…i cannot help you directly, but i am in email-contact with Adam @LoFiFuture (LoFiFuture - he is a user here too) for a couple of years now regarding a unit he is (supposed to be) building for me, and i guess he might be willing to communicate with you directly and could perhaps answer some of your questions - besides PN on this site an email-address can be found here:

1 Like

There is also this project by bitluni, with a nice video explaining the details:

Maybe this would be some good input regarding your problems…

I’m not good with programing a valid composite signal using microcontrollers.

Why do you want to implement the color burst if your signal looks clean without it?
Maybe I missed the reason in your text.

1 Like

Thanks! Yes, I actually tested that exact Bitluni ESP32CompositeVideo project earlier in the process. I tried both PAL- and NTSC-based variants, but unfortunately neither gave me a usable signal on my particular receiver setup, so I eventually moved on to Aquaticus and M5GFX/Panel_CVBS-derived implementations.

And yes — I probably buried the reason for the colour burst under too much text :sweat_smile:

The reason I want burst is compatibility with modern receivers.

Without burst, the monochrome signal looks fantastic on my CRT. I also tested an Aquaticus-style mono implementation and it was extremely clean: dense black/white graphics, good grayscale, essentially zero rainbow/cross-colour.

The problem is that my digital devices don’t reliably accept those clean no-burst signals:

  • CRT: works beautifully
  • MS1858E AV→HDMI scaler: no-burst PAL is unreliable / blue-screens
  • cheap projector: rejects the no-burst PAL/NTSC signals completely

I also tested the projector with a real Sony PAL camcorder, so I know it genuinely supports PAL.

Once I generate a proper colour burst and PAL/NTSC reference, those same digital receivers lock very reliably — projector included. Unfortunately that also enables their chroma decoder, and then high-frequency B/W luminance starts being interpreted as colour.

So the annoying tradeoff I ended up with is basically:

no burst = beautiful monochrome, poor modern receiver compatibility
valid burst = excellent compatibility, but possible cross-colour on sharp B/W detail

My current implementation therefore actually has both modes:

PAL MONO / PAL COMPAT
NTSC MONO / NTSC COMPAT

MONO and COMPAT use the same timing/framebuffer; COMPAT simply has burst enabled.

That’s really the problem I’m trying to solve now: whether there is a way to get the compatibility of the second case without the false colour.

If there’s a particular detail/version of the Bitluni implementation you think I should revisit, though, definitely let me know — after all these experiments I’m very open to having missed something useful in it.

thats a very interesting deep dive - thanks for laying it all out here!

i havnt looked too deeply into esp32 cvbs generation (although i have some future plans that will…)

still some of these points are relevant to projects im developing also.

my understanding (perhaps flawed) is that monochromatic composite video is valid without burst. this is how it was originally designed..

and also, while testing composite video output on the raspberry pi (this was on an older os version mind you) theres a setting in config.txt: sdtv_disable_colorburst=1

they claim:

The picture will be displayed in monochrome, but it may appear sharper

in this forum post on the matter someone explains:

Your TV / monitor should detect the absence of the burst, and disable the colour decoding circuitry.

since im also working on a circuit that outputs monochromatic video without burst, i have tested a few options i have here (a few different capture cards, converters, tvs etc) i will double check this but im pretty sure most of them displayed the monochromatic video correctly. i know that one of the capture cards displayed an artifact similar to what you describe, a kind of rolling rainbow pattern which is created by the encoder seeing the subcarrier but not having a burst to ref it to:

this can be exaggerated but increasing the saturation in the source image:

however this was only one of the many i tested. the rest correctly displayed monochromatic image and ignored subcarrier if no burst is present:

a slight (different) artifact can be seen if we again exaggerate the saturation:

but i concluded that in this case capture card was at fault for not correctly handling the correct cvbs signal..

still if all modern displays do not correctly handle this case it doesnt really matter who is at fault.. but thats not my understanding.


to briefly address other questions, i think the lack of crisp quality as the luma signal crosses/bleeds with the chroma subcarrier is just built into the format. if you really want higher quality seperate chroma and luma while keeping everything else the same you should be using s-video! this is exactly why it was developed..

but i think your design to have the option to enable/disable colorburst on output is perfectly fine. for everyone whose display handles no burst they get slightly crisper monochromatic output. if your display does not then can happily fall back on colorburst output…

i think atleast posting some images of the artifacts you want to avoid would be interesting…

1 Like

Thanks for the detailed reply and the Pi link! You’re right — I shouldn’t generalise this to all modern displays. My compatibility issues concern particular receivers in my test setup.

Here are two older CRT photos: first MONO with burst off, second NTSC COMPAT with burst on. Both show fine diagonal B/W graphics, with pronounced rainbow artifacts in COMPAT. These are archival examples, not the latest firmware.

BLACK DOG generates grayscale with the encoder’s chroma level set to zero. The distinction between suppressing burst and removing active chroma is useful. I’m keeping MONO/COMPAT selectable while testing further.

Which capture cards/converters accepted your no-burst signal? Their models would be useful comparison points.


BLACK DOG is a monochrome video synth using a classic ESP32 and its internal DAC for composite output, based on M5GFX/Panel_CVBS. All four photos show the same CRT displaying a static 1-pixel black/white checkerboard, generated in a 432 × 192 GRAY8 framebuffer. Source pixels alternate between 0 and 255; the encoder’s active-picture chroma level is configured to zero.

The diagnostic is in HOLD: the framebuffer is presented once and left unchanged, while video output continues. No animation, audio response, feedback or glitch effects are running.

Photo order: top left NTSC MONO, top right NTSC COMPAT; bottom left PAL MONO, bottom right PAL COMPAT.

Mode Current signal configuration What I observe on this CRT
NTSC MONO Burst suppressed; repeated 262-line fields, 524 lines per pair; point sampling of source rows. Cleanest result to my eyes. The raster looks steady, even on close inspection.
NTSC COMPAT Burst enabled; original alternating field schedules, 525 lines total; fractional vertical interpolation between source rows. Noticeable fine coloured interference across the black-and-white checkerboard.
PAL MONO Burst suppressed; repeated 312-line fields, 624 lines per pair; point sampling of source rows. Also steady and mostly monochrome. The fine photographed texture differs from NTSC MONO.
PAL COMPAT Burst enabled; original alternating field schedules, 625 lines total; fractional vertical interpolation between source rows. Much stronger saturated horizontal rainbow bands. These are visible directly and actively move from bottom to top, despite the static source.

Important caveat: this is not a controlled burst-only A/B. MONO and COMPAT currently differ in field structure and vertical sampling as well as burst. The repeated-field MONO timing is an experimental progressive-style signal, not a claim of broadcast compliance.

This combination followed earlier tests where repeated fields improved CRT stability, but caused some receivers to lose lock when used in COMPAT. The goal is to preserve fine monochrome artwork while supporting the receivers that need the compatibility mode.

The collage uses the original photographs without colour correction, sharpening or resizing. Camera/CRT moiré can contribute to the fine photographed texture, but the moving PAL COMPAT rainbow bands are definitely visible without the camera. I’m treating colour artifacts, raster stability and receiver lock as separate issues.

Does this look consistent with high-frequency luma being decoded as chroma, particularly with this extreme checkerboard? Or would the much stronger PAL banding make you prioritise checking subcarrier/line/burst phase relationships?

Which comparison patterns or measurements would you try next to distinguish those possibilities before changing the encoder or filtering away the fine B/W detail?

1 Like

Some progress: the ESP32 is generating a PAL signal directly into a cheap projector (costing under $10) without dropping to a “no signal” state.

and the current appearance of the device

1 Like

hello, @foureights, and welcome to scanlines.

it seems like you have quite an interesting and fun project going on with developing this synth.

i must admit that, while i’m quite familiar with composite signals, i didn’t understand all of the info and questions in your post. clearly, a lot of work went into this project, and into your knowledge and creating these posts. however, i also had some concerns as a moderator of this forum, since the length, formatting, and writing style were suggestive of LLM writing.

we’ve had a issue with LLM spam on the forum lately, but i’m not saying that your post is spam – usually, the spam is a bot that posts some irrelevant thing, then never does anything again. on the other hand, your project is on topic for this forum, and clearly interesting to people here, and you’re replying and engaging with the discussion, which is great. it’s just the writing style and length of the original post that put up red flags for me as LLM written. we encourage people to compose their own writing as much as possible and i think that also helps people be able to reply and engage as humans too. since the AI writing can have a bit of an “information firehose” effect that’s difficult (at least for me) to process and relate to.

1 Like

I actually used an LLM for this text because I hardly know English and it helped me articulate my thoughts and process the test results, but I’ll try not to use it for future posts.

2 Likes

thanks for the reply. i think it’s fine to use translation tools and such. we just want to keep this a place for humans to connect with other humans, since that feels increasingly rare. thanks for understanding :slight_smile:

2 Likes

Which capture cards/converters accepted your no-burst signal? Their models would be useful comparison points

the capture cards im using are a few variations/differnt chipsets on these easycap style devices:

they all work with no burst. one varation shows those scrolling colour bars i showed earler, the rest encoder correctly

then i also tested on some of these cheap box hdmi converters and these also work correctly no issue:

i also tested on a few displays, a crt tv, lcd tv and a few varations of this small tft reversing monitor - all of which correctly display the image:

will be sending out my mono_encoder to some other testers soon so can report back how it goes in the wild..

Does this look consistent with high-frequency luma being decoded as chroma

looking at the images you posted. i think its normal artifacts of high frequency luma being decoded as chroma.

device enclosure looks cool btw

1 Like