OSDev.org

The Place to Start for Operating System Developers
It is currently Sun Sep 20, 2020 2:58 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Switching between graphic and text mode
PostPosted: Thu Apr 23, 2020 3:41 pm 
Offline
Member
Member
User avatar

Joined: Sun Jul 21, 2019 7:34 am
Posts: 241
Hi.
I'm booting into protected mode with graphics using GRUB, I want to switch back to text mode and back again. In other words, I want to be able to switch between these modes at any time.
How can I do this?
Thanks.


Top
 Profile  
 
 Post subject: Re: Switching between graphic and text mode
PostPosted: Thu Apr 23, 2020 6:36 pm 
Offline
Member
Member

Joined: Mon Jul 25, 2016 6:54 pm
Posts: 198
Location: Adelaide, Australia
You either need to be in real mode (or virtual 8086 mode), and have access to the BIOS functions, or you need to write a driver for the graphics card - either a generic VGA driver (only supports VGA resolutions) or for your specific card. Info on the wiki is here.

Personally I find all these options vastly more trouble than they're worth and just set a graphic mode at boot and emulate text mode using bitmap fonts.


Top
 Profile  
 
 Post subject: Re: Switching between graphic and text mode
PostPosted: Fri Apr 24, 2020 2:55 am 
Offline
Member
Member
User avatar

Joined: Thu Oct 13, 2016 4:55 pm
Posts: 863
StudlyCaps wrote:
You either need to be in real mode (or virtual 8086 mode), and have access to the BIOS functions, or you need to write a driver for the graphics card - either a generic VGA driver (only supports VGA resolutions) or for your specific card. Info on the wiki is here.
What StudyCaps wrote, but if you're using UEFI, it won't work unless you enable legacy CSM and your card must support legacy VGA modes (some modern cards don't).

StudlyCaps wrote:
Personally I find all these options vastly more trouble than they're worth and just set a graphic mode at boot and emulate text mode using bitmap fonts.
A very big plus one on this. Simplest, most portable, also this is how Linux does it (for a good reason). You can find more info on how to do this in our wiki.

Cheers,
bzt


Top
 Profile  
 
 Post subject: Re: Switching between graphic and text mode
PostPosted: Fri Apr 24, 2020 4:18 am 
Offline
Member
Member
User avatar

Joined: Sun Jul 21, 2019 7:34 am
Posts: 241
Ok, thanks.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 2 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