Prev: 7217 Up: Map Next: 724C
7234: Play Flutter Sound
Used by the routine at UpdateSpecialShot.
Plays a flutter of beeps for which the length and the notes depend on the frame counter.
PlayFlutterSound 7234 LD A,($9A64) The frame counter.
7237 AND %00000111 Keep the bits of A that are set in 07.
7239 INC A The flutter is at least one beep long.
723A ADD A,A Double the length of the flutter.
723B ADD A,A Double the length again.
723C ADD A,A Double the length once more.
723D LD D,A That many half-periods will be played.
PlayFlutterSound_Loop 723E LD A,D The next note starts from the count left.
723F XOR %00000111 Flip the bits of A that are set in 07.
7241 INC A The half-period is one more than the count.
7242 LD B,A That is the half-period of this beep.
7243 CALL PlaySquareWave Call PlaySquareWave.
7246 DEC D One count of the flutter has been used.
7247 RET Z Return if the zero flag is set.
7248 DEC D A second count has been used.
7249 RET Z Return if the zero flag is set.
724A JR PlayFlutterSound_Loop Jump to PlayFlutterSound_Loop.
Prev: 7217 Up: Map Next: 724C