Re: SX-clocks (another one)

From: silverdr_at_wfmh.org.pl
Date: Tue, 21 May 2013 13:06:43 +0200
Message-Id: <F8E0C472-07D4-405D-BB43-124F9C07C4E6@wfmh.org.pl>
On 2013-05-21, at 12:14, Michał Pleban wrote:

>> I hoped for half a second. I did some tests and half a second doesn't work reliably. There are (rare but still) cases where I can read "5" from TODTEN with both 50 and 60 Hz supplied. Therefore counting 50/60 rasters (1 second) gives so far always non overlapping results. But it's still twice the time I expected that is basically lost on waiting. I take nobody has any better ideas on how to detect the TOD supplied frequency?
> 
> How about doing the reverse? Wait until the tenths of second register
> changes, then count how many raster lines elapse until the next change
> of this register. So basically you would count the number of lines in
> 1/10 of the second. This will be more complicated of course because of
> the need to continually count raster lines (and handle blanking
> intervals) but will be much faster - at most 2/10 of the second.

Interesting.. Michau, I see I can always count on you having some "out of the box" ideas! I'll do some tests with this approach. I don't think I'd have to continuously count scanlines or take any care about vblank. I should be able to predict result on both PAL and NTSC systems and check whether it in fact lands where it should with a given freq. The only think that may affect this to a small degree are "badlines". It will still be longer in bytes but should be much more effective in terms of time wasted. I'll do the tests. Thanks!

-- 
SD!
       Message was sent through the cbm-hackers mailing list
Received on 2013-05-21 12:00:04

Archive generated by hypermail 2.2.0.