MACRO SUBTRACT_CYCLES cycles SEC ; Subtract cycles from cycleCount(1 0) LDA cycleCount SBC #LO(cycles) STA cycleCount LDA cycleCount+1 SBC #HI(cycles) STA cycleCount+1 ENDMACROName: SUBTRACT_CYCLES [Show more] Type: Macro Category: Drawing the screen Summary: Subtract a specified number from the cycle count Deep dive: Drawing vector graphics using NES tilesContext: See this macro in context in the source code References: This macro is used as follows: * ClearBuffers uses SUBTRACT_CYCLES * ClearMemory uses SUBTRACT_CYCLES * ClearPlaneBuffers (Part 1 of 2) uses SUBTRACT_CYCLES * ClearPlaneBuffers (Part 2 of 2) uses SUBTRACT_CYCLES * ConsiderSendTiles uses SUBTRACT_CYCLES * SendBarNamesToPPU uses SUBTRACT_CYCLES * SendBarPatts2ToPPU uses SUBTRACT_CYCLES * SendBarPattsToPPU uses SUBTRACT_CYCLES * SendBuffersToPPU (Part 2 of 3) uses SUBTRACT_CYCLES * SendBuffersToPPU (Part 3 of 3) uses SUBTRACT_CYCLES * SendNametableToPPU uses SUBTRACT_CYCLES * SendOtherBitplane uses SUBTRACT_CYCLES * SendPalettesToPPU uses SUBTRACT_CYCLES * SendPatternsToPPU (Part 1 of 6) uses SUBTRACT_CYCLES * SendPatternsToPPU (Part 3 of 6) uses SUBTRACT_CYCLES * SendPatternsToPPU (Part 5 of 6) uses SUBTRACT_CYCLES
The following macro is used to subtract cycles from the cycle count: SUBTRACT_CYCLES cycles The cycle count is stored in the variable cycleCount.
Arguments: cycles The number of cycles to subtract from the cycle count
[X]
Variable cycleCount in workspace ZP
Counts the number of CPU cycles left in the current VBlank in the NMI handler
[X]