Difference between revisions of "Enhanced ULA Palette Extension"
From SpecNext official Wiki
(Rewording a bit and adding info from web docs.) |
|||
Line 1: | Line 1: | ||
{{NextRegister | {{NextRegister | ||
|Number=$44 | |Number=$44 | ||
− | |Readable= | + | |Readable=Yes |
|Writable=Yes | |Writable=Yes | ||
− | |ShortDesc= | + | |ShortDesc=Use to set/read 9-bit (2-byte) colours of the ULANext palette. |
}} | }} | ||
+ | Two consecutive reads/writes are needed to read/write the 9 bit colour: | ||
+ | * 1st read/write: bits 7-0 = RRRGGGBB | ||
+ | * 2nd read/write: bits 7-1 are reserved, must be 0 (except bit 7 for Layer 2), bit 0 = lsb B | ||
+ | |||
+ | If writing the Layer 2 palette colour, in the second byte, bit 7 is "priority" bit. Priority colour will be always on top (drawn above Sprites), even on an "SLU" priority arrangement. If you need the exact same colour with priority and non priority, you will need to program the same colour twice changing bit 7 to 0 for the non priority colour variant. | ||
+ | |||
+ | After the two consecutive writes the palette index is auto-incremented if the auto-increment is enabled by {{NextRegNo|$43}}. | ||
+ | |||
+ | The modified palette remains until a Hard Reset. |
Revision as of 22:05, 22 December 2018
Number | $44 |
---|---|
Readable | Yes |
Writable | Yes |
Short Description | Use to set/read 9-bit (2-byte) colours of the ULANext palette. |
Two consecutive reads/writes are needed to read/write the 9 bit colour:
- 1st read/write: bits 7-0 = RRRGGGBB
- 2nd read/write: bits 7-1 are reserved, must be 0 (except bit 7 for Layer 2), bit 0 = lsb B
If writing the Layer 2 palette colour, in the second byte, bit 7 is "priority" bit. Priority colour will be always on top (drawn above Sprites), even on an "SLU" priority arrangement. If you need the exact same colour with priority and non priority, you will need to program the same colour twice changing bit 7 to 0 for the non priority colour variant.
After the two consecutive writes the palette index is auto-incremented if the auto-increment is enabled by Enhanced ULA Control Register ($43).
The modified palette remains until a Hard Reset.