From owner-freebsd-questions Tue Nov 14 01:46:12 1995 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id BAA18477 for questions-outgoing; Tue, 14 Nov 1995 01:46:12 -0800 Received: from relay.hp.com (relay.hp.com [15.255.152.2]) by freefall.freebsd.org (8.6.12/8.6.6) with ESMTP id BAA18441 ; Tue, 14 Nov 1995 01:46:02 -0800 Received: from srmail.sr.hp.com by relay.hp.com with ESMTP (1.37.109.16/15.5+ECS 3.3) id AA173632355; Tue, 14 Nov 1995 01:45:56 -0800 Received: from hpnmhjw.sr.hp.com by srmail.sr.hp.com with ESMTP (1.37.109.16/15.5+ECS 3.3) id AA044242354; Tue, 14 Nov 1995 01:45:55 -0800 Received: from mina.sr.hp.com by hpnmhjw.sr.hp.com with SMTP (1.37.109.16/15.5+ECS 3.3) id AA259202354; Tue, 14 Nov 1995 01:45:54 -0800 Message-Id: <199511140945.AA259202354@hpnmhjw.sr.hp.com> To: freebsd-questions@FreeBSD.org, freebsd-bugs@FreeBSD.org Subject: "Bug" in syscons? Date: Tue, 14 Nov 1995 01:45:53 -0800 From: Darryl Okahata Sender: owner-questions@FreeBSD.org Precedence: bulk [ I'm sorry about the cross-mailing to both questions and bugs, but I may have gotten inexplicably auto-deleted from the bugs mailing list, and I haven't had the time to cajole Majordomo into resubscribing me. Anyway, ... ] I've been having some text<-->graphics mode switching problems, where switching from X-windows back to a syscons console resulted in utterly corrupt fonts in my syscons consoles. I tried using pcvt, and the corrupt font problems went away. After comparing the pcvt and syscons sources, I came up with the included patch (relative to 2.0.5), which solves my corrupt font problems with syscons. Can anyone tell me what the old 2.0.5 syscons is trying to do with the "weird" VGA register values? I know what my "fixed" values are doing, but what are the old values trying to do? (I just ordered a copy of Richard Wilton's "Programmer's Guide to PC Video Systems", but it hasn't arrived yet.) I'm currently using a cheap (but fast) Hercules Stingray VL (Ark Logic chipset) video card. I also had similar problems with an ISA Hercules Dynamite Pro (Tseng ET4000/W32p chipset), but I had originally chalked that up to a buggy XF86_W32 accelerated server (which led me to get the Stingray VL); maybe this patch would have fixed my ET4000/W32p problem also? -- Darryl Okahata Internet: darrylo@sr.hp.com DISCLAIMER: this message is the author's personal opinion and does not constitute the support, opinion or policy of Hewlett-Packard or of the little green men that have been following him all day. =============================================================================== *** syscons.c.orig Mon Nov 13 23:13:43 1995 --- syscons.c Tue Nov 14 01:12:14 1995 *************** *** 2804,2819 **** outb(ATC, 0x30); outb(ATC, 0x01); #if SLOW_VGA outb(TSIDX, 0x02); outb(TSREG, 0x04); ! outb(TSIDX, 0x04); outb(TSREG, 0x06); outb(GDCIDX, 0x04); outb(GDCREG, 0x02); outb(GDCIDX, 0x05); outb(GDCREG, 0x00); ! outb(GDCIDX, 0x06); outb(GDCREG, 0x05); #else outw(TSIDX, 0x0402); ! outw(TSIDX, 0x0604); outw(GDCIDX, 0x0204); outw(GDCIDX, 0x0005); ! outw(GDCIDX, 0x0506); /* addr = a0000, 64kb */ #endif } --- 2804,2819 ---- outb(ATC, 0x30); outb(ATC, 0x01); #if SLOW_VGA outb(TSIDX, 0x02); outb(TSREG, 0x04); ! outb(TSIDX, 0x04); outb(TSREG, 0x07); outb(GDCIDX, 0x04); outb(GDCREG, 0x02); outb(GDCIDX, 0x05); outb(GDCREG, 0x00); ! outb(GDCIDX, 0x06); outb(GDCREG, 0x00); #else outw(TSIDX, 0x0402); ! outw(TSIDX, 0x0704); outw(GDCIDX, 0x0204); outw(GDCIDX, 0x0005); ! outw(GDCIDX, 0x0006); /* addr = a0000, 64kb */ #endif } *************** *** 2827,2833 **** outb(ATC, 0x30); outb(ATC, 0x0C); #if SLOW_VGA outb(TSIDX, 0x02); outb(TSREG, 0x03); ! outb(TSIDX, 0x04); outb(TSREG, 0x02); outb(GDCIDX, 0x04); outb(GDCREG, 0x00); outb(GDCIDX, 0x05); outb(GDCREG, 0x10); if (crtc_addr == MONO_BASE) { --- 2827,2833 ---- outb(ATC, 0x30); outb(ATC, 0x0C); #if SLOW_VGA outb(TSIDX, 0x02); outb(TSREG, 0x03); ! outb(TSIDX, 0x04); outb(TSREG, 0x03); outb(GDCIDX, 0x04); outb(GDCREG, 0x00); outb(GDCIDX, 0x05); outb(GDCREG, 0x10); if (crtc_addr == MONO_BASE) { *************** *** 2838,2844 **** } #else outw(TSIDX, 0x0302); ! outw(TSIDX, 0x0204); outw(GDCIDX, 0x0004); outw(GDCIDX, 0x1005); if (crtc_addr == MONO_BASE) --- 2838,2844 ---- } #else outw(TSIDX, 0x0302); ! outw(TSIDX, 0x0304); outw(GDCIDX, 0x0004); outw(GDCIDX, 0x1005); if (crtc_addr == MONO_BASE)