.PAUSE JSR DrawScreenInNMI_b0 ; Configure the NMI handler to draw the screen JSR WaitForPPUToFinish ; Wait until both bitplanes of the screen have been ; sent to the PPU, so the screen is fully updated and ; there is no more data waiting to be sent to the PPU LDA firstFreePattern ; Tell the NMI handler to send pattern entries from the STA firstPattern ; first free pattern onwards, so we don't waste time ; resending the static patterns we have already sent LDA #40 ; Tell the NMI handler to only clear nametable entries STA maxNameTileToClear ; up to tile 40 * 8 = 320 (i.e. up to the end of tile ; row 10) LDX #8 ; Tell the NMI handler to send nametable entries from STX firstNameTile ; tile 8 * 8 = 64 onwards (i.e. from the start of tile ; row 2) .paus1 JSR PAS1_b0 ; Call PAS1 to display the rotating ship at space ; coordinates (0, 100, 256) and scan the controllers LDA controller1A ; Loop back to keep displaying the rotating ship until ORA controller1B ; both the A button and B button have been released on BPL paus1 ; controller 1 .paus2 JSR PAS1_b0 ; Call PAS1 to display the rotating ship at space ; coordinates (0, 100, 256) and scan the controllers LDA controller1A ; Loop back to keep displaying the rotating ship until ORA controller1B ; either the A button or B button has been pressed on BMI paus2 ; controller 1 LDA #0 ; Set the ship's AI flag to 0 (no AI) so it doesn't get STA INWK+31 ; any ideas of its own LDA #$93 ; Clear the screen and set the view type in QQ11 to $93 JSR TT66_b0 ; (Mission 1 briefing: ship and text) ; Fall through into MT23 to move to row 10, switch to ; white text, and switch to lower case when printing ; extended tokensName: PAUSE [Show more] Type: Subroutine Category: Missions Summary: Display a rotating ship, waiting until a key is pressed, then remove the ship from the screenContext: See this subroutine in context in the source code References: This subroutine is called as follows: * JMTB calls PAUSE
[X]
Subroutine DrawScreenInNMI_b0 (category: Drawing the screen)
Call the DrawScreenInNMI routine in ROM bank 0
[X]
Subroutine PAS1_b0 (category: Missions)
Call the PAS1 routine in ROM bank 0
[X]
Subroutine TT66_b0 (category: Drawing the screen)
Call the TT66 routine in ROM bank 0
[X]
Subroutine WaitForPPUToFinish (category: PPU)
Wait until the NMI handler has finished updating both bitplanes, so the screen is no longer refreshing
[X]
Variable controller1A in workspace WP
A shift register for recording presses of the A button on controller 1
[X]
Variable controller1B in workspace WP
A shift register for recording presses of the B button on controller 1
[X]
Variable firstFreePattern in workspace ZP
Contains the number of the first free pattern in the pattern buffer that we can draw into next (or 0 if there are no free patterns)
[X]
Variable firstNameTile in workspace ZP
The number of the first tile for which we send nametable data to the PPU in the NMI handler (potentially for both bitplanes, if both are configured to be sent)
[X]
Variable firstPattern in workspace ZP
The number of the first pattern for which we send data to the PPU in the NMI handler (potentially for both bitplanes, if both are configured to be sent)
[X]
Variable maxNameTileToClear in workspace ZP
The tile number at which the NMI handler should stop clearing tiles in the nametable buffers during its clearing cycle
[X]
Label paus1 is local to this routine
[X]
Label paus2 is local to this routine