Text Mode Graphics 
Author Message
 Text Mode Graphics

Quote:

> I have read a couple messages that refer to the fact that you can edit the
>  ascii characters in text mode to achieve some sort of graphics.  I was
>  wondering if anyone could explain to me how this is done, or refer me to
>  someplace I could learn.  Also, there have been some references to a linear
>  mode vs. planer mode to the stadard text mode, etc.  What are the various
>  pluses and minuses to each?  If anyone has information on this type of stuff I
>  would apreciate it.  Thanks.

Yes, it's true.  However, explaining how it's done and all the details
involved is not exactly the easiest task in the world.  Actually, a few
books have been written which cover all the details of video operation.
The book I used to learn most of the details in "Programmer's Guide to
the EGA and VGA Cards", By Richard F. Ferraro, ISBN 0-201-57025-4.  It
covers lots, but the only thing I don't like about this book is that
there are some editorial errors, and in some places corrections must be
made, and details should be cross-referenced.

As to video memory addressing, all video memory is planar; this means
that each bank of memory uses the same address space, and the particular
bank which is accessed depends on register settings.

Text mode normally operates in a mode called Odd/Even, which means not
only is the memory planar, banks are interleaved.  If you notice that
video memory in text mode is made up of alternating character and
attribute values, with characters being on the even addresses and
attributes being on odd addresses, they aren't actually occupying
consecutive bytes in memory.  Offset 0 is stored in byte 0 of plane 0,
offset 1 is stored in byte 1 of plane 1, offset 2 is stored in byte 2 of
plane 0, offset 3 is stored in byte 3 of plane 1, etc.  Fonts are stored
in plane 2, and plane 3 is typically unused.  The hardware does this
interleaving automatically to make it seem transparent.

As for linear addressing, it causes video memory to be non-interleaved,
and whichever plane is selected is the one which is accessed through the
video segment (usually $b800, but is usually remapped to $a000 for
linear mode).  This allows font data to be accessed, but at the same
time makes concurrent text output impossible.

Switching between the two is a bit of a complex task, and requires a
good deal of register tweaking.  While it may not help with character
animation, if you just want to modify certain characters, the BIOS
offers a couple functions for modifying character sets.  It's a good
deal simpler to try that.

BTW, as far as plusses and minuses are concerned, those aren't really
relevant, IHMO -- both video addressing methods have their purposes, and
the idea is to use whichever is appropriate to the task.

This is sort of the tip of the iceberg, but hopefully it helps clear up
some of your questions.

Quote:
> -Kanryl

--
Scott Earnest        | We now return you to our regularly |



Wed, 18 Jun 1902 08:00:00 GMT  
 Text Mode Graphics

I have read a couple messages that refer to the fact that you can edit the
 ascii characters in text mode to achieve some sort of graphics.  I was
 wondering if anyone could explain to me how this is done, or refer me to
 someplace I could learn.  Also, there have been some references to a linear
 mode vs. planer mode to the stadard text mode, etc.  What are the various
 pluses and minuses to each?  If anyone has information on this type of stuff I
 would apreciate it.  Thanks.

-Kanryl



Wed, 18 Jun 1902 08:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Text mode - graphics mode conflict (Help!)

2. Text mode vs graphics mode conflict (Help!)

3. Text in graphics mode

4. Graphics in text mode

5. time delay switching from text to graphics mode

6. writing text to screen while in graphics mode

7. Graphics in text mode

8. Please help with graphics in text mode!

9. Not in graphics mode scrolling text box?

10. graphics in text mode

11. Req: graphic mouse handler for text modes

12. graphics in text mode using dual fonts

 

 
Powered by phpBB® Forum Software