mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-23 04:55:22 +00:00
scePerf stub, sceSysmodule, sema, ef
This commit is contained in:
parent
a7d85480a8
commit
81340e9d5c
19 changed files with 310 additions and 87 deletions
|
@ -79,20 +79,26 @@ struct ARMv7Context
|
|||
{
|
||||
struct
|
||||
{
|
||||
u8 state : 5;
|
||||
u8 cond : 3;
|
||||
u8 shift_state : 5;
|
||||
u8 cond_base : 3;
|
||||
};
|
||||
|
||||
struct
|
||||
{
|
||||
u8 check_state : 4;
|
||||
u8 condition : 4;
|
||||
};
|
||||
|
||||
u8 IT;
|
||||
|
||||
u32 advance()
|
||||
{
|
||||
const u32 res = (state & 0xf) ? (cond << 1 | state >> 4) : 0xe /* true */;
|
||||
const u32 res = check_state ? condition : 0xe /* always true */;
|
||||
|
||||
state <<= 1;
|
||||
if ((state & 0xf) == 0) // if no d
|
||||
shift_state <<= 1;
|
||||
if (!check_state)
|
||||
{
|
||||
IT = 0; // clear ITSTATE
|
||||
IT = 0; // clear
|
||||
}
|
||||
|
||||
return res;
|
||||
|
@ -100,7 +106,7 @@ struct ARMv7Context
|
|||
|
||||
operator bool() const
|
||||
{
|
||||
return (state & 0xf) != 0;
|
||||
return check_state;
|
||||
}
|
||||
|
||||
} ITSTATE;
|
||||
|
|
|
@ -140,7 +140,7 @@ const ARMv7_opcode_t ARMv7_opcode_table[] =
|
|||
ARMv7_OP4(0x0fe0, 0x0010, 0x0020, 0x0000, A1, EOR_REG),
|
||||
ARMv7_OP4(0x0fe0, 0x0090, 0x0020, 0x0010, A1, EOR_RSR),
|
||||
|
||||
ARMv7_OP2(0xff00, 0xbf00, T1, IT),
|
||||
ARMv7_OP2(0xff00, 0xbf00, T1, IT, SKIP_IF( BF(0, 3) == 0 )),
|
||||
|
||||
ARMv7_OP2(0xf800, 0xc800, T1, LDM),
|
||||
ARMv7_OP4(0xffd0, 0x2000, 0xe890, 0x0000, T2, LDM),
|
||||
|
@ -1208,10 +1208,14 @@ void armv7_decoder_initialize(u32 addr, u32 end_addr, bool dump)
|
|||
{
|
||||
LOG_ERROR(ARMv7, "Unknown instruction found at address 0x%08x: %04x %04x", addr, code.code1, code.code0);
|
||||
addr += 4;
|
||||
continue;
|
||||
}
|
||||
else
|
||||
|
||||
// Proceed with found:
|
||||
|
||||
if (dump)
|
||||
{
|
||||
if (dump) if (found->length == 2)
|
||||
if (found->length == 2)
|
||||
{
|
||||
LOG_NOTICE(ARMv7, "0x%08x: %04x %s", addr, code.code0, found->name);
|
||||
}
|
||||
|
@ -1219,34 +1223,39 @@ void armv7_decoder_initialize(u32 addr, u32 end_addr, bool dump)
|
|||
{
|
||||
LOG_NOTICE(ARMv7, "0x%08x: %04x %04x %s", addr, code.code1, code.code0, found->name);
|
||||
}
|
||||
}
|
||||
|
||||
if (found->func == ARMv7_instrs::BLX && found->type == T2)
|
||||
if (found->func == ARMv7_instrs::BLX && found->type == T2)
|
||||
{
|
||||
const u32 s = (code.data >> 26) & 0x1;
|
||||
const u32 i1 = (code.data >> 13) & 0x1 ^ s ^ 1;
|
||||
const u32 i2 = (code.data >> 11) & 0x1 ^ s ^ 1;
|
||||
const u32 target = (addr + 4 & ~3) + sign<25, u32>(s << 24 | i2 << 23 | i1 << 22 | (code.data & 0x3ff0000) >> 4 | (code.data & 0x7ff) << 1);
|
||||
|
||||
// possibly a call to imported function:
|
||||
if (target >= end_addr && ((target - end_addr) % 16) == 0 && vm::psv::read16(target) == 0xf870)
|
||||
{
|
||||
const u32 s = (code.data >> 26) & 0x1;
|
||||
const u32 i1 = (code.data >> 13) & 0x1 ^ s ^ 1;
|
||||
const u32 i2 = (code.data >> 11) & 0x1 ^ s ^ 1;
|
||||
const u32 target = (addr + 4 & ~3) + sign<25, u32>(s << 24 | i2 << 23 | i1 << 22 | (code.data & 0x3ff0000) >> 4 | (code.data & 0x7ff) << 1);
|
||||
const u32 instr = vm::psv::read32(target);
|
||||
|
||||
// possibly a call to imported function:
|
||||
if (target >= end_addr && ((target - end_addr) % 16) == 0 && vm::psv::read16(target) == 0xf870)
|
||||
// check if not "unimplemented"
|
||||
if (instr >> 16)
|
||||
{
|
||||
const u32 instr = vm::psv::read32(target);
|
||||
|
||||
// check if not "unimplemented"
|
||||
if (instr >> 16)
|
||||
{
|
||||
// replace BLX with "hack" instruction directly, it can help to see where it was called from
|
||||
vm::psv::write32(addr, instr);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG_ERROR(ARMv7, "Unrecognized BLX call found at adddress 0x%08x (target=0x%08x)", addr, target);
|
||||
// replace BLX with "hack" instruction directly, it can help to see where it was called from
|
||||
vm::psv::write32(addr, instr);
|
||||
}
|
||||
}
|
||||
|
||||
addr += found->length;
|
||||
else
|
||||
{
|
||||
LOG_ERROR(ARMv7, "Unrecognized BLX call found at adddress 0x%08x (target=0x%08x)", addr, target);
|
||||
}
|
||||
}
|
||||
|
||||
//if (found->func == ARMv7_instrs::IT)
|
||||
//{
|
||||
// LOG_ERROR(ARMv7, "IT instruction found at address 0x%08x", addr);
|
||||
//}
|
||||
|
||||
addr += found->length;
|
||||
}
|
||||
|
||||
while (vm::psv::read16(addr) == 0xf870)
|
||||
|
|
|
@ -965,7 +965,7 @@ void ARMv7_instrs::BLX(ARMv7Context& context, const ARMv7Code code, const ARMv7_
|
|||
}
|
||||
case A2:
|
||||
{
|
||||
cond = 15;
|
||||
cond = 0xe; // always true
|
||||
newLR = (context.thread.PC + 4) - 4;
|
||||
target = (context.thread.PC + 4 | 1) + sign<25, u32>((code.data & 0xffffff) << 2 | (code.data & 0x1000000) >> 23);
|
||||
break;
|
||||
|
@ -1871,7 +1871,7 @@ void ARMv7_instrs::MOV_REG(ARMv7Context& context, const ARMv7Code code, const AR
|
|||
}
|
||||
case T2:
|
||||
{
|
||||
cond = 15;
|
||||
cond = 0xe; // always true
|
||||
d = (code.data & 0x7);
|
||||
m = (code.data & 0x38) >> 3;
|
||||
set_flags = true;
|
||||
|
|
13
rpcs3/Emu/ARMv7/Modules/psv_event_flag.cpp
Normal file
13
rpcs3/Emu/ARMv7/Modules/psv_event_flag.cpp
Normal file
|
@ -0,0 +1,13 @@
|
|||
#include "stdafx.h"
|
||||
#include "Emu/Memory/Memory.h"
|
||||
#include "Emu/ARMv7/PSVFuncList.h"
|
||||
#include "Emu/ARMv7/PSVObjectList.h"
|
||||
#include "sceLibKernel.h"
|
||||
#include "psv_event_flag.h"
|
||||
|
||||
psv_event_flag_t::psv_event_flag_t(const char* name, u32 attr, u32 pattern)
|
||||
: attr(attr)
|
||||
, pattern(pattern)
|
||||
{
|
||||
strcpy_trunc(this->name, name);
|
||||
}
|
21
rpcs3/Emu/ARMv7/Modules/psv_event_flag.h
Normal file
21
rpcs3/Emu/ARMv7/Modules/psv_event_flag.h
Normal file
|
@ -0,0 +1,21 @@
|
|||
#pragma once
|
||||
|
||||
struct psv_event_flag_t
|
||||
{
|
||||
char name[32];
|
||||
u32 attr;
|
||||
u32 pattern;
|
||||
|
||||
private:
|
||||
psv_event_flag_t() = delete;
|
||||
psv_event_flag_t(const psv_event_flag_t&) = delete;
|
||||
psv_event_flag_t(psv_event_flag_t&&) = delete;
|
||||
|
||||
psv_event_flag_t& operator =(const psv_event_flag_t&) = delete;
|
||||
psv_event_flag_t& operator =(psv_event_flag_t&&) = delete;
|
||||
|
||||
public:
|
||||
psv_event_flag_t(const char* name, u32 attr, u32 pattern);
|
||||
};
|
||||
|
||||
extern psv_object_list_t<psv_event_flag_t, SCE_KERNEL_THREADMGR_UID_CLASS_EVENT_FLAG> g_psv_ef_list;
|
14
rpcs3/Emu/ARMv7/Modules/psv_sema.cpp
Normal file
14
rpcs3/Emu/ARMv7/Modules/psv_sema.cpp
Normal file
|
@ -0,0 +1,14 @@
|
|||
#include "stdafx.h"
|
||||
#include "Emu/Memory/Memory.h"
|
||||
#include "Emu/ARMv7/PSVFuncList.h"
|
||||
#include "Emu/ARMv7/PSVObjectList.h"
|
||||
#include "sceLibKernel.h"
|
||||
#include "psv_sema.h"
|
||||
|
||||
psv_sema_t::psv_sema_t(const char* name, u32 attr, s32 init_value, s32 max_value)
|
||||
: attr(attr)
|
||||
, value(init_value)
|
||||
, max(max_value)
|
||||
{
|
||||
strcpy_trunc(this->name, name);
|
||||
}
|
23
rpcs3/Emu/ARMv7/Modules/psv_sema.h
Normal file
23
rpcs3/Emu/ARMv7/Modules/psv_sema.h
Normal file
|
@ -0,0 +1,23 @@
|
|||
#pragma once
|
||||
|
||||
struct psv_sema_t
|
||||
{
|
||||
char name[32];
|
||||
u32 attr;
|
||||
s32 value;
|
||||
s32 max;
|
||||
|
||||
private:
|
||||
psv_sema_t() = delete;
|
||||
psv_sema_t(const psv_sema_t&) = delete;
|
||||
psv_sema_t(psv_sema_t&&) = delete;
|
||||
|
||||
psv_sema_t& operator =(const psv_sema_t&) = delete;
|
||||
psv_sema_t& operator =(psv_sema_t&&) = delete;
|
||||
|
||||
public:
|
||||
psv_sema_t(const char* name, u32 attr, s32 init_value, s32 max_value);
|
||||
|
||||
};
|
||||
|
||||
extern psv_object_list_t<psv_sema_t, SCE_KERNEL_THREADMGR_UID_CLASS_SEMA> g_psv_sema_list;
|
|
@ -1,6 +0,0 @@
|
|||
#include "stdafx.h"
|
||||
#include "Emu/Memory/Memory.h"
|
||||
#include "Emu/ARMv7/PSVFuncList.h"
|
||||
#include "Emu/ARMv7/PSVObjectList.h"
|
||||
#include "sceLibKernel.h"
|
||||
#include "psv_sema_object.h"
|
|
@ -1,11 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
struct psv_sema_t
|
||||
{
|
||||
char name[32];
|
||||
u32 attr;
|
||||
s32 initCount;
|
||||
s32 maxCount;
|
||||
};
|
||||
|
||||
extern psv_object_list_t<psv_sema_t, SCE_KERNEL_THREADMGR_UID_CLASS_SEMA> g_psv_sema_list;
|
|
@ -8,7 +8,8 @@
|
|||
#include "Emu/ARMv7/ARMv7Thread.h"
|
||||
|
||||
#include "sceLibKernel.h"
|
||||
#include "psv_sema_object.h"
|
||||
#include "psv_sema.h"
|
||||
#include "psv_event_flag.h"
|
||||
|
||||
#define RETURN_ERROR(code) { Emu.Pause(); sceLibKernel.Error("%s() failed: %s", __FUNCTION__, #code); return code; }
|
||||
|
||||
|
@ -393,7 +394,13 @@ s32 sceKernelWaitMultipleEventsCB(vm::psv::ptr<SceKernelWaitEvent> pWaitEventLis
|
|||
|
||||
s32 sceKernelCreateEventFlag(vm::psv::ptr<const char> pName, u32 attr, u32 initPattern, vm::psv::ptr<const SceKernelEventFlagOptParam> pOptParam)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
sceLibKernel.Error("sceKernelCreateEventFlag(pName=0x%x, attr=0x%x, initPattern=0x%x, pOptParam=0x%x)", pName, attr, initPattern, pOptParam);
|
||||
|
||||
std::shared_ptr<psv_event_flag_t> ef(new psv_event_flag_t(pName.get_ptr(), attr, initPattern));
|
||||
|
||||
const s32 id = g_psv_ef_list.add(ef);
|
||||
|
||||
return id;
|
||||
}
|
||||
|
||||
s32 sceKernelDeleteEventFlag(s32 evfId)
|
||||
|
@ -452,17 +459,10 @@ s32 sceKernelCreateSema(vm::psv::ptr<const char> pName, u32 attr, s32 initCount,
|
|||
{
|
||||
sceLibKernel.Error("sceKernelCreateSema(pName=0x%x, attr=0x%x, initCount=%d, maxCount=%d, pOptParam=0x%x)", pName, attr, initCount, maxCount, pOptParam);
|
||||
|
||||
std::shared_ptr<psv_sema_t> sema(new psv_sema_t);
|
||||
|
||||
strcpy_trunc(sema->name, pName.get_ptr());
|
||||
sema->attr = attr;
|
||||
sema->initCount = initCount;
|
||||
sema->maxCount = maxCount;
|
||||
std::shared_ptr<psv_sema_t> sema(new psv_sema_t(pName.get_ptr(), attr, initCount, maxCount));
|
||||
|
||||
const s32 id = g_psv_sema_list.add(sema);
|
||||
|
||||
sceLibKernel.Error("*** semaphore created -> id=0x%x", id);
|
||||
|
||||
return id;
|
||||
}
|
||||
|
||||
|
|
|
@ -25,7 +25,8 @@ namespace sce_libstdcxx_func
|
|||
}
|
||||
}
|
||||
|
||||
#define REG_FUNC(nid, name) reg_psv_func(nid, &sceLibstdcxx, #name, &sce_libstdcxx_func::name)
|
||||
// Attention: find and set correct original mangled name in third parameter, for example: REG_FUNC(0xAE71DC3, operator_new_nothrow, "_ZnwjRKSt9nothrow_t");
|
||||
#define REG_FUNC(nid, name, orig_name) reg_psv_func(nid, &sceLibstdcxx, orig_name, &sce_libstdcxx_func::name)
|
||||
|
||||
psv_log_base sceLibstdcxx("SceLibstdcxx", []()
|
||||
{
|
||||
|
@ -376,9 +377,9 @@ psv_log_base sceLibstdcxx("SceLibstdcxx", []()
|
|||
//REG_FUNC(0xE7889A5B, _Unwind_VRS_Get);
|
||||
//REG_FUNC(0xF106D050, _Unwind_VRS_Pop);
|
||||
//REG_FUNC(0x91CDA2F9, _Unwind_VRS_Set);
|
||||
REG_FUNC(0x173E7421, __aeabi_unwind_cpp_pr0);
|
||||
REG_FUNC(0x3C78DDE3, __aeabi_unwind_cpp_pr1);
|
||||
REG_FUNC(0xF95BDD36, __aeabi_unwind_cpp_pr2);
|
||||
REG_FUNC(0x173E7421, __aeabi_unwind_cpp_pr0, "__aeabi_unwind_cpp_pr0");
|
||||
REG_FUNC(0x3C78DDE3, __aeabi_unwind_cpp_pr1, "__aeabi_unwind_cpp_pr1");
|
||||
REG_FUNC(0xF95BDD36, __aeabi_unwind_cpp_pr2, "__aeabi_unwind_cpp_pr2");
|
||||
//REG_FUNC(0x8C93EFDA, __cxa_allocate_exception);
|
||||
//REG_FUNC(0x6165EE89, __cxa_begin_catch);
|
||||
//REG_FUNC(0x5D74285C, __cxa_begin_cleanup);
|
||||
|
|
90
rpcs3/Emu/ARMv7/Modules/scePerf.cpp
Normal file
90
rpcs3/Emu/ARMv7/Modules/scePerf.cpp
Normal file
|
@ -0,0 +1,90 @@
|
|||
#include "stdafx.h"
|
||||
#include "Emu/System.h"
|
||||
#include "Emu/ARMv7/PSVFuncList.h"
|
||||
|
||||
extern psv_log_base scePerf;
|
||||
|
||||
s32 scePerfArmPmonReset(s32 threadId)
|
||||
{
|
||||
scePerf.Todo("scePerfArmPmonReset(threadId=0x%x)", threadId);
|
||||
|
||||
return SCE_OK;
|
||||
}
|
||||
|
||||
s32 scePerfArmPmonSelectEvent(s32 threadId, u32 counter, u8 eventCode)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
|
||||
s32 scePerfArmPmonStart(s32 threadId)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
|
||||
s32 scePerfArmPmonStop(s32 threadId)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
|
||||
s32 scePerfArmPmonGetCounterValue(s32 threadId, u32 counter, vm::psv::ptr<u32> pValue)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
|
||||
s32 scePerfArmPmonSoftwareIncrement(u32 mask)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
|
||||
u64 scePerfGetTimebaseValue()
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
|
||||
u32 scePerfGetTimebaseFrequency()
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
|
||||
s32 _sceRazorCpuInit(vm::psv::ptr<const void> pBufferBase, u32 bufferSize, u32 numPerfCounters, vm::psv::ptr<vm::psv::ptr<u32>> psceRazorVars)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
|
||||
s32 sceRazorCpuPushMarker(vm::psv::ptr<const char> szLabel)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
|
||||
s32 sceRazorCpuPopMarker()
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
|
||||
s32 sceRazorCpuSync()
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
|
||||
#define REG_FUNC(nid, name) reg_psv_func(nid, &scePerf, #name, name)
|
||||
|
||||
psv_log_base scePerf("ScePerf", []()
|
||||
{
|
||||
scePerf.on_load = nullptr;
|
||||
scePerf.on_unload = nullptr;
|
||||
scePerf.on_stop = nullptr;
|
||||
|
||||
REG_FUNC(0x35151735, scePerfArmPmonReset);
|
||||
REG_FUNC(0x63CBEA8B, scePerfArmPmonSelectEvent);
|
||||
REG_FUNC(0xC9D969D5, scePerfArmPmonStart);
|
||||
REG_FUNC(0xD1A40F54, scePerfArmPmonStop);
|
||||
REG_FUNC(0x6132A497, scePerfArmPmonGetCounterValue);
|
||||
//REG_FUNC(0x12F6C708, scePerfArmPmonSetCounterValue);
|
||||
REG_FUNC(0x4264B4E7, scePerfArmPmonSoftwareIncrement);
|
||||
REG_FUNC(0xBD9615E5, scePerfGetTimebaseValue);
|
||||
REG_FUNC(0x78EA4FFB, scePerfGetTimebaseFrequency);
|
||||
REG_FUNC(0x7AD6AC30, _sceRazorCpuInit);
|
||||
REG_FUNC(0xC3DE4C0A, sceRazorCpuPushMarker);
|
||||
REG_FUNC(0xDC3224C3, sceRazorCpuPopMarker);
|
||||
REG_FUNC(0x4F1385E3, sceRazorCpuSync);
|
||||
});
|
39
rpcs3/Emu/ARMv7/Modules/sceSysmodule.cpp
Normal file
39
rpcs3/Emu/ARMv7/Modules/sceSysmodule.cpp
Normal file
|
@ -0,0 +1,39 @@
|
|||
#include "stdafx.h"
|
||||
#include "Emu/System.h"
|
||||
#include "Emu/ARMv7/PSVFuncList.h"
|
||||
|
||||
extern psv_log_base sceSysmodule;
|
||||
|
||||
s32 sceSysmoduleLoadModule(u16 id)
|
||||
{
|
||||
sceSysmodule.Todo("sceSysmoduleLoadModule(id=0x%04x)", id);
|
||||
|
||||
return SCE_OK; // loading succeeded
|
||||
}
|
||||
|
||||
s32 sceSysmoduleUnloadModule(u16 id)
|
||||
{
|
||||
sceSysmodule.Todo("sceSysmoduleUnloadModule(id=0x%04x)", id);
|
||||
|
||||
return SCE_OK; // unloading succeeded
|
||||
}
|
||||
|
||||
s32 sceSysmoduleIsLoaded(u16 id)
|
||||
{
|
||||
sceSysmodule.Todo("sceSysmoduleIsLoaded(id=0x%04x)", id);
|
||||
|
||||
return SCE_OK; // module is loaded
|
||||
}
|
||||
|
||||
#define REG_FUNC(nid, name) reg_psv_func(nid, &sceSysmodule, #name, name)
|
||||
|
||||
psv_log_base sceSysmodule("SceSysmodule", []()
|
||||
{
|
||||
sceSysmodule.on_load = nullptr;
|
||||
sceSysmodule.on_unload = nullptr;
|
||||
sceSysmodule.on_stop = nullptr;
|
||||
|
||||
REG_FUNC(0x79A0160A, sceSysmoduleLoadModule);
|
||||
REG_FUNC(0x31D87805, sceSysmoduleUnloadModule);
|
||||
REG_FUNC(0x53099B7A, sceSysmoduleIsLoaded);
|
||||
});
|
|
@ -48,6 +48,8 @@ extern psv_log_base sceLibc;
|
|||
extern psv_log_base sceLibm;
|
||||
extern psv_log_base sceLibstdcxx;
|
||||
extern psv_log_base sceLibKernel;
|
||||
extern psv_log_base sceSysmodule;
|
||||
extern psv_log_base scePerf;
|
||||
|
||||
void initialize_psv_modules()
|
||||
{
|
||||
|
@ -58,6 +60,8 @@ void initialize_psv_modules()
|
|||
g_psv_modules.push_back(&sceLibm);
|
||||
g_psv_modules.push_back(&sceLibstdcxx);
|
||||
g_psv_modules.push_back(&sceLibKernel);
|
||||
g_psv_modules.push_back(&sceSysmodule);
|
||||
g_psv_modules.push_back(&scePerf);
|
||||
|
||||
// setup special functions (without NIDs)
|
||||
psv_func unimplemented;
|
||||
|
@ -66,7 +70,7 @@ void initialize_psv_modules()
|
|||
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";
|
||||
throw "Unimplemented function";
|
||||
}));
|
||||
g_psv_func_list.push_back(unimplemented);
|
||||
|
||||
|
|
|
@ -3,11 +3,14 @@
|
|||
#include "Emu/ARMv7/PSVFuncList.h"
|
||||
#include "Emu/ARMv7/PSVObjectList.h"
|
||||
#include "Modules/sceLibKernel.h"
|
||||
#include "Modules/psv_sema_object.h"
|
||||
#include "Modules/psv_sema.h"
|
||||
#include "Modules/psv_event_flag.h"
|
||||
|
||||
psv_object_list_t<psv_sema_t, SCE_KERNEL_THREADMGR_UID_CLASS_SEMA> g_psv_sema_list;
|
||||
psv_object_list_t<psv_event_flag_t, SCE_KERNEL_THREADMGR_UID_CLASS_EVENT_FLAG> g_psv_ef_list;
|
||||
|
||||
void clear_all_psv_objects()
|
||||
{
|
||||
g_psv_sema_list.clear();
|
||||
g_psv_ef_list.clear();
|
||||
}
|
||||
|
|
|
@ -517,11 +517,12 @@ namespace vm
|
|||
ptr = vm::get_ptr<T>(addr);
|
||||
}
|
||||
|
||||
private:
|
||||
stack_allocation() = delete;
|
||||
stack_allocation(const stack_allocation& r) = delete;
|
||||
stack_allocation(stack_allocation&& r) = delete;
|
||||
stack_allocation& operator = (const stack_allocation& r) = delete;
|
||||
stack_allocation& operator = (stack_allocation&& r) = delete;
|
||||
stack_allocation(const stack_allocation&) = delete;
|
||||
stack_allocation(stack_allocation&&) = delete;
|
||||
stack_allocation& operator = (const stack_allocation&) = delete;
|
||||
stack_allocation& operator = (stack_allocation&&) = delete;
|
||||
|
||||
} const m_data;
|
||||
|
||||
|
|
|
@ -42,6 +42,14 @@ class PauseCallbackRegisterer
|
|||
CallbackManager& cb_manager;
|
||||
u64 cb_tag;
|
||||
|
||||
private:
|
||||
PauseCallbackRegisterer() = delete;
|
||||
PauseCallbackRegisterer(const PauseCallbackRegisterer& right) = delete;
|
||||
PauseCallbackRegisterer(PauseCallbackRegisterer&& right) = delete;
|
||||
|
||||
PauseCallbackRegisterer& operator =(const PauseCallbackRegisterer& right) = delete;
|
||||
PauseCallbackRegisterer& operator =(PauseCallbackRegisterer&& right) = delete;
|
||||
|
||||
public:
|
||||
PauseCallbackRegisterer(CallbackManager& cb_manager, const std::function<PauseResumeCB>& func)
|
||||
: cb_manager(cb_manager)
|
||||
|
@ -49,16 +57,8 @@ public:
|
|||
{
|
||||
}
|
||||
|
||||
PauseCallbackRegisterer() = delete;
|
||||
PauseCallbackRegisterer(const PauseCallbackRegisterer& right) = delete;
|
||||
PauseCallbackRegisterer(PauseCallbackRegisterer&& right) = delete;
|
||||
|
||||
~PauseCallbackRegisterer()
|
||||
{
|
||||
cb_manager.RemovePauseCallback(cb_tag);
|
||||
}
|
||||
|
||||
PauseCallbackRegisterer& operator =(const PauseCallbackRegisterer& right) = delete;
|
||||
PauseCallbackRegisterer& operator =(PauseCallbackRegisterer&& right) = delete;
|
||||
|
||||
};
|
||||
|
|
|
@ -56,11 +56,14 @@
|
|||
<ClCompile Include="Emu\ARMv7\ARMv7DisAsm.cpp" />
|
||||
<ClCompile Include="Emu\ARMv7\ARMv7Interpreter.cpp" />
|
||||
<ClCompile Include="Emu\ARMv7\ARMv7Thread.cpp" />
|
||||
<ClCompile Include="Emu\ARMv7\Modules\psv_sema_object.cpp" />
|
||||
<ClCompile Include="Emu\ARMv7\Modules\psv_event_flag.cpp" />
|
||||
<ClCompile Include="Emu\ARMv7\Modules\psv_sema.cpp" />
|
||||
<ClCompile Include="Emu\ARMv7\Modules\sceLibKernel.cpp" />
|
||||
<ClCompile Include="Emu\ARMv7\Modules\sceLibc.cpp" />
|
||||
<ClCompile Include="Emu\ARMv7\Modules\sceLibm.cpp" />
|
||||
<ClCompile Include="Emu\ARMv7\Modules\sceLibstdcxx.cpp" />
|
||||
<ClCompile Include="Emu\ARMv7\Modules\scePerf.cpp" />
|
||||
<ClCompile Include="Emu\ARMv7\Modules\sceSysmodule.cpp" />
|
||||
<ClCompile Include="Emu\ARMv7\PSVFuncList.cpp" />
|
||||
<ClCompile Include="Emu\ARMv7\PSVObjectList.cpp" />
|
||||
<ClCompile Include="Emu\Audio\AL\OpenALThread.cpp" />
|
||||
|
@ -276,7 +279,8 @@
|
|||
<ClInclude Include="Emu\ARMv7\ARMv7Interpreter.h" />
|
||||
<ClInclude Include="Emu\ARMv7\ARMv7Opcodes.h" />
|
||||
<ClInclude Include="Emu\ARMv7\ARMv7Thread.h" />
|
||||
<ClInclude Include="Emu\ARMv7\Modules\psv_sema_object.h" />
|
||||
<ClInclude Include="Emu\ARMv7\Modules\psv_event_flag.h" />
|
||||
<ClInclude Include="Emu\ARMv7\Modules\psv_sema.h" />
|
||||
<ClInclude Include="Emu\ARMv7\Modules\sceLibKernel.h" />
|
||||
<ClInclude Include="Emu\ARMv7\PSVFuncList.h" />
|
||||
<ClInclude Include="Emu\ARMv7\PSVObjectList.h" />
|
||||
|
|
|
@ -87,7 +87,7 @@
|
|||
<Filter Include="Emu\Audio\XAudio2">
|
||||
<UniqueIdentifier>{1d6abf72-0f18-43ec-9351-1fed1a3d1a1e}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Emu\CPU\ARMv7\Thread Manager">
|
||||
<Filter Include="Emu\CPU\ARMv7\Objects">
|
||||
<UniqueIdentifier>{368770cf-c8d9-4f4a-9ac3-5bdf48101ffe}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
|
@ -668,12 +668,21 @@
|
|||
<ClCompile Include="Emu\ARMv7\ARMv7Decoder.cpp">
|
||||
<Filter>Emu\CPU\ARMv7</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Emu\ARMv7\Modules\psv_sema_object.cpp">
|
||||
<Filter>Emu\CPU\ARMv7\Thread Manager</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Emu\ARMv7\PSVObjectList.cpp">
|
||||
<Filter>Emu\CPU\ARMv7</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Emu\ARMv7\Modules\psv_sema.cpp">
|
||||
<Filter>Emu\CPU\ARMv7\Objects</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Emu\ARMv7\Modules\psv_event_flag.cpp">
|
||||
<Filter>Emu\CPU\ARMv7\Objects</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Emu\ARMv7\Modules\sceSysmodule.cpp">
|
||||
<Filter>Emu\CPU\ARMv7\Modules</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Emu\ARMv7\Modules\scePerf.cpp">
|
||||
<Filter>Emu\CPU\ARMv7\Modules</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="Crypto\aes.h">
|
||||
|
@ -1303,11 +1312,14 @@
|
|||
<ClInclude Include="Emu\ARMv7\Modules\sceLibKernel.h">
|
||||
<Filter>Emu\CPU\ARMv7\Modules</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\ARMv7\Modules\psv_sema_object.h">
|
||||
<Filter>Emu\CPU\ARMv7\Thread Manager</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\ARMv7\PSVObjectList.h">
|
||||
<Filter>Emu\CPU\ARMv7</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\ARMv7\Modules\psv_event_flag.h">
|
||||
<Filter>Emu\CPU\ARMv7\Objects</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\ARMv7\Modules\psv_sema.h">
|
||||
<Filter>Emu\CPU\ARMv7\Objects</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
</Project>
|
Loading…
Add table
Reference in a new issue