[Coco] CoCo's TIMER and 60hz

Arthur Flexser flexser at fiu.edu
Wed May 29 14:20:31 EDT 2019


One thing to be aware of in testing TIMER's accuracy under Basic is that
the break key check done between Basic statements occasionally causes
interrupt processing to be omitted.  The clock "misses a tick" sometimes
due to the fact that there are a couple of reads from $FF02 in Basic's
POLCAT keyboard scanning routine that clear the IRQ flag.  If one of them
occurs just at the right (wrong) time, the flag gets cleared before the
interrupt can be processed and TIMER doesn't get incremented.  You should
enter POKE&HADEB,&H39 before running your testing program to knock out the
break key check.  You'll see that it makes a significant difference.

I think different CoCo's can vary by a few tenths of a percent in the
timing rate.

Art

On Wed, May 29, 2019 at 12:33 PM Allen Huffman <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.
>
>


More information about the Coco mailing list