• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

How to cheat in ANY benchmark

glugglug

Diamond Member
I saw this article linking to a stupid thread on neowin about 3dmark03 "cheating" and decided to 1-up it.

this program will let you cheat adjust the speed of your system clock to get whatever benchmark results you want.

Here is source:

#include <iostream>
using namespace std;
#include "stdlib.h"
#include "windows.h"
int main(int argc, char *argv[])
{
if(argc<2)
{
cout << "Usage: setClockSpeed xxx where xxx is the percentage of normal clock speed you want to run\n"
<< "Example: setClockSpeed 50 will cause your system time to update 50% of the normal amount so your system will benchmark twice as fast\n"
<< "setClockSpeed 200 will cause your system time to update at double it's normal rate so your system will benchmark twice as slow\n"
<< "setClockSpeed 100 will return the clock speed to normal\n"
<< "Decimals can be used so for example setClockSpeed 66.666 will go make the clock run about 2/3 the normal rate\n";
return 0;
}
//must first give self access to adjust time
HANDLE processHandle = GetCurrentProcess();
HANDLE tokenHandle = NULL;
if(OpenProcessToken(processHandle,TOKEN_ADJUST_PRIVILEGES,&tokenHandle)==0)
{
cout << "You don't have rights to change your own access privileges\n";
return 0;
}
LUID timeAdjustmentLUID;
LookupPrivilegeValue(NULL,SE_SYSTEMTIME_NAME,&timeAdjustmentLUID);
TOKEN_PRIVILEGES *newTokenPrivileges=(TOKEN_PRIVILEGES*)malloc(sizeof(DWORD)+sizeof(LUID_AND_ATTRIBUTES));
if(newTokenPrivileges==NULL) {
cout << "Failed to allocate new access privileges\n";
return 0;
}
newTokenPrivileges->PrivilegeCount = 1;
newTokenPrivileges->Privileges[0].Luid = timeAdjustmentLUID;
newTokenPrivileges->Privileges[0].Attributes = SE_PRIVILEGE_ENABLED | SE_PRIVILEGE_USED_FOR_ACCESS;
if(AdjustTokenPrivileges(tokenHandle,FALSE,newTokenPrivileges,0,NULL,NULL)==0)
{
cout << "Failed to grant privileges to adjust system clock\n";
return 0;
}
free(newTokenPrivileges);
double newClockPercent = atof(argv[1]);
DWORD defaultTimeAdjustment;
DWORD defaultTimeIncrement;
BOOL adjustmentDisabled;
GetSystemTimeAdjustment(&defaultTimeAdjustment,&defaultTimeIncrement,&adjustmentDisabled);
DWORD newTimeAdjustment = newClockPercent/100.0 * defaultTimeIncrement;
cout << "default clock increment: " << defaultTimeIncrement << " new adjustment: " << newTimeAdjustment << "\n";
if(newClockPercent==100.0)
{
SetSystemTimeAdjustment(defaultTimeIncrement,TRUE);
}
else
{
if(SetSystemTimeAdjustment(newTimeAdjustment,FALSE)==0)
{
cout << "Attempt to adjust clock speed failed! GetLastError()=" << GetLastError() << "\n";
}
}
return 0;
}



Edit: added code to have the program grant itself privileges to adjust the system clock (you apparently don't have this by default even as Administrator).
 
Anyone remember the speed hack, from long ago, for an older version of Half-Life server/clients? HardOCP ran a few benches with this running and it made some serious differences too.

vash
 
If you want to cheat just disable 3D output to the monitor entirely when the tests are running, render in wireframe mode only, disable rendering of all textures... etc etc.


None of the above is difficult to do, and can be used on any benchmark if you really feel like it.
 
Originally posted by: Rand
If you want to cheat just disable 3D output to the monitor entirely when the tests are running, render in wireframe mode only, disable rendering of all textures... etc etc.


None of the above is difficult to do, and can be used on any benchmark if you really feel like it.

In fact wireframe mode would probably be pretty slow, I think the fastest would be flat-shaded.
 
Back
Top