Close2
HPMANOn the 2016-09-18 at 07:41am
Here's a little something I've been toying with.

The issue:

Considering a large scroll section, like the following:
160918073904832619.png

Current tools work out the palettes to the best of their ability, but palettes count can quickly rise to large numbers. As they have to sit in palette RAM, it can be a problem to have room left for other elements.
Above example end up taking 228 palettes.


The solution:

We know a scroller displays max 21 sprites, so the solution is to rework the tilemap and add a palette management to move palettes in/out the palette RAM depending on requirements for currently displayed data.

So instead of having to reserve 228 palettes, you shrink palettes usage to the highest count required at any time.

For the above example we shrink down from 228 to 71 palettes:
160918074451298329.png

The solution is fairly light on CPU, takes up some more ROM space, but it is a good trade off for more palettes RAM ressources.


And it actually works triso