Can VirtualBox API be used for hardware emulation?

Discussion about using the VirtualBox API, Tutorials, Samples.
Post Reply
miths3
Posts: 19
Joined: 2. Feb 2018, 21:26

Can VirtualBox API be used for hardware emulation?

Post by miths3 »

I was curious if parts of VirtualBox API can be used for hardware emulation rather than virtualisation?
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Can VirtualBox API be used for hardware emulation?

Post by mpack »

No, the API essentially just gives you an alternative user interface, though in this case the user is a program. AFAIK there's not much if anything it can do that you can't do with VBoxManage.

I'm not sure I see the distinction between hardware emulation and hardware virtualization. For everything except the CPU it comes to the same thing? Virtualization is what you are trying to achieve. Hardware emulation is how you do it.

If the question is: can I write my own hardware emulations and use them in VirtualBox then the answer is sure, if you have the same expertise as one of the devs. You have to look up the data sheets for all of the chips being emulated, and write code to exactly reproduce their behaviour at I/O and IRQ level. Then you link that module into the VirtualBox sources and add more code to make it selectable from the API. I'm assuming that every guest OS will already have drivers for this hardware so you won't need to write that too. Then submit this monster patch to Oracle.
Post Reply