svgalib et al

David Mosberger-Tang (davidm@cs.arizona.edu)
Sat, 22 Jul 1995 23:46:06 -0700


The following files are new on my ftp site:

ftp://ftp.azstarnet.com/pub/linux/axp/misc/svgalib-126axp.patch.gz
ftp://ftp.azstarnet.com/pub/linux/axp/misc/axpbin-svga.tar.gz

The former is a patch to svgalib-126.tar.gz that should make it work
on the *Noname* boards and the latter is a bunch of SVGAlib libraries
and binaries.

The svgalib patch also adds support for grayscale monitors (guess what
type of monitor I have... :)---just add they keyword "grayscale" to
your libvga.conf file if you have a grayscale monitor. It will ensure
that the green channel of the color-lookup table is programmed as if
it were the Y component in a YIQ signal (i.e., the signal that is used
in grayscal TV sets). Current limitations:

- works on Noname *only*
- tested on #9 GXE 64 PCI only (s3 Vision864 chip)
- two or three memcpy routines in libgl are missing (they'll
print warnings if you try to use them)
- nothing is optimized for the Alpha yet
- mouse-support untested

Except for these limitations, pretty much all programs that come with
svgalib seem to work fine. Also, zgv-2.7 (a gif & jpeg viewer) works
great with svgalib. In order to compile svgalib, you need to apply
the following patch to Bob's libc:

--- malloc.h~ Tue May 16 17:41:08 1995
+++ malloc.h Wed Jul 19 20:12:45 1995
@@ -22,9 +22,14 @@
fragments in a block have been freed, the block itself is freed.
WARNING: BLOCKSIZE must be set greater than or equal to the
machine's page size for valloc() to work correctly. The default
- definition here is 4096 bytes. */
+ definition here is 4096 bytes for Intel and 8192 bytes for Alpha
+ processors. */
#define INT_BIT (CHAR_BIT * sizeof (int))
-#define BLOCKLOG (INT_BIT > 16 ? 12 : 9)
+#ifdef __alpha__
+# define BLOCKLOG 13
+#else
+# define BLOCKLOG (INT_BIT > 16 ? 12 : 9)
+#endif
#define BLOCKSIZE (1 << BLOCKLOG)
#define BLOCKIFY(SIZE) (((SIZE) + BLOCKSIZE - 1) / BLOCKSIZE)

svgalib does a lot of mmap'ing and the current
/usr/include/linux/mman.h doesn't define some of the flags properly
for the OSF/1 version of the mmap call. You'll need to fix this too
(I submitted a patch for this to Linus, so it may show up in the
kernel source soon).

As compiling this stuff yourself may be troublesome, I also put up
binaries and libraries that are ready to use (they are in
axpbin-svga.tar.gz). The jpeg library is included too, because it is
needed to build zgv. The binaries should work on Noname systems, but
probably not anywhere else (in particular not on the Jensen because it
has a completely different bus-I/O encoding).

BTW: you should be able to define zgv as an external viewer for lynx,
which makes it a lot more useful, IMHO.

Enjoy,
--david