Re: [cc65] two little bugs

From: Ullrich von Bassewitz <uz1musoftware.de>
Date: 2009-09-24 18:44:07
On Mon, Aug 24, 2009 at 07:43:49PM +0200, Groepaz wrote:
> > A hardware-reset stops all of the timers in the CIA chip.  After that, the
> > Time-Of-Day clock will not run until you have written a time into it.
>
> hu? since when? the TOD happily goes on after a reset, try it.

Is this really true? I still do have the problem that the TOD needs a write to
the 1/10 sec register to start. So I've googled and found this:

  It should be noted that it is permissible to write to only the tenths
  register to "nudge" the clock into action, in which following a hardware
  reset, the clock will start at 1:00:00.0.

  (http://en.wikipedia.org/wiki/MOS_Technology_CIA)

which sounds as if it is really necessary to kick the TOD into action. Then I
tried

? PEEK(56328)

in BASIC (vice). 56328 is the 1/10 sec register of the TOD in CIA1. Above line
does always print "0" - until I do

POKE 56328,0

After that, I get values between 0 and 9 from the first line.

Maybe someone can try that on a real machine. Until proven wrong, I will now
assume that writing to the TOD is really necessary to get it running. This
means that a .constructor is necessary for all systime modules that read the
time from a CIA TOD clock.

Regards


        Uz


-- 
Ullrich von Bassewitz                                  uz@musoftware.de
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Thu Sep 24 18:46:35 2009

This archive was generated by hypermail 2.1.8 : 2009-09-24 18:46:38 CEST