how to use vga in protected mode?
Re: how to use vga in protected mode?
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?
yes... it's been said many times on this forum. use the wiki
Re: how to use vga in protected mode?
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?
ehm i forgot the come of become in my keyboard ! sorryKarlosoft wrote:i'll be crazy
- 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 use vga in protected mode?
Having a good knowledge of english is a pre. Just keep practicing until you are crazy, like the rest of us
-
- Member
- Posts: 799
- Joined: Fri Aug 26, 2016 1:41 pm
- Libera.chat IRC: mpetch
Re:
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.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.
- Schol-R-LEA
- Member
- Posts: 1925
- Joined: Fri Oct 27, 2006 9:42 am
- Location: Athens, GA, USA
Re: Re:
<snark mode="petty and vindictive">MichaelPetch wrote: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.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.
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...
Rev. First Speaker Schol-R-LEA;2 LCF ELF JAM POEE KoR KCO PPWMTF
Ordo OS Project
Lisp programmers tend to seem very odd to outsiders, just like anyone else who has had a religious experience they can't quite explain to others.
Ordo OS Project
Lisp programmers tend to seem very odd to outsiders, just like anyone else who has had a religious experience they can't quite explain to others.
Re: how to use vga in protected mode?
VGA is everywhere these days...
Re: how to use vga in protected mode?
I'd say VGA is pretty much nowhere these days...WaterOS wrote:VGA is everywhere these days...
Learn to read.
Re: how to use vga in protected mode?
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)
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)
Keyboard not found!
Press F1 to run setup.
Press F2 to continue.
Press F1 to run setup.
Press F2 to continue.
-
- Member
- Posts: 799
- Joined: Fri Aug 26, 2016 1:41 pm
- Libera.chat IRC: mpetch
Re: Re:
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).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...
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:
Hi,
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.
Also note that "deleted without a trace" leads to deluded fan-boys that assume everything is fine because reality is hidden.
Cheers,
Brendan
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: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.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...
The act of asking that question proves that the question is based on a false premise (the assumption that people don't ask questions).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).
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.
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).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.
Also note that "deleted without a trace" leads to deluded fan-boys that assume everything is fine because reality is hidden.
Cheers,
Brendan
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
Re: Childish Behaviour
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.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.
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.