Date: Tue, 4 Jan 2000 15:53:45 +0200 (WET) From: Andris Pavenis To: Eli Zaretskii cc: Nicola Bortolotti , djgpp AT delorie DOT com Subject: Re: Commport problems in *two* Win95 dosboxes In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Tue, 4 Jan 2000, Eli Zaretskii wrote: > > On Mon, 3 Jan 2000, Nicola Bortolotti wrote: > > > But with two DJGPP apps running concurrently, the performances become very > > worse than Clipper (a P-Code pseudo-compiled language with a freeware add-on > > to drive commports!). The underruns make the PCM files pretty unaudible, > > severely crackling! > > > > What a surprise! The revenge of the runtime interpreted Clipper code... > > > > It seems like DJGPP apps don't like Windows DosBoxes in background (in > > foreground they run fine but one at a time). Including __dpmi_yield() in the > > outportb cycle just hangs the execution... > > > > Please note that the commport output is unbuffered in both DJGPP and Clipper > > cases. Under DJGPP I've used SVAsync library. > > I cannot possibly claim to understand all the intricacies of your > non-trivial application, but I thought you need to know the following > gotchas related to Windows 9X. > > First, Windows by default suspends a DOS box which goes into > background. To avoid this, you need to uncheck the "Background: > Always suspend" box in the DOS box's property sheets (look under the > "Misc" tab). > > Second, amazingly enough, a DOS box in the background doesn't get > timer interrupts delivered to it. I don't know if this happens with > other hardware interrupts as well, like the async port interrupt (I > assume you use it), but it might be a good idea to check this. My experience shows that it gets part of timer interrupts in background (my rough estimate is 20% or less depending on system load). I'm getting such results in one my DOS real mode TSR program which hooks timer interrupt (or different interrupt when corresponding hardware is available, but I want to be able to develop programs without access to real hardware...) > > Finally, it might be some bug in SVAsync. If nothing else helps, > maybe you should consider to try an alternative library. Section 22.3 > of the DJGPP FAQ lists several such libraries. >