Prev: 9EBF Up: Map Next: 9EE3
9ED1: Play Default Buzz
Plays a buzz, using a pattern of pulses which is based on the number of the pulse and a seed. This entry point uses 1C pulses and a seed of 27.
PlayDefaultBuzz 9ED1 LD C,$1C Set the number of pulses to 1C.
9ED3 LD E,$27 Set the seed to 27.
This entry point is used by the routines at PlayShortBuzz, PlayTinyBuzz, PlayBuzzSweep, PlayLongBuzz, PlayMediumBuzz and PlayBriefBuzz.
This entry point takes the number of pulses in C and the seed in E.
PlayBuzz 9ED5 LD A,C Fetch the number of the pulse.
9ED6 XOR E Combine it with the seed.
9ED7 ADD A,A Double it.
9ED8 LD B,A Use it as the length of the pulse.
9ED9 AND %00011111 Use bits 0-4.
9EDB LD D,A Use it as the length of the gap.
9EDC CALL PlayPulse Play a pulse.
9EDF DEC C Decrease the number of pulses by one.
9EE0 JR NZ,PlayBuzz Jump back until they have all been played.
9EE2 RET Return.
View the equivalent code in;
Prev: 9EBF Up: Map Next: 9EE3