Page 1 of 1

Alternative Text Modes?

Posted: Sun Sep 14, 2008 1:55 pm
by Troy Martin
I saw a screenshot in this topic that was a kernel in text mode running at 720*480. The font was 7 pixels tall for a capital letter.

Does anyone know how to set the screen to that in 32-bit assembly?

Thanks,
Troy

Re: 720*480 text mode?

Posted: Sun Sep 14, 2008 2:58 pm
by Stevo14
720*480 graphics mode corresponds to 90x60 text mode (assuming 8x8 characters). I believe there is some code on the geezer mirror for setting different VGA text/graphics modes (look in "/osd/graphics/"). It is in C, although it might not be too difficult to translate.

Re: Alternative Text Modes?

Posted: Sun Sep 14, 2008 3:02 pm
by Troy Martin
Cool. I've renamed the topic to Alternative Text Modes, since I'd like to know any other text modes out there. I'd set them up before pmode to make life easier though :)

Re: Alternative Text Modes?

Posted: Sun Sep 14, 2008 3:07 pm
by Combuster
You can do anything that is a multiple of a characters size in dimensions, and whose frequency lies within your monitor's range.

In other words, too much typing work :D

Re: Alternative Text Modes?

Posted: Sun Sep 14, 2008 3:08 pm
by Troy Martin
Maybe I'll just stick with 80x25 :)

Re: Alternative Text Modes?

Posted: Mon Sep 15, 2008 3:42 am
by egos
Troy Martin wrote:Maybe I'll just stick with 80x25 :)
I'm just using like modes.
1. 80x25 (720x400).
2. 80x30 (720x480). See screenshot:
Image

Re: Alternative Text Modes?

Posted: Mon Sep 15, 2008 3:57 am
by inflater
I've experimented with this a bit. My OS can switch to modes like 80x60 or 132x25, but it needs a VESA 1.1 compliant card (most of "VESA compliant" do not support these text modes). Actually I've suceeded to switch to 132x60 but believe me, that's just too stacked.

I would use a graphics mode instead, or 80x25 (80x50 for more information to show) :)

Re: Alternative Text Modes?

Posted: Tue Sep 16, 2008 4:47 am
by jal
Troy Martin wrote:I'd like to know any other text modes out there. I'd set them up before pmode to make life easier though
If you know you are in *a* text mode when you start up, and never switch to a graphics mode, it doesn't matter whether you are in pmode or not: setting up such a mode is just a bunch of outs to various VGA ports (in fact, with a few more outs you can probably switch to any VGA compatible mode, including graphics).

Standard VGA hardware can have a maximum resolution of 720x480 pixels. With a text mode character box size of 8x8, that's 90x60 characters. Text mode characters can be either 8 pixels or 9 pixels, but in the latter case the ninth column is always empty (i.e. you can always only define 8 pixels), unless it is a character in some high range used for 'box drawing' (in which case the 8th pixel is copied to the 9th). Text mode characters can have any height between 1 and 32 pixels, but less then 8 will produce very flat, unreadable characters.

SVGA hardware can give you text modes with higher resolutions, but this is non-standard and you'll need VESA to probe for and set these.


JAL

Re: Alternative Text Modes?

Posted: Tue Sep 16, 2008 5:32 am
by Combuster
Standard VGA hardware can have a maximum resolution of 720x480 pixels.
Standard VGA hardware can do 800x600 (be it at an annoying 43Hz :wink:)

Re: Alternative Text Modes?

Posted: Tue Sep 16, 2008 5:50 am
by egos
jal wrote:If you know you are in *a* text mode when you start up, and never switch to a graphics mode, it doesn't matter whether you are in pmode or not: setting up such a mode is just a bunch of outs to various VGA ports (in fact, with a few more outs you can probably switch to any VGA compatible mode, including graphics).
It is right.
I wrote:I'm programming video directly. It is just necessary to check existng VGA compatible video card and not to use other video drivers, because they may support additional features for vga modes.
jal wrote:unless it is a character in some high range used for 'box drawing' (in which case the 8th pixel is copied to the 9th).
This code range is 0xC0-0xDF.

Re: Alternative Text Modes?

Posted: Tue Sep 16, 2008 6:30 am
by jal
Combuster wrote:
Standard VGA hardware can have a maximum resolution of 720x480 pixels.
Standard VGA hardware can do 800x600 (be it at an annoying 43Hz :wink:)
43Hz? My god, I think 60Hz is already headache inducing :).


JAL