Message-Id: <3.0.1.32.19990209100821.0090f100@iut.ujf-grenoble.fr> X-Sender: sletuffe AT iut DOT ujf-grenoble DOT fr X-Mailer: Windows Eudora Pro Version 3.0.1 (32) [F] Date: Tue, 09 Feb 1999 10:08:21 +0100 To: djgpp AT delorie DOT com From: LETUFFE SYLVAIN Subject: Problem with video-Banks writing to Dos Memory Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Reply-To: djgpp AT delorie DOT com >Date: Mon, 08 Feb 1999 13:55:30 +0100 >To: djgpp AT delorie DOT com >From: LETUFFE SYLVAIN >Subject: Problem with video-Banks writing to Dos Memory >In-Reply-To: <8D53104ECD0CD211AF4000A0C9D60AE34CCD4D AT probe-2 DOT acclaim-euro DOT net> > > > >Hy there ! > > I am currently writing a programm (with DJGPPP of course !) where I need to access very >quickly to the video memory...(like most of graphical programmers I think) > >I don't whant to use Allegro or other libs... I want to do it on my own !! > > >With the 320x200x8 graphical mode I have no problems ( of course there is only one bank ) > >But with VESA mode like 101h,125h.. (640x480x8 800x600x8 and higher) > I need to bank my memory (previously allocated with malloc() ) with a fast methode >The dosmemput() function looks fast enought and I don't think I will need an acces by out(). > >BUT, > >When I want to bank all my memory the only way (I have) to do this is to use the > >int 10h (with ax=0x4F05 and bx=0 and dx=bank number) > >But it is very slow !!!! >I fell from 80 fps (13h) (on my DX4) to a pityfull 2 or 3 fps for a 640x480x8 witch is only 5 banks !! > >/*here is my peace of code*/ > >void dump8(unsigned char *debut, int bankNumber,int BankSize) >{ >__dpmi_regs registers; >int i=0; >while (i { > registers.x.ax=0x4F05; > registers.x.bx=0; > registers.x.dx=i; > __dpmi_int(0x10,®isters); > _dosmemputb( debut, BankSize, 0xA0000); > debut+=BankSize; > i++; > } >} > >What can I do to avoid that ??? Could the problem come from something else than the interuption call ? > > SLY