shaniaki
Newbie level 2
Hi,
I'm developing a pci card which needs to read the current graphic card buffer contents. I have made the pci card and it can initiate read/write transfers as the master device in PCI bus.
What I need is to find the right address of my video memory. As I have understood by googling, standard VGA cards have a small memory address range of A0000 to BFFFF which is used in the simple character mode (while booting for example) but all modern graphic cards have a larger memory. The actual graphic buffer of the screen seems to be here but my problem is what portion of it?!!!
a normal 1024*768*32 Bit desktop consumes about 3 MB of memory but for example my PC has 128MB mapped to physical address E0000000 to E7FFFFFF (I found this in resources tab of the property page of my display driver in windows device manager).
As a guess I tried to write to the beginning of this memory range and the result was success! (I managed to draw anything by any color anywhere I want assuming the whole screen is mapped at the beginning of this memory) But, when I try to read a portion of the display buffer and then put it back (a simple copy) just a repeating pattern appears. It seems that I am not reading valid data from video memory.
Does anybody know if read/write addresses are different from each other? who can I get info about this? should I doubt the pci card that I've designed? Or is it possible to read the contents of a graphic card buffer by another PCI card?
Please answer with whatever you may think is useful.
I'm developing a pci card which needs to read the current graphic card buffer contents. I have made the pci card and it can initiate read/write transfers as the master device in PCI bus.
What I need is to find the right address of my video memory. As I have understood by googling, standard VGA cards have a small memory address range of A0000 to BFFFF which is used in the simple character mode (while booting for example) but all modern graphic cards have a larger memory. The actual graphic buffer of the screen seems to be here but my problem is what portion of it?!!!
a normal 1024*768*32 Bit desktop consumes about 3 MB of memory but for example my PC has 128MB mapped to physical address E0000000 to E7FFFFFF (I found this in resources tab of the property page of my display driver in windows device manager).
As a guess I tried to write to the beginning of this memory range and the result was success! (I managed to draw anything by any color anywhere I want assuming the whole screen is mapped at the beginning of this memory) But, when I try to read a portion of the display buffer and then put it back (a simple copy) just a repeating pattern appears. It seems that I am not reading valid data from video memory.
Does anybody know if read/write addresses are different from each other? who can I get info about this? should I doubt the pci card that I've designed? Or is it possible to read the contents of a graphic card buffer by another PCI card?
Please answer with whatever you may think is useful.