'pCC' - Phased ChronoColour

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Andrew Davie

This is a new display technology in the "ChronoColour" family.

Phased Chronocolour: A display technique in which colour primaries are distributed both temporally (across successive frames) and spatially (across scanlines), allowing a limited number of binary colour channels to combine via persistence of vision into a larger set of perceived colours.


Essentially combinations of three colours are shown in either spatial or temporal mixtures, or both, to give the impression of more than one playfield (or sprite) colour on any line.  ChronoColour - the original - was used in Boulder Dash way back in 2011. Since then there's been a steady stream of changes culminating in 'iCC' - interleaved ChronoColour.

iCC is/was pretty cool, but required careful adjustment of TV brightness/contrast or emulator persistence and brighness to reduce the shimmering/flicker effect. Basically it was very tiny rolling bands of colour going up the screen.  To cater for those who didn't like the effect, my games allowed selection of either ChronoColour or iCC.

But now - there's this weirdo new technology I'm calling "phased ChronoColour" (pCC).  It's a bit of a hybrid, still showing the same colours as the other two, but with more solidity than ChronoColour, and less shimmer (well, none that I can see) than iCC.

I've retrofitted it to three games, and the videos are linked below.




McCallister

Quote from: Andrew Davie on 10 Sep 2025, 06:44 PMBut now - there's this weirdo new technology I'm calling "phased ChronoColour" (pCC).  It's a bit of a hybrid, still showing the same colours as the other two, but with more solidity than ChronoColour, and less shimmer (well, none that I can see) than iCC.

These look fantastic and your quote sums it for me. Enhances the play experience all around.

Bomberman94

I would say Boulder Dash benefits the most from this technique. I hope we get someday another version of it - personally i'm dreaming of randomized levels 😊

Andrew Davie

#3
This is Claude's take on ChronoColour and specically phased ChronoColour. I asked it to examine the code and explain to me how the pCC system works... it's interesting, and mostly correct. The major error is that pCC came last, and iCC was not a development after that. But the description of the technique... chef's kiss.

The technique itself
The starting constraint: the TIA can only hold one playfield colour (COLUPF) at a time, but that register can be changed on every single scanline for almost no cost. So the real "palette" isn't a fixed set of colours — it's a repeating sequence of colours down the screen, one per scanline: colour A, colour B, colour C, colour A, colour B, colour C, and so on, continuously, top to bottom, completely independent of what's being drawn.

The 3-scanline "trixel": rather than trying to draw a normal-resolution image and hope the colour underneath happens to line up, the game deliberately makes its unit of vertical resolution three real scanlines tall. One design pixel — call it a trixel — always spans exactly one full colour-cycle (A, then B, then C). Since a trixel is physically tiny and the three lines are adjacent, a CRT (and the eye) don't resolve them as three separate stripes — they blend into one perceived block of colour.

Getting 8 colours out of 3: the graphic data for a trixel isn't a single on/off bit — it's three independent on/off bits, one per scanline of that trixel. So for each trixel you choose, independently: is it lit during the "A" scanline? During "B"? During "C"? That's three independent yes/no choices, i.e. 2×2×2 = 8 possibilities. All off = background. All three on = every colour blends together (reads as the brightest/whitest combination). Any single one on = a pure A, B, or C. Any two on = a blend of two of the three. So a hardware palette that can only physically show 3 colours (plus background) at any instant produces 8 distinct perceived colours per trixel, because each trixel independently samples a different subset of the repeating 3-colour cycle passing underneath it.

This only works because the colour cycle and the graphic are locked together at exactly the same period — 3 scanlines of colour, 3 scanlines of graphic-choice, always in phase.

Why the roll exists: here's the subtlety. Which physical scanline gets colour A vs B vs C is fixed by absolute position on screen (scanline 0 is always the start of a cycle, scanline 1 the middle, etc.) — it doesn't know or care about your artwork. Meanwhile the artwork's "is this trixel lit during its first/second/third line" bits are fixed relative to the trixel, not the screen. Normally those two things line up cleanly. But there's a second-order problem: if the mapping between "which bit of my trixel" and "which colour of the cycle" is always the same, then every trixel is being sampled the same fixed way, frame after frame — any systematic artifact in that fixed mapping (a slight bias toward one of the three colours, a fixed dither pattern that looks a bit mechanical) stays frozen and visible.

