www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/11/29/12:55:13

From: "Peter Remmers" <pitti AT tfh-berlin DOT de>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: VESA and more generally using dpmi to access VIDEO Memory
Date: Sun, 29 Nov 1998 18:54:21 +0100
Organization: TFH-Berlin (Berlin, Germany)
Lines: 37
Message-ID: <73s1p8$6cc$1@idy05.tfh-berlin.de>
References: <MPG DOT 10c7c628d7c67f2898969b AT news> <73mqsq$t5f$1 AT idy05 DOT tfh-berlin DOT de> <MPG DOT 10ca0e2bd9949e4e98969d AT news>
NNTP-Posting-Host: ip099167.tfh-berlin.de
X-Newsreader: Microsoft Outlook Express 4.72.3110.1
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Thibaut Murez schrieb in Nachricht ...
>In article <73mqsq$t5f$1 AT idy05 DOT tfh-berlin DOT de>, pitti AT tfh-berlin DOT de
>says...
>> The physical address of the video memory should not be hardcoded,
>> but rather obtained from VESA >= 2.0 or something, or else this
>> will indeed only run on YOUR computer - but I guess this is only
>> supposed to be an example...
>Exactly it was just a try to find what didn't work. As LFB is bigger than
>one segment i used 0xa000 instead...
If you want to use the 0xa000 segment then is must be 0xa0000
because the address is segment<<4 + offset (0).
But every PCI card today (or even AGP) should support linear framebuffer,
so investing some time in VESA 2 is worth it...and requiring
VESA2 is nothing people can complain about anymore (I hope :-)

>> The only difference I can see to code I have written is the
>> call for the segment limit:
>>
>> __dpmi_set_segment_limit(VideoSelector, LFB.size-1);
>Great it works !!! just one question...Why must the size be 1 byte less ?
>i guess that it's because offset start from 0 so last offset i size-1..Is
>that right ?
Yes. The "size" you supply to the function is actually the highest offset
you
want to be able to access. e.g. 5 bytes are from offset 0 to 4,
so 4 would be correct. Besides, this is mentioned in the
DPMI specs and in the online help for __dpmi_set_segment_limit().

>> The size must be 1 less. Then it should work.
>Thanks a lot :)
De nada.

Peter Remmers



- Raw text -


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