<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<TITLE>Putting it All Together</TITLE>
</HEAD>
<BODY BGCOLOR="#efefef" TEXT="black" LINK="blue" VLINK="#551A8B" ALINK="red">

<A HREF="VideoModes.html"><EM>XFree86 Video Timings HOWTO</EM></A>
 <b>:</b> <EM>Putting it All Together</EM><BR>
<b>Previous:</b> <A HREF="VideoModes9.html"><EM>Black Magic and Sync Pulses</EM></A><BR>
<b>Next:</b> <A HREF="VideoModes11.html"><EM>Overdriving Your Monitor</EM></A>


<HR NOSHADE>
  <H2><A NAME="16"></A>10. Putting it All Together<A NAME="synth"></A></H2>

<p>The Xconfig file Table of Video Modes contains lines of numbers, with each line
being a complete specification for one mode of X-server operation.  The fields
are grouped into four sections, the name section, the clock frequency section,
the horizontal section, and the vertical section. </p>
<p>The name section contains one field, the name of the video mode specified by
the rest of the line.  This name is referred to on the "Modes" line of the
Graphics Driver Setup section of the Xconfig file.  The name field may be
omitted if the name of a previous line is the same as the current line. </p>
<p>The dot clock section contains only the dot clock (what we've called DCF) field
of the video mode line.  The number in this field specifies what dot clock was
used to generate the numbers in the following sections. </p>
<p>The horizontal section consists of four fields which specify how each
horizontal line on the display is to be generated.  The first field of the
section contains the number of dots per line which will be illuminated to form
the picture (what we've called HR).  The second field of the section indicates
at which dot the horizontal sync pulse will begin.  The third field indicates
at which dot the horizontal sync pulse will end.  The fourth field specifies
the total horizontal frame length (HFL). </p>
<p>The vertical section also contains four fields.  The first field contains the
number of visible lines which will appear on the display (VR).  The second
field indicates the line number at which the vertical sync pulse will begin.
The third field specifies the line number at which the vertical sync pulse will
end.  The fourth field contains the total vertical frame length (VFL). </p>
<p>Example: 
<blockquote><code>
<pre>
     #Modename    clock  horizontal timing  vertical timing

     "752x564"     40    752 784  944 1088  564 567 569 611
	           44.5  752 792  976 1240  564 567 570 600
</pre>
</code></blockquote>

(Note: stock X11R5 doesn't support fractional dot clocks.) </p>
<p>For Xconfig, all of the numbers just mentioned - the number of illuminated dots
on the line, the number of dots separating the illuminated dots from the
beginning of the sync pulse, the number of dots representing the duration of
the pulse, and the number of dots after the end of the sync pulse - are added
to produce the number of dots per line.  The number of horizontal dots must be
evenly divisible by eight. </p>
<p>Example horizontal numbers: 800 864 1024 1088 </p>
<p>This sample line has the number of illuminated dots (800) followed by the
number of the dot when the sync pulse starts (864), followed by the number of
the dot when the sync pulse ends (1024), followed by the number of the last dot
on the horizontal line (1088). </p>
<p>Note again that all of the horizontal numbers (800, 864, 1024, and 1088) are
divisible by eight!  This is not required of the vertical numbers. </p>
<p>The number of lines from the top of the display to the bottom form the frame.
The basic timing signal for a frame is the line.  A number of lines will
contain the picture.  After the last illuminated line has been displayed, a
delay of a number of lines will occur before the vertical sync pulse is
generated.  Then the sync pulse will last for a few lines, and finally the last
lines in the frame, the delay required after the pulse, will be generated.  The
numbers that specify this mode of operation are entered in a manner similar to
the following example. </p>
<p>Example vertical numbers: 600 603 609 630 </p>
<p>This example indicates that there are 600 visible lines on the display, that
the vertical sync pulse starts with the 603rd line and ends with the 609th, and
that there are 630 total lines being used. </p>
<p>Note that the vertical numbers don't have to be divisible by eight! </p>
<p>Let's return to the example we've been working.  According to the above, all
we need to do from now on is to write our result into Xconfig as follows: 
<blockquote><code>
<pre>
&lt;name&gt;   DCF     HR  SH1 SH2   HFL   VR  SV1 SV2 VFL
</pre>
</code></blockquote>

where SH1 is the start tick of the horizontal sync pulse and SH2 is its end
tick; similarly, SV1 is the start tick of the vertical sync pulse and SV2 is
its end tick. 
<blockquote><code>
<pre>
#name    clock   horizontal timing   vertical timing    flag
936x702  65      936 968 1200 1232   702 702 710 737
</pre>
</code></blockquote>

No special flag necessary; this is a non-interlaced mode.  Now we are really
done.</p>

 <HR NOSHADE>
<A HREF="VideoModes.html"><EM>XFree86 Video Timings HOWTO</EM></A>
 <b>:</b> <EM>Putting it All Together</EM><BR>
<b>Previous:</b> <A HREF="VideoModes9.html"><EM>Black Magic and Sync Pulses</EM></A><BR>
<b>Next:</b> <A HREF="VideoModes11.html"><EM>Overdriving Your Monitor</EM></A>



</BODY>
</HTML>
