OSDev.org

The Place to Start for Operating System Developers
It is currently Thu May 16, 2024 5:00 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 20 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: VBE3.0 protected mode interface
PostPosted: Fri Feb 24, 2006 12:00 am 
Offline

Joined: Fri Sep 09, 2005 11:00 pm
Posts: 22
Location: China
In vbe3.0,there has offered a method with which we can call the vbe bios directly in protected mode.
But I wrote a code in according to the steps on the vbe3.0 specification,but It does not work!!!
Have anybody wrote a code like this,Could you help me?
many thanks.

_________________
I like the Dream of the Red Chamber.


Top
 Profile  
 
 Post subject: Re: VBE3.0 protected mode interface
PostPosted: Fri Feb 24, 2006 12:00 am 
Offline
Member
Member
User avatar

Joined: Sat Nov 20, 2004 12:00 am
Posts: 382
Location: Wellesley, Ontario, Canada
Does your video card support VBE 3.0?

--Jeff


Top
 Profile  
 
 Post subject: Re: VBE3.0 protected mode interface
PostPosted: Fri Feb 24, 2006 12:00 am 
Offline

Joined: Fri Sep 09, 2005 11:00 pm
Posts: 22
Location: China
yes,

_________________
I like the Dream of the Red Chamber.


Top
 Profile  
 
 Post subject: Re: VBE3.0 protected mode interface
PostPosted: Sat Feb 25, 2006 12:00 am 
Offline
Member
Member
User avatar

Joined: Fri Oct 22, 2004 11:00 pm
Posts: 158
Location: Vlaardingen, Holland
I wrote it once, but unfortunatly failed :( Anyway, If you post your code here maybe one of us can help you ;) Maybe I can find some code I wrote back then. I'm lazy so I didn't put much effort in VBE3.0 My problem was my system rebooted when I tried to call the vbe init call, which initializes all structures. Still don't know what went wrong.

_________________
The source of my problems is in the source.


Top
 Profile  
 
 Post subject: Re: VBE3.0 protected mode interface
PostPosted: Sat Feb 25, 2006 12:00 am 
Offline
Member
Member
User avatar

Joined: Fri Oct 22, 2004 11:00 pm
Posts: 158
Location: Vlaardingen, Holland
Found some of my old code :

vbe.cpp

Maybe it helps ;) If so I would like to know how you did it ;):P

_________________
The source of my problems is in the source.


Last edited by matthias on Sat Feb 25, 2006 12:00 am, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: VBE3.0 protected mode interface
PostPosted: Sat Feb 25, 2006 12:00 am 
Offline

Joined: Fri Sep 09, 2005 11:00 pm
Posts: 22
Location: China
thanks above guys.

But It still not work,
I traced the program with bochs,
And I know where the problem is : div ax,cx
ax=0,cx=0; odd!!!!

I think,the VBE3.0 BIOS has problem. And I try several other vedio card, they also have many problems. the bios is invalid!!!

_________________
I like the Dream of the Red Chamber.


Top
 Profile  
 
 Post subject: Re: VBE3.0 protected mode interface
PostPosted: Sun Feb 26, 2006 12:00 am 
Offline
Member
Member
User avatar

Joined: Wed Oct 27, 2004 11:00 pm
Posts: 874
Location: WA
if all the video cards you tryed support VBE3, and it doesn't work on any of them, then the problem is with your code, not the cards --- however, remember, if you are testing in bochs, you are not using the video card, and changing the card in the computer won't make any difference (you have to test on real hardware for that)

that error prob means your passing the wrong arguments (a divide by zero, using argument you passed -- or were supposed to pass)

_________________
## ---- ----- ------ Intel Manuals
OSdev wiki


Top
 Profile  
 
 Post subject: Re: VBE3.0 protected mode interface
PostPosted: Sun Feb 26, 2006 12:00 am 
Offline

Joined: Fri Sep 09, 2005 11:00 pm
Posts: 22
Location: China
I traced the code, and found that the vbe3 bios actually have the similar errors, load register es with 0.

_________________
I like the Dream of the Red Chamber.


Top
 Profile  
 
 Post subject: Re: VBE3.0 protected mode interface
PostPosted: Sun Feb 26, 2006 12:00 am 
Offline
Member
Member

