[Coco] DS1216 -- issue with "Setclk"

K. Pruitt pruittk at roadrunner.com
Tue Sep 22 16:29:39 EDT 2015


----- Original Message ----- 
From: "Bill Pierce via Coco" <coco at maltedmedia.com>
To: <coco at maltedmedia.com>
Cc: "Bill Pierce" <ooogalapasooo at aol.com>
Sent: Tuesday, September 22, 2015 12:03 PM
Subject: Re: [Coco] DS1216 -- issue with "Setclk"


>
> George, I think that once you are able to set up a new system with NitrOS9 
> 3.3.0 and DW4, you will find your clock issues have disappeared. With DW4, 
> the system clock is set about once every 20-30 seconds (not sure of the 
> refresh rate) based on the DW4 server's PC host's clock and is also 
> refreshable by the user at any given time. This is done in the system 
> interrupt cycles and therefore should not be affected by software priority 
> settings as software priorities do not outweigh system priorites in the 
> que.
>
> I use this clock in my Coco 1, 2, & 3 as well as all the emulators and the 
> ONLY time it loses time is "possibly" during disk operations in which it 
> recovers within a few seconds on the next clock refresh.
> This refresh is a DW4 feature as DW4 sends the time on a regular basis and 
> NitrOS9 in receiving the time signal, refreshes the system clock.
>
> From the time I boot my system, my Coco (or emulators) show the time 
> accurate to the second (compared to my PC, which is updated automatically 
> from the net nightly)
>
> I too suffered time issues with the old OS9 software clock, but to be 
> honest, since I've started using NitrOS9 and DW4 (about 5 years now), I 
> haven't even given thought to the time as it's always right.
>
> As for interfacing this in Basic09, there is a direct DW4 command that 
> will pull the time from the DW4 server (not the Coco clock, hmmm sounds 
> too much like "cookoo clock") and will automatically update the system 
> time when called as well. The time variable will be returned to your 
> software (Basic09 program) in ASCII format and is as usable as any other 
> "time utility". In fact, I could write you a Basic09 procedure to do this 
> and return the time in a variable... it will be as acurate as your PC's 
> time.... because it IS your PC's time :-)
>
> I use this feature in my latest version of MShell which displays an 
> onscreen clock in the corner of the menu. This clock refreshes in seconds. 
> MShell not only accesses the OS9 drives but also reads the PC server's 
> drives as well as RSDOS formated disks/drives so it spends a lot of time 
> with interrupts blocked as well as running things with "high priorities". 
> At any time I glance at this clock, it is always on time, though it does 
> "freeze" during a disk I/O, but refreshes immediately afterwards on the 
> next second. The display routine itself calls the DW4 clock refresh and 
> each time it's printed on the screen, it comes straight from the PC.
>
> But, as I said... this is NitrOS9 v3.3.0 and DW4. This is not your vanilla 
> OS9. If I had to go back to vanilla OS9 at this point, I would probably 
> quit using it as I have now based most of what I do around DW4 and the new 
> features of NitrOS9. Once you change over to NitrOS9, you'll never look 
> back.... except to wonder why you hadn't done this sooner :-)
>
> Just my 25c ( I didn't have change for a quarter :-)
>
>
>
>
> Bill Pierce
> "Charlie stole the handle, and the train it won't stop going, no way to 
> slow down!" - Ian Anderson - Jethro Tull
>
>
>
> My Music from the Tandy/Radio Shack Color Computer 2 & 3
> https://sites.google.com/site/dabarnstudio/
> Co-Contributor, Co-Editor for CocoPedia
> http://www.cocopedia.com/wiki/index.php/Main_Page
> Global Moderator for TRS-80/Tandy Color Computer Forums
> http://www.tandycoco.com/forum/
>
> E-Mail: ooogalapasooo at aol.com
>

Great post Bill.

"As for interfacing this in Basic09, there is a direct DW4 command that will 
pull the time from the DW4 server "

Lol! Of course there is. It seems like there is always a DW4 command just 
sitting there waiting to be used to do whatever you need it to do if you 
know how to use it. I had no idea of this capability.Something new to play 
with.  Hoorah!

I too think that this will not be an issue once George moves over to 
NitrOS-9 and if it is a problem still, there are a lot more ways to fix it 
than there are with stock OS-9. But he isn't just asking to keep accurate 
time, he wants to reset his clock chip with the updated and accurate time 
data.

And a shout out to George here, George, I totally get your problem. That 
setclk needs to accept the time information from a parameter rather than 
just input via the keyboard.

Both Bill and Robert have given very real useable solutions here. As Bill 
has written, you can grab that updated time info from DW4 and feed it to 
your program. And Robert has pointed out that the alternate clock driver may 
allow you to access the clock without going through specialized software to 
do it. The answers are here and they are all rooted in NitrOS-9.



More information about the Coco mailing list