Skip to navigation

Elite on the BBC Micro

Flight: MJP [Elite-A, Parasite]

Name: MJP [Show more] Type: Subroutine Category: Flight Summary: Process a mis-jump into witchspace
Context: See this subroutine in context in the source code References: This subroutine is called as follows: * TT18 calls MJP * TT18 calls entry point RTS111

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: RTS111 Contains an RTS
.MJP LDA #3 \ Call SHIPinA populate the ship blueprints table but JSR SHIPinA \ without setting the compass to show the planet (the \ LDA here has no effect and is left over from the disc \ version) LDA #3 \ Clear the top part of the screen, draw a white border, JSR TT66 \ and set the current view type in QQ11 to 3 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 or equal to 3, loop back to MJP1 to BCS MJP1 \ spawn another one, until we have four 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 .RTS111 RTS \ Return from the subroutine