gopstein@soleil.UUCP (Rich Gopstein) (06/01/90)
In article <1094.266605B1@onebdos.UUCP>, Robb.Thomas@f1.n684.z89.onebdos.UUCP (Robb Thomas) writes: > You should try booting your machine off floppy under a 'generic' > version of MS-DOS. Next, run your clock utilities off the floppy, and POOF, > your clock problems should go away! > I am using generic MSDOS, and am running my clock utility seperately in autoexec.bat. The problem is that after the machine boots it has the correct time, but DOS time runs FASTER than real time. If I wait a few minutes, the DOS time is a few seconds ahead of wall-clock-time. I pulled out the schematics for the 6300 last night, and armed with my calculator, determined that the 6300's timer tick runs at 18.75 ticks/sec instead of 18.2 as in a standard PC. The easiest solution would be to slow the timer down to 18.2 tick/secs, but the timer is already running as slow as it can be set... The question is: How can I get generic DOS (4.0 in my case), to keep the correct time given the 18.75Hz clock rate? Rich -- Rich Gopstein gopstein@soleil.nj.semi.harris.com ..!rutgers!soleil!gopstein
kaufman@delta.eecs.nwu.edu (Michael L. Kaufman) (06/02/90)
In article <980@soleil.UUCP> gopstein@soleil.UUCP (Rich Gopstein) writes: > >The question is: How can I get generic DOS (4.0 in my case), to keep >the correct time given the 18.75Hz clock rate? > >Rich Gopstein > >gopstein@soleil.nj.semi.harris.com >..!rutgers!soleil!gopstein The easiest way to do this is to write a little tsr that sets the clock ahead a few seconds every minute. I did not work out just how many seconds you will need to set it ahead, but it is easy to figure it out. Michael Kaufman
mlord@bnr-rsc.UUCP (Mark Lord) (06/04/90)
In article <980@soleil.UUCP> gopstein@soleil.UUCP (Rich Gopstein) writes: > >I pulled out the schematics for the 6300 last night, and armed with my >calculator, determined that the 6300's timer tick runs at 18.75 ticks/sec >instead of 18.2 as in a standard PC. The easiest solution would be to >slow the timer down to 18.2 tick/secs, but the timer is already running >as slow as it can be set... > >The question is: How can I get generic DOS (4.0 in my case), to keep >the correct time given the 18.75Hz clock rate? Well.. looks like a good application for writing a custom TSR. You need some code to intercept the timer interrupts and cause every 34th one to be skipped. The more technically knowlegeable folks out there may correct me, but my understanding is that the DOS "clock" is maintained in software. Some internal "clock" variables get incremented on each timer interrupt, roughly 18 times per second (as you have found). Since this interrupt is occuring too often, you need to write code to intercept this, and NOT chain to other handlers on each 34th interrupt 18.75 / (18.75 - 18.20) = 34 (approx). To avoid problems with other software that might chain to this interrupt, it is probably best that this TSR be loaded LAST from the autoexec.bat file. On second thought, maybe it would HELP other software.. in which case load it first! Have fun. -- ______Mark S. Lord______________________ ______________________________ | ..uunet!bnrgate!carrsc!mlord | These are only MY opinions. | | or: bnr-rsc!mlord@bnrgate | I charge for official views. | |________________________________________|______________________________|
gopstein@soleil.UUCP (Rich Gopstein) (06/05/90)
Well, it appears that generic DOS uses the CLOCK device for setting and getting the current time. I installed a CLOCK device that talks to the 6300's internal clock to set and get the time, so it seems to be working now. THe only problem is that the internal clock ignores the seconds when being set. So, if you set the time at the start of a minute, everything works well. Thanks for the help. Rich Gopstein -- Rich Gopstein gopstein@soleil.nj.semi.harris.com ..!rutgers!soleil!gopstein
kaufman@delta.eecs.nwu.edu (Michael L. Kaufman) (06/06/90)
In article <3163@bnr-rsc.UUCP> mlord@bnr-rsc.UUCP (Mark Lord) writes: >... >You need some code to intercept the timer interrupts and cause every 34th >one to be skipped. This could be quite dangerous. You don't know what the timer tick is doing besides updating the clock. The system might (as one example) be using the tick to control the drives. Much safer is to update the clock, but don't do it every 34 ticks. Michael Kaufman