Bochs VBE Extensions: Difference between revisions

m
Bot: Replace deprecated source tag with syntaxhighlight
[unchecked revision][unchecked revision]
(→‎BGA versions: 0xB0C4 figured out, still puzzled as to what 0xB0C5 adds)
m (Bot: Replace deprecated source tag with syntaxhighlight)
 
(5 intermediate revisions by 3 users not shown)
Line 13:
* 0xB0C3 - support for getting capabilities, support for using 8 bit DAC
* 0xB0C4 - VRAM increased to 8 MB
* 0xB0C5 - [http://marc.info/?l=bochs-cvs&m=123287460501516 VRAM increased to 16 MB?] [TODO: verify and check for other changes]
* 0xB0C5 - [TODO: check and describe]
[TODO: if and when 4BPP modes are supported]
[TODO: if and when VGA attribute controller (AC) is supported]
Line 84:
 
=== Using a linear frame buffer (LFB) ===
When using a linear frame bufferframebuffer, the BGA exposes all of the graphicsvideo memory in a linearsingle fashion.linearly Inaddressable older versionssection of Bochs and QEMU the location is fixed at 0xE0000000 (VBE_DISPI_LFB_PHYSICAL_ADDRESS)memory. However, when Bochs is configured to emulate a PCI video card rather than an ISA one, theThe address of the framebuffer is no longernot fixed, butand canmust be read from the first [[PCI]] base address register (BAR 0 of device 0x1234:0x1111<!--[TODO: check behaviour for 4 BPP modes and QEMU]-->). To enable the LFBlinear framebuffer, use the VBE_DISPI_LFB_ENABLED flag (0x40) when enabling the VBEBGA extensionsin (soconjunction writewith athe valueVBE_DISPI_ENABLED offlag. VBE_DISPI_ENABLED<!--[TODO: |check VBE_DISPI_LFB_ENABLEDbehaviour (0x41)).for 4 BPP modes]-->
 
Unlike Bochs, QEMU does not necessarily pay attention to the VBE_DISPI_LFB_ENABLED flag. Bothwith respect to banked memory access, allowing both the linear frame bufferframebuffer and banked memory bankto arebe availableused at all times. Bochs payswill attention to the flag. In LFB mode itnot ignoreshonour requests to change the memory bank and nothing happens when youthe writelinear toframebuffer theis bankenabled, memory.and Init bankedwill modesimilarly nothingignore happensany whenwrites you writemade to the LFBmemory memorybank.
 
'''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 ===
 
<sourcesyntaxhighlight lang="c">
void BgaWriteRegister(unsigned short IndexValue, unsigned short DataValue)
{
Line 150 ⟶ 152:
}
 
</syntaxhighlight>
</source>
 
==External Links==
[http://cvs.savannah.nongnu.org/viewvc/*checkout*/vgabios/vgabios/vbe_display_api.txt?revision=1.14 Specification]
 
[[Category:Video]]