Log in

View Full Version : TimeFix, softice time tool


GodsJiva
January 22nd, 2002, 12:33
Bah humbug, found an extra instruction lying around for no particular reason :-P Caused a minor problem w/the cancel button. Here's the new version... (including source)


***

A useful little tool I've coded... not sure if there's others that do the same thing or not, but hey...

It resets the windows time after a softice session.

There may well be bugs, pls report any you may find.

Enjoy!
(Feel free to distribute it)

Kayaker
January 22nd, 2002, 21:41
Hiya,

Cheers Godsjiva on your little 2am app. Heh, it seems the late night coding sessions are always the most interesting I had started looking into that annoying Softice problem of losing the system time some time ago ("Have I really been in SI for 3 hours?!!", and played with reading the CMOS Real Time Clock (battery backed up) with the IN/OUT commands (Win9x only) using ports 70/71.

Scammed the idea from somewhere or other, but I never did finish it up by adjusting the system clock with the correct time. I'll up it here if anyone wants to have a look at it. Besides showing how to read the CMOS Ram, which of course can be used for more than reading the RTC, it shows how to convert the results, which are in a binary coded decimal (BCD) format, into an integer value using the AAD command.

The app simply reads the month, day, hour, minutes and seconds individually from the RTC on clicking a button and outputs the converted values to edit boxes. I think you could use the values to fill a SYSTEMTIME structure and use SetSystemTime to adjust the system clock (not too sure about the UTC time format of that structure though vs the results returned from the RTC). Godsjiva's app is a lot more elegant to be sure, but I'd be interested if anyone gets the system clock updated from the RTC data.

I haven't had a chance to study your code Godsjiva, but your use of the floating point commands looks interesting. Thanks for sharing.

Regards,
Kayaker

ThrawN
January 22nd, 2002, 22:34
I think its just a motherboard issue. My time never gets screwed by sice because the mobo seems to restore it all the time. But the mobo i had b4 this didnt