[Coco] Assembly: timing, vsync

Arthur Flexser flexser at fiu.edu
Fri Apr 15 19:32:10 EDT 2016


As far as your second question, there is a 6809 instruction, SYNC that
waits for an interrupt, so that would probably be the easiest.

Art

On Fri, Apr 15, 2016 at 6:21 PM, Ricardo M. Ferreira <ricspam at mpc.com.br>
wrote:

> Hi, all!
>
> I have a couple of (possibly) related questions, I'd appreciate your
> comments.
>
>
> 1) "Timer"
>
> From what I read and tested on a Coco 2 emulator (Xroar), the "timer" at
> $0112:0113 seems to be updated after every screen refresh. So, it changes
> at 60 Hz on NTSC devices ("xroar -default-machine cocous"), and 50 Hz on
> PAL ("xroar -default-machine coco").
>
> I want to write a program that is time sensitive. Is this the only timer
> in the Coco 2? If so, is there any way for my program to figure out the
> timer frequency (if it is 50 Hz or 60 Hz)?
>
>
> 2) VSync / vertical sync / vertical refresh / field sync
>
> When programming in assembly, how can I make my code wait for the right
> moment to change the visible graphics page?
>
> From what I read, I guess I could use interrupts for this -  but it seems
> that I could also use the timer above (probably updated by an IRQ, anyway)
> by entering a loop and waiting for its value to change. Does anybody have a
> better suggestion?
>
>
> []s!
>
> --
> Coco mailing list
> Coco at maltedmedia.com
> https://pairlist5.pair.net/mailman/listinfo/coco
>


More information about the Coco mailing list