Subject: Re: VGA driver changes for machines without built-in font
To: None <tech-kern@netbsd.org>
From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
List: tech-kern
Date: 01/16/2003 01:05:29
In article <200301151342.h0FDg5810454@mirage.ceres.dti.ne.jp>
I wrote:

> Problems:
>   but the most left bits on
>   the screen are displayed wrong place (offset some lines).

Ah, this is fixed by setting 9 dot clocks for the character generater.
(i.e use 720x400 mode)
---
Izumi Tsutsui
tsutsui@ceres.dti.ne.jp


--- vga_subr.c~	Thu Jan 16 00:57:09 2003
+++ vga_subr.c	Thu Jan 16 00:57:27 2003
@@ -275,10 +275,13 @@
  * values to initialize registers.
  */
 
+/* miscellaneous output register */
+#define VGA_MISCOUT	0x67
+
 /* sequencer registers */
 static const u_int8_t vga_ts[] = {
 	0x03,	/* 00: reset */
-	0x01,	/* 01: clocking mode */
+	0x00,	/* 01: clocking mode */
 	0x03,	/* 02: map mask */
 	0x00,	/* 03: character map select */
 	0x02	/* 04: memory mode */
@@ -344,7 +347,7 @@
 	0x3d,	/* 0D: internal pallet 13 */
 	0x3e,	/* 0E: internal pallet 14 */
 	0x3f,	/* 0F: internal pallet 15 */
-	0x08,	/* 10: attribute mode control */
+	0x0c,	/* 10: attribute mode control */
 	0x00,	/* 11: overscan color */
 	0x0f,	/* 12: color plane enable */
 	0x08,	/* 13: horizontal PEL panning */
@@ -393,7 +396,8 @@
 		_vga_attr_write(vh, i, vga_atc[i]);
 
 	/* set misc output register */
-	bus_space_write_1(vh->vh_iot, vh->vh_ioh_vga, VGA_MISC_DATAW, 0x63);
+	bus_space_write_1(vh->vh_iot, vh->vh_ioh_vga,
+	    VGA_MISC_DATAW, VGA_MISCOUT);
 
 	/* reenable video */
 	vga_ts_write(vh, mode, vga_ts[1] & ~0x20);