cake
/
libg1m
Archived
1
0
Fork 0
This repository has been archived on 2024-03-16. You can view files and clone it, but cannot push or open issues or pull requests.
libg1m/include/libg1m/format.h

89 lines
4.4 KiB
C

/* *****************************************************************************
* libg1m/format.h -- the G1M format description.
* Copyright (C) 2017 Thomas "Cakeisalie5" Touhey <thomas@touhey.fr>
*
* This file is part of libg1m.
* libg1m is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 3.0 of the License,
* or (at your option) any later version.
*
* libg1m is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with libg1m; if not, see <http://www.gnu.org/licenses/>.
* ************************************************************************** */
#ifndef LIBG1M_FORMAT_H
# define LIBG1M_FORMAT_H
# include <stdint.h>
/* Welcome on this new episode of the Monster Circus show! Today we'll present
* to you the different formats surrounding CASIO calculators: open or closed,
* legacy or legacy, obfuscated or not, I hope you'll enjoy them as much
* as I don't! */
/* ************************************************************************** */
/* The CASIOLINK (CAS) format */
/* ************************************************************************** */
/* This is the first file format used by the CASIO community; it was
* more or less a dump of the communications protocol CASIO used until
* the fx-9860G (Graph 85) was announced, around 2004.
* It was managed by the CaS software, made by Tom Wheeler with the help of
* other people like Tom Lynn. This software was developed around 1997.
*
* There were two main versions of this protocol, leading to two different
* versions of the CAS file specification: the original protocol, used on the
* CFX-9700G (called cas in libg1m), and the newer protocol, used on the
* CFX-9850 (called caspro in libg1m).
*
* Here are the two headers: */
# include <libg1m/format/cas.h>
# include <libg1m/format/caspro.h>
/* ************************************************************************** */
/* The FXI format */
/* ************************************************************************** */
/* fx-Interface, an old but well done proprietary interface by CASIO, has its
* own format: the FXI format. It's an obfuscated format (althrough the
* obfuscation algorithm has been found).
*
* It starts with the following obfuscated string: */
# define FXI_OBF_MAGIC "\x32\x30" "\xF8\xA1"
# define FXI_DEC_MAGIC "\xD5\xD7" "\x1F\x46" "FX-INTERFACE - YELLOW COMPUTING"
/* Followed by loads of zero, then, the content. The description of the rest
* of the format is described in this header: */
//# include <libg1m/format/fxi.h>
/* ************************************************************************** */
/* The Casemul format */
/* ************************************************************************** */
/* Casemul is a CASIO emulator for Microsoft Windows. It is an old software
* which was not updated since 2005. It can import and export other files,
* but save its files in its own format, which use the .cas extension
* (like the CASIOLINK format, but the two formats are completely different).
*
* It starts with a four-letter magic string, "ACFS". In fact, it is
* "CASF", like in "CasFile", the name of the real header. */
# define CASEMUL_MAGIC "ACFS"
/* Discover the rest in its own header: */
# include <libg1m/format/casemul.h>
/* ************************************************************************** */
/* The G1M/STD format */
/* ************************************************************************** */
/* Since around 2004, CASIO has adopted a single "superformat"; we call it
* CASIO's standard format, or the G1M format (it doesn't really have a
* *public* name, other than its magics, like USBPower or CASIO).
*
* It doesn't have a single magic string, but a few. But the standard header
* has the same format, so we consider it as the same format. */
# include <libg1m/format/std.h>
#endif /* LIBG1M_FORMAT_H */