You can support the development on the Github Sponsors page.


Tech > 31 COLORS PALETTE TEST


combine palettes from TIC() and OVR()
made by atesin
uploaded by atesin
added:
download cartridge
- CLICK TO PLAY -

1


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

Comments


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




Post comment