Return to BSD News archive
Xref: sserve comp.unix.bsd:6868 comp.unix.sysv386:24944 comp.os.linux:13235 Path: sserve!manuel.anu.edu.au!munnari.oz.au!uunet!noc.near.net!hri.com!spool.mu.edu!caen!zaphod.mps.ohio-state.edu!swrinde!gatech!prism!gg10 From: gg10@prism.gatech.EDU (GALLOWAY) Newsgroups: comp.unix.bsd,comp.unix.sysv386,comp.os.linux Subject: Summary: X386 and Diamond Speedstar/Gateway CS1024ni Message-ID: <71948@hydra.gatech.EDU> Date: 20 Oct 92 22:26:33 GMT Followup-To: comp.unix.bsd Organization: Georgia Institute of Technology Lines: 200 First, thanks to all who responded to my desperate cry for help. I was amazed to find that at least 5 people claimed to have the same hardware setup as mine, but all had completely different Xconfig files. Only one of these worked for me. Each person had completely different dot clocks. I calculated my own horz and vert timings with no trouble but still could not get them to work. After some experimentation, I found at why... Out of the 8 clocks shown in my Xconfig below, only three are really used: 25 50 65 But my system will not work with this line in my Xconfig: Clocks 25 50 65 but it will work with: Clocks 25 0 0 0 0 0 50 65 It seems as though the position of each dot clock is significant. Any dot clocks which are not used can be safely set to zero. Now I have a friend with a 486/33 with a local bus ET4000 display card. My Xconfig will not work for him. So we started with the following: Clocks 25 50 and then: Clocks 25 0 50 and so on ... until we finally got 800x600 mode to work with: Clocks 25 0 0 0 50 Then we started trying 1024x768: Clocks 25 65 0 0 50 and finally got it working with: Clocks 25 0 0 0 50 0 0 0 0 65 Now this will not work for everyone. First of all you have to know which dot clocks are used for each mode for your card. We found this out using a program which came with his card. Second you have to know the horizontal sync frequency and vertical refresh rate for your display. The program "vmode" which came with my card told me these. The values for my system are: Mode Dot clock Horz sync freq Vert refresh 640x480 25Mhz 31.5khz 60hz 800x600 50Mhz 48.1khz 72hz 1024x768 65Mhz 48.9khz 60hz Below is an example of how I calculated my 640x480 timings. Other modes are similar. 1) Determine number of dots per line dots_per_line = dot_clock / horz_sync_freq = 25000 / 31.5 = 793.65 (round up to the nearest multiple of 8) = 800 2) Determine number of microseconds per dot us_per_dot = 1 / dot_clock = 1 / 25 = 0.04 3) Determine dots per horizontal sync pulse (or width of pulse in dots) From Chin Fang's configuration tutorial in file CONFIG we have that the hsync with is about 3.5 to 4.0 microseconds. We'll use 3.8us below: dots_per_hsync = us_per_hsync / us_per_dot = 3.8 / 0.04 = 95 (round up to a multiple of 8) = 96 4) Determine horizontal timings We have 800 total dots, 640 visible, and 96 for the hsync pulse leaving 64. 800 - 640 - 96 = 64 We'll put half of these before the pulse and half after (see Fang's CONFIG) which gives us: 640 (640+32) (640+32+96) 800 5) Determine number of microseconds per line us_per_line = dots_per_line / us_per_dot = 800 / 0.04 = 32 6) Determine lines per vertical sync pulse lines_per_vsync = us_per_vsync / us_per_line = 150 / 32 = 4.6875 (round up) = 5 7) Determine number of microseconds per frame s_per_frame = 1 / frames_per_sec = 1 / 60 = 0.0167 us_per_frame = 1000000 * s_per_frame = 16667 8) Determine number of lines per frame lines_per_frame = us_per_frame / us_per_line = 16667 / 32 = 520.83 (truncate or round) = 520 9) Determine our vertical timing We have 520 total lines, 580 visible, and 5 for the vsync pulse leaving 35. 520 - 480 - 5 = 35 We'll put ten of these before the pulse and the rest after (see Fang's CONFIG) which gives us: 480 (480+10) (480+10+5) 520 10) So now our timing line looks like: "640x480" 25 640 (640+32) (640+32+96) 800 480 (480+10) (480+10+5) 520 or "640x480" 25 640 672 768 800 480 490 495 520 Hope this helps... Greg Galloway gg10@prism.gatech.edu ------------------------------------------------------------------------------- # Xconfig RGBPath "/usr/lib/X11/rgb" #FontPath "/usr/lib/X11/fonts/misc/,/usr/lib/X11/fonts/75dpi/" FontPath "/usr/lib/X11/fonts/misc/" Keyboard AutoRepeat 500 5 Xleds 1 2 3 ServerNumLock # DontZap Microsoft "/dev/ttys1" #MouseSystems "/dev/ttys2" #MMSeries "/dev/ttys2" #Logitech "/dev/ttys1" #MouseMan "/dev/ttys2" #Busmouse "/dev/ttys2" # BaudRate 1200 # SampleRate 150 Emulate3Buttons vga256 Chipset "et4000" #Chipset "et3000" #Chipset "gvga" #Chipset "pvga1" Vendor "diamond" Clocks 25 0 0 0 0 0 50 65 Virtual 1024 1024 ViewPort 0 0 Modes "640x480" "800x600" "1024x768" #Displaysize 1024 768 #Staticgray #Grayscale #Staticcolor #Pseudocolor #Truecolor #Directcolor #Screenno 0 Videoram 1024 ModeDB # name clock horzontal timing vertical timing flags "640x480" 25 640 672 768 800 480 490 495 520 "800x600" 50 800 864 970 1056 600 608 615 633 "1024x768" 65 1024 1119 1303 1360 768 771 779 806