972
edits
[unchecked revision] | [unchecked revision] |
m (→Reading EDID) |
m (Bot: Replace deprecated source tag with syntaxhighlight) |
||
(5 intermediate revisions by 4 users not shown) | |||
Line 2:
== Reading EDID ==
The first step is, naturally, to actually get the data. This is done through the BIOS - INT 0x10, AX=4F15h, BL=01h, CX = Controller Unit, DX =
<
mov ax, 0x4f15
mov bl, 0x01
Line 12:
;AH = status (0 is success, 1 is fail)
;ES:DI contains the EDID
</syntaxhighlight>
Note that this code will only run in [[Real Mode]] or [[Virtual 8086 Mode]].
Line 288:
| Unused?
|}
== Get preferred resolution ==
<syntaxhighlight lang="c">
void get_preferred_resolution(uint8_t *edid, int *x, int *y) {
*x = edid[0x38] | ((int) (edid[0x3A] & 0xF0) << 4);
*y = edid[0x3B] | ((int) (edid[0x3D] & 0xF0) << 4);
}
</syntaxhighlight>
== See Also ==
=== External Links ===
* [http://www.edidreader.com/ Online parser for EDID information]
* [https://web.archive.org/web/20080614205229/http://www.vesa.org/public/VBE/VBEDDC11.PDF VBE/DDC 1.1 Specification]
* [https://glenwing.github.io/docs/VESA-EEDID-A2.pdf VESA EDID 1.4 Specification]
[[Category:Video]]
[[Category:Hardware Detection]]
|