Skip to navigation

BBC Micro Elite

Flight: MJP

Name: MJP [View in context] Type: Subroutine Category: Flight Summary: Process a mis-jump into witchspace
Process a mis-jump into witchspace (which happens very rarely). Witchspace has a strange, almost dust-free aspect to it, and it is populated by hostile Thargoids. Using our escape pod will be fatal, and our position on the galactic chart is in-between systems. It is a scary place... There is a 1% chance that this routine is called from TT18 instead of doing a normal hyperspace, or we can manually trigger a mis-jump by holding down CTRL after first enabling the "author display" configuration option ("X") when paused. Other entry points: ptg Called when the user manually forces a mis-jump
{ .^ptg LSR COK \ Set bit 0 of the competition flags in COK, so that the SEC \ copmpetition code will include the fact that we have ROL COK \ manually forced a mis-jump into witchspace .^MJP \LDA #1 \ This instruction is commented out in the original \ source - it is not required as a call to TT66-2 sets \ A to 1 for us. This is presumably an example of the \ authors saving a couple of bytes by calling TT66-2 \ instead of TT66, while leaving the original LDA \ instruction in place JSR TT66-2 \ Clear the top part of the screen, draw a white border, \ and set the current view type in QQ11 to 1 JSR LL164 \ Call LL164 to show the hyperspace tunnel and make the \ hyperspace sound for a second time (as we already \ called LL164 in TT18) JSR RES2 \ Reset a number of flight variables and workspaces, as \ well as setting Y to &FF STY MJ \ Set the mis-jump flag in MJ to &FF, to indicate that \ we are now in witchspace .MJP1 JSR GTHG \ Call GTHG to spawn a Thargoid ship LDA #3 \ Fetch the number of Thargoid ships from MANY+THG, and CMP MANY+THG \ if it is less than 3, loop back to MJP1 to spawn BCS MJP1 \ another one, until we have three Thargoids STA NOSTM \ Set NOSTM (the maximum number of stardust particles) \ to 3, so there are fewer bits of stardust in \ witchspace (normal space has a maximum of 18) LDX #0 \ Initialise the front space view JSR LOOK1 LDA QQ1 \ Fetch the current system's galactic y-coordinate in EOR #%00011111 \ QQ1 and flip bits 0-5, so we end up somewhere in the STA QQ1 \ vicinity of our original destination, but above or \ below it in the galactic chart RTS \ Return from the subroutine }