![]() |
Routines |
| Prev: AE8E | Up: Map | Next: AEA9 |
|
Used by the routine at MakeBulletHole.
Plays a burst of noise by using the first 80 bytes of the ROM as the length of each pulse.
|
||||
|
Use the first 80 bytes of the ROM as pulse lengths.
|
||||
| PlayStatic | AE98 | LD HL,$0000 | Point HL at the start of the ROM. | |
| AE9B | LD C,$80 | Set the number of pulses. | ||
|
Play each pulse.
|
||||
| PlayStatic_Loop | AE9D | LD A,(HL) | Fetch a byte of the ROM. | |
| AE9E | INC HL | Move on to the next byte. | ||
| AE9F | AND %00111111 | Keep the bottom six bits. | ||
| AEA1 | LD B,A | Use them as the length of the pulse. | ||
| AEA2 | CALL PlaySquareWave | Play the pulse. | ||
| AEA5 | DEC C | Count down the pulses. | ||
| AEA6 | JR NZ,PlayStatic_Loop | Loop back until all of the pulses have been played. | ||
| AEA8 | RET | Return. | ||
| Prev: AE8E | Up: Map | Next: AEA9 |