[Toc][Index]

[TuneDisplay]


This section lists the execution steps required to set the start and end 
of the vertical active display in terms of the line count along the 
vertical sweep. It also lists the start and end of the horizontal active 
display in terms of the dot count along the horizontal sweep. The input 
values are the ScreenLeftEdge, ScreenRightEdge, ScreenTopEdge, and 
ScreenBottomEdge PMI keyvariables. The function should implement 
verification of the values, to keep them in the valid range for the 
current mode. 
This section is not required but, if supplied, it provides a monitor 
centering and sizing capability. If provided, TuneDisplay should be 
invoked by the respective SetMode section in order to ensure that 
user-selected values are being reflected in the mode set. This applies to 
all MonitorModeInfo sections that list the four PMI keyvariables. If the 
current mode does not contain the PMI keyvariables, TuneDisplay will be a 
no-op, because default mode values do not correspond to how the real 
hardware is programmed and, therefore, the tuning cannot be performed. 
The PMI keyvariable values represent the pixel count (dot 
count*bytesperpixel) and line count. They are incremented according to the 
end-user's configuration requests, which are processed one unit at a time. 
For example, if the user is trying to center a display in 640x480x64K, the 
start values of the current active display are obtained from the mode 
table for the current mode. For every mouse or pointer drag-increment on 
the centering area to the left, the current ScreenLeftEdge and 
ScreenRightEdge fields are incremented and a call into TuneDisplay is made 
with the current values. TuneDisplay translates the values into the dot 
count or any other internal representation and validates the range. 
Here is a sample .PMI file for a Viper VLB card: 



[TuneDisplay]
r0 = 1;             //set return code to failure, if validation fails
if (BitsPerPixel < 8) goto exittune
                    // all horizontal values are set in terms of DDOTCLK
                    //multiply by the number of bytes.
r9 = BitsPerPixel >> 4;
r5 = ScreenLeftEdge << r9;         //r5 = hrzbr
r6 = ScreenRightEdge << r9;        //r6 = hrzbf
r7 = ScreenTopEdge;                //r7 = vrtbr
r8 = ScreenBottomEdge;             //r8 = vrtbf
readdw(r1, hrzsr);                 //validate parameters
if (r5 <= r1) goto exittune        //validate left edge > hrzsr
readdw(r2, vrtsr);
if (r7 <= r2) goto exittune        //validate top edge > vrtsr
readdw(r3, hrzt);
if (r6 >= r3) goto exittune        //validate right edge < hrzt
readdw(r4, vrtt);
if (r8 >= r4) goto exittune        //validate bottom edge < vrtt
writedw(hrzbr, r5);
writedw(hrzbf, r6);
writedw(vrtbr, r7);
writedw(vrtbf, r8);
r0 = 0;                            //indicate success exittune:




Created using Inf-PHP v.2 (c) 2003 Yuri Prokushev
Created using Inf-HTML v.0.9b (c) 1995 Peter Childs