Log In  

Hello everyone, today I stumbled on a undocumented feature I didn't know existed: 16 extra colors.!

I searched on the wiki and the forums and I didn't see it mentioned anywhere (except this thread, but it was a differnt thing and that feature was removed by zep at that time).

If you change the screen palette via poke (0x5f10 to 0x5f1f) to a value above 0x80, the color will change as shown below:

Here's world 2 of Jack of Spades with all colors swapped, except black and yellow:

Original colors for comparison:

You can't have more than 16 colors in a single frame though, since poking (0x5f00 to 0x5f0f) will just make the color transparent, as documented in the wiki. Still it's good for fades, and can be used for someting like stage-specific palettes like in the NES and other old consoles.

Pretty cool!

P#67208 2019-09-04 02:59

Good find, BoneVolt.
Any way to poke new individual colors to the static 16 ?

P#67212 2019-09-04 03:30

@dw817 No, just these colors afaik

If anyone is interested in using the extra colors without the need to touch code, I made this cart to emulate pico-8's sprite editor with the extra colors (and 2 extra sprite tabs as a bonus!)

P#67216 2019-09-04 04:20
1

Zep just confirmed it was a new discovery by TheUnproPro! I think this was the first mention.

P#67217 2019-09-04 04:29

@BoneVolt Are you sure?

Seems to me in this tweet by @TheUnproPro (and @zep's follow-up tweet) that it IS indeed possible to redefine colours? 🤔

(UPDATE: Looks like it's just PAL swapping with the extended palette - Zep just used all the available blues from both palettes)

P#67218 2019-09-04 06:00 ( Edited 2019-09-04 06:45)
1

Liquid is correct; this is basically a glorified pal() function.

P#67229 2019-09-04 12:42

you can use pal() but it only works for the screen palette: pal(c0,128+c1,1).
so yeah, 16 colors out of 32, per frame.

P#67236 2019-09-04 15:49

Nice find!

Here's a shorthand poke4 version for messing around with.

poke4(0x5f10,0x8382.8180)
poke4(0x5f14,0x8786.8584)
poke4(0x5f18,0x8b8a.8988)
poke4(0x5f1c,0x8f8e.8d8c)

P#67238 2019-09-04 16:35

The green looks good.

Any chance of getting 16-colors in B&W only, zero being black, 15 being white, and between (1-14) a true 14-different shades ?

P#67240 2019-09-04 17:31

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2024-03-29 12:30:08 | 0.049s | Q:27