Set the colour/luminance for objects.
There are four colour registers that control the colour of all of the objects on the screen. These include background, playfield, missiles, players, and a ball.
COLUP0 = $06
Colour/Luminance of Player 0 and Missile 0
WRITE | Name | D7 | D6 | D5 | D4 | D3 | D2 | D1 | D0
| ||||
$06 | COLUP0 | COL3 | COL2 | COL1 | COL0 | LUM2 | LUM1 | LUM0 |
COLUP1 = $07
Colour/Luminance of Player 1 and Missile 1
WRITE | Name | D7 | D6 | D5 | D4 | D3 | D2 | D1 | D0
| ||||
$07 | COLUP1 | COL3 | COL2 | COL1 | COL0 | LUM2 | LUM1 | LUM0 |
COLUPF = $08
Colour/Luminance of Playfield
WRITE | Name | D7 | D6 | D5 | D4 | D3 | D2 | D1 | D0
| ||||
$08 | COLUPF | COL3 | COL2 | COL1 | COL0 | LUM2 | LUM1 | LUM0 |
COLUBK = $09
Colour/Luminance of Background
WRITE | Name | D7 | D6 | D5 | D4 | D3 | D2 | D1 | D0
| ||||
$09 | COLUBK | COL3 | COL2 | COL1 | COL0 | LUM2 | LUM1 | LUM0 |
NTSC, PAL, SECAM
Source: https://retrocomputing.stackexchange.com/questions/4896/whats-with-the-atari-2600-colors-on-secam
The TIA manages a very large palette on NTSC and PAL systems because it takes advantage of the way that composite colour is encoded: three bits produce luminance, and the colour subcarrier is always exactly the same sinusoid, but four of the other colour bits set its phase.
So for both NTSC and PAL:
three bits set the amplitude of one signal;
four bits set the delay of another signal; and
the two things are summed for output.
To verify this, look at an NTSC colour wheel, and look at which angle each of the Atari's NTSC colours appears. They're just steps around the outside of the colour wheel.
Even PAL suffers a little from the NTSC-first logic; it has 12 hues instead of 15 because the NTSC subcarrier is approximately 12/15ths the frequency of PAL's, and the delay steps are NTSC oriented.
SECAM doesn't work in the same way. Performing a phase shift doesn't actually make any difference — the colour subcarrier is a single channel in frequency modulation, not two channels in quadrature amplitude modulation. Nothing about a SECAM output is determined by phase. The colour-shifts that result from phase errors is exactly what SECAM sought to fix.
So more complicated electronics are required, and the elegant hack of just doing a phase shift isn't available. More logic is required, and Atari did what it was cost effective to do, which is to implement a palette much like the other RGB-oriented machines of the era.
In short: the Atari's disproportionately-good palette on NTSC and PAL systems is because Atari exploited the way QAM composite encodes colour. SECAM does not use QAM. Therefore a much more basic palette, closer to other machines of the era, was implemented.
SECAM Palette
The SECAM palette was reduced to a simple 3-bit RGB, containing only 8 colours (black, blue, red, magenta, green, cyan, yellow and white) by mapping the hue (COL3-COL0) to luminance and ignoring the hue setting:
COL3 D7 | COL2 D6 | COL1 D5 | COL0 D4 | RGB1 | Visible Colour | ||||||||
$0 $1 $2 $3 $4 $5 $6 $7 $8 $9 $A $B $C $D $E $F | 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 | 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 | 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 | 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 | 000000 2120FF F03C79 FF50FF 7FFF01 7EFFFF FFFF3F FFFFFF |
NTSC Palette
There are in effect 128 different colours, as D0 of colour registers is unused. The image below shows the results of the 256 possible values that can be selected. Although each pair appears to be slightly different, this is an optical illusion. They appear in pairs because D0 is ignored and so (for example) colour $34 and colour $35 are identical. Colour number goes down the rows, and luminance across the columns (so, row 3, column 4 - both counting from 0 - is colour value $34 and appears red on NTSC systems).
PAL Palette
The PAL palette is a lot like the NTSC one. It also ignores the D0 bit for the luminance so there's only 128 "usable" values.
But thanks to the way it were implemented it only has 104 unique colors to chose from, the colors are also interleaved instead of being laid out nicely as with NTSC. So when you develop for PAL you should alter the values that you use for the palette.
Related
see TIA
see Colour Palette