Mail Archives: djgpp/1998/11/29/12:55:13
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 -