This code appears in the following versions (click to see it in the source code):
Code variations between these versions are shown below.
Name: hyp Type: Subroutine Category: Flight Summary: Start the hyperspace process
Called when "H" or CTRL-H is pressed during flight. Checks the following: * We are in space * We are not already in a hyperspace countdown If CTRL is being held down, we jump to Ghy to engage the galactic hyperdrive, otherwise we check that: * The selected system is not the current system * We have enough fuel to make the jump and if all the pre-jump checks are passed, we print the destination on-screen and start the countdown.
Other entry points: TTX111 Used to rejoin this routine from the call to TTX110
.hyp
This variation is blank in the Disc (flight) and Disc (docked) versions.
Tap on a block to expand it, and tap it again to revert.
LDA QQ22+1 \ Fetch QQ22+1, which contains the number that's shown \ on-screen during hyperspace countdown
This variation is blank in the Cassette, Disc (flight), Disc (docked) and Electron versions.
Tap on a block to expand it, and tap it again to revert.
Galactic hyperspace does not work in the original Acornsoft release as the game checks for a CAPS-LOCK-H keypress instead of CTRL-H, and this combination does not work properly.
Tap on a block to expand it, and tap it again to revert.
BMI Ghy \ If it is, then the galactic hyperdrive has been \ activated, so jump to Ghy to process it
This variation is blank in the Cassette and Electron versions.
Tap on a block to expand it, and tap it again to revert.
JSR hm \ This is a chart view, so call hm to redraw the chart \ crosshairs
Part of the bug fix for the "hyperspace while docking" bug (see below).
This variation is blank in the Cassette, Disc (flight), Disc (docked) and Electron versions.
LDX #5 \ We now want to copy those seeds into safehouse, so we \ so set a counter in X to copy 6 bytes .sob LDA QQ15,X \ Copy the X-th byte of QQ15 into the X-th byte of STA safehouse,X \ safehouse DEX \ Decrement the loop counter BPL sob \ Loop back to copy the next byte until we have copied \ all six seed bytes
LDA #0 \ Set QQ17 = 0 to switch to ALL CAPS STA QQ17 LDA #189 \ Print recursive token 29 ("HYPERSPACE ") JSR TT27
If infinite jump range is enabled in the Executive version, you can jump to anywhere in the entire galaxy.
This variation is blank in the Cassette, Disc (flight), Disc (docked), Master and Electron versions.
IF _EXECUTIVE BIT JUMP \ If infinite jump range is configured, then jump down BMI goTT147+3 \ to IJUMP so we do the jump whatever the distance ENDIF
LDA QQ14 \ Fetch our current fuel level from Q114 into A
LDA #'-' \ Print a hyphen JSR TT27 JSR cpl \ Call cpl to print the name of the selected system \ Fall through into wW to start the hyperspace countdown