two ? about text mode

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
GLneo

two ? about text mode

Post by GLneo »

1.)is there a real mode way to switch to higher res text mode
2.)is there an easy way to change the font, like to make it in to part of a picture or logo then put them toghether???

P.S. is this how linux does that penguin logo in text mode(slackware, dsl, knoppix)???
carbonBased

Re:two ? about text mode

Post by carbonBased »

I should really know this, as I use Linux on a regular basis, but... does the penguin have more then one colour? If so, it's not a combination of graphic-like fonts.

It's possible that they get at the low level frame buffer while in text mode and plot via pixels. I've seen this done in a demo by FutureCrew, back in the day... although I don't know how they did it. I, unfortunately, haven't done a whole lot of low level VGA register work.

--Jeff
Dex4u

Re:two ? about text mode

Post by Dex4u »

Lol, the linux is in graphic vesa mode, not text mode, so many people think, that its some great dual mode.
It's simple you go to a graphic vesa mode, maybe 640x480 8bpp and you use 8x8 font, and a image, that how its done.

As for making a logo in text mode thats easy by using ASCII Extended codes, that are not used much, you need to mod the fonts to make a logo when they are put in a block of say 3 rows of 8, and reprogram the fonts.
if you do this in 80x50 text mode it looks better.

I have made a demo to do this, see here: http://board.flatassembler.net/topic.php?t=2540
This was done like that :
User avatar
Brendan
Member
Member
Posts: 8561
Joined: Sat Jan 15, 2005 12:00 am
Location: At his keyboard!
Contact:

Re:two ? about text mode

Post by Brendan »

Hi,
GLneo wrote:1.)is there a real mode way to switch to higher res text mode

Yes - there's 4 methods. The first method is to set 80 * 25 text mode and then change the fonts to 8 * 8 to get 80 * 50 text mode. E.g.:

Code: Select all

   mov ax,0x0003         ;Set 80*25 video mode
   int 0x10

   mov ax,0x1112              ;Set character size (changes to 80*50 video mode)
   clr bl
   int 0x10
The next way is to manually tweak the VGA registers. For example, Chris Giese has code available to get 90 * 60 text mode. I've used this code myself, and found it works reliably on standard VGA cards and CRT monitors, but I had problems with at least one computer with an LCD monitor.

The third way is to use VESA BIOS extensions. For e.g. there's a lot of cards that handle 132 * 43 text mode via. VBE.

The last way is to use a high resolution graphical video mode and draw the fonts yourself (i.e. pretend you're in text mode when you aren't) - for e.g. 1024 * 768 16 colour mode with 8 * 8 fonts could be used to pretend your using 128 * 96 text mode. This is harder (and slower), but makes it easier to add a GUI to the OS later on.

This is (sort of) what I did for the last version of my OS - the boot menu let the user select any video mode (via. VBE, etc) and all code after that did whatever it needed to to pretend it was text mode. For the next version of my OS, I'm not going to support text mode at all.



Cheers,

Brendan
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
User avatar
Colonel Kernel
Member
Member
Posts: 1437
Joined: Tue Oct 17, 2006 6:06 pm
Location: Vancouver, BC, Canada
Contact:

Re:two ? about text mode

Post by Colonel Kernel »

Brendan wrote:The next way is to manually tweak the VGA registers. For example, Chris Giese has code available to get 90 * 60 text mode. I've used this code myself, and found it works reliably on standard VGA cards and CRT monitors, but I had problems with at least one computer with an LCD monitor.
I've used this method myself and had trouble with 90 * 60 mode when running under MS Virtual PC. It works fine under VMWare and on my LCD monitor though. My $0.02.
Top three reasons why my OS project died:
  1. Too much overtime at work
  2. Got married
  3. My brain got stuck in an infinite loop while trying to design the memory manager
Don't let this happen to you!
Post Reply