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
Switching to a Higher VGA resolution
-
- Member
- Posts: 5567
- Joined: Mon Mar 25, 2013 7:01 pm
Re: Switching to a Higher VGA resolution
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.
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.
- 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: Switching to a Higher VGA resolution
Technically, what you call 80x25 is often actually a 720x400 resolution, so 320x200 you say is an improvement is actually quite a lower resolution
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.
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.