View Single Post
Old 19 April 2010, 11:10   #2
StingRay
move.l #$c0ff33,throat
 
StingRay's Avatar
 
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,863
Quote:
Originally Posted by pmc View Post
What are the strategies for syncing with the display while running at a lower frame rate...?
First of all, try to optimize your code so it may run in 50 FPS. If that isn't possible, then you can either cheat (that's what demo coding is all about anyway) or remove your routine from the interrupt and call it in a normal "Wait for vblank, do effect" loop, f.e.

Code:
LOOP    bsr WaitRaster
    bsr lame_and_slow_effect ; ;D
    btst #6,$bfe001
    bne.b LOOP
    rts

WaitRaster
.wait    move.l $dff004,d0
    and.l #$1ff00,d0
    cmp.l #303<<8,d0    ; 303 = line to wait for
    bne.b .wait
    rts
StingRay is offline  
 
Page generated in 0.04147 seconds with 11 queries