[Coco] CoCo's TIMER and 60hz

Dave Philipsen dave at davebiz.com
Wed May 29 15:28:43 EDT 2019


Even if you are able to tweak it and get a reliable 60 Hz interrupt 
there will probably be slight variations from one oscillator to another. 
On another project I worked on I handled this by introducing some extra 
code in the interrupt service routine. Generally speaking, you keep a 
running counter that counts each interrupt as it comes in. When that 
count reaches some fixed value (a constant that you can modify on a case 
by case basis) you either dismiss the rest of the interrupt service or 
introduce an extra one. As long as the oscillator is consistent you will 
be able to derive an extremely accurate time base this way.

Dave

On 5/29/2019 12:14 PM, Bill Nobel wrote:
> Hi Allen.
>
>    Roger and I ran a test last night with my logic analyzer on a real Coco3.  VSYNC on the particular machine I tested reported 59.7 Hz.  The Coco3 was never accurate on software time due to fact the IRQ line is shared with other devices besides VSYNC.  Yes they are queued but arn’t serviced accurately based on time.
>
> Bill Nobel
> b_nobel at hotmail.com<mailto:b_nobel at hotmail.com>
>
>
>
> On May 29, 2019, at 10:32 AM, Allen Huffman <alsplace at pobox.com<mailto:alsplace at pobox.com>> wrote:
>
> How precise is the CoCo’s 60hz IRQ from machine to machine? I’ve really only used two CoCo 3s in my lifetime, and I don’t recall the software clock under OS-9 being terribly inaccurate.
>
> I did some tests with Roger Tayloer’s Matchbox CoCo FPGA and saw that the time gets off pretty badly under NitrOS-9.
>
> I then did some BASIC tests between it and a stopwatch, assuming TIMER is 60/second. It also gets off.
>
> Now I am testing Matchbox CoCo against my real CoCo 3, and see Matchbox is already 2 seconds behind in the first 8 minutes.
>
> Since I don’t have multiple CoCos to compare, I wonder if this is just normal drift? Since we are using the video outputs 60hz, I assume it has to be pretty precise and consistent, but maybe not perfect from machine to machine? NTSC was never perfect, yes?
>
> I can share my simple test program if someone would be interested in trying it on two real CoCos side-by-side.
>
> --
> Allen Huffman - PO Box 7634 - Urbandale IA 50323 - 515-999-0227 (vmail/TXT only)
> http://www.subethasoftware.com - https://www.facebook.com/subethasoftware
> Sent from my MacBook.
>
> P.S. Since 4/15/2014, I have earned over $4050! Sign up using my link and I get credit:
> http://swagbucks.com/refer/allenhuffman (Ask me for the tip/howto doc.)
>
>
>
> --
> Coco mailing list
> Coco at maltedmedia.com<mailto:Coco at maltedmedia.com>
> https://pairlist5.pair.net/mailman/listinfo/coco
>
>



More information about the Coco mailing list