delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/02/09/04:06:11

Message-Id: <3.0.1.32.19990208135530.00916bf0@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: Mon, 08 Feb 1999 13:55:30 +0100
To: djgpp AT delorie DOT com
From: LETUFFE SYLVAIN <sletuffe AT iut DOT ujf-grenoble DOT fr>
Subject: Problem with video-Banks writing to Dos Memory
In-Reply-To: <8D53104ECD0CD211AF4000A0C9D60AE34CCD4D@probe-2.acclaim-eur
o.net>
Mime-Version: 1.0
Reply-To: djgpp AT delorie DOT com

			

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<bankNumber)
      {
      registers.x.ax=0x4F05;
      registers.x.bx=0;
      registers.x.dx=i;
      __dpmi_int(0x10,&registers);
      _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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019