From 1f96e82a8e8eb4dba49f0d3212aff255fd677bf4 Mon Sep 17 00:00:00 2001 From: Vince Weaver Date: Sun, 23 Dec 2018 16:37:25 -0500 Subject: [PATCH] xmas2018: update with mute functionality --- xmas_2018/hello.bas | 5 +++-- xmas_2018/merry.s | 33 +++++++++++++++++++++++++++++++++ xmas_2018/play_music.s | 1 + xmas_2018/wreath.s | 9 ++++++++- xmas_2018/xmas2018.dsk | Bin 143360 -> 143360 bytes xmas_2018/xmas2018.s | 23 +++++++++++++---------- 6 files changed, 58 insertions(+), 13 deletions(-) diff --git a/xmas_2018/hello.bas b/xmas_2018/hello.bas index c39eaa4a..a195f62d 100644 --- a/xmas_2018/hello.bas +++ b/xmas_2018/hello.bas @@ -1,5 +1,5 @@ 5 HOME - 10 PRINT "VMW PRODUCTIONS 2018 CHRISTMAS DEMO V1.0" + 10 PRINT "VMW PRODUCTIONS 2018 CHRISTMAS DEMO V1.1" 20 PRINT 30 PRINT " ONLY 22 YEARS SINCE THE LAST ONE" 40 PRINT:PRINT @@ -8,4 +8,5 @@ 70 PRINT "* MUSIC: F. MENDELSSOHN" 80 PRINT "* WREATH PIC: KITTELENDAN" 90 PRINT:PRINT " TAKES 30 SECONDS TO LOAD FROM DISK" - 100 PRINT CHR$ (4)"BRUN XMAS2018" + 100 PRINT:PRINT " PRESS M TO MUTE MUSIC" + 105 PRINT CHR$ (4)"BRUN XMAS2018" diff --git a/xmas_2018/merry.s b/xmas_2018/merry.s index 7adddb61..a863af3c 100644 --- a/xmas_2018/merry.s +++ b/xmas_2018/merry.s @@ -553,3 +553,36 @@ hgr_scroll_return: ; -1 rts ; 6 + + + + +mute_music: + sei + jsr mockingboard_mute + + lda #$4c ; jmp + sta mute_smc + lda #play_nothing + sta mute_smc+2 + + rts + +play_nothing: + ; do nothing for 1017-3-6 = 1008 cycles + + ; Try X=1 Y=91 cycles=1002 R6 + + lda $0 + lda $0 + + ldy #91 ; 2 +muloopA:ldx #1 ; 2 +muloopB:dex ; 2 + bne muloopB ; 2nt/3 + dey ; 2 + bne muloopA ; 2nt/3 + + rts diff --git a/xmas_2018/play_music.s b/xmas_2018/play_music.s index 8b2b2093..80c17b04 100644 --- a/xmas_2018/play_music.s +++ b/xmas_2018/play_music.s @@ -80,6 +80,7 @@ mnl07 = $BF00 ; = 1017 play_music: +mute_smc: ; self-modify the code lda MB_PATTERN ; 3 and #$07 ; 2 diff --git a/xmas_2018/wreath.s b/xmas_2018/wreath.s index 203af78a..c986f48f 100644 --- a/xmas_2018/wreath.s +++ b/xmas_2018/wreath.s @@ -339,11 +339,18 @@ wrloop2:dex ; 2 lda KEYPRESS ; 4 bpl wr_no_keypress ; 3 ; -1 - jmp wreath_done ; 3 + jmp wreath_check_key ; 3 wr_no_keypress: jmp wreath_display_loop ; 3 +wreath_check_key: + cmp #'M'|$80 + bne wreath_done + + jsr mute_music + wreath_done: + bit KEYRESET ; clear keypress ; 4 rts ; 6 diff --git a/xmas_2018/xmas2018.dsk b/xmas_2018/xmas2018.dsk index 8f30e8ddfaa130c40e07a50e20669dce24dfedfb..e8be01874fe90b0d88d7225d10573c5eae0d12a3 100644 GIT binary patch delta 5556 zcmeI$e{dAl9RTos``-S#{h8#F+r8WK9w#J(U<4b$A5cXh225%s_yZL=iL{pjEoeoe z*u)vvp}|#{ZMn%zXGqgVSZ2ZqaR^0%;1nf{Om9F2f7Gd+Dn&+UK(YLi>)X9t5(H)J zFZ%~Kvu}65_ujjEd;5LwbKCqO-~1upHiozFFzs2U?WW${2Cxu|?mn!2oN!-rz|+NY ziP;H+zVjPs0hgJnaXp~y<}%YgX%)N3s_c}64YJS{#ii!;ohPH8Agj3Zi|8kmRni7G z7FR9T&UBPibre^1{v&GjH9%_$X>uyHrU!&+(%Gv$pron9)RR_m(kfZGv-9wdcGyNG zR~7Hxqn%E)3D1^TnI1K2O~TFQN0~krZ!pQxu1V?BxYeB2nLe@M(;eE`*=x+!ljiQh zGt&MKmFeScRJ(h)@9f6nhfbQKye%95G(j5ou1=qBg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6!XVSc8y zVNIs)-Lu*o+qz)o)5{*Z+7D>^zWd#f`^fy}&ri6F>M~*XtET(7dC=XomYS4IQls?l zI-kX#h9VxA*T)_vVv#)erf~d=V2pi@fJj(^2qql8_Qh&N1R@fN$V4H8s6IKD#4;}n zG@v*R2&&@PvjmwcRymbd1yxifRaO<1sH&=|`r@B?I4D}m@y&FbUlBQ}D>~6tUDI`q z(LiH0q+yNIcumkmP10md(TJvMnx?Ca3Mxx?s~0YOZ!Z0CF1;t0e)M*2`PT*Rc5V4c z)s_blEgGS0jD_GmTZFAu?x+Dth-dFMpo?W{bs`4UY^wp$>;VJB;-NdX!^sdRgtZ{6 zu7d?OOsxYCC}E5*o;&^0*on~>{3opjHNsdte)06#vm>Q*XKEfL!9*lHbAIyl@29h; z9We14ra{i0a$r4cqUCs0~_!9%Z5s zWuqvHqg<4a3Q;jCMdhdxB~dl1MRk)g!CZdfDyC&(lQVf!Fhx@`Wm7SUshXOpTQu`8 z)!yrhDq5_CENrck4VGYumSoA6Vi8Ntk{>}5$NBi8ZrBY~_vmYI>VEJOo(c*onDomEezonwCyUp#20_2e9;U)@!#p(NoC->C}Ynp1^z0^ z`1Xel{OJb-E>Xt$70USIEvE!Zpgo|Bu4T%|P|EODQ$|;fGH4f2Mkb&PZ;3MCeJG>r zX3FSVMH#&TW&Av#jB5d9SOI0&cK=4Z{~G~iR2C^?AfSx5S14nCkuv7v`KfnN#ygZU zrs|Y&CZLSz70M_DlrdkYjJFpl<8qBM9;#EuA)B5Bl(BymWgM_`Q!A8lz9})wRe*(JLS{ncW diff --git a/xmas_2018/xmas2018.s b/xmas_2018/xmas2018.s index 3125821b..5eb16b40 100644 --- a/xmas_2018/xmas2018.s +++ b/xmas_2018/xmas2018.s @@ -11,9 +11,9 @@ xmas2018_start: ; Check for Apple II and patch ;=================== - lda $FBB3 ; IIe and newer is $06 - cmp #6 - beq apple_iie +; lda $FBB3 ; IIe and newer is $06 +; cmp #6 +; beq apple_iie ; lda #$54 ; ; sta ce_patch+1 @@ -163,23 +163,26 @@ forever: jsr merry - jsr wait_until_keypress + ; wait 5s before restarting + + ldx #20 +wait_at_merry: + lda #255 + jsr WAIT + dex + bne wait_at_merry sei ; disable music interrupt jsr mockingboard_mute - ; wait again before restarting - - jsr wait_until_keypress - jmp reload_everything ;================== ; Game over ;================== ; we never get here -game_over_man: - jmp game_over_man +;game_over_man: +; jmp game_over_man ; Things included here should be aligned