On 15/02/2024 12:04, R.Wieser wrote:
hello Rudy,
> I've got a small program going thru all video-modi by looping AL from 80
> upto FF, calling INT 10, AH=00.
...
> And I'm pretty sure there are few other graphics modi above mode 06 ...
> How do I find out if a certain mode is graphics ?
> Revised question:
> How do I find all INT 10h, ah=00h video modi that wil actually work
on > my (XP) 'puter ? (My "is it a graphical mode?" has become secondary).
VESA support is found within:
details are also reported in RBIL 104f00,104f01,014f02
(may need a few 66h override or split instructions)
(and I use some variables as code parts already)
push es
push ds
push 0x8400 ;buffer for returned data
pop es
xor di,di
mov ax,0x4f00
int 0x10
cmp ax,0x004f
jz vesa_ok
:no_vesa
...err-msg
pop/pop/ret
vesa_ok:
lds:si,[es:di+0x0e] ;ds:si points to mode list
mov ax,[es:di+0x12] ;
sll eax,16 ;mov ax to top and clear bottom
mov [cs:xxx+0x0c],eax ;current mode number
movzx eax,word[es:di+0x08] ;
movzx ecx,word[es:di+0x06] ;
sll eax,4
add eax,ecx
mov [cs:xxx+0x04],eax ;linear start address
... ;I get&store vesa version here.
;---
push 0x8420 ;buffer for modelist
pop es
xor di,di
CHECKLOOP:
mov cx,[si] ;
add si.0x02
cmp cx,0xffff ;end mark
jz pop_ret ;all done
mov ax.0x4f01
int 0x10 ;get info for mode number in cx
cmp ax,0x004f
jz error_ret
mov al,[es:di] :mode type (see below)
;store cx in text or graphic list but loop until endmark
---copied from RBIL---
Bitfields for VESA SuperVGA mode attributes:
Bit(s) Description (Table 00080)
0 mode supported by present hardware configuration
1 optional information available (must be =1 for VBE v1.2+)
2 BIOS output supported
3 set if color, clear if monochrome
4 set if graphics mode, clear if text mode *******
---VBE v2.0+ ---
5 mode is not VGA-compatible
6 bank-switched mode not supported
7 linear framebuffer mode supported
8 double-scan mode available (e.g. 320x200 and 320x240)
---VBE v3.0 ---
9 interlaced mode available
10 hardware supports triple buffering
11 hardware supports stereoscopic display
12 dual display start address support
13-15 reserved
---
The INT0x10_AH00 method isn't meant to be looped with all values,
so some may just lock up while others could damage (old) monitors.
And several numbers can represent both text and graphic modes.
many different modes are assigned to the same number by vendors.
So there is no way to tell which is what by using INT10_00.
there once were a list of available modes in the graphic card's BIOS.
__
wolfgang