Mapping video card memory for access via Intel compatible x86 processor

Thinking of x86 Intel compatible computers, without considering the facilities provided by modern operating systems, anyone who wants to draw / write something on the computer screen can access some known addresses, such as B800: 0000 (b8000h linear), A000:0000 (a0000h linear) etc, and through them can write characters or pixels on the screen.

However, thinking only of pixels, the address a0000h maps a very small region of video memory (128k), far from the capacity of current video cards.

Also, using only the basic routines provided by the VGA and SVGA standard, you can not change the resolution to, for example 1366 x 768 (at least I could not identify how).

The question is, assuming I'm already running in 32-bit or 64-bit protected mode, in ring0, how to map a region of video memory so that the processor can access it, and how to configure the video card for resolutions above 800 x 600?

Regarding memory mapping, should this be done in some GDT input?

I know Linux is open source, but the code is great, and I don't have much experience with it. If the answer involves the Linux source code, I would ask, please, to indicate the version, the file and the corresponding lines.

Author: carlosrafaelgn, 2014-04-28

1 answers

To use the memory of the card are not these addresses, this process involves direct access to the video card through "hardware interrupts", you would call in your assembly:

int 0x00 ; o número passado é um código interno para uma função de hardware

And this command for example would pass data from RAM to video card or vice versa or call internal commands of the same.

" I honestly don't know how this process works specifically due to the manufacturer's Drivers, libraries like DirectX, DXGI and OpenGL do all the work."

 1
Author: Leonardo Bosquett, 2014-05-16 18:48:18