OSDev.org

The Place to Start for Operating System Developers
It is currently Thu Mar 28, 2024 3:16 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 15 posts ] 
Author Message
 Post subject: vesa information in bochs
PostPosted: Fri Jul 02, 2004 3:58 am 
Hi, when I call int 10h ax=4f00h in bochs, nothing happens I think Im doing something wrong. Im using VGABIOS-lgpl-latest with bochs 2.0. Im calling interrupt in 16 bit mode at boot time. Any suggestions are highly appreciated.


Top
  
 
 Post subject: Re:vesa information in bochs
PostPosted: Fri Jul 02, 2004 8:15 am 
//VBE documention thanks to VESA
Input: AX = 4F00h Return VBE Controller Information
ES:DI = Pointer to buffer in which to place
VbeInfoBlock structure
(VbeSignature should be set to 'VBE2' when
function is called to indicate VBE 3.0 information
is desired and the information block is 512 bytes in
size.)
Output: AX = VBE Return Status
Note: All other registers are preserved.
This required function returns the capabilities of the display controller, the revision level of the
VBE implementation, and vendor specific information to assist in supporting all display
controllers in the field.

/////////
So, all you would expect to get out of there is a return. I hope you aren't expecting to see everything turn into pretty pixels with one command.


//Boch's documents
Notes about VESA usage

Since Bochs version 1.4 it's possible to use VESA graphics. There are some limitations in the current implementation, but in general it should work ok (we have run several test programs, the XFree86 VESA display driver, etc)

NOTE: you will need to use the LGPL'ed VGABIOS in order for application to correctly detect VESA support.

Current limitations:

*

4bpp modes support is incomplete (8, 15, 16, 24 and 32bpp should work)
*

banked mode is very slow (if you can, just use Linear Frame Buffering instead!)
*

only 320x200, 640x400, 640x480, 800x600, 1024x768 are currently supported

Interesting Facts:

*

You need a display driver capable of using the VESA bios for this to work (a recent XFree86 will do, Windows 9x/NT/2K/XP probably will not work 'out of the box'.
*

Currently the VBE2 extension should be supported ok

//////
Hmmm, you seem to be doing all right but VESA ain't returning any info when calling a function. I have no idea why this would be. Try it on a real PC instead, or dump your VESA BIOS and then use that one for testing instead of the BOCH'S one.


Top
  
 
 Post subject: Re:vesa information in bochs
PostPosted: Fri Jul 02, 2004 9:30 am 
VESA detects fine with the lgpl vios, your code is buggy.


Top
  
 
 Post subject: Re:vesa information in bochs
PostPosted: Fri Jul 02, 2004 9:52 am 
Offline
Member
Member
User avatar

Joined: Sat Jan 15, 2005 12:00 am
Posts: 8561
Location: At his keyboard!
Hi,

Curufir wrote:
VESA detects fine with the lgpl vios, your code is buggy.


For VBE to work in Bochs you need the "VGABIOS-lgpl" BIOS and have a version of Bochs that was compiled with the "--enable-vbe" option....

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.


Top
 Profile  
 
 Post subject: Re:vesa information in bochs
PostPosted: Fri Jul 02, 2004 11:31 am 
Quote:
Since Bochs version 1.4 it's possible to use VESA graphics. There are some limitations in the current implementation, but in general it should work ok (we have run several test programs, the XFree86 VESA display driver, etc)


Quote:
Im using VGABIOS-lgpl-latest with bochs 2.0.


Top
  
 
 Post subject: Re:vesa information in bochs
PostPosted: Fri Jul 02, 2004 11:33 am 
So you say I should check if bochs is compiled with -enable vesa option. Is there a way to check this? BTW sanik you did not have to write all bochs vesa information here, I have already read all on the net.


Top
  
 
 Post subject: Re:vesa information in bochs
PostPosted: Fri Jul 02, 2004 11:38 am 
Umm, why are you asking to check the boch's source if you read the documentation like you said?

It's obvious, YOUR code is wrong, not the boch's. And, try it on your PC if you have second doubts.


Top
  
 
 Post subject: Re:vesa information in bochs
PostPosted: Fri Jul 02, 2004 12:43 pm 
Im not saying that bochs code is wrong, where did you get that impression from? Also code worked in real hardware so I think I should recompile bochs or any other suggestions?


Top
  
 
 Post subject: Re:vesa information in bochs
PostPosted: Fri Jul 02, 2004 3:34 pm 
Hmm. Well any binary from the Bochs site should have been compiled with that flag (As far as I know anyhow, I've never seen one that didn't have it). I'm guessing you didn't compile it, otherwise you'd know which flags it was compiled with :).

So that leaves either the code (Which is probably ok if it works on real hardware), the config file (You're 100% sure you're using the LGPL bios? I know for a fact the elpin one doesn't support VESA), or possibly (If you're on Linux) the binary your distro is packaging (Compiled without the flag).

Not a huge amount of help I'm afraid ;D.


Top
  
 
 Post subject: Re:vesa information in bochs
PostPosted: Fri Jul 02, 2004 3:51 pm 
Boch's users should provide more info on how they obtained their binary. It would speed up problem solving.


Top
  
 
 Post subject: Re:vesa information in bochs
PostPosted: Fri Jul 02, 2004 3:52 pm 
hey code is:
Code:
   mov ax, 0x04f00
   int 0x10

   cmp al, 0x4f
   jne VESA_function_not_supported

   VESA_function_supported:
   mov si, vesa_function_supported_msg
   call PRINTMSG

             jmp $

this is called just after booting in 16 bit mode. Now this should write vesa_function_supported_msg message if function is supported, right? This does not work on bochs but does work on real hardware.


Top
  
 
 Post subject: Re:vesa information in bochs
PostPosted: Fri Jul 02, 2004 4:22 pm 
Where is es:di pointing at?

It could be that on your real hardware es:di are pointing somewhere nice and valid, whereas on Bochs they are pointing somewhere strange that it doesn't like. Or (And this would be amusing) maybe your PRINTMSG function works on real hardware and not Bochs (That is highly unlikely, but would be hilarious).

Don't see anything wrong with the int call though, I do it exactly the same way (Although I verify VESA by checking for the sig, not the return from the interrupt). Just quickly tested your way on my Bochs and it works just fine.


Top
  
 
 Post subject: Re:vesa information in bochs
PostPosted: Wed Sep 08, 2004 9:02 am 
I can't find the Protected mode Vesa interface under bochs, someone used VBE under protected mode in bochs?


Top
  
 
 Post subject: Re:vesa information in bochs
PostPosted: Wed Sep 08, 2004 12:12 pm 
Federico Tomassetti wrote:
I can't find the Protected mode Vesa interface under bochs, someone used VBE under protected mode in bochs?


There isn't one. The protected mode stuff came in with late VBE2.0 and VBE3.0 compliant cards. Bochs/Qemu don't go that high.


Top
  
 
 Post subject: Re:vesa information in bochs
PostPosted: Wed Sep 08, 2004 11:33 pm 
Also, the VBE 3.0 protected mode interface is just plain busted on many popular video cards (my old nVidia TNT2 had the proper signatures declaring it supported it, but if you tried to call it, it would crash the system). VBE 2.0's protected mode interface is better supported, but utterly useless. In short, don't waste your time trying to figure out how to use the VBE protected mode interface (either 2.0 or 3.0), there's no point -- if you support it, you'll quickly discover that hardware manufacturers don't. Just set things up as you need from real mode and limp along like that until you get virtual-8086 mode working or implement hardware specific video drivers.


Top
  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 15 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: Google [Bot] and 60 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group