A Newton device with Newton OS 2.0 or greater.
About 5K free on your internal store.
Fix2010 allows your Newton's clock to be set past 2010, and allows it to roll over past 2010 without incident.
Are you crazy?
This is ALPHA-quality software. It has undergone almost no testing. It has not proved itself. It will not become useful for another 12 years. I wouldn't recommend installing it. Period.
Still want to install it? Back up your Newton. Totally. More than once. Do not install this on mission-critical machines. Really.
Ensure that packages are installed on the internal store. Use the Newton Connection Utilities program that came with your Newton device to download the included package.
Use your Newton as usual. Fix2010 should be transparent.
The minute timer of the clock doesn't work after 2010. This is due to some stupidity in its programming; I may patch it in a later version of Fix2010.
Around 2100, things get funky due to the fact that 2100 is not a leap year, yet some pieces of the Newton OS think it is. I may or may not get to fixing this.
The Newton time system is dead after 2920. You probably will be too.
The main guts of this patch is obviously the patch to Time
. Let me explain to you what I'm doing, and you'll understand better.
The real-time clock that runs the Newton runs from 1993 through 2010. This is due to the fact that NewtonScript integers are 30 bits, and signed. 229 seconds after 1993 is 2010--the end of the Seconds world. The time system, however, is based on minutes from 1904. That won't run out until 2920. Then we'll really be screwed.
That means that the clock has a 17-year life. After that, the clock will have to be made to repeat some Seconds values. I've defined a term called a hexade. A hexade is a block of 16 years. Hexade 0 is from 1993 (1/1/93, 12AM) to 2009 (1/1/09, 12AM). Hexade 1 is the 16-year block after 2009, and so on. I suppose we could deal with the negative hexades too, but I really don't care, and I don't think anyone else does either.
The function Time
is patched out to read the current hexade (GetUserConfig('hexade)
--don't touch that value!), read the RTC, bring the time into the current hexade, and return it. Remember, the RTC thinks we're in hexade 0.
The function TimeInSeconds
is not patched out. I felt this was best for compatibility. This means two things: first, the Seconds timebase is no longer 1993; it is the first year of the current hexade. Secondly, you'd better not rely on Seconds values being consistent.
Here is a list of functions, and some notes on how they're changed by the installation of Fix2010. (Not all of them are patched; but some rely on patched routines.)
AddAlarm
AddAlarm
works fine.
AddAlarmInSeconds
DateFromSeconds
GetAlarm
hexade
slot, holding the hexade of the alarm. I know that it's not really necessary, since it can be computed from the time
and timeInSeconds
slots, but I'm lazy.
SetTime
SetTimeInSeconds
, below, for more details.
SetTimeInSeconds
SetTime
, checks the hexade of the new date. If it is different, then it changes to the new hexade, and walks and adjusts the system alarm soup before setting the RTC.
Time
TimeInSeconds
TimeInSecondsToTime
TimeToTimeInSeconds
TotalSeconds
TotalSeconds(0)
is not necessarily 1993.
Version 1.0a1 (28 September 1998)
Initial release for sick, demented alpha-version chasers
This is going to very much less pretty than anything I've ever written before:
Fix2010 is supplied to you AS-IS. Avi Drissman cannot be held responsible and disclaims any resposibility for any damage caused to any Newton device by Fix2010. That's why you should back up.
Fix2010 is highly experimental. Play with it as you would play with high-voltage power lines--be careful, be alert, don't do anything stupid, let Avi know if something happens, and keep children away.