Mail Archives: djgpp/1998/05/09/08:15:28
and then the linear frame buffer would be mapped to where? :) ... how would
i write to it.. ive tried so many ways.. but i always get nice GPF's
Ive been stressing over this for ages now, its REALLY bugging me.. heh hmm
anyway thanks for the help.. ill try some more with your code!
>I guess you should first allocate a descriptor. Maybe this examplecode I
use
>helps...
>
>if ((ldt_sel = __dpmi_allocate_ldt_descriptors(1)) == -1)
> usage("error allocating ldt_descriptor");
>memset(&mi,0,sizeof(mi));
>mi.address = MMIOBase;
>mi.size = MMIOSize;
>
>if (__dpmi_physical_address_mapping(&mi) == -1)
> usage("error mapping physical address");
>if (__dpmi_lock_linear_region(&mi) == -1)
> usage("error locking ldt_descriptor");
>if (__dpmi_set_segment_base_address(ldt_sel, mi.address) == -1)
> usage("error setting ldt segment base");
>if (__dpmi_set_segment_limit(ldt_sel, mi.size - 1) == -1)
> usage("error setting ldt segment limit");
- Raw text -