mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-22 10:42:36 +01:00
Some drafts
This commit is contained in:
parent
5983813d12
commit
c1c586a072
13
rpcs3/Emu/ARMv7/Modules/psv_cond.cpp
Normal file
13
rpcs3/Emu/ARMv7/Modules/psv_cond.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_cond.h"
|
||||
|
||||
psv_cond_t::psv_cond_t(const char* name, u32 attr, s32 mutexId)
|
||||
: attr(attr)
|
||||
, mutexId(mutexId)
|
||||
{
|
||||
strcpy_trunc(this->name, name);
|
||||
}
|
24
rpcs3/Emu/ARMv7/Modules/psv_cond.h
Normal file
24
rpcs3/Emu/ARMv7/Modules/psv_cond.h
Normal file
@ -0,0 +1,24 @@
|
||||
#pragma once
|
||||
|
||||
struct psv_cond_t
|
||||
{
|
||||
char name[32];
|
||||
u32 attr;
|
||||
s32 mutexId;
|
||||
|
||||
private:
|
||||
psv_cond_t() = delete;
|
||||
psv_cond_t(const psv_cond_t&) = delete;
|
||||
psv_cond_t(psv_cond_t&&) = delete;
|
||||
|
||||
psv_cond_t& operator =(const psv_cond_t&) = delete;
|
||||
psv_cond_t& operator =(psv_cond_t&&) = delete;
|
||||
|
||||
public:
|
||||
psv_cond_t(const char* name, u32 attr, s32 mutexId);
|
||||
void on_init(s32 id) {}
|
||||
void on_stop() {}
|
||||
|
||||
};
|
||||
|
||||
extern psv_object_list_t<psv_cond_t, SCE_KERNEL_THREADMGR_UID_CLASS_COND> g_psv_cond_list;
|
13
rpcs3/Emu/ARMv7/Modules/psv_mutex.cpp
Normal file
13
rpcs3/Emu/ARMv7/Modules/psv_mutex.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_mutex.h"
|
||||
|
||||
psv_mutex_t::psv_mutex_t(const char* name, u32 attr, s32 count)
|
||||
: attr(attr)
|
||||
, count(count)
|
||||
{
|
||||
strcpy_trunc(this->name, name);
|
||||
}
|
24
rpcs3/Emu/ARMv7/Modules/psv_mutex.h
Normal file
24
rpcs3/Emu/ARMv7/Modules/psv_mutex.h
Normal file
@ -0,0 +1,24 @@
|
||||
#pragma once
|
||||
|
||||
struct psv_mutex_t
|
||||
{
|
||||
char name[32];
|
||||
u32 attr;
|
||||
s32 count;
|
||||
|
||||
private:
|
||||
psv_mutex_t() = delete;
|
||||
psv_mutex_t(const psv_mutex_t&) = delete;
|
||||
psv_mutex_t(psv_mutex_t&&) = delete;
|
||||
|
||||
psv_mutex_t& operator =(const psv_mutex_t&) = delete;
|
||||
psv_mutex_t& operator =(psv_mutex_t&&) = delete;
|
||||
|
||||
public:
|
||||
psv_mutex_t(const char* name, u32 attr, s32 count);
|
||||
void on_init(s32 id) {}
|
||||
void on_stop() {}
|
||||
|
||||
};
|
||||
|
||||
extern psv_object_list_t<psv_mutex_t, SCE_KERNEL_THREADMGR_UID_CLASS_MUTEX> g_psv_mutex_list;
|
@ -10,6 +10,8 @@
|
||||
#include "sceLibKernel.h"
|
||||
#include "psv_sema.h"
|
||||
#include "psv_event_flag.h"
|
||||
#include "psv_mutex.h"
|
||||
#include "psv_cond.h"
|
||||
|
||||
#define RETURN_ERROR(code) { Emu.Pause(); sceLibKernel.Error("%s() failed: %s", __FUNCTION__, #code); return code; }
|
||||
|
||||
@ -522,7 +524,13 @@ s32 sceKernelGetSemaInfo(s32 semaId, vm::psv::ptr<SceKernelSemaInfo> pInfo)
|
||||
|
||||
s32 sceKernelCreateMutex(vm::psv::ptr<const char> pName, u32 attr, s32 initCount, vm::psv::ptr<const SceKernelMutexOptParam> pOptParam)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
sceLibKernel.Error("sceKernelCreateMutex(pName=0x%x, attr=0x%x, initCount=%d, pOptParam=0x%x)", pName, attr, initCount, pOptParam);
|
||||
|
||||
std::shared_ptr<psv_mutex_t> mutex(new psv_mutex_t(pName.get_ptr(), attr, initCount));
|
||||
|
||||
const s32 id = g_psv_mutex_list.add(mutex);
|
||||
|
||||
return id;
|
||||
}
|
||||
|
||||
s32 sceKernelDeleteMutex(s32 mutexId)
|
||||
@ -616,7 +624,13 @@ s32 sceKernelGetLwMutexInfoById(s32 lwMutexId, vm::psv::ptr<SceKernelLwMutexInfo
|
||||
|
||||
s32 sceKernelCreateCond(vm::psv::ptr<const char> pName, u32 attr, s32 mutexId, vm::psv::ptr<const SceKernelCondOptParam> pOptParam)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
sceLibKernel.Error("sceKernelCreateCond(pName=0x%x, attr=0x%x, mutexId=0x%x, pOptParam=0x%x)", pName, attr, mutexId, pOptParam);
|
||||
|
||||
std::shared_ptr<psv_cond_t> cond(new psv_cond_t(pName.get_ptr(), attr, mutexId));
|
||||
|
||||
const s32 id = g_psv_cond_list.add(cond);
|
||||
|
||||
return id;
|
||||
}
|
||||
|
||||
s32 sceKernelDeleteCond(s32 condId)
|
||||
|
@ -134,6 +134,11 @@ s32 scePerfArmPmonSelectEvent(ARMv7Context& context, s32 threadId, u32 counter,
|
||||
|
||||
case SCE_PERF_ARM_PMON_BRANCH_MISPREDICT:
|
||||
case SCE_PERF_ARM_PMON_DCACHE_MISS:
|
||||
case SCE_PERF_ARM_PMON_DCACHE_STALL:
|
||||
case SCE_PERF_ARM_PMON_ICACHE_STALL:
|
||||
case SCE_PERF_ARM_PMON_DATA_EVICTION:
|
||||
case SCE_PERF_ARM_PMON_WRITE_STALL:
|
||||
case SCE_PERF_ARM_PMON_MAINTLB_STALL:
|
||||
case SCE_PERF_ARM_PMON_UNALIGNED:
|
||||
{
|
||||
value = 1; // these events will probably never be implemented
|
||||
|
@ -5,12 +5,18 @@
|
||||
#include "Modules/sceLibKernel.h"
|
||||
#include "Modules/psv_sema.h"
|
||||
#include "Modules/psv_event_flag.h"
|
||||
#include "Modules/psv_mutex.h"
|
||||
#include "Modules/psv_cond.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;
|
||||
psv_object_list_t<psv_mutex_t, SCE_KERNEL_THREADMGR_UID_CLASS_MUTEX> g_psv_mutex_list;
|
||||
psv_object_list_t<psv_cond_t, SCE_KERNEL_THREADMGR_UID_CLASS_COND> g_psv_cond_list;
|
||||
|
||||
void clear_all_psv_objects()
|
||||
{
|
||||
g_psv_sema_list.clear();
|
||||
g_psv_ef_list.clear();
|
||||
g_psv_mutex_list.clear();
|
||||
g_psv_cond_list.clear();
|
||||
}
|
||||
|
@ -56,7 +56,9 @@
|
||||
<ClCompile Include="Emu\ARMv7\ARMv7DisAsm.cpp" />
|
||||
<ClCompile Include="Emu\ARMv7\ARMv7Interpreter.cpp" />
|
||||
<ClCompile Include="Emu\ARMv7\ARMv7Thread.cpp" />
|
||||
<ClCompile Include="Emu\ARMv7\Modules\psv_cond.cpp" />
|
||||
<ClCompile Include="Emu\ARMv7\Modules\psv_event_flag.cpp" />
|
||||
<ClCompile Include="Emu\ARMv7\Modules\psv_mutex.cpp" />
|
||||
<ClCompile Include="Emu\ARMv7\Modules\psv_sema.cpp" />
|
||||
<ClCompile Include="Emu\ARMv7\Modules\sceAppMgr.cpp" />
|
||||
<ClCompile Include="Emu\ARMv7\Modules\sceAppUtil.cpp" />
|
||||
@ -334,7 +336,9 @@
|
||||
<ClInclude Include="Emu\ARMv7\ARMv7Interpreter.h" />
|
||||
<ClInclude Include="Emu\ARMv7\ARMv7Opcodes.h" />
|
||||
<ClInclude Include="Emu\ARMv7\ARMv7Thread.h" />
|
||||
<ClInclude Include="Emu\ARMv7\Modules\psv_cond.h" />
|
||||
<ClInclude Include="Emu\ARMv7\Modules\psv_event_flag.h" />
|
||||
<ClInclude Include="Emu\ARMv7\Modules\psv_mutex.h" />
|
||||
<ClInclude Include="Emu\ARMv7\Modules\psv_sema.h" />
|
||||
<ClInclude Include="Emu\ARMv7\Modules\sceAppUtil.h" />
|
||||
<ClInclude Include="Emu\ARMv7\Modules\sceGxm.h" />
|
||||
|
@ -583,7 +583,7 @@
|
||||
</ClCompile>
|
||||
<ClCompile Include="Emu\RSX\RSXDMA.cpp">
|
||||
<Filter>Emu\GPU\RSX</Filter>
|
||||
</ClCompile>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Emu\RSX\RSXTexture.cpp">
|
||||
<Filter>Emu\GPU\RSX</Filter>
|
||||
</ClCompile>
|
||||
@ -670,7 +670,7 @@
|
||||
</ClCompile>
|
||||
<ClCompile Include="Emu\ARMv7\ARMv7Decoder.cpp">
|
||||
<Filter>Emu\CPU\ARMv7</Filter>
|
||||
</ClCompile>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Emu\ARMv7\PSVObjectList.cpp">
|
||||
<Filter>Emu\CPU\ARMv7</Filter>
|
||||
</ClCompile>
|
||||
@ -696,7 +696,7 @@
|
||||
<Filter>Emu\CPU\ARMv7\Modules</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Emu\ARMv7\Modules\sceGxm.cpp">
|
||||
<Filter>Emu\CPU\ARMv7\Modules</Filter>
|
||||
<Filter>Emu\CPU\ARMv7\Modules</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Emu\ARMv7\Modules\sceAppMgr.cpp">
|
||||
<Filter>Emu\CPU\ARMv7\Modules</Filter>
|
||||
@ -848,6 +848,12 @@
|
||||
<ClCompile Include="Emu\ARMv7\Modules\sceSha.cpp">
|
||||
<Filter>Emu\CPU\ARMv7\Modules</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Emu\ARMv7\Modules\psv_mutex.cpp">
|
||||
<Filter>Emu\CPU\ARMv7\Objects</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Emu\ARMv7\Modules\psv_cond.cpp">
|
||||
<Filter>Emu\CPU\ARMv7\Objects</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="Crypto\aes.h">
|
||||
@ -1350,7 +1356,7 @@
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\RSX\RSXDMA.h">
|
||||
<Filter>Emu\GPU\RSX</Filter>
|
||||
</ClInclude>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\RSX\RSXFragmentProgram.h">
|
||||
<Filter>Emu\GPU\RSX</Filter>
|
||||
</ClInclude>
|
||||
@ -1479,7 +1485,7 @@
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\ARMv7\Modules\sceLibKernel.h">
|
||||
<Filter>Emu\CPU\ARMv7\Modules</Filter>
|
||||
</ClInclude>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\ARMv7\PSVObjectList.h">
|
||||
<Filter>Emu\CPU\ARMv7</Filter>
|
||||
</ClInclude>
|
||||
@ -1490,7 +1496,7 @@
|
||||
<Filter>Emu\CPU\ARMv7\Objects</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\ARMv7\Modules\sceGxm.h">
|
||||
<Filter>Emu\CPU\ARMv7\Modules</Filter>
|
||||
<Filter>Emu\CPU\ARMv7\Modules</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\ARMv7\Modules\sceAppUtil.h">
|
||||
<Filter>Emu\CPU\ARMv7\Modules</Filter>
|
||||
@ -1510,5 +1516,11 @@
|
||||
<ClInclude Include="Emu\ARMv7\Modules\sceNpCommon.h">
|
||||
<Filter>Emu\CPU\ARMv7\Modules</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\ARMv7\Modules\psv_mutex.h">
|
||||
<Filter>Emu\CPU\ARMv7\Objects</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\ARMv7\Modules\psv_cond.h">
|
||||
<Filter>Emu\CPU\ARMv7\Objects</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
</Project>
|
Loading…
Reference in New Issue
Block a user