mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-01-30 21:32:50 +00:00
Another attempt
This commit is contained in:
parent
0cd03ca9e6
commit
ab5dd3ae6f
@ -9,29 +9,6 @@ std::vector<psv_func> g_psv_func_list;
|
||||
|
||||
void add_psv_func(psv_func& data)
|
||||
{
|
||||
// setup special functions (without NIDs)
|
||||
if (!g_psv_func_list.size())
|
||||
{
|
||||
psv_func unimplemented;
|
||||
unimplemented.nid = 0;
|
||||
unimplemented.name = "Special function (unimplemented stub)";
|
||||
unimplemented.func.reset(new psv_func_detail::func_binder<void, ARMv7Context&>([](ARMv7Context& context)
|
||||
{
|
||||
context.thread.m_last_syscall = vm::psv::read32(context.thread.PC + 4);
|
||||
throw "Unimplemented function executed";
|
||||
}));
|
||||
g_psv_func_list.push_back(unimplemented);
|
||||
|
||||
psv_func hle_return;
|
||||
hle_return.nid = 1;
|
||||
hle_return.name = "Special function (return from HLE)";
|
||||
hle_return.func.reset(new psv_func_detail::func_binder<void, ARMv7Context&>([](ARMv7Context& context)
|
||||
{
|
||||
context.thread.FastStop();
|
||||
}));
|
||||
g_psv_func_list.push_back(hle_return);
|
||||
}
|
||||
|
||||
g_psv_func_list.push_back(data);
|
||||
}
|
||||
|
||||
@ -76,8 +53,31 @@ extern psv_log_base sceLibKernel;
|
||||
|
||||
void list_known_psv_modules()
|
||||
{
|
||||
sceLibc.Log("");
|
||||
sceLibm.Log("");
|
||||
sceLibstdcxx.Log("");
|
||||
sceLibKernel.Log("");
|
||||
if (!g_psv_func_list.size())
|
||||
{
|
||||
// setup special functions (without NIDs)
|
||||
psv_func unimplemented;
|
||||
unimplemented.nid = 0;
|
||||
unimplemented.name = "Special function (unimplemented stub)";
|
||||
unimplemented.func.reset(new psv_func_detail::func_binder<void, ARMv7Context&>([](ARMv7Context& context)
|
||||
{
|
||||
context.thread.m_last_syscall = vm::psv::read32(context.thread.PC + 4);
|
||||
throw "Unimplemented function executed";
|
||||
}));
|
||||
g_psv_func_list.push_back(unimplemented);
|
||||
|
||||
psv_func hle_return;
|
||||
hle_return.nid = 1;
|
||||
hle_return.name = "Special function (return from HLE)";
|
||||
hle_return.func.reset(new psv_func_detail::func_binder<void, ARMv7Context&>([](ARMv7Context& context)
|
||||
{
|
||||
context.thread.FastStop();
|
||||
}));
|
||||
g_psv_func_list.push_back(hle_return);
|
||||
|
||||
sceLibc.Init();
|
||||
sceLibm.Init();
|
||||
sceLibstdcxx.Init();
|
||||
sceLibKernel.Init();
|
||||
}
|
||||
}
|
||||
|
@ -5,12 +5,18 @@
|
||||
class psv_log_base : public LogBase
|
||||
{
|
||||
std::string m_name;
|
||||
void(*m_init_func)();
|
||||
|
||||
public:
|
||||
psv_log_base(const std::string& name, void(*init_func)())
|
||||
: m_name(name)
|
||||
, m_init_func(init_func)
|
||||
{
|
||||
init_func();
|
||||
}
|
||||
|
||||
void Init()
|
||||
{
|
||||
m_init_func();
|
||||
}
|
||||
|
||||
virtual const std::string& GetName() const override
|
||||
|
Loading…
x
Reference in New Issue
Block a user