Subject: LCG autodetection figured out completely
To: None <port-vax@NetBSD.org>
From: Blaz Antonic <blaz.antonic@siol.net>
List: port-vax
Date: 03/21/2004 16:55:36
Hello,

At least i hope so :) Owners of Vaxstation 4000 VLC and model 60 please
check whether this works for your configuration. Please let me know
whether it works or not with exact figures relevant for your system. I
have verified it on model 60 with HR 4 and 8 plane and facts fit my
understanding. Once i get enough replies stating that this detection
method works it will be incorporated into LCG driver.

Instructions below are simple enough, if you can't do basic boolean
maths in your head please use a piece of paper or a calculator
andcontact me directly with results for your box (whether it works or
not and what kind of LCG and resolution you're using).

For VLC:
>>> e 200f0000

logically AND the value returned with 0x07 (= disregard everything but
lowest three bits) to get value v1

>>> e 20020000

logically AND the value returned with 0x80 (disregard all but 7th bit)
to get value v2

v1, v2 = LCG type:
0x05, irrelevant = 1280x1024 @ 8bpp
0x06, 0x80 = 1024x768 @ 8bpp
0x06, 0x00 = 640x480 @ 8bpp
0x07, 0x80 = 1024x768 @ 8bpp
0x07, 0x00 = 1024x864 @ 8bpp

For model 60:
>>> e 200f0010

logically AND the value returned with 0xf0 (= disregard everything but
bits 4-7) to get value v

v = LCG type
0x20 or 0x60 = 1024x864 @ 8 bpp
0x40 = 1024x768 @ 8bpp
0x80 = 1280x1024 @ 4bpp
0x90 = 1280x1024 @ 8bpp
0xb0 = 1280x1024 @ 8bpp dual head

Notes:

1: 8 longwords at 0x200f0000 repeat on VLC. I used the default offset.
Same goes for longwords 5-8 at offset 0x200f0000 on model 60, while
longwords 1-4 are different from 5-8. I wonder what interesting info is
hiding there :-)

2: Model 60 apparently has incomplete address decoding of those 8
longwords so they repeat onwards. I don't have a VLC but it's prolly the
same there. 

3: Some people (reading ?) this mailing list use certain Microsoft OS
and are stupid enough to install viruses/worms on their computer. If you
are subscribed to this mailing list or follow it via archives and fit
the above description please get some anti-virus software and stop
flooding my account with viruses that won't even run on my computer.

4: I have yet to see a box with either MONO, 24 plane HR, 8 plane VHR or
8 plane HR quad head LCG. If you have any of those the info above will
be of no use to you; please e-mail me in this case.

5: Thanks to Michael Hitch we'll hopefully have a fully functional lcg
driver for 2.0 supporting wsfonts instead of a hardcoded single font). X
server shouldn't be very far away, if you happen to have a Vaxstation
with LCG and some time to fiddle with X server on top of wscons please
let us know. Experience with X over wscons from other NetBSD ports (like
i386) would help, obviously.

Blaz Antonic