Subject: 1.5 wscons and X look wrong at some resolutions - fixed yet?
To: None <port-macppc@netbsd.org>
From: Derek Peschel <dpeschel@eskimo.com>
List: port-macppc
Date: 12/17/2001 19:32:18
Hi everybody,

I'm running 1.5 (AGP G4 tower, OpenFirmware 3, not sure what BootROM,
the usual ATI Rage card, hooked up to a 17" Apple Studio Display).

If these problems are fixed in 1.5.2, then I can stop investigating them!
I noticed some changes in rasops but I haven't looked at wscons or X.
(I know I should probably just upgrade to 1.5.2.  Hopefully that won't
break anything else.)

wscons' text display is shifted too far to the right when I use a screen
size of 1056x792 or 1600x1200.  Does anyone know if this was fixed in 1.5.2?
If no one knows, maybe someone with my hardware and 1.5.2 can check.

Also, wscons sometimes gives me a terminal width that's less than the
highest possible (given the resolution and font size).  How does it
decide on a terminal width -- table, formula, heuristic, something else?

Here are the gory details.

width  line  height    font      cwidth     cheight

  640  (768) x  480    6x11     2 106  2    3 43  4

  800 (1024) x  600    6x11     1 133  1    3 54  3
                                4 132  4

  832 (1024) x  624    6x11     2 138  2    4 56  4

 1024 (1024) x  768   12x22     2  85  2   10 34 10
                               32  80 32

 1056 (1280) x  792   12x22     0  88  0    0 36  0
                                0  88  0
                              112  78  8

 1280 (1280) x 1024   12x22     4 106  4    6 46  6
                               16 104 16

 1600 (1792) x 1200   12x22     2 133  2    6 54  6
                               32 128 32
                              128 122  8

"line" is OF's "linebytes" property from "dev screen .properties".

"cwidth" shows pixels at the left, characters, and pixels at the right.
The first "cwidth" for a resolution shows the largest possible number
of characters.  The second (if any) shows the actual number that wscons
decided to use and reported to stty.  The third (if any) shows what my
screen looks like.

"cheight" shows pixels at the top, characters, and pixels at the bottom.
It shows the largest possible number of characters; wscons always uses
that number and reports it to stty; and the text is always correctly
aligned on my screen.

X is another story.  It's always aligned with the upper left corner
of the screen, but its idea of the layout of video memory is quite
different from the real layout, except at 1024x768 and 1280x1024.
Incidentally, those are the only resolutions where the width is the
same as linebytes.  Coincidence or not?  I'm still trying to find out
exactly how X pixels map to screen pixels at the broken resolutions.

In PR port-macppc/13022 someone else says X is broken at 1152x870.

-- Derek