VOGONS


First post, by noshutdown

User metadata
Rank Oldbie
Rank
Oldbie

for example, this is one of the possible ways that i supposed, not sure if its efficient or not. assume that the game is using 320*200*256color mode:
1. set up 2 pages of 64kb framebuffer in video ram.
2. render a frame of 320*200 image in system ram.
3. copy the image to video card framebuffer page 1. (shall the program stop anything else and just wait for the bus to transfer all this 64kb data? or can it make any use of dma controller?)
4. set the video card to display page 1.
5. render another frame in system ram.
6. copy the image to video card framebuffer page 2.
7. set the video card to display page 2.

Last edited by noshutdown on 2025-01-15, 01:34. Edited 1 time in total.

Reply 1 of 2, by leileilol

User metadata
Rank l33t++
Rank
l33t++

in system ram, quake only keeps a 320x200 buffer for the waterwarp effect

apsosig.png
long live PCem

Reply 2 of 2, by wbahnassi

User metadata
Rank Oldbie
Rank
Oldbie

No DMAs there. You fill pixels manually with CPU writes to the mapped VGA buffer address. Depending on the display mode selected, the buffer layout could be different and require bank switching when writing horizontally-adjacent pixels. Filling columns instead of rows is an intuitive and fast way in these cases.

You can use double-buffering or just a single buffer with a smaller update area backed by off-screen memory. The latter works nice when having big borders or a DOOM-like status area that doesn't update every frame.

Turbo XT 12MHz, 8-bit VGA, Dual 360K drives
Intel 386 DX-33, Speedstar 24X, SB 1.5, 1x CD
Intel 486 DX2-66, CL5428 VLB, SBPro 2, 2x CD
Intel Pentium 90, Matrox Millenium 2, SB16, 4x CD
HP Z400, Xeon 3.46GHz, YMF-744, Voodoo3, RTX2080Ti