From d1c221da7a14e13f433b8f41f7dbc875fc3d7eb5 Mon Sep 17 00:00:00 2001 From: Vince Weaver Date: Mon, 4 Jun 2018 15:26:03 -0400 Subject: [PATCH] sa: merge the versions --- still_alive/Makefile | 2 +- still_alive/README.still_alive | 1 + still_alive/TITLE.BAS | Bin 0 -> 849 bytes still_alive/sa_ed.s | 21 +++------------------ still_alive/sa_mb.s | 13 +++---------- still_alive/still_alive.s | 20 +++++++++++++++++++- still_alive/title.bas | 6 +++++- still_alive/zp.inc | 5 ++++- 8 files changed, 36 insertions(+), 32 deletions(-) create mode 100644 still_alive/TITLE.BAS diff --git a/still_alive/Makefile b/still_alive/Makefile index 3143d486..a4b81961 100644 --- a/still_alive/Makefile +++ b/still_alive/Makefile @@ -19,7 +19,7 @@ still_alive.o: still_alive.s \ ../asm_routines/lz4_decode.s \ display_art.s display_lyrics.s \ sa_ed.s duet.s SA.ED \ - ascii_art.inc \ + sa_mb.s ascii_art.inc \ interrupt_handler.s \ ascii_art.inc ascii_art_lz4.inc lyrics.inc zp.inc ca65 -o still_alive.o still_alive.s -l still_alive.lst diff --git a/still_alive/README.still_alive b/still_alive/README.still_alive index f8019ba9..74d75a2a 100644 --- a/still_alive/README.still_alive +++ b/still_alive/README.still_alive @@ -36,6 +36,7 @@ intial 80 col support: 20191 80 col cursor: 20344 strip out some unneeded text printing: 19962 merge ED and MB code 24993 +properly select between versions: 25001 Memory Map diff --git a/still_alive/TITLE.BAS b/still_alive/TITLE.BAS new file mode 100644 index 0000000000000000000000000000000000000000..d87243a5bf55839707ed9fb3a488b399f6eaf2d3 GIT binary patch literal 849 zcmZ{hziSjh6vrQmxI0(ah#-hQ#wHJ2 z%fwZvq2#-6dX3pwUsCc)dSOLoZSf7coJ0Y}QIZKChle;7{#0^!Yz`_Y$Ww1bhYs#Xp~&ut z5J!=pY0KBEPW-9t;JCD{S%)B7Hf^5-QHkW#(YqMnBK;l*2U^Q>%TJmvHP$kxERLyu(4U zqsql@OV literal 0 HcmV?d00001 diff --git a/still_alive/sa_ed.s b/still_alive/sa_ed.s index d5d6092a..ea4ec388 100644 --- a/still_alive/sa_ed.s +++ b/still_alive/sa_ed.s @@ -7,17 +7,6 @@ still_alive_ed: lda #0 sta FRAME_COUNT - lda #1 - sta FORTYCOL - - ;=========================== - ; clear both screens - ;=========================== - - ; Clear text page0 - -; jsr HOME - ;============================ ; Draw Lineart around edges @@ -31,9 +20,9 @@ still_alive_ed: ; Setup lyrics ;============================== - lda #<(lyrics) + lda #<(lyrics_ed) sta LYRICSL - lda #>(lyrics) + lda #>(lyrics_ed) sta LYRICSH @@ -51,8 +40,4 @@ still_alive_ed: ; loop forever ;================== -forever_loop_ed: - jmp forever_loop_ed - - - + rts diff --git a/still_alive/sa_mb.s b/still_alive/sa_mb.s index 5c14053b..bab63731 100644 --- a/still_alive/sa_mb.s +++ b/still_alive/sa_mb.s @@ -10,8 +10,6 @@ still_alive_mb: ;============================= ; Setup ;============================= - jsr HOME - jsr TEXT ; init variables @@ -21,9 +19,7 @@ still_alive_mb: sta DECODE_ERROR sta LYRICS_ACTIVE - ; Testing, let's get 40col working first - lda #0 - sta FORTYCOL + ; call mockingboard detect? jsr mockingboard_detect_slot4 ; call detection routine cpx #$1 @@ -135,7 +131,7 @@ only_forty: ;============================ - ; Loop forever + ; Main Loop ;============================ main_loop: lda DECODE_ERROR @@ -180,7 +176,7 @@ check_done: beq main_loop forever_loop: - jmp forever_loop + rts @@ -312,6 +308,3 @@ page_copy_loop: ;====================== ; 2+14*256+6+29= 3621 - - - diff --git a/still_alive/still_alive.s b/still_alive/still_alive.s index d4747053..99602f2f 100644 --- a/still_alive/still_alive.s +++ b/still_alive/still_alive.s @@ -3,10 +3,28 @@ .include "zp.inc" still_alive: + + ;============================= + ; Clear screen + ;============================= + jsr HOME + jsr TEXT + + ; See if Mockingboard or Electric Duet + + lda USEMB + beq no_mockingboard + jsr still_alive_mb + + jmp reset + +no_mockingboard: jsr still_alive_ed - +reset: + jmp ($3F2) ; warm-start? + ; want reboot, not BASIC ;========== ; main code diff --git a/still_alive/title.bas b/still_alive/title.bas index d7ad3755..a7a94f31 100644 --- a/still_alive/title.bas +++ b/still_alive/title.bas @@ -21,4 +21,8 @@ 95 PRINT " ----> "; 100 INPUT A 105 IF A<1 OR A>3 THEN PRINT CHR$(7): GOTO 95 -110 PRINT CHR$(4);"BRUN STILL_ALIVE" +110 ON A GOTO 120,130,140 +120 POKE 768,0:POKE 769,1:GOTO 150 +130 POKE 768,1:POKE 769,1:GOTO 150 +140 POKE 768,1:POKE 769,0 +150 PRINT CHR$(4);"BRUN STILL_ALIVE" diff --git a/still_alive/zp.inc b/still_alive/zp.inc index 555a493e..e3805b64 100644 --- a/still_alive/zp.inc +++ b/still_alive/zp.inc @@ -116,7 +116,7 @@ COPY_TIME EQU $98 DECOMPRESS_TIME EQU $99 TIME_TAKEN EQU $9A LYRICS_ACTIVE EQU $9B -FORTYCOL EQU $9C +;FORTYCOL EQU $9C CURSOR EQU $9D ; More zero-page addresses @@ -153,6 +153,9 @@ OUTL EQU $FE OUTH EQU $FF +FORTYCOL EQU $300 +USEMB EQU $301 + KEYPRESS EQU $C000 KEYRESET EQU $C010