From telackey at lacklustremedia.com Thu Nov 8 22:08:07 2018 From: telackey at lacklustremedia.com (Thomas E. Lackey) Date: Fri, 9 Nov 2018 04:08:07 +0000 Subject: [netrek-dev] Pi3, Reality, and Distortion Message-ID: <7B7F0680CB055E4183BC55AAFC44B75D01E026FE69@iola.redbudcomputer.local> I just built master on my Pi3 on Raspbian, mostly without incident (had to add an include for sys/types.h to robot.h). However, everything moves at warp speed (pardon the pun). At first glance, I would have estimated the pace at about double. I adjusted REALITY in `etc/sysdef` (mistakenly called DISTORTION, which is what it is called elsewhere in the code) and found '8' to look about right (the default is '10'). I just built on this Pi this evening, so I haven't had a chance to dig into the code. My wild guess without looking would be that CPU freq scaling was messing with the tick rate or some such strangeness along those lines. Anyone with better knowledge of how "reality" is calculated have thoughts on what this might be? -- Thomas E Lackey diff --git a/robotd/robot.h b/robotd/robot.h index 4883e70..8aeecd0 100644 --- a/robotd/robot.h +++ b/robotd/robot.h @@ -1,3 +1,7 @@ +#ifndef __INCLUDED_robot_h__ +#define __INCLUDED_robot_h__ + +#include #define PASS "t" #define PASS2 "tover" @@ -433,3 +437,5 @@ extern int Xplhit; #define TR_DEFEND 7 #define TR_OGG 8 #define TR_TORP 9 + +#endif /* __INCLUDED_robot_h__ */ -------------- next part -------------- An HTML attachment was scrubbed... URL: From quozl at laptop.org Thu Nov 8 22:48:21 2018 From: quozl at laptop.org (James Cameron) Date: Fri, 9 Nov 2018 15:48:21 +1100 Subject: [netrek-dev] Pi3, Reality, and Distortion In-Reply-To: <7B7F0680CB055E4183BC55AAFC44B75D01E026FE69@iola.redbudcomputer.local> References: <7B7F0680CB055E4183BC55AAFC44B75D01E026FE69@iola.redbudcomputer.local> Message-ID: <20181109044821.GD31953@us.netrek.org> Thanks, pushed only the #include change. ntserv/alarm.c uses setitimer(2) syscall, so if you demonstrate it doesn't work, raise a bug against the libc or kernel you're using. Also check that your kernel was not busy synchronising to an NTP server, as that will change real time intervals. You might also try adding an RTC and see if that changes it. ;-) On Fri, Nov 09, 2018 at 04:08:07AM +0000, Thomas E. Lackey wrote: > I just built master on my Pi3 on Raspbian, mostly without incident (had to add > an include for sys/types.h to robot.h). > > However, everything moves at warp speed (pardon the pun). At first glance, I > would have estimated the pace at about double. > > I adjusted REALITY in `etc/sysdef` (mistakenly called DISTORTION, which is what > it is called elsewhere in the code) and found ?8? to look about right (the > default is ?10?). > > I just built on this Pi this evening, so I haven?t had a chance to dig into the > code. My wild guess without looking would be that CPU freq scaling was messing > with the tick rate or some such strangeness along those lines. > > Anyone with better knowledge of how ?reality? is calculated have thoughts on > what this might be? > > -- > > Thomas E Lackey > > diff --git a/robotd/robot.h b/robotd/robot.h > > index 4883e70..8aeecd0 100644 > > --- a/robotd/robot.h > > +++ b/robotd/robot.h > > @@ -1,3 +1,7 @@ > > +#ifndef __INCLUDED_robot_h__ > > +#define __INCLUDED_robot_h__ > > + > > +#include > > #define PASS "t" > > #define PASS2 "tover" > > @@ -433,3 +437,5 @@ extern int Xplhit; > > #define TR_DEFEND 7 > > #define TR_OGG 8 > > #define TR_TORP 9 > > + > > +#endif /* __INCLUDED_robot_h__ */ > > _______________________________________________ > netrek-dev mailing list > netrek-dev at us.netrek.org > http://mailman.us.netrek.org/mailman/listinfo/netrek-dev -- James Cameron http://quozl.netrek.org/ From telackey at lacklustremedia.com Fri Nov 9 11:12:56 2018 From: telackey at lacklustremedia.com (Thomas E. Lackey) Date: Fri, 9 Nov 2018 17:12:56 +0000 Subject: [netrek-dev] Pi3, Reality, and Distortion In-Reply-To: <20181109044821.GD31953@us.netrek.org> References: <7B7F0680CB055E4183BC55AAFC44B75D01E026FE69@iola.redbudcomputer.local> <20181109044821.GD31953@us.netrek.org> Message-ID: <7B7F0680CB055E4183BC55AAFC44B75D01E027BC3E@iola.redbudcomputer.local> James, I think you are right about NTP. I didn't actually observe it in action, as by the time I checked it the skew was really small. However, seeing that, I changed REALITY back to '10', restarted the server, and everything seemed normal speed rather than warp speed. I hadn't realized the "catchup" for an out of sync clock was so aggressive. -- Thomas E Lackey > -----Original Message----- > From: netrek-dev-bounces at us.netrek.org [mailto:netrek-dev- > bounces at us.netrek.org] On Behalf Of James Cameron > Sent: Thursday, November 08, 2018 10:48 PM > To: Netrek Development Mailing List > Subject: Re: [netrek-dev] Pi3, Reality, and Distortion > > Thanks, pushed only the #include change. > > ntserv/alarm.c uses setitimer(2) syscall, so if you demonstrate it > doesn't work, raise a bug against the libc or kernel you're using. > > Also check that your kernel was not busy synchronising to an NTP > server, as that will change real time intervals. > > You might also try adding an RTC and see if that changes it. ;-) > > On Fri, Nov 09, 2018 at 04:08:07AM +0000, Thomas E. Lackey wrote: > > I just built master on my Pi3 on Raspbian, mostly without incident (had to > add > > an include for sys/types.h to robot.h). > > > > However, everything moves at warp speed (pardon the pun). At first > glance, I > > would have estimated the pace at about double. > > > > I adjusted REALITY in `etc/sysdef` (mistakenly called DISTORTION, which is > what > > it is called elsewhere in the code) and found ?8? to look about right (the > > default is ?10?). > > > > I just built on this Pi this evening, so I haven?t had a chance to dig into the > > code. My wild guess without looking would be that CPU freq scaling was > messing > > with the tick rate or some such strangeness along those lines. > > > > Anyone with better knowledge of how ?reality? is calculated have thoughts > on > > what this might be? > > > > -- > > > > Thomas E Lackey > > > > diff --git a/robotd/robot.h b/robotd/robot.h > > > > index 4883e70..8aeecd0 100644 > > > > --- a/robotd/robot.h > > > > +++ b/robotd/robot.h > > > > @@ -1,3 +1,7 @@ > > > > +#ifndef __INCLUDED_robot_h__ > > > > +#define __INCLUDED_robot_h__ > > > > + > > > > +#include > > > > #define PASS "t" > > > > #define PASS2 "tover" > > > > @@ -433,3 +437,5 @@ extern int Xplhit; > > > > #define TR_DEFEND 7 > > > > #define TR_OGG 8 > > > > #define TR_TORP 9 > > > > + > > > > +#endif /* __INCLUDED_robot_h__ */ > > > > > _______________________________________________ > > netrek-dev mailing list > > netrek-dev at us.netrek.org > > http://mailman.us.netrek.org/mailman/listinfo/netrek-dev > > > -- > James Cameron > http://quozl.netrek.org/ > _______________________________________________ > netrek-dev mailing list > netrek-dev at us.netrek.org > http://mailman.us.netrek.org/mailman/listinfo/netrek-dev