delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/10/07/02:59:59

Date: Tue, 7 Oct 1997 02:56:19 -0400 (EDT)
From: "H. Anthony Hoyt" <hahoyt AT eng2 DOT uconn DOT edu>
To: djgpp AT delorie DOT com
Subject: Help with mode 13h and the video buffer
Message-Id: <Pine.SUN.3.95.971007024155.22179A-100000@lurch-fddi>
Mime-Version: 1.0

Hey guys,
     I'm a newbie to protected mode (with djgpp) but not to real mode
with C/C++.  What I need help on is with writeing the contents to a
secondary buffer to the video buffer in mode 13h (Address 0xa0000 I think)
Now let's say I have a variable called double_buffer that is specified as
follows:

char double_buffer[64000];

now if I want to copy this array to the video buffer (defined as:
char * video_buffer = (char *) 0xa0000; ) and prior to that I called the
following function

void init_video(void) {
     __djgpp_nearptr_enable();
     video_buffer += __djgpp_conventional_base;
     __djgpp_nearprt_disable();
}

Then will I be able to use the following function to copy double_buffer
to the video buffer?

void show_db(void) {
     wait_for_vsync();
     __djgpp_nearptr_enable();
     memcpy((char *)video_buffer,(char *)double_buffer,64000);
      __djgpp_nearptr_disable();
}

     Well, Please let me know before my computer lets me know and I'm
pulling my hair out of my head.  If this is not enough info, let me know.
 Thanks

                                           Tony

May you find strength in magic -- RavenHart  @}->--'--,---


- Raw text -


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