Bochs VBE Extensions: Difference between revisions

Jump to navigation Jump to search
[unchecked revision][unchecked revision]
Content added Content deleted
No edit summary
Line 81: Line 81:


=== Using banked mode ===
=== 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]
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) ===
=== Using a linear frame buffer (LFB) ===
When using a linear frame buffer, the BGA exposes all of the graphics memory in a linear fashion, starting at address 0xE0000000 (VBE_DISPI_LFB_PHYSICAL_ADDRESS). [TODO: check whether this also goes for 4 BPP modes] To enable the LFB, use the VBE_DISPI_LFB_ENABLED flag (0x40) when enabling the VBE extensions (so write a value of VBE_DISPI_ENABLED | VBE_DISPI_LFB_ENABLED (0x41)).
When using a linear frame buffer, the BGA exposes all of the graphics memory in a linear fashion, starting at address 0xE0000000 (VBE_DISPI_LFB_PHYSICAL_ADDRESS). <!--[TODO: check whether this also goes for 4 BPP modes]--> To enable the LFB, use the VBE_DISPI_LFB_ENABLED flag (0x40) when enabling the VBE extensions (so write a value of VBE_DISPI_ENABLED | VBE_DISPI_LFB_ENABLED (0x41)).


QEMU does not pay attention to the VBE_DISPI_LFB_ENABLED flag. Both the linear frame buffer and memory bank are available at all times. Bochs pays attention to the flag. In LFB mode it ignores requests to change the bank and nothing happens when you write to the bank memory. In banked mode nothing happens when you write to the LFB memory.
QEMU does not pay attention to the VBE_DISPI_LFB_ENABLED flag. Both the linear frame buffer and memory bank are available at all times. Bochs pays attention to the flag. In LFB mode it ignores requests to change the bank and nothing happens when you write to the bank memory. In banked mode nothing happens when you write to the LFB memory.
Line 134: Line 134:


[[Category:Video]]
[[Category:Video]]
[[Category:VGA]]
[[Category:SVGA]]
[[Category:Protected_Mode]]