Hi folks

I have some graphics problems.
First, i need to get address of video ram of my graphics card
Second, i need to know which page is actualy in use
Third, how could i flip between memory pages
???
..im able to do that by using directx, but i need to do that without

im grateful for everything,
thanks
Posted on 2002-09-19 09:57:24 by Marty
but i need to do that without
this is simply not possible since win95 :(
Posted on 2002-09-19 10:50:43 by beaster

this is simply not possible since win95
[\quote]

Really??? :-\

I think (thought) that everything is possible using assembler language, and more yet when using hardware... :( ... are you perfectly sure of that?
Posted on 2002-09-19 16:27:30 by wicr0s0ft
Problem is that different cards use video memory differently (including addresses). Windows is designed so only the driver must know about the address of the vram. And even if you get the address you will probably make a GPF on an application.

The only api I know that can give you video memory address is DirectDraw.
Posted on 2002-09-19 16:42:26 by dxantos
mmmm....

but directx is using many main dlls like as gdi or kernel...sure that software is using drivers of graphics card, but what will tell him where he must going to find it ?
i think solution is in main dlls, dont you think ??? via for example kernel you can get these numbers...maybe by thunking, but i think here we must searching for right way...
Posted on 2002-09-20 02:11:37 by Marty
The only addresses you can be sure of in a video card are those used for VGA graphics.
Other than that, the manufacturer can put stuff where they like, and may even depend on other systems resources as to where things are mapped in. As dxantos said, each manufacturer can (and will) be different. There are features specific to one card architecture, and registers pertaining to that feature in some area of the chip.
If you target a particular graphics chipset, then you should in theory be able to program directly (thats what we did in DOS if you didn't have access to VESA), and indeed chipset families may be close enough to share a majority of the code base. Even when you've got two identical chipsets though, there is no guarantee that they'll be identical (say a process shrink), as there could be eratta or fixes in the new silicon.

The reason DirectX, and OpenGL work is that each manufacturer provides their own HAL (hardware abstraction layer), which is a level of indirection which maps API (DX/OGL) function calls to actual hardware. For example:
nVidia in DX7 provide a fixed function pipeline for these feature, and will pass in the appropriate data to the hardware logic.

3DLabs provides no direct hardware support for the DX7 pipeline, so instead uses the programmable pipeline to perform the task. So it must select an appropriate program to do this DX7 "fixed" function.

As you can see, the two approaches are radically different, and indeed there is no way a single body of code could reasonably achieve this. If you signed the necessary contracts (and NDAs, and possibly paid much money), you could get hold of the development documents for a given chip. This would allow you to program for it once you waded through all of it!

Mirno
Posted on 2002-09-20 03:02:55 by Mirno