mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-02-28 22:13:24 +00:00
Remove AutoPause.cpp
This commit is contained in:
parent
8209e6c1e3
commit
08c955d177
@ -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;
|
|
||||||
}
|
|
@ -1,22 +0,0 @@
|
|||||||
#pragma once
|
|
||||||
|
|
||||||
#include <unordered_set>
|
|
||||||
|
|
||||||
// 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<u64> m_pause_syscall;
|
|
||||||
std::unordered_set<u32> m_pause_function;
|
|
||||||
|
|
||||||
static autopause& get_instance();
|
|
||||||
public:
|
|
||||||
|
|
||||||
static void reload();
|
|
||||||
static bool pause_syscall(u64 code);
|
|
||||||
static bool pause_function(u32 code);
|
|
||||||
};
|
|
||||||
}
|
|
@ -1,6 +1,5 @@
|
|||||||
#include "stdafx.h"
|
#include "stdafx.h"
|
||||||
#include "Utilities/Config.h"
|
#include "Utilities/Config.h"
|
||||||
#include "Utilities/AutoPause.h"
|
|
||||||
#include "Utilities/VirtualMemory.h"
|
#include "Utilities/VirtualMemory.h"
|
||||||
#include "Crypto/sha1.h"
|
#include "Crypto/sha1.h"
|
||||||
#include "Crypto/unself.h"
|
#include "Crypto/unself.h"
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
#include "stdafx.h"
|
#include "stdafx.h"
|
||||||
#include "Utilities/Config.h"
|
#include "Utilities/Config.h"
|
||||||
#include "Utilities/AutoPause.h"
|
|
||||||
#include "Emu/System.h"
|
#include "Emu/System.h"
|
||||||
|
|
||||||
#include "Emu/Cell/PPUFunction.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 (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])
|
if (auto func = g_ppu_syscall_table[code])
|
||||||
{
|
{
|
||||||
func(ppu);
|
func(ppu);
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
#include "stdafx.h"
|
#include "stdafx.h"
|
||||||
#include "Utilities/Config.h"
|
#include "Utilities/Config.h"
|
||||||
#include "Utilities/AutoPause.h"
|
|
||||||
#include "Utilities/event.h"
|
#include "Utilities/event.h"
|
||||||
#include "Utilities/bin_patch.h"
|
#include "Utilities/bin_patch.h"
|
||||||
#include "Emu/Memory/Memory.h"
|
#include "Emu/Memory/Memory.h"
|
||||||
@ -362,8 +361,6 @@ void Emulator::Load()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
debug::autopause::reload();
|
|
||||||
|
|
||||||
if (g_cfg_autostart && IsReady())
|
if (g_cfg_autostart && IsReady())
|
||||||
{
|
{
|
||||||
Run();
|
Run();
|
||||||
|
@ -100,7 +100,7 @@ MainFrame::MainFrame()
|
|||||||
menu_conf->Append(id_config_emu, "&Settings");
|
menu_conf->Append(id_config_emu, "&Settings");
|
||||||
menu_conf->Append(id_config_pad, "&Keyboard Settings");
|
menu_conf->Append(id_config_pad, "&Keyboard Settings");
|
||||||
menu_conf->AppendSeparator();
|
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->AppendSeparator();
|
||||||
//menu_conf->Append(id_config_vfs_manager, "Virtual &File System Manager");
|
//menu_conf->Append(id_config_vfs_manager, "Virtual &File System Manager");
|
||||||
//menu_conf->Append(id_config_vhdd_manager, "Virtual &HDD Manager");
|
//menu_conf->Append(id_config_vhdd_manager, "Virtual &HDD Manager");
|
||||||
|
@ -72,7 +72,6 @@
|
|||||||
<ClCompile Include="..\ps3emu_api\ps3emu_api.cpp">
|
<ClCompile Include="..\ps3emu_api\ps3emu_api.cpp">
|
||||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="..\Utilities\AutoPause.cpp" />
|
|
||||||
<ClCompile Include="..\Utilities\bin_patch.cpp">
|
<ClCompile Include="..\Utilities\bin_patch.cpp">
|
||||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
@ -404,7 +403,6 @@
|
|||||||
<ClInclude Include="..\ps3emu_api\ps3emu_api.h" />
|
<ClInclude Include="..\ps3emu_api\ps3emu_api.h" />
|
||||||
<ClInclude Include="..\Utilities\Atomic.h" />
|
<ClInclude Include="..\Utilities\Atomic.h" />
|
||||||
<ClInclude Include="..\Utilities\AtomicPtr.h" />
|
<ClInclude Include="..\Utilities\AtomicPtr.h" />
|
||||||
<ClInclude Include="..\Utilities\AutoPause.h" />
|
|
||||||
<ClInclude Include="..\Utilities\BEType.h" />
|
<ClInclude Include="..\Utilities\BEType.h" />
|
||||||
<ClInclude Include="..\Utilities\bin_patch.h" />
|
<ClInclude Include="..\Utilities\bin_patch.h" />
|
||||||
<ClInclude Include="..\Utilities\BitField.h" />
|
<ClInclude Include="..\Utilities\BitField.h" />
|
||||||
|
@ -149,9 +149,6 @@
|
|||||||
<ClCompile Include="Emu\RSX\CgBinaryFragmentProgram.cpp">
|
<ClCompile Include="Emu\RSX\CgBinaryFragmentProgram.cpp">
|
||||||
<Filter>Emu\GPU\RSX</Filter>
|
<Filter>Emu\GPU\RSX</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="..\Utilities\AutoPause.cpp">
|
|
||||||
<Filter>Utilities</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\Utilities\rXml.cpp">
|
<ClCompile Include="..\Utilities\rXml.cpp">
|
||||||
<Filter>Utilities</Filter>
|
<Filter>Utilities</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
@ -1063,9 +1060,6 @@
|
|||||||
<ClInclude Include="Emu\RSX\GCM.h">
|
<ClInclude Include="Emu\RSX\GCM.h">
|
||||||
<Filter>Emu\GPU\RSX</Filter>
|
<Filter>Emu\GPU\RSX</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="..\Utilities\AutoPause.h">
|
|
||||||
<Filter>Utilities</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="Emu\IdManager.h">
|
<ClInclude Include="Emu\IdManager.h">
|
||||||
<Filter>Emu</Filter>
|
<Filter>Emu</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user