Was meinst du sollte dafür vorher die Kapazität des Monitors übeprüft werden, oder ab wann gibt es dafür überhaupt eine Unterstützung?
Nun habe ich gelesen dass das Auslesen der EDID auch bei einem ausgeschalteten Monitor funktionieren soll.
Code: Alles auswählen
START: mov ax, DATEN
mov ds, ax
mov es, ax
mov ax, 4F15h ; DDC - INSTALLATION CHECK
mov bl, 0
int 10h
cmp ax, 4Fh
jnz short NODDC
;-------------------------------------
mov ax, 4F15h ; DDC - READ EDID
mov bl, 1
xor cx, cx
xor dx, dx
mov di, OFFSET EDID
int 10h
mov eax, 0FD000000h ; Text-identifier V/H range
mov bx, 36h
cmp [di+bx], eax ; di+36h detailed timing #1
jz short H1
add bx, 12h
cmp [di+bx], eax ; di+48h detailed timing #2
jz short H1
add bx, 12h
cmp [di+bx], eax ; di+5Ah detailed timing #3
jz short H1
add bx, 12h
cmp [di+bx], eax ; di+6Ch detailed timing #4
jnz short Home
H1: mov al, [di+bx+6] ; MAXHZ
mov al, [di+bx+8] ; MAXKHZ
;-------------------------------------
HOME: mov ah, 4Ch ; Rücksprung, Programm-Ende
int 21h
;-------------------------------------
NODDC: mov dx, OFFSET DDCERR
mov ah, 9
int 21h
mov al, 0FFh
jmp short HOME
;-------------------------------------
EDID DB 0, 0, 0, 0, 0, 0, 0, 0 ; 8 padding (all FFh, or 00h FFh..FFh 00h)
DW 0 ; big-endian manufacturer ID
; bits 14-10: first letter (01h='A', 02h='B', etc.)
; bits 9-5: second letter
; bits 4-0: third letter
DW 0 ; EDID ID code -- identifies monitor model
DD 0 ; serial number or FFFFFFFFh
; for "MAG", subtract 7000000 to get actual serial number
; for "OQI", subtract 456150000
; for "PHL", subtract ???
; for "VSC", subtract 640000000
DB 0 ; week number of manufacture
DB 0 ; manufacture year - 1990
DB 0 ; EDID version
DB 0 ; EDID revision
DB 0 ; video input type
; Bit(s) Description
; 0 separate sync
; 1 composite sync
; 2 sync on green
; 4-3 unused???
; 6-5 voltage level
; 00 0.700V/0.300V (1.00 Vp-p)
; 01 0.714V/0.286V
; 10 0.100V/0.400V
; 11 reserved
; 7 =1 digital signal, =0 analog
DB 0 ; maximum horizontal size in cm
DB 0 ; maximum vertical size in cm
DB 0 ; gamma factor (gamma = 1.0 + factor/100, so max = 3.55)
DB 0 ; DPMS flags
; Bit(s) Description
; 2-0 unused???
; 3 display type
; =0 non-RGB multicolor
; =1 RGB color
; 4 unused???
; 5 Active Off supported
; 6 Suspend supported
; 7 Standby supported
DB 0 ; chroma information: green X'/Y' and red X'/Y'
DB 0 ; chroma information: white X'/Y' and blue X'/Y'
DB 0 ; chroma information: red Y
DB 0 ; chroma information: red X
DB 0 ; chroma information: green Y
DB 0 ; chroma information: green X
DB 0 ; chroma information: blue Y
DB 0 ; chroma information: blue X
DB 0 ; chroma information: white Y
DB 0 ; chroma information: white X
DB 0 ; established timings 1
; Bit(s) Description
; 0 720x400 @ 70 Hz (VGA 640x400, IBM)
; 1 720x400 @ 88 Hz (XGA2)
; 2 640x480 @ 60 Hz (VGA)
; 3 640x480 @ 67 Hz (Mac II, Apple)
; 4 640x480 @ 72 Hz (VESA)
; 5 640x480 @ 75 Hz (VESA)
; 6 800x600 @ 56 Hz (VESA)
; 7 800x600 @ 60 Hz (VESA)
DB 0 ; established timings 2
; Bit(s) Description (Table 00131)
; 0 800x600 @ 72 Hz (VESA)
; 1 800x600 @ 75 Hz (VESA)
; 2 832x624 @ 75 Hz (Mac II)
; 3 1024x768 @ 87 Hz interlaced (8514A)
; 4 1024x768 @ 60 Hz (VESA)
; 5 1024x768 @ 70 Hz (VESA)
; 6 1024x768 @ 75 Hz (VESA)
; 7 1280x1024 @ 75 Hz (VESA)
DB 0 ; manufacturer's reserved timing or 00h for none
; bit 7: 1152x870 @ 75 Hz (Mac II, Apple)
DW 0, 0, 0, 0, 0, 0, 0, 0 ; standard timing identification
; resolution (low byte) and vertical frequency (high byte) for
; each of eight modes
; Bit(s) Description
; 5-0 vertical refresh frequency - 60 (Hz)
; 7-6 aspect ratio (Y resolution = X resolution * aspect ratio)
; 00 ???
; 01 0.75
; 10 0.8
; 11 0.5625
; Note: if both bytes of the timing are 00h or 01h, then the Standard Timing
; is "None"
; X resolution = (lowbyte + 31) * 8
; detailed timing description #1
; Format of EDID Text Identification Strings:
DB 0, 0, 0 ; (to distinguish from detailed timing description)
DB 0 ; text identifier
; FFh serial number
; FEh vendor name
; FDh vertical/horizontal frequency range
; FCh model name
; other = 14 BYTEs text, may be terminated with either a NUL (00h) or LF (0Ah)
DB 0 ; ???
MAXHZ DB 0 ; minimum vertical refresh frequency in Hz
DB 0 ; maximum vertical refresh
DB 0 ; minimum horizontal frequency in kHz
MAXKHZ DB 0 ; maximum horizontal frequency
DB 0FFh ; ???
; DB 0 ; horizontal frequency in kHz (if 00h, may be text)
; DB 0 ; vertical frequency in Hz
; DB 0 ; horizontal active time (pixels) and X resolution
; DB 0 ; horizontal blanking time (pixels)
; DB 0 ; horizontal active time 2 / horizontal blanking time 2
; DB 0 ; vertical active time (lines) and Y resolution
; DB 0 ; vertical blanking time (lines)
; DB 0 ; vertical active time 2 / vertical blanking time 2
; DB 0 ; horizontal sync offset (pixels)
; DB 0 ; horizontal sync pulsewidth (pixels)
; DB 0 ; vertical sync offset / vertical sync pulsewidth
; DB 0 ; vertical/horizontal sync offset 2 / vert/hor. sync pulsewidth 2
; DB 0 ; horizontal image size (mm)
; DB 0 ; vertical image size (mm)
; DB 0 ; horizontal image size 2 / vertical image size 2
; DB 0 ; horizontal border (pixels)
; DB 0 ; vertical border (lines)
; DB 0 ; type of display
; ; Bit(s) Description
; ; 7 interlaced
; ; 6-5 stereo mode
; ; 00 normal display (no stereo)
; ; 01 stereo, right stereo sync high
; ; 10 stereo, left stereo sync high
; ; 11 undefined
; ; 4-3 sync type
; ; 00 sync analog composite
; ; 01 sync bipolar analog composite
; ; 10 sync digital composite
; ; 11 sync digital separate
; ; ---sync digital separate---
; ; 2 vertical sync polarity (0 = negative, 1 = positive)
; ; 1 horizontal sync polarity (0 = negative, 1 = positive)
; ; ---other sync types---
; ; 2 serrate
; ; 1 sync location (0 = on green, 1 = on RGB)
; ; 0 not used???
; detailed timing description #2
DB 0, 0, 0, 0, 0, 0
DB 0, 0, 0, 0, 0, 0
DB 0, 0, 0, 0, 0, 0
; detailed timing description #3
DB 0, 0, 0, 0, 0, 0
DB 0, 0, 0, 0, 0, 0
DB 0, 0, 0, 0, 0, 0
; detailed timing description #4
DB 0, 0, 0, 0, 0, 0
DB 0, 0, 0, 0, 0, 0
DB 0, 0, 0, 0, 0, 0
DB 0 ; unused???
DB 0 ; checksum (radix-complement: 256-low byte of 16-bit sum of 00h-7Eh)
;-------------------------------------
DDCERR DB 0Dh, 0Ah, "Der Monitor hat kein DDC !$", 0Dh, 0Ah