From 267f1dca2e79aeb5cd89e793ed7eafba1bd6eb61 Mon Sep 17 00:00:00 2001 From: Vince Weaver Date: Thu, 24 May 2018 12:42:27 -0400 Subject: [PATCH] sa: initial 80col support --- still_alive/README.still_alive | 3 ++- still_alive/display_art.s | 13 +++++++++++++ still_alive/still_alive.s | 18 ++++++++++++------ still_alive/zp.inc | 3 ++- 4 files changed, 29 insertions(+), 8 deletions(-) diff --git a/still_alive/README.still_alive b/still_alive/README.still_alive index 921cc76f..3b1a313c 100644 --- a/still_alive/README.still_alive +++ b/still_alive/README.still_alive @@ -31,7 +31,8 @@ lz4 encode the ascii art: 15529 revert because lz4 code not re-entrant: 18910 add 4-channel music (KR4): 20128 add cursor (a bit distracting) 20162 - +feature complete 40 col: 20180 +intial 80 col support: 20191 Memory Map diff --git a/still_alive/display_art.s b/still_alive/display_art.s index 3943944f..a0366f21 100644 --- a/still_alive/display_art.s +++ b/still_alive/display_art.s @@ -68,6 +68,9 @@ dal_loop: lda dal_first+1 jsr COUT1 + lda #13+$80 + jsr COUT1 + rts @@ -78,6 +81,16 @@ dal_loop: ; It's 7063 bytes of data unencoded ; A is which one to draw draw_ascii_art: + + lda FORTYCOL + bne fortycol_ascii_art +eightycol_ascii_art: + + + rts + +fortycol_ascii_art: + sty TEMPY asl ; point to ascii art we want diff --git a/still_alive/still_alive.s b/still_alive/still_alive.s index 33fe738e..ef598be6 100644 --- a/still_alive/still_alive.s +++ b/still_alive/still_alive.s @@ -24,7 +24,7 @@ UNPACK_BUFFER EQU $5E00 ; $5E00 - $9600, 14k, $3800 sta LYRICS_ACTIVE ; Testing, let's get 40col working first - lda #1 + lda #0 sta FORTYCOL ; print detection message @@ -100,13 +100,19 @@ mockingboard_found: ; clear both screens ;=========================== + lda FORTYCOL + bne only_forty + +switch_to_80: + + ; Initialize 80 column firmware + jsr $C300 ; same as PR#3 + +only_forty: + ; Clear text page0 - lda #0 - sta DRAW_PAGE - lda #(' '+$80) - sta clear_all_color+1 - jsr clear_all + jsr HOME ;============================ diff --git a/still_alive/zp.inc b/still_alive/zp.inc index e8010ca6..cf97cc52 100644 --- a/still_alive/zp.inc +++ b/still_alive/zp.inc @@ -143,7 +143,8 @@ KEYRESET EQU $C010 ;; SOFT SWITCHES CLR80COL EQU $C000 ; PAGE0/PAGE1 normal SET80COL EQU $C001 ; PAGE0/PAGE1 switches PAGE0 in Aux instead -EIGHTYCOL EQU $C00D +EIGHTYCOLOFF EQU $C00C +EIGHTYCOLON EQU $C00D SPEAKER EQU $C030 SET_GR EQU $C050 SET_TEXT EQU $C051