.WaitForPPUToFinish SETUP_PPU_FOR_ICON_BAR ; If the PPU has started drawing the icon bar, configure ; the PPU to use nametable 0 and pattern table 0 LDA bitplaneFlags ; Keep looping back to the start of the routine until AND #%01000000 ; bit 6 of the bitplane flags for bitplane 0 is clear BNE WaitForPPUToFinish LDA bitplaneFlags+1 ; Do the same for bitplane 1 AND #%01000000 BNE WaitForPPUToFinish ; We get here when both bitplanes have bit 6 clear, ; which means neither bitplane is configured to send ; nametable data to the PPU ; ; This means the screen has finished refreshing and ; there is no longer any nametable data that needs ; sending to the PPU, so we can return from the ; subroutine RTS ; Return from the subroutineName: WaitForPPUToFinish [Show more] Type: Subroutine Category: PPU Summary: Wait until the NMI handler has finished updating both bitplanes, so the screen is no longer refreshingContext: See this subroutine in context in the source code References: This subroutine is called as follows: * BuyAndSellCargo calls WaitForPPUToFinish * DrawMessageInNMI calls WaitForPPUToFinish * DrawScreenInNMI calls WaitForPPUToFinish * DrawScrollInNMI calls WaitForPPUToFinish * FadeToBlack calls WaitForPPUToFinish * HighlightLaserView calls WaitForPPUToFinish * LL164 calls WaitForPPUToFinish * PAUSE calls WaitForPPUToFinish * PauseGame calls WaitForPPUToFinish * SetupViewInNMI calls WaitForPPUToFinish * TT66 calls WaitForPPUToFinish * UpdateEquipment calls WaitForPPUToFinish * UpdateSaveScreen calls WaitForPPUToFinish
[X]
Macro SETUP_PPU_FOR_ICON_BAR (category: PPU)
If the PPU has started drawing the icon bar, configure the PPU to use nametable 0 and pattern table 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 bitplaneFlags in workspace WP
Flags for bitplane 0 that control the sending of data for this bitplane to the PPU during VBlank in the NMI handler