It's strange... I am not able to count the colors used. I executed the demo with Mednafen, and I captured the screenshot (Print Page key). I pasted it in several programs (Paint, Photoshop, Ultimate Paint...) but the number of colors allways is enormous ( >1,000 ). And I try to count the colors before saving the picture!! (in order to prevent errors in the conversion). Anyone has used a method to count colors in a PCE game, with good results? Maybe the output of Mednafen is not exact, and I must use another emulator?
In any case, I would like to post here another thing that I have been thinking of: besides the limitation of the number of colors that we can use (which is the point that I am trying to solve now) we must keep in mind that we have another limitation: the total spectrum of colors in the PC Engine is 512. See the following example:
The first picture is the original, the second is the conversion to 16 colors, and the third uses my method (16 palettes of 16 colors, by squares). You can see in the face of the kid that the increment between adjacent colors is very high, whereas in the original picture it is very smooth. The reason, in my opinion, is that the PC Engine does not have colors in the middle of the ones that is using. In other words: the number of "blue" colors that we have is limited, so even if we can choose 256 different colors, there is not a high amount of "usefull" colors for each image.
In this sample, we can see that our method gives better results than using only 16 colors, but we are very far of that theoretical limit of 256.