Page 1 of 1
Changing Default VGA Font
Posted: Wed Jul 21, 2004 4:59 am
by jinksys
I tried googling around for information on the VGA fonts, but
I couldnt find anything worthwhile. Anyone have any links
to sites with lots of info? Id like to change the default vga font
of my system.
Re:Changing Default VGA Font
Posted: Mon Aug 02, 2004 4:17 am
by Pype.Clicker
the font is normally stored in the VGA rom, but by toying with the VGA registers, you can redirect it to a portion of the 0xB8000 -- 0xBFFFF space, iirc.
All the port information you need should be available through the HardWareVga page of the
wikifaq
Re:Changing Default VGA Font
Posted: Mon Aug 02, 2004 5:43 am
by mpp.eox3
not quite correct..
the font is stored in videoram and copied there (plane 2 to be exact) from the rom on video mode setup.
so what you have to do is disable odd/even mode,
enable plane 2 and write your new font to 0xb8000.
(just like the mode-x trickery in the good old days ;)
you can also remap the video ram address to 0xa0000
and load your font there then, if you feel like it..
after you're done, enable odd/even mode again.
by the way, the font has to be stored in plane 2 in the following format:
each character consists of 32 bytes - each bit in a byte represents a pixel in a line.
this gives you 32 lines x 8 pixels width per character - this is the maximum the vga supports.
now you might wonder "hey but there's a 16x9 textmode!". yes that's right but it's unfortunately not possible to control the ninth column :( the ninth column is copied from the eight on some special characters to make the line drawing stuff continuous (chars 205, 191 and so on...).
so if you want to do some logos in textmode, you have to switch the vga into 8dot mode, otherwise your logo/graphic will have some vertical stripes in it.
oh and I almost forgot.. vga doesn't support 256 characters in textmode - what you see are in reality 512! (with the second character set identical to the first, so no one never noticed although it was there _all_ the time!!).
which character set is used on screen is selected by the uh.. er.. I think it was the blink bit (bit 7). Note that it's also possible to disable this blinky **** nobody wants - this gets you 16 foreground and 16 background (yes the lighter colors!) colors :)
But unfortunately vmware doesn't emulate the original 512 character behaviour of the vga correctly - it's not supported, seems the vmware guys didn't know this hehe...
.... And there's much more cool stuff the vga has to offer :) ..... smooth scrolling.... copper bars.... wobble effects...
greets to oldsk00lers,
marcus
Re:Changing Default VGA Font
Posted: Mon Aug 02, 2004 7:00 am
by Pype.Clicker
tnx for correcting me ... i toyed with this sooo long ago