mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-12-01 19:22:46 +01:00
core_timing: Use 1.020GHz for core clock rate.
This commit is contained in:
parent
82151d407d
commit
d6e4e6ea32
1 changed files with 3 additions and 5 deletions
|
@ -23,11 +23,9 @@
|
||||||
#include "common/common_types.h"
|
#include "common/common_types.h"
|
||||||
#include "common/logging/log.h"
|
#include "common/logging/log.h"
|
||||||
|
|
||||||
// The timing we get from the assembly is 268,111,855.956 Hz
|
// The below clock rate is based on Switch's clockspeed being widely known as 1.020GHz
|
||||||
// It is possible that this number isn't just an integer because the compiler could have
|
// The exact value used is of course unverified.
|
||||||
// optimized the multiplication by a multiply-by-constant division.
|
constexpr u64 BASE_CLOCK_RATE = 1019215872; // Switch clock speed is 1020MHz un/docked
|
||||||
// Rounding to the nearest integer should be fine
|
|
||||||
constexpr u64 BASE_CLOCK_RATE = 383778816; // Switch clock speed is 384MHz docked
|
|
||||||
constexpr u64 MAX_VALUE_TO_MULTIPLY = std::numeric_limits<s64>::max() / BASE_CLOCK_RATE;
|
constexpr u64 MAX_VALUE_TO_MULTIPLY = std::numeric_limits<s64>::max() / BASE_CLOCK_RATE;
|
||||||
|
|
||||||
inline s64 msToCycles(int ms) {
|
inline s64 msToCycles(int ms) {
|
||||||
|
|
Loading…
Reference in a new issue