Duffman wrote:
whats the difference between, a linear framebuffer and a banked framebuffer?
The original VGA specification was created quite a while ago (in computer terms), when the 8086/8088 CPUs could only access 1MB of memory and PCs used the ISA bus. Inside the 1MB address space, 128kB were reserved for the video memory: the A000-AFFF and the B000-BFFF memory ranges, and most cards used only 64kB or 32kB of the available space to map their RAM.
This setup led to a problem: a VGA card had 256kB of video memory and the 640x480 mode with 16 colors (the best you could get from a VGA card) required a 150kB frame buffer. How to fit all that memory in a memory window smaller than this? The answer was: banked memory access. When a program wanted to use a video mode such as 640x480x16, it had to ask the video card to map small portions of the frame buffer (called "banks") into the available address space. When the VESA 1.2 standard came out, the ISA bus was still used and the only way to access larger frame buffers was to use this banked approach, even if the cards had 512kB or 1MB of video RAM.
Later, when new I/O buses designed to work with 386 and newer CPUs appeared (such as the VL-bus, PCI and finally AGP), it became possible for the video card to map large chunks of memory into the CPU address space above 1MB. At this point the VESA 2.0 standard set the rules for the use of linear frame buffers, allowing the programmers to "see" the entire frame buffer at once using inside a single block of memory. Obviously, writing a program to use a linear frame buffer is simpler and faster than using a banked mode, since you don't have to worry about switching banks while you draw, constantly checking if you are about to cross the boundary between two memory areas.
Update: after the VESA 2.0 standard was published, it took a while before the programmers started to use the new linear modes. There was also a significant installed base of VESA 1.2 capable cards, so several game engines were written with detection routines and fallback options, so they would try to use a linear mode if available , but would revert to a 1.2-compatible banked mode otherwise.
Regards,
Major Grubert
Athlon 64 3200+/Asus K8V-X/1GB DDR400/GeForce FX 5700/SB Live! 5.1