Prev: 70D8 Up: Map Next: 71E0
71D3: Make Click
Used by the routines at PlayCrashSound and PlayBeamSound.
Makes a click with the speaker: the speaker is on for a time that is set by B and off for a time that is set by D. PlayNoise uses it to make noise.
Input
B Length of the time that the speaker is on
D Length of the time that the speaker is off
MakeClick 71D3 LD A,$10 Turn the speaker on.
71D5 OUT ($FE),A Send that to the speaker.
MakeClick_Delay 71D7 DJNZ MakeClick_Delay Hold the speaker on for the time in B.
71D9 XOR A Turn the speaker off.
71DA OUT ($FE),A Send that to the speaker.
71DC LD B,D The off-time becomes the delay.
MakeClick_Wait 71DD DJNZ MakeClick_Wait Hold the speaker off for that time.
71DF RET Return.
View the equivalent code in;
Prev: 70D8 Up: Map Next: 71E0