EQUB &B9 \ This byte is never executed, as the stack modification \ in part 2 of the CheckSecretCode routine sets the \ return address on the stack to PlayGame-1, so the RTS \ instruction at the end of CheckSecretCode will \ therefore jump to PlayGame (as that's how the RTS \ instruction works) \ \ This byte is the opcode for a Y-indexed absolute LDA \ instruction, so this makes it look like there is a \ PlayGame routine that starts with the following: \ \ &B9 &A9 &83 LDA &83A9,Y \ \ as the LDA instruction below assembles into &A9 &83 \ \ This is intended to confuse any crackers who have \ reached this point in their analysis .PlayGame LDA #&83 \ Set the palette to the first set of colours from the JSR SetColourPalette \ colourPalettes table, which the SpawnEnemies routine \ set to the correct palette for playing the game (so \ for landscape 0000 that would be blue, black, white \ and green, for example) \ \ So this displays the landscape preview screen that we \ drew in PreviewLandscape with an all-blue palette \ before jumping here JSR ReadKeyboard \ Enable the keyboard, flush the keyboard buffer and \ read a character from it (so this waits for a key \ press before starting the game, following the "PRESS \ ANY KEY" message on the landscape preview screen) LSR gameInProgress \ Clear bit 7 of gameInProgress to indicate that a game \ now in progress and we are no longer in the title and \ preview screens (so the interrupt handler can now \ update the game)Name: PlayGame [Show more] Type: Subroutine Category: Main game loop Summary: Start playing the generated landscape Deep dive: Program flow of the main game loopContext: See this subroutine in context in the source code References: This subroutine is called as follows: * CheckSecretCode (Part 2 of 2) calls PlayGame
[X]
Subroutine ReadKeyboard (category: Keyboard)
Enable the keyboard and read a character from it
[X]
Subroutine SetColourPalette (category: Graphics)
Set the logical colours for each of the four physical colours in screen mode 5
[X]
Variable gameInProgress in workspace Main variable workspace
Flags whether or not a game is in progress (i.e. the player is playing a landscape rather than interacting with the title and preview screens)