[uae] Re: YAM insists on renewing mail folder indexes ;((

  • From: Toni Wilen <twilen@xxxxxxxxxx>
  • To: uae@xxxxxxxxxxxxx
  • Date: Tue, 20 Jul 2004 10:53:16 +0300

Then I found out about the "syncronize_clock" option. I thought there was something that obsoletes timehack before. But when I looked in my .uaerc I found out that synchronize_clock was already set to yes. So it seems that UAE's own clock synchronization does not work currently.

This should fix the syncronize_clock (btw, this feature was quickly removed from WinUAE because of weird problems...)


--- c:\d\uae\cia.c      2004-06-29 16:31:18.000000000 +0300
+++ cia.c       2004-07-19 22:57:19.687500000 +0300
@@ -28,6 +28,7 @@
 #include "inputdevice.h"
 #include "zfile.h"
 #include "ar.h"
+#include "parallel.h"
 #ifdef CD32
 #include "akiko.h"
 #endif
@@ -82,7 +83,7 @@
 static int div10;
 static int kbstate, kback, ciaasdr_unread;
 #ifdef TOD_HACK
-static int tod_hack;
+static int tod_hack, tod_hack_delay;
 #endif

static uae_u8 serbits;
@@ -385,7 +386,8 @@
uae_u32 rate = currprefs.ntscmode ? 60 : 50;
gettimeofday (&tv, NULL);
tod_hack = (uae_u32)(((uae_u64)tv.tv_sec) * rate + tv.tv_usec / (1000000 / rate));
- tod_hack += ciaatod;
+ tod_hack -= ciaatod;
+ tod_hack_delay = 10 * 50;
}
#endif


@@ -395,6 +397,16 @@
if (currprefs.tod_hack && ciaatodon) {
struct timeval tv;
uae_u32 t, nt, rate = currprefs.ntscmode ? 60 : 50;
+
+ if (tod_hack_delay > 0) {
+ tod_hack_delay--;
+ if (tod_hack_delay == 0) {
+ tod_hack_reset ();
+ tod_hack_delay = 0;
+ write_log ("TOD_HACK re-initialized CIATOD=%06.6X\n", ciaatod);
+ }
+ }
+ if (tod_hack_delay == 0) {
gettimeofday (&tv, NULL);
t = (uae_u32)(((uae_u64)tv.tv_sec) * rate + tv.tv_usec / (1000000 / rate));
nt = t - tod_hack;
@@ -405,6 +417,7 @@
ciaa_checkalarm ();
return;
}
+ }
#endif
if (ciaatodon) {
ciaatod++;
@@ -694,12 +707,10 @@
ciaatod = (ciaatod & ~0xff) | val;
ciaatodon = 1;
ciaa_checkalarm ();
-#if 0
#ifdef TOD_HACK
if (currprefs.tod_hack)
tod_hack_reset ();
#endif
-#endif
}
break;
case 9:
@@ -918,6 +929,7 @@
div10 = 0;
ciaasdr_cnt = 0; ciaasdr = 0;
ciabsdr_cnt = 0; ciabsdr = 0;
+ ciaata_passed = ciaatb_passed = ciabta_passed = ciabtb_passed = 0;
}
CIA_calctimers ();
if (! ersatzkickfile)


Other related posts: