Prev: A45F Up: Map Next: A485
A46E: A short burst of noise
Used by the routines at TIMED_DOOR_SHUT and TRAPDOOR_CLOSED.
Run from a cold machine it lasts about 8 milliseconds and puts out 119 speaker edges with the gaps between them swinging wildly -- 843 Hz at the widest and far above hearing at the narrowest. That is not a note; it is a rasp.
Reached by JP from TOGGLE_TIMED_DOOR (a timed door slamming or opening) and from the tail of TRAPDOOR_CLOSED (a trapdoor opening or closing), so it returns to whoever called those. Its noise is the ROM: eight bits of each of 48 bytes from address 0 go to the speaker. An earlier note put the caller at TIMED_DOOR_SHUT, which was wrong -- that is the timed door's handler, two calls away.
An earlier note here claimed this was a full second of sound sweeping the audible range, which was wrong. The measurement behind it came from running several sound routines in turn on one machine, so this one inherited the state the others left and took a longer path than it ever does in the game.
SOUND_NOISE_BURST A46E LD BC,$0830
A471 LD HL,$0000
SOUND_NOISE_BURST_0 A474 LD E,(HL)
A475 INC HL
A476 PUSH BC
SOUND_NOISE_BURST_1 A477 RRC E
A479 LD A,E
A47A AND $10
A47C OUT ($FE),A
A47E DJNZ SOUND_NOISE_BURST_1
A480 POP BC
A481 DEC C
A482 JR NZ,SOUND_NOISE_BURST_0
A484 RET
Prev: A45F Up: Map Next: A485