diff options
| author | Ac_K <Acoustik666@gmail.com> | 2019-08-28 13:02:50 +0200 |
|---|---|---|
| committer | Thomas Guillemard <me@thog.eu> | 2019-08-28 13:02:50 +0200 |
| commit | 6b8fb8a4e3da7b4864c65cf9842e89e462fcc81b (patch) | |
| tree | 3df7a7ae39b358eac79e536757cfe95078700191 /Ryujinx.HLE/HOS/Services/Apm/PerformanceConfiguration.cs | |
| parent | 5c44c9600f09c3faa45c01e2b94d01ac1715c71a (diff) | |
Implement am ICommonStateGetter::SetCpuBoostMode (#743)
- Implement am ICommonStateGetter::SetCpuBoostMode according to the RE:
```
signed __int64 __fastcall nn::ICommonStateGetter::SetCpuBoostModeImpl(__int64 this, unsigned int cpu_boost_mode)
{
if ( cpu_boost_mode > 1 )
{
return 0x3F480LL;
}
__int64 v2 = *(_QWORD *)(this + 0x38);
__int64 v3 = *(_QWORD *)(*(_QWORD *)(v2 + 8) + 0x298LL);
nnLock((_DWORD *)(v3 + 0x104));
__int64 v5 = *(_QWORD *)(v2 + 0x18);
bool unk_bool = *(unsigned __int8 *)(v5 + 0x7C);
*(_DWORD *)(v5 + 0x80) = cpu_boost_mode;
if (!unk_bool)
{
*(_BYTE *)(v5 + 0x7C) = 1;
}
wait_condvar(v3 + 0xA8);
nnUnlock((_DWORD *)(v3 + 0x104));
return 0LL;
}
```
- Add enum for apm CpuBoostMode
- Add missing values in apm PerformanceConfiguration with some comments.
Diffstat (limited to 'Ryujinx.HLE/HOS/Services/Apm/PerformanceConfiguration.cs')
| -rw-r--r-- | Ryujinx.HLE/HOS/Services/Apm/PerformanceConfiguration.cs | 32 |
1 files changed, 18 insertions, 14 deletions
diff --git a/Ryujinx.HLE/HOS/Services/Apm/PerformanceConfiguration.cs b/Ryujinx.HLE/HOS/Services/Apm/PerformanceConfiguration.cs index d091ef3b..e42edebc 100644 --- a/Ryujinx.HLE/HOS/Services/Apm/PerformanceConfiguration.cs +++ b/Ryujinx.HLE/HOS/Services/Apm/PerformanceConfiguration.cs @@ -1,18 +1,22 @@ namespace Ryujinx.HLE.HOS.Services.Apm { - enum PerformanceConfiguration : uint - { - PerformanceConfiguration1 = 0x00010000, - PerformanceConfiguration2 = 0x00010001, - PerformanceConfiguration3 = 0x00010002, - PerformanceConfiguration4 = 0x00020000, - PerformanceConfiguration5 = 0x00020001, - PerformanceConfiguration6 = 0x00020002, - PerformanceConfiguration7 = 0x00020003, - PerformanceConfiguration8 = 0x00020004, - PerformanceConfiguration9 = 0x00020005, - PerformanceConfiguration10 = 0x00020006, - PerformanceConfiguration11 = 0x92220007, - PerformanceConfiguration12 = 0x92220008 + enum PerformanceConfiguration : uint // Clocks are all in MHz. + { // CPU | GPU | RAM | NOTE + PerformanceConfiguration1 = 0x00010000, // 1020 | 384 | 1600 | Only available while docked. + PerformanceConfiguration2 = 0x00010001, // 1020 | 768 | 1600 | Only available while docked. + PerformanceConfiguration3 = 0x00010002, // 1224 | 691.2 | 1600 | Only available for SDEV units. + PerformanceConfiguration4 = 0x00020000, // 1020 | 230.4 | 1600 | Only available for SDEV units. + PerformanceConfiguration5 = 0x00020001, // 1020 | 307.2 | 1600 | + PerformanceConfiguration6 = 0x00020002, // 1224 | 230.4 | 1600 | + PerformanceConfiguration7 = 0x00020003, // 1020 | 307 | 1331.2 | + PerformanceConfiguration8 = 0x00020004, // 1020 | 384 | 1331.2 | + PerformanceConfiguration9 = 0x00020005, // 1020 | 307.2 | 1065.6 | + PerformanceConfiguration10 = 0x00020006, // 1020 | 384 | 1065.6 | + PerformanceConfiguration11 = 0x92220007, // 1020 | 460.8 | 1600 | + PerformanceConfiguration12 = 0x92220008, // 1020 | 460.8 | 1331.2 | + PerformanceConfiguration13 = 0x92220009, // 1785 | 768 | 1600 | 7.0.0+ + PerformanceConfiguration14 = 0x9222000A, // 1785 | 768 | 1331.2 | 7.0.0+ + PerformanceConfiguration15 = 0x9222000B, // 1020 | 768 | 1600 | 7.0.0+ + PerformanceConfiguration16 = 0x9222000C // 1020 | 768 | 1331.2 | 7.0.0+ } }
\ No newline at end of file |
