Character set

From MZXWiki
Revision as of 20:44, 13 January 2008 by Koji (talk | contribs) (Character set and the files who love them.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

The character set is a set of characters (8x14 binary pixel chunks) that are used in mzx to represent graphics. There are two sets active when in the editor, the editor character set which makes everything readable and understandable for editing sake, and the world characterset which is the one that is used by the game itself during gameplay and is used to represent programmer modified graphics on the game board.

Character set files are files containing the data required by mzx to load 256 individual 8x14 characters, the data for each character is encoded in 14 bytes each one making up the binary representation of one row of 8 pixels.

Each characters are stored sequentially from 0 to 255 and there is no added formatting data for the file. So every character set file is 6.5 kilobytes, unless the file is a partial character set.

A partial character set is a file containing the data for any number of characters from 1 character to 255 characters. These files are often used instead of employing a large number of char edit commands (which only modify one character at a time, and used to be one of the biggest resource hogging mzx commands, right now the biggest resource hogging commands are any command that use expressions). Partial character sets are used primarily by robots who supply an offset at which to load the character data into the character set. The data from the file overwrites the character set data up to the end of the file sequentially through the charset from the offset to 255 and then it rolls over again in the case that there is more data in the file.