The "roll" breaks that rigidity by rotating the mapping between frames. On one frame, a trixel's "first bit" lines up with colour A; a frame (or two) later, that same bit lines up with colour B instead, then C, before cycling back. The pixel's underlying on/off data hasn't changed — only which physical colour it gets tinted with, this frame, has. Two consecutive frames of a normal-persistence display don't look like two separate images to the eye — they blend, the same way the three scanlines within one frame blend. So now you're not just spatially averaging 3 scanlines within a frame, you're also temporally averaging across 2 or 3 alternating frames, which softens/extends the apparent colour range still further and stops any one fixed bit-to-colour assignment from imprinting itself as a visible static pattern.

There are two flavours of this rotation: a simple 2-way alternation (flip-flopping between two of the three possible mappings, frame to frame) and a fuller 3-way rotation (visiting all three possible mappings in sequence, one per frame). The simpler 2-way version is the default — it's cheap (only one bit of state to advance), and visually it's enough to break up static bias without introducing noticeable flicker; the fuller 3-way rotation is a selectable extra that trades a touch more shimmer for slightly more even colour coverage over time.

So, in short: fix the vertical unit at 3 scanlines so it exactly matches a free-running 3-colour cycle; give each of those 3 scanlines its own independent on/off choice per pixel (yielding 8 spatially-blended outcomes from 3 colours); then rotate which colour of the cycle lines up with which of those 3 choices on a frame-by-frame basis, so persistence-of-vision blends across frames as well as across scanlines. The "2-cycle" and "3-scanline" the technique is named for are exactly those two locked-together periods — a short frame-to-frame rotation riding on top of a fixed 3-line spatial cycle.


The baseline (no roll at all) already "works," but only reaches a fixed set of 8. With the plane→colour assignment held static, each pixel's 3-bit code (which of the 3 rotating hardware colours it's lit under) always resolves to the same blend, frame after frame: background, pure A, pure B, pure C, the three pairwise blends A+B/A+C/B+C, and all three together. That's a real, complete, deterministic 8-colour system on its own — but it's locked to exactly those 8 combinations of exactly those 3 palette entries. There's no way to reach anything in between using that one fixed mapping, no matter how the artist codes the pixel.

What alternating breaks you out of that: if you swap which physical colour each of the three phase-slots carries — so the same 3-bit pixel code now resolves to a different set of 8 combinations — and you do that swap every other frame, persistence of vision doesn't see two separate images, it integrates them. So a pixel isn't just "blend-set-1" or "blend-set-2," it settles as the average of both. That average can land on a hue that neither static assignment could produce by itself — you're not choosing among 8 fixed points any more, you're interpolating between two different sets of 8. That's the entire payoff of rolling at all: it turns a fixed 8-point palette into something closer to a continuum, still built from only 3 physical colours.

Why 2 states specifically is the "OK" amount, not a compromise waiting to be fixed by a third: a plain two-way alternation is the cheapest possible version of this — one bit of state, flip it every frame — and, just as important, it's the smoothest one perceptually. A/B/A/B is a flicker at half the frame rate: clean, regular, easy for the eye/CRT persistence to average away into a steady blend. Add a third rotation state and you introduce a slower sub-cycle (A/B/C/A/B/C), which beats against the display refresh at a lower frequency — more prone to reading as visible shimmer rather than a smooth average, especially on real hardware/CRT timing rather than an idealised sample-and-hold. Two states already buys you the big win — escaping the single fixed 8-point palette — at the lowest flicker cost there is; a third state buys a bit more colour reach at a real, perceptible steadiness cost. That's why the two-state version is the original, unconditional technique, and the fuller three-state cycle is offered as an optional "more colour, more shimmer" variant on top of it rather than the default.