Prev: 42144 Up: Map Next: 42174
42160: Sounds: Bounce
Used by the routine at HandlerWeapon.
Plays a tone of 4 cycles. The half period is made by rotating the counter right three times. The counter is set to 64 and decreased before it is tested for zero, so the routine always carries on and plays the tone, with a half period of 231.
SoundsBounce 42160 LD D,64 D=64.
42162 DEC D Decrease D by one.
42163 RET Z Return if it is zero.
42164 LD A,D A=D.
42165 RRCA Rotate right three times.
42166 RRCA
42167 RRCA
42168 LD B,A Keep the half period in B.
42169 LD C,4 C=4 (the number of cycles).
42171 JP SoundsBeep Jump to SoundsBeep to play the tone.
View the equivalent code in;
Prev: 42144 Up: Map Next: 42174