[Coco] real-time mouse cursor

Robert Gault robert.gault at worldnet.att.net
Sat Jan 26 20:57:30 EST 2008

Roger Taylor wrote:

> Hopefully others are paying attention to your tutes so they might can 
> dive into something graphics intensive.  I've known for ages most of 
> what you're saying but the part about letting IRQ decide when to switch 
> the screen and having the main code not accidentally get mixed up with 
> the current state is something that carries a little bit of worry since 
> IRQ can happen at any time during the main code execution, even if 
> predictable at 60hz.
> I mostly use the following VSYNC subroutine in all of my screen updating 
> stuff.
> VSYNC   TST     $FF02
> a@      TST     $FF03
>         BPL     a@
>         RTS

That's the way to use the PIA interrupt but as time is crucial, I'd 
suggest in-line code rather than a subroutine. That will remove the 
cycles needed to BSR or JSR and RTS.

Are you writing for any Coco or just a Coco3? If the latter, you can 
also use the GIME interrupts.

More information about the Coco mailing list