Anonymous user
Bochs VBE Extensions: Difference between revisions
no edit summary
[unchecked revision] | [unchecked revision] |
No edit summary |
No edit summary |
||
Line 23:
In order to change any of the registers (with the logical exception of VBE_DISPI_INDEX_ENABLE), the VBE extensions must be disabled first. To do so, write the value VBE_DISPI_DISABLED (0x00) to VBE_DISPI_INDEX_ENABLE (4). The changes are not visible until the VBE extensions are enabled again. To do so, write the value VBE_DISPI_ENABLED (0x01) to the same register (see also note below on enabling the LFB).
[TODO: check whether we can read registers as well, and describe]
=== 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
* VBE_DISPI_BPP_4 (0x04)
* VBE_DISPI_BPP_8 (0x08)
Line 35:
For 24 BPP, the order of the colour components is blue first, then green, then red. [TODO: check for other BPP and describe]
[TODO: some example code]
=== Using banked mode ===
When using banked mode, the BGA uses a 64Kb bank size (VBE_DISPI_BANK_SIZE_KB) starting at address 0xA0000 (VBE_DISPI_BANK_ADDRESS). Banked mode is the default mode, so when enabling the VBE extensions without explicitly telling the BGA to use a linear frame buffer, the BGA enables banked mode. To set the bank to use, write the bank number to the bank register (VBE_DISPI_INDEX_BANK (5)). [TODO: check whether Bochs does a sanity check, or wrap-around, or whatever and describe]
=== Using a linear frame buffer (LFB) ===
[[Category:Video]]
|