Vcore/Multi-Suche mit Crystalcpuid und Prime

mocad_tom

Admiral Special
Mitglied seit
17.06.2004
Beiträge
1.234
Renomée
52
Code:
static CString strvcore[] = 
{

	"1.550V",			//0
	"1.525V",			//1
	"1.500V",			//2
	"1.475V",			//3
	"1.450V",			//4
	"1.425V",			//5
	"1.400V",			//6
	"1.375V",			//7
	"1.350V",			//8
	"1.325V",			//9
	"1.300V",			//10
	"1.275V",			//11
	"1.250V",			//12
	"1.225V",			//13
	"1.200V",			//14
	"1.175V",			//15
	"1.150V",			//16
	"1.125V",			//17
	"1.100V",			//18
	"1.075V",			//19
	"1.050V",			//20
	"1.025V",			//21
	"1.000V",			//22
	"0.975V",			//23
	"0.950V",			//24
	"0.925V",			//25
	"0.900V",			//26
	"0.875V",			//27
	"0.850V",			//28
	"0.825V",			//29
	"0.800V",			//30

};


static CString strmultiplier[] = 
{
				//	@ 200MHz HypertTransport
	"4.0x",			//0	0.8GHz
	"4.5x",			//1
	"5.0x",			//2	1.0GHz
	"5.5x",			//3
	"6.0x",			//4	1.2GHz
	"6.5x",			//5
	"7.0x",			//6	1.4GHz
	"7.5x",			//7
	"8.0x",			//8	1.6GHz
	"8.5x",			//9
	"9.0x",			//10	1.8GHZ
	"9.5x",			//11
	"10.0x",			//12	2.0GHz
	"10.5x",			//13
	"11.0x",			//14	2.2GHz
	"11.5x",			//15
	"12.0x",			//16	2.4GHz
	"12.5x",			//17
	"13.0x",			//18	2.6GHz
	"13.5x",			//19
	"14.0x",			//20	2.8GHz
	"14.5x",			//21
	"15.0x",			//22	3.0GHz

};


void CVcoremintestDlg::OnButton1() 
{

	int multi=10;
	int vcore=6;

	CString temp;
	int inloop;
	int exists=-1;
	int ierrno=0;
	
	CFile testlog;
	CFile presult;

	char res[5000];

	

	DeleteFile("results.txt");  //log File of Prime95

	while( ( vcore<30 ) || ( multi>=0 ) )
	{
		temp.Format("Start Test with Multi:%s Vcore:%s\n",strmultiplier[multi],strvcore[vcore]);
		SetDlgItemText(IDC_STATIC2,temp);

		testlog.Open("testlog.txt", CFile::modeCreate | CFile::modeWrite | CFile::modeNoTruncate ); //own Log-File
		testlog.Seek( 0 , CFile::end );
		testlog.Write(temp, temp.GetLength());
		testlog.Close();

		temp.Format("/F%d /V%d /P1 /E",multi,vcore);
		ShellExecute(NULL,NULL,"CrystalCPUID.exe", temp ,NULL,SW_SHOWNORMAL);

		Sleep(2000);
		ShellExecute(NULL,NULL,"prime95.exe", "-t" ,NULL,SW_SHOWNORMAL);
		
		for( inloop=0; inloop<30*15; inloop++)// 45 Minuten Prime95 testen 
		{
			Sleep(2000);
			exists = presult.Open("results.txt",CFile::modeRead);
			if(exists!=0)
			{
				presult.Read(res, presult.GetLength() );
				presult.Close();

				if( ((CString)res).Find("FATAL ERROR") >0)
				{
					//prime has found an error
					ShellExecute(NULL,NULL,"taskill.exe", "prime95.exe" ,NULL,SW_SHOWNORMAL);
					Sleep(2000);
					ierrno=1; //error while running Prime95
					DeleteFile("results.txt");
					break;
				}
			}
		}
		
		

		if(ierrno==1)
		{
			if( multi == 0)
				temp=" Prime was not stable, lowest Vcore reached, program ends \n\n";
			else
				temp=" Prime was not stable Vcore stays the same, try a lower multi\n\n";

			testlog.Open("testlog.txt", CFile::modeCreate | CFile::modeWrite | CFile::modeNoTruncate );
			testlog.Seek( 0 , CFile::end );
			testlog.Write(temp,temp.GetLength());
			testlog.Close();


			SetDlgItemText(IDC_STATIC,temp);

			if( multi == 0)
				break;
			else
				multi -= 4;
		}
		else
		{
			ShellExecute(NULL,NULL,"taskill.exe", "prime95.exe" ,NULL,SW_SHOWNORMAL);
			temp=" Prime was stable - lower Vcore, multi stays the same\n\n";

			testlog.Open("testlog.txt", CFile::modeCreate | CFile::modeWrite | CFile::modeNoTruncate );
			testlog.Seek( 0 , CFile::end );
			testlog.Write(temp,temp.GetLength());
			testlog.Close();

			SetDlgItemText(IDC_STATIC,temp);
			vcore++;
		}


		ierrno=0;

		

	}

	testlog.Close();
	
}

Diese Funktion in ein normales MFC-Dialog-Projekt reinkopieren und durchkompilieren.
Im Dialog noch eine IDC_STATIC2 anlegen, dort werden die aktuellen Schritte angezeigt.

In das Verzeichnis mit der Exe muss Prime95, CrystalCPUID und Taskill mit drin sein.
Taskill gibts hier:
http://members.ozemail.com.au/~nulifetv/freezip/freeware/
Wenn einer eine Alternative dazu weiß - nur her damit.

Bei Schäden übernehme ich keine Haftung.


Grüße,
Tom
 
Zuletzt bearbeitet:
bist du mal so gut und komplierst es für mich?
ich weiss nicht wie ich sowas machen soll und was ich dafür brauche :-(
besten dank im voraus :-)

cpushreder
 
Zurück
Oben Unten