2006-04-01, 12:07
hi,
the old way of checkin the cpu temperature doesn't work in a 1.6 anymore as the temperature sensor on i2c address 0x4c is gone. i recently discovered that the temperature sensor now recides inside the xcalibur. the temperature is a bit jumpy and i tried to fix this by taking an average of 10 samples. i have been testing it and it looks good and reports the temps in a good way.
some of you will argue that the cpu temp does work in a 1.6, but thats not true. it might look like its working but here is the explanation:
every thing is done over the smbus/i2c:
1) gpu temp from reg 0x0a form the pic
2) read out the temp from the smbus controller data reg
3) store it as gputemp
4) request the cpu temp high byte from the temperature sensor (@0x4c)
5) read fails, but it isn't checked for so it reads out the smbus controller data reg thinking its the cpu temp but it is the old gpu temp value.
6) request the cpu temp low byte from the temperature sensor (@0x4c)
7) same thing as in step 5 happens
8) calculate and store cputemp = cpuhigh + cpulow/256, which in reality is cputemp = gpu + gpu/256
example, my temps are now at:
cpu: 49.79 gpu: 49.60
remove the 0.8 factor that 1.6 temps get adjusted with:
gpu: 62
cputemp = gpu + gpu/256 = 62 + 62/256 = 62.2421875
add the 0.8 factor again
cputemp = 62.2421875*0.8 = 49.79375 ~ 49.79
and were back.. so, thats why it looks like your temp sensor is working in a 1.6!
so, this code is not the prettiest, but at least it's not worse than the old code =)
i have added two variables in fancontroller.h
float cputempfrac
int cputempcount
they are used to calculate the average over 10 samples.
in fancontroller.c i have modified:
void cfancontroller::cfancontroller()
void cfancontroller::getcputempinternal()
for more info regarding the xcalibur temperature sensor see:
http://www.xboxhacker.net/forums/index.php?topic=572.0
http://forums.xbox-scene.com/index.php?showtopic=501872
the code:
http://pablot.com/misc/fancontroller.cpp
http://pablot.com/misc/fancontroller.h
i think it looks and works good now. please post your opinions.
/pablot
the old way of checkin the cpu temperature doesn't work in a 1.6 anymore as the temperature sensor on i2c address 0x4c is gone. i recently discovered that the temperature sensor now recides inside the xcalibur. the temperature is a bit jumpy and i tried to fix this by taking an average of 10 samples. i have been testing it and it looks good and reports the temps in a good way.
some of you will argue that the cpu temp does work in a 1.6, but thats not true. it might look like its working but here is the explanation:
every thing is done over the smbus/i2c:
1) gpu temp from reg 0x0a form the pic
2) read out the temp from the smbus controller data reg
3) store it as gputemp
4) request the cpu temp high byte from the temperature sensor (@0x4c)
5) read fails, but it isn't checked for so it reads out the smbus controller data reg thinking its the cpu temp but it is the old gpu temp value.
6) request the cpu temp low byte from the temperature sensor (@0x4c)
7) same thing as in step 5 happens
8) calculate and store cputemp = cpuhigh + cpulow/256, which in reality is cputemp = gpu + gpu/256
example, my temps are now at:
cpu: 49.79 gpu: 49.60
remove the 0.8 factor that 1.6 temps get adjusted with:
gpu: 62
cputemp = gpu + gpu/256 = 62 + 62/256 = 62.2421875
add the 0.8 factor again
cputemp = 62.2421875*0.8 = 49.79375 ~ 49.79
and were back.. so, thats why it looks like your temp sensor is working in a 1.6!
so, this code is not the prettiest, but at least it's not worse than the old code =)
i have added two variables in fancontroller.h
float cputempfrac
int cputempcount
they are used to calculate the average over 10 samples.
in fancontroller.c i have modified:
void cfancontroller::cfancontroller()
void cfancontroller::getcputempinternal()
for more info regarding the xcalibur temperature sensor see:
http://www.xboxhacker.net/forums/index.php?topic=572.0
http://forums.xbox-scene.com/index.php?showtopic=501872
the code:
http://pablot.com/misc/fancontroller.cpp
http://pablot.com/misc/fancontroller.h
i think it looks and works good now. please post your opinions.
/pablot