![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Professional Programmer
|
Is Virtual Hardware Possible
Hey yall. You know how programs like VMWare create "virtual hardware" but really only use what you have. Well I was wondering if you could make a Virtual Video card. I know it would still have to output through your integrated video card, or your PCI or AGP video card, but do you thik it would be possible to take some of your Physical RAM, and assign it to something that would allow you ot be able to configure it like it was a 256MB Video Card while still outputting through the video card you already have, or is this highly unlikely, or even impossible?
__________________
Forgiveness is the fragrance that the violet sheds on the heal that has crushed it. - Mark Twain Destruction leads to a very rough road, but it also breeds creation. |
|
|
|
|
|
#2 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
Seth, I would recommend that you study some hardware architecture. In this case, particularly, you should find out why video cards exist and what they do. We haven't always had those beasts.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
|
|
#3 |
|
Battle Programmer
Join Date: Feb 2006
Location: Bellevue, WA, USA
Posts: 769
Rep Power: 3
![]() |
Also, I think what you've just described is how integrated video works.
![]()
__________________
<insert disclaimer here> <insert shameless plug for Visual Studio here> |
|
|
|
|
|
#4 |
|
Caffeinated Neural Net
![]() Join Date: Jun 2005
Location: Wet west coast of Canada
Posts: 1,119
Rep Power: 5
![]() |
It's entirely possible. As Jimbo points out, most integrated video works like this- it reserves x amount of main memory for video, and the remainder is your system memory. It's also why integrated video generally is a fair bit slower than a bona-fide video card. This is mainly because of contention between the various devices trying to access the memory. First you have the CPU trying to access memory (whether video or not, it's all on the same memory bus). Next you have the graphics accelerator, which needs it for rendering, etc. Third, if the memory is DRAM (most is), it needs to be periodically refreshed so it doesn't lose its contents. Fourth, the rasterizer needs to read the memory in order to drive the output to the monitor.
With a 'real' video card, there is no problem with the CPU accessing system memory while the GPU accesses video memory, since the two are isolated. Also, VRAM is often 'static RAM', meaning it doesn't need to be refreshed, so there goes another issue. If the RAM is dual-ported, it means it can be accessed by two devices simultaneously (though often for read-only access on one), which allows the rasterizing hardware to drive the display while the GPU renders stuff. Again, the result is increased performance, and when you consider that integrated graphics chipsets are generally for the 'budget user' (laptops aside), you'll see why they tend to perform much slower. Back to your original question: given enough effort, you can virtualize pretty much everything on modern hardware. If you're wanting to make a virtual video card, it's possible, but be aware that you'll pay a heavy price in performance. Generally, the only reasons to do this are a) to emulate different hardware than is actually present, or b) testing code to make sure it conforms to specifications. For example, in Windows DirectX programming, you can use a 'reference' device for the video, which implements all fucntions in software. Designed to be correct rather than fast, using this can help you determine if a problem is a bug in your application, or a bug in the display driver (if it works with the reference device, this may indicate the latter). So, what do you want to do this for, anyways? If it's to 'enhance' your video adapter by fooling applications into thinking it has more memory than it does, this is probably possible, but will be slow. If it's for another reason, what did you have in mind?
__________________
And once again, Probability proves itself willing to sneak into a back alley and service Drama as would a copper-piece harlot. - Vaarsuvius, Order of the Stick |
|
|
|
|
|
#5 |
|
Professional Programmer
|
Thanks for your posts yall. Dawei I will look into that.
__________________
Forgiveness is the fragrance that the violet sheds on the heal that has crushed it. - Mark Twain Destruction leads to a very rough road, but it also breeds creation. |
|
|
|
|
|
#6 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
Hardware is faster than software. Software, after all, does nothing but drive hardware. If some peripheral hardware is actually slower (not likely in a well-considered design), then the software has to twiddle its thumbs, so it's not really faster.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
|
|
#7 |
|
Programmer
Join Date: Mar 2007
Posts: 33
Rep Power: 0
![]() |
nVidia call this "Turbo Cache" Where the video card has dedicated ram, but it can borrow up to a certain amount of memory from your system.
|
|
|
|
|
|
#8 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
Yes, it can borrow it, but it can not use it with the facility that it can use its own, distinct memory.
Read lectric's post again. Even with dual port memory, you cannot read and write the same memory at the same time. The reasons are obvious. Further, you cannot access it (in modern systems) at the same high rate your CPU (whether it's the main CPU or the graphics CPU) can handle it. Physical constraints hinging on the speed of light and the behavior of transmission lines intervene.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Embedding Java VM to Hardware | pushkarajthorat | Java | 15 | Jun 3rd, 2007 12:10 AM |
| What is the point of pure virtual functions? | aznluvsmc | C++ | 12 | Apr 14th, 2006 7:48 PM |
| Virtual Memory question | metsfan | C | 2 | Apr 11th, 2006 7:47 PM |
| Why can't we have Virtual Constructors??? | kaustubhkane | C++ | 4 | Sep 21st, 2005 10:21 AM |
| Virtual functions on casted objects | Rei | C++ | 1 | Apr 10th, 2005 8:44 AM |