base:frame_skipping
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
base:frame_skipping [2014-11-11 12:50] – created mace | base:frame_skipping [2015-04-17 04:32] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== 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 | ||
+ | |||
+ | skipper: | ||
+ | lda #$00 // check byte | ||
+ | and #$01 // check first bit (even or odd number?) | ||
+ | beq passroutine | ||
+ | |||
+ | 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 by 127.0.0.1