summaryrefslogtreecommitdiffstats
path: root/src/core/hardware_properties.h
diff options
context:
space:
mode:
authorFernando Sahmkow <fsahmkow27@gmail.com>2020-02-12 00:56:24 +0100
committerFernandoS27 <fsahmkow27@gmail.com>2020-02-12 01:19:11 +0100
commit1e6f8aba04b7be0f90b97aed2527558c755935d6 (patch)
treedea6dc5efd324eb6bc8667a114e20c6e91a28195 /src/core/hardware_properties.h
parentKernel: Refactor synchronization to better match RE (diff)
downloadyuzu-1e6f8aba04b7be0f90b97aed2527558c755935d6.tar
yuzu-1e6f8aba04b7be0f90b97aed2527558c755935d6.tar.gz
yuzu-1e6f8aba04b7be0f90b97aed2527558c755935d6.tar.bz2
yuzu-1e6f8aba04b7be0f90b97aed2527558c755935d6.tar.lz
yuzu-1e6f8aba04b7be0f90b97aed2527558c755935d6.tar.xz
yuzu-1e6f8aba04b7be0f90b97aed2527558c755935d6.tar.zst
yuzu-1e6f8aba04b7be0f90b97aed2527558c755935d6.zip
Diffstat (limited to 'src/core/hardware_properties.h')
-rw-r--r--src/core/hardware_properties.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/core/hardware_properties.h b/src/core/hardware_properties.h
new file mode 100644
index 000000000..62cdf9ef0
--- /dev/null
+++ b/src/core/hardware_properties.h
@@ -0,0 +1,28 @@
+// Copyright 2020 yuzu Emulator Project
+// Licensed under GPLv2 or any later version
+// Refer to the license.txt file included.
+
+#pragma once
+
+#include "common/common_types.h"
+
+namespace Core {
+
+union EmuThreadHandle {
+ u64 raw;
+ struct {
+ u32 host_handle;
+ u32 guest_handle;
+ };
+};
+
+namespace Hardware {
+
+// The below clock rate is based on Switch's clockspeed being widely known as 1.020GHz
+// The exact value used is of course unverified.
+constexpr u64 BASE_CLOCK_RATE = 1019215872; // Switch cpu frequency is 1020MHz un/docked
+constexpr u64 CNTFREQ = 19200000; // Switch's hardware clock speed
+constexpr u32 NUM_CPU_CORES = 4; // Number of CPU Cores
+} // namespace Hardware
+
+} // namespace Core