OSDev.org
https://forum.osdev.org/

vesa information in bochs
https://forum.osdev.org/viewtopic.php?f=1&t=9655
Page 1 of 1

Author:  Ozguxxx [ Fri Jul 02, 2004 3:58 am ]
Post subject:  vesa information in bochs

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.

Author:  SANiK [ Fri Jul 02, 2004 8:15 am ]
Post subject:  Re:vesa information in bochs

//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.

Author:  Curufir [ Fri Jul 02, 2004 9:30 am ]
Post subject:  Re:vesa information in bochs

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

Author:  Brendan [ Fri Jul 02, 2004 9:52 am ]
Post subject:  Re:vesa information in bochs

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

Author:  SANiK [ Fri Jul 02, 2004 11:31 am ]
Post subject:  Re:vesa information in bochs

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.

Author:  Ozguxxx [ Fri Jul 02, 2004 11:33 am ]
Post subject:  Re:vesa information in bochs

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.

Author:  SANiK [ Fri Jul 02, 2004 11:38 am ]
Post subject:  Re:vesa information in bochs

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.

Author:  Ozguxxx [ Fri Jul 02, 2004 12:43 pm ]
Post subject:  Re:vesa information in bochs

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?

Author:  Curufir [ Fri Jul 02, 2004 3:34 pm ]
Post subject:  Re:vesa information in bochs

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.

Author:  SANiK [ Fri Jul 02, 2004 3:51 pm ]
Post subject:  Re:vesa information in bochs

Boch's users should provide more info on how they obtained their binary. It would speed up problem solving.

Author:  Ozguxxx [ Fri Jul 02, 2004 3:52 pm ]
Post subject:  Re:vesa information in bochs

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.

Author:  Curufir [ Fri Jul 02, 2004 4:22 pm ]
Post subject:  Re:vesa information in bochs

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.

Author:  Federico Tomassetti [ Wed Sep 08, 2004 9:02 am ]
Post subject:  Re:vesa information in bochs

I can't find the Protected mode Vesa interface under bochs, someone used VBE under protected mode in bochs?

Author:  Curufir [ Wed Sep 08, 2004 12:12 pm ]
Post subject:  Re:vesa information in bochs

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.

Author:  Dreamsmith [ Wed Sep 08, 2004 11:33 pm ]
Post subject:  Re:vesa information in bochs

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.

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/