2
some experiments to make tic80 draw a total of 31 simultaneous colors by using both palettes (yes, tic80 have 2 palettes), no hacks.... for more info read code comments
i found motivation in this discussion = https://github.com/nesbox/TIC-80/discussions/2197
Skeptim
|
That's cool, I didn't know there was 31 colors available in total.
So the only limitation is to draw as foreground the other colors? |
atesin
|
> That's cool, I didn't know there was 31 colors available in total.
me either now that i read a little more, maybe this demo could have been improved using the vbank() function instead OVR() :P > So the only limitation is to draw as foreground the other colors? seems correct, reading the VRAM layout and vbank() function documentation... when BANK1 is used, a memory address is used to specify which palette index is used for transparency (forgive redundancy) also, it seems that internally there are 2 "video/virtual" banks... until just one is accessible at same time due the "bank switching" and address translation technique, like one used by ATARI 130XE (128kB total memory, fully accessible with just 64kB addressable) and MS-DOS expanded memory normally BANK0 is used, but OVR() switches to BANK1 automatically each tick, hovever vbank() new function can now be used to trigger a "bank switching" arbitrarily after all user functions (TIC(), OVR(), etc) and their requirements are run, control is taken back by virtual machine, that now read both framebuffers (VBANK0 and VBANK1) internally through DMA to draw screen (amongst other tasks like read input, process sound, etc.) all these is what i imagine... please somebody correct me if i am wrong |
ttype
|
I didn't read your code, and these 31 colors, including the "white" and "black" are completely different to the sprite editor (v1.1.2837) default palette: #1a1c2c #5d275d #b13e53 #ef7d57 #ffcd75 #a7f070 #38b764 #257179 #29366f #3b5dc9 #41a6f6 #73eff7 #f4f4f4 #94b0c2 #566c86 #333c57
|