VGA Hardware: Difference between revisions

m
s/dword/uint32_t/g
[unchecked revision][unchecked revision]
m (oops: 16 colours != 16 bits per pixel)
m (s/dword/uint32_t/g)
Line 46:
 
=== Port 0x3C4, 0x3CE, 0x3D4 ===
These are the most used indexed registers. The index byte is written to the port given, then the data byte can be read/written from port+1. Some programs use a single word16-bit access instead of two byte accesses for writing, which does effectively the same. (take care of byte ordering when doing so)
 
Port 0x3D4 has some extra requirements - it requires bit 0 of the '''Miscellaneous Output Register''' to be set before it responds to this address (if cleared, these ports appears at 0x3B4). Also, registers 0-7 of 0x3D4 are write protected by the protect bit (bit 7 of index 0x11)
Line 151:
Although 32 bytes are reserved for each character, only 16, 14, or 8 of them are commonly used, depending on the character height.
 
Planes 0 and 1 are accessible from the host by writing to the video memory range. Plane 0 is accessed on even addresses, plane 1 is accessed on odd addresses, with each consecutive word16-bit value describing the next character. Accessing plane 2 to change fonts requires [[VGA Fonts|changes in addressing logic]].
 
=== Memory Layout in 4-color modes ===
Anonymous user