Page 1 of 1
Use more screen than 80x25, how ?
Posted: Tue Sep 17, 2013 2:41 pm
by yee1
Hey,
Currently I am using screen by 8000h with such descriptor:
Code: Select all
...
descriptor struc
lim dw 0
bas1 dw 0
bas2 db 0
attr1 db 0
attr2 db 0
base3 db 0
descriptor ends
...
screengdt descriptor <4095, 8000h, 0bh, 92h, 0, 0>
How to use full resolution of screen like BIOS uses when enter it after pc is being powered on ?
Re: Use more screen than 80x25, how ?
Posted: Wed Sep 18, 2013 12:00 am
by Combuster
Re: Use more screen than 80x25, how ?
Posted: Wed Sep 18, 2013 1:10 pm
by yee1
Combuster wrote:FAQ
In connection with
http://wiki.osdev.org/How_do_I_set_a_graphics_mode
Use Virtual 8086 Mode. The most common good solution for protected mode. This way you can run the BIOS from a virtual machine style environment, thus maintaining control over the process. Virtual 8086 mode is however not available from Long Mode.
Correct me if i am wrong... the only method to drawing via BIOS is to do it via VIRTUAL MODE? ehh
Making small project and if yes then it will make some mess in my current code
Re: Use more screen than 80x25, how ?
Posted: Wed Sep 18, 2013 11:10 pm
by eino
You can set the videomode before switching to protected mode
Re: Use more screen than 80x25, how ?
Posted: Thu Sep 19, 2013 11:25 am
by yee1
eino wrote:You can set the videomode before switching to protected mode
So you mean that I can use videomode in protected mode - I need only switch it ON before going to protected mode (in real mode) and no need to back to real mode from protected / ude virutal mode, is it right ?
Thank you for answering
Re: Use more screen than 80x25, how ?
Posted: Thu Sep 19, 2013 3:03 pm
by madanra
Yes - typically you would switch to a video mode with a linear frame buffer (LFB) using the BIOS while still in real mode, and then switch to protected mode (the video mode will stay the same). You can then write to the LFB the same way you write to any other memory.
Re: Use more screen than 80x25, how ?
Posted: Thu Sep 19, 2013 4:59 pm
by yee1
madanra wrote:Yes - typically you would switch to a video mode with a linear frame buffer (LFB) using the BIOS while still in real mode, and then switch to protected mode (the video mode will stay the same). You can then write to the LFB the same way you write to any other memory.
Thank you, but how about getting resolution of user's monitor ? What if I want to draw an animal and there are to monitors like 600x300 and 1377x766. What then ?
Re: Use more screen than 80x25, how ?
Posted: Thu Sep 19, 2013 10:00 pm
by neon
Hello,
With regards to supporting multiple monitors or obtaining monitor information or control, either use the VBE DDC extensions or, if writing a custom driver for a card that supports the DDC or I²C interface protocols, the card would provide a set of control registers that software can use to use these protocols.
Getting the resolution of the monitor is obtained by either using the associative VBE service or, if writing own driver, following the specification as to the requirements for what to configure.
If you set the video mode at the start, never to change it later with the purpose of avoiding any video interface (not recommended) you will just have to assume a video mode resolution will always be the same, and, of course, not worry about supporting multiple monitors or getting video information.