Source for EXACLY adjust 59,94 etc. Hz per pstrip - AVS Forum
Forum Jump: 
 
Thread Tools
post #1 of 3 Old 05-24-2001, 09:29 PM - Thread Starter
Member
 
amigenius's Avatar
 
Join Date: May 2000
Location: Dortmund,Germany
Posts: 123
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Here is my little quick&dirty prg for the !!!RADEON!!!. The Resolution is 1440*1080@59,94 / 50 / 47,952 Hz:


It is not suitable for the Geforce because the pixelclock increment steps are very uneven (the radeon has .450 steps)
For the Geforce you must create a table with the pixelclock values or someone should tell us the secret behind the uneven
pixelclock increments

v = back porch vertical
h = front+back porch
p = pixelclock
Fv = Verticale Frequency
hsync = horiontaler sync width

I have narrowed the horizontal front+back porch values to get the maximum width out of my nec xg 75.

cya

Ralf

main()
{
//float frame= 1/59.94;
//float frame= 1/50.00;
float frame= 1/47.952;
float x,x3,x2,m=1;
int i,i2,i3,i4,i5,a,b,c;

for(i=5;i<100;i++) //back porch vertical
{
for(i3=0;i3<400;i3++)
{
i4=((90000+i3*450)*(200))/121703;
i5=((90000+i3*450)*(280))/121703+7;
i4&=0xfffffff8;
i5&=0xfffffff8;



for(i2=i4;i2<i5;i2+=8) //front+back porch horizontal
{
x2=x=((float)((1080+1+3+i)*(1440+ ((((90000+i3*450)*120)/121703+3)&0xfffffff8) +i2)))/((float)((90000+i3*450)*1000));
x-=frame;
if(x<0) x=-x;
if(x<m)
{
m=x;
a=i;
b=i2;
c=i3;
x3=x2;
};
};
};
};

printf("V : %d\
H : %d\
p(%d) : %d\
Fv : %f\
hsync : %d",a,b,c,(90000+c*450)*1000,1/x3,((90000+c*450)*120)/121703);

};
amigenius is offline  
Sponsored Links
Advertisement
 
post #2 of 3 Old 05-25-2001, 01:12 PM - Thread Starter
Member
 
amigenius's Avatar
 
Join Date: May 2000
Location: Dortmund,Germany
Posts: 123
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
HI !

With this prg i can calculate the optimum settings for powerstrip with a given resolution at a given Vertical Refreshrate with a given range of the porches/sync.

i.e. with this algo i reach 1440*1080@50.000000 Hz wich is of course better than only 50.001 Hz. This means with dscaler i get no more droped frames after hours!!

Of course you can do that also by hand but it would be A LOT of work to reach the Refreshrate THAT exacly.....

cya

Ralf
amigenius is offline  
post #3 of 3 Old 05-25-2001, 09:39 PM
Advanced Member
 
budiman's Avatar
 
Join Date: Apr 2000
Location: St. Louis, MO, USA
Posts: 909
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
amigenius:
I have NO idea what your program does, I mean I'm not sure what help it's supposed to be. Can you please elaborate? Does this mean that using the resulting values we can get to that particular refresh rate and utilizing the best (minimal) porch values? Can I change the resolution to ANY other resolution?

As an aside, just to exercise my VB (I'm a C++ software developer and am looking to start fiddling with VB), I've adapted your code to VBScript so everyone can run it and change the values if they want another one. I'll paste the code below. For those that wanted to use it, just copy and paste the code to notepad and save that file as "program.vbs". Double-click to run the program - on a P3 450 MHz it takes about 15 seconds, so just double click it ONCE and wait for the result box to pop out awhile later. Change 47.952 to other refresh values.

Code start
-----------------------------

'An adaptation of the program made by amigenius of AVS Forum to VBScript so
'it can be executed by anyone and the values can be changed

dim fFrameTime
dim fTemp1, fTemp2, fTemp3, fComparator
dim i, j, k, iTemp1, iTemp2
dim iVerticalBackPorch, iFrontAndBackPorch, iPixelClock
dim iVertical, iHorizontal
dim szResult

iHorizontal = 1440 'Horizontal resolution
iVertical = 1080 'Vertical resolution
fComparator = CDbl (1)
fFrameTime = CDbl (1 / 47.952) 'Change this to the refresh rate of choice

for i = 5 to 99 'Back porch vertical

for j = 0 to 399

iTemp1 = CInt( ( (90000 + j * 450) * (200) ) / 121703 )
iTemp2 = CInt( ( (90000 + j * 450) * (280) ) / 121703 + 7 )
iTemp1 = iTemp1 AND &HFFFFFFF8
iTemp2 = iTemp2 AND &HFFFFFFF8

for k = iTemp1 to (iTemp2 - 1) step 8 'Front + Back porch horizontal

fTemp1 = CDbl( (((90000 + j * 450) * 120) / 121703 + 3) AND &HFFFFFFF8 )
fTemp1 = CDbl( (iVertical + 1 + 3 + i) * (iHorizontal + fTemp1 + k) )
fTemp1 = CDbl ( fTemp1 / CDbl ( (90000 + j * 450 ) * 1000 ) )
fTemp2 = fTemp1

fTemp1 = fTemp1 - fFrameTime

fTemp1 = Abs(fTemp1)

if (fTemp1 < fComparator) then
fComparator = fTemp1
iVerticalBackPorch = i
iFrontAndBackPorch = k
iPixelClock = j
fTemp3 = fTemp2
end if

next

next

next

szResult = "Vertical Back Porch = " & iVerticalBackPorch & CHR (13)
szResult = szResult & "Front and Back Porch = " & iFrontAndBackPorch & CHR (13)
szResult = szResult & "Pixelclock(" & iPixelClock & ") = " & CLng( (90000 + iPixelClock * 450) * 1000) & CHR (13)
szResult = szResult & "Vertical Frequency = " & CDbl (1 / fTemp3) & CHR (13)
szResult = szResult & "Horizontal Sync Width = " & CLng(((90000 + iPixelClock * 450) * 120 ) / 121703)

msgbox szResult
--------------------------
Code End

As an aside, the ending values are:
V : 46
H : 208
p(10) : 94500000
Fv : 47.952016
hsync : 93
for 47.952 Hz

and
V : 8
H : 208
p(56) : 115200000
Fv : 59.940062
hsync : 113
for 59.94 Hz

------------------
Ciao.
Muljadi Budiman

[This message has been edited by budiman (edited 05-25-2001).]

Ciao.
Muljadi Budiman
budiman is offline  
Closed Thread Home Theater Computers

User Tag List

Thread Tools
Show Printable Version Show Printable Version
Email this Page Email this Page


Forum Jump: 

Posting Rules  
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off