Prev: 50144 Up: Map Next: 50176
50164: Play Sweep Sound
Used by the routine at ThrowItem.
Plays a sequence of thirty-two tones.
Input
B Starting pitch
PlaySweepSound 50164 LD C,32 Set the number of tones to play to 32.
PlaySweepSound_Loop 50166 LD A,C Subtract the starting pitch from the number of tones left to work out the pitch of the next tone, play it, and loop back until all 32 tones have been played.
50167 SUB B
50168 LD B,A
50169 CALL PlaySquareWave
50172 DEC C
50173 JR NZ,PlaySweepSound_Loop
50175 RET Return.
View the equivalent code in;
Prev: 50144 Up: Map Next: 50176