This is my port of the Diamond clock setting program written by Frank Klemm (pfk@rz.uni-jena.de). Originally it would not run under linux. This program has _NO_ proprietary information from Diamond in it. You are free to use it and tell your friends. You won't be fined, sued, or forced to wear an albatross around your neck. I have included the binary and sources in this package. The binary has been compiled with GCC 2.2.2d7 and the 4.1 libraries. If you have different libraries you might do well to recompile. A makefile is included. The program needs to be owned by root (chown root freq), and the setuid bit must be set too (chown a+sx freq). The execute flag should be set as well. The safest thing to do with this program is set the second clock ONLY. To use this program with X you need to set the clock line in your Xconfig as follows: Clocks 25 28 xx ; where xx is some dummy value The dummy value is only used as a placeholder. X doesn't use the value at all. The only thing that you have to do is make sure that the resolution that needs to have the clock set has this dummy value as its clock value. This insures that X selects the third (clock 2) clock for the dot clock. The Diamond card has three clocks (0 - 2) all three clocks seem to be programmable. The first two (0 and 1) are rather weird to monkey with. They are preset to 25.1 and 28.2 MHz respectively on power up or cold boot. They are not reset by a warm boot. They are only reset on a cold boot or power up. The third one (2) seems to be the best one to play with. I basically ignore the first two clocks and pretend that they are not programmable. Also, note that this is a one way street. Once the clock is set you cannot read back the values you wrote. However, there are other programs out there (clocks.exe under DOS in particular) that can derive the dot clock frequency. I have clocks.exe and have run freq under MS-DOG and clocks accurately reports the frequency that I previously set. What I have been able to do is start X to the 640x480 resolution. Open up an Xterm window and do: freq xxxxx y ;xxxxx being the dot clock freq I want in kHz ;y being the clock to set (0 - 2) typically 2 This sends the screen into fits. At this point I then do Ctrl-Alt-keypad +. This switches to the next resolution in my Xconfig. The screen then syncs up real nice. :) You can also run freq from the text prompt and then start X with the same results. Also, by repeatedly switching resolutions with C-A-+ the next time you get to 640x480 the screen will be normal again. X knows to use clock 0, and FREQ forces the use of the clock being set, thus, the screen confusion. Enjoy this program, I know I do. Oh, and one more thing. Hey Diamond it was only a matter of time! Ray Balister balister@cebaf.gov