Omnimaga

Calculator Community => Casio Calculators => Topic started by: MPoupe on May 02, 2011, 04:28:12 am

Title: Casio Prizm + truecolor ? [solved]
Post by: MPoupe on May 02, 2011, 04:28:12 am
Hello,
I tried to display something (in addin) by something like this:
unsigned short *VRAM = GetVRAMAddress();
int x,y;
for(y = 0;y< HEIGHT;y++)
for(x = 0;x< WIDTH ;x++)
{
   *VRAM = x;VRAM++;
}
VRAMtoDD();
GetKey(&x);
When you run this you got image with 2 color columns (alternating black and blue).
But if you press [Menu], it will change (for a fraction of second) to the expected gradient columns, then menu image will be  displayed.
So it seems display is somehow "rounding" color (using only the highest bit of the color part, or masking the pixels' color ) so it displays only base 8 color. The Menu handler sets this to true color mode and the it redraws the screen.

Does somebody know how to enable true color mode programatically?

PS: sorry for my poor English.

Title: Re: Casio Prizm + truecolor ?
Post by: m1ac4 on May 02, 2011, 07:24:04 am
In the hidden diagnostic mode you can actually toggle the color setting between 3 and 16 bit.  There is a sample picture included in those test menus that you can see the differences with.  So maybe there is a setting somewhere that needs to be changed for 16-bit color to work?
Title: Re: Casio Prizm + truecolor ?
Post by: MPoupe on May 02, 2011, 07:27:09 am
So maybe there is a setting somewhere that needs to be changed for 16-bit color to work?
I think there must be such settings, I would expect some port in the display. The Menu displaying routine does it, because my test pattern was displayed in 16 bit colors for very short while.
Title: Re: Casio Prizm + truecolor ?
Post by: SimonLothar on May 02, 2011, 11:54:24 am
Does somebody know how to enable true color mode programatically?
Try syscall 0x0921 with argument 1.
Title: Re: Casio Prizm + truecolor ?
Post by: AngelFish on May 02, 2011, 12:02:31 pm
Ah, that bloody menu handler. It's quite annoying, when you get down to it.
Title: Re: Casio Prizm + truecolor ?
Post by: fxdev on May 02, 2011, 12:03:26 pm
Or a bit more explanatory:

Quote
syscall 0x0921 : int EnableColor( int );
This function seens to enable the display's color mode. Ususally it is called immediately after program-start with parameter 1.
Title: Re: Casio Prizm + truecolor ?
Post by: Ashbad on May 02, 2011, 12:51:25 pm
Hello,
I tried to display something (in addin) by something like this:
unsigned short *VRAM = GetVRAMAddress();
int x,y;
for(y = 0;y< HEIGHT;y++)
for(x = 0;x< WIDTH ;x++)
{
   *VRAM = x;VRAM++;
}
VRAMtoDD();
GetKey(&x);
When you run this you got image with 2 color columns (alternating black and blue).
But if you press [Menu], it will change (for a fraction of second) to the expected gradient columns, then menu image will be  displayed.
So it seems display is somehow "rounding" color (using only the highest bit of the color part, or masking the pixels' color ) so it displays only base 8 color. The Menu handler sets this to true color mode and the it redraws the screen.

Does somebody know how to enable true color mode programatically?

PS: sorry for my poor English.



When you mean activate truecolor programmatically, do you mean by conventions made with normally?  If so, you can actually do a lot better than truecolor by using a dithering technique ;) if done in the standard %10101010 form, you can make the screen's color look like it was made with a 10-12-10 palette -- which is 32 bits O.o  thing is, 24 bits is the most we can really see, but doing it so that it looked like only 24 bit would be a lot slower and memory consuming.

I assume this is what you are trying to accomplish.
Title: Re: Casio Prizm + truecolor ?
Post by: DJ Omnimaga on May 02, 2011, 03:10:00 pm
I always wondered why all current Prizm programs only used 8 colors... I hope it's even possible at all to use 65536 in programs...
Title: Re: Casio Prizm + truecolor ?
Post by: MPoupe on May 03, 2011, 04:46:42 am
Try syscall 0x0921 with argument 1.
Thank you, this solved my problem. I used your SDK 1.04 previously, now I used 1.05 with this syscall and it works nicely.
Simon, thank you for your SDK and documentation !