Routines |
Prev: F500 | Up: Map | Next: F648 |
Used by the routines at SoundHandler_BombFuse and SoundHandler_BombSparks.
|
||||
SoundGenerator_WhiteNoise | F618 | PUSH BC | Stash BC and BC on the stack. | |
F619 | PUSH BC | |||
F61A | CALL WhiteNoiseGenerator | Call WhiteNoiseGenerator. | ||
F61D | LD BC,$FFFE | Send *Active_BorderColour to the speaker port. | ||
F620 | LD A,($5BD0) | |||
F623 | OUT (C),A | |||
F625 | POP BC | Restore BC from the stack. | ||
F626 | CALL WhiteNoiseGenerator | Call WhiteNoiseGenerator. | ||
F629 | LD BC,$FFFE | BC=FFFE (C points to the speaker port). | ||
F62C | LD A,($5BD0) | A=*Active_BorderColour. | ||
F62F | OR %00010000 | Turn on the speaker (set bit 4). | ||
F631 | OUT (C),A | Send A to port *C. | ||
F633 | POP BC | Restore BC from the stack. | ||
F634 | DEC DE | Decrease DE by one. | ||
F635 | LD A,D | Jump to SoundGenerator_WhiteNoise until DE is zero. | ||
F636 | OR E | |||
F637 | JR NZ,SoundGenerator_WhiteNoise | |||
F639 | RET | Return. | ||
WhiteNoiseGenerator | F63A | PUSH BC | Stash BC on the stack. | |
F63B | CALL BombTimer | Call BombTimer. | ||
F63E | AND B | Merge the bits from B. | ||
F63F | LD B,A | B=A. | ||
F640 | CP $00 | Jump to WhiteNoiseHouseKeeping if A is zero. | ||
F642 | JR Z,WhiteNoiseHouseKeeping | |||
WhiteNoiseDelay | F644 | DJNZ WhiteNoiseDelay | Decrease counter by one and loop back to WhiteNoiseDelay until counter is zero. | |
WhiteNoiseHouseKeeping | F646 | POP BC | Restore BC from the stack. | |
F647 | RET | Return. |
Prev: F500 | Up: Map | Next: F648 |