Skip to content

Commit 07a4ca1

Browse files
committed
Added win music, finished tweaking sfx
1 parent 62a0189 commit 07a4ca1

File tree

7 files changed

+34
-3
lines changed

7 files changed

+34
-3
lines changed

ChaseVaultWin.vgm

1.88 KB
Binary file not shown.

build_bins.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@
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

filenames.asm

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,9 @@ bm_filename: .asciiz "bitmap.bin"
1414
normx_fn: .asciiz "normx.bin"
1515
normy_fn: .asciiz "normy.bin"
1616
music_fn: .asciiz "music.bin"
17+
win_music_fn: .asciiz "winmusic.bin"
1718
end_filenames:
18-
FILES_TO_LOAD = 4
19+
FILES_TO_LOAD = 5
1920
bankparams:
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

music.asm

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ __music_delay: .byte 0
99

1010
__music_playing: .byte 1
1111

12+
__music_looping: .byte 1
13+
1214
music_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+
4556
start_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:

player.asm

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff 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

soundfx.asm

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff 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

113114
sfx_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

146149
sfx_ghost:

winscreen.asm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)