[Coco] Superide real-time clock

Gene Heskett gheskett at shentel.net
Sat Nov 18 13:09:43 EST 2017


On Saturday 18 November 2017 11:01:43 rietveld rietveld wrote:

> Hi.
> Just setup my Superide to boot to sidekick on startup
> I noticed that the controller also has a real-time clock.   Is there
> any place to find documentation about how to use it?   Can it be used
> with RSDOS? Or just nitros09?
>
>
I didn't think rsdos even tracked the time.  Someone may have written one 
though and I'm not aware of it.

> Thanks
>
The clock module in nitros9 has been split out, many years ago now, to a 
universal "clock", and a hardware specific "clock2" module. Check your 
hardware docs to see what clock chip the superide has, and change your 
clock2 module out for the module that expects to see that clock chip. It 
should Just Work(TM) but you will probably want to change the setime 
command out of the startup in favor of a date -t, as it takes one of 
those two commands to actually start the multitasking.

I think, if using drivewire, that there is a module for that which gets 
the time from the parent PC. If the parent PC is running an ntp client, 
your coco's time will be well within a second of the master clock in 
Boulder Co. But it will drift after that, so I'd setup a cron job to 
refresh it hourly for as long as the coco and PC are powered up.
If you use a data module as the crontab file, it will be done silently, 
no disk access to read it needed if using my cron. There are others 
but...

If accessing the internet via drivewire from the coco, a time error on 
the coco can make your net access a bit wobbly. This could be one of the 
problems with IIRC, the B&B RTC (or the disto 4n1, I've forgotten which 
as the years have marched by and I went thru both in that order), as the 
original driver accessed the clock chip wrong, stopping the clock chip 
while it was being read so it lost time but only when booted up. I fixed 
that by freezing the buffer w/o stopping the actual clock in that clock 
module but no idea if the fix ever propagated to nitros9 as that was 
back up the log a good 25+ years. If it did make it out to the net, I'd 
hope that the comments in the source code have survived. Reading them 
might be enlightening.

> Sent from my BlackBerry Passport Red Edition.


Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <http://geneslinuxbox.net:6309/gene>


More information about the Coco mailing list