Register

G1M Format - E-Activities - Unknown Line Types

Discuss issues related to Calculator Hacking/Modding.
Senior Member
User avatar
Posts: 101
Joined: Sun Mar 27, 2016 10:24 am
Location: France
Calculators: Casio Afx 1.0, Casio fx-9860GII, Casio fx-CG50

G1M Format - E-Activities - Unknown Line Types

Postby cakeisalie5 » Mon Oct 31, 2016 1:40 pm

Hello,

so I'm making a little library that parses G[0-9]* files. I've added MCS and G1A support, and I'm adding E-Activities support, but while parsing, I've encountered some unknown line types:
- 0xc1
- 0x08
- 0x06

Here's the full log if you're curious:
Log: Show
cake@66 :: lib/libg1m » ./test tests/FlyingFish.g3e
[libg1m info] g1m_parse: Standard Header Main ID was 'USBPower'
[libg1m info] g1m_parse: Standard Header Type was 'E-Act' (0x49)
[libg1m info] g1m_parse_eact: Setup area size is 0x54 bytes long.
[libg1m info] g1m_parse_eact: 58 lines to browse.
[libg1m info] g1m_parse_eact: [0] Is 'standard heading' (0x07)
[libg1m info] g1m_parse_eact: [1] Is 'unknown' (0xc1)
[libg1m info] g1m_parse_eact: [2] Is 'unknown' (0x08)
[libg1m info] g1m_parse_eact: [3] Is 'pure text' (0x81)
[libg1m info] g1m_parse_eact: [4] Is 'unknown' (0x06)
[libg1m info] g1m_parse_eact: [5] Is 'pure text' (0x81)
[libg1m info] g1m_parse_eact: [6] Is 'unknown' (0xc1)
[libg1m info] g1m_parse_eact: [7] Is 'pure text' (0x81)
[libg1m info] g1m_parse_eact: [8] Is 'pure text' (0x81)
[libg1m info] g1m_parse_eact: [9] Is 'pure text' (0x81)
[libg1m info] g1m_parse_eact: [10] Is 'pure text' (0x81)
[libg1m info] g1m_parse_eact: [11] Is 'pure text' (0x81)
[libg1m info] g1m_parse_eact: [12] Is 'pure text' (0x81)
[libg1m info] g1m_parse_eact: [13] Is 'pure text' (0x81)
[libg1m info] g1m_parse_eact: [14] Is 'pure text' (0x81)
[libg1m info] g1m_parse_eact: [15] Is 'pure text' (0x81)
[libg1m info] g1m_parse_eact: [16] Is 'pure text' (0x81)
[libg1m info] g1m_parse_eact: [17] Is 'pure text' (0x81)
[libg1m info] g1m_parse_eact: [18] Is 'pure text' (0x81)
[libg1m info] g1m_parse_eact: [19] Is 'pure text' (0x81)
[libg1m info] g1m_parse_eact: [20] Is 'pure text' (0x81)
[libg1m info] g1m_parse_eact: [21] Is 'pure text' (0x81)
[libg1m info] g1m_parse_eact: [22] Is 'pure text' (0x81)
[libg1m info] g1m_parse_eact: [23] Is 'pure text' (0x81)
[libg1m info] g1m_parse_eact: [24] Is 'pure text' (0x81)
[libg1m info] g1m_parse_eact: [25] Is 'pure text' (0x81)
[libg1m info] g1m_parse_eact: [26] Is 'pure text' (0x81)
[libg1m info] g1m_parse_eact: [27] Is 'pure text' (0x81)
[libg1m info] g1m_parse_eact: [28] Is 'pure text' (0x81)
[libg1m info] g1m_parse_eact: [29] Is 'pure text' (0x81)
[libg1m info] g1m_parse_eact: [30] Is 'pure text' (0x81)
[libg1m info] g1m_parse_eact: [31] Is 'pure text' (0x81)
[libg1m info] g1m_parse_eact: [32] Is 'pure text' (0x81)
[libg1m info] g1m_parse_eact: [33] Is 'pure text' (0x81)
[libg1m info] g1m_parse_eact: [34] Is 'pure text' (0x81)
[libg1m info] g1m_parse_eact: [35] Is 'pure text' (0x81)
[libg1m info] g1m_parse_eact: [36] Is 'pure text' (0x81)
[libg1m info] g1m_parse_eact: [37] Is 'pure text' (0x81)
[libg1m info] g1m_parse_eact: [38] Is 'pure text' (0x81)
[libg1m info] g1m_parse_eact: [39] Is 'pure text' (0x81)
[libg1m info] g1m_parse_eact: [40] Is 'pure text' (0x81)
[libg1m info] g1m_parse_eact: [41] Is 'unknown' (0xc1)
[libg1m info] g1m_parse_eact: [42] Is 'unknown' (0x06)
[libg1m info] g1m_parse_eact: [43] Is 'unknown' (0x06)
[libg1m info] g1m_parse_eact: [44] Is 'unknown' (0x06)
[libg1m info] g1m_parse_eact: [45] Is 'unknown' (0x06)
[libg1m info] g1m_parse_eact: [46] Is 'unknown' (0x06)
[libg1m info] g1m_parse_eact: [47] Is 'unknown' (0x06)
[libg1m info] g1m_parse_eact: [48] Is 'unknown' (0x06)
[libg1m info] g1m_parse_eact: [49] Is 'unknown' (0x06)
[libg1m info] g1m_parse_eact: [50] Is 'unknown' (0x06)
[libg1m info] g1m_parse_eact: [51] Is 'unknown' (0x06)
[libg1m info] g1m_parse_eact: [52] Is 'unknown' (0x06)
[libg1m info] g1m_parse_eact: [53] Is 'unknown' (0x06)
[libg1m info] g1m_parse_eact: [54] Is 'unknown' (0x06)
[libg1m info] g1m_parse_eact: [55] Is 'unknown' (0x06)
[libg1m info] g1m_parse_eact: [56] Is 'unknown' (0x06)
[libg1m info] g1m_parse_eact: [57] Is 'pure text' (0x81)

