Working with Colours
Last updated
Was this helpful?
Last updated
Was this helpful?
Minicube64 has a default set of 64 colours, and defining your own custom palette is easy.
Custom colour palettes can be defined in a familiar hex notation like this:
Palettes can also be defined in byte notation if preferred.
Before the palette data we should align the data to a location in memory with the align
or org
directive. This forces the following data to begin at that specific address in memory, making it easy to point the COLORS
register to.
Setting the COLORS
register instructs to set the colour palette from a 256 byte region in memory.
The immediate value we load refers to the high-byte of the desired memory address.
This can be any value from $0300
. For example memory address 0x0500
, we use #$5
In this example we set a basic palette of 4 colours and show them at the top of the screen.