![]() |
Routines |
| Prev: A39E | Up: Map | Next: A3BD |
|
Used by the routines at TRAPDOOR_FALL, SOUND_SWEEP_A41B, SOUND_SWEEP_UP, SOUND_SWEEP_DOWN and SOUND_WEAPON_GONE.
Toggles bit 4 of port $FE with a busy-wait either side, which is the only way a 48K makes a sound. Every sound effect in the game is a call here, or a short sequence of them with different pitches.
|
||||||||||
| BEEP | A3A8 | LD C,$01 | The plain entry point plays exactly one cycle; callers wanting a longer note enter below with C already set. | |||||||
|
This entry point is used by the routines at BEEP_ENTRIES, SOUND_FOOTSTEP, SOUND_LIFE_PIP, SOUND_CAUGHT, SOUND_NEW_ROOM, SOUND_RISE_SINK, SOUND_EATING and SOUND_BOUNCE.
|
||||||||||
| BEEP_BC | A3AA | LD A,$10 | Speaker bit high. | |||||||
| A3AC | OUT ($FE),A | |||||||||
| A3AE | PUSH BC | |||||||||
| BEEP_0 | A3AF | DJNZ BEEP_0 | The pitch: burn B iterations doing nothing. | |||||||
| A3B1 | POP BC | |||||||||
| A3B2 | PUSH BC | |||||||||
| A3B3 | XOR A | Speaker bit low again. This also writes 0 to the border bits, which is why the border stays black through every effect. | ||||||||
| A3B4 | OUT ($FE),A | |||||||||
| BEEP_1 | A3B6 | DJNZ BEEP_1 | ||||||||
| A3B8 | POP BC | |||||||||
| A3B9 | DEC C | Repeat for C cycles. | ||||||||
| A3BA | JR NZ,BEEP_BC | |||||||||
| A3BC | RET | |||||||||
| Prev: A39E | Up: Map | Next: A3BD |