Mail Archives: djgpp/1997/10/07/02:59:59
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 -