Page 1 of 1
Changing Screen Resolution In Mode 13h
Posted: Wed Apr 20, 2011 7:26 am
by melgmry0101b
Hi everyone
,
Mode 13h is using 320x200 screen resolution , but it doesn't fit my needs.
How can I change the the resolution in mode 13h without entering VBE mode.
I want to change the resolution to 640x400
I have used this code before but i found it takes me in VBE mode and i cant use 0xa0000 .
----------------------------------
Thank you in advance.
Re: Changing Screen Resolution In Mode 13h
Posted: Wed Apr 20, 2011 7:48 am
by Combuster
There is no way you can access 640x400 with just 0xa0000 - VGA's 4bpp 640x400 means 640 * 400 * 0.5 bytes are needed, which is just under 128k. 0xa0000-0xaffff is only 64k. In fact 320x200x8 is the only standard graphics mode you will encounter that is as simple as just 0xa0000-0xaffff.
So either stick to mode 0x13, implement at least one form of bank switching (VGA planes or VBE banks) or use VBE's linear framebuffer support. For the best futureproofing, make sure your code can handle banking, changing framebuffer addresses, and all forms of backbuffer formats. It'll have you set for all forms of native drivers later.
Re: Changing Screen Resolution In Mode 13h
Posted: Wed Apr 20, 2011 8:28 am
by melgmry0101b
OK,
Now i am entering mode VBE with above code ,
What should i do after that ? How to put pixels on the screen or copy them from the screen?
Re: Changing Screen Resolution In Mode 13h
Posted: Wed Apr 20, 2011 9:08 am
by Combuster
Did you RTFM (in this case, the vesa/vbe specification)? What do you need that you can't find in there?
Re: Changing Screen Resolution In Mode 13h
Posted: Wed Apr 20, 2011 9:33 am
by melgmry0101b
From your last post i understood that i have to change to another mode to change the screen resolution.
and this mode is VBE.
Now , i don't know any thing about VBE
, Is it liner memory " An array of pixels " if yes what is the memory address for it , if no what can i do to put a pixel on the screen and read a pixel from it?
-------------
Thank you in advance
Re: Changing Screen Resolution In Mode 13h
Posted: Wed Apr 20, 2011 10:25 am
by Brendan
Hi,
Mozo40 wrote:From your last post i understood that i have to change to another mode to change the screen resolution.
and this mode is VBE.
VBE isn't a mode. It's a specification (actually called "VESA BIOS Extensions") that defines a software interface that programmers can use to access high resolution video modes.
It's probably best for you to start reading
the relevant wiki page; and then find, download and read the VBE specification/s (you'll want "VBE version 1.2" at least, and probably later versions too).
Cheers,
Brendan
Re: Changing Screen Resolution In Mode 13h
Posted: Wed Apr 20, 2011 10:29 am
by melgmry0101b
Thank you very much Brendan,