Mail Archives: djgpp/1995/05/02/22:17:02
> >Just say NO to 0xe0000000 addressing!
>
> Does that mean that direct video graphics will not be allowed? If it is
> not possible to use a pointer directed to video RAM to put pixels on the
> screen, can we set up a segment that gives us that kind of access without
> causing a segmentation fault? My entire optimized graphics library is at
> stake if we can't! :(
With the current V1.x and V2.0 alpha, you cannot just *ptr=0x32; and write
to video memory, no. You can write it with the farptr functions, yes, a
selector is already set up for this purpose.
There is a way on *SOME* DPMI providers to set up DS so that you could use
a direct pointer to the video memory. To do this you would need:
1) To sacrifice the ability to run under some DPMI environments; you
must depend on 2GB segment limits and memory wrap. Not all allow this.
2) To replace the supplied malloc() with a custom version (I can provide
the details)
3) Never use sbrk in any code
4) Compute the pointer offset (it will *NOT* be a constant).
It is possible to detect at runtime if the DPMI provider will support this;
but you would need the farptr functions as a fallback method if not supported.
The above code is on my LONG list of things to do, but it is not near the top.
- Raw text -