From e9736c53375784e3b4910ae3419da9bd04c119cd Mon Sep 17 00:00:00 2001
From: "B. Watson" <yalhcru@gmail.com>
Date: Tue, 23 Feb 2016 06:55:02 -0500
Subject: waste half the night trying to figure out weird interaction between
 axe and fenders

---
 Makefile    | 1 +
 axecheck.pl | 5 +++++
 console.s   | 4 ++--
 3 files changed, 8 insertions(+), 2 deletions(-)
 create mode 100644 axecheck.pl

diff --git a/Makefile b/Makefile
index f852219..98ba69f 100644
--- a/Makefile
+++ b/Makefile
@@ -170,6 +170,7 @@ dos2: clean all
 	atari800 -nobasic -nopatch dos2.atr
 
 fenders: clean all
+	perl axecheck.pl taipan.xex
 	cp taipan.xex TAIPAN
 	cp fenders.atr.in fenders.atr
 	axe -w TAIPAN fenders.atr
diff --git a/axecheck.pl b/axecheck.pl
new file mode 100644
index 0000000..06eb819
--- /dev/null
+++ b/axecheck.pl
@@ -0,0 +1,5 @@
+#!/usr/bin/perl -w
+
+if((-s $ARGV[0]) % 125 == 0) {
+	die "$ARGV[0] is an even multiple of 125 bytes, it will NOT work with axe and fenders\n";
+}
diff --git a/console.s b/console.s
index cd113ff..1122722 100644
--- a/console.s
+++ b/console.s
@@ -35,8 +35,8 @@ _clr_screen: ; same as gotoxy(0,0); clrtobot();
 
 _clrtobot: ; same as clrtoline(24);
  lda #24
- bne _clrtoline
- ;.byte $2c ; for some reason, this breaks fenders. TODO: investigate
+ ;bne _clrtoline ; we'd have had to do this if ROWCRS weren't zero-page.
+ .byte $2c ; see bit trick explanation below, if you don't recognize this.
 
 _clrtoeol:
  lda ROWCRS
-- 
cgit v1.2.3