My friend brought up a very interesting question when talking to him about operating system development.
How do you change what hardware is emulated in Bochs?
For example, if you needed to test a special graphics card to make drivers for them, would you have to buy that graphics card, or could you just set Bochs to enable it?
I didn't know the answer so I figured I would ask here.
Emulating special hardware in Bochs?
- xenos
- Member
- Posts: 1121
- Joined: Thu Aug 11, 2005 11:00 pm
- Libera.chat IRC: xenos1984
- Location: Tartu, Estonia
- Contact:
Re: Emulating special hardware in Bochs?
As far as I know Bochs can emulate only very few graphics cards. If you wanted to emulate a specific one, you'd have to write your own emulation for it and integrate it into the Bochs source code, which is probably as hard as (or even harder than) writing a driver for that graphics card.
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
Re: Emulating special hardware in Bochs?
Bochs emulates a limited set of devices, and video hardware is lagging behind the most in that regard: it does the job and little more. Your practical choices include a VGA or a Cirrus Logic.
The developers don't have the time to write emulations of all devices out there, so you will have to write your own if you want it emulated. Since you don't know the hardware inside out this usually results in a different device than what you want so in practice you end up testing graphics on physical hardware only.
The developers don't have the time to write emulations of all devices out there, so you will have to write your own if you want it emulated. Since you don't know the hardware inside out this usually results in a different device than what you want so in practice you end up testing graphics on physical hardware only.
Re: Emulating special hardware in Bochs?
The Bochs Graphic Adapter is a nice alternative I think. It is easy to write a driver for and it can be used with hi-res modes. The sad part is of course that it only exist in bochs/qemu and not as a real graphic device.
On a sidenote I'm working on a i915 driver. It has some documentation but it wasn't very friendly so I'm going through the linux implementation. As soon as I've managed to get it to switch modes I'll put it on the wiki.
On a sidenote I'm working on a i915 driver. It has some documentation but it wasn't very friendly so I'm going through the linux implementation. As soon as I've managed to get it to switch modes I'll put it on the wiki.
Fudge - Simplicity, clarity and speed.
http://github.com/Jezze/fudge/
http://github.com/Jezze/fudge/