From: Tal Lavi Newsgroups: comp.os.msdos.djgpp Subject: MAJOR slowdowns in translating TP7 gfx code to DJGPP2: Suplement Date: Tue, 08 Sep 1998 07:59:13 -0700 Organization: Tel Aviv University Lines: 39 Message-ID: <35F54641.14B6@post.tau.ac.il> References: <35F45C78 DOT 2257 AT post DOT tau DOT ac DOT il> NNTP-Posting-Host: slip-107.tau.ac.il Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Tal Lavi wrote: > > A little highly optimized graphics aplication that run prety good on > TP7 using mode 0x13, is experiencing a MAJOR slowdown using VBE2.0 in > linear frame buffer mode, using two pages for ultra fast flipping. > I am probably accessing the LFB memory wrong(_farsetsel, and > _farnspoke*). I tried using the inline assembler, but I can't seem to > get it working. The profiler says that __dpmi_int was used allot, but i swear I haven't put even one in the actual run-time part! Alas, the profiler won't tell me from which function was the _dpmi_int(s) was called. Does anyone knows whether getch() or _far* calls __dpmi_int? And yet another thing, the div function in stdlib.h takes allot of computation time too! I only do two division with it per loop cicle!!! what's wrong with that picture?!? div is a integer based division, right? then why does it take over 40% of the computation time? I'de like to try to inline my putpixel routine myself, instead of using _far* but I can't get it to work! I want to give it a selector with a base address to the beginning of the LFB(the selector is valid since the _far* works) and let it calculate the offset like this: LFBSelector:[1280*Y+2*x] where 1280*Y=BASE X=INDEX 2=SCALE It's doesn't work for the time being. If you know your way around the AT&T asm syntax, and around PMode, please e-mail me. P.S. I am looking for some tuts and info about the actual workings of PMode, If you know of some(not the DPMI specs, or info on how to get in PMode, we don't need that, right?) then please POST THEM.