Casemul is a powerful casio emulator for Microsoft Windows. It can import fxi and cat files, and can export cat files, but save its files in its own format. This format can save many record in a single file, and support data type as programs, pictures, lists, matrix. Casemul files are ended by .cas, but their are not in the CASIOLINK format!

Source code of Casemul can be downloaded on the Roy F.A. Maclean website, but this software is not a free “libre” software (see the conditions of use).

Casemul file format specifications

Casemul files are binary files ended by the extension .cas. Casemul files can contain various data such as programs, pictures, lists and matrix in one file.

File organization

A casemul file follow this organization:

  1. A file header, which contain length of various block
  2. The programs block:
    1. Various program records
  3. The picture block:
    1. Various picture records (up to 9)
  4. The matrix block:
    1. Various matrix records (up to 26, from A to Z)
  5. The lists block:
    1. Various lists records (up to 6)

Blocks are just the concatenation of records, but note that the file is sorted by data type, it's important for the file header. Each block can be empty.

Length count

Casemul format use a lot of length count. Length are always in bytes, stored on 4 bytes, in an inversed way. By example, the length (in a hexadecimal view):

0x00 00 0a 4f

is stored as:

4f 0a 00 00

File header

The file header is always 60 bytes long. Is composed as:

  1. “ACFS” (magic string)
  2. “\x00\x01\x00\x00\x18” (separator, in hexadecimal)
  3. “\x00\x00\x00\x00” (separator)
  4. 3 bytes, undetermined (with “\xfd\xb1\x7e”, casemul open the file)
  5. “\x18” followed by 7 “\x00” bytes (separator)
  6. “RSEC” (another magic string?)
  7. “\x00\x01\x00\x00\x24\x00\x00\x00” (separator)
  8. 1 bytes: number of programs records in the program block
  9. 1 bytes: number of pictures records in the pictures block
  10. 1 bytes: number of matrix records in the matrix block
  11. 1 bytes: number of lists records in the list block
  12. “\x3c\x00\x00\x00” (separator)
  13. 4 bytes: length (in casemul style, see before) of the file header (60) and the program block, in bytes
  14. 4 bytes: length of the file header, the program block and the picture block
  15. 4 bytes: length of the file header, the program block, the picture block and the matrix block
  16. “\x00” (separator)
  17. 3 bytes, undetermined (with “\x01\x4d\x5f”, casemul open the file)

Programs records

Programs records are composed by a record header and the data of the program.

Record header

The record header is composed as:

  1. 4 bytes: length of the program name
  2. Program name
  3. 4 bytes: program length (after the casemul encoding !) plus 0x10 (16 in decimal)
  4. “RPGO” (program identifier string)
  5. “\x00\x01\x00\x00\x10\x00\x00\x00” (separator)
  6. 4 bytes: program length (after the casemul encoding)

Data of the program

The program is converted from the raw format to the casemul format, by replacing casio special characters by tokens. You can consult this list of casemul tokens. End of line are changed, from “\x0d” to “\x0d\x0a” (Windows end of line). The end of file character (“\xff”) is removed.

Pictures records

Pictures records are composed by a record header and the data of the picture.

Record header

The record header is composed as:

  1. 4 bytes: length of the picture name
  2. Picture name
  3. 4 bytes: picture length (after the casemul encoding !) plus 0x10 (16 in decimal)
  4. “IPTC” (picture identifier string)
  5. “\x00\x01\x00\x00\x10\x00\x00\x00” (separator)
  6. “\x80\x40\x00”

Data of the picture

The picture is stored as a list of byte, each byte represents one pixel. The value of the byte depend of the color of the pixel:

  • 0x00 for white
  • 0x01 for orange
  • 0x02 for green
  • 0x03 for blue

Bytes are stored as columns, from the top to the bottoms, and columns from the left to the right.

Matrix records

To do.

Lists records

To do.

 

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.