OK, try the new build and see if that fixes the colour issues on P96. If it doesn't I'll go back to Plan A.
Hi Chris
IIRC P96 built in emulated CGX WritePixelArray worked quite nicely performing RGBA to CLUT conversions. As strange as it may sound perhaps you should use CGX functions, because P96 doesn't have public functions to do some stuff available in its CGX emulation. Doing the same with the native P96 functions was trickier.
If you are using a 24bit buffer CGX WritePixelArray will help although If I have read correctly you are using datatypes to convert to the screen format.
Perhaps you could make use of AWeb sources for dithering and scaling, these should be more or less optimized for 68k, maybe also image decoders. Render.library should also include optimized code for that.
You can easily detect if current screenmode is cgx or not.
if (CyberGfxBase != NULL)
if (IsCyberModeID(resultadoalloccgx.DisplayID))
{
printf("screenmode is CGX\n");
} else {
printf("screenmode is something else\n");
}
IIRC you could also use CGX LockBitMapTags to discover if the screen's bitmap is clut, rgba and to lock it to draw directly with the cpu (remember to write the bytes/words/longwords in the same screenformat).