Author Topic: Any FX-cg10/20 PNG->3-bit g3p converter?  (Read 9101 times)

0 Members and 2 Guests are viewing this topic.

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
Any FX-cg10/20 PNG->3-bit g3p converter?
« on: February 01, 2014, 10:36:47 am »
I was wondering if there was any program that could convert PNG (or even JPG/GIF/BMP) images to 3-bit g3p pictures (the ones with only 8 colors) for the Casio FX-cg10/20/PRIZM? I really mean the 8-color images, not the 65536-color ones for the cg20 model. Basically the ones where the only colors available are cyan, blue, green, red, yellow, black and magenta and can be modified by FX-cg10/20 BASIC programs, not the bigger ones with more colors that only works on European models, are massive in size and can't be modified by BASIC programs.

Sadly, SourceCoder, while it has many image format options, lacks conversion to 3-bit g3p files and only has Lua/C formats, and I would rather like to not have to draw things like the following pixel-by-pixel on-calc:



Thanks in advance.
« Last Edit: February 01, 2014, 10:44:45 am by DJ Omnimaga »

Offline fb39ca4

  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1749
  • Rating: +60/-3
    • View Profile
Re: Any FX-cg10/20 PNG->3-bit g3p converter?
« Reply #1 on: February 01, 2014, 05:01:06 pm »
Is there any documentation on the file format?

Offline gbl08ma

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 5
  • Rating: +0/-0
    • View Profile
Re: Any FX-cg10/20 PNG->3-bit g3p converter?
« Reply #2 on: February 01, 2014, 05:06:22 pm »
Huge confusion in there...

The CG-10 supports full and 8-color images, just like the CG-20. The only difference is that the CG-10 will only read g3p files "Provided by CASIO" or created on-calc with the screen capture function.

The official Casio converter will always generate images in full-color which only work on the CG-20, so definitely not what you're looking for. You can create a g3p with any content by saving an image as non-progressive JPEG and viewing it on-calc with my image viewer, then capturing the screen while the picture is shown (you can save the jpg with 100% quality and it will look the same as if it was a PNG). While this will work, it will only create full-color images, so not quite what you're after. I think that is the closest you can get to your objective, with the currently available tools.
AFAIK the only way to create 3-bit color images is to capture the screen while it is in 3-bit mode.

Work related to reverse-engineering understanding the g3p file format was halted some years ago when discussions on this forum expressed the concern that Casio could start to actively block 3rd-party code in their calculators (a-la-TI), if people circumvented the restrictions of the CG-10 model. The same arguments almost convinced me to not release my image viewer, but I ended up doing it, and so far, of all the add-ins I made, it's the one with most downloads. Casio did nothing about it (and there have been many OS updates after it). More recently, I also released a math engine port with symbolic functions (so much to avoid saying that three-letter acronym), and yet again nothing was done about it. Even more recently, Casio Education's official Twitter feed (@CasioPrizm) retweeted two tweets about custom add-ins (my Utilities add-in and then KermM's Graph3DP). So I think we could have done everything we wanted to the g3p file format, that nothing special would have happened. But now, it's probably too late, I think the interest of the calculator hacking community around the Prizm has pretty much vanished (at least for the expert users who could actually reverse-engineer anything), and the needs of existing Prizm users have been dealt with, either with the official g3p converter (hint: there's a serial somewhere on the internet) in the case of the CG-20, or with my JPEG image viewer which works on both models (download: http://tny.im/ivcp ).

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: Re: Any FX-cg10/20 PNG->3-bit g3p converter?
« Reply #3 on: February 01, 2014, 05:37:45 pm »
Actually I meant the 3 bit format, since I know that 16 bit pics supported on the cg10 model are the ones by Casio. As for image hacking, we halted dev on the g3p format on Omni after a few complains from some Cemetech users, who got concerned that Omni encouraged cheating and could accidentally turn Casio against the hacking community by circumventing their protections, at a time where Kerm tried to build a relationship with Casio. I think your image viewer is fine, though, because it doesn't tamper directly nor indirectly with Casio's anti-custom-g3p limitation on American models.

But yeah I was curious about a 3 bit color converter since I could edit such image in a few minutes in Paint or Photoshop instead of on-calc in hours with no flood fill command, and they would be considerably smaller in size than full color pics, and AFAIK, the 8-color images are not restricted on the cg10 models (since, after all, we can use StorePic-like commands in BASIC to create them).

Offline fb39ca4

  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1749
  • Rating: +60/-3
    • View Profile
Re: Any FX-cg10/20 PNG->3-bit g3p converter?
« Reply #4 on: February 01, 2014, 10:48:30 pm »
Where is cheating coming into this? I don't understand how pictures would further enable it when you already have a device from which you can store and recall information. I think it is hypocritical to refrain from circumventing Casio's restrictions when we are doing the same with the Nspire.

Anyways, if there is information on the 3-bit file format available, I could probably cobble something together. By the way, that Zelda map is looking good.
« Last Edit: February 01, 2014, 10:50:05 pm by fb39ca4 »

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: Any FX-cg10/20 PNG->3-bit g3p converter?
« Reply #5 on: February 01, 2014, 11:49:02 pm »
The fact the protection against 3rd-party 16-bit pics on American models is to prevent cheating in tests and compli with standards there. Granted, we can create our own img format or use 3-bit pics, but at least in that case you are not trying to circumvent Casio's protections.