Mail Archives: djgpp/2003/03/07/11:45:16
> OK, a while ago, I was making SVGA routines using
> __djgpp_nearptr_enable() for linear frame buffers. But now I've
> decided, for compatibility with Windows 2000 and XP I'll remake them and
> map the linear frame buffer with __dpmi_physical_address_mapping and
> __dpmi_allocate_ldt_descriptors.
> One thing though. For a fast BMP routine, I'd copy data directly from
> the file to the screen. But I can't do that if I map the memory right?
> I mean, I know I could probably do something, like make a buffer, copy
> the picture to that, and then copy data from the buffer to the screen,
> but is there a way I could fread or in any other way copy data from a
> file to a mapped memory location? Thanks.
The extra memory copy is very fast and unlikely to be worth any effort
to fix. But if you want to do this, you would need to make a copy of
the library _read() procedure - and see that you want to copy directly
from the DOS memory area with one selector to the screen area with a
second selector.
- Raw text -