Mail Archives: djgpp/2000/10/13/10:03:19
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 -