www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/02/08/02:48:57

Message-Id: <199802080752.BAA13999@waller.net>
Date: Sun, 08 Feb 1998 01:49:10 -0600
To: djgpp AT delorie DOT com
From: Conrad Wei-Li Song <conradsong AT mail DOT utexas DOT edu>
Subject: Re: Polling busy video memory
Mime-Version: 1.0

At 07:15 PM 2/7/98 +0000, you wrote:
>   Does there a function in DJGPP or Allegro that returns whether 
>the video memory is busy or not?
>
>   Something along the lines of:
>
>   if ( is_video_memory_busy() )
>      printf("Still writing to video memory.\n");
>   else
>      printf("Video memory is available for use.\n");
>
The trick is not so much writing while video memory is busy as much as
writing to video memory to avoid flickering.  Both are almost guaranteed when
the monitor is in a retrace state.  You can poll the video card to see whether
this is the case or not.  However, on newer video cards, almost all will issue
an interrupt upon retrace (many cards will not have it any other way now).

Unfortunately, more of the problem is that video writes must take place
through
the I/O bus, which is very slow.  Using accelerator chips and/or AGP, we
bypass
much of the bus, and get video speedups.  In general, you should place and
manipulate as much graphics as possible on the video card itself,
especially if
it is on-board accelerated (through a graphics processor).  If this is not
possible,
a RAM buffer and blit on a retrace is typical (but obviously not accelerated).

Take advantage of the graphics API's if at all possible, use VESA 3.0 or
something.


- Raw text -


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