diff --git a/src/audio.z80 b/src/audio.z80 index c6a9744..e7a6ce2 100644 --- a/src/audio.z80 +++ b/src/audio.z80 @@ -45,7 +45,9 @@ def Channel_envpitch equ 3 section "wavebank", ROM0, ALIGN[4] wavebank: - db $FF,$EE,$DD,$CC,$BB,$AA,$99,$88,$77,$66,$55,$44,$33,$22,$11,$00 +; db $FF,$EE,$DD,$CC,$BB,$AA,$99,$88,$77,$66,$55,$44,$33,$22,$11,$00 +.ping: + db $00,$14,$8c,$ff,$fd,$96,$43,$35,$78,$99,$87,$78,$9b,$dd,$da,$73 ; Each entry in sfx_table is 4 bytes ; - First byte is the channel to use for the effect @@ -81,9 +83,8 @@ sfx_table: dw fx_combostop db 3, 0 dw fx_lowcombo_bonk - -; db 2, 0 -; dw fx_wavetest + db 2, 0 + dw fx_ping sgb_sfx_table: ; To be filled in later @@ -212,9 +213,12 @@ fx_lowcombo_bonk: db ENVF_DPAR|ENVF_PITCH|2, $43, $5D db ENVF_PITCH|2, $4D db $FF - -fx_wavetest: - db ENVF_DPAR|ENVF_PITCH|$0F, $00, 24 +fx_ping: + db ENVF_DPAR|ENVF_PITCH|$40, (wavebank.ping-wavebank)/16, 31 + db $01, $41, $80 + db ENVF_PITCH|$40, 36 + db $01, $41, $81 + db $C1 db $FF diff --git a/src/instructions.z80 b/src/instructions.z80 index 24e7e7f..c77b6e4 100644 --- a/src/instructions.z80 +++ b/src/instructions.z80 @@ -370,6 +370,13 @@ attract_update:: add 8 cp $C0 jr c,.clear_have_tile_id + ; beep if combo loss particle not visible + ; (that is, if combo loss sound isn't playing) + ld a, [prevcombo_timeleft] + or a + ld a, 12 + call z, audio_play_fx + ld a,8 ld [attract_vwf_x],a swap a ; ld a,$80 @@ -676,9 +683,9 @@ attract_script: ; dead ends: db FF - db "Tiles with no exits",LF - db "contain a trap door that",LF - db "leads to the entrance,",LF + db "Tiles with no path home",LF + db "contain a trap door",LF + db "leading to the entrance,",LF db "so she doesn't get stuck." ; b4+ d4+ [c1] a1+ a2 c2 c4+ d4 [c1] db AM_R, AM_RR diff --git a/src/intro.z80 b/src/intro.z80 index 19792bb..ec5c355 100644 --- a/src/intro.z80 +++ b/src/intro.z80 @@ -160,7 +160,6 @@ intro_kick_check: inc [hl] ld a, 2 jp audio_play_fx - ret .already_kicked: inc [hl] ret @@ -241,7 +240,7 @@ show_intro:: add 3 ld [cursor_x], a - ; Play a rolling sound effect every 3 frames + ; Play a rolling sound effect every 32 frames ld hl, cursor_y ld a, [hl] inc [hl] diff --git a/src/prevcombo.z80 b/src/prevcombo.z80 index 0f48fb8..78c9ba1 100644 --- a/src/prevcombo.z80 +++ b/src/prevcombo.z80 @@ -29,7 +29,7 @@ def PREVCOMBO_START_DY equ -20 def PREVCOMBO_FRAMES equ 80 section "prevcomboram", WRAM0 -prevcombo_timeleft: ds 1 +prevcombo_timeleft:: ds 1 prevcombo_dy: ds 1 prevcombo_y: ds 1 prevcombo_digits: ds 1 diff --git a/tools/pb16.py b/tools/pb16.py index 100cc78..5896f58 100755 --- a/tools/pb16.py +++ b/tools/pb16.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """ PB16 encoder Copyright 2018 Damian Yerrick