Les membres ayant 30 points peuvent parler sur les canaux annonces, projets et hs du chat.
La shoutbox n'est pas chargée par défaut pour des raisons de performances. Cliquez pour charger.

Forum Casio - Autres questions


Index du Forum » Autres questions » g1m/g3m/g3p file format
Pt_ Hors ligne Membre Points: 7 Défis: 0 Message

g1m/g3m/g3p file format

Posté le 24/10/2020 11:36

Hello there! I'm new to this forum, but currently more active in the TI community (I'm an admin of Cemetech)
And I have a question: is there any documentation about the file format of g1m/g3m/g3p files? I only found something for the 32-byte header (https://media.taricorp.net/prizm/simon_chm/fxReverse2x.pdf), but not much more, sadly. Like, in the header there is a field for the amount of files, but how does that work? Are they just placed after each other? It seems to me every file in a g1m/g3m has a 54-byte header, but does anyone know what the structure of such header is?

Hope you could help me out, thanks in advance!


Kbd2 Hors ligne Membre Points: 269 Défis: 0 Message

Citer : Posté le 24/10/2020 11:38 | #


Here is some documentation on the g1m format
Pt_ Hors ligne Membre Points: 7 Défis: 0 Message

Citer : Posté le 24/10/2020 11:42 | #


Kbd2 a écrit :
Here is some documentation on the g1m format

Excellent, thanks! I see there are multiple types possible, basic programs, listfiles, pictures, captures. I already know about basic programs, but is there more documentation about the other files? This certainly helps me a lot!!
Kbd2 Hors ligne Membre Points: 269 Défis: 0 Message

Citer : Posté le 24/10/2020 11:45 | #


I can't find anything else on the PC bible, though someone more knowledgeable may be able to give more documentation.
Critor En ligne Administrateur Points: 2610 Défis: 18 Message

Citer : Posté le 24/10/2020 14:27 | #


Hi Pt_.

In exchange, would you contribute to the documentation of Casio file formats ?
.g1m images, .g3m images, .g3p... everything supported in SC.

Casio file formats aren't very well documented, and it's a pity I can't find anything public about the reverse analysis done for the support in SC.
Pt_ Hors ligne Membre Points: 7 Défis: 0 Message

Citer : Posté le 24/10/2020 14:29 | #


Critor a écrit :
Hi Pt_.

In exchange, would you contribute to the documentation of Casio file formats ?
.g1m images, .g3m images, .g3p... everything supported in SC.

Casio file formats aren't very well documented, and it's a pity I can't find anything public about the reverse analysis done for the support in SC.

Well, sure, I'm already very hard busy reverse-engineering the formats, and it certainly will be used in SourceCoder, plus documented elsewhere
Critor En ligne Administrateur Points: 2610 Défis: 18 Message

Citer : Posté le 24/10/2020 14:32 | #


Thanks.

Can't you start by sharing what has already been discovered ?
Since SC already supports .g1m, .g3m and .g3p files.
Pt_ Hors ligne Membre Points: 7 Défis: 0 Message

Citer : Posté le 24/10/2020 14:35 | #


Sure, here you go: https://pastebin.com/gMLmbiH1. These are the formats for 3 types: spreadsheets, programs and equations. I will just continue working on this
Critor En ligne Administrateur Points: 2610 Défis: 18 Message

Citer : Posté le 24/10/2020 14:37 | #


Thanks.

How about .g3p files, and .g1m/g3m pictures ?
They're supported by the SC converter.
Pt_ Hors ligne Membre Points: 7 Défis: 0 Message

Citer : Posté le 24/10/2020 14:39 | #


They are supported yeah, but that doesn't mean I know the format :P when I know more I will post it too!
Lephenixnoir Hors ligne Administrateur Points: 24234 Défis: 170 Message

Citer : Posté le 24/10/2020 14:48 | #


Oh @Cakeisalie5 put a great deal of work into reverse-engineering these formats. He's not actively developing anymore but there is still a lot of info out there. You might find significant details in the libcasio repostiory, especially in include/libcasio/format.

I know he discussed some details of the formats with Simon Lothar on Casiopeia so if you need something obscure and yet undocumented, you might have luck searching the forum there.
Mon graphe (11 Avril): ((Rogue Life || HH2) ; PythonExtra ; serial gint ; Boson X ; passe gint 3 ; ...) || (shoutbox v5 ; v5)
Critor En ligne Administrateur Points: 2610 Défis: 18 Message

Citer : Posté le 24/10/2020 14:49 | #


@Pt_ Thanks. If they're supported, then someone must know about them.

When I released my image converter for the fx-CP400/CG500 years ago, I publicly released my (probably very incomplete) reverse engineering of the format.

Leaving public traces of the file format reverse engineering is very important as it'll benefit future developers of conversion tools, linking softwares or emulators, and thus the whole community.
Pt_ Hors ligne Membre Points: 7 Défis: 0 Message
Critor En ligne Administrateur Points: 2610 Défis: 18 Message

Citer : Posté le 24/10/2020 16:31 | #


Thank you very much.
Cakeisalie5 En ligne Ancien administrateur Points: 1910 Défis: 11 Message

Citer : Posté le 13/12/2020 16:48 | #


Just saw the efforts provided here. Very nice!

Just to explain kind of the logic of the g[1-3][mp…] files:
- a standard headers, 32 (0x20) bytes long, obfuscated (structure once un-obfuscated, with correspondances to identify the file type beyond the standard header).

one exception: the storage format, g1s, which contains just a lot of blanks until the address in SH memory (0x02700000 or something i don't remember) then the raw storage memory.

Then if it's a g3* thingy, it has a standard subheader, described here with some correspondances defined here

Then specific subheaders, such as the G3P subheader, then the zlib-compressed R5G6B5 picture data and an adler32 checksum and some footers i think, i don't remember exactly for those

G1M and CAS files are main memory archives, with files but not with the usual metadata. G1M are the "modern" format (as opposed to CAS40/CAS50/CASDYN which was very linked to how they were represented in the legacy protocols). Main memory is called "MCS" by Simon Lothar, for Main Control Structure, and some formats are documented here, with the general G1M/G1R/G2M/G3M/G3R format given here (there are some subtitilies, e.g. file "groups", when parsing), the correspondances between what is in the header and the decode function to use is here (quite a few as you can see, and it's not complete at all).

There are many more things in these files, and I was also very interested in legacy formats, but ended up giving up in 2018 because i'm not organized enough. Feel free to hit me up with questions if needed

Promotion ordinaire sur les inscriptions sur Planète Casio : en ce moment, c'est gratuit !

Mon blogBesoin d'utilitaires de transfert vers et depuis la calculatrice sous GNU/Linux ?
Lephenixnoir Hors ligne Administrateur Points: 24234 Défis: 170 Message

Citer : Posté le 13/12/2020 17:20 | #


Pendant qu'on en est là, est-ce que tu peux résumer l'état de mcsfile ? Quelles parties sont utilisables ? Quels formats sont décemment complets ? Si quelqu'un voulait reprendre le projet, où est le code à étendre ? Haut niveau (description des formats) ou faut descendre compléter les APIs internes/etc ?
Mon graphe (11 Avril): ((Rogue Life || HH2) ; PythonExtra ; serial gint ; Boson X ; passe gint 3 ; ...) || (shoutbox v5 ; v5)
Cakeisalie5 En ligne Ancien administrateur Points: 1910 Défis: 11 Message

Citer : Posté le 13/12/2020 18:14 | #


Très bonne question, à laquelle je ne peux pas vraiment te répondre parce que ça fait longtemps que je n'ai pas continué ça. En fait ce qu'il s'est passé c'est que j'avais fait des éléments d'I/O très généraux dans la libcasio, qui avaient commencé par une simple utilisation de fopencookie() dans p7, puis que j'ai isolé dans la libtio et c'est en voulant développer la libtio que j'ai stall. La première chose que Lailoulezz a fait en clônant la libcasio c'est remettre ces éléments dans la libcasio pour simplifier, et il a probablement raison, ça peut être une idée de repartir de sa branche.

Après un jour je referai peut-être ça dans un langage plus moderne, où je n'aurais pas envie de refaire un équivalent de la libtio qui m'a stall le projet. Je me tâte à essayer Rust avec nom, ça peut être un projet plus riche mais je m'écarterais alors du C et de sa compatibilité. On sait ce qu'il en est du support du SuperH dans LLVM ?

Promotion ordinaire sur les inscriptions sur Planète Casio : en ce moment, c'est gratuit !

Mon blogBesoin d'utilitaires de transfert vers et depuis la calculatrice sous GNU/Linux ?
Lephenixnoir Hors ligne Administrateur Points: 24234 Défis: 170 Message

Citer : Posté le 13/12/2020 18:25 | #


À mon sens, la valeur du projet est supérieure à ses choix d'implémentation - si quelque chose peut te motiver à y retourner, lâche-toi.

LLVM n'a pas (et semble loin d'avoir) un backend SuperH : http://llvm.org/docs/CodeGenerator.html#target-feature-matrix
Mon graphe (11 Avril): ((Rogue Life || HH2) ; PythonExtra ; serial gint ; Boson X ; passe gint 3 ; ...) || (shoutbox v5 ; v5)
Critor En ligne Administrateur Points: 2610 Défis: 18 Message

Citer : Posté le 14/03/2021 22:34 | #


@Pt_
Did you notice this post about the g3p and g3b file formats ?
https://www.omnimaga.org/casio-calculator-programming-news-and-support/hacking-into-the-g3pb-format-(halted)/

LienAjouter une imageAjouter une vidéoAjouter un lien vers un profilAjouter du codeCiterAjouter un spoiler(texte affichable/masquable par un clic)Ajouter une barre de progressionItaliqueGrasSoulignéAfficher du texte barréCentréJustifiéPlus petitPlus grandPlus de smileys !
Cliquez pour épingler Cliquez pour détacher Cliquez pour fermer
Alignement de l'image: Redimensionnement de l'image (en pixel):
Afficher la liste des membres
:bow: :cool: :good: :love: ^^
:omg: :fusil: :aie: :argh: :mdr:
:boulet2: :thx: :champ: :whistle: :bounce:
valider
 :)  ;)  :D  :p
 :lol:  8)  :(  :@
 0_0  :oops:  :grr:  :E
 :O  :sry:  :mmm:  :waza:
 :'(  :here:  ^^  >:)

Σ π θ ± α β γ δ Δ σ λ
Veuillez donner la réponse en chiffre
Vous devez activer le Javascript dans votre navigateur pour pouvoir valider ce formulaire.

Si vous n'avez pas volontairement désactivé cette fonctionnalité de votre navigateur, il s'agit probablement d'un bug : contactez l'équipe de Planète Casio.

Planète Casio v4.3 © créé par Neuronix et Muelsaco 2004 - 2024 | Il y a 99 connectés | Nous contacter | Qui sommes-nous ? | Licences et remerciements

Planète Casio est un site communautaire non affilié à Casio. Toute reproduction de Planète Casio, même partielle, est interdite.
Les programmes et autres publications présentes sur Planète Casio restent la propriété de leurs auteurs et peuvent être soumis à des licences ou copyrights.
CASIO est une marque déposée par CASIO Computer Co., Ltd