xmas2018: update with mute functionality

This commit is contained in:
Vince Weaver 2018-12-23 16:37:25 -05:00
parent 872f223d92
commit 1f96e82a8e
6 changed files with 58 additions and 13 deletions

View File

@ -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"

View File

@ -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+1
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

View File

@ -80,6 +80,7 @@ mnl07 = $BF00
; = 1017
play_music:
mute_smc:
; self-modify the code
lda MB_PATTERN ; 3
and #$07 ; 2

View File

@ -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

Binary file not shown.

View File

@ -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