[hatari-devel] IKBD clock year
Vincent Rivière
vincent.riviere at freesbee.fr
Tue Apr 19 01:25:27 CEST 2011
Hello.
The IKBD read date command is supposed to retrieve the current date and
time in packed BCD format. In Hatari, the year 2011 is returned as 0xb1,
which is obviously illegal (B is not a decimal digit).
Fortunately (or not), EmuTOS converts 0xb1 as 11*10+1 = 111 and adds
1900 which finally gives 2011.
As a comparison, Steem returns 0x11 for 2011 (it actually returns bogus
year values after 16h00 but this is another bug).
EmuTOS had a bug and did not handle years from 00 to 79 correctly. I
have just fixed it in CVS, so they are now respectively handled as 2000
to 2079. The range 80 to 99 is still handled as 1980 to 1999.
So my question is:
Does Hatari return 0xb1 intentionally, or is this a bug ?
Does it behave well with TOS ?
Anyway, regarding to EmuTOS, now you can return either 0xb1 or 0x11,
both work as expected.
--
Vincent Rivière
More information about the hatari-devel
mailing list