Prev: B5E6 Up: Map Next: B604
B5EE: Play Sparkle Sound
Used by the routines at HandleValve and HandleSparkle.
Plays a burst of noise for a sparkle, using bytes of the ROM from 1234 as the pitches of beeps. The number of beeps is taken from the sprite number, so it changes as the sparkle goes through its frames.
Input
IX The address of the object
Play a beep for each remaining frame.
PlaySparkleSound B5EE LD A,(IX+$00) Fetch the sprite number.
B5F1 CPL Invert it.
B5F2 AND %00011111 Keep bits 0 to 4.
B5F4 LD E,A Keep the number of beeps in E.
B5F5 LD HL,$1234 Point HL at 1234.
PlaySparkleSound_NextBeep B5F8 LD A,(HL) Fetch a ROM byte as the pitch.
B5F9 INC HL
B5FA LD B,A
B5FB LD C,$02 Set the number of beeps to 02.
B5FD CALL PlayWaveSequence Call PlayWaveSequence.
B600 DEC E Jump to PlaySparkleSound_NextBeep until all of the beeps have been played.
B601 JR NZ,PlaySparkleSound_NextBeep
B603 RET Return.
View the equivalent code in;
Prev: B5E6 Up: Map Next: B604