Skip to navigation

Elite on the BBC Micro and NES

Flight: wW

[NES version, Bank 0]

Name: wW [Show more] Type: Subroutine Category: Flight Summary: Start a hyperspace countdown
Context: See this subroutine in context in the source code References: This subroutine is called as follows: * Ghy calls via wW2

Start the hyperspace countdown (for both inter-system hyperspace and the galactic hyperdrive).
Other entry points: wW2 Start the hyperspace countdown, starting the countdown from the value in A
.wW LDA #16 ; The hyperspace countdown starts from 16, so set A to ; 15 so we can set the two hyperspace counters .wW2 STA QQ22+1 ; Set the number in QQ22+1 to A, which is the number ; that's shown on-screen during the hyperspace countdown LDA #1 ; Set the number in QQ22 to 11, which is the internal STA QQ22 ; counter that counts down by 1 each iteration of the ; main game loop, and each time it reaches zero, the ; on-screen counter gets decremented, and QQ22 gets set ; to 5, so setting QQ22 to 1 here makes the first tick ; of the hyperspace counter shorter than subsequent ; ticks JMP UpdateIconBar_b3 ; Update the icon bar to remove the Hyperspace button, ; as we are now commit to our hyperspace jump, and ; return from the subroutine using a tail call