recipes/ti84: use a 3x5 font instead of a 5x7 one

This allow a lot more characters to fit on that tiny screen...

ref #41
This commit is contained in:
Virgil Dupras 2019-11-11 13:24:50 -05:00
parent cb1e68e3e2
commit 17cc28e211
4 changed files with 477 additions and 7 deletions

470
fonts/3x5.txt Normal file
View File

@ -0,0 +1,470 @@
.
.
.
.
. .
. .
. .
...
...
. .
..
..
..
..
.
.
.
.
.
.
.
. .
.
. .
..
.
.
.
.
.
.
.
.
.
.
.
.
.
...
.
. .
.
...
.
.
.
...
.
.
.
.
.
.
.
. .
. .
. .
.
.
..
.
.
...
..
.
.
.
...
..
.
..
.
..
. .
. .
...
.
.
...
.
..
.
..
..
.
...
. .
...
...
.
.
.
.
...
. .
...
. .
...
...
. .
...
.
..
.
.
.
.
.
.
.
.
.
.
...
...
.
.
.
.
.
..
.
.
.
.
...
...
.
..
.
. .
...
. .
. .
..
. .
..
. .
..
..
.
.
.
..
..
. .
. .
. .
..
...
.
..
.
...
...
.
..
.
.
..
.
. .
. .
..
. .
. .
...
. .
. .
...
.
.
.
...
...
.
.
.
..
. .
..
.
..
. .
.
.
.
.
...
. .
...
...
. .
. .
..
. .
. .
. .
. .
...
. .
. .
. .
...
..
. .
..
.
.
...
. .
. .
...
..
..
. .
..
. .
. .
..
.
.
.
..
...
.
.
.
.
. .
. .
. .
. .
...
. .
. .
. .
. .
.
. .
. .
...
...
. .
. .
. .
.
. .
. .
. .
. .
.
.
.
...
.
.
.
...
...
.
.
.
...
.
.
.
.
.
...
.
.
.
...
.
. .
...
.
.
..
.
...
...
.
.
..
. .
..
..
.
.
..
.
.
..
. .
..
.
. .
..
..
..
.
..
.
.
.
. .
..
..
.
.
..
. .
. .
.
.
.
.
.
.
.
..
.
. .
..
. .
. .
..
.
.
.
..
. .
...
. .
. .
..
. .
. .
. .
.
. .
. .
.
..
. .
..
.
..
. .
..
.
..
.
.
.
..
..
.
..
.
...
.
.
..
. .
. .
. .
...
. .
. .
. .
.
. .
. .
...
. .
. .
.
.
. .
. .
.
.
.
...
..
..
...
..
.
.
.
..
.
.
.
.
.
..
.
.
.
..
..
..

BIN
kernel/fnt/3x5.bin Normal file

Binary file not shown.

View File

@ -23,8 +23,8 @@
.inc "err.h"
.inc "core.asm"
.equ FNT_WIDTH 5
.equ FNT_HEIGHT 7
.equ FNT_WIDTH 3
.equ FNT_HEIGHT 5
.inc "fnt/mgm.asm"
.equ LCD_RAMSTART RAMSTART
.inc "ti/lcd.asm"
@ -92,4 +92,4 @@ handleInterrupt:
reti
FNT_DATA:
.bin "fnt/5x7.bin"
.bin "fnt/3x5.bin"

View File

@ -23,10 +23,10 @@ unless (open($handle, '<', $fn)) { die "Can't open $fn"; }
print pack('C*', (0) x $height);
while (<$handle>) {
unless (/( |\.){${width}}\n/) { die "Invalid line format '$_'"; }
unless (/( |\.){0,${width}}\n/) { die "Invalid line format '$_'"; }
my @line = split //, $_;
my $num = 0;
for (my $i=0; $i<8; $i++) {
for (my $i=0; $i<$width; $i++) {
if (@line[$i] eq '.') {
$num += (1 << (7-$i));
}