Wednesday, February 02, 2005

System palette trouble-distorted screen images

You might already have experienced this-an application suddenly has different colours than it had before. The images below show a german game called MohrHuhn-once with and once without the distortion:

As you see the image number 1 looks cruel-but why? Let's leave trickery out for the moment as it isn't April Fools day yet. Difficult, huh?
Well, the answer lies deep in the PalmOS and in the way it handles colours. When the IIIc was introduced, a strange limitation was introduced that didn't let its TFT display more than 255 colours. In order to make the graphics appear smoother, the developers were allowed to select these colours from a full 12bit RGB palette. Thus, unneeded colours could be replaced with ones better suited to the image(altough this was rarely done on IIIc and co.).
Of course these events have happened years ago and all handhelds now have a 12/16bit screen. But they cannot be forgotten just yet, as lots of games still run in 8bit mode for speed and change the palette so that it better suits their Sprites.
And this is exactly what happened above. Another game was started before MohrHuhn, and its developer simply forgot to reset the palette. The PalmOS didn't care(it never does)-and MoorHuhn didn't bother either! It simpliy drew its sprites, not caring about the palette used to display them!
Thus, when you see user interface elements,.. distorted next time-don't freak out. A softreset will cure the problem.
What is your experience?

3 Comments:

Blogger Steven Fisher said...

Interesting! But doesn't the launcher use 16 bit? So a 8 bit -> 16 bit -> 8 bit transition between applications doesn't reset the palette?

When one application affects another, I consider it an operating system bug rather than an application one.

11:08 PM  
Anonymous Anonymous said...

http://capers.free.fr/ScummVM/download.php
There you can see the effect too.

10:38 AM  
Blogger Tam Hanna said...

Hi,
I do not now if the launcher works in 16bit, I personally think that it usualy works in 8bit though....
Thank you all for commenting
Best regards
Tam Hanna

12:49 PM  

Post a Comment

<< Home