Page 1 of 1

INT10 4F07h - call in protected mode

Posted: Fri Jan 02, 2015 5:10 pm
by Mirimar
Hallo there,

http://www.phatcode.net/res/221/files/vbe20.pdf says that i could call int10 0x4F07 in protected mode also, but i don't get it.

Has somone allready experience with this stuff?

Code: Select all

__asm__ __volatile__ (
        "movw $0x4F07, %ax;"
        "movb $0, %bl;"
        "movw $0, %cx;"
        "movw $0x20, %dx;"
        "int  $0x10;");
I tried the code above... it should set the framebuffer to scanline 32 - yeah not very helpfull, should only be a test. But it does nothing.

Thank.
Regards

Re: INT10 4F07h - call in protected mode

Posted: Fri Jan 02, 2015 5:14 pm
by KemyLand
Hi!

You cannot use BIOS interrupts on protected mode! Have you read the OSDev wiki? There's a lot of useful information on there. You may specially like this article :wink: . Feel free to post any other questions you have :) !

Re: INT10 4F07h - call in protected mode

Posted: Fri Jan 02, 2015 5:26 pm
by Mirimar
KemyLand wrote:Hi!

You cannot use BIOS interrupts on protected mode! Have you read the OSDev wiki? There's a lot of useful information on there. You may specially like this article :wink: . Feel free to post any other questions you have :) !
Thanks for your reply :)

My SVGA mode is allready working. I've just mapped the buffer into user space, but it's no fun without double buffering. VESA v2.0 defines that INT10 4F07h is also available in protected mode, but i can't figure out how this should work. Is there another way to achieve double buffering? But it's clear to me that i need to tell the VESA-Device to swap the buffer somehow.

Re: INT10 4F07h - call in protected mode

Posted: Fri Jan 02, 2015 5:34 pm
by KemyLand
I won't read the whole document :roll: . Tell me in which page is that affirmation.

Re: INT10 4F07h - call in protected mode

Posted: Fri Jan 02, 2015 5:37 pm
by Mirimar
KemyLand wrote:I won't read the whole document :roll: . Tell me in which page is that affirmation.
Sorry ;)

EDIT: http://www.lowlevel.eu/wiki/VESA_BIOS_Extensions <- see VBE im Protected Mode
Forget about this link, that's german ;)

In the document you could read page 38. But you are right, they talk about function Pointers and Ports and Tables. But I do not find clear information about all this stuff.

Re: INT10 4F07h - call in protected mode

Posted: Fri Jan 02, 2015 5:46 pm
by KemyLand
(Still couldn't find the affirmation)

Well, the basic mix is to use I/O instructions to output data to CPU ports. Elaborate a little what do you do not understand. BTW, post some contents of that document, I couldn't find anything of what you said. What does that tables are? Sorry, I haven't worked with VBE VESA earlier :lol: .

Re: INT10 4F07h - call in protected mode

Posted: Fri Jan 02, 2015 5:56 pm
by Mirimar
This required function call returns a pointer to a table that contains code for a 32-bit protected mode interface that can either be copied into local 32-bit memory space or can be executed from ROM providing the calling application sets all required selectors and I/O access correctly. This function returns a pointer (in real mode space) with offsets to the code fragments, and additionally returns an offset to a table which contains Non-VGA Port and Memory locations which an Application may have to have I/O access to
Ok, let's asume i would find the ports used to talk to my graphic's hardware. Were could i find documentation about it?

Let's asume something completly else ... Let's asume I would never had read something about all this stuff, what is the best way to simply swap Framebuffers for VESA Devices? :D

I can't find anything helpfull when I search for "vbe protected mode interface".

Re: INT10 4F07h - call in protected mode

Posted: Fri Jan 02, 2015 6:19 pm
by KemyLand
As I said, I have no knowledge about VBE VESA, so there's little I can do on here on :? . What I know is that you should be able to use a device-independent way to talking to VBE VESA. Graphic cards programming is really complex, specific, and damn intensive. Finding complete documentation is also like pretty hard. (Now expecting someone who has read VBE VESA specifications to come and help :lol: )

Re: INT10 4F07h - call in protected mode

Posted: Fri Jan 02, 2015 6:26 pm
by Mirimar
KemyLand wrote:As I said, I have no knowledge about VBE VESA, so there's little I can do on here on :? . What I know is that you should be able to use a device-independent way to talking to VBE VESA. Graphic cards programming is really complex, specific, and damn intensive. Finding complete documentation is also like pretty hard. (Now expecting someone who has read VBE VESA specifications to come and help :lol: )
At least you tried ;) Thank's alot. I'm not interrested in writing a complete graphics driver at the moment, that's just too much, but it would be very nice to figure out how to use the VESA 2.0 feature of buffers, it sounds so easy but when I google that stuff everybody just says that nobody should try that - frustrating. The tearing on higher resolutions is aweful and i don't want to spend so much memory and and computation time on creating and copying a software buffer.

Re: INT10 4F07h - call in protected mode

Posted: Fri Jan 02, 2015 7:44 pm
by SpyderTL
If supported, VBE provides a BIOS call that will give you the address of a 32-bit protected mode function that can be called instead of using INT 10h.

You can find more details in the VBE 3.0 specifications documentation.
http://www.petesqbsite.com/sections/tut ... s/vbe3.pdf