Re: SX-clocks (another one)

From: silverdr_at_wfmh.org.pl
Date: Fri, 3 May 2013 20:43:18 +0200
Message-Id: <307A6039-0B61-413C-8D0E-1D1E6920E531@wfmh.org.pl>
On 2013-05-03, at 20:00, Michał Pleban wrote:

>>  if(pal)
>>    wait_full_rasters(25);  // This can be done by simply polling the VIC
>>  else
>>    wait_full_rasters(30);
> 
> Why use polling when you have the raster interrupt? ;-)

Short answer: byte efficiency? ;-)

Longer one: Since it is going to be an augmented library routine, I want to keep it as small as possible and least "invasive". Setting up the IRQ and handler would (haven't counted) add some bytes when compared to simple polling with all IRQs disabled. Especially if I wanted to have the library routine be non-destructive for whatever is already set on the machine at given time. Yeah, I know I am not going to verify the state of IRQ flag ;-)

>> but if someone knows why this would not work (reliably) or knows a better method, I would be glad to hear!
> 
> I would use CIA counters instead of VIC frames, it will be faster.

You mean the TIMA/TIMB timers? Like counting the cycles with them? Hm.. might work too. It could be on one hand even better due to eliminating the dependency on VIC's presence, but I think it would require chaining both timers as 16 bits would not be enough to get reliable readout. I /think/ something around half of a second should be already reliable (TOD goes down to tens of second only). Chaining OTOH will add on bytes again /me thinks. And if there was something already set in the timers, that would destroy it or we add on bytes again.

-- 
SD!
       Message was sent through the cbm-hackers mailing list
Received on 2013-05-03 19:00:53

Archive generated by hypermail 2.2.0.