2007-02-09, 04:49
0 in front == base 8. No need for the 0.
// stdafx.cpp : source file that includes just the standard includes
// guiTest.pch will be the pre-compiled header
// stdafx.obj will contain the pre-compiled type information
#include "stdafx.h"
#undef QueryPerformanceFrequency
__int64 lFrequency = 0LL;
WINBASEAPI BOOL WINAPI QueryPerformanceFrequencyXbox(LARGE_INTEGER *lpFrequency)
{
if( lFrequency == 0LL )
{
DWORD dwStandard;
_asm {
// get the Standard bits
mov eax, 1
cpuid
mov dwStandard, eax
}
int model = (dwStandard >> 4) & 0xF;
if( model == 11 )
{
//This is likely the DreamX 1480
//so only support fullspeed mode
lFrequency = 1481200000;
}
else if ( model == 8 )
{
//This is likely the Intel Pentium III Coppermine
//so only support fullspeed mode
lFrequency = 999985000;
}
else
{
QueryPerformanceFrequency((LARGE_INTEGER*)&lFrequency);
}
}
(*lpFrequency).QuadPart = lFrequency;
return TRUE;
}
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 8
model name : Celeron (Coppermine)
stepping : 10
cpu MHz : 733.323
cache size : 128 KB
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 2
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 mmx fxsr sse
bogomips : 1461.45
#
timdog82001 Wrote:sorry, what? You have a 1000 mhz processor and its only showing 733? Or the other way around?
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 8
model name : Celeron (Coppermine)
stepping : 10
cpu MHz : 733.323
cache size : 128 KB
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 2
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 mmx fxsr sse
bogomips : 1461.45
#
}
else if ( model == 8, stepping == 6 )
{
//This is likely the Intel Pentium III Coppermine
//so only support fullspeed mode
lFrequency = 999985000;