Bochs VBE Extensions: Difference between revisions
[unchecked revision] | [unchecked revision] |
Content deleted Content added
m Bot: Replace deprecated source tag with syntaxhighlight |
|||
(8 intermediate revisions by 5 users not shown) | |||
Line 1:
The [[Bochs]] VGA BIOS supports, to an extent, 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, or even VirtualBox), you can use this emulated hardware to directly set video modes without using VBE (which would require real mode or v86).
== Overview ==
Line 12:
* 0xB0C2 - 15, 16, 24 and 32 BPP modes, support for linear frame buffer, support for retaining memory contents on mode switching
* 0xB0C3 - support for getting capabilities, support for using 8 bit DAC
* 0xB0C4 -
* 0xB0C5 - [http://marc.info/?l=bochs-cvs&m=123287460501516 VRAM increased to 16 MB?] [TODO: verify and check for other changes]
[TODO: if and when 4BPP modes are supported]
[TODO: if and when VGA attribute controller (AC) is supported]
Line 37:
=== Checking availability ===
To check whether the BGA is available, read the value from VBE_DISPI_INDEX_ID (0). If it equals
If for some reason you want Bochs to emulate an older version of the BGA, you can write the desired version to VBE_DISPI_INDEX_ID (0). If succesful, reading the register again will return the value just set. This is used by the Bochs VGA BIOS to ensure it is run with the right version of Bochs. If done from an application (or your OS), this will break compatibility with the Bochs VBE BIOS, which expects the latest version.
Line 84:
=== Using a linear frame buffer (LFB) ===
When using a linear
Unlike Bochs, QEMU does not necessarily pay attention to the VBE_DISPI_LFB_ENABLED flag
'''Note:''' In older versions of Bochs and QEMU, the framebuffer was fixed at 0xE0000000, and modern versions will use that address when emulating ISA-only systems. '''It is highly inadvisable to make assumptions about the address of the linear framebuffer.''' It should always be read from the BGA's PCI BAR0.
=== Clearing display memory ===
Line 116 ⟶ 118:
=== Example code ===
<
void BgaWriteRegister(unsigned short IndexValue, unsigned short DataValue)
{
Line 150 ⟶ 152:
}
</syntaxhighlight>
==External Links==
[http://cvs.savannah.nongnu.org/viewvc/*checkout*/vgabios/vgabios/vbe_display_api.txt?revision=1.14 Specification]
[[Category:Video]]
|