How to enter graphics mode?
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
Re: How to enter graphics mode?
If you insist on not using the firmware, your pilgrimage starts here. Expect nobody to be able answer your questions past this point if you do.
Re: How to enter graphics mode?
Define "well". VESA BIOS extensions are old and obsolete interfaces to the graphics card. It is the fastest and easiest way to get to the graphics, but fastest != best. You should use VBE as a fallback and then try to write some card-specific drivers. I suggest you to begin with an older and simpler GPU or try to understand Linux code, if you really want Nvidia (because Nvidia doesn't provide any documentation, unfortunately).reload wrote:Ok, I see I can do this well only with BIOS, right?
"If you don't fail at least 90 percent of the time, you're not aiming high enough."
- Alan Kay
- Alan Kay
Re: How to enter graphics mode?
Shouldn't he also consider looking at drivers/gpu/drm/nouveau? Or it's not necessary?Combuster wrote:If you insist on not using the firmware, your pilgrimage starts here. Expect nobody to be able answer your questions past this point if you do.
"If you don't fail at least 90 percent of the time, you're not aiming high enough."
- Alan Kay
- Alan Kay
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
Re: How to enter graphics mode?
If you read the exact wording, you'll notice that question is already answered.
Re: How to enter graphics mode?
It is possible to write directly to the VGA registers, but there are some things to consider:reload wrote:Ok, I see I can do this well only with BIOS, right?
- The graphics adapter must be VGA-compatible.
- The graphics adapter must be in a VGA-compatible mode, that's to say, card-specific registers must not be currently taken into account and VGA registers must be taken into account by the adapter so that you can actually change the video mode by modifying them.
- The maximum resolution will be 720*480 pixels, with only 16 colors.
- There will be only 256KB of video memory, so you can get 2 video pages with a resolution of 640*400, but you'll get only 1 video page with higher resolutions.
- Memory addressing will be bit-planar, but this shouldn't be a big problem once you write routines to update parts of the screen from your software framebuffer.
Anyway, you should use v86 mode, not only for VESA, but also in case you want to add DOS compatibility to your OS, or for supporting more BIOS interrupts.
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
Re: How to enter graphics mode?
Now there's a really bad idea.Unsigned wrote:Anyway, you should use v86 mode, not only for VESA, but also in case you want to add DOS compatibility to your OS, or for supporting more BIOS interrupts.
Video BIOS interrupts already assume control over the entire video card and on several occasions more than that. Other BIOS interrupts assume control over the entire computer. Going along with the former is doable, but you already interfered with the latter if you've got any decent protected mode setup, and you're just begging for the system to halt and catch fire if you try any interrupt other than int 0x10.
Re: How to enter graphics mode?
Yes, that's true.
I just said that as a suggestion, but in reality there's no need to use the other BIOS interrupts like, say, Plug and Play. It's better to write drivers for that.
As far as I can remember, the VESA specification says VBE functions should be given access to the PCI configuration registers. And since they don't provide information about the ports the card needs, the v86 task should be given access to any port belonging to detected graphics adapters, as well as ports belonging to non-detected (non-Plug and Play) graphics adapters too. So basically, to be sure it will work, the v86 task would be given access to all the ports, except those ones which belong to detected, non-graphics devices.
I just said that as a suggestion, but in reality there's no need to use the other BIOS interrupts like, say, Plug and Play. It's better to write drivers for that.
As far as I can remember, the VESA specification says VBE functions should be given access to the PCI configuration registers. And since they don't provide information about the ports the card needs, the v86 task should be given access to any port belonging to detected graphics adapters, as well as ports belonging to non-detected (non-Plug and Play) graphics adapters too. So basically, to be sure it will work, the v86 task would be given access to all the ports, except those ones which belong to detected, non-graphics devices.