Can VirtualBox API be used for hardware emulation?

Discussion about using the VirtualBox API, Tutorials, Samples.

Can VirtualBox API be used for hardware emulation?

Postby miths3 » 21. Feb 2021, 22:12

I was curious if parts of VirtualBox API can be used for hardware emulation rather than virtualisation?
Posts: 14
Joined: 2. Feb 2018, 21:26

Re: Can VirtualBox API be used for hardware emulation?

Postby mpack » 22. Feb 2021, 11:29

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.
Site Moderator
Posts: 33669
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Return to The VirtualBox API

Who is online

Users browsing this forum: No registered users and 2 guests