ZoontF wrote:
Would you mind posting the VFS files for the VFOs you put up? I have successfully hacked together VFS files before, but I'm still not 100% of what the syntax is because I can't find any documentation other than the sample files themselves. So if I have your VFS files it should be easier to go about tweaking.
Sure - the values in the VFC source file are derived from the modeline. Here's that xFree86 modeline again - the second line identifies each of the values and how they're used to calculate what's needed to complete a VFC source file (Hn are horizontal values, Vn are Vertical values):
Code:
Modeline "1600x1024@60.00" 108.0 1600 1616 1656 1704 1024 1027 1030 1056 -Hsync -Vsync
"X+Y Res@Refresh" PixClk H1 H2 H3 H4 V1 V2 V3 V4
The values needed to complete a video format source file (.vfs) are:
Code:
FormatName (intended name of format enclosed in quotes)
FieldsPerFrame (1 - unless you're creating a format with more than one frame per field)
FramesPerSecond (the desired refresh rate)
TotalPixelsPerLine (directly equal to the H4 value from the modeline)
HorizontalBackPorch (is the sum of H4 minus H3)
HorizontalSync (is the sum of H3 minus H2)
HorizontalFrontPorch (is the sum of H2 minus H1)
ActivePixelsPerLine (directly equal to H1; and is the horizontal display resolution in pixels)
TotalLinesPerFrame (directly equal to the V4 value from the modeline)
VerticalBackPorch (is the sum of V4 minus V3 minus 2; the extra minus 2 is a VFC requirement)
VerticalSync (is the sum of V3 minus V2)
VerticalFrontPorch (is the sum of V2 minus V1)
ActiveLinesPerFrame (directly equal to V1; is the number of lines in the visible portion of the vertical display)
Using the values from the xFree86 modeline (listed above) gives:
Code:
FormatName = VPro_4Apple-22inch_1600x1024_60 (always enclosed in quotes)
FieldsPerFrame = 1
FramesPerSecond = Desired Refresh Rate
TotalPixelsPerLine = 1704
HorizontalBackPorch = 48 pixels (1704 - 1656 = 48)
HorizontalSync = 40 pixels (1656 - 1616 = 40)
HorizontalFrontPorch = 16 pixels (1616 - 1600 = 16)
ActivePixelsPerLine = 1600
TotalLinesPerFrame = 1056
Vertical Back Porch = 26 (1056 - 1030 - 2 = 24)
Vertical Sync = 3 (1030 - 1027 = 3)
Vertical Front Porch = 3 (1027 - 1024 = 3)
ActiveLinesPerFrame = 1024
The resulting VFC source file is attached as "Vpro_4Apple-22inch_1600x1024_60.vfs.txt. The text extension was added so the nekochan interface would allow the file as an attachment. To use the file remove the ".txt" portion.
ZoontF wrote:
However, the picture does not fit on the display - the sides are cropped off, and I'm not sure but the bottom might be cropped. Meanwhile, the top of the picture does not reach the top of the screen. I believe at this point I need to futz with the 'porches' and see if I can squeeze the picture onto the display.
To decrease the width of the display image (where the image extends off both sides of the monitor),
increase the TotalPixelsPerLine by values of 8 (adding to the overall (total) number of pixels on the LCD panel "squeezes" the visible active pixels, decreasing the width of the display image);
to shift the image up increase the vertical front porch and decrease the vertical back porch (by increasing the numerical value of V2 and V3 *equal* amounts.
Unfortunately it isn't always as simple as changing just the sync or porch values. To avoid fundamental coding errors and subsequent display anomalies, the values expressed in the modeline *must* remain balanced. As seen in the above examples, because of the underlying calculations each of individual horizontal or vertical values has an effect on the value of the others. So if the combined horizontal or vertical values exceed the total pixels or lines, VFC will stop with a "shorten your format" error, if the combined horizontal or vertical values are less than the total pixels or lines, VFC will fill the frame with valueless transitions that may have an undesired effect on the resulting display format.
To avoid head-scratching issues with compiled formats, I'd suggest following a few basic rules:
- Each subsequent value in the horizontal or vertical portions of the modeline (H1 though H4 or V1 through V4) must be numerically higher than the previous value.
- The horizontal values ActivePixelsPerLine, HorizontalFrontPorch, HorizontalSync and HorizontalBackPorch must equal] the TotalPixelsPerLine, and each of the horizontal values (H1 through H4) must be multiple of 8;
- the vertical values ActiveLinesPerFrame, VerticalFrontPorch, VerticalSync and VerticalBackPorch must equal the TotalLinesPerFrame.
I went ahead and took a shot at adjusting your image by editing the modeline:
The original:
Code:
Modeline "1600x1024@60.00" 108.0 1600 1616 1656 1704 1024 1027 1030 1056 -Hsync -Vsync
"X+Y Res@Refresh" PixClk H1 H2 H3 H4 V1 V2 V3 V4
and the editied version:
Code:
Modeline "1600x1024@60.00" 108.47 1600 1616 1656 1712 1024 1030 1033 1056 -Hsync -Vsync
"X+Y Res@Refresh" PixClk H1 H2 H3 H4 V1 V2 V3 V4
Using the values from the modified modeline gives:
Code:
FormatName = "VPro_4Apple-22inch_1600x1024_60-shifted"
FieldsPerFrame = 1
FramesPerSecond = Desired Refresh Rate
TotalPixelsPerLine = 1712
HorizontalBackPorch = 56 pixels (1712 - 1656 = 56)
HorizontalSync = 40 pixels (1656 - 1616 = 40)
HorizontalFrontPorch = 16 pixels (1616 - 1600 = 16)
ActivePixelsPerLine = 1600
TotalLinesPerFrame = 1056
Vertical Back Porch = 21 (1056 - 1033 - 2 = 21)
Vertical Sync = 3 (1033 - 1030 = 3)
Vertical Front Porch = 6 (1030 - 1024 = 6)
ActiveLinesPerFrame = 1024
The resulting VFC format and source are attached as "Vpro_4Apple-22inch_1600x1024_60-shifted.vfo" and "Vpro_4Apple-22inch_1600x1024_60-shifted.vfs.txt (see my previous note about dealing with the .txt extension on the source file). If the format needs additional tweaking or if you have questions I'd be happy to help.