cake
/
libg1m
Archived
1
0
Fork 0

Added some C2P documentation

This commit is contained in:
Thomas Touhey 2016-12-01 15:30:36 +01:00
parent c728eff645
commit d9863de2ab
1 changed files with 64 additions and 1 deletions

View File

@ -11,7 +11,10 @@
# define LIBG1M_FORMAT_PICTURE_H
# include <stdint.h>
/* These are pictures for fx-CG. They only have one part.
/* ************************************************************************** */
/* G3P: pictures for Prizm */
/* ************************************************************************** */
/* G3P are pictures for fx-CG. They only have one part.
* This mysteries over this format have been unraveled by many, but I'm using
* Simon Lothar's documentation and Kerm Martian's articles.
*
@ -108,5 +111,65 @@ struct g3p_imagefooter {
uint32_t checksum;
};
/* ************************************************************************** */
/* C2P: Images for Classpads */
/* ************************************************************************** */
/* C2P are images for fx-CP400 calculators. It starts of with this header: */
struct c2p_subheader {
/* magic field: "CC0100" */
uint8_t magic1[6];
/* second magic: "ColorCP\0\0\0" */
uint8_t color_cp[10];
/* filesize without standard header */
uint32_t c2p_size;
/* unknown */
uint32_t unknown;
/* filesize - 0x234 */
uint32_t unknown_size;
/* undocumented */
uint8_t undocumented[124];
/* "0100" */
uint8_t zero_one_zero_zero[4];
/* filesize - 0x254 */
uint32_t unknown_size2;
/* unknown */
uint16_t unknown2;
/* width (max for screen: 0x136 */
uint16_t width;
/* height (max for screen: 0x191) */
uint16_t height;
/* undocumented, again */
uint8_t undocumented2[18];
/* filesize - 0x258 */
uint32_t unknown_size3;
};
/* Then there is the zlib header with default compression.
* The pixels format is R5G6B5.
*
* After the image, there is a footer, which is mainly undocumented, but
* here is what we've got: */
struct c2p_footer {
/* "0100", again */
uint8_t zero_one_zero_zero[4];
/* and some undocumented stuff */
uint8_t undocumented[358];
};
# pragma pack()
#endif /* LIBG1M_FORMAT_PICTURE_H */