Memory command problems
Blitz3D Forums/Blitz3D Beginners Area/Memory command problems
| ||
| @all, Look at the code below. I am trying to retrieve how much memory is available on my graphics card. I tested with a 2Mb graphics card but the code below I have done returns 16Mb ??? WHY?? Please advise! Function Display_GfxMemory() Local Gfx_TotalMem% = 0 Local Gfx_FreeMem% = 0 Gfx_TotalMem = TotalVidMem() Gfx_FreeMem = AvailVidMem() Text (Cursor_XPos,Cursor_YPos,"Total Graphics Memory : ", False,False) Text (Cursor_XPos,Cursor_YPos," " + Gfx_TotalMem + " " + "(Bytes)" + " " + (Gfx_TotalMem / 1048576) + "Mb",False,False) Cursor_YPos = Cursor_Ypos + Cursor_Size Text (Cursor_XPos,Cursor_YPos,"Free Graphics Memory : ",False,False) Text (Cursor_XPos,Cursor_YPos," " + Gfx_FreeMem + " " + "(Bytes)" + " " + (Gfx_FreeMem / 1048576) + "Mb",False,False) Cursor_YPos = Cursor_Ypos + Cursor_Size End Function |
| ||
| I wonder if you're just getting overlapping text? You've got False as your Text x/y parameters, meaning it's going to print everything at 0, 0. Try with 0, 0... 0, 20... 0, 40... 0, 60, etc. |
| ||
| @BlitzSupport Nah, thats not the issue. I CLS the screen and my X position is not the issue. Is my code wrong in your opinion? |
| ||
| What does this little program return? http://www.hi-toro.com/misc/gfx.zip [5K] Also, see what dxdiag returns (Start Menu -> Run -> dxdiag). |
| ||
| @BlitzSupport The program you linked to me returns ATI 3D Rage Pro 2Mb. But my own code returns 16Mb ??? |
| ||
| And the dxdiag also returns 2Mb ... its WEIRD! |
| ||
| Olsen - is your computer using system ram to emulate video ram in BIOS? |
| ||
| @BlackD That does not "compute" i.e. what do you mean, and how do I check for that? I am currently using a DELL PowerEdge SERVER to design games. And that has a built-in ATI 2Mb ... |
| ||
| hehe.. Which DELL PowerEdge? :) 2650? 1750? 400SC? 1500SC? :) In any case, I image that your system is using a small portion of system memory to emulate video RAM, and it's quite possible that Blitz can't tell the difference. 2 megs of RAM is barely enough to even SET the screen-res to 800x600 let alone loading any images, so video RAM emulation is almost a certainty - hence why the results are shown incorrectly. +BlackD |
| ||
| @BlackD Actually, using a 2300 model! But does the code look odd to you? because I tried my code on other machine, and those results are wrong also? Is my "math" in the code above not correct? |
| ||
| Nothing wrong with your maths and works OK on my system. It returns 123Mb when I have a 128Mb card. |
| ||
| @tonyg ehem ... if you have 128Mb and it returns 123Mb something IS wrong. My code should show the entire amount on the card (128Mb) AND the free available memory (123Mb) ... |
| ||
| no, 128MB IS 123MB ^^ Don't ask me why, but they give you the numbers in different ways when selling you a card.. it may say 128MB on the pack, but the real number is always lower.. open up the properties for your harddrive and you'll see the same thing there... if you have a 200GB drive, it will probabaly say 180GB or something. |
| ||
| Yeah, I believe they sometimes use 1000 bytes = kb and 1000 kb = 1 mb (instead of 1024 for both). So, 128 MB x 1000 = 128,000 KB x 1000 = 128,000,000 Bytes 128,000,000 bytes / 1024 = 125,000 KB / 1024 = 122 MB Close enough I guess ;) |
| ||
| I guess what you guys explain makes "sense" although its still odd! :-) |