[Coco] Disto 4-in-1 clock2 with CocoSDC
Bob Devries
devries.bob at gmail.com
Tue Jan 20 20:54:04 EST 2015
Hi Robert,
I have had a look at the source of clock2_disto4.asm and found that it
is indeed set up to be slot-ready, but it needs to have MPIFlag set to
the slot number (1-4). Now I'm left wondering where this is set? I have
the idea that it should be in one of the rules.mak? Would that be correct?
Regards, Bob Devries
Dalby, QLD, Australia
On 20/01/2015 2:01 PM, Robert Gault wrote:
> Bob Devries wrote:
>> Well, after installing a new battery in my Disto 4-in-1, I find that
>> the clock
>> is not being read correctly even though I installed the correct module
>> for
>> clock2 from the repo. I have my Disto SCII in a MPI slot 4 and the
>> CocoSDC in
>> slot 3. NitrOS9 is booting from the CocoSDC.
>>
>> I communicated this to Darren, and he tells me that the H/W clock
>> cannot be read
>> until the CocoSDC is finished with its initialisation.
>>
>> As far as I remember, the clock module(s) are started by the INIT
>> module. It
>> seems that any clock hardware module needs to be MPI aware, and find
>> the current
>> slot number from somewhere (in memory?), and switch to its own slot
>> when it is
>> needed.
>>
>> Question is:
>> 1. when is the (hardware) time of day clock first accessed, and
>> 2. can the MPI slot be "stolen" at that point?
>>
>> Just a few thoughts....
>>
>> Regards, Bob Devries
>> Dalby, QLD, Australia
>>
>
> As long as your clock2 routine turns off interrupts, it can search the
> MPI at any time for a hardware clock. $FF7F is readable and the data can
> be saved. Then you can try all slots looking for an RTC, save that data
> so no further search is required, and swap MPI slots as needed to read
> the RTC.
>
> Any initialization routine by rights should kill interrupts until
> finished, so there ought not to be a conflict between the SDC and an RTC.
>
> Robert
>
>
>
More information about the Coco
mailing list