From: pcg@aber.ac.uk (Piercarlo Grandi) Subject: SC sources to calculate an Xconfig [was: Re: 'tuner' program?] Date: 27 Mar 1993 15:40:10 GMT
>>> On 20 Mar 93 05:57:54 GMT, cyrus@jemez.eece.unm.edu (W. Tait Cyrus) said:
Cyrus> Anyway, in c.o.l there are a LOT of requests for Xconfig's for
Cyrus> certain combinations of controllers/monitors. [ ... ]
Cyrus> Is there a program/script/something which asks you the necessary
Cyrus> questions from which appropriate lines can be calculated for
Cyrus> Xconfig [ ... ]
I have written and normally use the attached SC spreadsheet (already
posted a while ago); and a lot of trial-and-error to push the limits of
the manufacturer's specs.
============================================================================
# This data file was generated by the Spreadsheet Calculator.
# You almost certainly shouldn't edit it.
format A 26 0 0
format B 10 0 0
format C 10 0 0
format D 10 0 0
format E 10 0 0
define "VRATIO" B13
define "HRATIO" B12
define "VPULSE" C10
define "VDELAY" B10
define "HPULSE" C9
define "HDELAY" B9
define "BWIDTH" B7
define "CLOCK" B6
define "ASPECT" B3
define "ILACE" B4
rightstring A1 = "INPUT VALUES"
leftstring A3 = "Ratio V screen/H screen"
let ASPECT = 0.75
fmt ASPECT "#.00"
leftstring A4 = "Interlace?"
let ILACE = 1
leftstring A6 = "Board clock"
let CLOCK = 45
fmt CLOCK "#.00"
rightstring D6 = "(MHz)"
leftstring A7 = "Monitor bandwidth"
let BWIDTH = 34
fmt BWIDTH "#.00"
rightstring D7 = "(KHz)"
leftstring A9 = "Monitor H delay and pulse"
let HDELAY = 0.6
fmt HDELAY "0.0"
let HPULSE = 3
fmt HPULSE "0.0"
rightstring D9 = "(usec)"
leftstring A10 = "Monitor V delay and pulse"
let VDELAY = 0.3
fmt VDELAY "0.0"
let VPULSE = 300
fmt VPULSE "0.0"
rightstring D10 = "(usec)"
leftstring A12 = "Ratio H screen/H frame"
let HRATIO = 0.78
fmt HRATIO "#.000"
leftstring A13 = "Ratio V frame/V screen"
let VRATIO = 1.09
fmt VRATIO "#.000"
rightstring A15 = "CALCULATED VALUES"
leftstring A17 = "H frame and screen"
let B17 = @floor(CLOCK*1000/BWIDTH/8)*8
let C17 = @floor(B17*HRATIO/8)*8
rightstring D17 = "(pixels)"
leftstring A18 = "V screen and frame"
let B18 = @floor(C17*ASPECT)
let C18 = @floor(B18*VRATIO)+(ILACE&~(@floor(B18*VRATIO)%2))
rightstring D18 = "(pixels)"
leftstring A20 = "Vertical refresh rate"
let B20 = @ceil(CLOCK*1000000/(B17*C18))
rightstring D20 = "(Hz)"
leftstring A21 = "Memory required"
fmt A21 "26 0"
let B21 = @ceil(C17*B18/1024)
rightstring D21 = "(KBytes)"
leftstring A23 = "H delay and pulse"
let B23 = @floor(HDELAY*fixed CLOCK)
let C23 = @floor(HPULSE*fixed CLOCK)
rightstring D23 = "(pixels)"
leftstring A24 = "V delay and pulse"
let B24 = @floor(VDELAY*fixed CLOCK)
let C24 = @floor(VPULSE*(1+fixed ILACE)/(C17/fixed CLOCK))
rightstring D24 = "(pixels)"
leftstring A26 = "Start and end of H pulse"
let B26 = @floor((C17+B23)/8)*8
let C26 = @ceil((B26+C23)/8)*8
rightstring D26 = "(pixels)"
leftstring A27 = "Start and end of V pulse"
let B27 = B18+B24
let C27 = B27+C24
rightstring D27 = "(pixels)"
rightstring A29 = "NUMBERS"
leftstring A31 = "Clock"
let B31 = CLOCK
leftstring A32 = "Horizontal"
let B32 = C17
let C32 = B26
let D32 = C26
let E32 = ~(B17<C26+B23)?B17:1/0
leftstring A33 = "Vertical"
let B33 = B18
let C33 = B27
let D33 = C27
let E33 = ~(C18<C27+B24)?C18:1/0
goto B0