File tree Expand file tree Collapse file tree 7 files changed +34
-3
lines changed Expand file tree Collapse file tree 7 files changed +34
-3
lines changed Original file line number Diff line number Diff line change 1111./asc2bin.exe normx.txt NORMX.BIN A000
1212./asc2bin.exe normy.txt NORMY.BIN A000
1313./vgm2x16opm.exe ChaseVaultTheme.vgm MUSIC.BIN A000
14+ ./vgm2x16opm.exe ChaseVaultWin.vgm WINMUSIC.BIN A000
Original file line number Diff line number Diff line change @@ -14,8 +14,9 @@ bm_filename: .asciiz "bitmap.bin"
1414normx_fn: .asciiz "normx.bin"
1515normy_fn: .asciiz "normy.bin"
1616music_fn: .asciiz "music.bin"
17+ win_music_fn: .asciiz "winmusic.bin"
1718end_filenames:
18- FILES_TO_LOAD = 4
19+ FILES_TO_LOAD = 5
1920bankparams:
2021. byte BITMAP_BANK ; bank
2122. byte normx_fn - bm_filename - 1 ; filename length
@@ -27,7 +28,10 @@ bankparams:
2728. byte music_fn - normy_fn - 1
2829. word normy_fn
2930. byte GAME_MUSIC_BANK
30- . byte end_filenames - music_fn - 1
31+ . byte win_music_fn - music_fn - 1
3132. word music_fn
33+ . byte WIN_MUSIC_BANK
34+ . byte end_filenames - win_music_fn - 1
35+ . word win_music_fn
3236
3337.endif
Original file line number Diff line number Diff line change @@ -9,6 +9,8 @@ __music_delay: .byte 0
99
1010__music_playing: .byte 1
1111
12+ __music_looping: .byte 1
13+
1214music_bank: .byte GAME_MUSIC_BANK
1315
1416.macro INC_MUSIC_PTR
@@ -42,6 +44,15 @@ stop_music:
4244 jsr init_music
4345 rts
4446
47+ stop_music_loop:
48+ stz __music_looping
49+ rts
50+
51+ enable_music_loop:
52+ lda #1
53+ sta __music_looping
54+ rts
55+
4556start_music:
4657 lda #1
4758 sta __music_playing
@@ -74,6 +85,11 @@ music_tick:
7485 INC_MUSIC_PTR
7586 bra @return
7687@done:
88+ lda __music_looping
89+ bne @reinit
90+ jsr stop_music
91+ bra @return
92+ @reinit:
7793 jsr init_music
7894 bra @return
7995@write:
Original file line number Diff line number Diff line change @@ -935,9 +935,15 @@ next_level:
935935 jmp timer_done
936936@win:
937937 jsr stop_music
938+ SET_TIMER 2 , @win_music
938939 lda #1
939940 sta winscreen_req
940941 jmp timer_done
942+ @win_music:
943+ lda #WIN_MUSIC_BANK
944+ sta music_bank
945+ jsr start_music
946+ jmp timer_done
941947@update_level:
942948 SUPERIMPOSE_RESTORE
943949 jsr clear_bars
Original file line number Diff line number Diff line change @@ -108,14 +108,16 @@ sfx_bomb:
108108. byte YM_NE_NFRQ , YM_NE | $ 02
109109. byte OPM_DELAY_REG , 10
110110. byte YM_KEY_ON , YM_NOISE_OFF
111+ . byte YM_NE_NFRQ , 0
111112. byte OPM_DONE_REG , 0
112113
113114sfx_key:
114115. byte YM_KEY_ON , YM_CH_5
115116. byte YM_KC + YM_CH_5 , YM_KC_OCT5 | YM_KC_C
117+ . byte YM_KEY_ON , YM_CH_5 | YM_SN_ALL
116118. byte YM_KEY_ON , YM_CH_6
117119. byte YM_KC + YM_CH_6 , YM_KC_OCT5 | YM_KC_F
118- . byte YM_KEY_ON , YM_CH_5 | YM_SN_ALL
120+ . byte YM_KEY_ON , YM_CH_6 | YM_SN_ALL
119121. byte OPM_DELAY_REG , 16
120122. byte YM_KEY_ON , YM_CH_5
121123. byte YM_KC + YM_CH_5 , YM_KC_OCT6 | YM_KC_B_FL
@@ -141,6 +143,7 @@ sfx_unlock:
141143. byte YM_KEY_ON , YM_CH_5
142144. byte YM_KEY_ON , YM_CH_6
143145. byte YM_KEY_ON , YM_NOISE_OFF
146+ . byte YM_NE_NFRQ , 0
144147. byte OPM_DONE_REG , 0
145148
146149sfx_ghost:
Original file line number Diff line number Diff line change @@ -62,6 +62,7 @@ winscreen_tick:
6262 cmp #>WS_MAX_SCROLL
6363 bne @scroll
6464 stz winscreen_req
65+ jsr stop_music_loop
6566 jmp @return
6667@scroll:
6768 stz VERA_ctrl
You can’t perform that action at this time.
0 commit comments