Mail Archives: djgpp/2000/07/22/08:16:14
Damian Yerrick <Bullcr_pd_yerrick AT hotmail DOT comRemoveBullcr_p> wrote:
> >> Oh, BTW, anyone know how to
> >> knock the VGA up into an 80x100, 80x120 text mode using DJGPP?
I tried to do something like this a while back, but lack of low-level
PC knowledge prevented me from doing anything useful.
I'm sure you already know how to change text modes, but here is a
function I used:
void set_video_mode(int mode)
{
__dpmi_regs regs;
regs.x.ax = mode & 0xFF;
__dpmi_int(0x10, ®s);
}
If you cycle through possible values of mode and use conio functions
to get the screen dimensions you will probably find all sorts of weird
text modes that your card is capable of. Some modes will cause
lock-ups, so it's best to log the results to a file and open/close it
between each mode switch, and be prepared for reboots.
Having said that, the only modes that seemed to work properly for me
were the ones that textmode() provides for anyway.
However, there is one mode that would be a useful addition to DJGPP,
if someone could work out how to implement it. 80x60 chars is listed
in the Linux LILO docs as one of the standard VGA text modes and is
achieved using a 640x480 pixel variation of the 80x50 char text mode
(normally 640x400 pixels).
I tried to implement this in DOS using ideas taken from the LILO
source code, but numerous reboots suggested this is not the project
for me. ;-) If anyone is interested in looking at this I can dig out
the references and/or source code.
> >Each one has a special video mode number for these text modes.
> >See Ralf Brown's Interrupt List for details, under function 0
> >of Int 10h, there's a huge table there which tells this.
>
> I know 80x117 can be done with EGA and standard VGA (go to 350
> scanline text mode and knock the character height down to 3
> scanlines). But how do I notify the DJGPP Screen*() routines
> that I have done this so I can use them for blitting?
Out of interest, what possible use is a 3 pixel high font?
Does the DOS command line behave itself if you switch to this mode?
- Raw text -