CASIO container format¶
Multiple file formats by CASIO use what has been named a “standard header” by the community. Said header is 32 (0x20) bytes long, and is obfuscated by using bitwise NOT.
The format of this header is the following:
Offset |
Size |
Field name |
Description |
Values |
---|---|---|---|---|
0 (0x00) |
14 B |
File Type (FT) |
Type of the file. |
See the subsections below. |
14 (0x0E) |
1 B |
Control 1 (C1) |
First control byte. |
Should be set to |
15 (0x0F) |
1 B |
Reserved |
Should be set to |
|
16 (0x10) |
4 B |
File Size (FS) |
Big endian 32-bit integer. |
|
20 (0x14) |
1 B |
Control 2 (C2) |
Second control byte. |
Should be set to |
21 (0x15) |
7 B |
Reserved |
Should be set to |
|
28 (0x1C) |
2 B |
Obfuscation Options |
||
30 (0x1E) |
2 B |
Object Count (OC) |
Big endian 16-bit integer. |
Some subtypes, mostly those for fx-CP and fx-CG models, have a “standard subheader”, which has the following format:
Offset |
Size |
Field name |
Description |
Values |
||||||
---|---|---|---|---|---|---|---|---|---|---|
0 (0x00) |
4 B |
Checksum (CS) |
Big endian 32-bit integer. |
|||||||
4 (0x04) |
1 B |
File type (FT) |
||||||||
5 (0x05) |
1 B |
Target platform (FP) |
Value set according to the targeted platform:
|
|||||||
6 (0x06) |
4 B |
Reserved. |
Set to |
|||||||
10 (0x0A) |
4 B |
Data Size (DS) |
Big endian 32-bit integer. |
|||||||
14 (0x0E) |
4 B |
Control value (C3) |
Big endian 32-bit integer. This should be set depending on the platform to:
|
|||||||
18 (0x12) |
4 B |
Reserved. |
Set to |
|||||||
22 (0x16) |
4 B |
Message Zone Size (MZS) |
Big endian 32-bit integer. Unreliable, may and should be set to 0. |
|||||||
26 (0x1A) |
6 B |
Targeted Add-in Platform (AP) |
For C1A, should be set to |
|||||||
32 (0x20) |
28 B |
Title (T) |
Title or language name. |
|||||||
60 (0x3C) |
4 B |
File Size (FS) |
Big endian 32-bit integer. |
|||||||
64 (0x40) |
11 B |
Internal Add-in Name (IN) |
||||||||
75 (0x4B) |
192 B |
Language Labels |
8 times a 24 bytes long string. |
|||||||
267 (0x10B) |
1 B |
e-Activity strip flag (EAS) |
Available values are the following:
|
|||||||
268 (0x10C) |
4 B |
Reserved |
Set to |
|||||||
272 (0x110) |
10 B |
Add-in version. |
||||||||
282 (0x11A) |
2 B |
Reserved. |
Set to |
|||||||
284 (0x11C) |
14 B |
Timestamp |
|
Known types for this container format are the following:
FT (StandardHeader) |
FT (StandardSubheader) |
Type |
---|---|---|
|
N/A |
|
|
|
|
|
|
|
|
N/A |
|
|
|
|
|
N/A |
Main memory archives (fx-CP) |
|
N/A |
|
|
N/A |
Main memory archives (fx-9860G) |
|
N/A |
Main memory archives (fx-CG) |
|
N/A |
|
|
N/A |
Todo
Document the \xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF
case, in which we need to use the extension instead of the format within
the file.