Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Register Log in

Access to video memory in windows by my PCI card

Status
Not open for further replies.

shaniaki

Newbie level 2
Joined
Aug 18, 2007
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,301
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.
 

jhbbunch

Full Member level 4
Joined
Feb 21, 2006
Messages
199
Helped
17
Reputation
34
Reaction score
3
Trophy points
1,298
Activity points
2,902
I seem to recall that the video memory was in 64K banks and you needed to calculate which bank the bit was in. That was why 320X200 screen with 8 bit color was so popular, it was one 64K bank. At that point I got out of video programming on PC's. Too clunky. As i recall you made calls to the VGA subsystem just like you did with BIOS routines. You loaded registers and made BIOS-like calls that would initialize the card, set it to a certain color, get the blanking interval and so on. That was like 12 years ago. I got maybe a quarter of the way through making a laughably bad one-level PacMan clone and gave up.
 

Status
Not open for further replies.
Toggle Sidebar

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top