Bochs VBE Extensions: Difference between revisions

no edit summary
[unchecked revision][unchecked revision]
No edit summary
No edit summary
Line 1:
{{In Progress}}
The [[Bochs]] VGA BIOS supports, to an extend, the VBE specification. Since Bochs only emulates a VGA card down to the hardware level (and a Cirrus graphics card if you enable it, but that is not tied in with the Bochs VBE extensions), it emulates very simple graphics hardware that the VBE BIOS can drive. The advantage of this is that if you are running your OS in Bochs (or Qemu, which uses the Bochs VGA BIOS), you can use this emulated hardware to directly set video modes, without using VBE (which would require real mode or v86).
 
== Overview ==
Line 26:
 
=== Setting display resolution and bit depth ===
Most likely, setting the display resolution and bit depth is all you need. To do so, disable the VBE extensions (see above), write the X resolution, Y resolution and BPP to their respective indexes (VBE_DISPI_INDEX_XRES (1), VBE_DISPI_INDEX_YRES (2) and VBE_DISPI_INDEX_BPP (3)) and enable the VBE extensions. Since the BGA is not real hardware, X and Y resolutions can be set at will [TODO: check whether Bochs does a sanity check and describe]. The bit depth needs to be one of the following:
...
* VBE_DISPI_BPP_4 (0x04)
* VBE_DISPI_BPP_8 (0x08)
* VBE_DISPI_BPP_15 (0x0F)
* VBE_DISPI_BPP_16 (0x10)
* VBE_DISPI_BPP_24 (0x18)
* VBE_DISPI_BPP_32 (0x20)
 
For 24 BPP, the order of the colour components is blue first, then green, then red. [TODO: check for other BPP and describe]
 
[[Category:Video]]
Anonymous user