.TTX66 JSR MT2 ; Switch to Sentence Case when printing extended tokens ;JSR PBZE ; These instructions are commented out in the original ;JSR HBZE ; source LDA #0 ; Reset the ball line heap pointer at LSP ;STA LBUP ; STA LSP ; The STA instruction is commented out in the original ; source LDA #%10000000 ; Set bit 7 of QQ17 to switch to Sentence Case STA QQ17 STA DTW2 ; Set bit 7 of DTW2 to indicate we are not currently ; printing a word JSR FLFLLS ; Call FLFLLS to reset the LSO block ;LDA #YELLOW ; These instructions are commented out in the original ;JSR DOCOL ; source LDA #0 ; Set LAS2 = 0 to stop any laser pulsing STA LAS2 STA DLY ; Set the delay in DLY to 0, to indicate that we are ; no longer showing an in-flight message, so any new ; in-flight messages will be shown instantly STA de ; Clear de, the flag that appends " DESTROYED" to the ; end of the next text token, so that it doesn't LDA #1 ; Move the text cursor to column 1 STA XC STA YC ; Move the text cursor to row 1 JSR TTX66K ; Clear the top part of the screen and draw a yellow ; border LDX QQ22+1 ; Fetch into X the number that's shown on-screen during ; the hyperspace countdown BEQ OLDBOX ; If the counter is zero then we are not counting down ; to hyperspace, so jump to OLDBOX to skip the next ; instruction JSR ee3 ; Print the 8-bit number in X at text location (0, 1), ; i.e. print the hyperspace countdown in the top-left ; corner .OLDBOX LDA #1 ; Move the text cursor to column 1 JSR DOYC LDA QQ11 ; If this is not a space view, jump to tt66 to skip BNE tt66 ; displaying the view name LDA #11 ; Move the text cursor to row 11 JSR DOXC LDA VIEW ; Load the current view into A: ; ; 0 = front ; 1 = rear ; 2 = left ; 3 = right ORA #$60 ; OR with $60 so we get a value of $60 to $63 (96 to 99) JSR TT27 ; Print recursive token 96 to 99, which will be in the ; range "FRONT" to "RIGHT" JSR TT162 ; Print a space LDA #175 ; Print recursive token 15 ("VIEW ") JSR TT27 .tt66 LDX #1 ; Move the text cursor to column 1, row 1 STX XC STX YC DEX ; Set QQ17 = 0 to switch to ALL CAPS STX QQ17 RTS ; Return from the subroutineName: TTX66 [Show more] Type: Subroutine Category: Drawing the screen Summary: Clear the top part of the screen and draw a border boxContext: See this subroutine in context in the source code References: This subroutine is called as follows: * TT18 calls TTX66
Clear the top part of the screen (the space view) and draw a border box along the top and sides.
[X]
Subroutine DOXC (category: Text)
Move the text cursor to a specific column
[X]
Subroutine DOYC (category: Text)
Move the text cursor to a specific row
[X]
Variable DTW2 (category: Text)
A flag that indicates whether we are currently printing a word
[X]
Subroutine FLFLLS (category: Drawing suns)
Reset the sun line heap
[X]
The ball line heap pointer, which contains the number of the first free byte after the end of the LSX2 and LSY2 heaps (see the deep dive on The ball line heap for details)
[X]
Subroutine MT2 (category: Text)
Switch to Sentence Case when printing extended tokens
[X]
Label OLDBOX is local to this routine
[X]
Subroutine TT162 (category: Text)
Print a space
[X]
Subroutine TT27 (category: Text)
Print a text token
[X]
Subroutine TTX66K (category: Drawing the screen)
Clear the whole screen or just the space view (as appropriate), draw a border box, and if required, show the dashboard
[X]
Subroutine ee3 (category: Flight)
Print the hyperspace countdown in the top-left of the screen
[X]
Label tt66 is local to this routine