This FAQ pertains to the use of Diamond Computer's video card products and XFree86 with the Linux Operating system. I haven't spoken with many people from the BSD groups. If you find any of these utilities of use, please let me know, so that the BSDs may be covered as well. Please forward any comments, corrections, enhancements, flames, suggestions, etc... to: joe@apache.dtcc.edu S: ToC * Warning, Please read this first! * Introduction * Writing Diamond * Some Questions & answers about Diamond Video Cards * Fixes (procedures some of us netters have used to get our Xwindows systems up and running). + Joe's fix for Stealth 24 (ISA) + Johnson's fix for the Speedstar+ + Vesku's fix for the Stealth VRAM v.2.32 + Console fix + Cybard's fix Diamond SS24 * THE END & contributors list To ease your quest, search for: S: Major sections Q: Questions F: Fixes C: preceeds & trails the Xconfigs S: Warning WARNING: THE USE OF THE SOFTWARE RECOMMENDED OR TECHNIQUES DESCRIBED WITHIN THIS DOCUMENT: * MAY * DAMAGE * YOUR * VIDEO * CARD * AND/OR * MONITOR *. (Side note: It seems very few and far between that it happens, but it has happened, or so I've heard. Please send any such problems to joe@apache.dtcc.edu. You have been warned, so don't hold me responsible!) I believe this pertains to frequencies which may exceed your monitor's capabilities, particularly if you have an older or lower-quality monitor! Frequencies which work great on one monitor may cause monitor and/or video card damage when used on a different system or monitor. It is YOUR RESPONSIBILITY to ensure that any setting you use meets the safe operating parameters of your monitor. NO WARRANTY THERE IS NO WARRANTY FOR THIS DOCUMENT, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE DOCUMENT "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE DOCUMENT IS WITH YOU. SHOULD THE DOCUMENT PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. S: Introduction David C. Niemi is responsible for initiating this FAQ, I (joe@apache.dtcc.edu) have taken over it's maintenence. Purpose: Diamond Computer Systems, Inc. the maker of the Diamond {SpeedStar, Stealth, Viper, etc.} have a policy which hinders the ability to write free software for several of their products. It seems very strange that any company would hold a policy such as this. My understanding is that it protects "trade secrets" they own, and would like to protect. Because of this, this FAQ exists and hopefully will cut down on the bandwidth consumed by owners of Diamond Computer Systems, Inc. video card product, in reguards to XFree86 Xwindows System. The creators of this FAQ are not in any way affiliated with Diamond Computer Systems, Inc. and do not advocate purchasing Diamond products. This posting is not intended to encourage, nor discourage people from buying Diamond video cards. For those of use who own Diamond products, and wish to be able to use them with XFree86, this FAQ *may* be of use. S: Writing Diamond It seems unlikely that Diamond Computer Systems, Inc. will change their practice, especially if we barrage them with hostile letters proclaiming dissatisfaction with them and/or their practice of non-disclosure. If you feel strongly enough to write them, use a cool calm voice. State your position, and organizations with which you are involved and your influence in future purchases. State weather you would recommend their product in the future and why or why not. Remember, you're trying to persuade. Anger is not persuasive. Give yourself a cool down period, if needed. Leave the letter alone, and come back to it tomorrow. S: Questions Q: What are the different video cards has Diamond Computer Systems Inc. produced? 1. SpeedStar VGA: Tseng(ET4000) chipset and Music DAC 2. SpeedStar High Color: Tseng(ET4000) chipset and Sierra DAC 3. SpeedStar 24: Tseng(ET4000) chipset and Diamond(SS2410) DAC 4. SpeedStar 24X: Western Digital(WD90C31) chipset and Diamond(SS2410) DAC 5. Stealth Vram: S3(P86C911) chipset and Diamond(SS2410) DAC 6. SpeedStar Pro ISA: Cirrus Logic chipset 7. SpeedStar Pro VLB: Cirrus Logic chipset 8. Stealth 24 ISA: S3(P86C801) chipset and Diamond(SS2410) DAC 9. Stealth 24 VLB: S3(P86C805) chipset and Diamond(SS2410) DAC 10. Stealth Pro ISA: S3(P86C928) chipset and Diamond(SS2410) DAC 11. Stealth Pro VLB: S3(P86C928) chipset and Diamond(SS2410) DAC 12. Viper VLB 1/2 MB: Weitek(P9000) chipset and Bt(485KPJ110) DAC Q: What makes the Diamond so special??? Several of their video cards use Diamond's custom clock generator chip, which is not compatible with the clock from any other vendor. Some of the older products, don't suffer from this clock generator because they pre-date the custom clock generator. Q: How can they claim "Compatibility" and still be excluded from Xfree86? Using BIOS level calls, most of the video modes, including SVGA specific modes can be attained with the card. Most Unicices do not work in the ``real'' mode of Intel platforms. This makes a BIOS level call difficult, if not impossible. The XFree86 team has much work. Adding a platform specific -- complicated feature such as bios calls is the least of their worries. Q: What about the Diamond Viper? It is based on the Weitek P9000, not an S3 chip, so it needs completely different drivers from the rest of the Diamond Stealth series. You can use the VGA add-on of the Viper with the Mono X-server, but you will neither have color nor use the accelerated features of the Viper. The P9000 chipset (and so the Viper) is currently not supported and will probably not be supported in the near future by the XFree team. Diamond Viper X Server Development Team: Contact Harry Langenbacher (harry@brain.jpl.nasa.gov) for info on a group of programmers developing an Xfree/Linux driver for the Diamond Viper. Q: Can I use a Diamond products with XFree86? Yes, at least under Linux. XFree86 will work out of the box with the monochrome server (/usr/X386/bin/XF86_Mono) at 640x480. For several of the SpeedStars's to get 640x480 color use the XSVGA Server. To get higher resolutions, you will need to specially set the Diamond Clock on your card (please read the WARNING first). For the Stealth 24's get 640x480 color, install XS3 and the fix sections of this FAQ. To get higher resolutions, you will need to specially set the Diamond Clock on your card (please read the WARINING first). For the Viper, see Question above "What is the Diamond Viper." The clockchip for Diamond products will not be supported in the further (future) XFree86 releases. Though you should be able to use the freq, s3, or ds3 program to set the clocks from the server (as in ClockProg option line in Xconfig). XFree86-2.0 (this will replace XS3) will support more than 1 MB and will allow higher resolutions. Most s3 chips, however, only work accelerated at horizontal resolutions 640, 800, 1024 and 1280 (the most recent chips also at 1152). Q: I get funny black blocks and few if any text when I bring up XS3-0.4.4 on my Diamond Stealth. I also see black and white vertical lines before the normal X stipple background is loaded. How do you fix this? In /usr/X386/lib/X11/Xconfig, change the "Virtual 1024 1024" line to be "Virtual 1024 768". XS3 uses the other 256KB of memory for a font cache, whether it is in use or not; this is not a Diamond problem per se. Q: I have a Diamond Stealth 24 VLB card, and menus and popups don't get erased under my window manager. Add the following line to your Xconfig: Vendor "nolinear" This may make things a bit slower, but this card is fast enough you probably won't notice, and at least it will work. S:Q: How do I set the Diamond Clock? (Note, to run programs that set clock frequencies, you'll have to be root, or the program will have to be suid root.) xclk.gz Useful calculating ModeDB timings, based on parameters passed to it. (xclk.gz only contains a binary that works on Linux. I don't know where the source code can be found.) vgaset.tpz Helps fine tune timing values in Xconfig. This was included with the SLS 1.03 distribution of Linux. stealth-fix.tar.Z Contains ``s3'' program which sets up the Diamond Stealth 24 Clocks, for 1024x768. ds3.tgz ``ds3'' is a modified version of s3, provides a friendlier and more capable interface for setting the third clock. speedstar-fix.tar.Z Contains ``freq'' program, for setting the Diamond SpeedStar's clocks frequencies. This also works with older Stealth cards (stealth's based on ET4000 chipset). diamond.taz Same as speedstar-fix.tar.Z XS3-0.4.tar.gz BETA release of the XFree S3 server (0.4.4) Developed by Amancio Hasty Jr. xs3-928.gz The 928 chipset (as in stealth pro) will not work with the standard XS3-0.4.4 get the xS3-928 instead. Amancio Hasty: XS3 is not based on XFree86 is however based on X11R5 and Kevin Martin's IBM 8514/a X server. XS3 has never supported the ibm8514/a cards (just a popular question I get all the time) P.S.: Very important Jon Tombs out of the Linux group is the one responsible for XS3 under Linux. He deserves also a lot of credit for working on XS3 and continuing the S3 line work for his server is going to be part of XFree86. I am not part of XFree86 because I rather hack pretty much on my own and wanted to release the server much sooner than XFree86 team wanted. S:Q: Where do I get the components I need? These are just some locations. Check a mirror near you, for these files. Anonymous FTP The path to the program when Server this FAQ was written The Program ------------- ---------------------------- ----------- sunsite.unc.edu /pub/Linux/X11/X-servers/s3 xclk.gz sunsite.unc.edu /pub/Linux/X11/xutils vgaset.tpz ted.cs.uidaho.edu /pub/linux/sources/usr.bin.X11 stealth-fix.tar.Z sunsite.unc.edu /pub/Linux/X11/install ds3.tgz sunsite.unc.edu /pub/Linux/X11/X-servers/s3 XS3-0.4.tar.gz sunsite.unc.edu /pub/Linux/X11/X-servers/s3 xS3-928 sunsite.unc.edu /pub/Linux/X11/X-servers/s3 FAQ Q: Will future releases of XFree86 support Diamond's Cards? No. XFree86 2.0 and greater, will replace XS3-0.4.4 and XS3-928 servers. Also, the freq, (or s3, or ds3) program that you use to set your clock, may be incorporated as part of your Xconfig, with the ClockProg option. HOWEVER, at the time this FAQ is being written, we are all on the waiting list for XFree86 2.0. Q: How do I get my card to work with XFree86, and Linux Read warning at the top of this document before you attempting any of these suggestions. These fixes should work with either XFree86 versions 1.2 & 1.3. There are a number of fixes, contained in this document. One may be just what you were looking for. (for those with search capability, search for ``F:'', to find the one for your card.) F:--------------------Joe's Fix: Hardware: Diamond Stealth 24 (ISA) v1.03 486/50 Contaq ISA motherboard NEC MultiSync Plus Monitor Linux 0.99 pl11 (SLS 1.03 release) I don't know why xclk is under X-server/s3. It seems to me that it should work find, reguardless of the server you use. (This program is great!!! Helps computing ModeDB timings) There's a vgaset which comes with Linux, I think this is the same. (I used the one that came with Linux SLS 1.03.) The s3 program in stealth-fix sets the stealth clocks (properly for 1024x768)... (I guess you have to run the dos stl/util/stlmode program, to set the clocks, before you'll get any of this to work, this is purely speculation though.) With XS3-0.4.4 server linked to /usr/X386/bin/X, and the Clocks line in Xconfig commented, it reported what the clocks were. I set the Clocks line to these values. I ran the xclk program, with the value of the third clock in the list reported by startx. xclk -h 74 1024 >> /usr/X386/lib/Xconfig After this, I started x, and used vgaset, and found a magical combination. This worked for me, though, I do need to rerun vgaset. My Xterm had a hard time syncing the last time I stated up. I have to run s3 5 9 every time before startx now. Addendum: My monitor still has a hard time syncing with s3. I'm now using the ``ds3 65'', instead of the s3. It took a little more experimenting to find the right frequency. Oddly enuogh no changes were necessary to my Xconfig file, and it works perfectly. This seems to be much a much better frequency for my monitor. I hate to use this comparison... Now however, I'm getting an almost identical resolution as in Windows, +plus the image is much sharper than with plain old s3 5 9. #C:--------------------Joe's Xconfig-------------------- # copyright etc... omitted, please see original distribution for # reference. This Xconfig works with my NEC MultiSync Plus Monitor, # and Diamond Stealth 24 (ISA) video card. #[non-video related Xconfig omitted] vga256 Virtual 1024 768 # vendor "nolinear" Clocks 25.2 28.3 74.6 74.4 42.9 0 74.3 0 0 0 0 0 0 0 0 74.5 Modes "1024x768" "640x480" Videoram 1024 ModeDB # clock horizontal timing vertical timing "640x480" 25 640 672 768 800 480 490 492 525 28 640 672 768 800 480 490 492 525 # The following lines generated by by ``xclk -h 74 1024 >> Xclock'' # and tweaked slightly, based on values provided by ``vgaset'' and # personal judgement. ( I think more tweaking is needed, last time # I started X, I had trouble getting the monitor to achieve a sync.) "1024x768" 74 1024 1024 1192 1368 768 768 779 806 # Refresh rate = 67.11Hz ; Horizontal Frequency = 54.09KHz #C: EOJoe's Xconfig ----------- joe's xbench/xstones xbench can be found at a mirror near you. i486/50, w/Diamond Stealth 24 (ISA), Linux & XFree 1.3 w/XS3-0.4.4 server. IMHO these are excellent results. xbench >joes.machine.out awk -f xstones.awk < joes.machine.out TOTAL 145502 lineStones TOTAL 56537 fillStones TOTAL 42860 blitStones TOTAL 3773638 arcStones TOTAL 143125 textStones TOTAL 97320 complexStones TOTAL 83315 xStones /* end Joe's fix & misc. Trivia */ F:------------ Johnson's fix for the Speedstar+ I am using SLS 1.02, but I believe it'll work the same way on the 1.03 server. I found my timings by trial and error, setting just the third clock. Once I got *something* on the screen, I could experiment. I finally got the ``freq'' program to set the clock on my card. Xfree doesn't support it, but it will do the job. It can be found at tsx-11.mit.edu in /pub/linux/sources/usr.bin.X11 as speedstar-fix.tar.Z. There is also a file which claims to fix the Stealth (stealth-fix.tar.Z). BTW, the README was a little too vague to really use, sorry to say. Here's my setup: #C:--------------------Johnson's Xconfig: # This Xconfig, has been condensed for brevity, please see original # XFree86 distribution files for CopyRight information. #[non-video related Xconfig omitted] vga256 Virtual 1024 768 ViewPort 0 0 Modes "1024x768" #Clocks 25 28 63 72 78 58 50 63 #Clocks 25 27 28 28 25 27 28 28 Clocks 25 27 60 65 25 27 60 65 ModeDB # clock horizontal timing vertical timing "640x480" 25 640 672 768 800 480 490 492 525 28 640 672 768 800 480 490 492 525 "1024x768" 60 1024 1048 1248 1328 768 776 786 806 #C: EOJohnsons' Xconfig Setting clock 1 at 28 did not work for me. I have a Diamond Speedstar+ vers 5.0 and an AOC 14'' monitor, with 1 meg ram on the card. I run freq as a part of loading X. In my .bashrc I have: alias x='freq 66997 2 ; xinit' When leaving X, I get triple images. Running nox fixes that: alias nox='freq 41999 2' By the way, the screen is sharper and has less flicker now than with diamond doing the clocksetting in DOS. Of course, your mileage may vary. It *might* be possible to find alternate timings that also work, perhaps some using the 28 setting on clock 1 that others have reported. I donno. By the way, in case it isn't obvious X is running at 1024x768 256 colors. Somewhat sharper than my rs6000 at the office. Hope this helps someone. David L. Johnson ID: dlj0@lehigh.edu /* end Johnson's fix */ F:----------(Vesku's fix)---------- Vesa T|rm{nen Equipment: A 33Mhz 486 clone, Diamond Stealth VRAM v.2.32, MicroScan 4A/ADI- monitor, SLS v.?.?? This uses the XS3-0.4.4 server, linked to /usr/X386/bin/X Here's what I did: 1) I got the diamond.taz and xclk.gz from sunsite.unc.edu. 2) I ran smode in VRAM/UTIL/SMODE (a DOS prog) and got the vertical and horizontal frequencies for 1024x768 mode. 3) I ran xclk, trying to get the same horizontal and vertical frequencies. (58.1 kHz and 72.0 Hz, respectively). xclk -h 80.88 1024 >> Xconfig gave me a stable screen. 4) I started X with 640x480 mode 5) I ran freq 80880 2, which set the Stealth clock 2 to 80.897 kHz, the screen went blank. 6) I pressed Ctrl-Alt-KeypadPlus, and there it was 1024x768 with 72 Hz refresh rate and not dancing samba (and the children clapped their furry hands). 7) I centered the screen with vgaset and set the Xconfig accordingly. How I start X: 1) First boot dos :-( and run the SMODE program, select CUSTOM, select 1024x768 with the right frequencies (this shows a screen with 1024x768 resolution). Then I exit SMODE and press C-A-del. 2) I boot Linux, start X with 640x480 mode, run freq and press C-A-+ and the mode is correct. It is possible to start in 1024x768 mode straight away by making an alias like 'startx; freq xxxxx y', but this hangs when exiting :(. If someone has a better solution (less hassle), send it to me as well as Joe. /* end Vesku's fix */ F:---------------Console fix Here's the console fix, from someone named "Juergen" but forwarded to me by Julio C. Pereda (zeus@lyon.nscee.edu): ------------- cut ----------------- *** linux/boot/setup.S.orig Mon Feb 1 15:13:19 1993 --- linux/boot/setup.S Mon Feb 1 15:39:38 1993 *************** *** 87,92 **** --- 87,101 ---- mov [4],bx ! bh = display page mov [6],ax ! al = video mode, ah = window width + ! init diamond stealth clock + mov ax,#0x4f02 + mov bx,#0x0205 ! 1024x768 + int 0x10 + ! + mov ax,#0x4f02 + mov bx,#0x03 !80x25 + int 0x10 + ! Get hd0 data mov ax,#0x0000 ------------- cut ----------------- Copy the above patch to /usr/src and patch the kernel with patch -p0 < [patchfilename] Now, what does the patch do? It is applied at an early boot phase at a time when the cpu is still in 8086 mode. At that time the vga-BIOS is still avail. and so the patch just enters the graphics mode and leaves it again. but the clock-chip is now set up. The clocks I use in my xconfig are 25 28 65. /* end Console fix */ F:--------------------The Cybard's fix I have a Diamond SS24 (not X) card and a TVM MediaScan 4A+ monitor. I'm running Linux with Xfree 1.3 (also worked with Xfree 1.2). I get an excellent 1152x950 resolution with the command 'freq 62000 2'. Here is my Xconfig: #C:-------------------------- cut here ---------------------------- # This Xconfig, has been condensed for brevity, please see original # XFree86 distribution files for CopyRight information. #[non-video related Xconfig omitted] vga256 # NoSpeedUp Virtual 1152 900 ViewPort 0 0 Modes "1152x900" "640x480" "800x600" Clocks 25 28 36 ModeDB # name clock horizontal timing vertical timing flags "640x480" 25 640 672 768 800 480 490 492 525 28 640 656 752 792 480 490 492 519 "800x600" 36 800 800 912 968 600 600 602 614 "1152x900" 36 1152 1184 1288 1360 900 898 929 939 Interlace #C:----------------------------------- cut here ---------------------------- /* end Cybard's Fix */ S: THE END SpeedStar VGA, SpeedStar High Color, SpeedStar 24, SpeedStar 24X, Stealth Vram, SpeedStar Pro ISA, SpeedStar Pro VLB, Stealth 24 ISA, Stealth 24 VLB, Stealth Pro ISA, Stealth Pro VLB and Viper VLB are registered trademarks (TM) of Diamond Computer Systems, Inc. People I've corresponded with, have helped in one way or another, and/or made major contributions: David.Niemi@oasis.gtegsc.com zeus@lyon.nscee.edu wet@Niwet@niksula.cs.hut.fi dudek@acsu.buffalo.edu staceyc@sco.com swift@world.std.com brad@bradley.bradley.edu dlj0@Lehigh.EDU bar@bbma2.ma.bb.de alan@curta.cc.columbia.edu hasty@netcom.com trucken@cs.umn.edu geyer@polyhymnia.iwr.uni-heidelberg.de ctj@fns.com (gee I hope I remembered everyone) With special thanks for kicking off this faq, and all his contributions: David.Niemi@oasis.gtegsc.com (BTW: I think that special thanks is kind of sarcastic, this has been a lot of extra work ;-) Best Wishes! Please forward any comments, corrections, enhancements, flames, suggestions, etc... to: joe@apache.dtcc.edu