From 67b6897fd0b12e0eb472709a6a0ec1ee0a502992 Mon Sep 17 00:00:00 2001
From: Oliver Schmidt
Date: Sat, 11 Jan 2020 13:35:34 +0100
Subject: [PATCH] Allow start with active 80-column display.
With active 80-column display there's no way to activate hires page2. Instead of directly fiddling with 80COLSTORE it seems the cleanest way to disable the 80-column display via the official firmware entry point.
The ProDOS 8 Technical Reference Manual states in chapter 5.3.1.3 - 80-Column Text Card:
-----
80-column text cards -- and other Apple IIe features -- can be turned off
using the following sequence of instructions:
LDA #$15 ;Character that turns off video firmware
JSR $C300 ;Print it to the video firmware
-----
---
src/apple2.loader/loader.s | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/apple2.loader/loader.s b/src/apple2.loader/loader.s
index fa4b705..22d7946 100644
--- a/src/apple2.loader/loader.s
+++ b/src/apple2.loader/loader.s
@@ -111,8 +111,15 @@ PRESS_ANY_KEY:
sta READ_REF
sta CLOSE_REF
+ ; Turn off 80-column firmware
+ lda VERSION
+ cmp #$06 ; //e ?
+ bne :+
+ lda #$15
+ jsr $C300
+
; Switch to hires page 2
- bit TXTCLR
+: bit TXTCLR
bit MIXCLR
bit HISCR
bit HIRES