Video Signals And Timing: Difference between revisions

[unchecked revision][unchecked revision]
Content deleted Content added
Combuster (talk | contribs)
Initial dump of Brendan's posts
 
Combuster (talk | contribs)
Added some background on VGA display signals
Line 1:
'''Work in progress. IsNeeds currently a dumpexplanation of Brendan's worked outthe formulae'''
 
'''Warning: Setting incorrect video settings can damage a monitor'''
 
== Display Signal ==
There are a large amount of pins in a standard VGA Cable. When your video card sends its video data to the monitor, it uses 5 data channels:
* Analog Red
* Analog Green
* Analog Blue
* Horizontal Sync
* Vertical Sync
The screen is built up scanline by scanline, by sending the appropriate RGB values over the connection. However, only having a stream of colours will not tell you which part of the stream belongs to the top-left-pixel on the screen. To solve this they added two more signals: the horizontal sync which pulses when a horizontal line is done, and the vertical sync, which pulses when all rows have been completed. Thus, each frame corresponds to a single vertical synchronisation pulse. Since each frame has the same amount of pixels, the time between consecutive pulses is a constant. The monitor times the frequency of the pulses, then based on that it knows at what time the color data should be sent to what position on the screen.
 
The system is however not that simple. The first monitors were CRTs, which used magnetic fields to project electron beams onto a phosphoric layer, making them visible for a short period of time. The magnetic fields of a CRT had some inertia - they couldn't be set from a random location to another random location in the time available for one pixel. Hence the video signal has to have some gaps to cope with the time a monitor needs to alter the magnetic fields and point the electron beam back to the other side of the screen. In the meantime there could be no color signal, or you might have gotten stripes on the screen.
 
CRTs have improved a lot since then, and are now being superseded by the highly intelligent LCD display. The standard for signaling hasn't changed since.
 
== Display Composition ==
All frames of a video signal have a specific layout, and video cards have a semi-standard way of thinking about these signals. Basically, you will have to provide the video card with enough information to be able to derive all sizes present in the following diagram. [[VGA Hardware]] explains how you can give these sizes to a VGA compatible. For other hardware, you should check your card's documentation on how these values are stored within them.
 
[[Image:VGA crtc.gif]]
 
Both horizontally and vertically, there are 6 states, and hence, 6 sizes. Each size is in pixels. Most of the emitted data is part of the active display, the area of x resolution * y resolution pixels. Each of the cuts are where:
* active display goes into overscan
* where overscan goes into blanking
* where blanking gets the synchronization line changed
* where the sync is restored to its original value
* where the blanking goes back into overscan
* where the overscan goes into active display, where the scanline or frame is completed and the next one is started.
 
Video cards usually gives you the following registers to program (both horizontally and vertially)
* Resolution (pixel size of active display)
* Total (total number of 'pixels' in a single run)
* Blanking start and end (or start and size) - marks the location of the blanking. The are that is neither blanking nor active display becomes the overscan area.
* Sync start and end (or start and size) - marks the location of the synchronization pulse
 
== Brendan's Posts ==