[Coco] Project update!

Mark McDougall msmcdoug at iinet.net.au
Sat Mar 28 23:18:36 EDT 2015


On 28/03/2015 2:28 PM, Hugo Dufort wrote:

> Despite page flipping, there is still some flicker, which might be caused by
> the program not taking the VSYNC into account. Quite frankly, I have no idea
> how to do that. I had to add a delay loop in order to reduce flicker, which
> is worse when the sprites are in some areas of the screen. Any help about
> Vsync interrupts or flags is welcome!

Check out Sockmaster's GIME reference page...

<http://users.axess.com/twilight/sock/gime.html>

It's been a while but what I did was insert an LBRA to my VBLANK routine at 
$FEF7-$FEF9 and enable the VBLANK IRQ ($FF92=$08). In your ISR read $FF92 to 
ACK the interrupt and check (bit 3) if the interrupt was triggered.

Your whole game timing should be running off the VBLANK. On each interrupt 
flip the page and then set a flag so the main loop can run game logic which 
updates the off-screen page. When you're done updating, idle-loop until the 
next interrupt.

Regards,

-- 
|              Mark McDougall                | "Electrical Engineers do it
|  <http://members.iinet.net.au/~msmcdoug>   |   with less resistance!"


More information about the Coco mailing list