www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/06/19/00:45:53

From: George Foot <mert0407 AT sable DOT ox DOT ac DOT uk>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: far pointers using djgpp
Date: 19 Jun 1998 03:14:58 GMT
Organization: Oxford University, England
Lines: 31
Message-ID: <6mcl3i$isj$2@news.ox.ac.uk>
References: <Pine DOT SOL DOT 3 DOT 95 DOT 980617000723 DOT 17603A-100000 AT tiger DOT vut DOT edu DOT au> <35881d34 DOT 2869157 AT news DOT unisys DOT com DOT br> <MPG DOT ff1ff203d4e5e319896ce AT gateway>
NNTP-Posting-Host: sable.ox.ac.uk
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

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 -


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