ClockProg for SiS6326 graphics card and SVGATextMode

A program to allow the use of svgatextmode with a SiS6326-based graphics card.

The SiS6326 graphics chip is a bit outdated as a graphics chip these days but its ability to deal with high clock rates makes it a good chip for text-mode displays. Unfortunately svgatextmode does not work with it directly as it does not know how to program the clock generator on a 6326. This program, kp, fills the gap.

kp is not intended to be "incorporated" into svgatextmode in the sense of being a module or other form of extra code for svgatextmode; it is a standalone program for programming the clocks on a SiS6326.

svgatextmode has the ability to call an external program to program the clocks on cards it doesn't know about. This program is specified in the config file. kp is such a program.

So the first step is to install an unmodified version of svgatextmode, decompress
kp.c.gz, then compile kp.c, which is so simple it's not worth writing a makefile for it:

$ gcc kp.c -o kp

This results in a binary named
kp which should be made setuid root:
# chown root kp
# chmod 4711 kp
and placed somewhere suitable, like /usr/local/bin.

The next step is to edit
/etc/TextConfig, see below:

In the Chipsets section:

Chipset "SiS"
#clocks (no example known to me ; consult the XFree86 clocks line for your card)
# SiS 6326 has programmable clock chip, so this line is just a fudge really
clocks 28.278 28.322 30 35 40 45 50 55 60 65 70 75

The "no example known" line is from the original file, the next two are mine. svgatextmode moans if you don't supply a "clocks" line even though the 6326 has a fully programmable clock, so I just made up a line with some sensible-looking frequencies (the first two are for standard 80x25 modes, the rest just made up). Really there ought to be 16 frequencies listed but I couldn't be arsed to do that many. :-)

At the bottom of the Chipsets section is the ClockProg line:

#ClockProg "/usr/sbin/ClockProg"
ClockProg "/usr/local/bin/kp"

The first line is what you get in the standard file, the second is what you need.

Then you need to enter the appropriate values for your monitor in the HorizSync and VertRefresh lines, choose/calculate a suitable default mode, and set that mode in the "DefaultMode" line.

That should be enough, I think: invoking svgatextmode with no parameters ought to fire you up into the default mode.

Be sure to read the comments at the end of the source code file, and the documentation for svgatextmode.

Get the source: kp.c.gz

Back to Pigeon's Nest

Be kind to pigeons

Valid HTML 4.01!