Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Jul 23rd, 2007, 10:40 PM   #1
bigguy
Professional Programmer
 
bigguy's Avatar
 
Join Date: Sep 2005
Location: Arkansas
Posts: 298
Rep Power: 0 bigguy is an unknown quantity at this point
Send a message via AIM to bigguy Send a message via MSN to bigguy Send a message via Yahoo to bigguy
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.
bigguy is offline   Reply With Quote
Old Jul 23rd, 2007, 11:29 PM   #2
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
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
DaWei is offline   Reply With Quote
Old Jul 23rd, 2007, 11:40 PM   #3
Jimbo
Battle Programmer
 
Jimbo's Avatar
 
Join Date: Feb 2006
Location: Bellevue, WA, USA
Posts: 769
Rep Power: 3 Jimbo is on a distinguished road
Also, I think what you've just described is how integrated video works.
__________________
<insert disclaimer here>
<insert shameless plug for Visual Studio here>
Jimbo is offline   Reply With Quote
Old Jul 24th, 2007, 12:38 AM   #4
lectricpharaoh
Caffeinated Neural Net
 
lectricpharaoh's Avatar
 
Join Date: Jun 2005
Location: Wet west coast of Canada
Posts: 1,119
Rep Power: 5 lectricpharaoh will become famous soon enough
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
lectricpharaoh is offline   Reply With Quote
Old Jul 25th, 2007, 4:26 PM   #5
bigguy
Professional Programmer
 
bigguy's Avatar
 
Join Date: Sep 2005
Location: Arkansas
Posts: 298
Rep Power: 0 bigguy is an unknown quantity at this point
Send a message via AIM to bigguy Send a message via MSN to bigguy Send a message via Yahoo to bigguy
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.
bigguy is offline   Reply With Quote
Old Jul 25th, 2007, 5:12 PM   #6
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
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
DaWei is offline   Reply With Quote
Old Jul 25th, 2007, 9:51 PM   #7
tAK
Programmer
 
Join Date: Mar 2007
Posts: 33
Rep Power: 0 tAK is on a distinguished road
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.
tAK is offline   Reply With Quote
Old Jul 25th, 2007, 10:31 PM   #8
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
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
DaWei is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

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




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 5:39 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC