MACRO ADD_CYCLES_CLC cycles CLC ; Clear the C flag for the addition below LDA cycleCount ; Add cycles to cycleCount(1 0) ADC #LO(cycles) STA cycleCount LDA cycleCount+1 ADC #HI(cycles) STA cycleCount+1 ENDMACROName: ADD_CYCLES_CLC [Show more] Type: Macro Category: Drawing the screen Summary: Add a specified number to 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 ADD_CYCLES_CLC * ClearMemory uses ADD_CYCLES_CLC * ClearPlaneBuffers (Part 1 of 2) uses ADD_CYCLES_CLC * ClearPlaneBuffers (Part 2 of 2) uses ADD_CYCLES_CLC * SendBuffersToPPU (Part 3 of 3) uses ADD_CYCLES_CLC * SendNametableToPPU uses ADD_CYCLES_CLC * SendOtherBitplane uses ADD_CYCLES_CLC * SendPatternsToPPU (Part 1 of 6) uses ADD_CYCLES_CLC * SendPatternsToPPU (Part 3 of 6) uses ADD_CYCLES_CLC
The following macro is used to add cycles to the cycle count: ADD_CYCLES_CLC cycles The cycle count is stored in the variable cycleCount.
Arguments: cycles The number of cycles to add to 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]