From mboxrd@z Thu Jan 1 00:00:00 1970 From: Clarence Dang Subject: Re: Timing problems Date: Mon, 9 Jul 2007 18:30:07 +1000 Message-ID: <200707091830.09531.clarencedang@yahoo.com> References: <20070620020841.5d5e2274.john@jcoppens.com> <200706221740.44421.clarencedang@yahoo.com> <20070625223320.a4417f9d.john@jcoppens.com> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20070625223320.a4417f9d.john@jcoppens.com> Content-Disposition: inline Sender: linux-msdos-owner@vger.kernel.org List-Id: Content-Type: text/plain; charset="us-ascii" To: John Coppens Cc: linux-msdos@vger.kernel.org On Tuesday 26 June 2007 11:33, John Coppens wrote: > On Fri, 22 Jun 2007 17:40:42 +1000 > > Clarence Dang wrote: > > On Wednesday 20 June 2007 15:08, John Coppens wrote: > > > I suspect this program uses the DOS 18.xxx Hz timer for its loops. Is > > > the emulation of the timer under DOSEMU the same frequency? Does it > > > depend on setting up the 250/1000 tick/s of the kernel? > > > > DOSEMU can handle about 100 Hz for the PIT. > > > > I have a patch I can dig up that can go up to 250 (or even 1000 > > depending on the kernel version). It's just a quick hack and not the > > proper solution though. > > In reality, the problem is the other way around - I have the impression > that DOSEMU is using anything but 18.29 Hz. At least the program is not > responding the same way under DOSEMU as in real DOS, which causes the > login sequence to fail. Internally, DOSEMU is ticking at 100Hz [src/base/init/init.c:timer_interrupt_init()] but from a DOS program's point of view, it will correctly appear to be whatever the emulated PIT is set to (e.g. 18.2Hz). Emulation of anything less than 100Hz should be fine. > It's rather strange really - using the normal serial port, I get one kind > of behaviour, and using an USB to serial converter, DOSEMU responds > completely differently (none of them correct). I'm somewhat at a loss > where to look for solutions here... Maybe setting $_hogthreshold to 0 will help (lets DOSEMU use as much CPU as it likes).