Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PowerPC: partially implement thermal related SPRs #8885

Merged
merged 1 commit into from Jun 19, 2020

Conversation

delroth
Copy link
Member

@delroth delroth commented Jun 18, 2020

Doesn't support triggering interrupts when the thermal threshold is
exceeded, but allows polling for temperature information.

The THRM[123] registers are documented in most PPC datasheets, see e.g.
this PPC750CX one: http://datasheets.chipdb.org/IBM/PowerPC/750/750cx_um3-17-05.pdf

Fixes https://bugs.dolphin-emu.org/issues/12160 . See the nice 42°C display on Swiss in this screenshot:
00000000_2020-06-18_07-40-28

Doesn't support triggering interrupts when the thermal threshold is
exceeded, but allows polling for temperature information.

The THRM[123] registers are documented in most PPC datasheets, see e.g.
this PPC750CX one: http://datasheets.chipdb.org/IBM/PowerPC/750/750cx_um3-17-05.pdf
@JMC47
Copy link
Contributor

JMC47 commented Jun 18, 2020

👍

Copy link
Member

@BhaaLseN BhaaLseN left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code seems good, untested tho.

@delroth delroth merged commit 03e0d2c into dolphin-emu:master Jun 19, 2020
@delroth delroth deleted the spr-thrm branch June 19, 2020 01:48
{
reg->TIV = 1;
if (reg->TID)
reg->TIN = SIMULATED_TEMP < reg->THRESHOLD;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just tried building on Windows 10 for the first time today, so sorry if I'm doing something silly, but the only error I got was 'SIMULATED_TEMP' cannot be implicitly captured because no default capture mode has been specified. Making it a #define or adding an & between the square brackets seems to fix things?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm assuming you're building with CMake? For some reason this kind of thing fails, but only when building with CMake on Windows, not when building with the VS solution on Windows or with CMake on any other platform.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting, yeah I think so (although tbh I'm not 100% sure, I just followed https://github.com/dolphin-emu/dolphin/wiki/Building-for-Windows as closely as possible). Is dolphin-emu.sln preferred? Would it be better to look for a fix to whatever's the matter with CMake on Windows than fix this kind of thing as it shows up?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is dolphin-emu.sln preferred?

There's no real reason it should be better, but since the buildbot uses it rather than CMake for Windows, the Windows CMake build does break sometimes.

Would it be better to look for a fix to whatever's the matter with CMake on Windows than fix this kind of thing as it shows up?

If we found a fix for it, that would be nice, but I have no idea where to start regarding that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
5 participants