[Coco] Assembly: timing, vsync
Ricardo M. Ferreira
ricspam at mpc.com.br
Fri Apr 15 18:21:35 EDT 2016
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!
More information about the Coco
mailing list