Sprite Options
Special option PAL2 for Palette mode Sprites

Options were foreseen years ago but recently Per Witte and the SMSQ/E team worked it out (See Per´s option "HINT"). For the next SQRview update 1.03 I created type "PAL2".
This Option adds a Private Palette to palette mode sprites and acts much like those in GIF, PNG or BMP image files. It saves on bytes with minimal colour loss.

Sprite modes 3, 7, 15 and 31 use 1, 2, 4 or 8 bits respectively to index the system´s PALETTE_8 colours or now this Private Palette. It can be in 8 bit / mode 16 ("PAL1") or 16 bit / mode 32 or 33 ("PAL2") or 32 bit / mode 64 ("PAL4" / RGB0).
Special PAL4 modes are also possible: mode 63 (0RGB) or mode 65 (BGR0, PC mode).

The "PAL2" option header and palette:
sp_Opt1
dc.l sp_opt2-*
dc.b "PAL2"
dc.w #numcol
dc.w #mode
dc.w $xxxx,$xxxx,...
....
ds.w 0
sp_Opt2
-
; option length, to start of next option
; option type, 4 characters (or "PAL1" or "PAL4")
; number of colours, can be 2 to 256 (for 1, 2, 4 or 8 bits index)
; mode of Private Palette, can be 16, 32, 33, 64 (or 63, 65)
; the palette data, 1, 2 or 4 bytes per colour
; - (numcol x bytes_per_colour) -
; always word aligned
copyright ©2026 bsjr