From fe4ab8f2ba7b5e79bce03e57c177c7d3eeb6fccb Mon Sep 17 00:00:00 2001 From: Vince Weaver Date: Thu, 24 May 2018 13:25:35 -0400 Subject: [PATCH] sa: have 80column art mostly working a bit slow, can hear slight pause in music --- still_alive/display_art.s | 118 +++++++++++++++++++++++++++++++++++--- still_alive/still_alive.s | 4 +- 2 files changed, 113 insertions(+), 9 deletions(-) diff --git a/still_alive/display_art.s b/still_alive/display_art.s index a0366f21..efcf1405 100644 --- a/still_alive/display_art.s +++ b/still_alive/display_art.s @@ -82,14 +82,6 @@ dal_loop: ; A is which one to draw draw_ascii_art: - lda FORTYCOL - bne fortycol_ascii_art -eightycol_ascii_art: - - - rts - -fortycol_ascii_art: sty TEMPY @@ -103,6 +95,97 @@ fortycol_ascii_art: lda ascii_art+1,Y sta OUTH + lda FORTYCOL + bne fortycol_ascii_art + +;====================================================================== +;====================================================================== +eightycol_ascii_art: + + ldy #2 ; put it at line 1 (2-byte addresses) + + +art_line_loop80: + + lda #0 + sta DRAW_PAGE + + clc + lda gr_offsets,Y ; load offset of line + adc #20 ; start second half of screen + sta GBASL + lda gr_offsets+1,Y + sta GBASH + + iny + iny + sty YY + + ldy #0 +ascii_loop80: + lda (OUTL),Y ; see if done + beq done_ascii_total80 + + cmp #13+$80 ; see if line feed + beq done_ascii_line80 + + jsr store80 + iny + jmp ascii_loop80 +done_ascii_line80: + iny + tya ; bump art pointer by Y + clc + adc OUTL + sta OUTL + lda #0 + adc OUTH + sta OUTH + + lda #' '+$80 +ascii_pad80: ; pad out with spaces for 40 columns + cpy #41 + bcs done_pad80 + jsr store80 + iny + jmp ascii_pad80 + +done_pad80: + ldy YY ; load Y value + jmp art_line_loop80 + +done_ascii_total80: + + ldy TEMPY + rts + + ;====================== +store80: + pha + sty DISP_PAGE + ldy #0 + lda DRAW_PAGE + and #$1 + bne store80_odd +store80_even: + pla + bit PAGE1 + sta (GBASL),Y + jmp store80_done +store80_odd: + pla + bit PAGE0 + sta (GBASL),Y + inc GBASL +store80_done: + inc DRAW_PAGE + ldy DISP_PAGE + rts + +;====================================================================== +;====================================================================== +fortycol_ascii_art: + ldy #8 ; put it at line 4 (2-byte addresses) art_line_loop: @@ -155,6 +238,25 @@ done_ascii_total: ldy TEMPY rts + + + + + + + + + + + + + + + + + + + .if 0 diff --git a/still_alive/still_alive.s b/still_alive/still_alive.s index ef598be6..27b1cd99 100644 --- a/still_alive/still_alive.s +++ b/still_alive/still_alive.s @@ -15,7 +15,6 @@ UNPACK_BUFFER EQU $5E00 ; $5E00 - $9600, 14k, $3800 ; init variables lda #0 - sta DRAW_PAGE sta CH sta CV sta DONE_PLAYING @@ -107,6 +106,9 @@ switch_to_80: ; Initialize 80 column firmware jsr $C300 ; same as PR#3 + sta SET80COL ; 80store C001 + ; makes pageflip switch between + ; regular/aux memory only_forty: