aboutsummaryrefslogtreecommitdiff
path: root/lorcha.pl
diff options
context:
space:
mode:
Diffstat (limited to 'lorcha.pl')
-rw-r--r--lorcha.pl20
1 files changed, 20 insertions, 0 deletions
diff --git a/lorcha.pl b/lorcha.pl
new file mode 100644
index 0000000..8d09a71
--- /dev/null
+++ b/lorcha.pl
@@ -0,0 +1,20 @@
+#!/usr/bin/perl -w
+
+# LORCHA.LST is a LISTed BASIC program that draws a lorcha
+# and spits out the screen data to H:LORCHA.DAT (for which
+# you will need atari800's H: device pointed at the current
+# directory).
+
+# Usage:
+# atari800 -basic LORCHA.LST
+# perl lorcha.pl LORCHA.DAT > lorcha_data.inc
+
+use bytes;
+undef $/;
+$data = <>;
+print "lorcha_data:\n";
+for(0..6) {
+ print " .byte ";
+ print join ", ", map { sprintf '$%02x', ord $_ } split "", substr($data, $_ * 6, 7);
+ print "\n";
+}