diff --git a/fonts/3x5.txt b/fonts/3x5.txt new file mode 100644 index 0000000..a9feb67 --- /dev/null +++ b/fonts/3x5.txt @@ -0,0 +1,470 @@ + . + . + . + + . +. . +. . + + + +. . +... + +... +. . + .. +.. + .. +.. + . +. + . + . +. + . + . +. . + . +. . + .. + . + . + + + + . + . + . + . + . +. + . + . + . +. + . +... + . +. . + + + . +... + . + + + + + . +. + + +... + + + + + + + . + . + . + . +. +. + . +. . +. . +. . + . + . +.. + . + . +... +.. + . + . +. +... +.. + . +.. + . +.. +. . +. . +... + . + . +... +. +.. + . +.. + .. +. +... +. . +... +... + . + . +. +. +... +. . +... +. . +... +... +. . +... + . +.. + + . + + . + + + . + + . +. + . + . +. + . + . + +... + +... + +. + . + . + . +. +.. + . + . + + . + . +... +... +. + .. + . +. . +... +. . +. . +.. +. . +.. +. . +.. + .. +. +. +. + .. +.. +. . +. . +. . +.. +... +. +.. +. +... +... +. +.. +. +. + .. +. +. . +. . + .. +. . +. . +... +. . +. . +... + . + . + . +... +... + . + . + . +.. +. . +.. +. +.. +. . +. +. +. +. +... +. . +... +... +. . +. . +.. +. . +. . +. . +. . +... +. . +. . +. . +... +.. +. . +.. +. +. +... +. . +. . +... + .. +.. +. . +.. +. . +. . + .. +. + . + . +.. +... + . + . + . + . +. . +. . +. . +. . +... +. . +. . +. . +. . + . +. . +. . +... +... +. . +. . +. . + . +. . +. . +. . +. . + . + . + . +... + . + . +. +... +... +. +. +. +... +. +. + . + . + . +... + . + . + . +... + . +. . + + + + + + + +... +. + . + + + + +.. + . +... +... +. +. +.. +. . +.. + + .. +. +. + .. + . + . + .. +. . + .. + + . +. . +.. + .. + .. +. +.. +. +. + + . +. . + .. +.. +. +. +.. +. . +. . + . + + . + . + . + . + + . + . +.. +. +. . +.. +. . +. . +.. + . + . + . + .. + +. . +... +. . +. . + +.. +. . +. . +. . + + . +. . +. . + . + +.. +. . +.. +. + + .. +. . + .. + . + + .. +. +. +. + + .. +.. + . +.. + . +... + . + . + .. + +. . +. . +. . +... + +. . +. . +. . + . + +. . +. . +... +. . + +. . + . + . +. . + +. . + . + . + . + +... + .. +.. +... + .. + . +. + . + .. + . + . + . + . + . +.. + . + . + . +.. + .. +.. + + + diff --git a/kernel/fnt/3x5.bin b/kernel/fnt/3x5.bin new file mode 100644 index 0000000..3145520 Binary files /dev/null and b/kernel/fnt/3x5.bin differ diff --git a/recipes/ti84/glue.asm b/recipes/ti84/glue.asm index a669578..301d60a 100644 --- a/recipes/ti84/glue.asm +++ b/recipes/ti84/glue.asm @@ -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" @@ -44,7 +44,7 @@ boot: di ld hl, RAMEND ld sp, hl - im 1 + im 1 ; enable ON key interrupt in a, (PORT_INT_MASK) @@ -85,11 +85,11 @@ handleInterrupt: pop af ei jp main - + .done: pop af ei reti FNT_DATA: -.bin "fnt/5x7.bin" +.bin "fnt/3x5.bin" diff --git a/tools/font_compile.pl b/tools/font_compile.pl index 67b781b..62cea89 100755 --- a/tools/font_compile.pl +++ b/tools/font_compile.pl @@ -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)); }