1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-12-25 17:38:05 +11:00

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"
@ -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"

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));
}