Page 1 of 1

Vesa: Problem with Mode Info

Posted: Sat Oct 14, 2006 3:01 am
by BehindTheScenes
hi,

i have a problem with Vesa and the 0x4F01 function.

here my code:
   mov ax, 0x4F00   
   mov di, VbeInfoBlock         
   int 0x10            
   
.1:
   mov cx, 0x114
   mov ax, 0x4F01   
   mov di, ModeInfoBlock         
   int 0x10
   mov dx, [XResolution]
   cli
   hlt
I have tested other modes, too, but in the bochs dump the dx register ist allways 0
00539154000-i-@000000a2-[CPU0 ] | EAX=0000004f EBX=00000000 ECX=00000115 EDX=00000000
00539154000-i-@000000a2-[CPU0 ] | ESP=0000fffe EBP=00000000 ESI=00007cde EDI=00008326
00539154000-i-@000000a2-[CPU0 ] | IOPL=0 id vip vif ac vm rf nt of df if tf sf zf af pf cf
00539154000-i-@000000a2-[CPU0 ] | SEG selector base limit G D
00539154000-i-@000000a2-[CPU0 ] | SEG sltr(index|ti|rpl) base limit G D
00539154000-i-@000000a2-[CPU0 ] | CS:0800( 1e00| 0| 0) 00008000 0000ffff 0 0
00539154000-i-@000000a2-[CPU0 ] | DS:0000( 0000| 0| 0) 00000000 0000ffff 0 0
00539154000-i-@000000a2-[CPU0 ] | SS:0000( 0000| 0| 0) 00000000 0000ffff 0 0
00539154000-i-@000000a2-[CPU0 ] | ES:07e0( 0000| 0| 0) 00007e00 0000ffff 0 0
00539154000-i-@000000a2-[CPU0 ] | FS:0000( 0000| 0| 0) 00000000 0000ffff 0 0
00539154000-i-@000000a2-[CPU0 ] | GS:0000( 0000| 0| 0) 00000000 0000ffff 0 0
00539154000-i-@000000a2-[CPU0 ] | EIP=000000a2 (000000a2)
00539154000-i-@000000a2-[CPU0 ] | CR0=0x00000010 CR1=0 CR2=0x00000000
00539154000-i-@000000a2-[CPU0 ] | CR3=0x00000000 CR4=0x00000000
an here my vesa structures:

http://pastecode.com/6563 <-- (The structures was to long ^^)

PS: i am in RealMode and A20 gate ist enabled. I user FASM and bochs

thx

Re:Vesa: Problem with Mode Info

Posted: Sat Oct 14, 2006 3:41 am
by Brendan
Hi,

VESA function 0x4F01 needs the address of the mode info buffer in ES:DI, while you're trying to read from this buffer using DS. Because ES != DS you're either reading from the wrong address, or telling VESA to store the buffer at the wrong address....


Cheers,

Brendan

Re:Vesa: Problem with Mode Info

Posted: Sat Oct 14, 2006 3:49 am
by BehindTheScenes
ohh, i have a function that modify the es register ... ups

Re:Vesa: Problem with Mode Info

Posted: Sat Oct 14, 2006 3:55 am
by BehindTheScenes
ITS WORK

big thx