.LL164 LDA #255 ; Set A = 255 to use as the period of the hyperspace ; sound, counting down towards 170 so the pitch of the ; hyperspace sound increases as it plays .BEEPL7 STA T2 ; Store the period in T2 so we can retrieve it after the ; call to SOBLIP TAX ; Call the SOBLIP routine with Y = 90 to make the sound LDY #90 ; of the hyperspace drive being engaged, with X set to JSR SOBLIP ; the period in A (so the period reduces over time, ; which means the pitch increases) LDA T2 ; Set A = T2 - 10 SBC #10 ; ; So this reduces the period in A by 10 (or possibly 11 ; on the first iteration, if the C flag is clear when we ; call LL164; it makes no real difference) CMP #170 ; Loop back until the period in A is less than 170 BCS BEEPL7 LDA #4 ; Set the step size for the hyperspace rings to 4, so ; there are more sections in the rings and they are ; quite round (compared to the step size of 8 used in ; the much more polygonal launch rings) JSR HFS2 ; Call HFS2 to draw the hyperspace tunnel rings RTS ; Return from the subroutine
[X]
Label BEEPL7 is local to this routine
[X]
Subroutine HFS2 (category: Drawing circles)
Draw the launch or hyperspace tunnel
[X]
Subroutine SOBLIP (category: Sound)
Make the sound of the hyperspace drive being engaged, or the sound of the E.C.M.