.HYPNOISE LDY #sfxhyp1 ; Call the NOISE2 routine with Y = sfxhyp1, a frequency LDA #$F5 ; of 240 in X, and A set as follows: LDX #240 ; JSR NOISE2 ; * Low nibble of A = release length of 5 ; ; * High nibble of A = sustain volume of 15 LDY #sfxwhosh ; Call the NOISE routine with Y = sfxwhosh to make the JSR NOISE ; sound of the ship launching LDY #1 ; Wait for 1/50 of a second (0.02 seconds) on PAL JSR DELAY ; systems, or 1/60 of a second (0.017 seconds) on NTSC LDY #(sfxhyp1+128) ; Call the NOISE routine with Y = sfxhyp1 + 128, which BNE NOISE ; makes the sfxhyp1 hyperspace effect, but without first ; checking to see if it is already playing (so the ; effect can layer on top of the first sound effect we ; made above) ; ; The call to NOISE returns from the subroutine using a ; tail call (this BNE is effectively a JMP as Y is never ; zero)Name: HYPNOISE [Show more] Type: Subroutine Category: Sound Summary: Make the sound of the hyperspace drive being engagedContext: See this subroutine in context in the source code References: This subroutine is called as follows: * LL164 calls HYPNOISE
[X]
Subroutine DELAY (category: Utility routines)
Wait for a specified time, in either 1/50s of a second (on PAL systems) or 1/60s of a second (on NTSC systems)
[X]
Subroutine NOISE (category: Sound)
Make the sound whose number is in Y
[X]
Subroutine NOISE2 (category: Sound)
Make a sound effect with a specific volume and release length
[X]
Configuration variable sfxhyp1 = 7
Sound 7 = Hyperspace drive engaged 1
[X]
Configuration variable sfxwhosh = 4
Sound 4 = Missile launched / Ship launch