aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--Makefile.client2
-rw-r--r--font/fonttest.asm16
-rw-r--r--font/mkfont.pl78
-rw-r--r--font/screen.datbin0 -> 256 bytes
5 files changed, 96 insertions, 1 deletions
diff --git a/.gitignore b/.gitignore
index 428ca85..50ab4de 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,6 +7,7 @@ obj/*
*.2
*.3
*.4
+*.o
*.old
*.bak
*.xex
diff --git a/Makefile.client b/Makefile.client
index febbae0..754c4f8 100644
--- a/Makefile.client
+++ b/Makefile.client
@@ -13,7 +13,7 @@ TARGETS := atari
# Name of the final, single-file executable.
# Default: name of the current dir with target name appended
-PROGRAM := fnchat
+PROGRAM := client
# Path(s) to additional libraries required for linking the program
# Use only if you don't want to place copies of the libraries in SRCDIR
diff --git a/font/fonttest.asm b/font/fonttest.asm
new file mode 100644
index 0000000..3085109
--- /dev/null
+++ b/font/fonttest.asm
@@ -0,0 +1,16 @@
+ *= $8000
+font
+ .incbin "font.dat"
+
+ *= $bc40
+screen
+ .incbin "screen.dat"
+
+ *= $0600
+code
+ lda #>font
+ sta $02f4
+ jmp code
+
+ *= $02e0
+ .word code
diff --git a/font/mkfont.pl b/font/mkfont.pl
new file mode 100644
index 0000000..20c5ece
--- /dev/null
+++ b/font/mkfont.pl
@@ -0,0 +1,78 @@
+#!/usr/bin/perl -w
+
+use bytes;
+
+open $in, "</usr/share/atari800/atarixl.rom" or die $!;
+open $out, ">font.dat" or die $!;
+
+my $junk;
+read($in, $junk, 0x2000); # skip to the font
+
+read($in, $X2000, 256); # ASCII 32-63
+read($in, $X2100, 256); # ASCII 64-95
+read($in, $X2200, 256); # ASCII 0-31
+read($in, $X2300, 256); # ASCII 96=127
+
+# ASCII 0 is a blank glyph
+substr($X2200, 0, 8) = "\x00" x 8;
+
+$font = $X2200 . $X2000 . $X2100 . $X2300;
+
+while(<DATA>) {
+ chomp;
+ if(/^(\d+)$/) {
+ $offset = $1 * 8;
+ next;
+ } elsif(/^[-#]+$/) {
+ s/-/0/g;
+ s/#/1/g;
+ my $byte = eval "0b$_";
+ substr($font, $offset++, 1) = chr $byte;
+ }
+}
+
+print $out $font;
+
+close $in;
+close $out;
+
+__DATA__
+96
+--------
+--##----
+--##----
+---##---
+--------
+--------
+--------
+--------
+
+123
+----###-
+---##---
+---##---
+--##----
+---##---
+---##---
+----###-
+--------
+
+125
+-###----
+---##---
+---##---
+----##--
+---##---
+---##---
+-###----
+--------
+
+126
+--------
+-###--##
+##-##-##
+##--###-
+--------
+--------
+--------
+--------
diff --git a/font/screen.dat b/font/screen.dat
new file mode 100644
index 0000000..c866266
--- /dev/null
+++ b/font/screen.dat
Binary files differ