Re: [hatari-devel] Hatari clock question |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/hatari-devel Archives
]
Hi,
On 19.8.2022 11.52, Uwe Seimet wrote:
Thank you, but this does not seem to work. With --rtc-year 1990 the TT
emulation (XCONTROL) still shows 2022 as the year.
Sorry, I had been testing with XControl just on one RTC machine,
MegaSTE, as I had assumed all of them to be similar.
However, when testing "--rtc-year 1998" on more machines, with EmuTOS
v1.1.1, I get following results...
* Bug #1) TT & Falcon machines show host time
* Bug #2) Machines with no RTC i.e. ST & STE, which were supposed to
initialize their clocks from host, show 2021-07-19, when host date is
2022-08-19, i.e. their month & year are both off by one. EmuTOS or
Hatari issue?
- When using TOS v2 instead of EmuTOS, date is 1991-11-14
* MegaST and MegaSTE: work OK both with EmuTOS and TOS v2
When looking into ioMem*.c files, what do I see?
RTC functions are "wired" only in ioMemTabST.c and ioMemTabSTE.c (and
those IO areas are voided if they are not Mega machines).
Neither ioMemTabTT.c, nor ioMemTabFalcon.c has have RTC functions wired,
although Hatari manual documents RTC being emulated for them!
Thomas / Nicolas?
When passing an illegal
value the error message refers to the wrong option, i.e --cpuclock instead
of --rtc-year:
Error while parsing argument "199" for option "--cpuclock":
Invalid RTC year
Fixed. Thanks for reporting!
- Eero
On 17.8.2022 19.58, Uwe Seimet wrote:
I was thinking about potential problems in the future, when the date (the
year in particular) value increases. I have already seen such problems on
old Macs, where some applications fail to process current year values.
I think best option to work around that would be to add "RTC year"
option (e.g. "--rtc-year 1990"). Hatari would then internally offset
year from gettimeofday() with suitable amount.
Yes, just dealing with the year should be sufficient.
What would be suitable minimum year accepted by such option, should it
be TOS version, or machine type specific, or would e.g. 1985 work as
minimum for everything?
1980 is the base year for the Settime() XBIOS call, so it should IMO be the
minimum for everything.
I pushed support for this.
- Eero