User Tools

Site Tools


base:frame_skipping

Frame skipping

Once in a while you created some effect that just goes too quick when you update it every frame. The option is to have a check in order to skip your routine every other frame. Put this inside your IRQ.

start:
   inc skipper+1      // increase the check byte
   
skipper:
   lda #$00           // check byte
   and #$01           // check first bit (even or odd number?)
   beq passroutine    // skip routine on even numbers
   
routine:
   // routine that will be executed every other frame
   
passroutine:
   // the rest, executed every frame
base/frame_skipping.txt · Last modified: 2015-04-17 04:32 (external edit)