Prev: 7293 Up: Map Next: 72A5
7297: Sound a crackle of C clicks
The crackle loop, entered from sound_unused, sound_crackle, sound_tick, sound_death, sound_crackle_b, sound_launch and sound_fire. For each click B = 2 x (C XOR E) and D = B AND $1F: one pulse of B loops on and D off (beep_pulse). The XOR scrambles the lengths, so the clicks sound like noise; E picks the scramble.
Input
C Number of clicks
E The scramble
crackle 7297 LD A,C A click of 2(C XOR E) loops on, the low five bits of that off
7298 XOR E
7299 ADD A,A
729A LD B,A
729B AND $1F
729D LD D,A
729E CALL beep_pulse
72A1 DEC C
72A2 JR NZ,crackle
72A4 RET
Prev: 7293 Up: Map Next: 72A5