From: "Peter Remmers" 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: <73mqsq$t5f$1 AT idy05 DOT tfh-berlin DOT de> 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