X problem with 386ix 2.0.2 and mono VGA screen

Jim Logan logan at inpnms.UUCP
Fri Mar 2 09:13:10 AEST 1990


In article <232 at inpnms.UUCP> logan at inpnms.UUCP I wrote:
# In article <1990Feb19.195600.7778 at hcr.uucp> jeff at hcr.uucp (Jeffrey Roberts)
# writes:
# # When 'X' is started up from any virtual terminal, ie: console, vt01 etc..
# # 'X' starts up with no problem.  If I switch to another virtual terminal
# # I can see the cursor but nothing else, ie: any characters that I type
# # are invisible.
# # This only happens when a mono VGA monitor is used.
# 
# Not true.  This also happens to me when I use X with an EGA
# board.  I intend to look through the documentation to see if
# there is an ioctl() call that can be used to re-initialize the
# screen(s).  I'll let you in on it if I find anything.

Here is a temporary solution to the problem, and a way to access
the EGA 43-line mode.  It's just a quick hack, but it works.

------------------8<--------------------------------------------------------
/*
 *	mode.c		James Logan	Tue Feb 27 19:13:07 EST 1990
 *		Change video modes on the current virtual terminal.
 */

#include <stdio.h>
#include <sys/types.h>
#include <sys/at_ansi.h>
#include <sys/vt.h>
#include <sys/kd.h>

#define MAXMODES	19

extern void
	exit(),
	perror();

char
	*MyName;
int
	ModeNum,
	Modes[MAXMODES] = {
		SW_B40x25,
		SW_C40x25,
		SW_B80x25,
		SW_C80x25,
		SW_BG320,
		SW_CG320,
		SW_BG640,
		SW_CG320_D,
		SW_CG640_E,
		SW_EGAMONOAPA,
		SW_CG640x350,
		SW_ENH_CG640,
		SW_EGAMONO80x25,
		SW_ENHB40x25,
		SW_ENHC40x25,
		SW_ENHB80x25,
		SW_ENHC80x25,
		SW_ENHB80x43,
		SW_ENHC80x43
	};


int	main(argc, argv)
	int	argc;
	char	**argv;
{
	MyName = *argv;

	if (argc != 2) {
		(void) fprintf(stderr, "Usage: %s mode-number\n", MyName);
		exit(2);
		/*NOTREACHED*/
	}

	ModeNum = atoi(argv[1]);
	if (ModeNum < 0 || ModeNum > MAXMODES) {
		(void) fprintf(stderr, "%s: mode-number must be between 0 and %d.\n", MyName);
		exit(1);
		/*NOTREACHED*/
	}

	if (ioctl(0, Modes[ModeNum], 0) == -1) {
		perror("ioctl");
		exit(1);
		/*NOTREACHED*/
	}
	exit(0);
	/*NOTREACHED*/
}

------------------8<--------------------------------------------------------



-- 
James Logan                       UUCP: uunet!inpnms!logan
Data General Telecommunications   Inet: logan%inpnms at uunet.uu.net
(301) 590-3198



More information about the Comp.unix.i386 mailing list