![]() |
Routines |
| Prev: AF22 | Up: Map | Next: AF43 |
|
Used by the routine at MakeShot.
Plays sixteen short tones, using the first sixteen bytes of the ROM as the length of each.
|
||||
|
Use the first sixteen bytes of the ROM as tone lengths.
|
||||
| PlayRumble | AF30 | LD HL,$0000 | Point HL at the start of the ROM. | |
| AF33 | LD E,$10 | Set the number of tones. | ||
|
Play each tone.
|
||||
| PlayRumble_Loop | AF35 | LD A,(HL) | Fetch a byte of the ROM. | |
| AF36 | INC HL | Move on to the next byte. | ||
| AF37 | AND %01111111 | Keep the bottom seven bits. | ||
| AF39 | LD B,A | Use them as the length of a pulse. | ||
| AF3A | LD C,$02 | Set the number of pulses. | ||
| AF3C | CALL PlayWaveSequence | Play the tone. | ||
| AF3F | DEC E | Count down the tones. | ||
| AF40 | JR NZ,PlayRumble_Loop | Loop back until all of the tones have been played. | ||
| AF42 | RET | Return. | ||
| Prev: AF22 | Up: Map | Next: AF43 |