delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/09/25/19:47:42

Date: Thu, 25 Sep 1997 16:47:01 -0700 (PDT)
Message-Id: <199709252347.QAA21227@adit.ap.net>
Mime-Version: 1.0
To: Brett Porter <bporter AT rabble DOT uow DOT edu DOT au>, djgpp AT delorie DOT com (DJGPP)
From: Nate Eldredge <eldredge AT ap DOT net>
Subject: Re: djgpp vid. mem. access

At 06:44  9/25/1997 +1000, Brett Porter wrote:
>I am writing code for a FLI player (to anyone that followed my previous
>question, yes, I've fixed it up so it uses 60K instead of 6Mb now :)
>
>They way I am doing it now is to recalculate the FLI frame and store it in a
>buffer (64Kb). I then use the instruction (in mode 0x13):
>
>	_movedatal(_my_ds(),(int)fBuffer,VidMemSelector,0,16000L);
>
>Where fBuffer holds the screen to be displayed and VidMemSelector is an
>assigned selector to 0xA000.
>
>The code works fine, but it is a little slow. Is there a faster way to do
>this (fBuffer is a member of the class and this function is called inside
>that class. Maybe I need to align it differently? I know next to nothing on
>alignment...)
It's theoretically possible that alignment is a problem. You can find out:
fBuffer should be an even multiple of 4. If it's a pointer it got from
malloc or new, that should be the case. Other than that, I don't think
you'll get much faster than _movedatal. Sorry.
Incidentally, are you sure this is what eats all the time? Try profiling it
and see if perhaps the other processing you do is slower.


Nate Eldredge
eldredge AT ap DOT net



- Raw text -


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