Table 3-3: Contents of the Color Registers Bits Bits 15 -12 Unused Bits 11 - 8 Red Bits 7 - 4 Green Bits 3 - 0 Blue Table 3-4 shows some sample color register bit assignments and the resulting colors. At the end of the chapter is a more extensive list. Table 3-4: Sample Color Register Contents Contents of the Resulting Color Register Color $fff White $6fe Sky blue $db9 Tan $000 Black Some sample instructions for loading color registers are shown below: LEA CUSTOM,a0 ; Get base address of custom hardware... MOVE.W #$FFF,COLOR00(a0) ; Load white into color register 0 MOVE.W #$6FE,COLOR01(a0) ; Load sky blue into color register 1 NOTE The color registers are write-only.
Only by looking at the screen can you find out the contents of each color register. As a standard practice, then, for these and certain other write-only registers, you may wish to keep a "back-up" RAM copy. As you write to the color register itself, you should update this RAM copy. If you do so, you will always know the value each register contains. SELECTING THE NUMBER OF BIT-PLANES After deciding how many colors you want and how many bit-planes are required to give you those colors, you tell the system how many bit-planes to use. - Playfield Hardware 41 -