Subject: LCSPX/SPXg driver, testers wanted
To: None <port-vax@NetBSD.org>
From: Blaz Antonic <blaz.antonic@siol.net>
List: port-vax
Date: 12/04/2005 10:35:18
Hello,

Another week has passed and since I haven't recieved any further replies
or thought of anything else that I wanted to add to driver at the moment
I figured I'd publish it and get some feedback. Even though LCSPX
portion hasn't been tested at all it should work in theory. Driver is
harmless and cannot ruin anything (data or hardware) even if it
misbehaves but do keep a functional kernel somewhere handy just in case
if it blows up on the first try :-)

Prerequisites:
- NetBSD/VAX 2.0.something or newer (tested on 2.0_BETA)
- The driver itself, hosted graciously by James K. Lowden:
http://www.schemamania.org/~blaz/spx.c (md5sum says:
a1a7c5a8d96989b04ab720515021e770  spx.c).
- Vaxstation 4000 model 60 or 9x with LCSPX or SPXg framebuffer (tested
with SPXg framebuffer only) *OR* (if you're feeling inquisitive) VS 3100
with SPX framebuffer. SPXgt framebuffer in 4000/9x will create a
false-positive ID and will mostlikely result in garbage on screen due to
unknown pixel layout of SPXgt framebuffer but should not cause any other
problems (as in: kernel will still be functioning normally). I didn't
receive any ID information about this particular HW combination so I
assume nobody out there uses this paritcular combination or just doesn't
care; either way, it's not my problem :-)
- S3 switch set to serial console if you're using 4000/9x - this is a
workaround for keyboard bug in keyboard driver (dz_vsbus) that nobody
with the know-how can be bothered to fix for what, 1 year now ? Again,
this isn't framebuffer driver bug but keyboard driver bug, please don't
report it to me - I didn't put it there and I don't know how to trigger
DZ interrupt properly in order to fix it. I haven't tested this
conbination at all because it's pointless until keyboard bug is fixed.

How to use this driver:
- Copy file spx.c into your sys/arch/vax/vsa directiry in kernel sources
hierarchy.
- Add appropriate entry to sys/arch/vax/conf/files.vax that references
spx.c; use lcspx entry as a template or simply modify lcspx entry to
suit new driver - in-kernel lcspx.c is braindead anyway and should be
removed
- Add appropriate entry into your kernel configuration file; I haven't
hardcoded all the addresses even though I probably should have so use
the following key to find correct CSR for your framebuffer:
VS 4000/60 with SPXg: 0x22200000
VS 4000/9x with SPXG: 0x28200000
VS 4000/9x with LCSPX: 0x38000000
VS 3100 with SPX: 0x38000000
- Do not forget to remove old lcspx0 entry from your kernel
configuration file - not only is that driver braindead and vastly
inferior to this one, it can also cause problems on 4000/9x machines
without LCSPX (= it will hang the kernel during boot-up, rendering
GENERIC kernel unbootable).
- Modify /etc/ttys file to enable aproppriate /dev/ttywX entries. Do+Fx
key combination switches between virtual terminals.
- If you value your eyesight you will want to use different console font
(other than QVSS that is) in kernel config file. I like LUCIDA, others
prefer Gallant. YMMV. The bigger the font (glyph-size wise) the faster
console operation will be. Typefaces with (width % 4) == 0 should
definitely work, others (none in stock NetBSD kernel anyway so these
would be custom fonts) might. Default Vaxstation 4000 console font
(extracted and organized neatly by der Mouse) hasn't been included into
kernel source tree for some reason unknown to me so you can't use it -
it would be neat though. I still have his source file handy so if
somebody wants to give this font a try let me know.
- Verify that kernel configuration file entries pertaining to wscons
match your desired configurations (number of consoles, enabled wsmux,
etc.).

LCSPX and SPXg on 4000/9x should work out of the box. LCSPX hasn't been
tested but provided that font rendering works everything else should
work too since it's basically my old LCSPX driver I published last year
with its code refined and made more human-readable and with HW rendering
added.

4000/60 and 3100 with SPX are not supported out of the box and will
require tiny modification (one line) of spx.c in order to function at
all because there is no autodetection for these particular combinations
of hardware. SPX (when using 1280x1024 resolution) is functionally
identical to LCSPX so all you have to do is to modify machine type
check. If you're using 1024x864 SPX resolution you should modify
spx_init_common() function accordingly.

There might be bugs left in attribute handling code etc.; I've only
tested shell operation with basic commands like ls and man so I would
appreciate feedback and/or bugfixes, especially from people with LCSPX
(by far most common graphics option for VS 4000/9x). Please test apps
that insert columns/rows (= text editors, etc.) if you can and also try
out different terminal type settings (in /etc/ttys). Also let me know
what you think about last few visible lines on the screen that don't
contain any text because it couldn't fit there (screen height % font
height of lines) - should they remain black as they are now or should
they be painted in background color instead ?

This is mostlikely my last driver for NetBSD/VAX. I have few ideas for
other interesting components (VS 4000 audio was next on my list - I can
make it buzz at desired frequency but I can't think of a way to generate
periodic 8 KHz interrupts) but my current #1 priority is finally getting
a job that pays. 

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