· · AMIGA YEAR 2000 READINESS


NOTICE:

Amiga designates this year 2000 statement as a Year 2000 Disclosure under the Year 2000 Information and Readiness Disclosure Act of 1998, a U.S. statute enacted on October 19, 1998 (the "Act"). Information contained in Amiga's past and present year 2000 letters regarding products and services offered by Amiga and its subsidiaries are "Year 2000 Readiness Disclosures" under the Act. Information in our year 2000 letters regarding non-Amiga products and services are "Republications" under the Act based on information supplied by other companies about the products and services they offer. Amiga has not independently verified the contents of these Republications and takes no responsibility for the accuracy or completeness of information contained in such Republications.


The "Year 2000 Problem" and the Amiga

To make a long story short, the Amiga in general does not suffer from a "Year 2000 Problem" as is commonly referred to in the PC world. Still, the Amiga faces three distinct date problems and a single, specific Year 2000 problem with limited scope. This document shows you how to find out if your Amiga might have a "Year 2000 Problem" and then goes into detail, explaining the technical aspects of the issues and how they may be addressed.

(This is a revised version of the September 20, 1998 document).

1. How to tell if an Amiga is Year 2000 compliant?

The Amiga runs under control of an operating system called AmigaOS which, depending on the operating system version, is either fully Year 2000 compliant or may have a problem in the year 2000 (or later). To tell which operating system an Amiga is running you can perform a simple test.

For this test, hold down both the leftmost and the rightmost mouse buttons before you switch on the computer and keep holding down both buttons until a picture appears on your monitor.

The picture to appear should look like one of the three illustrations shown below. Please see the description for each illustration to find out what the pictures mean.

The Amiga 3000 Kickstart Menu

Figure 1: The Amiga 3000 Kickstart Menu

This is a picture of the Amiga 3000 computer prompting you to choose the operating system to use. Two main choices are possible: you can either use the older Kickstart version 1.3 or the newer version 2.x. On this machine, either choice will pick an operating system version that is Year 2000 compliant (the Amiga 3000 is not vulnerable to the SetClock problem described here since it uses a special version of that utility). If a picture like this appears, it means that your Amiga is Year 2000 compliant.

Please note that the picture on your screen need not be completely identical to Figure 1.

The AmigaOS 2.0/2.1 Boot Menu

Figure 2: The AmigaOS 2.0/2.1 Boot Menu

This picture shows an Amiga prompting you to choose the device to bootstrap from. If a picture like this appears, it means that your Amiga is Year 2000 compliant.

Please note that the picture on your screen need not be completely identical to Figure 2.

The AmigaOS 3.0/3.1 Boot Menu

Figure 3: The AmigaOS 3.0/3.1 Boot Menu

This picture shows an Amiga prompting you to choose an early startup option to change. If a picture like this appears, it means that your Amiga is Year 2000 compliant.

Please note that the picture on your screen need not be completely identical to Figure 3.

If the picture to appear does not look like any of the three illustrations shown above, then your Amiga is probably not entirely Year 2000 compliant. To find out how to address the problems, see section 5 of this document.

1.1 Is the software written for the Amiga Year 2000 compliant?

Software written for the Amiga computer is not automatically Year 2000 compliant. While the Amiga operating system provides time and date keeping services which are Year 2000 compliant, it was always left to the individual software developers to use them properly. Amiga neither supports nor maintains third-party application software.

2. Scope of this document

This text refers to Amiga computers built between 1985 and 1997. It covers only computer hardware configurations designed and built by Commodore-Amiga, Inc. and its successors, and official Amiga emulation environments such as "Amiga Forever" by Cloanto. This specifically excludes third-party hardware extensions, such as the Microbotics "StarBoard" which among other features offered a battery backed up clock.

It should be noted that, as far as the Amiga operating system and application software is concerned, this document only covers the features and/or shortcomings of the software as designed and implemented by Commodore-Amiga, Inc. Third-party application software designed to run under the control of the Amiga operating system may not show the same behavior as the operating system itself. It may show bugs which AmigaOS does not exhibit, and the other way around.

3. How the Amiga handles date and time

