Subject: Success, was: X11 on Q700 / port-mac68k/4524 (longish)
To: Scott Reynolds <scottr@og.org>
From: Hauke Fath <hauke@Espresso.Rhein-Neckar.DE>
List: port-mac68k
Date: 01/14/1998 23:47:27
At 6:41 Uhr +0100 01.12.1997, Scott Reynolds wrote:
>On Wed, 26 Nov 1997, Hauke Fath wrote:
>
>> What still remains is the problem of framebuffer mapping. In 824x624 the X
>> screen is entirely offscreen (2 MB VRAM has room for a lot monochrome
>> screens) and 1152x870 shows a strip of maybe 200 pixels on the left of the
>> screen. Do you see any chance of getting this fixed for 1.3?
>
>Sorry, not likely.  I think this is one of the systems that Michael Zucca
>mentioned was strange... the QuickDraw specification says that all video
>modes should start the displayable region at the same address, and it
>sounds like the Q700 violates that.  (sigh.)
>
>> What does the
>> "Madhatter" patch do in this context?
>
>Nothing at all... I incorporated a version of the `Madhatter' patch that
>automatically saves the TC register for AV machines and leaves the MMU
>ensabled.  For other machines, the MMU is disabled.  According to Steve,
>that's all that was necessary.


Hi,

playing around with 1.3 kernel sources, I came across the following mail

>From sbrown@best.com Fri Dec 19 06:42:33 1997
>Date: Mon, 1 Sep 1997 20:24:32 -0700 (PDT)
>From: Stephen Brown <sbrown@best.com>
>To: xiamin@scdesantis.ne.mediaone.net
>Cc: port-mac68k@NetBSD.ORG
>Subject: Re: 832x624 mode & -current broken
>
>
>===================================================================
>RCS file: RCS/machdep.c,v
>retrieving revision 1.4
>diff -c -r1.4 machdep.c
>*** machdep.c   1997/09/02 01:50:49     1.4
>--- machdep.c   1997/09/02 01:54:49
>***************
>*** 2145,2150 ****
>--- 2145,2153 ----
>        case MACH_CLASSQ:
>          case MACH_CLASSQ2:
>                mac68k_machine.sonic = 1;
>+                 /* The next two lines are the infamous "madhatter" patch */
>+                 mac68k_vidlog = mac68k_vidphys = 0xf9000000;
>+                 mac68k_vidlen = 1 * 1024 * 1024;
>        case MACH_CLASSAV:
>                VIA2 = 1;
>                IOBase = 0x50f00000;
>
>
>
>---------------------------------------------------------------------
>
>The difference this seems to make(from putting a couple of debugging
>printf's in grf_iv.c) is that "mac68k_vidlog" gets a value other than
>zero.  That means that "grfiv_attach()" also sets a non-zero value for
>"fbbase".  This seems to be enough to get X to start working.
>
>As far as I can tell, the value of "mac68k_vidlog" should be non-zero,
>anyway.  The 68030 machines get the value through the "get_mapping()"
>routine, which used to be broken for the 68040 systems.  I was hoping
>it was now fixed, but it looks like it isn't.  Perhaps we should be
>setting "mac68k_vidlog" some other way for the 68040 systems until
>this gets fixed.


and gave the patch a try.

And, lo! and behold!

All of a sudden X11 runs on my Q700 in monochrome 512x348, 640x480, 824x624
and 1152x870 just fine. The kernel gets the location of the screens exactly
to the point. Seems not the Q700 violates the QuickDraw specs but we do?

So... The variable settings in the patch are limited to  CLASSQ/CLASSQ2
machines (what's the difference, btw?). What exactly was the reason for not
committing the patch? What does it break, if anything? We could have had
X11 on a Q700 in 1.3...

	hauke


--
"It's never straight up and down"     (DEVO)