OSDev.org

The Place to Start for Operating System Developers
It is currently Thu Mar 28, 2024 8:32 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Switching to a Higher VGA resolution
PostPosted: Thu Jun 17, 2021 10:38 am 
Offline

Joined: Fri Jun 04, 2021 8:25 am
Posts: 1
I have been stuck with the regular 80x25 VGA resolution, and would like to switch to something higher, like 320x200. Is there any way to do this in C/Unix Assembly?

Thanks,
Harvey


Top
 Profile  
 
 Post subject: Re: Switching to a Higher VGA resolution
PostPosted: Fri Jun 18, 2021 10:17 pm 
Offline
Member
Member

Joined: Mon Mar 25, 2013 7:01 pm
Posts: 5099
Which bootloader are you using? Some popular ones (like GRUB) can use the firmware to set up a high-resolution video mode with a framebuffer where you can draw bitmap text and graphics.

If you wrote your own bootloader, you can have your bootloader do it too. Since you mentioned VGA text mode, I'm assuming you're using legacy BIOS, so you'd want to set the video mode using VBE. For UEFI, set the video mode using GOP before calling ExitBootServices().

Changing the video mode while your OS is running is a bit more difficult. For that, you need to write a driver for your display adapter.


Top
 Profile  
 
 Post subject: Re: Switching to a Higher VGA resolution
PostPosted: Thu Jul 08, 2021 3:11 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
Technically, what you call 80x25 is often actually a 720x400 resolution, so 320x200 you say is an improvement is actually quite a lower resolution :wink:

Please be considerate and read the wiki before posting a question, there are several relevant entries in the FAQ that will answer your question in far more detail.

_________________
"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  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 6 hours


Who is online

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