Plotting the screen from protected mode (mode 13h) - Forum

Ultra lightweight, highly experimental, WIP, feel free to try ;)

***

Forum Navigation
You need to log in to create posts and topics.

Plotting the screen from protected mode (mode 13h)

I'm currently working on a fixed point renderer for Dungeons of Noudar, but it seems that plotting the final image into the VGA memory takes a lot of time. I've been wondering if sending the data directly to the controller would be faster?

I'm almost certain it is not, but I could be surprised on this? Wait states and general slowness seem to but troublesome - and also referencing outside the protected mode "bubble" would be probably quite slow, right?

I think it depends on the DPMI you're using but in general you can access that memory directly, and it is no slower to write there than anywhere else in memory.

The main concern should probably be double buffering? Like do you consider it okay for the user to see a half-drawn image, or do you want to show it all at once? (If you use an unchained mode you could double buffer by page flipping, but rendering becomes more complicated.)

In many cases I've found just using a memcpy to be a really efficient and effective way to copy from a double buffer into your video RAM.