![]() |
Routines |
| Prev: 63119 | Up: Map | Next: 63195 |
|
Used by the routines at SoundHandler_UnlockedDoor, SoundHandler_CaughtByPirate and SoundHandler_CollectedItem.
|
||||||||||
| PlayWave4 | 63157 | PUSH BC | Stash the delay counter on the stack twice. | |||||||
| 63158 | PUSH BC | |||||||||
| 63159 | CALL Delay_Loop | Call Delay_Loop. | ||||||||
| 63162 | LD BC,65534 | Send *Active_BorderColour to the speaker. | ||||||||
| 63165 | LD A,(23504) | |||||||||
| 63168 | OUT (C),A | |||||||||
| 63170 | POP BC | Restore the delay counter from the stack. | ||||||||
| 63171 | CALL Delay_Loop | Call Delay_Loop. | ||||||||
| 63174 | LD BC,65534 | BC=65534 (C points to the speaker port). | ||||||||
| 63177 | LD A,(23504) | A=*Active_BorderColour. | ||||||||
| 63180 | OR %00010000 | Turn on the speaker (set bit 4). | ||||||||
| 63182 | OUT (C),A | Send A to the speaker port. | ||||||||
| 63184 | POP BC | Restore the other delay counter from the stack. | ||||||||
| 63185 | DEC BC | Decrease the delay counter by one. | ||||||||
| 63186 | LD A,C | Return if the delay counter is zero. | ||||||||
| 63187 | OR B | |||||||||
| 63188 | RET Z | |||||||||
| 63189 | DEC DE | Decrease the duration counter by one. | ||||||||
| 63190 | LD A,D | Keep looping back to PlayWave4 until the duration counter is zero. | ||||||||
| 63191 | OR E | |||||||||
| 63192 | JR NZ,PlayWave4 | |||||||||
| 63194 | RET | Return. | ||||||||
| Prev: 63119 | Up: Map | Next: 63195 |