Checking the Temperature of the Xbox
Xbox Programming & Development
Also a very simple thing. Requires extremely litte effort to implement. Returns 2 values,
char 0 = MCPX temperature
char 1 = CPU temperature
Celcius is unit used.
extern "C"
{
XBOXAPI LONG WINAPI HalReadSMBusValue(UCHAR devddress,
UCHAR offset, UCHAR readdw, LPBYTE pdata);
}
|
unsigned char *ReadTemps(void)
{
static unsigned char c[2];
int t;
memset(c,0,2);
Sleep(100);
t = 0;
while( !c[0] )
{
HalReadSMBusValue(0x99, 0, 0, c);
Sleep(10);
}
t = 1;
while( !c[1] )
{
HalReadSMBusValue(0x99, 1, 0, c+1);
Sleep(10);
}
return c;
}
|
|