You are here: About the Hardware > Character Definitions

Character Definitions

The first half of the Main Memory ROM is dedicated to a set of 256 character definitions. Each character definition is 16 pixels wide by 32 pixels tall. These character definitions can be used for video displays, graphical LCD's, printing, etc.  The character set is based on a North American / Western European layout (Basic Latin and Latin-1 Supplement), with many specialized characters inserted. The special characters are connecting waveform and schematic building-blocks, Greek symbols commonly used in electronics, and several arrows and bullets.

Propeller Font Characters

 

The character definitions are numbered 0 to 255 from left-to-right, top-to-bottom.  In ROM, they are arranged with each pair of adjacent even-odd characters merged together to form 32 longs. The first character pair is located in bytes $8000-$807F. The second pair occupies bytes $8080-$80FF, and so on, until the last pair fills $BF80-$BFFF.  The Propeller Tool includes an interactive Character Chart that has a ROM Bitmap view which shows where and how each character resides in ROM.

Character Interleaving

The character pairs are merged row-by-row such that each character's 16 horizontal pixels are spaced apart and interleaved with their neighbors' so that the even character takes bits 0, 2, 4, ...30, and the odd character takes bits 1, 3, 5, ...31. The leftmost pixels are in the lowest bits, while the rightmost pixels are in the highest bits, as shown below. This forms a long (4 bytes) for each row of pixels in the character pair. 32 such longs, building from the character’s top row down to the bottom, make up the complete merged-pair definition. The definitions are encoded in this manner so that a cog’s video hardware can handle the merged longs directly, using color selection to display either the even or the odd character.  It also has the advantage of allowing run-time character pairs (see next paragraph) that are four-color characters used to draw beveled buttons, lines and focus indicators.

Propeller Character Interleaving

 

Special 4-color Characters

Some character codes have inescapable meanings, such as 9 for Tab, 10 for Line Feed, and 13 for Carriage Return. These character codes invoke actions and do not equate to static character definitions. For this reason, their character definitions have been used for special four-color characters. These four-color characters are used for drawing 3-D box edges at run time and are implemented as 16 x 16 pixel cells, as opposed to the normal 16 x 32 pixel cells. They occupy even-odd character pairs 0-1, 8-9, 10-11, and 12-13.  Below is an example of a button with 3D beveled edges made from some of these characters.

Button with 3-D Beveled Edges

 

The Propeller Tool includes, and uses, the Parallax True Type® font which follows the design of the Propeller Font embedded in the hardware.  With this font, and the Propeller Tool's Character Chart, you can include schematics, timing diagrams and other diagrams right in the source code for your application.

Propeller Help Version 1.1

Copyright © Parallax Inc.

5/13/2009