The Amiga operating system has always followed the Unix model in measuring time as the number of seconds that have elapsed since a fixed point of time. Under AmigaOS that fixed point of time (also known as "epoch") is 00:00:00 of January 1, 1978 (Unix uses 00:00:00 of January 1, 1970, UTC). The operating system manages time and date through a module known as timer.device. This module reads and stores date and time information using a data structure known as timeval which, in "C" language notation, is shown below:

   struct timeval
   {
      ULONG tv_secs;
      ULONG tv_micro;
   };

In this context, an ULONG refers to an unsigned 32 bit quantity. The tv_secs structure member holds the number of seconds that have elapsed since the AmigaOS epoch. The tv_micro member denotes the number of microseconds (the 10-6th part of a second) that have elapsed since the last second has passed.

3.1 The AmigaDOS date and time handling is special

"AmigaDOS" and "AmigaOS" are not two names for the same thing. AmigaDOS is (in a nutshell) the name of the AmigaOS layer which implements file systems and their actions, the command-line interpreter, and the means to load and relocate executable binary files. AmigaDOS is more or less a port of the Cambridge University/MetaComCo TRIPOS 32 bit kernel. It has its own peculiar data structures, including its own version of the timeval structure described above. The AmigaDOS variant is known as DateStamp, as shown below:

   struct DateStamp
   {
      LONG ds_Days;
      LONG ds_Minute;
      LONG ds_Tick;
   };

In this context, a LONG refers to a signed 32 bit quantity. The ds_Days member contains the number of days (each day consists of exactly 24 hours) that have passed since the AmigaOS epoch. The ds_Minute member denotes the number of minutes that have passed since midnight (00:00:00) of the given day. The ds_Tick member contains the number of "ticks" that have passed since the last minute. A minute consist of 3,000 "ticks", i.e. there are exactly 50 ticks in a second.

The term "tick" is often confused with the "tick" signals which the Amiga hardware can generate either through the power supply or the custom chip set. The frequency at which the hardware generates "tick" signals is controlled by the power supply frequency (50 Hz or 60 Hz) or the jumper settings on the main board (PAL = 50 Hz, NTSC = 60 Hz). There is no relation between the hardware "tick" signals and the "tick" quantities used in the context of the DateStamp data structure. For the DateStamp ds_Tick member, there are always 50 ticks in a second, regardless of the power supply frequency or the main board jumper settings.

AmigaDOS uses DateStamps to describe file and volume creation dates. All shell commands follow the same model, i.e. if the system date is set through the shell Date command, it will calculate time and date in DateStamp format.

3.2 Local time vs UTC

The Amiga operating system never knew the concept of local and global time. While the AmigaOS 2.1 update (1992) introduced a Locale Preferences editor that allowed for the time zone to be selected, the operating system itself never put this feature to use or encouraged application software developers to use it. One might argue that with this background, the AmigaOS was always tuned to local time.

3.3 How the Amiga maintains its system time

The early Amiga computer models did not support a battery backed up real time clock that would keep ticking and maintaining local time even until after the machine was switched off. For example, the first Amiga computer ever (later christened the Amiga 1000) did not offer a battery backed up clock. For the Amiga 500 the battery backed up clock was an extra hardware feature one could buy separately with a memory expansion.

Amiga computer models without battery backed up clock hardware include:

Amiga computer models with battery backed up clock hardware include:

On machines without battery backed up clock hardware, the Amiga sets its system time according to the modification date of the boot volume. In other words, the point of time the last file was modified or created on a disk would determine the system time. As this was by no means accurate, the AmigaOS boot process would suggest and prompt you to adjust the system date once the system had booted (as pictured below).

The Shell window prompting you to adjust the date

Figure 4: The Shell window prompting you to adjust the date

On machines equipped with battery backed up clock hardware the system time was read during the boot process. As of AmigaOS versions 1.2 and 1.3 a special program, called SetClock, was responsible for reading the current clock settings and setting the system time accordingly. Starting with AmigaOS version 2.0 that functionality was integrated into the ROM operating system, making the SetClock utility at least in part redundant.

If the system starts up without being able to set its system time, it defaults to January 1, 1978, 00:00:00.

4. Setting and reading the time

The Amiga offers both a command-line interface and a graphical user interface. Both went through a number of changes over the years as described below.

4.1 The command-line shell

