summaryrefslogtreecommitdiffstats
path: root/src/core/core.cpp
diff options
context:
space:
mode:
authorZach Hilman <zachhilman@gmail.com>2019-05-31 01:36:18 +0200
committerZach Hilman <zachhilman@gmail.com>2019-09-22 03:45:05 +0200
commit37850eeee57adfb5318aff7cd19bf9ba334ab738 (patch)
tree06668d4787e7b75043da4f83cffbdf35ac892b02 /src/core/core.cpp
parentpatch_manager: Update cheat parsing for new VM (diff)
downloadyuzu-37850eeee57adfb5318aff7cd19bf9ba334ab738.tar
yuzu-37850eeee57adfb5318aff7cd19bf9ba334ab738.tar.gz
yuzu-37850eeee57adfb5318aff7cd19bf9ba334ab738.tar.bz2
yuzu-37850eeee57adfb5318aff7cd19bf9ba334ab738.tar.lz
yuzu-37850eeee57adfb5318aff7cd19bf9ba334ab738.tar.xz
yuzu-37850eeee57adfb5318aff7cd19bf9ba334ab738.tar.zst
yuzu-37850eeee57adfb5318aff7cd19bf9ba334ab738.zip
Diffstat (limited to 'src/core/core.cpp')
-rw-r--r--src/core/core.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/core/core.cpp b/src/core/core.cpp
index f22244cf7..67ec8d4b9 100644
--- a/src/core/core.cpp
+++ b/src/core/core.cpp
@@ -37,6 +37,7 @@
#include "core/hle/service/service.h"
#include "core/hle/service/sm/sm.h"
#include "core/loader/loader.h"
+#include "core/memory/cheat_engine.h"
#include "core/perf_stats.h"
#include "core/reporter.h"
#include "core/settings.h"
@@ -329,7 +330,7 @@ struct System::Impl {
CpuCoreManager cpu_core_manager;
bool is_powered_on = false;
- std::unique_ptr<FileSys::CheatEngine> cheat_engine;
+ std::unique_ptr<Memory::CheatEngine> cheat_engine;
std::unique_ptr<Tools::Freezer> memory_freezer;
/// Frontend applets
@@ -544,13 +545,6 @@ Tegra::DebugContext* System::GetGPUDebugContext() const {
return impl->debug_context.get();
}
-void System::RegisterCheatList(const std::vector<FileSys::CheatList>& list,
- const std::string& build_id, VAddr code_region_start,
- VAddr code_region_end) {
- impl->cheat_engine = std::make_unique<FileSys::CheatEngine>(*this, list, build_id,
- code_region_start, code_region_end);
-}
-
void System::SetFilesystem(std::shared_ptr<FileSys::VfsFilesystem> vfs) {
impl->virtual_filesystem = std::move(vfs);
}
@@ -559,6 +553,13 @@ std::shared_ptr<FileSys::VfsFilesystem> System::GetFilesystem() const {
return impl->virtual_filesystem;
}
+void System::RegisterCheatList(const std::vector<Memory::CheatEntry>& list,
+ const std::array<u8, 32>& build_id, VAddr main_region_begin,
+ u64 main_region_size) {
+ impl->cheat_engine = std::make_unique<Memory::CheatEngine>(*this, list, build_id);
+ impl->cheat_engine->SetMainMemoryParameters(main_region_begin, main_region_size);
+}
+
void System::SetAppletFrontendSet(Service::AM::Applets::AppletFrontendSet&& set) {
impl->applet_manager.SetAppletFrontendSet(std::move(set));
}