Page 1 of 3

Is entering VBE modes is real without interrupts or VM86?

Posted: Tue Sep 22, 2015 9:12 am
by abcdef4bfd
I need them, but i don't have the VM8086, because i need GPF handler, but i don't did it today. I'm planning to add it, but today is i'm going wrong and i really need to VM8086 or entering VBE modes is real without interrupts or VM86?

Re: Is entering VBE modes is real without interrupts or VM86

Posted: Tue Sep 22, 2015 9:19 am
by BrightLight
To enter high resolution modes, you'll need VBE. Of course, it is possible to write graphics cards drivers, but I don't think you have time to write a driver for every card you wish to support.
An easy solution (if your kernel is loaded below 1 MB) is to switch back to real mode and do the mode switching and return to protected mode. If you use GRUB, you can tell it to set a VBE mode for you. If your kernel is above 1 MB and you don't want GRUB to set a mode, your only solution is to use v8086. Set up a small v8086 stub in low memory that will call the BIOS for you.

Re: Is entering VBE modes is real without interrupts or VM86

Posted: Tue Sep 22, 2015 9:34 am
by glauxosdever
Hi,

catnikita255 wrote:I need them, but i don't have the VM8086, because i need GPF handler, but i don't did it today. I'm planning to add it, but today is i'm going wrong and i really need to VM8086 or entering VBE modes is real without interrupts or VM86?
Your grammar and syntax don't seem to be understandable by everyone. I did my best to decode your question and I'll try to answer it.

If you want to use VBE modes, either use INT 0x10 while in real mode, either tell GRUB to do it. I'm not familiar with other easy ways. The next way would be to use virtual 8086 mode, but you don't want that either.

The ideal would be to write your own video drivers for each card you plan to support, as they can be used directly from protected mode, but that's really hard. Probably not for you yet.


Regards,
glauxosdever

Re: Is entering VBE modes is real without interrupts or VM86

Posted: Tue Sep 22, 2015 9:34 am
by abcdef4bfd
omarrx024 wrote:To enter high resolution modes, you'll need VBE. Of course, it is possible to write graphics cards drivers, but I don't think you have time to write a driver for every card you wish to support.
An easy solution (if your kernel is loaded below 1 MB) is to switch back to real mode and do the mode switching and return to protected mode. If you use GRUB, you can tell it to set a VBE mode for you. If your kernel is above 1 MB and you don't want GRUB to set a mode, your only solution is to use v8086. Set up a small v8086 stub in low memory that will call the BIOS for you.
Thank you very much. How to tell GRUB to set VBE mode? Is modules is needed, or changes in the grub.cfg?

Re: Is entering VBE modes is real without interrupts or VM86

Posted: Tue Sep 22, 2015 9:40 am
by glauxosdever
Hi,

catnikita255 wrote:
omarrx024 wrote:To enter high resolution modes, you'll need VBE. Of course, it is possible to write graphics cards drivers, but I don't think you have time to write a driver for every card you wish to support.
An easy solution (if your kernel is loaded below 1 MB) is to switch back to real mode and do the mode switching and return to protected mode. If you use GRUB, you can tell it to set a VBE mode for you. If your kernel is above 1 MB and you don't want GRUB to set a mode, your only solution is to use v8086. Set up a small v8086 stub in low memory that will call the BIOS for you.
Thank you very much. How to tell GRUB to set VBE mode? Is modules is needed, or changes in the grub.cfg?
If you answered this quickly, it means you didn't do any searching. I already found the answer (I didn't know it).

Edit: I now saw that between omarrx024's post and yours, there was an interval somewhat greater than I thought. But still, you didn't search previously.


Regards,
glauxosdever

Re: Is entering VBE modes is real without interrupts or VM86

Posted: Tue Sep 22, 2015 9:41 am
by abcdef4bfd
glauxosdever wrote:Hi,

catnikita255 wrote:
omarrx024 wrote:To enter high resolution modes, you'll need VBE. Of course, it is possible to write graphics cards drivers, but I don't think you have time to write a driver for every card you wish to support.
An easy solution (if your kernel is loaded below 1 MB) is to switch back to real mode and do the mode switching and return to protected mode. If you use GRUB, you can tell it to set a VBE mode for you. If your kernel is above 1 MB and you don't want GRUB to set a mode, your only solution is to use v8086. Set up a small v8086 stub in low memory that will call the BIOS for you.
Thank you very much. How to tell GRUB to set VBE mode? Is modules is needed, or changes in the grub.cfg?
If you answered this quickly, it means you didn't do any searching. I already found the answer (I didn't know it).


