.UpdateScreen LDA screenFadedToBlack ; If bit 7 of screenFadedToBlack is clear then the BPL SetupFullViewInNMI ; screen is visible and has not been faded to black, so ; we need to send the view to the PPU in the NMI handler ; to avoid corrupting the screen, so jump to ; SetupFullViewInNMI to configure the NMI handler ; accordingly ; Otherwise the screen has been faded to black, so we ; can fall through into SendViewToPPU to send the view ; straight to the PPU without having to restrict ; ourselves to VBlankName: UpdateScreen [Show more] Type: Subroutine Category: PPU Summary: Update the screen by sending data to the PPU, either immediately or during VBlank, depending on whether the screen is visible Deep dive: Views and view types in NES EliteContext: See this subroutine in context in the source code References: This subroutine is called as follows: * ChangeToView calls UpdateScreen * UpdateHangarView calls UpdateScreen * UpdateView calls UpdateScreen
[X]
Subroutine SetupFullViewInNMI (category: Drawing the screen)
Configure the PPU to send tiles for the full screen during VBlank
[X]
Variable screenFadedToBlack in workspace WP
Records whether the screen has been faded to black