Page 1 of 1

change extended ascii fonts in pmode

Posted: Fri Oct 24, 2008 12:42 pm
by psnix
hi

how i can change extended ASCII fonts in pmode?! (please describe with sample code)

and

is default mode 7? can i change fonts in this mode?!

sorry for bad english

Re: change extended ascii fonts in pmode

Posted: Fri Oct 24, 2008 4:06 pm
by neon
What do you mean by "default mode"? The video mode the system runs at startup? Its useually Mode 3.

You can technically change fonts in any mode via VGA programming.

Re: change extended ascii fonts in pmode

Posted: Sat Oct 25, 2008 12:57 am
by psnix
hi
i mean this (video mode at startup). but how can i change fonts in this mode ?(mode 3) (i must do it at pmode)

Re: change extended ascii fonts in pmode

Posted: Sat Oct 25, 2008 5:49 am
by djmauretto
Ciao :D
You can change font before to switch in pmode by BIOS function .
Note that some video card ( example my ATI video card)
use card specific register not compatible with VGA.
I have disassembly my BIOS function and it use port 0xc000,this is not a VGA port.
Sure you can do it with classic VGA register , but it's not safe,anyway
the code is complex,note that you must recalculate everytime
the CRT with size of your character and so on.....

Re: change extended ascii fonts in pmode

Posted: Sat Oct 25, 2008 8:57 am
by Combuster
BS. Almost all video cards support VGA and a card-specific method.

This question has been asked like 10 times in the past few months. I'm not going to provide links again.

Re: change extended ascii fonts in pmode

Posted: Sat Oct 25, 2008 10:25 am
by neon
Note that some video card ( example my ATI video card)
use card specific register not compatible with VGA.
Card-specific registers are of course not compatible with VGA. This does not mean the card doesn't support VGA.
Sure you can do it with classic VGA register , but it's not safe,anyway
Fundamentally hardware programming is not safe. VGA is portable among all modern video cards hence is "more safe" to use then card-specific interfaces as it is more guaranteed to work.
but how can i change fonts in this mode ?(mode 3) (i must do it at pmode)
djmauretto mentioned the use of a bios interrupt (You can switch to real mode to use it or do it before switching to pmode.) or directly via VGA (or similar) programming. As Combuster posted, this has been asked quite a few times (You may even see posts on the first or second page) related to your question--do some searching.