There are two shell commands which deal with the system date, these being SetClock and Date. The Date command is for reading and setting the current system date whereas the SetClock command deals with the battery backed up clock: it reads and stores the current system time from/in it. The Date command is of particular interest due to the human readable date format it uses by default. Today you might invoke the Date command and receive the following output:

   19-Sep-98

As one can see the year number is limited to two digits only. Even if a different locale is used (e.g. French), the year will always be displayed with its two last decimals only. Luckily, this numbering is consistent with the following rule:

To set the system time to any year beyond 1999, you reverse the rule, i.e. entering date 01-jan-01 will set the time to January 1, 2001.

All versions of the AmigaDOS Date command (version 1.1 through version 37.1) display and parse the data format in the same fashion. They behave consistently and predictably throughout all Amiga operating system revisions. The same holds true for the other two shell commands that deal with dates, namely SetDate and List (the List command can list files and drawers created/modified since a specific date).

4.2 The graphical user interface

The system time is set through the Preferences editor, which in AmigaOS versions 1.0 to 1.3 used to be a single, monolithic program as pictured below:

The AmigaOS 1.1 Preferences editor

Figure 5: The AmigaOS 1.1 Preferences editor

The controls for setting the system time are located in the top left corner of the window. They allow for the last two digits of the year to be adjusted. The values mirror those in the AmigaDOS Date command in that a year number less than 78 denotes a year in the range 2000 to 2077 and all other settings refer to a year in the range 1978 to 1999.

With the introduction of AmigaOS 2.0, the Time Preferences editor was moved into a single program named Time, as pictured below:

The AmigaOS 2.0 Time Preferences editor

Figure 6: The AmigaOS 2.0 Time Preferences editor

In this editor, the year can be entered as a four digit number. However, the range is limited to the years 1978 to 2113.

When the AmigaOS 2.1 update was released, the Time Preferences editor was revised, as can be seen below:

The AmigaOS 2.1 Time Preferences editor

Figure 7: The AmigaOS 2.1 Time Preferences editor

Just like with the previous version of the Time Preferences editor, the year can be entered as a four digit number. In this case, the range is limited to the years 1991 to 2099.

5. The problems

As far as is known, the Amiga faces four date problems. Two are design problems caused by numeric overflow, one is caused by hardware limitations and one is a real bug that strikes in the year 2000.

5.1 Original 1.2 and 1.3 SetClock stops working in the year 2000

The AmigaOS Workbench disk revisions 1.2 and 1.3 would ship with a program by the name of SetClock which was responsible for reading the battery backed up clock time upon system startup. The SetClock program suffers from a bug which causes it to miscalculate the battery backed up clock time starting with the year 2000. It is accurate only for the years 1978 to 1999. Once the year counter rolls over to 00, SetClock will believe that the year is 1978 until the year 2079 is reached; that's when it will believe that the year is 1979, which is not necessarily an improvement.

Please note that only the SetClock program found on the AmigaOS 1.2 and 1.3 Workbench disks suffers from this problem. Several versions of this program were distributed, each between 4,000 and 7,000 bytes in size. To tell whether you have a version that works or not, check the file size; if it is less than 1,000 bytes in size you probably have the properly working version (and not one of the older versions). If it is larger than 4,000 bytes, you probably have the faulty version. Size isn't everything, though. Some third-party hardware extensions would use their own versions of the SetClock program. They went by the same name, but read the system time from a different hardware location. Do not replace these custom versions. You are probably using such a custom version if your real time clock is hooked up to a mouse port or the keyboard connector.

A fix for this problem is provided in this archive. Download it and unpack it, then read the enclosed SetClock_ReadMe file!

5.2 Negative time

As was outlined above, the Amiga measures time in seconds. As it turns out, the number of seconds to accumulate until January 19, 2046, 03:14:07 will form the largest value a signed 32 bit integer number can hold. This is not a problem for the time keeping module (timer.device). However, application software and other operating system components which treat the number of seconds as a signed quantity will get into trouble one second later: the number of seconds will rise to 2,147,483,648 which in two's complement format represents the negative number -2,147,483,648. AmigaDOS, which always treats time as a signed quantity, will consider this date to be invalid because it is "negative". Worse, the ROM date conversion routines exhibit a bug which, once the date is later than January 19, 2046, 03:14:07, causes all subsequent date operations to be inaccurate. The immediate effect this has is that calculations on dates can be off by more than two years.

