A board · sheet 8/8 · manual page 30

The colour mixer sheet

Where all three boards finally meet. Three pixel streams arrive on every dot clock and exactly one colour has to leave.

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

This is the last sheet in the machine and the only place where the whole design converges. Characters arrive from sheet 7/8, sprites over the ribbon cable from the B board, the scrolling background over the cable from the C board. One colour goes to the monitor.

The three layers do not even agree on how deep a pixel is: characters are two bits, the background three, sprites four. Each reserves one pen value to mean transparent.

Deciding who wins

The priority order is fixed in wiring: character, then sprite, then background. 3F spots a transparent text pixel and 3J, a '20, spots a sprite pixel whose four bits are all set. Those two answers steer the trio of '153 multiplexers at 2F, 2H and 2J, which pass the winning layer's colour bits through.

That gives a six-bit index, which is not enough by itself: all three layers would land in the same 64 colours. So the little PROM at 1H adds the top bits, putting each layer in its own fixed range of the 256-entry palette - background at 0 to 127, sprites at 128 to 191, characters at 192 to 255.

From a number to a voltage

2E holds the finished index steady while the palette is read, and drops it to black during blanking so nothing smears into the borders. 1E and 3E line that blanking up with the pixel clock so the edges of the picture start and stop cleanly.

Then 1D, 2D and 3D - one PROM each for red, green and blue - turn the index into four bits per channel, and resistor ladders turn those into analogue voltages.

It is worth appreciating what these three chips are. The entire look of the game, every colour you remember, is 768 bytes burned into three small PROMs. Change them and Commando looks like a different game, with no other alteration anywhere.

1H PROMwhich range2E '273hold it steady1D 2D 3DR, G, B PROMsLADDERSto the monitor

Three separate PROMs, one per colour gun, each giving four bits. Twelve-bit colour, 4096 possible shades, 256 of them on screen at once. In MAME's ROM listing these three appear by name as vtb1.1d, vtb2.2d and vtb3.3d, tagged red, green and blue.

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