![]() |
Routines |
| Prev: C048 | Up: Map | Next: C05B |
|
Used by the routine at FireWeaponB.
Makes the sound of a shot. Plays 28 tones, each with a pitch worked out from a counter that counts down, so the sound falls in pitch.
|
||||
|
Play 28 pulses of different lengths.
|
||||
| PlayNoiseSound | C04E | LD C,$28 | Use 28 cycles. | |
|
This entry point is used by the routine at EnterInitials.
This entry point takes the number of pulses in C.
Play the next pulse.
|
||||
| PlayNoiseSound_Counter | C050 | LD A,C | Fetch the number of the pulse. | |
| C051 | XOR %00111111 | Change it. | ||
| C053 | LD B,A | Use it as the length of the pulse. | ||
| C054 | CALL PlaySquareWave | Make a single cycle using PlaySquareWave. | ||
|
Loop back until all of the cycles have been made.
|
||||
| C057 | DEC C | Count down the pulses. | ||
| C058 | JR NZ,PlayNoiseSound_Counter | Loop back until all of the pulses have been played. | ||
| C05A | RET | Return. | ||
|
View the equivalent code in;
|
||||
| Prev: C048 | Up: Map | Next: C05B |