Prev: 720A Up: Map Next: 7234
7217: Sound a warble
Used by the routine at sound_death.
Entered from sound_debris and the death sound (sound_death). For A of 16 or more, and for 7 and 8, nothing; otherwise four cycles alternating between two half periods, B = 2 x A + $48 and that XOR $2A.
Input
A The note, 0-15
warble 7217 CP $10 No sound for 16 and over, nor for 7 and 8
7219 RET NC
721A CP $07
721C JR C,warble_0
721E CP $09
7220 RET C
warble_0 7221 AND $0F B = 2 x (A AND 15) + $48
7223 ADD A,A
7224 ADD A,$48
7226 LD B,A
7227 LD C,$04 Four cycles, B toggling by $2A between them
warble_1 7229 LD A,B
722A XOR $2A
722C LD B,A
722D CALL beep_cycle
7230 DEC C
7231 JR NZ,warble_1
7233 RET
Prev: 720A Up: Map Next: 7234