Regards,
glauxosdever
Ok, i'll enter Google now.

Re: Is entering VBE modes is real without interrupts or VM86

Posted: Tue Sep 22, 2015 10:04 am
by Octocontrabass
There is another option that no one seems to have mentioned yet: use an emulator to run int 0x10.

Re: Is entering VBE modes is real without interrupts or VM86

Posted: Tue Sep 22, 2015 10:06 am
by abcdef4bfd
I'm searched Google, found some answers, but they are all for Linux. So i'm asking here.

Re: Is entering VBE modes is real without interrupts or VM86

Posted: Tue Sep 22, 2015 10:10 am
by glauxosdever
Hi,

Octocontrabass wrote:There is another option that no one seems to have mentioned yet: use an emulator to run int 0x10.
Doesn't this emulator need vitrual 8086 mode? So it's basically the same, only a bit harder.
catnikita255 wrote:I'm searched Google, found some answers, but they are all for Linux. So i'm asking here.
GRUB is the same for all systems.


Regards,
glauxosdever

Re: Is entering VBE modes is real without interrupts or VM86

Posted: Tue Sep 22, 2015 10:12 am
by abcdef4bfd
glauxosdever wrote:Hi,

Octocontrabass wrote:There is another option that no one seems to have mentioned yet: use an emulator to run int 0x10.
Doesn't this emulator mentioning need vitrual 8086 mode? So it's basically the same, only a bit harder. :?
catnikita255 wrote:I'm searched Google, found some answers, but they are all for Linux. So i'm asking here.
GRUB is the same for all systems.


Regards,
glauxosdever
I know that GRUB is the same for all systems, but why nor GRUB_GFXMODE, nor vbemode is not working?

Re: Is entering VBE modes is real without interrupts or VM86

Posted: Tue Sep 22, 2015 10:15 am
by glauxosdever
Hi,

catnikita255 wrote:but why nor GRUB_GFXMODE, nor vbemode is not working?
Have you actually tried?


Regards,
glauxosdever

Re: Is entering VBE modes is real without interrupts or VM86

Posted: Tue Sep 22, 2015 10:19 am
by abcdef4bfd
glauxosdever wrote:Hi,

catnikita255 wrote:but why nor GRUB_GFXMODE, nor vbemode is not working?
Have you actually tried?


Regards,
glauxosdever
Yes. I'm written it in grub.cfg after multiboot "boot/os365.bin".

Re: Is entering VBE modes is real without interrupts or VM86

Posted: Tue Sep 22, 2015 10:27 am
by glauxosdever
Hi,

catnikita255 wrote:Yes. I'm written it in grub.cfg after multiboot "boot/os365.bin".
You wrote it in grub.cfg after multiboot "boot/os365.bin". Please rephrase it. Have you tested it?

Note: In Bochs you will need to install Bochs VESA extensions, as the bare emulator emulates only a VGA card.


Regards,
glauxosdever

Re: Is entering VBE modes is real without interrupts or VM86

Posted: Tue Sep 22, 2015 10:31 am
by abcdef4bfd
glauxosdever wrote:Hi,

catnikita255 wrote:Yes. I'm written it in grub.cfg after multiboot "boot/os365.bin".
You wrote it in grub.cfg after multiboot "boot/os365.bin". Please rephrase it. Have you tested it?

Note: In Bochs you will need to install Bochs VESA extensions, as the bare emulator emulates only a VGA card.


Regards,
glauxosdever
I'm tested it on QEMU.

Re: Is entering VBE modes is real without interrupts or VM86

Posted: Tue Sep 22, 2015 11:00 am
by Octocontrabass
glauxosdever wrote:Doesn't this emulator need vitrual 8086 mode? So it's basically the same, only a bit harder.
No, there is no need for any particular CPU features (and it could even run on a non-x86 platform, though that probably wouldn't work). 64-bit Windows uses an emulator to set the video mode when there's no graphics driver available.