OSDev.org

The Place to Start for Operating System Developers
It is currently Thu Apr 25, 2024 11:36 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 28 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: how to use vga in protected mode?
PostPosted: Wed Jul 09, 2008 3:09 am 
Offline
Member
Member
User avatar

Joined: Thu Feb 14, 2008 10:46 am
Posts: 277
Location: Italy
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?


Top
 Profile  
 
 Post subject: Re: how to use vga in protected mode?
PostPosted: Wed Jul 09, 2008 6:36 am 
Offline
Member
Member
User avatar

Joined: Fri Aug 03, 2007 6:03 am
Posts: 536
Location: Cambridge, UK
yes... it's been said many times on this forum. use the wiki

_________________
~ Lukem95 [ Cake ]
Release: 0.08b
Image


Top
 Profile  
 
 Post subject: Re: how to use vga in protected mode?
PostPosted: Thu Jul 10, 2008 3:47 am 
Offline
Member
Member
User avatar

Joined: Thu Feb 14, 2008 10:46 am
Posts: 277
Location: Italy
Yes but i've some problems with English... i can't read other topics, i'll be crazy :)


Top
 Profile  
 
 Post subject: Re: how to use vga in protected mode?
PostPosted: Thu Jul 10, 2008 9:14 am 
Offline
Member
Member
User avatar

Joined: Thu Feb 14, 2008 10:46 am
Posts: 277
Location: Italy
Karlosoft wrote:
i'll be crazy

ehm i forgot the come of become in my keyboard :D! sorry :)


Top
 Profile  
 
 Post subject: Re: how to use vga in protected mode?
PostPosted: Sun Jul 13, 2008 2:38 pm 
Offline
Member
Member
User avatar

Joined: Wed Oct 18, 2006 3:45 am
Posts: 9301
Location: On the balcony, where I can actually keep 1½m distance
Having a good knowledge of english is a pre. Just keep practicing until you are crazy, like the rest of us :twisted:

_________________
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]


Top
 Profile  
 
 Post subject: Re:
PostPosted: Thu Jan 19, 2017 4:45 pm 
Offline
Member
Member

Joined: Fri Aug 26, 2016 1:41 pm
Posts: 693
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.


Top
 Profile  
 
 Post subject: Re: Re:
PostPosted: Thu Jan 19, 2017 9:11 pm 
Offline
Member
Member
User avatar

Joined: Fri Oct 27, 2006 9:42 am
Posts: 1925
Location: Athens, GA, USA
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...

_________________
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.


Top
 Profile  
 
 Post subject: Re: how to use vga in protected mode?
PostPosted: Fri Jan 20, 2017 9:57 am 
Offline
Member
Member

Joined: Mon Jan 16, 2017 3:39 pm
Posts: 25
VGA is everywhere these days...


Top
 Profile  
 
 Post subject: Re: how to use vga in protected mode?
PostPosted: Fri Jan 20, 2017 3:27 pm 
Offline
Member
Member
User avatar

Joined: Thu Jul 12, 2012 7:29 am
Posts: 723
Location: Tallinn, Estonia
WaterOS wrote:
VGA is everywhere these days...


I'd say VGA is pretty much nowhere these days...

_________________
Learn to read.


Top
 Profile  
 
 Post subject: Re: how to use vga in protected mode?
PostPosted: Fri Jan 20, 2017 3:54 pm 
Offline
Member
Member
User avatar

Joined: Sun Nov 20, 2016 7:26 am
Posts: 155
Location: Somewhere
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)

_________________
Keyboard not found!

Press F1 to run setup.
Press F2 to continue.


Top
 Profile  
 
 Post subject: Re: Re:
PostPosted: Fri Jan 20, 2017 6:30 pm 
Offline
Member
Member

Joined: Fri Aug 26, 2016 1:41 pm
Posts: 693
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.


Top
 Profile  
 
 Post subject: Re: Re:
PostPosted: Fri Jan 20, 2017 10:17 pm 
Offline
Member
Member
User avatar

Joined: Sat Jan 15, 2005 12:00 am
Posts: 8561
Location: At his keyboard!
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

_________________
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.


Top
 Profile  
 
 Post subject: Re: Childish Behaviour
PostPosted: Sat Jan 21, 2017 5:56 am 
Offline
Member
Member
User avatar

Joined: Sat Mar 31, 2012 3:07 am
Posts: 4597
Location: Chichester, UK
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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 28 posts ]  Go to page Previous  1, 2

All times are UTC - 6 hours


Who is online

Users browsing this forum: Bing [Bot], Majestic-12 [Bot], rdos and 223 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group