diff --git a/Utilities/AutoPause.cpp b/Utilities/AutoPause.cpp deleted file mode 100644 index 5fc5125975..0000000000 --- a/Utilities/AutoPause.cpp +++ /dev/null @@ -1,73 +0,0 @@ -#include "stdafx.h" -#include "Config.h" -#include "Emu/System.h" -#include "AutoPause.h" - -cfg::bool_entry g_cfg_debug_autopause_syscall(cfg::root.misc, "Auto Pause at System Call"); -cfg::bool_entry g_cfg_debug_autopause_func_call(cfg::root.misc, "Auto Pause at Function Call"); - -debug::autopause& debug::autopause::get_instance() -{ - // Use magic static - static autopause instance; - return instance; -} - -// Load Auto Pause Configuration from file "pause.bin" -void debug::autopause::reload(void) -{ - auto& instance = get_instance(); - - instance.m_pause_function.clear(); - instance.m_pause_syscall.clear(); - - // TODO: better format, possibly a config entry - if (fs::file list{ fs::get_config_dir() + "pause.bin" }) - { - u32 num; - size_t fmax = list.size(); - size_t fcur = 0; - list.seek(0); - while (fcur <= fmax - sizeof(u32)) - { - list.read(&num, sizeof(u32)); - fcur += sizeof(u32); - if (num == 0xFFFFFFFF) break; - - if (num < 1024) - { - instance.m_pause_syscall.emplace(num); - LOG_WARNING(HLE, "Set autopause at syscall %lld", num); - } - else - { - instance.m_pause_function.emplace(num); - LOG_WARNING(HLE, "Set autopause at function 0x%08x", num); - } - } - } -} - -bool debug::autopause::pause_syscall(u64 code) -{ - if (g_cfg_debug_autopause_syscall && get_instance().m_pause_syscall.count(code) != 0) - { - Emu.Pause(); - LOG_SUCCESS(HLE, "Autopause triggered at syscall %lld", code); - return true; - } - - return false; -} - -bool debug::autopause::pause_function(u32 code) -{ - if (g_cfg_debug_autopause_func_call && get_instance().m_pause_function.count(code) != 0) - { - Emu.Pause(); - LOG_SUCCESS(HLE, "Autopause triggered at function 0x%08x", code); - return true; - } - - return false; -} diff --git a/Utilities/AutoPause.h b/Utilities/AutoPause.h deleted file mode 100644 index 87f3ea48cc..0000000000 --- a/Utilities/AutoPause.h +++ /dev/null @@ -1,22 +0,0 @@ -#pragma once - -#include - -// Regarded as a Debugger Enchantment -namespace debug -{ - // To store the pause function/call id, and let those pause there. - // Would be with a GUI to configure those. - class autopause - { - std::unordered_set m_pause_syscall; - std::unordered_set m_pause_function; - - static autopause& get_instance(); - public: - - static void reload(); - static bool pause_syscall(u64 code); - static bool pause_function(u32 code); - }; -} diff --git a/rpcs3/Emu/Cell/PPUModule.cpp b/rpcs3/Emu/Cell/PPUModule.cpp index d3ba2f2639..9f6cada3ac 100644 --- a/rpcs3/Emu/Cell/PPUModule.cpp +++ b/rpcs3/Emu/Cell/PPUModule.cpp @@ -1,6 +1,5 @@ #include "stdafx.h" #include "Utilities/Config.h" -#include "Utilities/AutoPause.h" #include "Utilities/VirtualMemory.h" #include "Crypto/sha1.h" #include "Crypto/unself.h" diff --git a/rpcs3/Emu/Cell/lv2/lv2.cpp b/rpcs3/Emu/Cell/lv2/lv2.cpp index 907da6be88..ddf77a0821 100644 --- a/rpcs3/Emu/Cell/lv2/lv2.cpp +++ b/rpcs3/Emu/Cell/lv2/lv2.cpp @@ -1,6 +1,5 @@ #include "stdafx.h" #include "Utilities/Config.h" -#include "Utilities/AutoPause.h" #include "Emu/System.h" #include "Emu/Cell/PPUFunction.h" @@ -997,12 +996,6 @@ extern void ppu_execute_syscall(ppu_thread& ppu, u64 code) { if (code < g_ppu_syscall_table.size()) { - // If autopause occures, check_status() will hold the thread till unpaused - if (debug::autopause::pause_syscall(code)) - { - ppu.test_state(); - } - if (auto func = g_ppu_syscall_table[code]) { func(ppu); diff --git a/rpcs3/Emu/System.cpp b/rpcs3/Emu/System.cpp index 06ed3d5bec..6af98c5e7b 100644 --- a/rpcs3/Emu/System.cpp +++ b/rpcs3/Emu/System.cpp @@ -1,6 +1,5 @@ #include "stdafx.h" #include "Utilities/Config.h" -#include "Utilities/AutoPause.h" #include "Utilities/event.h" #include "Utilities/bin_patch.h" #include "Emu/Memory/Memory.h" @@ -362,8 +361,6 @@ void Emulator::Load() return; } - debug::autopause::reload(); - if (g_cfg_autostart && IsReady()) { Run(); diff --git a/rpcs3/Gui/MainFrame.cpp b/rpcs3/Gui/MainFrame.cpp index ab74932898..f33688695a 100644 --- a/rpcs3/Gui/MainFrame.cpp +++ b/rpcs3/Gui/MainFrame.cpp @@ -100,7 +100,7 @@ MainFrame::MainFrame() menu_conf->Append(id_config_emu, "&Settings"); menu_conf->Append(id_config_pad, "&Keyboard Settings"); menu_conf->AppendSeparator(); - menu_conf->Append(id_config_autopause_manager, "&Auto Pause Settings"); + menu_conf->Append(id_config_autopause_manager, "&Auto Pause Settings")->Enable(false); //menu_conf->AppendSeparator(); //menu_conf->Append(id_config_vfs_manager, "Virtual &File System Manager"); //menu_conf->Append(id_config_vhdd_manager, "Virtual &HDD Manager"); diff --git a/rpcs3/emucore.vcxproj b/rpcs3/emucore.vcxproj index 2ae771d52b..e5be30b14c 100644 --- a/rpcs3/emucore.vcxproj +++ b/rpcs3/emucore.vcxproj @@ -72,7 +72,6 @@ NotUsing - NotUsing @@ -138,7 +137,7 @@ - + @@ -404,7 +403,6 @@ - @@ -543,7 +541,7 @@ - + @@ -715,4 +713,4 @@ - + \ No newline at end of file diff --git a/rpcs3/emucore.vcxproj.filters b/rpcs3/emucore.vcxproj.filters index 6921b3f0c2..0e54e5c8da 100644 --- a/rpcs3/emucore.vcxproj.filters +++ b/rpcs3/emucore.vcxproj.filters @@ -149,9 +149,6 @@ Emu\GPU\RSX - - Utilities - Utilities @@ -1063,9 +1060,6 @@ Emu\GPU\RSX - - Utilities - Emu @@ -1376,7 +1370,7 @@ Emu\Cell\Modules - Emu\Cell\Modules + Emu\Cell\Modules Emu\Cell\Modules