INT10 4F07h - call in protected mode

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
Mirimar
Posts: 6
Joined: Fri Dec 13, 2013 6:50 am

INT10 4F07h - call in protected mode

Post 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
User avatar
KemyLand
Member
Member
Posts: 213
Joined: Mon Jun 16, 2014 5:33 pm
Location: Costa Rica

Re: INT10 4F07h - call in protected mode

Post 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 :) !
Happy New Code!
Hello World in Brainfuck :D:

Code: Select all

++++++++[>++++[>++>+++>+++>+<<<<-]>+>+>->>+[<]<-]>>.>---.+++++++..+++.>>.<-.<.+++.------.--------.>>+.>++.
[/size]
Mirimar
Posts: 6
Joined: Fri Dec 13, 2013 6:50 am

Re: INT10 4F07h - call in protected mode

Post 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.
User avatar
KemyLand
Member
Member
Posts: 213
Joined: Mon Jun 16, 2014 5:33 pm
Location: Costa Rica

Re: INT10 4F07h - call in protected mode

Post by KemyLand »

I won't read the whole document :roll: . Tell me in which page is that affirmation.
Happy New Code!
Hello World in Brainfuck :D:

Code: Select all

++++++++[>++++[>++>+++>+++>+<<<<-]>+>+>->>+[<]<-]>>.>---.+++++++..+++.>>.<-.<.+++.------.--------.>>+.>++.
[/size]
Mirimar
Posts: 6
Joined: Fri Dec 13, 2013 6:50 am

Re: INT10 4F07h - call in protected mode

Post 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.
User avatar
KemyLand
Member
Member
Posts: 213
Joined: Mon Jun 16, 2014 5:33 pm
Location: Costa Rica

Re: INT10 4F07h - call in protected mode

Post 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: .
Happy New Code!
Hello World in Brainfuck :D:

Code: Select all

++++++++[>++++[>++>+++>+++>+<<<<-]>+>+>->>+[<]<-]>>.>---.+++++++..+++.>>.<-.<.+++.------.--------.>>+.>++.
[/size]
Mirimar
Posts: 6
Joined: Fri Dec 13, 2013 6:50 am

Re: INT10 4F07h - call in protected mode

Post 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".
User avatar
KemyLand
Member
Member
Posts: 213
Joined: Mon Jun 16, 2014 5:33 pm
Location: Costa Rica

Re: INT10 4F07h - call in protected mode

Post 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: )
Happy New Code!
Hello World in Brainfuck :D:

Code: Select all

++++++++[>++++[>++>+++>+++>+<<<<-]>+>+>->>+[<]<-]>>.>---.+++++++..+++.>>.<-.<.+++.------.--------.>>+.>++.
[/size]
Mirimar
Posts: 6
Joined: Fri Dec 13, 2013 6:50 am

Re: INT10 4F07h - call in protected mode

Post 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.
User avatar
SpyderTL
Member
Member
Posts: 1074
Joined: Sun Sep 19, 2010 10:05 pm

Re: INT10 4F07h - call in protected mode

Post 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
Project: OZone
Source: GitHub
Current Task: LIB/OBJ file support
"The more they overthink the plumbing, the easier it is to stop up the drain." - Montgomery Scott
Post Reply