Differences

This shows you the differences between two versions of the page.

formats:cat [2010/02/06 21:36]
88.217.61.153
formats:cat [2010/06/16 11:05] (current)
thesa old revision restored
Line 1: Line 1:
 +The Cat format is a format very used on the web because it’s the format of the popular software Fa-122, [[http://world.casio.com/edu/resources/fa123/index.html|Fa-123]]. In [[http://world.casio.com/edu/resources/fa124/index.html|Fa-124]], this format was abandoned for the calculator Casio Graph 85, but it’s always used for others calculator. This format allow many record in a single file, and support all casio data types. Cat files are ended by .cat
 +This plain text format use Windows new line (CRLF - 10 13 - 0x0D 0x0A).
 +
 +====== Records ======
 +
 +This format can contain many record in a single file. Here is examples of header records (number in parentheses are not in the record, they refer to the explanations)
 +
 +===== Header record of programs =====
 +
 +<code>
 +%Header Record
 +Format:TXT (1)
 +Communication SW:0
 +Data Type:PG (2)
 +Capacity: (3)
 +File Name:MyPrgm
 +Group Name:
 +Password: (4)
 +Option1:NL (5)
 +Option2:
 +Option3:
 +Option4:
 +%Data Record
 +Data of the record, as explained below.
 +%End
 +</code>
 +
 +  - Kind of data (text, picture, table, etc.)
 +    * TXT refer to text
 +  - Type of casio data (program, picture, list, matrix, etc.)
 +    * PG refer to program
 +  - Size of the data record, in the raw format, in bytes, plus two (why ? I don't know.)
 +  - Password in plain text
 +  - Some options about the program
 +    * NL refer to a normal program
 +    * BN refer to program using base operations
 +
 +===== Header record of backups =====
 +
 +<code>
 +%Header Record
 +Format:MEM (1)
 +Communication SW:0
 +Data Type:BU (2)
 +Capacity:63490 (3)
 +Data Name:Backup
 +Group Name:
 +Model:GY358 (4)
 +Option:001038200000FFFFFFFFFFFFFFFF (5)
 +%Data Record
 +Data of the backup, encoded as explained below.
 +%End
 +</code>
 +
 +  - Kind of data (text, picture, table, etc.)
 +    * MEM refer to a base-16-encoded memory dump
 +  - Type of casio data (program, picture, list, matrix, etc.)
 +    * BU refer to backup
 +  - Size of the backup, in the raw format, in bytes, plus two (why ? I don't know.)
 +  - A string witch refer to calculator, here a casio graph 65
 +  - Maybe a checksum, 28 characters (if not present, Fa-12* ignore it)
 +
 +===== Header record of pictures =====
 +
 +<code>
 +%Header Record
 +Format:IMG (1)
 +Communication SW:0
 +Data Type:PC (2)
 +Height:64 (3)
 +Width:128 (3)
 +Data Name:Picture1 (4)
 +Group Name:
 +Start Position:DR
 +Direction:U
 +Byte Direction:W
 +Bit Weight:F
 +Colors:4
 +Sheets:1
 +Option1:
 +Option2:
 +Option3:
 +Option4:
 +%Data Record
 +Data of the picture, like explained below.
 +%End
 +</code>
 +
 +  - Kind of data (text, picture, table, etc.)
 +    * IMG refer to a picture in the cat picture format (see below)
 +  - Type of casio data (program, picture, list, matrix, etc.)
 +    * Pc refer to picture
 +  - Size of the picture
 +  - The name of the picture (must begin by "Picture", followed by a digit between 1 and 6)
 +
 +====== Data ======
 +
 +This section describe how data is encoded in records.
 +
 +===== Programs =====
 +
 +Programs are encoded using text tokens to replace casio special characters and commands. Many of those token begin by \, but some very used token as  , -, *, / are not preceded by \. End of line and end character (255 - 0xFF) are replaced by a windows end of line.
 +
 +You can see a [[:/spec/newcat/token_list.0.2.1.txt|token list]].
 +
 +===== Backups =====
 +
 +Backups are memory dumps, encoded in base 16 (each 4 bits is represented by its hexadecimal equivalent), organized in line of 32 characters, with Windows end-of-line.
 +
 +===== Picture =====
 +
 +For picture, the data record is like:
 +
 +<code>
 +%Data Record
 +Sheet:1
 +Color:1
 +00000000000000000000000000000000
 +[...]
 +00000000000000000000000000400000
 +Sheet:1
 +Color:2
 +00000000000000000000000000000000
 +[...]
 +00000000000000000000000000004F00
 +Sheet:1
 +Color:3
 +00000000000000000000000000000000
 +[...]
 +00000000000000000000000000002000
 +Sheet:1
 +Color:4
 +00000000000000000000000000000000
 +[...]
 +00000000000000000000000000000000
 +%End
 +</code>
 +
 +The picture is in the [[raw#pictures|casio picture format]], with a pallet of [orange, blue, green, white]. After each line "Color:", the corresponding sheet is stored, without the colour byte. The sheet is stored in 32 characters long line. Each two character is a byte, stored in its hexadecimal view (by example, the 0x1F byte is stored by characters 1F). There is 64 line for each sheet.
 

Powered by PHP Valid XHTML 1.0 strict Valid CSS Driven by DokuWiki

The content of this website is, without another mention, under the GNU Free Documentation License.