Any idea what these lines could be?
Part of the Planète Casio community (FR) - main author of Cahute

Senior Member
Posts: 369
Joined: Tue Jan 03, 2012 11:24 pm
Calculators: Casio Afx 1.0, Casio fx-9860GII SD, Casio Classpad 330, Casio fx-CG20, Casio Classpad fx-CP400

Re: G1M Format - E-Activities - Unknown Line Types

Postby helder7 » Tue Nov 01, 2016 11:25 pm

Please upload the file "FlyingFish.g3e" somewhere, for I (or other person) check :) .
SiO2 + CaCO3 ----------> CaSiO3 + CO2

Senior Member
User avatar
Posts: 101
Joined: Sun Mar 27, 2016 10:24 am
Location: France
Calculators: Casio Afx 1.0, Casio fx-9860GII, Casio fx-CG50

Re: G1M Format - E-Activities - Unknown Line Types

Postby cakeisalie5 » Wed Nov 02, 2016 12:45 am

Oh yep, sorry! Here it is :)
Btw, I discovered strips today and my tests showed that these were strips IDs (except for 0xC1, which I don't know about).

(and it looks like some of the IDs of the strips)

EDIT: OMG, sub-e-activites are a thing ? Oo
Part of the Planète Casio community (FR) - main author of Cahute

Senior Member
User avatar
Posts: 101
Joined: Sun Mar 27, 2016 10:24 am
Location: France
Calculators: Casio Afx 1.0, Casio fx-9860GII, Casio fx-CG50

Re: G1M Format - E-Activities - Unknown Line Types

Postby cakeisalie5 » Wed Nov 02, 2016 2:03 am

So I've made some more tests with strips I did on my tweaked fx-9750GII-2. Here's the STRIPS.g2e.

Here's the log:
Log: Show
[libg1m info] g1m_parse: Raw standard header is:
[libg1m info] 5553 4250 6F77 6572 4900 1000 1000 E501 USBPowerI.......
[libg1m info] 0000 01A4 5CFF FFFF FFFF FFFF FFFF FFFF ....\...........
[libg1m info] g1m_parse: Standard Header Main ID is 'USBPower'
[libg1m info] g1m_parse: Standard Header Type is 'e-activity' (0x49)
[libg1m info] g1m_parse: Standard Header filesize is 420o
[libg1m info] g1m_parse: Standard Header num is 65535.
[libg1m info] g1m_parse_eact: E-Activity version is 'g3e'.
[libg1m info] g1m_parse_eact: Setup area size is 0x50 bytes long.
[libg1m info] g1m_parse_eact: bufsize is 292o
[libg1m info] g1m_parse_eact_content: Type is '@EACT'
[libg1m info] g1m_parse_eact_content: Name is 'EACT1'
[libg1m info] g1m_parse_eact_content: [1] Is 'standard heading' (0x07)
[libg1m info] g1m_parse_eact_content: [1] Buffer (0x18o) is:
[libg1m info] 3D3D 3D3D 3D3D 5445 5354 2020 2020 3D3D ======TEST ==
[libg1m info] 3D3D 3D3D 3D00 0000 =====...
[libg1m info] g1m_parse_eact_content: [2] Is 'pure text' (0x81)
[libg1m info] g1m_parse_eact_content: [2] Buffer (0x8o) is:
[libg1m info] 4F55 492E 0000 0080 OUI.....
[libg1m info] g1m_parse_eact_content: [3] Is 'unknown' (0x03)
[libg1m info] g1m_parse_eact_content: [3] Buffer (0x10o) is:
[libg1m info] 0018 0008 0000 0000 3939 8935 0001 0148 ........99.5...H
[libg1m info] g1m_parse_eact_content: [4] Is 'unknown' (0x04)
[libg1m info] g1m_parse_eact_content: [4] Buffer (0x2co) is:
[libg1m info] 1021 0400 0000 0000 0000 0000 0000 0008 .!..............
[libg1m info] 8005 FFB4 0000 006B 0012 0008 0000 0100 .......k........
[libg1m info] 0000 0000 0000 0000 0000 0001 ............
[libg1m info] g1m_parse_eact_content: [5] Is 'unknown' (0x06)
[libg1m info] g1m_parse_eact_content: [5] Buffer (0x18o) is:
[libg1m info] 4052 554E 4D41 5400 0000 0000 0000 0000 @RUNMAT.........
[libg1m info] 4E4F 4E00 0000 0000 NON.....
[libg1m info] g1m_parse_eact_content: [6] Is 'unknown' (0x06)
[libg1m info] g1m_parse_eact_content: [6] Buffer (0x24o) is:
[libg1m info] 4045 4143 5400 0000 0000 0000 000A 0000 @EACT...........
[libg1m info] 4C65 2073 6176 6965 7A20 766F 7573 3F00 Le saviez vous?.
[libg1m info] 0000 0000 ....
[libg1m info] g1m_parse_eact_content: [7] Is 'pure text' (0x81)
[libg1m info] g1m_parse_eact_content: [7] Buffer (0x44o) is:
[libg1m info] 0055 492E 6D61 696E 0000 0000 0000 0001 .UI.main........
[libg1m info] 0000 0030 4D41 545F 4100 0000 0000 0014 ...0MAT_A.......
[libg1m info] 0000 001C 8C00 0002 0000 0000 0000 0000 ................
[libg1m info] 0001 0001 0000 0000 1015 6000 0000 0000 ..........`.....
[libg1m info] 0000 0000 ....

The e-act is the title, then "OUI." in text, then "99+5", then its result (104), then a "RUN" STRIP containing "NON", then a "NOTES" strip containing "Le saviez-vous ?".

This format is funny. :D
Have you explored all of the types and strips yet? What about the recursive form?
Part of the Planète Casio community (FR) - main author of Cahute

Senior Member
Posts: 369
Joined: Tue Jan 03, 2012 11:24 pm
Calculators: Casio Afx 1.0, Casio fx-9860GII SD, Casio Classpad 330, Casio fx-CG20, Casio Classpad fx-CP400

Re: G1M Format - E-Activities - Unknown Line Types

Postby helder7 » Wed Nov 02, 2016 11:00 pm

In EactMaker project we just explored Note strips.
According to my experience, strips inside strips is something that is not possible. This function does not seem to be implemented. I think this limitation is related to the way who the OS deal with strips.
The only "hidden feature" that I found was the use of locked colors in fx-CG calculators.

In the file "STRIPS.g2e":
The "calc mode", need the height and the width in pixels of the contained equation in the line. Calculate it is not trivial. If what you want to do is just parse it, this should be no problem.
SiO2 + CaCO3 ----------> CaSiO3 + CO2

Senior Member
User avatar
Posts: 101
Joined: Sun Mar 27, 2016 10:24 am
Location: France
Calculators: Casio Afx 1.0, Casio fx-9860GII, Casio fx-CG50

Re: G1M Format - E-Activities - Unknown Line Types

Postby cakeisalie5 » Mon Nov 21, 2016 5:53 pm

Sorry for not answering straight away!

Strips inside the main strip is possible. I've parsed it like this, and it worked (even if there is pretty much only a header and the name):

STRIPS.g2e: Show
[libg1m info] g1m_parse: Raw standard header is:
[libg1m info] 5553 4250 6F77 6572 4900 1000 1000 E501 USBPowerI.......
[libg1m info] 0000 01A4 5CFF FFFF FFFF FFFF FFFF FFFF ....\...........
[libg1m info] g1m_parse: Standard Header Main ID is 'USBPower'
[libg1m info] g1m_parse: Standard Header Type is 'e-activity' (0x49)
[libg1m info] g1m_parse: Standard Header filesize is 420o
[libg1m info] g1m_parse: Standard Header num is 65535.
[libg1m info] g1m_parse_eact: E-Activity version is 'g3e'.
[libg1m info] g1m_parse_eact: Setup area size is 0x50 bytes long.
[libg1m info] g1m_parse_eact_cont: [>0] Type is '@EACT'
[libg1m info] g1m_parse_eact_cont: [>0] Name is 'EACT1'
[libg1m info] g1m_parse_eact_eact: [>0] 7 lines to browse
[libg1m info] g1m_parse_eact_eact: [>0][1] Is 'standard heading' (0x07)
[libg1m info] g1m_parse_eact_eact: [>0][1] Buffer (0x18o) is:
[libg1m info] 3D3D 3D3D 3D3D 5445 5354 2020 2020 3D3D ======TEST ==
[libg1m info] 3D3D 3D3D 3D00 0000 =====...
[libg1m info] g1m_parse_eact_eact: [>0][2] Is 'pure text' (0x81)
[libg1m info] g1m_parse_eact_eact: [>0][2] Buffer (0x8o) is:
[libg1m info] 4F55 492E 0000 0080 OUI.....
[libg1m info] g1m_parse_eact_eact: [>0][3] Is 'calculation' (0x03)
[libg1m info] g1m_parse_eact_eact: [>0][3] Buffer (0x10o) is:
[libg1m info] 0018 0008 0000 0000 3939 8935 0001 0148 ........99.5...H
[libg1m info] g1m_parse_eact_eact: [>0][4] Is 'calculation result' (0x04)
[libg1m info] g1m_parse_eact_eact: [>0][4] Buffer (0x2co) is:
[libg1m info] 1021 0400 0000 0000 0000 0000 0000 0008 .!..............
[libg1m info] 8005 FFB4 0000 006B 0012 0008 0000 0100 .......k........
[libg1m info] 0000 0000 0000 0000 0000 0001 ............
[libg1m info] g1m_parse_eact_eact: [>0][5] Is 'content' (0x06)
[libg1m info] g1m_parse_eact_cont: [>1] Type is '@RUNMAT'
[libg1m info] g1m_parse_eact_cont: [>1] Name is 'NON'
[libg1m info] g1m_parse_eact_eact: [>0][6] Is 'content' (0x06)
[libg1m info] g1m_parse_eact_cont: [>1] Type is '@EACT'
[libg1m info] g1m_parse_eact_cont: [>1] Name is 'Le saviez vous?'
[libg1m info] g1m_parse_eact_eact: [>0][7] Is 'pure text' (0x81)
[libg1m info] g1m_parse_eact_eact: [>0][7] Buffer (0x44o) is:
[libg1m info] 0055 492E 6D61 696E 0000 0000 0000 0001 .UI.main........
[libg1m info] 0000 0030 4D41 545F 4100 0000 0000 0014 ...0MAT_A.......
[libg1m info] 0000 001C 8C00 0002 0000 0000 0000 0000 ................
[libg1m info] 0001 0001 0000 0000 1015 6000 0000 0000 ..........`.....
[libg1m info] 0000 0000 ....


Did you discover how the locked colors are aligned for pure text?
How are the calculation and the calculation stored (how can I parse it)?
What does "UI.main" mean for the last pure text field?
What about the other type, 0xc1?

Thanks in advance :D
Part of the Planète Casio community (FR) - main author of Cahute

Return to Calculator Hacking/Modding Discussions

Who is online

Users browsing this forum: No registered users and 29 guests