Theo Markettos <[EMAIL PROTECTED]> wrote:
[snip]
> > So RPCemu should - if it detects a "restart from hibernate" (don't even
> > know if this is easily possible...) - probably sync the PC clock with
> > the RISC OS clock again. Then, everything should work fine.
>
> In RISC OS there's the RTCAdjust module which will try to keep the
> soft-copy in line with the hardware copy. The reason is to ensure
> applications aren't confused. Imagine if you discover the hardware clock
> is running a minute behind the soft clock - for apps time would either go
> backwards or stand still. RTCAdjust smooths the transition so time is
> still increasing but at a slower rate.
>
> FWIW the same problem happens on Virtual Risc PC. What might be easier
> than trying to detect a 'restart from hibernate' (which is different for
> every platform) is to periodically write the correct system time values
> into the emulated CMOS 'registers' ready for RTCAdjust to pick up. If you
> repeat this on the basis of 'if over a minute of real time has elapsed
> since the previous time we did it' then it should pick up hibernation
> periods longer than a minute, and also correct any drift due to RPCEmu's
> emulated IOMD Timer 0 being slightly out.
VRPC uses the SyncClock module to keep itself in step with the Windows
clock, which it does every five seconds.
*help SyncClock
==> Help on keyword SyncClock
*SyncClock regularly synchronises the soft copy of the clock with the CMOS
real time clock. The parameter controls the interval in seconds, zero to
disable.
The module makes calls to SWI "IIC_Control". On a real RISC OS machine such
calls are the the hardware clock. I would think an emulator would need to do
some emulating to redirect IIC calls to Windows, or Linux.
!Sick on RPCemu seems to think it has found a clock, but does it mean it :-
Real time clock: Philips PCF8583
I²C address: &A0
Reference clock: 32.768 kHz (configured)
At the end of its report !Sick comes up with this little gem, "The real time
clock of this machine probably is grossly inaccurate."
--
David Pitt
_______________________________________________
Rpcemu mailing list
[email protected]
http://www.riscos.info/cgi-bin/mailman/listinfo/rpcemu