Palettes

There are 2 banks of 256 palettes of 16 colors available, made of 16bit RGB definitions. Palettes are located at $400000 in the 68k's memory map.

The bank used for video output is set by registers REG_PALBANK1 ($3A000F) and REG_PALBANK0 ($3A001F).

Only one bank can be used at a time. They can be switched by using register ???

Color definition word: D R0 G0  B0  R4 R3 R2 R1  G4 G3 G2 G1  B4 B3 B2 B1

Sprite tiles can use any of the 256 palettes, while fix tiles can only use the 16 firsts.

Max colors on screen without RLI tricks: 256*16=4096 out of 2^16=65536.

Palettes are stored in Palette RAM.

Last color of palette bank: backdrop color. First color of palette bank: reference color for the video output (during H and V blank ?). Has to be $8000 (black).