Page 2 of 2

Re: how to use vga in protected mode?

Posted: Wed Jul 09, 2008 3:09 am
by Karlosoft
ehm i've only now seen your answers, because i was on holiday!!! So i must use the vga-port to change the screen-resolution without using real mode?

Re: how to use vga in protected mode?

Posted: Wed Jul 09, 2008 6:36 am
by lukem95
yes... it's been said many times on this forum. use the wiki

Re: how to use vga in protected mode?

Posted: Thu Jul 10, 2008 3:47 am
by Karlosoft
Yes but i've some problems with English... i can't read other topics, i'll be crazy :)

Re: how to use vga in protected mode?

Posted: Thu Jul 10, 2008 9:14 am
by Karlosoft
Karlosoft wrote:i'll be crazy
ehm i forgot the come of become in my keyboard :D! sorry :)

Re: how to use vga in protected mode?

Posted: Sun Jul 13, 2008 2:38 pm
by Combuster
Having a good knowledge of english is a pre. Just keep practicing until you are crazy, like the rest of us :twisted:

Re:

Posted: Thu Jan 19, 2017 4:45 pm
by MichaelPetch
crbenesch wrote: In my OS, I drop out of PMode, use BIOS and go right back, after having it do the function to get a linear framebuffer and the video mode info. Its really pretty easy, the whole code fits into 128 bytes of assembled code. I've attached the source file here. A few pointers though:

[snip]

In other words, youll have to tweak it to fit your OS design, but it does what you want.
On Stackoverflow.com (SO) we ended up having a question regarding your VESA code. As you mentioned you'd have to fit it into your OS design. The SO question was related to Multiboot code calling your VESA driver. As an addendum to your code, I answered with a variation on your code with a workable Multiboot 32-bit kernel.

Re: Re:

Posted: Thu Jan 19, 2017 9:11 pm
by Schol-R-LEA
MichaelPetch wrote:
crbenesch wrote: In my OS, I drop out of PMode, use BIOS and go right back, after having it do the function to get a linear framebuffer and the video mode info. Its really pretty easy, the whole code fits into 128 bytes of assembled code. I've attached the source file here. A few pointers though:

[snip]

In other words, youll have to tweak it to fit your OS design, but it does what you want.
On Stackoverflow.com (SO) we ended up having a question regarding your VESA code. As you mentioned you'd have to fit it into your OS design. The SO question was related to Multiboot code calling your VESA driver. As an addendum to your code, I answered with a variation on your code with a workable Multiboot 32-bit kernel.
<snark mode="petty and vindictive">
Does Sewage Overflow discourage users from checking the dates before replying?
</snark>

On a more serious note, a lot of this is in the OSDev wiki, as already stated. Still, any additional sources of information, I guess, and better late than never...

Re: how to use vga in protected mode?

Posted: Fri Jan 20, 2017 9:57 am
by WaterOS
VGA is everywhere these days...

Re: how to use vga in protected mode?

Posted: Fri Jan 20, 2017 3:27 pm
by dozniak
WaterOS wrote:VGA is everywhere these days...
I'd say VGA is pretty much nowhere these days...

Re: how to use vga in protected mode?

Posted: Fri Jan 20, 2017 3:54 pm
by Agola
Using VGA in protected mode is easy, you need to write VGA registers directly, because you can't use BIOS interrupts in protected mode, assume you know :|
http://wiki.osdev.org/VGA_Hardware has a great reference for registers, and dumps for various VGA modes.

http://files.osdev.org/mirrors/geezer/o ... cs/modes.c has example codes and register dumps also.

After you set the mode, you can use VGA memory to set pixels.

If you want to use higher resolutions, you will need to write drivers for specific graphic card. You can use VBE also, but it needs BIOS interrupts that doesn't available in protected mode. VBE 3.0 has a Protected Mode Interface can be searched with "PMID" keyword, but support on graphic cards is plain bad. You can write a Virtual 8086 monitor to execute BIOS interrupts, or you can use a 8086 emulator and redirect virtual port in/outs to real hardware. (Look at http://wiki.osdev.org/Drawing_In_Protected_Mode)

