[Coco] Assembly: timing, vsync

Ricardo M. Ferreira ricspam at mpc.com.br
Sun Apr 17 10:27:08 EDT 2016


On Sat, Apr 16, 2016 at 12:21 AM, Ricardo M. Ferreira wrote:
>> >is there any way for my program to figure out the timer
>> >frequency (if it is 50 Hz or 60 Hz)?
> I was going to write a 50/60Hz detection routine for FUZIX anyway, so
> I can give you the following working example:
> https://gitlab.com/m6809-computer-tools/various-6809/blob/master/bogomips.asm
> It counts CPU cycles between two vsync interrupts and can therefore
> tell if you are on 50 or 60 Hz and 0.9 or 1.8 MHz. The program stores
> the final counter value at $0C00 and prints a letter to indicate the
> result.

Ah, great idea! Thanks for the suggestion and the code, Tormod! :)


More information about the Coco mailing list