Joined: Tue Oct 26, 2004 11:00 pm
Posts: 144
Location: Australia
Does VBE3 have full VBE support...I heard somewhere that VBE3 protected mode didn't support all the functions that VBE3 real mode does...

_________________
Two things are infinite: The universe and human stupidity. But I'm not quite sure about the universe.
--- Albert Einstein


Top
 Profile  
 
 Post subject: Re: VBE3.0 protected mode interface
PostPosted: Mon Feb 27, 2006 12:00 am 
Offline
Member
Member
User avatar

Joined: Wed Oct 27, 2004 11:00 pm
Posts: 874
Location: WA
no, for example, i don't think there is a 'plot pixel' function, nor is there any 'teletype' functions -- VBE3 doesn't include any functions to draw -- but those are not really important anyway

it does include mode changing, and bank-switching however, which is the most important

you may be thinking of VBE2, whose PMode interface doesn't include some important functions, but vbe3 is fully functional

_________________
## ---- ----- ------ Intel Manuals
OSdev wiki


Top
 Profile  
 
 Post subject: Re: VBE3.0 protected mode interface
PostPosted: Mon Feb 27, 2006 12:00 am 
Offline
Member
Member
User avatar

Joined: Fri Oct 22, 2004 11:00 pm
Posts: 158
Location: Vlaardingen, Holland
But very difficult to initialize as I found :( does anyone have a idea what is wrong with my code?

_________________
The source of my problems is in the source.


Last edited by matthias on Mon Feb 27, 2006 12:00 am, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: VBE3.0 protected mode interface
PostPosted: Tue Feb 28, 2006 12:00 am 
Offline
Member
Member
User avatar

Joined: Wed Oct 27, 2004 11:00 pm
Posts: 874
Location: WA
do you have the official vbe3 documents? or just a tut? or unofficial docs?

if you don't have it, get the official docs, as they will be more accurate and more complete than others

_________________
## ---- ----- ------ Intel Manuals
OSdev wiki


Top
 Profile  
 
 Post subject: Re: VBE3.0 protected mode interface
PostPosted: Tue Feb 28, 2006 12:00 am 
Offline
Member
Member
User avatar

Joined: Fri Oct 22, 2004 11:00 pm
Posts: 158
Location: Vlaardingen, Holland
I've printed all pages of the official vbe 3.0 documentation.. over 300 pages :S I just wrote the code according what they had to say in the vbe 3.0 specifications. But it doesn't work :S A reboot finds place when I try to call the PMInit vbe-call.

_________________
The source of my problems is in the source.


Top
 Profile  
 
 Post subject: Re: VBE3.0 protected mode interface
PostPosted: Tue Feb 28, 2006 12:00 am 
Offline
Member
Member
User avatar

Joined: Wed Oct 27, 2004 11:00 pm
Posts: 874
Location: WA
i was actually talking to the original poster, but i don't have expirience with vbe3 yet myself (just started over actually, but having trouble finding time to code)

_________________
## ---- ----- ------ Intel Manuals
OSdev wiki


Top
 Profile  
 
 Post subject: Re: VBE3.0 protected mode interface
PostPosted: Tue Feb 28, 2006 12:00 am 
Offline

Joined: Fri Sep 09, 2005 11:00 pm
Posts: 22
Location: China
I have the official document too.

And When I called the PMInitialize in 16-bit protected cs selector,the computer reboots!!!

And I tranced the code, the problem is that in ASM:

....
db 66h
ret

so you can see that we called veb3 initializing code with call fword ptr[ init],it is a far call,but the bios code is a "near return"!!! this is the problem in vbe3 bios.

But when i correct the problem by replacing "ret" with "retf",the initializing function was successed.
however, when I called the "Set Mode Function" by a far call at the "EntryPoint ", another problem arosed:
sub bx,bx;
mov es,bx
lea di,es:[si]
odd!!!! ,the bios laod es with 0,and use this zero selector,it surely be a "protected error"!!!

after I remedied this error by loading es with 0x100000(the relocated bios address),and called again, yet a further error appeard: div ax,cx;
ax=bx=0; REDICULOUS!!!!!

And I fond that different vedio card have different error in calling vbe3 bios.

I wonder whether the designers have tested the code they wrote!!!!

_________________
I like the Dream of the Red Chamber.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 20 posts ]  Go to page 1, 2  Next

All times are UTC - 6 hours


Who is online

Users browsing this forum: Google [Bot] and 12 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