A board · sheet 8/8 · manual page 10

The colour mixer sheet

Three layers arrive, one picture leaves, and the palette is ordinary RAM the game can rewrite whenever it likes.

Draft. This sheet was read from the original 1985 drawing and cross-checked against MAME, but it has not yet been walked pin by pin against a physical board. The logic described here is what the drawing shows.
This sheet is part ofHow a frame is drawn

The subsystem followed end to end, across every sheet that builds it.

What this sheet is for

Everything that draws converges here: the character layer, the sprites arriving from the video board, and the scrolling background. This sheet decides which of them wins each pixel, looks the answer up in the palette, and drives the monitor.

It is the last stop. Nothing downstream of this sheet is digital.

A palette in RAM

6D, 7D and 8D hold the palette: 256 entries of twelve bits, four each of red, green and blue, living at $3800 in the CPU's map. The drawing calls for 2148s; the photographed board fits NEC 2114s in their place.

Commando burns its colours into PROMs. They are fixed at the factory and no amount of software can change them. Here the palette is RAM, so a fade, a flash, a lightning strike or a whole recoloured level costs a few writes and no artwork at all. If you only remember one difference between the two machines, make it this one.

palette RAM6D / 7D / 8DCommandocolour PROMs, burned256 entries, RGB 4-4-4$3800-$39FF, CPU writablefixed at the factoryone palette, for everthe single biggest architectural difference between the two machines

Commando's colours are burned into PROMs and can never change. Here the palette is ordinary RAM the 6809 writes to, so the game can fade, flash and recolour whole scenes without touching a single pixel of artwork.

Deciding who wins a pixel

The priority logic is mostly gates. Sprites normally beat the background, the character layer normally beats both, and transparent pixels fall through to whatever is behind.

The interesting exception is SCRWIN, attribute bit 3 of a background tile, which arrives on CN-1 pin B12. Set it and that tile draws in front of the sprites. It is the reason Arthur can walk behind a gravestone, and Commando has no equivalent.

tile attributebit 3 = SCRWINbit settile draws IN FRONTbit clearsprites draw in frontone bit per tile, carried across the cable on CN-1 pin B12

Background tiles are normally behind everything. One attribute bit flips that per tile, which is how Arthur walks behind a gravestone. Commando's background has no such bit: there, sprites are always in front.

Every chip on this sheet

Click any of them to open the schematic with that chip selected in both panels.

← open the schematic for this sheet