mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-15 19:28:43 +12:00
Another attempt
This commit is contained in:
parent
0cd03ca9e6
commit
ab5dd3ae6f
2 changed files with 34 additions and 28 deletions
|
@ -9,29 +9,6 @@ std::vector<psv_func> g_psv_func_list;
|
||||||
|
|
||||||
void add_psv_func(psv_func& data)
|
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);
|
g_psv_func_list.push_back(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -76,8 +53,31 @@ extern psv_log_base sceLibKernel;
|
||||||
|
|
||||||
void list_known_psv_modules()
|
void list_known_psv_modules()
|
||||||
{
|
{
|
||||||
sceLibc.Log("");
|
if (!g_psv_func_list.size())
|
||||||
sceLibm.Log("");
|
{
|
||||||
sceLibstdcxx.Log("");
|
// setup special functions (without NIDs)
|
||||||
sceLibKernel.Log("");
|
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
|
class psv_log_base : public LogBase
|
||||||
{
|
{
|
||||||
std::string m_name;
|
std::string m_name;
|
||||||
|
void(*m_init_func)();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
psv_log_base(const std::string& name, void(*init_func)())
|
psv_log_base(const std::string& name, void(*init_func)())
|
||||||
: m_name(name)
|
: m_name(name)
|
||||||
|
, m_init_func(init_func)
|
||||||
{
|
{
|
||||||
init_func();
|
}
|
||||||
|
|
||||||
|
void Init()
|
||||||
|
{
|
||||||
|
m_init_func();
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual const std::string& GetName() const override
|
virtual const std::string& GetName() const override
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue