Subject: Re: wscons 50 rows
To: Christian E. Hopps <chopps@merit.edu>
From: Todd Whitesel <toddpw@best.com>
List: current-users
Date: 01/23/2000 22:05:30
> Does anyone have the right options to set in the kernel config file to
> enable 50 row vga mode for the console with wscons (i386 if that matters)?

This info might be out of date, but when I was setting up some vga0 machines
last summer, I found that the first console is currently hardwired to 80x24.
The first N consoles can be hardwired with options WSDISPLAY_DEFAULTSCREENS=N
in your kernel config file. IIRC it quietly enforces at least 1, so the main
console is always hardwired.

I figured it was doing that to prevent accidental wscons mistakes from
leaving the system with no usable consoles.

Thus the correct fix is: look at the port-atari stuff which has kernel
options to load either the 80x24 or the 80x50 font into the console VGA
on machines that have it, and adapt this technique for the generic vga*
driver.

Longer term, it would be nice if we had generic hooks into the vga* and
rastercons driver sources, so that a utility could be written to process
X fonts into a form suitable for compiling into kernels, and to tweak a
kernel config so that this font becomes the default console font.

I don't know of any prior art on font converters that could be used here,
but after looking at the VGA code it's really straightforward, like:

#define CONSOLE_FONT_WIDTH 12
#define CONSOLE_FONT_CHAR_STRIKE 2	/* ((CONSOLE_FONT_WIDTH+7)/8) */
#define CONSOLE_FONT_HEIGHT 22
/* Each character is 2 bytes wide, times 22 lines high, 44 bytes total. */
static console_font_bits[CONSOLE_FONT_CHAR_STRIKE*CONSOLE_FONT_HEIGHT] = {
	/* char 0x00 */
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	/* char 0x01 */
	....
};

I can't imagine that the rastercons stuff would resist a whole lot if
someone tried to make it use #defines like the above to configure itself.
The vga* stuff probably should only accept width/height combinations that
fit the text hardware, so we might want an option to expand a font by a
pixel or two in order to make it more palatable to the VGA.

Todd Whitesel
toddpw @ best.com