Re: [hatari-devel] Real time clock support |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/hatari-devel Archives
]
Am Thu, 16 Jun 2016 20:31:23 +0200
schrieb Nicolas Pomarède <npomarede@xxxxxxxxxxxx>:
> Le 06/04/2016 à 22:31, Roger Burrows a écrit :
> >
> > BTW, the existing Hatari code handles bank1 mode for writing to the
> > alarm minutes register. In case you're wondering why, Atari TOS
> > 2.06 uses them as a test for whether the clock is alive. It writes
> > $0a to the 1-minute alarm register and $05 to the 10-minute alarm
> > register (using a movep.w), and then reads them back. If the
> > values don't match, the RTC is assumed to be dead. This isn't
> > documented in the datasheet. This additional check *might* get
> > added to EmuTOS at some point.
> >
> > A couple of other points that I came across: I don't think you need
> > to worry about implementing alarm mode, because the relevant pin is
> > not connected to anything. And the RP5C15 chip is used on both the
> > MegaST and the Mega STe.
>
> Hi
>
> regarding RTC clock in Mega ST(e), I see Hatari currently set unused
> bits to 1 when reading any of the register (for example, you write
> $0A, you read $FA). This is not a problem, because TOS mask unused
> bits, but was this tested on a real MegaST(e) ? I didn't see any doc
> about this.
I don't remember the reason for adding that code ... but there
certainly was a reason, since it was not in the very first version of
that file.
Anyway, it's likely the same as with many other registers on the ST -
the unused bits return either ones, or random data, I guess.
Thomas