![]() |
Routines |
| Prev: D635 | Up: Map | Next: D665 |
|
Used by the routine at PUFF.
Four single waves at pitches read from the ROM, as Knight Lore's crashes and sparkles are. The address is the word at RANDOM with its high byte cut to five bits: the random number is one byte, and the byte after it, the high one here, is BUCKET_OUT, which is 0 or 1, so the pitches come from the first 512 bytes of the ROM. Played by PUFF as a puff begins.
|
||||
| PUFF_SOUND | D64E | LD HL,(RANDOM) | HL = an address in the ROM; four waves | |
| D651 | LD A,H | |||
| D652 | AND $1F | |||
| D654 | LD H,A | |||
| D655 | LD E,$04 | |||
| PUFF_SOUND_0 | D657 | LD A,(HL) | each at the next ROM byte, less its top bit | |
| D658 | INC HL | |||
| D659 | AND $7F | |||
| D65B | LD B,A | |||
| D65C | LD C,$01 | |||
| D65E | CALL BEEP | |||
| D661 | DEC E | |||
| D662 | JR NZ,PUFF_SOUND_0 | |||
| D664 | RET | |||
| Prev: D635 | Up: Map | Next: D665 |