|Re: [hatari-devel] Real time clock support|
[ Thread Index |
| More lists.tuxfamily.org/hatari-devel Archives
On 6 Apr 2016 at 20:43, Nicolas Pomarède wrote:
> Le 06/04/2016 19:39, Roger Burrows a écrit :
> > You'll need the RP5C15 datasheet. I can email a PDF if you like.
> it's ok, I found it on http://dev-docs.atariforge.org/.
> current implementation doesn't support write or alarm mode for example.
> If no one works on it, I will try to improve it, but it won't be before
> several weeks as I'm currently busy with video emulation.
There is absolutely no rush, as this is a very minor issue, and doesn't affect
EmuTOS directly. I only noticed it because I wanted to rewrite part of EmuTOS,
so I wrote a test program to make sure that everything worked as expected
before and after my changes - and it didn't.
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..
Thanks for all your help,