vesa text modes

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
User avatar
ehenkes
Member
Member
Posts: 124
Joined: Mon Mar 23, 2009 3:15 am
Location: Germany
Contact:

vesa text modes

Post by ehenkes »

If I switch during bootloading by

Code: Select all

mov ax, 0x4F02
mov bx, 0x010C ; text mode 132*60
int 0x10
into a text mode, how can I use it later in the kernel using PM?
Is there a video RAM like b8000h?
User avatar
Combuster
Member
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: vesa text modes

Post by Combuster »

I'd have read the official (VESA VBE) specification before I would (not) have posted that question :wink:

Also, necro alert.
"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 ]
User avatar
neon
Member
Member
Posts: 1567
Joined: Sun Feb 18, 2007 7:28 pm
Contact:

Re: vesa text modes

Post by neon »

This was posted a year ago...

Assuming that the video mode was set to support LFB, you can grab a pointer to its frame buffer (see the specs to find out how.) If not, its probably at 0xa0000 but you will need to provide a way to support switching between banks.

I personally have been using VGA in protected mode as my system is not up to par yet to support VBE to my standards. (I have high standards in design...)
OS Development Series | Wiki | os | ncc
char c[2]={"\x90\xC3"};int main(){void(*f)()=(void(__cdecl*)(void))(void*)&c;f();}
User avatar
AJ
Member
Member
Posts: 2646
Joined: Sun Oct 22, 2006 7:01 am
Location: Devon, UK
Contact:

Re: vesa text modes

Post by AJ »

Hi,

I have now split the topic, hence Neon and Combuster's reference to thread necromancy!

Cheers,
Adam
Tobiking
Posts: 6
Joined: Mon Oct 26, 2009 3:43 pm

Re: vesa text modes

Post by Tobiking »

I tried it yesterday before ehenkes wrote this. The graphic modes (with lfb) work without problems, but the text modes don't (tested in qemu and bochs). I think ehenkes tried it on real hardware, too. Maybe there is a lack of support for the text modes?

The idea was to find an easy way to extend the normal 80x25 display to be able to put more information on the screen. Using the graphic mode and drawing own fonts seems a bit to much work right now.
User avatar
Dex
Member
Member
Posts: 1444
Joined: Fri Jan 27, 2006 12:00 am
Contact:

Re: vesa text modes

Post by Dex »

You can always use 80x50 as easy as 80x25
Image
jal
Member
Member
Posts: 1385
Joined: Wed Oct 31, 2007 9:09 am

Re: vesa text modes

Post by jal »

ehenkes wrote:into a text mode, how can I use it later in the kernel using PM?
Is there a video RAM like b8000h?
If I'm not mistaken, the VESA video mode information structure contains a field indicating the base address for the video mode. Unfortunately, VGABIOS (and thus Bochs) does not support VESA text modes. On a standard VGA, the highest text resolution you can get is 90x60 (720x480 pixels, 8x8 characters).


JAL
smeezekitty
Member
Member
Posts: 50
Joined: Sat Mar 21, 2009 9:42 pm

Re: vesa text modes

Post by smeezekitty »

i fail to see where 80x25, 80x50 and even 90x60 is not enough for text mode?
Tobiking
Posts: 6
Joined: Mon Oct 26, 2009 3:43 pm

Re: vesa text modes

Post by Tobiking »

smeezekitty wrote:i fail to see where 80x25, 80x50 and even 90x60 is not enough for text mode?
80x50 is sufficent and it's used for now, but 80x25 wasn't. Printing information about found pci devices takes some space and there is no way to scroll up in the kernel right now.
User avatar
ehenkes
Member
Member
Posts: 124
Joined: Mon Mar 23, 2009 3:15 am
Location: Germany
Contact:

Re: vesa text modes

Post by ehenkes »

You can always use 80x50 as easy as 80x25
Yes, as Tobiking already mentioned, we have found this possibility and use this 80*50 with 8*8 fonts (a little bit ugly, but helpful) for the time being.

Code: Select all

;;;;; set 80x50 text mode and 8x8 font 	
mov ax, 0x1112 	
xor bl, bl 	
int 0x10 
;;;;;
Could we also expand that resolution to 90*60 in this easy way?
jal
Member
Member
Posts: 1385
Joined: Wed Oct 31, 2007 9:09 am

Re: vesa text modes

Post by jal »

ehenkes wrote:Could we also expand that resolution to 90*60 in this easy way?
No, unfortunately not. 90x60 needs reprogramming the VGA controller. It's not that difficult (search the forum, it has come up a few times, with source code), but not as easy as a simple int 10h call.


JAL
Post Reply