From : Tom Torfs                                               2:292/516
To   : Arnold Hendriks                     
Subj : 8x16 mode..                                                           


 AH> The VGA adapter normally uses a 9x16 character font....
 AH> How do I switch it to a 8x16 character font (a bit like an EGA
 AH> adapter, which also has 8 bits instead of 9 bits wide characters..)

First you have to change the horizontal resolution from 720 pixels to 640
pixels. How do you do this ?
   - read byte from port 3CCh
   - clear bit 2
   - write new value to 3C2h (this is not a typo, must be different port)
(to go back to 720 pixels mode you just set bit 2 again)

But now we still have to change the character width to 8 pixels.  Like this:
   - clear interrupts
   - write word 100h to port 3C4h
   - write word to port 3C4h with low byte=1 and bit 0 of high byte cleared for
8 pixels and set for 9 pixels
   - write word 300h to port 3C4h
   - restore interrupts

The last step is to change the pel panning register, to hide the first column.
Otherwise the screen would flicker. You do this by calling int 10h with the
following register settings:
   - ax = 1000h
   - bl = 13h (pel panning register)
   - bh = 0 for 8 pixels or 8 for 9-pixels

BTW you must test for the presence of a VGA before doing this, because it'll
probably seriously mess up an EGA or lower

Hope this helps...

greetz,
Tom

--- FMail/386 1.0g
 * Origin: 80X86 BBS  32-15-24.48.57  20h-03h CET (2:292/516)
