This has become a pretty long post, so I'll start it with a short version:
The Genesis has 4 x 16 color palettes. I'm looking for a way to change the palettes certain background graphics and sprites use. Important: Not by editing the palettes themselves (that's easy to do with the tools out there). Example: I want an object that has been using palette no.1 use palette no.3
The full story from here on:
I've been looking at Kyuukyoku Tiger/Twin Hawk. I wanted to make it look better and did a color hack for it, but the game's usage of palettes is a tough bottleneck. Here's a screenshot to illustrate what I mean and want to accomplish:
First palette line is background colors
second line is player and enemies colors
third line is explosion colors and flashing effects. Enemies that are taking damage switch to this palette for a split second
final line is more enemies, projectiles
The game never switches background colors during the whole main game . It's the same 16 colors for all stages. Beach sand, bricks, tanks, walls... all the same brown, green, blue, gray you see there. This game looks very dull because of that. Other games switch palettes all the time, for fake animations, to make stages look more colorful, etc.
I would need an extra palette for more background colors. The third palette is only for explosions and that flashing effect when you hit enemies.
For flashing, the game could switch to the player colors palette instead. All other Toaplan ports do that, and nobody complained about that yet. For explosions, I could redraw them with the player colors palette. Palette 3 would now be completely unused. I could fill that one with colors to make the game look more like the arcade version.
Problem is that I can't tell selected stage tiles to use palette 3 instead of palette 1. Can't tell enemies to switch to the player palette when taking damage. Can't tell the explosion sprites to use the player palette.
I've looked at documentation how the Genesis assigns palettes, e.g. http://darkdust.net/index.php/writings/megadrive/firststepshttp://huguesjohnson.com/programming/genesis/tiles-sprites/
There's no easy way to do this right? It's about reprogramming every step when the game loads tiles or sprites into VRAM, and editing the code that controls the flashing effect, right?