From cd1e042697df6b097cb397871bd59c358ba4ce96 Mon Sep 17 00:00:00 2001 From: Vince Weaver Date: Tue, 5 Jun 2018 15:31:34 -0400 Subject: [PATCH] sa: caught stupid bug in interrupt handler that made MB music awful --- still_alive/README.still_alive | 26 ++++++++++++++++++++------ still_alive/interrupt_handler.s | 6 +++--- still_alive/still_alive.dsk | Bin 143360 -> 143360 bytes 3 files changed, 23 insertions(+), 9 deletions(-) diff --git a/still_alive/README.still_alive b/still_alive/README.still_alive index db039f28..f5ab134d 100644 --- a/still_alive/README.still_alive +++ b/still_alive/README.still_alive @@ -33,7 +33,13 @@ Challenges: the music is already decompressing on the fly. + Re-using the Lyrics for both the Mockingboard and Electric Duet versions. - + + Squeezing the compressed image into memory leaving room for + all the code to be decompressed while leaving enough + room that DOS still has room to load things. It's + an *extremely* tight fit. + + An odd issue where the 80col display would get corrupted + if we set HIRES without explicitly setting LORES + before doing PR#3 Goal: Binary fits in 16k (16384 bytes) @@ -57,6 +63,8 @@ merge ED and MB code: 24993 properly select between versions: 25001 merge the ED and MB lyrics: 22828 80 column ED, wait for keypress+reboot at end: 22852 +Crazy compression: +Remove mockingboard detection: 16343 Memory Map: @@ -75,11 +83,17 @@ FFFF: END Plan: - Load compressed 16k image ($4000) at $5600 - $9600 + Load compressed 16k image ($4000) at $5900 - $9900 + We use MAXFILES 1 to give us some extra room + just before DOS + Decompress ENDING sequence at $1800 - $4000 (writes background to HGR graphics automatically) - When done: - + STILL_ALIVE ($5a00, 22.5k) at $0c00 - $6600 + + STILL_ALIVE: + + $0800 - $5900 + $2e2d of code + $2282 of KR4 music *or* + $0842 of ED music + Sound buffers ($3800, 14k) at $5e00 - $9600 - (the overlap is OK, the ED file is over-written by - the mockingboard buffers, but that is not used by MB) + diff --git a/still_alive/interrupt_handler.s b/still_alive/interrupt_handler.s index 2bf26d76..1d6556af 100644 --- a/still_alive/interrupt_handler.s +++ b/still_alive/interrupt_handler.s @@ -54,7 +54,7 @@ mb_write_frame: mb_write_loop: lda REGISTER_DUMP,X ; load register value ; 4 cmp REGISTER_OLD,X ; compare with old values ; 4 - beq mb_no_write_left ; 3/2nt + beq mb_no_write_left ; 3/2nt ; address stx MOCK_6522_ORA1 ; put address on PA1 ; 4 @@ -94,7 +94,7 @@ mb_no_write_left: mb_no_write_right: inx ; point to next register ; 2 - cpx #12 ; if 14 we're done ; 2 + cpx #12 ; if 12 we're done ; 2 bmi mb_write_loop ; otherwise, loop ; 3/2nt @@ -137,7 +137,7 @@ mb_load12: sta REGISTER_DUMP2+3 jmp mb_done_load mb_load13: - cpx #12 + cpx #13 bne mb_regular_load sta REGISTER_DUMP2+9 jmp mb_done_load diff --git a/still_alive/still_alive.dsk b/still_alive/still_alive.dsk index 9ac98bce86007408c2c880908e3395d31334b26b..ff442ebafea9f7d63b55133714b278cbb91c1006 100644 GIT binary patch delta 369 zcmYL^J4*vW6ou!`ozXSf#4w^{S;#607zM+E4=hxywDAuFM6nV~S_`Wr#rDD=gO5T3 z2DVTnfh=~uf(b|vvQTifnjV0oTb+AvUEbzdzT2ua3>zW>4=A&x4=U{)5AY5H>~A(^NZl1oq* zkcm(v>ezt^(+2w9dVgtLKit2`k~PXW88wvaK*BtCN!(zK_EW3!0G_kw%}4vk6%Xz=|3W?Jn{LW+)sm6?M@y;arVWS+A>ROXwhU@Jz;PPqVe o0CPyKmra(%A0V&c#dm30GiPD5nl^!G(vMK^8N6)!}$V(n^lb!wM zo7tV&+4=ppvX`suh1%vmbheFalanG5|%}90~7xdbZV}Hfy7tn!JG~P-j_}~Y*D96TofM%&P-Dke< z{Oa4IKj>>SGei~=Jkxoyqx<9uQXj!u3c<<+J-H|^_;oItz3;R{ajA4Flgg%AbR_ie zJ0mf=$FrEq;DS;q$|t$^=|$LgB?rBA8L%d`u<$fVVFPFcq*TY062$Gm@###Vi1N1p2_R~iYL)JG7hCG!BS zTygQSax8b28-I~%ZRB%PR0MrP$2hc3KhTjsN8r67*b5rdMG6*ElVOuGS@1fr*H=z~ zY4K0za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