Prev: 61F9 Up: Map Next: 6211
6200: Make a sound effect
Used by the routines at 66F0 (to make the sound effect of Sam being shot) and 6FE6 (to make the sound effect of a sniper firing).
Input
A Initial border colour
D Pitch adjustment
E Initial pitch
6200 ADD A,$11 Flip bit 4 of A and increment the border colour in bits 0-2
6202 AND $17 Retain only bits 0-2 and 4
6204 OUT ($FE),A Change the border colour and speaker state
6206 LD B,E Perform the pitch delay
6207 DJNZ $6207
6209 LD B,A Save A briefly
620A LD A,E Adjust the pitch delay for the next pass
620B ADD A,D
620C LD E,A
620D LD A,B Restore A
620E JR NZ,$6200 Jump back unless the pitch delay is now 0
6210 RET
Prev: 61F9 Up: Map Next: 6211