Re: 9V AC needed for C64?

From: Stephen Judd (judd_at_merle.acns.nwu.edu)
Date: 1998-09-03 22:50:07

Hola Cameron,

> >Let's see now... the interrupt timer uses a latch value of 17045.  This 
> >means an interrupt takes place every
> >
> >	17046 cycles * 14/14318181 sec/cycle = 0.0166672 seconds
>         ^^^^^ ?
> 
> Just a typo?

No; the timers count down to zero.

> >So, TI seems to stay pretty accurate (I always had it in my head that
> >it wasn't).
> 
> TI$ is really easy to use, also. The TOD's latching makes things a little
> tricky -- and Jim Butterfield has mentioned how perverse setting it can be.
> I'm lazy, on top of all that.

Well, there's nothing very challenging about TOD.  To set it, you set the
time/alarm bit and write to the registers.  When both reading and
setting, a read/write to the hours byte stops the registers from updating
until the tenths byte is read/written, so that e.g. you don't read a
time of 08:00 at time 08:59:59.9 (I wonder if the TI$ code does an SEI).

In addition to not really caring about vectors and such, TOD can generate 
an interrupt, and the BCD format makes time conversion really easy.  

I should say that I've never found TOD terrbily useful, but then again
I've never found TI to be terribly useful.  TI is convenient in BASIC, 
but in ML it's just three wasted zero page variables.

I just checked the TI code -- it (specifically, RDTIM) does indeed SEI.

-Steve
-
This message was sent through the cbm-hackers mailing list.
To unsubscribe: echo unsubscribe | mail cbm-hackers-request@dot.tcm.hut.fi.

Archive generated by hypermail 2.1.1.