Return to BSD News archive
Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!news.rmit.EDU.AU!news.unimelb.EDU.AU!munnari.OZ.AU!news.mel.connect.com.au!news.mira.net.au!news.vbc.net!alpha.sky.net!news.sprintlink.net!news-chi-13.sprintlink.net!newsreader.sprintlink.net!news.sprintlink.net!news-pen-14.sprintlink.net!news.up.net!news.mtu.edu!sol.ctr.columbia.edu!news.msfc.nasa.gov!newsfeed.internetmci.com!in3.uu.net!news-in.tiac.net!posterchild!news@tiac.net From: meissner@cygnus.com (Michael Meissner) Newsgroups: comp.unix.bsd.freebsd.misc,comp.windows.x.i386unix Subject: Re: 1152 x 864 mode for S3 X-server? Date: 01 Sep 1996 22:57:36 -0400 Organization: Cygnus Support Lines: 296 Sender: meissner@wogglebug.tiac.net Message-ID: <sy4tlh4o9r.fsf@wogglebug.tiac.net> References: <5087uf$dpv@usenet10.interramp.com> <nycG1LR@quack.kfu.com> NNTP-Posting-Host: 206.119.235.22 In-reply-to: nsayer@quack.kfu.com's message of Sat, 31 Aug 1996 19:47:35 UTC X-Newsreader: Gnus v5.1 Xref: euryale.cc.adfa.oz.au comp.unix.bsd.freebsd.misc:26473 comp.windows.x.i386unix:20903 In article <nycG1LR@quack.kfu.com> nsayer@quack.kfu.com (Nick Sayer) writes: | [note followups. This is not a FreeBSD specific issue] | | dcmyers@access.digex.net writes: | | >Has anyone run an S3-based video board at 1152x864 @ 70Hz? If so, | >can you send/post your /etc/XF86Config file? I'd like to see the | >mode timing numbers. The xf86config program does not allow you | >to enter anything other than the standard VESA modes of 1024x768 | >and 1280x1024. | | ModeLine "1152x900" 110 1152 1184 1312 1504 900 902 904 935 | | That's actually 78 Hz. You probably could just use 98 MHz as a dot clock | instead of 110 if it absolutely _has_ to be 70 Hz. With trial and error, I found my Nokia 477x worked best with: ModeLine "1152x864" 125.000 1152 1216 1368 1656 864 864 867 909 On the other hand, my Mag DX17F monitor only supports: ModeLine "1152x864" 99.000 1152 1208 1328 1552 864 864 866 902 (These are on 90 Mhz Pentiums (48 meg, 32 meg respecitively) with #9 GXE64 Pro video cards with 2 meg of VRAM on each card.) I picked up the following script some time ago that lets you calculate mode lines more directly: #!/bin/sh # This is a shell archive (produced by GNU sharutils 4.2). # To extract the files from this archive, save it to some FILE, remove # everything before the `!/bin/sh' line above, then type `sh FILE'. # # Made on 1996-09-01 22:56 EDT by <meissner@wogglebug.tiac.net>. # Source directory was `/home/meissner/bin.sh'. # # Existing files will *not* be overwritten unless `-c' is specified. # # This shar contains: # length mode name # ------ ---------- ------------------------------------------ # 1034 -r-xr-xr-x xconfig # 2630 -r--r--r-- xconfig.awk # save_IFS="${IFS}" IFS="${IFS}:" gettext_dir=FAILED locale_dir=FAILED first_param="$1" for dir in $PATH do if test "$gettext_dir" = FAILED && test -f $dir/gettext \ && ($dir/gettext --version >/dev/null 2>&1) then set `$dir/gettext --version 2>&1` if test "$3" = GNU then gettext_dir=$dir fi fi if test "$locale_dir" = FAILED && test -f $dir/shar \ && ($dir/shar --print-text-domain-dir >/dev/null 2>&1) then locale_dir=`$dir/shar --print-text-domain-dir` fi done IFS="$save_IFS" if test "$locale_dir" = FAILED || test "$gettext_dir" = FAILED then echo=echo else TEXTDOMAINDIR=$locale_dir export TEXTDOMAINDIR TEXTDOMAIN=sharutils export TEXTDOMAIN echo="$gettext_dir/gettext -s" fi touch -am 1231235999 $$.touch >/dev/null 2>&1 if test ! -f 1231235999 && test -f $$.touch; then shar_touch=touch else shar_touch=: echo $echo 'WARNING: not restoring timestamps. Consider getting and' $echo "installing GNU \`touch', distributed in GNU File Utilities..." echo fi rm -f 1231235999 $$.touch # if mkdir _sh02303; then $echo 'x -' 'creating lock directory' else $echo 'failed to create lock directory' exit 1 fi # ============= xconfig ============== if test -f 'xconfig' && test "$first_param" != -c; then $echo 'x -' SKIPPING 'xconfig' '(file already exists)' else $echo 'x -' extracting 'xconfig' '(text)' sed 's/^X//' << 'SHAR_EOF' > 'xconfig' && #! /bin/sh X # HISTORY # $Log: xconfig,v $ # Revision 1.3 1996/06/11 16:46:00 meissner # Add max horizontal/vertical frequencies. # # Revision 1.2 1996/06/11 16:39:57 meissner # Use /bin/echo. # # Revision 1.1 1996/06/11 16:39:16 meissner # Initial revision # X if [ $# -gt 0 ]; then X HR="$1" X shift else X /bin/echo -n "How many horizontal dots do you want to use? " X read HR fi X if [ $# -gt 0 ]; then X VR="$1" X shift else X /bin/echo -n "How many vertical dots do you want to use? " X read VR fi X if [ $# -gt 0 ]; then X DCF="$1" X shift else X /bin/echo -n "What dot clock frequency do you want to use? " X read DCF fi X if [ $# -gt 0 ]; then X HSFMAX="$1" X shift else X /bin/echo -n "What is the maximum horizontal frequency of the monitor? " X read HSFMAX fi X if [ $# -gt 0 ]; then X VSFMAX="$1" X shift else X /bin/echo -n "What is the maximum vertical frequency of the monitor? " X read VSFMAX fi X : ${MEISSNER:=$HOME} X exec awk -f ${MEISSNER}/bin.sh/xconfig.awk HR=$HR VR=$VR DCF=$DCF HSFMAX=$HSFMAX VSFMAX=$VSFMAX ${1+"$@"} < /dev/null SHAR_EOF $shar_touch -am 0611124696 'xconfig' && chmod 0555 'xconfig' || $echo 'restore of' 'xconfig' 'failed' if ( md5sum --help 2>&1 | grep 'sage: md5sum \[' ) >/dev/null 2>&1 \ && ( md5sum --version 2>&1 | grep -v 'textutils 1.12' ) >/dev/null; then md5sum -c << SHAR_EOF >/dev/null 2>&1 \ || $echo 'xconfig:' 'MD5 check failed' d10732469f61a1d65a1224565ac30373 xconfig SHAR_EOF else shar_count="`LC_ALL= LC_CTYPE= LANG= wc -c < 'xconfig'`" test 1034 -eq "$shar_count" || $echo 'xconfig:' 'original size' '1034,' 'current size' "$shar_count!" fi fi # ============= xconfig.awk ============== if test -f 'xconfig.awk' && test "$first_param" != -c; then $echo 'x -' SKIPPING 'xconfig.awk' '(file already exists)' else $echo 'x -' extracting 'xconfig.awk' '(text)' sed 's/^X//' << 'SHAR_EOF' > 'xconfig.awk' && X # HISTORY # $Log: xconfig.awk,v $ # Revision 1.1 1996/06/11 16:33:02 meissner # Initial revision # X # xconfig.awk - awk script for calculating Xconfig parameters for # XFree86, given the monitor specs and dot clock frequencies. # The default values are for the Viewsonic 15. # # Example Usage: # awk -f xconfig.awk HR=1024 VR=768 DCF=110 < /dev/null (or ^D input) # # The variable names and meanings are given below. # # Author: Richard Brown rab@tauon.ph.unimelb.edu.au # X BEGIN{ X X # Sensible defaults if not specified: X X HR = 1024 # Horizontal Resolution X VR = 768 # Vertical Resolution X DCF = 110.0 # Dot Clock Frequency (MHz) X X HFrontMIN = 0.50 # Horizontal Front Porch Minimum (us) X HsyncMIN = 1.20 # Horizontal Sync Pulse Width Minimum (us) X HBackMIN = 1.25 # Horizontal Back Porch Minimum (us) X HBlankMIN = 4.00 # Horizontal Blank Period Minimum (us) X HSFMAX = 64.0 # Max Horizontal Scan Frequency (kHz) X X VFrontMIN = 0.0 # Vertical Front Porch Minimum X VsyncMIN = 45.0 # Vertical Sync Pulse Width Minimum X VBackMIN = 500.0 # Vertical Back Porch Minimum X VBlankMIN = 600.0 # Vertical Blank Period Minimum X VSFMAX = 90.0 # Max Vertical Scan Frequency (Hz) X X verbose = 0 X } X END{ X X # Horizontal Scan Lines: X X Hfront = HFrontMIN * DCF + HR X if( Hfront%8 ) Hfront = 8 * (1 + int(Hfront/8) ) X # if( (Hfront - HR) < HFrontMIN * DCF ) Hfront += 8 X X Hsync = HsyncMIN * DCF + Hfront X if( Hsync%8 ) Hsync = 8 * (1 + int(Hsync/8) ) X X Hblank = HBlankMIN * DCF X HFL = HR + Hblank X if( HFL%8 ) HFL = 8 * (1 + int(HFL/8) ) X X # Vertical: X X Vtick = HFL / DCF # us X Vfront = VR + VfrontMIN / Vtick X Vsync = Vfront + VsyncMIN / Vtick X Vback = VBackMIN / Vtick X Vblank = VBlankMIN / Vtick X VFL = Vsync + Vback X if( VFL < VR + Vblank ) VFL = VR + Vblank X X RR = 1000000 * DCF / (HFL * VFL) X HSF = 1000 * DCF / HFL X X # Done: generate some output: X X if( verbose ) { X printf "\n# Horizontal:\n" X printf "# Front Porch = %.2f us, Sync = %.2f, Back Porch = %.2f, ", X (Hfront - HR) / DCF, (Hsync - Hfront) / DCF, (HFL - Hsync) / DCF X printf "Blank = %.2f\n\n", (HFL - HR) / DCF X } X X printf "# Refresh Rate: %.2f Hz, Horizontal Sync Frequency: %.2f kHz\n", X RR, HSF X X printf " \"%dx%d\"\t%.2f\t%d %d %d %d %d %d %d %d\n", HR, VR, DCF, HR, X Hfront, Hsync, HFL, VR, Vfront, Vsync, VFL X X if( HSF > HSFMAX ) X printf("\nWarning: the Horizontal sync frequency may be too high for the monitor!\n") X if( RR > VSFMAX ) X printf("\nWarning: this refresh rate may be too high for the monitor!\n") } SHAR_EOF $shar_touch -am 0611123396 'xconfig.awk' && chmod 0444 'xconfig.awk' || $echo 'restore of' 'xconfig.awk' 'failed' if ( md5sum --help 2>&1 | grep 'sage: md5sum \[' ) >/dev/null 2>&1 \ && ( md5sum --version 2>&1 | grep -v 'textutils 1.12' ) >/dev/null; then md5sum -c << SHAR_EOF >/dev/null 2>&1 \ || $echo 'xconfig.awk:' 'MD5 check failed' 0ab1f725a4c860131e998a92df11f632 xconfig.awk SHAR_EOF else shar_count="`LC_ALL= LC_CTYPE= LANG= wc -c < 'xconfig.awk'`" test 2630 -eq "$shar_count" || $echo 'xconfig.awk:' 'original size' '2630,' 'current size' "$shar_count!" fi fi rm -fr _sh02303 exit 0 -- Michael Meissner, Cygnus Support (East Coast) 955 Massachusetts Avenue, Cambridge, MA 02138, USA meissner@cygnus.com, 617-354-5416 (office), 617-354-7161 (fax)