Mail Archives: djgpp/1998/06/19/00:45:53
On Wed, 17 Jun 1998 17:28:50 -0400 in comp.os.msdos.djgpp Jerry
Lawrence <jerry AT eteklabs DOT nospam DOT com> wrote:
: Or, you could do this: (can't remember where i got the info from)
: 1) store a local ram buffer of the screen buffer; do all screen
: operations to this buffer.
: 2) in your graphics init function, use this right after you change
: screen mode:
: __djgpp_nearptr_enable();
: 3) in your graphics deinit function, use this:
: __djgpp_nearptr_disable();
: 4) when a full screen buffer is ready to be displayed:
: memcpy( (unsigned char *) (0xa0000+__djgpp_conventional_base),
: (buff),320*200);
: where "buff" is a 64k buffer (assuming 320x200x256 color)
If you're going to do it this way, you might as well not use near
pointers and use the dos memory access functions to copy your buffer
to the screen. Remove steps 2 and 3, and in step 4 use dosmemput
instead of memcpy:
dosmemput (buffer, 320*200, 0xa0000);
--
george DOT foot AT merton DOT oxford DOT ac DOT uk
xu do tavla fo la lojban -- http://xiron.pc.helsinki.fi/lojban/lojban.html
- Raw text -