Re: Re:

Posted: Fri Jan 20, 2017 6:30 pm
by MichaelPetch
Schol-R-LEA wrote: <snark mode="petty and vindictive">
Does Sewage Overflow discourage users from checking the dates before replying?
</snark>

On a more serious note, a lot of this is in the OSDev wiki, as already stated. Still, any additional sources of information, I guess, and better late than never...
Although you were being *snarky*, I was well aware that this thread was many years old. I'm not the one who dug up this code from this forum and then asked a question about it on Stackoverflow. One might ask the question - If this Forum is so good why don't people actually ask questions here? Maybe because responses like yours are a problem? (whether being funny or not).

I provided a link to the SO question for anyone else who stumbles on this thread. Clearly people are reading it years later.

It is rather unfortunate that a site like OSDev's Forum has so many egotistical, narcissistic douche bags responding that users feel compelled to use the services of a better run, better maintained site like Stackoverflow to get answers to questions related to information on the OSDev Wiki and Forum.

Re: Re:

Posted: Fri Jan 20, 2017 10:17 pm
by Brendan
Hi,
MichaelPetch wrote:
Schol-R-LEA wrote: <snark mode="petty and vindictive">
Does Sewage Overflow discourage users from checking the dates before replying?
</snark>

On a more serious note, a lot of this is in the OSDev wiki, as already stated. Still, any additional sources of information, I guess, and better late than never...
Although you were being *snarky*, I was well aware that this thread was many years old. I'm not the one who dug up this code from this forum and then asked a question about it on Stackoverflow.
Please don't. People are encouraged to search the wiki (and add information to the wiki) for anything that has been already covered; and the forums are more for "short term" (for things that haven't made it to the wiki yet, people asking things like "Where is the bug in this code" that aren't useful for other people and aren't suitable for the wiki, etc).
MichaelPetch wrote:One might ask the question - If this Forum is so good why don't people actually ask questions here? Maybe because responses like yours are a problem? (whether being funny or not).
The act of asking that question proves that the question is based on a false premise (the assumption that people don't ask questions).

If someone asks "I have a splinter in my finger and want to chop my arm off, so what is the best way to chop my arm off?"; on SO the correct advice ("I refuse to give you the answer because there are better ways of solving your actual problem") is virtually impossible.
MichaelPetch wrote:It is rather unfortunate that a site like OSDev's Forum has so many egotistical, narcissistic douche bags responding that users feel compelled to use the services of a better run, better maintained site like Stackoverflow to get answers to questions related to information on the OSDev Wiki and Forum.
It's equally unfortunate that SO is worse. Any question that is even slightly off-topic or might lead to a real discussion is quickly downvoted, locked and deleted without a trace; without any concern for the original poster and without any concern for whether or not the answers/discussion could benefit people. There's also a tendency towards "yes men" - people that only tell you what you want to hear for the sake of getting points (and won't find out what you need to know because that requires some discussion, and won't tell you what you actually need to know because they don't want to be downvoted).

Also note that "deleted without a trace" leads to deluded fan-boys that assume everything is fine because reality is hidden.


Cheers,

Brendan

Re: Childish Behaviour

Posted: Sat Jan 21, 2017 5:56 am
by iansjack
MichaelPetch wrote:It is rather unfortunate that a site like OSDev's Forum has so many egotistical, narcissistic douche bags responding that users feel compelled to use the services of a better run, better maintained site like Stackoverflow to get answers to questions related to information on the OSDev Wiki and Forum.
If you followed these forums you would be aware that many questions are asked here that have been previously asked on StackOverflow without success. So it's a two-way street.

Resurrecting dead threads (8 years old) is frowned upon on just about every forum that I frequent. It disturbs the flow of forums and, almost always, contains information that is of no use to anyone anymore. Hence people do tend to react badly when people revive dead threads.

On a larger scale, it is unedifying to see you and Brendan slagging off each other's web sites. There is a place for both of them (and no-one is forced to use either); such a reaction to another site reflects not on the site itself but on the one criticising it.

Grow up, both of you, and leave your egos at the door please.