Browse Source

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
pull/75/head
Virgil Dupras 4 years ago
parent
commit
17cc28e211
4 changed files with 477 additions and 7 deletions
  1. +470
    -0
      fonts/3x5.txt
  2. BIN
      kernel/fnt/3x5.bin
  3. +5
    -5
      recipes/ti84/glue.asm
  4. +2
    -2
      tools/font_compile.pl

+ 470
- 0
fonts/3x5.txt View File

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


.
...
.




.
.


...






.
.
.
.
.
.
.
. .
. .
. .
.
.
..
.
.
...
..
.
.
.
...
..
.
..
.
..
. .
. .
...
.
.
...
.
..
.
..
..
.
...
. .
...
...
.
.
.
.
...
. .
...
. .
...
...
. .
...
.
..

.

.


.

.
.
.
.
.
.
.

...

...

.
.
.
.
.
..
.
.

.
.
...
...
.
..
.
. .
...
. .
. .
..
. .
..
. .
..
..
.
.
.
..
..
. .
. .
. .
..
...
.
..
.
...
...
.
..
.
.
..
.
. .
. .
..
. .
. .
...
. .
. .
...
.
.
.
...
...
.
.
.
..
. .
..
.
..
. .
.
.
.
.
...
. .
...
...
. .
. .
..
. .
. .
. .
. .
...
. .
. .
. .
...
..
. .
..
.
.
...
. .
. .
...
..
..
. .
..
. .
. .
..
.
.
.
..
...
.
.
.
.
. .
. .
. .
. .
...
. .
. .
. .
. .
.
. .
. .
...
...
. .
. .
. .
.
. .
. .
. .
. .
.
.
.
...
.
.
.
...
...
.
.
.
...
.
.
.
.
.
...
.
.
.
...
.
. .







...
.
.




..
.
...
...
.
.
..
. .
..

..
.
.
..
.
.
..
. .
..

.
. .
..
..
..
.
..
.
.

.
. .
..
..
.
.
..
. .
. .
.
.
.
.
.

.
.
..
.
. .
..
. .
. .
..
.
.
.
..

. .
...
. .
. .

..
. .
. .
. .

.
. .
. .
.

..
. .
..
.

..
. .
..
.

..
.
.
.
..
..
.
..
.
...
.
.
..

. .
. .
. .
...

. .
. .
. .
.

. .
. .
...
. .

. .
.
.
. .

. .
.
.
.

...
..
..
...
..
.
.
.
..
.
.
.
.
.
..
.
.
.
..
..
..




BIN
kernel/fnt/3x5.bin View File


+ 5
- 5
recipes/ti84/glue.asm 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"

+ 2
- 2
tools/font_compile.pl 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));
}


Loading…
Cancel
Save