Prev: 48938 Up: Map Next: 48957
48943: Play Noise Sound
Used by the routine at LandSabreman.
Plays 48 tones, each with a pitch worked out from the counter, which gives a noisy sound.
PlayNoiseSound 48943 LD C,48 Set the number of tones in C to 48.
PlayNoiseSound_Loop 48945 LD A,C Fetch the tone counter.
48946 XOR %01010101 Flip bits 0, 2, 4 and 6.
48948 ADD A,C Add the tone counter.
48949 LD B,A Store the result in B (the half-period).
48950 CALL PlaySquareWave Play the tone.
48953 DEC C Decrease the tone counter by one and loop back to PlayNoiseSound_Loop until all of the tones have been played.
48954 JR NZ,PlayNoiseSound_Loop
48956 RET Return.
View the equivalent code in;
Prev: 48938 Up: Map Next: 48957