Vesa: Problem with Mode Info

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
BehindTheScenes

Vesa: Problem with Mode Info

Post 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
User avatar
Brendan
Member
Member
Posts: 8561
Joined: Sat Jan 15, 2005 12:00 am
Location: At his keyboard!
Contact:

Re:Vesa: Problem with Mode Info

Post 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
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
BehindTheScenes

Re:Vesa: Problem with Mode Info

Post by BehindTheScenes »

ohh, i have a function that modify the es register ... ups
BehindTheScenes

Re:Vesa: Problem with Mode Info

Post by BehindTheScenes »

ITS WORK

big thx
Post Reply