Author Topic: Casio Prizm + truecolor ? [solved]  (Read 4626 times)

0 Members and 1 Guest are viewing this topic.

Offline MPoupe

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 168
  • Rating: +30/-1
  • The coder of yesterday
    • View Profile
    • My web site about Casio calculator
Casio Prizm + truecolor ? [solved]
« 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.

« Last Edit: May 03, 2011, 04:47:10 am by MPoupe »

Offline m1ac4

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 106
  • Rating: +8/-0
    • View Profile
Re: Casio Prizm + truecolor ?
« Reply #1 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?
« Last Edit: May 02, 2011, 07:43:24 am by m1ac4 »

Offline MPoupe

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 168
  • Rating: +30/-1
  • The coder of yesterday
    • View Profile
    • My web site about Casio calculator
Re: Casio Prizm + truecolor ?
« Reply #2 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.

Offline SimonLothar

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 129
  • Rating: +35/-1
    • View Profile
Re: Casio Prizm + truecolor ?
« Reply #3 on: May 02, 2011, 11:54:24 am »
Does somebody know how to enable true color mode programatically?
Try syscall 0x0921 with argument 1.
I'll be back.

Offline AngelFish

  • Is this my custom title?
  • Administrator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3242
  • Rating: +270/-27
  • I'm a Fishbot
    • View Profile
Re: Casio Prizm + truecolor ?
« Reply #4 on: May 02, 2011, 12:02:31 pm »
Ah, that bloody menu handler. It's quite annoying, when you get down to it.
∂²Ψ    -(2m(V(x)-E)Ψ
---  = -------------
∂x²        ℏ²Ψ

Offline fxdev

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 177
  • Rating: +34/-6
    • View Profile
Re: Casio Prizm + truecolor ?
« Reply #5 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.

Ashbad

  • Guest
Re: Casio Prizm + truecolor ?
« Reply #6 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.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Casio Prizm + truecolor ?
« Reply #7 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...

Offline MPoupe

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 168
  • Rating: +30/-1
  • The coder of yesterday
    • View Profile
    • My web site about Casio calculator
Re: Casio Prizm + truecolor ?
« Reply #8 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 !