EDID: Difference between revisions

[unchecked revision][unchecked revision]
Content deleted Content added
m Bot: Replace deprecated source tag with syntaxhighlight
 
(6 intermediate revisions by 5 users not shown)
Line 2:
 
== Reading EDID ==
The first step is, naturally, to actually get the data. This is done through the BIOS - intINT 0x10, axAX=4F15h, blBL=01h, CX = Controller Unit, DX = EDID block, ES:DI = 128-Byte Buffer.
<sourcesyntaxhighlight lang="asm">
mov ax, 0x4f15
mov bl, 0x01
movxor cx, 0cx
movxor dx, 0dx
int 0x10
;AL = 0x4F if function supported
;AH = status (0 is success, 1 is fail)
;ES:DI contains the EDID
</syntaxhighlight>
</source>
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]]