Simon Wood wrote:
>
> For ELKSibo I have had to include a font bit map (as I have to draw each
> character to the LCD), this only has a few of the 255 ASCII codes and is the
> form:
> ASCII Value, data, data, data, etc,
>
> The renderer compares the first byte with it's desired character and moves
> to the next character should they not match.
>
> I would like to sequence the data so that the most common characters are
> near the start of the list and therefore speed up the display driver
> (believe me every little bit helps).
>
> Does anyone have letter probability table I could use??? (or any idea how to
> generate one)
Letter probability is closely related to the letter typed earlier. Maybe
it's an idea to enlarge the size of you fint bit map struct and store
after each character a pointer to the character most likely to follow
it. The probability table could be easily found by simply downloading a
few books in the language of your choice and have a script count letters
and correlations between letters.
Furthermore I don't quite understand why you choose to step through the
font bit map structure. If you have stored it as an array, isn't it
simpler to simply use the ascii code as a memory index. This would only
require you to place the array at a smart location (for instance at the
beginning of some segment or an integer number of pages from it) so that
you can avoid having to do multiplications when calculating the memory
adress. If you fix it in such a way that each entry in the array is some
power of 2 bytes long, you can calcuted the memory adress from the index
by doing a shift and an add. Correct me if this is a stupid idea, I'm ne
wat this.
>
> Simon Wood
Dries