delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/10/13/10:03:19

From: "Peter Remmers" <Peter DOT Remmers AT t-online DOT de>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: VBE2.0 w/LFB + GCC
Date: Fri, 13 Oct 2000 15:42:41 +0200
Organization: T-Online
Lines: 51
Message-ID: <8s73ft$fvg$04$1@news.t-online.com>
References: <6v%E5.29784$L12 DOT 598411 AT news2-win DOT server DOT ntlworld DOT com> <8s49vu$k4l$1 AT slb6 DOT atl DOT mindspring DOT net> <JAlF5.31810$uq5 DOT 615829 AT news6-win DOT server DOT ntlworld DOT com> <8s4uou$381$1 AT slb7 DOT atl DOT mindspring DOT net> <AIsF5.46659$L12 DOT 677834 AT news2-win DOT server DOT ntlworld DOT com>
Mime-Version: 1.0
X-Trace: news.t-online.com 971444541 04 16368 xYcXwWbSrAlYU 001013 13:42:21
X-Complaints-To: abuse AT t-online DOT com
X-Sender: 320094726121-0001 AT t-dialin DOT net
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2615.200
X-Mimeole: Produced By Microsoft MimeOLE V5.00.2615.200
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Graham Reeds <grahamr AT dtn DOT ntl DOT com> schrieb...

>       /* get videomemory address */
>       meminfo.size = (unsigned long)(modeinfoblock.bytesperscanline *
> modeinfoblock.yresolution);

Why not use something like vesainfo.memsize * 0x10000?
This way you get the whole memory of your graphic card, so you can
access off-screen memory, too.

>       meminfo.address = (unsigned long)modeinfoblock.physbaseptr;
>       __dpmi_physical_address_mapping(&meminfo);
>       __dpmi_lock_linear_region(&meminfo);

Video RAM is not system RAM. The DPMI host cannot page it to disk,
it's always there. No need to lock it.

>       videomemory = meminfo.address;
>
>       /* try selectors */
>       videoselector = __dpmi_allocate_ldt_descriptors(1);
>       __dpmi_set_segment_base_address(videoselector, videomemory);
>       __dpmi_set_segment_limit(videoselector,
modeinfoblock.bytesperscanline
> * modeinfoblock.yresolution);

The limit you must specify here is the highest accessible offset, so it must
be size-1.

>       remainder = (modeinfoblock.bytesperscanline *
> modeinfoblock.yresolution) / 4;
>       frameend = &frameendlfb;
>
> And the new blitting function looks like:
>
>  _movedatal(_my_ds(), (unsigned int)primarysurface->dsimage,
videoselector,
> 0x00, remainder);

As far as I can see, this is now correct and should work.

> Everything works fine, and the numbers are right. So now what's the
problem?

So, what's the problem if you say everything works fine?

Peter



- Raw text -


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