Subject: Vaxstation 4000/60 LCG and keyboard, progress report & help needed
To: None <port-vax@NetBSD.org>
From: Blaz Antonic <blaz.antonic@siol.net>
List: port-vax
Date: 01/25/2004 13:03:50
Hello,

Since my last post on the topic (where i didn't get any useful clues as
to how wscons stuff is supposed to work on NetBSD/Vax) i managed to
almost accidentally get the framebuffer side working entirely. Below is
a dmesg:

NetBSD 1.6 (LCG) #29: Sun Jan 25 12:41:13 CET 2004
    root@anders:/usr/src/sys/arch/vax/compile/LCG

VAXstation 4000/60
cpu0: KA46
cpu: turning on floating point chip
total memory = 56936 KB
avail memory = 49712 KB
using 737 buffers containing 2948 KB of memory
mainbus0 (root)
vsbus0 at mainbus0
vsbus0: 32K entry DMA SGMAP at PA 0x740000 (VA 0x80740000)
vsbus0: interrupt mask 0
le0 at vsbus0 csr 0x200e0000 vec 770 ipl 15 maskbit 1 buf 0x0-0xffff
le0: address 08:00:2b:28:6b:1e
le0: 32 receive buffers, 8 transmit buffers
dz0 at vsbus0 csr 0x200a0000 vec 124 ipl 15 maskbit 4
dz0: 4 lines
lkkbd0 at dz0
wskbd0 at lkkbd0 (mux ignored)
lkms0 at dz0
wsmouse0 at lkms0 (mux ignored)
lcg0 at vsbus0 csr 0x21801000 vec 440 ipl 15 maskbit 2
wsdisplay0 at lcg0 (kbdmux ignored)
wsdisplay0: screen 0-7 added (160x68, vt100 emulation)
asc0 at vsbus0 csr 0x200c0080 vec 774 ipl 15 maskbit 0
asc0: NCR53C94, 25MHz, SCSI ID 6
scsibus0 at asc0: 8 targets, 8 luns per target
scsibus0: waiting 2 seconds for devices to settle...
sd0 at scsibus0 target 1 lun 0: <QUANTUM, FIREBALL_TM2110S, 300X> SCSI2
0/direct fixed
sd0: 2014 MB, 6810 cyl, 4 head, 151 sec, 512 bytes/sect x 4124736
sectors
sd0: sync (160.0ns offset 15), 8-bit (6.250MB/s) transfers, tagged
queueing
sd1 at scsibus0 target 3 lun 0: <DEC, RZ25     (C) DEC, 0A00> SCSI2
0/direct fixed
sd1: 406 MB, 1476 cyl, 9 head, 62 sec, 512 bytes/sect x 832527 sectors
sd1: sync (200.0ns offset 15), 8-bit (5.000MB/s) transfers
boot device: sd0
root on sd0a dumps on sd0b
root file system type: ffs

I uncommented the lines mentioning ttyw* in /etc/ttys.

There is/was a redundant (?) printf("\n"); in dev/wscons/wsdisplay.c
which i removed, just after the kbdmux ignored IIRC. I hope it's not in
current kernel. 

Anyway, the result now is that i get a login prompt on a monitor (not a
terminal !!!) on ttyw0. If i had a digital camera i'd make yo ua photo
but i don't own one :-) Alas the letters are quite small which prompts
my first question:

1: Is it possible to add another video mode in the driver, with user
being able to select which one he wants in the starting scripts, like on
x86 ? It is currently set to 160x68 which is a tad more than what i need
and i wouldn't mind settling for 80x34 which will do better for my eyes.
I just need an example of a code that implements two modes and how it
all connects into wscons layer (which looks like voodoo to me).

Second question is directly related to the login prompt as well; i use
serial terminal or telnet session to login into my Vax at the moment so
i never fiddled around with keyboard (which Anders kindly sent along,
thanks Anders !!!) except at >>> prompt.

2: How do i get my keyboard to work ? If anybody ever got a keyboard
working on a Vaxstation class machine with NetBSD please let me know
how.  I have a distinct feeling that despite lkkbd0 line in kernel
output i haven't done everything corerctly. Keyboard works fine while at
>>> prompt but doesn't do anything at ttyw0 login prompt. I'm a BSD newbie, something that might seem obvious to you might have been overloked by me.

LCG driver is currently a horrible bodgery, missing some vital checks,
LUT reload code (default color LUT is .... ugly, mildly put, and it
doesn't seem to include most colors evenly, especially the red part of
the spectrum is missing) and code to support X server. Oh yeah, the
latter will take somebody who understands how X server leeches to wscons
to explain the details to me, with the lack of any documentation on the
subject on the NetBSD website IIRC, if you want to see X server working
on LCG. Alternatively if there is a simple dumb framebuffer X server for
some other type of graphcis in NetBSD source tree that uses kernel
mmap()-ed access to paint into framebuffer directly i'd like to see the
code; it should be easy to adopt it for LCG (and LCSPX, with ragge's
code, parts of which i've stolen :-))).

Blaz Antonic
-- 
Hi! I'm a signature virus!
Copy me into your signature to help me spread!