mode 12h system fonts 
Author Message
 mode 12h system fonts

How do I draw a character that I have pulled from the BOIS in mode 12h?
--
Michael Case



Wed, 18 Jun 1902 08:00:00 GMT  
 mode 12h system fonts

Quote:
>How do I draw a character that I have pulled from the BOIS in mode 12h?

I'm too tired to post source right now, but... :)
I'm assuming you know how to test individual bits in a byte.
If you pulled it from the 8x16 font, the structure is like this.
        type Character: array[1..16] of byte;
Each BYTE is a line. Each BIT is a single pixel. If a bit is true, then
draw a pixel. i.e....
00101101 would translate, on screen, into  --*-**-* (- meaning blanks,
* meaning pixel)
So in a way...
for counter1 := 1 to 16 do
  for counter2 := 1 to 8 do
    IF *bit number counter2* THEN *draw pixel*
ROM fonts are stored in "reverse" order. That is, the bit order is left
to right. (in other words, instead of being 76543210, its 01234567)

I know this isn't the best explanation you will get here, but it's enough
to get you started! :)

If you don't get TOO much help here, I could extract and send you some
source..
--
     Valdus -/- Hilton Janfield -(- sysop of dark genesis bbs -\- Valdus
 dark genesis bbs system * 250/561-2850 * 14400 baud * lots of games * MORE!
Distro Site for: OutWorld Arts, Outlaw Triad, SWAG, SerWiz Com, RTsoft, more!
        A yer ago I kudnt spel jeanyus now I are won.



Wed, 18 Jun 1902 08:00:00 GMT  
 mode 12h system fonts

Quote:

> How do I draw a character that I have pulled from the BOIS in mode 12h?

There are a few ways to go about doing it.  The slow way is to draw each
pixel individually, but it's not terribly efficient.  The video card is
programmable to allow VERY fast writes to the screen in mode 12h.  If
you're interested in a source listing (it's in assembler, but you may be
able to apply it to TP easily if you're familiar with assembler), try
looking at the fasttext.asm listing in:

ftp://ftp.simtel.net/pub/simtelnet/msdos/pgmtips/ptt001.zip

Quote:
> --
> Michael Case


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



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

 Relevant Pages 

1. Copiing buffer to VGA 12h mode *HELP* 2nd try

2. Routines in mode 12h (640x480x16 colors)

3. Mode 12h

4. Putpixel in mode 12h

5. Help for mode 12h

6. Printing in Mode 12h

7. By request: Mode 12h routines

8. PUTPIXEL REPLACEMENT IN MODE 12h...THATS 640x480x16 (BGI-style)

9. REQ: Writing text in mode 12h

10. Copiing buffer to VGA 12h mode *HELP*

11. FREE 12h BGI Icon Editor n routine for TP7

12. PutPixel/GetPixel for 12h

 

 
Powered by phpBB® Forum Software