.SetupSpaceView LDA #$FF ; Set showIconBarPointer = $FF to indicate that we STA showIconBarPointer ; should show the icon bar pointer LDA #$2C ; Set the visible colour to cyan ($2C) STA visibleColour 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 #80 ; Tell the NMI handler to only clear nametable entries STA maxNameTileToClear ; up to tile 80 * 8 = 640 (i.e. up to the end of tile ; row 19) 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) LDA #116 ; Tell the NMI handler to send nametable entries up to STA lastNameTile ; tile 116 * 8 = 800 (i.e. up to the end of tile row 28) ; in bitplane 0 RTS ; Return from the subroutineName: SetupSpaceView [Show more] Type: Subroutine Category: Drawing the screen Summary: Set up the NMI variables for the space viewContext: See this subroutine in context in the source code References: This subroutine is called as follows: * PlayDemo calls SetupSpaceView
[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 lastNameTile in workspace ZP
The number of the last nametable buffer entry to send to the PPU nametable table in the NMI handler for bitplane 0, divided by 8
[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]
Variable showIconBarPointer in workspace WP
Controls whether to show the icon bar pointer
[X]
Variable visibleColour in workspace ZP
Contains the colour to use for pixels that are visible in palette 0, e.g. $2C for cyan