www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/08/13/09:45:36

Xref: news2.mv.net comp.os.msdos.djgpp:7185
From: Mark Spadoni <spadoni AT wolfenet DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: buffer -> screen transfers
Date: Thu, 08 Aug 1996 09:40:57 GMT
Organization: Wolfe Internet Access, L.L.C.
Lines: 33
Message-ID: <3209b332.21898266@news.wolfe.net>
References: <320647A3 DOT 5827 AT cadvision DOT com>
NNTP-Posting-Host: sea-ts6-p10.wolfenet.com
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

On Mon, 05 Aug 1996 13:12:35 -0600, John Meilleur
<meilleuj AT cadvision DOT com> wrote:

>  _farsetsel(video_ds);
>  for (i=0;i<640*480;i++)
>    _farnspokeb(i,screen[i]);	

Also, you can improve the speed on this by disabling the memory
protection and assigning a pointer directly to video memory.  Here's a
sample fragment...

#include <sys/nearptr.h>

void main()
{
   char *video;

   __djgpp_nearptr_enable();
   video = (char *) __djgpp_conventional_base + 0xA0000;

   video[0] = 15;

   etc....

I haven't had much time to mess with VESA programming so maybe someone
else can say if there are any problems with this when you do bank
switching.  Also, remember that this disables all memory protection,
so use __djgpp_nearptr_disable() when you are done with your video
manipulation.  The video pointer must be reassigned if you disable,
and then re-enable memory protection.  The enable / disables are slow,
though, so use them sparingly.

Mark Spadoni

- Raw text -


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