This behavior is consistent through all AmigaOS versions. A fix is not available yet, but research is in progress to investigate whether this bug could be fixed by updating several AmigaOS modules (locale.library, dos.library). After all, this bug is "just" a side effect of treating an unsigned quantity as signed.

5.3 Time rolling over

An unsigned 32 bit integer can hold a maximum value of 4,294,967,295. When the Amiga has accumulated that many seconds, it will be February 7, 2114, 06:28:15. One second later the seconds counter will roll over and restart at 0. In other words, on February 7, 2114, 06:28:16 the Amiga will believe that it is midnight on January 1, 1978.

No fix for this problem is available yet.

5.4 The battery backed up clock can count only to 99

Amiga computers equipped with battery backed up real time clock hardware use one of two different hardware designs: either the Oki MSM6242RS (A500, A2000) or the Ricoh RP5C01 (A3000, A1200, A4000) chip. As is common with clock chips of that type, the year counter is implemented as a two-digit BCD number. Once it reaches the year 99, the counter will roll over and start again at 00.

Starting with Amiga operating system version 2.0, the boot process will read the battery backed up clock time and set the system time accordingly. This takes place every time the Amiga is reset. Because the year number covers only two digits, the same algorithm as used by the AmigaDOS Date command is employed. Consequently, the Amiga system date set at system startup time will always be in the range 1978 to 2077. While the system clock will keep ticking beyond December 31, 2077 a system reset will set the clock back to January 1, 1978.

No fix for this problem is available yet.

6. Other hazards

The following section covers topics which are related to time keeping, but not quite in the same context as was discussed in the previous sections.

6.1 In a version tag a year only has two digits

The AmigaDOS Version command (which was introduced in AmigaOS 2.0) can extract the version and revision numbers and the creation time of any file which includes a string like this:

   $VER: version 40.1 (9.2.93)

A string like this is called a "version tag". The date, as it appears in brackets, consist of a day, a month and a year number (exactly in that order), none of which may contain more than two digits. This was not such a big problem with versions 37 and 38 of the Version command, which extracted the string and printed it verbatim. However, starting with version 39 of the Version command, the date extracted was converted and printed using the default locale. The conversion process involved has a major flaw in that it always takes the year number, adds 1900 and prints the date. This is not consistent with how the Date command treats year numbers beyond 99. In fact, in order to print properly, the year 2000 would have to show up as the year 100 in a version tag (which is guaranteed to cause some confusion).

The problem described above exists only in version 39.1 and 40.1 of the Version command. To find out which version of this command you have, open a Shell window and enter the following command:

   version c:version full

A fix for the date parsing problem in the Version program is provided in this archive. Download it and unpack it, then read the enclosed Version_ReadMe file!

6.2 Leaking clock batteries

A battery provides the necessary power to keep the battery backed up clock hardware ticking while the Amiga computer is switched off. As time passes and the clock hardware keeps ticking, the batteries age: some must be more than ten years old by now. Old batteries can leak acid, causing great damage to the Amiga motherboard hardware. Often such leakages go unnoticed until critical parts of the Amiga hardware begin to fail. Of course, once you notice it, it is probably already too late...

It has been recommended to replace the clock batteries on every Amiga main board that is more than three years old. The batteries are small, barrel-shaped objects about 18 mm long and 15 mm in diameter. They look as if they were being held between two clamps (they are not; the batteries are soldered) and have a blue or red plastic covering. The covering is often labeled with the name of the manufacturer (e.g. GP or Varta) and the battery properties (3.6 V, 60 mAh). Also, the anode ("plus pole") should be marked clearly.

Where is that battery? Try looking for it: the battery may look like a capacitor on first glance, but it is unique in that it appears to be held between clamps. It is larger than any capacitor on the main board and the labeling should be unique. Here are some hints on finding the battery:

You should really start worrying if corrosive salts are covering the metal casing of the battery: it should be replaced as soon as possible. Do not attempt to replace the battery on your own. You should consult a specialist, such as your nearest Amiga technical support centre.


Original article by Olaf Barthel • Copyright © 1998-2000 AMIGA