mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-22 02:32:36 +01:00
Using vm::ps3 namespace moved in proper places
Various fixes
This commit is contained in:
parent
7eacfe19f6
commit
edb9595721
@ -1373,7 +1373,7 @@ void thread_t::set_name(const std::string& name)
|
||||
|
||||
thread_t::~thread_t()
|
||||
{
|
||||
if (m_state == TS_JOINABLE)
|
||||
if (m_state.exchange(TS_NON_EXISTENT) == TS_JOINABLE)
|
||||
{
|
||||
if (m_autojoin)
|
||||
{
|
||||
|
@ -15,7 +15,7 @@
|
||||
|
||||
#define RETURN_ERROR(code) { Emu.Pause(); sceLibKernel.Error("%s() failed: %s", __FUNCTION__, #code); return code; }
|
||||
|
||||
s32 sceKernelAllocMemBlock(vm::psv::ptr<const char> name, s32 type, u32 vsize, vm::psv::ptr<SceKernelAllocMemBlockOpt> pOpt)
|
||||
s32 sceKernelAllocMemBlock(vm::ptr<const char> name, s32 type, u32 vsize, vm::ptr<SceKernelAllocMemBlockOpt> pOpt)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
@ -25,24 +25,24 @@ s32 sceKernelFreeMemBlock(s32 uid)
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
|
||||
s32 sceKernelGetMemBlockBase(s32 uid, vm::psv::pptr<void> ppBase)
|
||||
s32 sceKernelGetMemBlockBase(s32 uid, vm::pptr<void> ppBase)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
|
||||
s32 sceKernelGetMemBlockInfoByAddr(vm::psv::ptr<void> vbase, vm::psv::ptr<SceKernelMemBlockInfo> pInfo)
|
||||
s32 sceKernelGetMemBlockInfoByAddr(vm::ptr<void> vbase, vm::ptr<SceKernelMemBlockInfo> pInfo)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
|
||||
s32 sceKernelCreateThread(
|
||||
vm::psv::ptr<const char> pName,
|
||||
vm::psv::ptr<SceKernelThreadEntry> entry,
|
||||
vm::ptr<const char> pName,
|
||||
vm::ptr<SceKernelThreadEntry> entry,
|
||||
s32 initPriority,
|
||||
u32 stackSize,
|
||||
u32 attr,
|
||||
s32 cpuAffinityMask,
|
||||
vm::psv::ptr<const SceKernelThreadOptParam> pOptParam)
|
||||
vm::ptr<const SceKernelThreadOptParam> pOptParam)
|
||||
{
|
||||
sceLibKernel.Warning("sceKernelCreateThread(pName=*0x%x, entry=*0x%x, initPriority=%d, stackSize=0x%x, attr=0x%x, cpuAffinityMask=0x%x, pOptParam=*0x%x)",
|
||||
pName, entry, initPriority, stackSize, attr, cpuAffinityMask, pOptParam);
|
||||
@ -60,7 +60,7 @@ s32 sceKernelCreateThread(
|
||||
return armv7.GetId();
|
||||
}
|
||||
|
||||
s32 sceKernelStartThread(s32 threadId, u32 argSize, vm::psv::ptr<const void> pArgBlock)
|
||||
s32 sceKernelStartThread(s32 threadId, u32 argSize, vm::ptr<const void> pArgBlock)
|
||||
{
|
||||
sceLibKernel.Warning("sceKernelStartThread(threadId=0x%x, argSize=0x%x, pArgBlock=*0x%x)", threadId, argSize, pArgBlock);
|
||||
|
||||
@ -183,7 +183,7 @@ s32 sceKernelChangeCurrentThreadAttr(u32 clearAttr, u32 setAttr)
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
|
||||
s32 sceKernelGetThreadExitStatus(s32 threadId, vm::psv::ptr<s32> pExitStatus)
|
||||
s32 sceKernelGetThreadExitStatus(s32 threadId, vm::ptr<s32> pExitStatus)
|
||||
{
|
||||
sceLibKernel.Todo("sceKernelGetThreadExitStatus(threadId=0x%x, pExitStatus=*0x%x)", threadId, pExitStatus);
|
||||
|
||||
@ -204,21 +204,21 @@ s32 sceKernelCheckWaitableStatus()
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
|
||||
s32 sceKernelGetThreadInfo(s32 threadId, vm::psv::ptr<SceKernelThreadInfo> pInfo)
|
||||
s32 sceKernelGetThreadInfo(s32 threadId, vm::ptr<SceKernelThreadInfo> pInfo)
|
||||
{
|
||||
sceLibKernel.Todo("sceKernelGetThreadInfo(threadId=0x%x, pInfo=*0x%x)", threadId, pInfo);
|
||||
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
|
||||
s32 sceKernelGetThreadRunStatus(vm::psv::ptr<SceKernelThreadRunStatus> pStatus)
|
||||
s32 sceKernelGetThreadRunStatus(vm::ptr<SceKernelThreadRunStatus> pStatus)
|
||||
{
|
||||
sceLibKernel.Todo("sceKernelGetThreadRunStatus(pStatus=*0x%x)", pStatus);
|
||||
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
|
||||
s32 sceKernelGetSystemInfo(vm::psv::ptr<SceKernelSystemInfo> pInfo)
|
||||
s32 sceKernelGetSystemInfo(vm::ptr<SceKernelSystemInfo> pInfo)
|
||||
{
|
||||
sceLibKernel.Todo("sceKernelGetSystemInfo(pInfo=*0x%x)", pInfo);
|
||||
|
||||
@ -260,7 +260,7 @@ s32 sceKernelDelayThreadCB(u32 usec)
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
|
||||
s32 sceKernelWaitThreadEnd(s32 threadId, vm::psv::ptr<s32> pExitStatus, vm::psv::ptr<u32> pTimeout)
|
||||
s32 sceKernelWaitThreadEnd(s32 threadId, vm::ptr<s32> pExitStatus, vm::ptr<u32> pTimeout)
|
||||
{
|
||||
sceLibKernel.Warning("sceKernelWaitThreadEnd(threadId=0x%x, pExitStatus=*0x%x, pTimeout=*0x%x)", threadId, pExitStatus, pTimeout);
|
||||
|
||||
@ -295,7 +295,7 @@ s32 sceKernelWaitThreadEnd(s32 threadId, vm::psv::ptr<s32> pExitStatus, vm::psv:
|
||||
return SCE_OK;
|
||||
}
|
||||
|
||||
s32 sceKernelWaitThreadEndCB(s32 threadId, vm::psv::ptr<s32> pExitStatus, vm::psv::ptr<u32> pTimeout)
|
||||
s32 sceKernelWaitThreadEndCB(s32 threadId, vm::ptr<s32> pExitStatus, vm::ptr<u32> pTimeout)
|
||||
{
|
||||
sceLibKernel.Todo("sceKernelWaitThreadEndCB(threadId=0x%x, pExitStatus=*0x%x, pTimeout=*0x%x)", threadId, pExitStatus, pTimeout);
|
||||
|
||||
@ -304,7 +304,7 @@ s32 sceKernelWaitThreadEndCB(s32 threadId, vm::psv::ptr<s32> pExitStatus, vm::ps
|
||||
|
||||
// Callback functions
|
||||
|
||||
s32 sceKernelCreateCallback(vm::psv::ptr<const char> pName, u32 attr, vm::psv::ptr<SceKernelCallbackFunction> callbackFunc, vm::psv::ptr<void> pCommon)
|
||||
s32 sceKernelCreateCallback(vm::ptr<const char> pName, u32 attr, vm::ptr<SceKernelCallbackFunction> callbackFunc, vm::ptr<void> pCommon)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
@ -334,7 +334,7 @@ s32 sceKernelCheckCallback()
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
|
||||
s32 sceKernelGetCallbackInfo(s32 callbackId, vm::psv::ptr<SceKernelCallbackInfo> pInfo)
|
||||
s32 sceKernelGetCallbackInfo(s32 callbackId, vm::ptr<SceKernelCallbackInfo> pInfo)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
@ -356,44 +356,44 @@ s32 sceKernelUnregisterCallbackFromEventAll(s32 eventId)
|
||||
|
||||
// Event functions
|
||||
|
||||
s32 sceKernelWaitEvent(s32 eventId, u32 waitPattern, vm::psv::ptr<u32> pResultPattern, vm::psv::ptr<u64> pUserData, vm::psv::ptr<u32> pTimeout)
|
||||
s32 sceKernelWaitEvent(s32 eventId, u32 waitPattern, vm::ptr<u32> pResultPattern, vm::ptr<u64> pUserData, vm::ptr<u32> pTimeout)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
|
||||
s32 sceKernelWaitEventCB(s32 eventId, u32 waitPattern, vm::psv::ptr<u32> pResultPattern, vm::psv::ptr<u64> pUserData, vm::psv::ptr<u32> pTimeout)
|
||||
s32 sceKernelWaitEventCB(s32 eventId, u32 waitPattern, vm::ptr<u32> pResultPattern, vm::ptr<u64> pUserData, vm::ptr<u32> pTimeout)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
|
||||
s32 sceKernelPollEvent(s32 eventId, u32 bitPattern, vm::psv::ptr<u32> pResultPattern, vm::psv::ptr<u64> pUserData)
|
||||
s32 sceKernelPollEvent(s32 eventId, u32 bitPattern, vm::ptr<u32> pResultPattern, vm::ptr<u64> pUserData)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
|
||||
s32 sceKernelCancelEvent(s32 eventId, vm::psv::ptr<s32> pNumWaitThreads)
|
||||
s32 sceKernelCancelEvent(s32 eventId, vm::ptr<s32> pNumWaitThreads)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
|
||||
s32 sceKernelGetEventInfo(s32 eventId, vm::psv::ptr<SceKernelEventInfo> pInfo)
|
||||
s32 sceKernelGetEventInfo(s32 eventId, vm::ptr<SceKernelEventInfo> pInfo)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
|
||||
s32 sceKernelWaitMultipleEvents(vm::psv::ptr<SceKernelWaitEvent> pWaitEventList, s32 numEvents, u32 waitMode, vm::psv::ptr<SceKernelResultEvent> pResultEventList, vm::psv::ptr<u32> pTimeout)
|
||||
s32 sceKernelWaitMultipleEvents(vm::ptr<SceKernelWaitEvent> pWaitEventList, s32 numEvents, u32 waitMode, vm::ptr<SceKernelResultEvent> pResultEventList, vm::ptr<u32> pTimeout)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
|
||||
s32 sceKernelWaitMultipleEventsCB(vm::psv::ptr<SceKernelWaitEvent> pWaitEventList, s32 numEvents, u32 waitMode, vm::psv::ptr<SceKernelResultEvent> pResultEventList, vm::psv::ptr<u32> pTimeout)
|
||||
s32 sceKernelWaitMultipleEventsCB(vm::ptr<SceKernelWaitEvent> pWaitEventList, s32 numEvents, u32 waitMode, vm::ptr<SceKernelResultEvent> pResultEventList, vm::ptr<u32> pTimeout)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
|
||||
// Event flag functions
|
||||
|
||||
s32 sceKernelCreateEventFlag(vm::psv::ptr<const char> pName, u32 attr, u32 initPattern, vm::psv::ptr<const SceKernelEventFlagOptParam> pOptParam)
|
||||
s32 sceKernelCreateEventFlag(vm::ptr<const char> pName, u32 attr, u32 initPattern, vm::ptr<const SceKernelEventFlagOptParam> pOptParam)
|
||||
{
|
||||
sceLibKernel.Error("sceKernelCreateEventFlag(pName=*0x%x, attr=0x%x, initPattern=0x%x, pOptParam=*0x%x)", pName, attr, initPattern, pOptParam);
|
||||
|
||||
@ -410,7 +410,7 @@ s32 sceKernelDeleteEventFlag(s32 evfId)
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
|
||||
s32 sceKernelOpenEventFlag(vm::psv::ptr<const char> pName)
|
||||
s32 sceKernelOpenEventFlag(vm::ptr<const char> pName)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
@ -420,17 +420,17 @@ s32 sceKernelCloseEventFlag(s32 evfId)
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
|
||||
s32 sceKernelWaitEventFlag(s32 evfId, u32 bitPattern, u32 waitMode, vm::psv::ptr<u32> pResultPat, vm::psv::ptr<u32> pTimeout)
|
||||
s32 sceKernelWaitEventFlag(s32 evfId, u32 bitPattern, u32 waitMode, vm::ptr<u32> pResultPat, vm::ptr<u32> pTimeout)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
|
||||
s32 sceKernelWaitEventFlagCB(s32 evfId, u32 bitPattern, u32 waitMode, vm::psv::ptr<u32> pResultPat, vm::psv::ptr<u32> pTimeout)
|
||||
s32 sceKernelWaitEventFlagCB(s32 evfId, u32 bitPattern, u32 waitMode, vm::ptr<u32> pResultPat, vm::ptr<u32> pTimeout)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
|
||||
s32 sceKernelPollEventFlag(s32 evfId, u32 bitPattern, u32 waitMode, vm::psv::ptr<u32> pResultPat)
|
||||
s32 sceKernelPollEventFlag(s32 evfId, u32 bitPattern, u32 waitMode, vm::ptr<u32> pResultPat)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
@ -445,19 +445,19 @@ s32 sceKernelClearEventFlag(s32 evfId, u32 bitPattern)
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
|
||||
s32 sceKernelCancelEventFlag(s32 evfId, u32 setPattern, vm::psv::ptr<s32> pNumWaitThreads)
|
||||
s32 sceKernelCancelEventFlag(s32 evfId, u32 setPattern, vm::ptr<s32> pNumWaitThreads)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
|
||||
s32 sceKernelGetEventFlagInfo(s32 evfId, vm::psv::ptr<SceKernelEventFlagInfo> pInfo)
|
||||
s32 sceKernelGetEventFlagInfo(s32 evfId, vm::ptr<SceKernelEventFlagInfo> pInfo)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
|
||||
// Semaphore functions
|
||||
|
||||
s32 sceKernelCreateSema(vm::psv::ptr<const char> pName, u32 attr, s32 initCount, s32 maxCount, vm::psv::ptr<const SceKernelSemaOptParam> pOptParam)
|
||||
s32 sceKernelCreateSema(vm::ptr<const char> pName, u32 attr, s32 initCount, s32 maxCount, vm::ptr<const SceKernelSemaOptParam> pOptParam)
|
||||
{
|
||||
sceLibKernel.Error("sceKernelCreateSema(pName=*0x%x, attr=0x%x, initCount=%d, maxCount=%d, pOptParam=*0x%x)", pName, attr, initCount, maxCount, pOptParam);
|
||||
|
||||
@ -488,7 +488,7 @@ s32 sceKernelDeleteSema(s32 semaId)
|
||||
return SCE_OK;
|
||||
}
|
||||
|
||||
s32 sceKernelOpenSema(vm::psv::ptr<const char> pName)
|
||||
s32 sceKernelOpenSema(vm::ptr<const char> pName)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
@ -498,7 +498,7 @@ s32 sceKernelCloseSema(s32 semaId)
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
|
||||
s32 sceKernelWaitSema(s32 semaId, s32 needCount, vm::psv::ptr<u32> pTimeout)
|
||||
s32 sceKernelWaitSema(s32 semaId, s32 needCount, vm::ptr<u32> pTimeout)
|
||||
{
|
||||
sceLibKernel.Error("sceKernelWaitSema(semaId=0x%x, needCount=%d, pTimeout=*0x%x)", semaId, needCount, pTimeout);
|
||||
|
||||
@ -514,7 +514,7 @@ s32 sceKernelWaitSema(s32 semaId, s32 needCount, vm::psv::ptr<u32> pTimeout)
|
||||
return SCE_OK;
|
||||
}
|
||||
|
||||
s32 sceKernelWaitSemaCB(s32 semaId, s32 needCount, vm::psv::ptr<u32> pTimeout)
|
||||
s32 sceKernelWaitSemaCB(s32 semaId, s32 needCount, vm::ptr<u32> pTimeout)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
@ -529,19 +529,19 @@ s32 sceKernelSignalSema(s32 semaId, s32 signalCount)
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
|
||||
s32 sceKernelCancelSema(s32 semaId, s32 setCount, vm::psv::ptr<s32> pNumWaitThreads)
|
||||
s32 sceKernelCancelSema(s32 semaId, s32 setCount, vm::ptr<s32> pNumWaitThreads)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
|
||||
s32 sceKernelGetSemaInfo(s32 semaId, vm::psv::ptr<SceKernelSemaInfo> pInfo)
|
||||
s32 sceKernelGetSemaInfo(s32 semaId, vm::ptr<SceKernelSemaInfo> pInfo)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
|
||||
// Mutex functions
|
||||
|
||||
s32 sceKernelCreateMutex(vm::psv::ptr<const char> pName, u32 attr, s32 initCount, vm::psv::ptr<const SceKernelMutexOptParam> pOptParam)
|
||||
s32 sceKernelCreateMutex(vm::ptr<const char> pName, u32 attr, s32 initCount, vm::ptr<const SceKernelMutexOptParam> pOptParam)
|
||||
{
|
||||
sceLibKernel.Error("sceKernelCreateMutex(pName=*0x%x, attr=0x%x, initCount=%d, pOptParam=*0x%x)", pName, attr, initCount, pOptParam);
|
||||
|
||||
@ -558,7 +558,7 @@ s32 sceKernelDeleteMutex(s32 mutexId)
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
|
||||
s32 sceKernelOpenMutex(vm::psv::ptr<const char> pName)
|
||||
s32 sceKernelOpenMutex(vm::ptr<const char> pName)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
@ -568,12 +568,12 @@ s32 sceKernelCloseMutex(s32 mutexId)
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
|
||||
s32 sceKernelLockMutex(s32 mutexId, s32 lockCount, vm::psv::ptr<u32> pTimeout)
|
||||
s32 sceKernelLockMutex(s32 mutexId, s32 lockCount, vm::ptr<u32> pTimeout)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
|
||||
s32 sceKernelLockMutexCB(s32 mutexId, s32 lockCount, vm::psv::ptr<u32> pTimeout)
|
||||
s32 sceKernelLockMutexCB(s32 mutexId, s32 lockCount, vm::ptr<u32> pTimeout)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
@ -588,61 +588,61 @@ s32 sceKernelUnlockMutex(s32 mutexId, s32 unlockCount)
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
|
||||
s32 sceKernelCancelMutex(s32 mutexId, s32 newCount, vm::psv::ptr<s32> pNumWaitThreads)
|
||||
s32 sceKernelCancelMutex(s32 mutexId, s32 newCount, vm::ptr<s32> pNumWaitThreads)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
|
||||
s32 sceKernelGetMutexInfo(s32 mutexId, vm::psv::ptr<SceKernelMutexInfo> pInfo)
|
||||
s32 sceKernelGetMutexInfo(s32 mutexId, vm::ptr<SceKernelMutexInfo> pInfo)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
|
||||
// Lightweight mutex functions
|
||||
|
||||
s32 sceKernelCreateLwMutex(vm::psv::ptr<SceKernelLwMutexWork> pWork, vm::psv::ptr<const char> pName, u32 attr, s32 initCount, vm::psv::ptr<const SceKernelLwMutexOptParam> pOptParam)
|
||||
s32 sceKernelCreateLwMutex(vm::ptr<SceKernelLwMutexWork> pWork, vm::ptr<const char> pName, u32 attr, s32 initCount, vm::ptr<const SceKernelLwMutexOptParam> pOptParam)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
|
||||
s32 sceKernelDeleteLwMutex(vm::psv::ptr<SceKernelLwMutexWork> pWork)
|
||||
s32 sceKernelDeleteLwMutex(vm::ptr<SceKernelLwMutexWork> pWork)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
|
||||
s32 sceKernelLockLwMutex(vm::psv::ptr<SceKernelLwMutexWork> pWork, s32 lockCount, vm::psv::ptr<u32> pTimeout)
|
||||
s32 sceKernelLockLwMutex(vm::ptr<SceKernelLwMutexWork> pWork, s32 lockCount, vm::ptr<u32> pTimeout)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
|
||||
s32 sceKernelLockLwMutexCB(vm::psv::ptr<SceKernelLwMutexWork> pWork, s32 lockCount, vm::psv::ptr<u32> pTimeout)
|
||||
s32 sceKernelLockLwMutexCB(vm::ptr<SceKernelLwMutexWork> pWork, s32 lockCount, vm::ptr<u32> pTimeout)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
|
||||
s32 sceKernelTryLockLwMutex(vm::psv::ptr<SceKernelLwMutexWork> pWork, s32 lockCount)
|
||||
s32 sceKernelTryLockLwMutex(vm::ptr<SceKernelLwMutexWork> pWork, s32 lockCount)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
|
||||
s32 sceKernelUnlockLwMutex(vm::psv::ptr<SceKernelLwMutexWork> pWork, s32 unlockCount)
|
||||
s32 sceKernelUnlockLwMutex(vm::ptr<SceKernelLwMutexWork> pWork, s32 unlockCount)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
|
||||
s32 sceKernelGetLwMutexInfo(vm::psv::ptr<SceKernelLwMutexWork> pWork, vm::psv::ptr<SceKernelLwMutexInfo> pInfo)
|
||||
s32 sceKernelGetLwMutexInfo(vm::ptr<SceKernelLwMutexWork> pWork, vm::ptr<SceKernelLwMutexInfo> pInfo)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
|
||||
s32 sceKernelGetLwMutexInfoById(s32 lwMutexId, vm::psv::ptr<SceKernelLwMutexInfo> pInfo)
|
||||
s32 sceKernelGetLwMutexInfoById(s32 lwMutexId, vm::ptr<SceKernelLwMutexInfo> pInfo)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
|
||||
// Condition variable functions
|
||||
|
||||
s32 sceKernelCreateCond(vm::psv::ptr<const char> pName, u32 attr, s32 mutexId, vm::psv::ptr<const SceKernelCondOptParam> pOptParam)
|
||||
s32 sceKernelCreateCond(vm::ptr<const char> pName, u32 attr, s32 mutexId, vm::ptr<const SceKernelCondOptParam> pOptParam)
|
||||
{
|
||||
sceLibKernel.Error("sceKernelCreateCond(pName=*0x%x, attr=0x%x, mutexId=0x%x, pOptParam=*0x%x)", pName, attr, mutexId, pOptParam);
|
||||
|
||||
@ -659,7 +659,7 @@ s32 sceKernelDeleteCond(s32 condId)
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
|
||||
s32 sceKernelOpenCond(vm::psv::ptr<const char> pName)
|
||||
s32 sceKernelOpenCond(vm::ptr<const char> pName)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
@ -669,12 +669,12 @@ s32 sceKernelCloseCond(s32 condId)
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
|
||||
s32 sceKernelWaitCond(s32 condId, vm::psv::ptr<u32> pTimeout)
|
||||
s32 sceKernelWaitCond(s32 condId, vm::ptr<u32> pTimeout)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
|
||||
s32 sceKernelWaitCondCB(s32 condId, vm::psv::ptr<u32> pTimeout)
|
||||
s32 sceKernelWaitCondCB(s32 condId, vm::ptr<u32> pTimeout)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
@ -694,61 +694,61 @@ s32 sceKernelSignalCondTo(s32 condId, s32 threadId)
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
|
||||
s32 sceKernelGetCondInfo(s32 condId, vm::psv::ptr<SceKernelCondInfo> pInfo)
|
||||
s32 sceKernelGetCondInfo(s32 condId, vm::ptr<SceKernelCondInfo> pInfo)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
|
||||
// Lightweight condition variable functions
|
||||
|
||||
s32 sceKernelCreateLwCond(vm::psv::ptr<SceKernelLwCondWork> pWork, vm::psv::ptr<const char> pName, u32 attr, vm::psv::ptr<SceKernelLwMutexWork> pLwMutex, vm::psv::ptr<const SceKernelLwCondOptParam> pOptParam)
|
||||
s32 sceKernelCreateLwCond(vm::ptr<SceKernelLwCondWork> pWork, vm::ptr<const char> pName, u32 attr, vm::ptr<SceKernelLwMutexWork> pLwMutex, vm::ptr<const SceKernelLwCondOptParam> pOptParam)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
|
||||
s32 sceKernelDeleteLwCond(vm::psv::ptr<SceKernelLwCondWork> pWork)
|
||||
s32 sceKernelDeleteLwCond(vm::ptr<SceKernelLwCondWork> pWork)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
|
||||
s32 sceKernelWaitLwCond(vm::psv::ptr<SceKernelLwCondWork> pWork, vm::psv::ptr<u32> pTimeout)
|
||||
s32 sceKernelWaitLwCond(vm::ptr<SceKernelLwCondWork> pWork, vm::ptr<u32> pTimeout)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
|
||||
s32 sceKernelWaitLwCondCB(vm::psv::ptr<SceKernelLwCondWork> pWork, vm::psv::ptr<u32> pTimeout)
|
||||
s32 sceKernelWaitLwCondCB(vm::ptr<SceKernelLwCondWork> pWork, vm::ptr<u32> pTimeout)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
|
||||
s32 sceKernelSignalLwCond(vm::psv::ptr<SceKernelLwCondWork> pWork)
|
||||
s32 sceKernelSignalLwCond(vm::ptr<SceKernelLwCondWork> pWork)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
|
||||
s32 sceKernelSignalLwCondAll(vm::psv::ptr<SceKernelLwCondWork> pWork)
|
||||
s32 sceKernelSignalLwCondAll(vm::ptr<SceKernelLwCondWork> pWork)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
|
||||
s32 sceKernelSignalLwCondTo(vm::psv::ptr<SceKernelLwCondWork> pWork, s32 threadId)
|
||||
s32 sceKernelSignalLwCondTo(vm::ptr<SceKernelLwCondWork> pWork, s32 threadId)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
|
||||
s32 sceKernelGetLwCondInfo(vm::psv::ptr<SceKernelLwCondWork> pWork, vm::psv::ptr<SceKernelLwCondInfo> pInfo)
|
||||
s32 sceKernelGetLwCondInfo(vm::ptr<SceKernelLwCondWork> pWork, vm::ptr<SceKernelLwCondInfo> pInfo)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
|
||||
s32 sceKernelGetLwCondInfoById(s32 lwCondId, vm::psv::ptr<SceKernelLwCondInfo> pInfo)
|
||||
s32 sceKernelGetLwCondInfoById(s32 lwCondId, vm::ptr<SceKernelLwCondInfo> pInfo)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
|
||||
// Time functions
|
||||
|
||||
s32 sceKernelGetSystemTime(vm::psv::ptr<SceKernelSysClock> pClock)
|
||||
s32 sceKernelGetSystemTime(vm::ptr<SceKernelSysClock> pClock)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
@ -765,7 +765,7 @@ u32 sceKernelGetSystemTimeLow()
|
||||
|
||||
// Timer functions
|
||||
|
||||
s32 sceKernelCreateTimer(vm::psv::ptr<const char> pName, u32 attr, vm::psv::ptr<const SceKernelTimerOptParam> pOptParam)
|
||||
s32 sceKernelCreateTimer(vm::ptr<const char> pName, u32 attr, vm::ptr<const SceKernelTimerOptParam> pOptParam)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
@ -775,7 +775,7 @@ s32 sceKernelDeleteTimer(s32 timerId)
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
|
||||
s32 sceKernelOpenTimer(vm::psv::ptr<const char> pName)
|
||||
s32 sceKernelOpenTimer(vm::ptr<const char> pName)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
@ -795,7 +795,7 @@ s32 sceKernelStopTimer(s32 timerId)
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
|
||||
s32 sceKernelGetTimerBase(s32 timerId, vm::psv::ptr<SceKernelSysClock> pBase)
|
||||
s32 sceKernelGetTimerBase(s32 timerId, vm::ptr<SceKernelSysClock> pBase)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
@ -805,7 +805,7 @@ u64 sceKernelGetTimerBaseWide(s32 timerId)
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
|
||||
s32 sceKernelGetTimerTime(s32 timerId, vm::psv::ptr<SceKernelSysClock> pClock)
|
||||
s32 sceKernelGetTimerTime(s32 timerId, vm::ptr<SceKernelSysClock> pClock)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
@ -815,7 +815,7 @@ u64 sceKernelGetTimerTimeWide(s32 timerId)
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
|
||||
s32 sceKernelSetTimerTime(s32 timerId, vm::psv::ptr<SceKernelSysClock> pClock)
|
||||
s32 sceKernelSetTimerTime(s32 timerId, vm::ptr<SceKernelSysClock> pClock)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
@ -825,24 +825,24 @@ u64 sceKernelSetTimerTimeWide(s32 timerId, u64 clock)
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
|
||||
s32 sceKernelSetTimerEvent(s32 timerId, s32 type, vm::psv::ptr<SceKernelSysClock> pInterval, s32 fRepeat)
|
||||
s32 sceKernelSetTimerEvent(s32 timerId, s32 type, vm::ptr<SceKernelSysClock> pInterval, s32 fRepeat)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
|
||||
s32 sceKernelCancelTimer(s32 timerId, vm::psv::ptr<s32> pNumWaitThreads)
|
||||
s32 sceKernelCancelTimer(s32 timerId, vm::ptr<s32> pNumWaitThreads)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
|
||||
s32 sceKernelGetTimerInfo(s32 timerId, vm::psv::ptr<SceKernelTimerInfo> pInfo)
|
||||
s32 sceKernelGetTimerInfo(s32 timerId, vm::ptr<SceKernelTimerInfo> pInfo)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
|
||||
// Reader/writer lock functions
|
||||
|
||||
s32 sceKernelCreateRWLock(vm::psv::ptr<const char> pName, u32 attr, vm::psv::ptr<const SceKernelRWLockOptParam> pOptParam)
|
||||
s32 sceKernelCreateRWLock(vm::ptr<const char> pName, u32 attr, vm::ptr<const SceKernelRWLockOptParam> pOptParam)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
@ -852,7 +852,7 @@ s32 sceKernelDeleteRWLock(s32 rwLockId)
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
|
||||
s32 sceKernelOpenRWLock(vm::psv::ptr<const char> pName)
|
||||
s32 sceKernelOpenRWLock(vm::ptr<const char> pName)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
@ -862,12 +862,12 @@ s32 sceKernelCloseRWLock(s32 rwLockId)
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
|
||||
s32 sceKernelLockReadRWLock(s32 rwLockId, vm::psv::ptr<u32> pTimeout)
|
||||
s32 sceKernelLockReadRWLock(s32 rwLockId, vm::ptr<u32> pTimeout)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
|
||||
s32 sceKernelLockReadRWLockCB(s32 rwLockId, vm::psv::ptr<u32> pTimeout)
|
||||
s32 sceKernelLockReadRWLockCB(s32 rwLockId, vm::ptr<u32> pTimeout)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
@ -882,12 +882,12 @@ s32 sceKernelUnlockReadRWLock(s32 rwLockId)
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
|
||||
s32 sceKernelLockWriteRWLock(s32 rwLockId, vm::psv::ptr<u32> pTimeout)
|
||||
s32 sceKernelLockWriteRWLock(s32 rwLockId, vm::ptr<u32> pTimeout)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
|
||||
s32 sceKernelLockWriteRWLockCB(s32 rwLockId, vm::psv::ptr<u32> pTimeout)
|
||||
s32 sceKernelLockWriteRWLockCB(s32 rwLockId, vm::ptr<u32> pTimeout)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
@ -902,49 +902,49 @@ s32 sceKernelUnlockWriteRWLock(s32 rwLockId)
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
|
||||
s32 sceKernelCancelRWLock(s32 rwLockId, vm::psv::ptr<s32> pNumReadWaitThreads, vm::psv::ptr<s32> pNumWriteWaitThreads, s32 flag)
|
||||
s32 sceKernelCancelRWLock(s32 rwLockId, vm::ptr<s32> pNumReadWaitThreads, vm::ptr<s32> pNumWriteWaitThreads, s32 flag)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
|
||||
s32 sceKernelGetRWLockInfo(s32 rwLockId, vm::psv::ptr<SceKernelRWLockInfo> pInfo)
|
||||
s32 sceKernelGetRWLockInfo(s32 rwLockId, vm::ptr<SceKernelRWLockInfo> pInfo)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
|
||||
// IO/File functions
|
||||
|
||||
s32 sceIoRemove(vm::psv::ptr<const char> filename)
|
||||
s32 sceIoRemove(vm::ptr<const char> filename)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
|
||||
s32 sceIoMkdir(vm::psv::ptr<const char> dirname, s32 mode)
|
||||
s32 sceIoMkdir(vm::ptr<const char> dirname, s32 mode)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
|
||||
s32 sceIoRmdir(vm::psv::ptr<const char> dirname)
|
||||
s32 sceIoRmdir(vm::ptr<const char> dirname)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
|
||||
s32 sceIoRename(vm::psv::ptr<const char> oldname, vm::psv::ptr<const char> newname)
|
||||
s32 sceIoRename(vm::ptr<const char> oldname, vm::ptr<const char> newname)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
|
||||
s32 sceIoDevctl(vm::psv::ptr<const char> devname, s32 cmd, vm::psv::ptr<const void> arg, u32 arglen, vm::psv::ptr<void> bufp, u32 buflen)
|
||||
s32 sceIoDevctl(vm::ptr<const char> devname, s32 cmd, vm::ptr<const void> arg, u32 arglen, vm::ptr<void> bufp, u32 buflen)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
|
||||
s32 sceIoSync(vm::psv::ptr<const char> devname, s32 flag)
|
||||
s32 sceIoSync(vm::ptr<const char> devname, s32 flag)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
|
||||
s32 sceIoOpen(vm::psv::ptr<const char> filename, s32 flag, s32 mode)
|
||||
s32 sceIoOpen(vm::ptr<const char> filename, s32 flag, s32 mode)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
@ -954,7 +954,7 @@ s32 sceIoClose(s32 fd)
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
|
||||
s32 sceIoIoctl(s32 fd, s32 cmd, vm::psv::ptr<const void> argp, u32 arglen, vm::psv::ptr<void> bufp, u32 buflen)
|
||||
s32 sceIoIoctl(s32 fd, s32 cmd, vm::ptr<const void> argp, u32 arglen, vm::ptr<void> bufp, u32 buflen)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
@ -969,27 +969,27 @@ s32 sceIoLseek32(s32 fd, s32 offset, s32 whence)
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
|
||||
s32 sceIoRead(s32 fd, vm::psv::ptr<void> buf, u32 nbyte)
|
||||
s32 sceIoRead(s32 fd, vm::ptr<void> buf, u32 nbyte)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
|
||||
s32 sceIoWrite(s32 fd, vm::psv::ptr<const void> buf, u32 nbyte)
|
||||
s32 sceIoWrite(s32 fd, vm::ptr<const void> buf, u32 nbyte)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
|
||||
s32 sceIoPread(s32 fd, vm::psv::ptr<void> buf, u32 nbyte, s64 offset)
|
||||
s32 sceIoPread(s32 fd, vm::ptr<void> buf, u32 nbyte, s64 offset)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
|
||||
s32 sceIoPwrite(s32 fd, vm::psv::ptr<const void> buf, u32 nbyte, s64 offset)
|
||||
s32 sceIoPwrite(s32 fd, vm::ptr<const void> buf, u32 nbyte, s64 offset)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
|
||||
s32 sceIoDopen(vm::psv::ptr<const char> dirname)
|
||||
s32 sceIoDopen(vm::ptr<const char> dirname)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
@ -999,17 +999,17 @@ s32 sceIoDclose(s32 fd)
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
|
||||
s32 sceIoDread(s32 fd, vm::psv::ptr<SceIoDirent> buf)
|
||||
s32 sceIoDread(s32 fd, vm::ptr<SceIoDirent> buf)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
|
||||
s32 sceIoChstat(vm::psv::ptr<const char> name, vm::psv::ptr<const SceIoStat> buf, u32 cbit)
|
||||
s32 sceIoChstat(vm::ptr<const char> name, vm::ptr<const SceIoStat> buf, u32 cbit)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
|
||||
s32 sceIoGetstat(vm::psv::ptr<const char> name, vm::psv::ptr<SceIoStat> buf)
|
||||
s32 sceIoGetstat(vm::ptr<const char> name, vm::ptr<SceIoStat> buf)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
|
@ -269,339 +269,337 @@ union SceKernelSysClock
|
||||
{
|
||||
struct
|
||||
{
|
||||
u32 low;
|
||||
u32 hi;
|
||||
le_t<u32> low;
|
||||
le_t<u32> hi;
|
||||
};
|
||||
|
||||
u64 quad;
|
||||
le_t<u64> quad;
|
||||
};
|
||||
|
||||
struct SceKernelCallFrame
|
||||
{
|
||||
u32 sp;
|
||||
u32 pc;
|
||||
le_t<u32> sp;
|
||||
le_t<u32> pc;
|
||||
};
|
||||
|
||||
// Memory Manager definitions
|
||||
|
||||
typedef s32 SceKernelMemoryType;
|
||||
|
||||
struct SceKernelMemBlockInfo
|
||||
{
|
||||
u32 size;
|
||||
vm::psv::ptr<void> mappedBase;
|
||||
u32 mappedSize;
|
||||
SceKernelMemoryType memoryType;
|
||||
u32 access;
|
||||
le_t<u32> size;
|
||||
vm::lptr<void> mappedBase;
|
||||
le_t<u32> mappedSize;
|
||||
le_t<s32> memoryType; // SceKernelMemoryType
|
||||
le_t<u32> access;
|
||||
};
|
||||
|
||||
struct SceKernelAllocMemBlockOpt
|
||||
{
|
||||
u32 size;
|
||||
u32 attr;
|
||||
u32 alignment;
|
||||
s32 uidBaseBlock;
|
||||
vm::psv::ptr<const char> strBaseBlockName;
|
||||
le_t<u32> size;
|
||||
le_t<u32> attr;
|
||||
le_t<u32> alignment;
|
||||
le_t<s32> uidBaseBlock;
|
||||
vm::lcptr<char> strBaseBlockName;
|
||||
};
|
||||
|
||||
// Thread Manager definitions (threads)
|
||||
|
||||
typedef s32(SceKernelThreadEntry)(u32 argSize, vm::psv::ptr<void> pArgBlock);
|
||||
using SceKernelThreadEntry = func_def<s32(u32 argSize, vm::ptr<void> pArgBlock)>;
|
||||
|
||||
struct SceKernelThreadOptParam
|
||||
{
|
||||
u32 size;
|
||||
u32 attr;
|
||||
le_t<u32> size;
|
||||
le_t<u32> attr;
|
||||
};
|
||||
|
||||
struct SceKernelThreadInfo
|
||||
{
|
||||
u32 size;
|
||||
s32 processId;
|
||||
le_t<u32> size;
|
||||
le_t<s32> processId;
|
||||
char name[32];
|
||||
u32 attr;
|
||||
u32 status;
|
||||
vm::psv::ptr<SceKernelThreadEntry> entry;
|
||||
vm::psv::ptr<void> pStack;
|
||||
u32 stackSize;
|
||||
s32 initPriority;
|
||||
s32 currentPriority;
|
||||
s32 initCpuAffinityMask;
|
||||
s32 currentCpuAffinityMask;
|
||||
s32 currentCpuId;
|
||||
s32 lastExecutedCpuId;
|
||||
u32 waitType;
|
||||
s32 waitId;
|
||||
s32 exitStatus;
|
||||
le_t<u32> attr;
|
||||
le_t<u32> status;
|
||||
vm::lptr<SceKernelThreadEntry> entry;
|
||||
vm::lptr<void> pStack;
|
||||
le_t<u32> stackSize;
|
||||
le_t<s32> initPriority;
|
||||
le_t<s32> currentPriority;
|
||||
le_t<s32> initCpuAffinityMask;
|
||||
le_t<s32> currentCpuAffinityMask;
|
||||
le_t<s32> currentCpuId;
|
||||
le_t<s32> lastExecutedCpuId;
|
||||
le_t<u32> waitType;
|
||||
le_t<s32> waitId;
|
||||
le_t<s32> exitStatus;
|
||||
SceKernelSysClock runClocks;
|
||||
u32 intrPreemptCount;
|
||||
u32 threadPreemptCount;
|
||||
u32 threadReleaseCount;
|
||||
s32 changeCpuCount;
|
||||
s32 fNotifyCallback;
|
||||
s32 reserved;
|
||||
le_t<u32> intrPreemptCount;
|
||||
le_t<u32> threadPreemptCount;
|
||||
le_t<u32> threadReleaseCount;
|
||||
le_t<s32> changeCpuCount;
|
||||
le_t<s32> fNotifyCallback;
|
||||
le_t<s32> reserved;
|
||||
};
|
||||
|
||||
struct SceKernelThreadRunStatus
|
||||
{
|
||||
u32 size;
|
||||
le_t<u32> size;
|
||||
|
||||
struct
|
||||
{
|
||||
s32 processId;
|
||||
s32 threadId;
|
||||
s32 priority;
|
||||
le_t<s32> processId;
|
||||
le_t<s32> threadId;
|
||||
le_t<s32> priority;
|
||||
|
||||
} cpuInfo[4];
|
||||
};
|
||||
|
||||
struct SceKernelSystemInfo
|
||||
{
|
||||
u32 size;
|
||||
u32 activeCpuMask;
|
||||
le_t<u32> size;
|
||||
le_t<u32> activeCpuMask;
|
||||
|
||||
struct
|
||||
{
|
||||
SceKernelSysClock idleClock;
|
||||
u32 comesOutOfIdleCount;
|
||||
u32 threadSwitchCount;
|
||||
le_t<u32> comesOutOfIdleCount;
|
||||
le_t<u32> threadSwitchCount;
|
||||
|
||||
} cpuInfo[4];
|
||||
};
|
||||
|
||||
// Thread Manager definitions (callbacks)
|
||||
|
||||
typedef s32(SceKernelCallbackFunction)(s32 notifyId, s32 notifyCount, s32 notifyArg, vm::psv::ptr<void> pCommon);
|
||||
using SceKernelCallbackFunction = func_def<s32(s32 notifyId, s32 notifyCount, s32 notifyArg, vm::ptr<void> pCommon)>;
|
||||
|
||||
struct SceKernelCallbackInfo
|
||||
{
|
||||
u32 size;
|
||||
s32 callbackId;
|
||||
le_t<u32> size;
|
||||
le_t<s32> callbackId;
|
||||
char name[32];
|
||||
u32 attr;
|
||||
s32 threadId;
|
||||
vm::psv::ptr<SceKernelCallbackFunction> callbackFunc;
|
||||
s32 notifyId;
|
||||
s32 notifyCount;
|
||||
s32 notifyArg;
|
||||
vm::psv::ptr<void> pCommon;
|
||||
le_t<u32> attr;
|
||||
le_t<s32> threadId;
|
||||
vm::lptr<SceKernelCallbackFunction> callbackFunc;
|
||||
le_t<s32> notifyId;
|
||||
le_t<s32> notifyCount;
|
||||
le_t<s32> notifyArg;
|
||||
vm::lptr<void> pCommon;
|
||||
};
|
||||
|
||||
// Thread Manager definitions (events)
|
||||
|
||||
typedef s32(SceKernelThreadEventHandler)(s32 type, s32 threadId, s32 arg, vm::psv::ptr<void> pCommon);
|
||||
using SceKernelThreadEventHandler = func_def<s32(s32 type, s32 threadId, s32 arg, vm::psv::ptr<void> pCommon)>;
|
||||
|
||||
struct SceKernelEventInfo
|
||||
{
|
||||
u32 size;
|
||||
s32 eventId;
|
||||
le_t<u32> size;
|
||||
le_t<s32> eventId;
|
||||
char name[32];
|
||||
u32 attr;
|
||||
u32 eventPattern;
|
||||
u64 userData;
|
||||
u32 numWaitThreads;
|
||||
s32 reserved[1];
|
||||
le_t<u32> attr;
|
||||
le_t<u32> eventPattern;
|
||||
le_t<u64> userData;
|
||||
le_t<u32> numWaitThreads;
|
||||
le_t<s32> reserved[1];
|
||||
};
|
||||
|
||||
struct SceKernelWaitEvent
|
||||
{
|
||||
s32 eventId;
|
||||
u32 eventPattern;
|
||||
le_t<s32> eventId;
|
||||
le_t<u32> eventPattern;
|
||||
};
|
||||
|
||||
struct SceKernelResultEvent
|
||||
{
|
||||
s32 eventId;
|
||||
s32 result;
|
||||
u32 resultPattern;
|
||||
s32 reserved[1];
|
||||
u64 userData;
|
||||
le_t<s32> eventId;
|
||||
le_t<s32> result;
|
||||
le_t<u32> resultPattern;
|
||||
le_t<s32> reserved[1];
|
||||
le_t<u64> userData;
|
||||
};
|
||||
|
||||
// Thread Manager definitions (event flags)
|
||||
|
||||
struct SceKernelEventFlagOptParam
|
||||
{
|
||||
u32 size;
|
||||
le_t<u32> size;
|
||||
};
|
||||
|
||||
struct SceKernelEventFlagInfo
|
||||
{
|
||||
u32 size;
|
||||
s32 evfId;
|
||||
le_t<u32> size;
|
||||
le_t<s32> evfId;
|
||||
char name[32];
|
||||
u32 attr;
|
||||
u32 initPattern;
|
||||
u32 currentPattern;
|
||||
s32 numWaitThreads;
|
||||
le_t<u32> attr;
|
||||
le_t<u32> initPattern;
|
||||
le_t<u32> currentPattern;
|
||||
le_t<s32> numWaitThreads;
|
||||
};
|
||||
|
||||
// Thread Manager definitions (semaphores)
|
||||
|
||||
struct SceKernelSemaOptParam
|
||||
{
|
||||
u32 size;
|
||||
le_t<u32> size;
|
||||
};
|
||||
|
||||
struct SceKernelSemaInfo
|
||||
{
|
||||
u32 size;
|
||||
s32 semaId;
|
||||
le_t<u32> size;
|
||||
le_t<s32> semaId;
|
||||
char name[32];
|
||||
u32 attr;
|
||||
s32 initCount;
|
||||
s32 currentCount;
|
||||
s32 maxCount;
|
||||
s32 numWaitThreads;
|
||||
le_t<u32> attr;
|
||||
le_t<s32> initCount;
|
||||
le_t<s32> currentCount;
|
||||
le_t<s32> maxCount;
|
||||
le_t<s32> numWaitThreads;
|
||||
};
|
||||
|
||||
// Thread Manager definitions (mutexes)
|
||||
|
||||
struct SceKernelMutexOptParam
|
||||
{
|
||||
u32 size;
|
||||
s32 ceilingPriority;
|
||||
le_t<u32> size;
|
||||
le_t<s32> ceilingPriority;
|
||||
};
|
||||
|
||||
struct SceKernelMutexInfo
|
||||
{
|
||||
u32 size;
|
||||
s32 mutexId;
|
||||
le_t<u32> size;
|
||||
le_t<s32> mutexId;
|
||||
char name[32];
|
||||
u32 attr;
|
||||
s32 initCount;
|
||||
s32 currentCount;
|
||||
s32 currentOwnerId;
|
||||
s32 numWaitThreads;
|
||||
le_t<u32> attr;
|
||||
le_t<s32> initCount;
|
||||
le_t<s32> currentCount;
|
||||
le_t<s32> currentOwnerId;
|
||||
le_t<s32> numWaitThreads;
|
||||
};
|
||||
|
||||
// Thread Manager definitions (lightweight mutexes)
|
||||
|
||||
struct SceKernelLwMutexWork
|
||||
{
|
||||
s32 data[4];
|
||||
le_t<s32> data[4];
|
||||
};
|
||||
|
||||
struct SceKernelLwMutexOptParam
|
||||
{
|
||||
u32 size;
|
||||
le_t<u32> size;
|
||||
};
|
||||
|
||||
struct SceKernelLwMutexInfo
|
||||
{
|
||||
u32 size;
|
||||
s32 uid;
|
||||
le_t<u32> size;
|
||||
le_t<s32> uid;
|
||||
char name[32];
|
||||
u32 attr;
|
||||
vm::psv::ptr<SceKernelLwMutexWork> pWork;
|
||||
s32 initCount;
|
||||
s32 currentCount;
|
||||
s32 currentOwnerId;
|
||||
s32 numWaitThreads;
|
||||
le_t<u32> attr;
|
||||
vm::lptr<SceKernelLwMutexWork> pWork;
|
||||
le_t<s32> initCount;
|
||||
le_t<s32> currentCount;
|
||||
le_t<s32> currentOwnerId;
|
||||
le_t<s32> numWaitThreads;
|
||||
};
|
||||
|
||||
// Thread Manager definitions (condition variables)
|
||||
|
||||
struct SceKernelCondOptParam
|
||||
{
|
||||
u32 size;
|
||||
le_t<u32> size;
|
||||
};
|
||||
|
||||
struct SceKernelCondInfo
|
||||
{
|
||||
u32 size;
|
||||
s32 condId;
|
||||
le_t<u32> size;
|
||||
le_t<s32> condId;
|
||||
char name[32];
|
||||
u32 attr;
|
||||
s32 mutexId;
|
||||
u32 numWaitThreads;
|
||||
le_t<u32> attr;
|
||||
le_t<s32> mutexId;
|
||||
le_t<u32> numWaitThreads;
|
||||
};
|
||||
|
||||
// Thread Manager definitions (lightweight condition variables)
|
||||
|
||||
struct SceKernelLwCondWork
|
||||
{
|
||||
s32 data[4];
|
||||
le_t<s32> data[4];
|
||||
};
|
||||
|
||||
struct SceKernelLwCondOptParam
|
||||
{
|
||||
u32 size;
|
||||
le_t<u32> size;
|
||||
};
|
||||
|
||||
struct SceKernelLwCondInfo
|
||||
{
|
||||
u32 size;
|
||||
s32 uid;
|
||||
le_t<u32> size;
|
||||
le_t<s32> uid;
|
||||
char name[32];
|
||||
u32 attr;
|
||||
vm::psv::ptr<SceKernelLwCondWork> pWork;
|
||||
vm::psv::ptr<SceKernelLwMutexWork> pLwMutex;
|
||||
u32 numWaitThreads;
|
||||
le_t<u32> attr;
|
||||
vm::lptr<SceKernelLwCondWork> pWork;
|
||||
vm::lptr<SceKernelLwMutexWork> pLwMutex;
|
||||
le_t<u32> numWaitThreads;
|
||||
};
|
||||
|
||||
// Thread Manager definitions (timers)
|
||||
|
||||
struct SceKernelTimerOptParam
|
||||
{
|
||||
u32 size;
|
||||
le_t<u32> size;
|
||||
};
|
||||
|
||||
struct SceKernelTimerInfo
|
||||
{
|
||||
u32 size;
|
||||
s32 timerId;
|
||||
le_t<u32> size;
|
||||
le_t<s32> timerId;
|
||||
char name[32];
|
||||
u32 attr;
|
||||
s32 fActive;
|
||||
le_t<u32> attr;
|
||||
le_t<s32> fActive;
|
||||
SceKernelSysClock baseTime;
|
||||
SceKernelSysClock currentTime;
|
||||
SceKernelSysClock schedule;
|
||||
SceKernelSysClock interval;
|
||||
s32 type;
|
||||
s32 fRepeat;
|
||||
s32 numWaitThreads;
|
||||
s32 reserved[1];
|
||||
le_t<s32> type;
|
||||
le_t<s32> fRepeat;
|
||||
le_t<s32> numWaitThreads;
|
||||
le_t<s32> reserved[1];
|
||||
};
|
||||
|
||||
// Thread Manager definitions (reader/writer locks)
|
||||
|
||||
struct SceKernelRWLockOptParam
|
||||
{
|
||||
u32 size;
|
||||
le_t<u32> size;
|
||||
};
|
||||
|
||||
struct SceKernelRWLockInfo
|
||||
{
|
||||
u32 size;
|
||||
s32 rwLockId;
|
||||
le_t<u32> size;
|
||||
le_t<s32> rwLockId;
|
||||
char name[32];
|
||||
u32 attr;
|
||||
s32 lockCount;
|
||||
s32 writeOwnerId;
|
||||
s32 numReadWaitThreads;
|
||||
s32 numWriteWaitThreads;
|
||||
le_t<u32> attr;
|
||||
le_t<s32> lockCount;
|
||||
le_t<s32> writeOwnerId;
|
||||
le_t<s32> numReadWaitThreads;
|
||||
le_t<s32> numWriteWaitThreads;
|
||||
};
|
||||
|
||||
// IO/File Manager definitions
|
||||
|
||||
struct SceIoStat
|
||||
{
|
||||
s32 mode;
|
||||
u32 attr;
|
||||
s64 size;
|
||||
le_t<s32> mode;
|
||||
le_t<u32> attr;
|
||||
le_t<s64> size;
|
||||
SceDateTime ctime;
|
||||
SceDateTime atime;
|
||||
SceDateTime mtime;
|
||||
u64 _private[6];
|
||||
le_t<u64> _private[6];
|
||||
};
|
||||
|
||||
struct SceIoDirent
|
||||
{
|
||||
SceIoStat d_stat;
|
||||
char d_name[256];
|
||||
vm::psv::ptr<void> d_private;
|
||||
s32 dummy;
|
||||
vm::lptr<void> d_private;
|
||||
le_t<s32> dummy;
|
||||
};
|
||||
|
||||
// Module
|
||||
|
@ -1,13 +1,18 @@
|
||||
#pragma once
|
||||
|
||||
#include "Emu/Memory/Memory.h"
|
||||
#include "ARMv7Context.h"
|
||||
#include "Emu/SysCalls/LogBase.h"
|
||||
|
||||
namespace vm { using namespace psv; }
|
||||
|
||||
// PSV module class
|
||||
class psv_log_base : public LogBase
|
||||
{
|
||||
using init_func_t = void(*)();
|
||||
|
||||
std::string m_name;
|
||||
void(*m_init_func)();
|
||||
init_func_t m_init;
|
||||
|
||||
public:
|
||||
std::function<void()> on_load;
|
||||
@ -15,15 +20,15 @@ public:
|
||||
std::function<void()> on_stop;
|
||||
|
||||
public:
|
||||
psv_log_base(const std::string& name, void(*init_func)())
|
||||
psv_log_base(const std::string& name, init_func_t init)
|
||||
: m_name(name)
|
||||
, m_init_func(init_func)
|
||||
, m_init(init)
|
||||
{
|
||||
}
|
||||
|
||||
void Init()
|
||||
{
|
||||
m_init_func();
|
||||
m_init();
|
||||
}
|
||||
|
||||
virtual const std::string& GetName() const override
|
||||
@ -140,7 +145,7 @@ namespace psv_func_detail
|
||||
force_inline static T get_arg(ARMv7Context& context)
|
||||
{
|
||||
// TODO: check
|
||||
return cast_from_armv7_gpr<T>(vm::psv::read32(context.SP + sizeof(u32) * (g_count - 5)));
|
||||
return cast_from_armv7_gpr<T>(vm::read32(context.SP + sizeof(u32) * (g_count - 5)));
|
||||
}
|
||||
|
||||
force_inline static void put_arg(ARMv7Context& context, const T& arg)
|
||||
@ -149,7 +154,7 @@ namespace psv_func_detail
|
||||
const int stack_pos = (g_count - 5) * 4 - FIXED_STACK_FRAME_SIZE;
|
||||
static_assert(stack_pos < 0, "TODO: Increase fixed stack frame size (arg count limit broken)");
|
||||
|
||||
vm::psv::write32(context.SP + stack_pos, cast_to_armv7_gpr<T>(arg));
|
||||
vm::write32(context.SP + stack_pos, cast_to_armv7_gpr<T>(arg));
|
||||
}
|
||||
};
|
||||
|
||||
@ -159,7 +164,7 @@ namespace psv_func_detail
|
||||
force_inline static u64 get_arg(ARMv7Context& context)
|
||||
{
|
||||
// TODO: check
|
||||
return vm::psv::read64(context.SP + sizeof(u32) * (g_count - 5));
|
||||
return vm::read64(context.SP + sizeof(u32) * (g_count - 5));
|
||||
}
|
||||
|
||||
force_inline static void put_arg(ARMv7Context& context, u64 arg)
|
||||
@ -168,7 +173,7 @@ namespace psv_func_detail
|
||||
const int stack_pos = (g_count - 5) * 4 - FIXED_STACK_FRAME_SIZE;
|
||||
static_assert(stack_pos < -4, "TODO: Increase fixed stack frame size (arg count limit broken)");
|
||||
|
||||
vm::psv::write64(context.SP + stack_pos, arg);
|
||||
vm::write64(context.SP + stack_pos, arg);
|
||||
}
|
||||
};
|
||||
|
||||
@ -178,7 +183,7 @@ namespace psv_func_detail
|
||||
force_inline static s64 get_arg(ARMv7Context& context)
|
||||
{
|
||||
// TODO: check
|
||||
return vm::psv::read64(context.SP + sizeof(u32) * (g_count - 5));
|
||||
return vm::read64(context.SP + sizeof(u32) * (g_count - 5));
|
||||
}
|
||||
|
||||
force_inline static void put_arg(ARMv7Context& context, s64 arg)
|
||||
@ -187,7 +192,7 @@ namespace psv_func_detail
|
||||
const int stack_pos = (g_count - 5) * 4 - FIXED_STACK_FRAME_SIZE;
|
||||
static_assert(stack_pos < -4, "TODO: Increase fixed stack frame size (arg count limit broken)");
|
||||
|
||||
vm::psv::write64(context.SP + stack_pos, arg);
|
||||
vm::write64(context.SP + stack_pos, arg);
|
||||
}
|
||||
};
|
||||
|
||||
@ -619,27 +624,34 @@ enum psv_error_codes
|
||||
|
||||
struct SceDateTime
|
||||
{
|
||||
u16 year;
|
||||
u16 month;
|
||||
u16 day;
|
||||
u16 hour;
|
||||
u16 minute;
|
||||
u16 second;
|
||||
u32 microsecond;
|
||||
le_t<u16> year;
|
||||
le_t<u16> month;
|
||||
le_t<u16> day;
|
||||
le_t<u16> hour;
|
||||
le_t<u16> minute;
|
||||
le_t<u16> second;
|
||||
le_t<u32> microsecond;
|
||||
};
|
||||
|
||||
struct SceFVector3
|
||||
{
|
||||
float x, y, z;
|
||||
le_t<float> x, y, z;
|
||||
};
|
||||
|
||||
struct SceFQuaternion
|
||||
{
|
||||
float x, y, z, w;
|
||||
le_t<float> x, y, z, w;
|
||||
};
|
||||
|
||||
union SceUMatrix4
|
||||
{
|
||||
float f[4][4];
|
||||
s32 i[4][4];
|
||||
struct
|
||||
{
|
||||
le_t<float> f[4][4];
|
||||
};
|
||||
|
||||
struct
|
||||
{
|
||||
le_t<s32> i[4][4];
|
||||
};
|
||||
};
|
||||
|
@ -36,8 +36,3 @@ void AudioManager::Close()
|
||||
delete m_audio_out;
|
||||
m_audio_out = nullptr;
|
||||
}
|
||||
|
||||
u8 AudioManager::GetState()
|
||||
{
|
||||
return CELL_AUDIO_OUT_OUTPUT_STATE_ENABLED;
|
||||
}
|
||||
|
@ -1,31 +1,16 @@
|
||||
#pragma once
|
||||
#include "sysutil_audio.h"
|
||||
|
||||
#include "AudioThread.h"
|
||||
|
||||
// it cannot be configured currently, and it must NOT use cellSysutil definitions
|
||||
struct AudioInfo
|
||||
{
|
||||
struct
|
||||
{
|
||||
u8 type;
|
||||
u8 channel;
|
||||
u8 encoder;
|
||||
u8 fs;
|
||||
u32 layout;
|
||||
u32 downMixer;
|
||||
} mode;
|
||||
|
||||
AudioInfo()
|
||||
{
|
||||
}
|
||||
|
||||
void Init()
|
||||
{
|
||||
mode.type = CELL_AUDIO_OUT_CODING_TYPE_LPCM;
|
||||
mode.channel = CELL_AUDIO_OUT_CHNUM_8;
|
||||
mode.fs = CELL_AUDIO_OUT_FS_48KHZ;
|
||||
mode.layout = CELL_AUDIO_OUT_SPEAKER_LAYOUT_8CH_LREClrxy;
|
||||
mode.encoder = CELL_AUDIO_OUT_CODING_TYPE_LPCM;
|
||||
mode.downMixer = CELL_AUDIO_OUT_DOWNMIXER_NONE;
|
||||
}
|
||||
};
|
||||
|
||||
@ -42,6 +27,4 @@ public:
|
||||
|
||||
AudioThread& GetAudioOut() { assert(m_audio_out); return *m_audio_out; }
|
||||
AudioInfo& GetInfo() { return m_audio_info; }
|
||||
|
||||
u8 GetState();
|
||||
};
|
||||
};
|
||||
|
@ -12,4 +12,4 @@ public:
|
||||
virtual void Close() = 0;
|
||||
virtual void Stop() = 0;
|
||||
virtual void AddData(const void* src, int size) = 0;
|
||||
};
|
||||
};
|
||||
|
@ -4,8 +4,8 @@
|
||||
|
||||
u32 PPCDecoder::DecodeMemory(const u32 address)
|
||||
{
|
||||
u32 instr = vm::read32(address);
|
||||
u32 instr = vm::ps3::read32(address);
|
||||
Decode(instr);
|
||||
|
||||
return sizeof(u32);
|
||||
}
|
||||
}
|
||||
|
@ -751,8 +751,8 @@ ppu_thread::ppu_thread(u32 entry, const std::string& name, u32 stack_size, u32 p
|
||||
|
||||
thread->SetName(name);
|
||||
thread->SetEntry(entry);
|
||||
thread->SetStackSize(stack_size ? stack_size : Emu.GetInfo().GetProcParam().primary_stacksize);
|
||||
thread->SetPrio(prio ? prio : Emu.GetInfo().GetProcParam().primary_prio);
|
||||
thread->SetStackSize(stack_size ? stack_size : Emu.GetPrimaryStackSize());
|
||||
thread->SetPrio(prio ? prio : Emu.GetPrimaryPrio());
|
||||
|
||||
argc = 0;
|
||||
}
|
||||
@ -764,14 +764,14 @@ cpu_thread& ppu_thread::args(std::initializer_list<std::string> values)
|
||||
|
||||
assert(argc == 0);
|
||||
|
||||
envp.set(vm::alloc(align((u32)sizeof(*envp), stack_align), vm::main));
|
||||
envp.set(vm::alloc(align(sizeof32(u64), stack_align), vm::main));
|
||||
*envp = 0;
|
||||
argv.set(vm::alloc(sizeof(*argv) * values.size(), vm::main));
|
||||
argv.set(vm::alloc(sizeof32(u64) * (u32)values.size(), vm::main));
|
||||
|
||||
for (auto &arg : values)
|
||||
{
|
||||
u32 arg_size = align(u32(arg.size() + 1), stack_align);
|
||||
u32 arg_addr = vm::alloc(arg_size, vm::main);
|
||||
const u32 arg_size = align(u32(arg.size() + 1), stack_align);
|
||||
const u32 arg_addr = vm::alloc(arg_size, vm::main);
|
||||
|
||||
std::strcpy(vm::get_ptr<char>(arg_addr), arg.c_str());
|
||||
|
||||
|
@ -828,9 +828,9 @@ PPUThread& GetCurrentPPUThread();
|
||||
class ppu_thread : cpu_thread
|
||||
{
|
||||
static const u32 stack_align = 0x10;
|
||||
vm::ptr<u64> argv;
|
||||
vm::_ptr_base<be_t<u64>> argv;
|
||||
u32 argc;
|
||||
vm::ptr<u64> envp;
|
||||
vm::_ptr_base<be_t<u64>> envp;
|
||||
|
||||
public:
|
||||
ppu_thread(u32 entry, const std::string& name = "", u32 stack_size = 0, u32 prio = 0);
|
||||
|
@ -1,40 +0,0 @@
|
||||
#include "stdafx.h"
|
||||
#include "Emu/Memory/Memory.h"
|
||||
|
||||
#include "SPURSManager.h"
|
||||
|
||||
SPURSManagerEventFlag::SPURSManagerEventFlag(u32 flagClearMode, u32 flagDirection)
|
||||
{
|
||||
this->flagClearMode = flagClearMode;
|
||||
this->flagDirection = flagDirection;
|
||||
}
|
||||
|
||||
SPURSManagerTasksetAttribute::SPURSManagerTasksetAttribute(u64 args, vm::ptr<const u8> priority, u32 maxContention)
|
||||
{
|
||||
this->args = args;
|
||||
this->maxContention = maxContention;
|
||||
}
|
||||
|
||||
SPURSManager::SPURSManager()
|
||||
{
|
||||
}
|
||||
|
||||
void SPURSManager::Finalize()
|
||||
{
|
||||
}
|
||||
|
||||
void SPURSManager::AttachLv2EventQueue(u32 queue, vm::ptr<u8> port, int isDynamic)
|
||||
{
|
||||
//TODO:
|
||||
}
|
||||
|
||||
void SPURSManager::DetachLv2EventQueue(u8 port)
|
||||
{
|
||||
//TODO:
|
||||
}
|
||||
|
||||
SPURSManagerTaskset::SPURSManagerTaskset(u32 address, SPURSManagerTasksetAttribute *tattr)
|
||||
{
|
||||
this->tattr = tattr;
|
||||
this->address = address;
|
||||
}
|
@ -1,52 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
class SPURSManagerEventFlag
|
||||
{
|
||||
public:
|
||||
SPURSManagerEventFlag(u32 flagClearMode, u32 flagDirection);
|
||||
|
||||
u32 _getDirection() const
|
||||
{
|
||||
return this->flagDirection;
|
||||
}
|
||||
|
||||
u32 _getClearMode() const
|
||||
{
|
||||
return this->flagClearMode;
|
||||
}
|
||||
|
||||
protected:
|
||||
be_t<u32> flagClearMode;
|
||||
be_t<u32> flagDirection;
|
||||
};
|
||||
|
||||
class SPURSManagerTasksetAttribute
|
||||
{
|
||||
public:
|
||||
SPURSManagerTasksetAttribute(u64 args, vm::ptr<const u8> priority, u32 maxContention);
|
||||
|
||||
protected:
|
||||
be_t<u64> args;
|
||||
be_t<u32> maxContention;
|
||||
};
|
||||
|
||||
class SPURSManagerTaskset
|
||||
{
|
||||
public:
|
||||
SPURSManagerTaskset(u32 address, SPURSManagerTasksetAttribute *tattr);
|
||||
|
||||
protected:
|
||||
u32 address;
|
||||
SPURSManagerTasksetAttribute *tattr;
|
||||
};
|
||||
|
||||
// Main SPURS manager class.
|
||||
class SPURSManager
|
||||
{
|
||||
public:
|
||||
SPURSManager();
|
||||
|
||||
void Finalize();
|
||||
void AttachLv2EventQueue(u32 queue, vm::ptr<u8> port, int isDynamic);
|
||||
void DetachLv2EventQueue(u8 port);
|
||||
};
|
@ -4,8 +4,6 @@
|
||||
#include "Emu/System.h"
|
||||
#include "Utilities/File.h"
|
||||
|
||||
#include "Emu/SysCalls/lv2/sys_time.h"
|
||||
|
||||
#include "SPUInstrTable.h"
|
||||
#include "SPUDisAsm.h"
|
||||
|
||||
@ -20,6 +18,8 @@
|
||||
using namespace asmjit;
|
||||
using namespace asmjit::host;
|
||||
|
||||
extern u64 get_system_time();
|
||||
|
||||
SPURecompilerCore::SPURecompilerCore(SPUThread& cpu)
|
||||
: m_enc(new SPURecompiler(cpu, *this))
|
||||
, m_int(new SPUInterpreter(cpu))
|
||||
@ -95,7 +95,7 @@ void SPURecompilerCore::Compile(u16 pos)
|
||||
|
||||
while (true)
|
||||
{
|
||||
const u32 opcode = vm::read32(CPU.offset + pos * 4);
|
||||
const u32 opcode = vm::ps3::read32(CPU.offset + pos * 4);
|
||||
m_enc->do_finalize = false;
|
||||
if (opcode)
|
||||
{
|
||||
|
@ -1219,8 +1219,6 @@ spu_thread::spu_thread(u32 entry, const std::string& name, u32 stack_size, u32 p
|
||||
|
||||
thread->SetName(name);
|
||||
thread->SetEntry(entry);
|
||||
thread->SetStackSize(stack_size ? stack_size : Emu.GetInfo().GetProcParam().primary_stacksize);
|
||||
thread->SetPrio(prio ? prio : Emu.GetInfo().GetProcParam().primary_prio);
|
||||
|
||||
argc = 0;
|
||||
thread->SetStackSize(stack_size ? stack_size : Emu.GetPrimaryStackSize());
|
||||
thread->SetPrio(prio ? prio : Emu.GetPrimaryPrio());
|
||||
}
|
||||
|
@ -582,21 +582,21 @@ public:
|
||||
void halt();
|
||||
|
||||
u8 read8(u32 lsa) const { return vm::read8(lsa + offset); }
|
||||
u16 read16(u32 lsa) const { return vm::read16(lsa + offset); }
|
||||
u32 read32(u32 lsa) const { return vm::read32(lsa + offset); }
|
||||
u64 read64(u32 lsa) const { return vm::read64(lsa + offset); }
|
||||
u128 read128(u32 lsa) const { return vm::read128(lsa + offset); }
|
||||
u16 read16(u32 lsa) const { return vm::ps3::read16(lsa + offset); }
|
||||
u32 read32(u32 lsa) const { return vm::ps3::read32(lsa + offset); }
|
||||
u64 read64(u32 lsa) const { return vm::ps3::read64(lsa + offset); }
|
||||
u128 read128(u32 lsa) const { return vm::ps3::read128(lsa + offset); }
|
||||
|
||||
void write8(u32 lsa, u8 data) const { vm::write8(lsa + offset, data); }
|
||||
void write16(u32 lsa, u16 data) const { vm::write16(lsa + offset, data); }
|
||||
void write32(u32 lsa, u32 data) const { vm::write32(lsa + offset, data); }
|
||||
void write64(u32 lsa, u64 data) const { vm::write64(lsa + offset, data); }
|
||||
void write128(u32 lsa, u128 data) const { vm::write128(lsa + offset, data); }
|
||||
void write16(u32 lsa, u16 data) const { vm::ps3::write16(lsa + offset, data); }
|
||||
void write32(u32 lsa, u32 data) const { vm::ps3::write32(lsa + offset, data); }
|
||||
void write64(u32 lsa, u64 data) const { vm::ps3::write64(lsa + offset, data); }
|
||||
void write128(u32 lsa, u128 data) const { vm::ps3::write128(lsa + offset, data); }
|
||||
|
||||
void write16(u32 lsa, be_t<u16> data) const { vm::write16(lsa + offset, data); }
|
||||
void write32(u32 lsa, be_t<u32> data) const { vm::write32(lsa + offset, data); }
|
||||
void write64(u32 lsa, be_t<u64> data) const { vm::write64(lsa + offset, data); }
|
||||
void write128(u32 lsa, be_t<u128> data) const { vm::write128(lsa + offset, data); }
|
||||
void write16(u32 lsa, be_t<u16> data) const { vm::ps3::write16(lsa + offset, data); }
|
||||
void write32(u32 lsa, be_t<u32> data) const { vm::ps3::write32(lsa + offset, data); }
|
||||
void write64(u32 lsa, be_t<u64> data) const { vm::ps3::write64(lsa + offset, data); }
|
||||
void write128(u32 lsa, be_t<u128> data) const { vm::ps3::write128(lsa + offset, data); }
|
||||
|
||||
void RegisterHleFunction(u32 addr, std::function<bool(SPUThread & SPU)> function)
|
||||
{
|
||||
@ -702,35 +702,11 @@ SPUThread& GetCurrentSPUThread();
|
||||
|
||||
class spu_thread : cpu_thread
|
||||
{
|
||||
static const u32 stack_align = 0x10;
|
||||
vm::ptr<u64> argv;
|
||||
u32 argc;
|
||||
vm::ptr<u64> envp;
|
||||
|
||||
public:
|
||||
spu_thread(u32 entry, const std::string& name = "", u32 stack_size = 0, u32 prio = 0);
|
||||
|
||||
cpu_thread& args(std::initializer_list<std::string> values) override
|
||||
{
|
||||
if (!values.size())
|
||||
return *this;
|
||||
|
||||
assert(argc == 0);
|
||||
|
||||
envp.set(Memory.MainMem.AllocAlign((u32)sizeof(envp), stack_align));
|
||||
*envp = 0;
|
||||
argv.set(Memory.MainMem.AllocAlign(u32(sizeof(argv)* values.size()), stack_align));
|
||||
|
||||
for (auto &arg : values)
|
||||
{
|
||||
u32 arg_size = align(u32(arg.size() + 1), stack_align);
|
||||
u32 arg_addr = (u32)Memory.MainMem.AllocAlign(arg_size, stack_align);
|
||||
|
||||
std::strcpy(vm::get_ptr<char>(arg_addr), arg.c_str());
|
||||
|
||||
argv[argc++] = arg_addr;
|
||||
}
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
@ -740,10 +716,6 @@ public:
|
||||
|
||||
spu.Run();
|
||||
|
||||
spu.GPR[3].from64(argc);
|
||||
spu.GPR[4].from64(argv.addr());
|
||||
spu.GPR[5].from64(envp.addr());
|
||||
|
||||
return *this;
|
||||
}
|
||||
};
|
||||
|
@ -63,7 +63,7 @@ public:
|
||||
}
|
||||
|
||||
// must be called from the constructor called through make() to get further ID of current object
|
||||
u32 get_cur_id()
|
||||
u32 get_current_id()
|
||||
{
|
||||
// if called correctly from make(), the mutex is locked
|
||||
// if called illegally, the mutex is unlocked with high probability (wrong ID is returned otherwise)
|
||||
|
@ -436,7 +436,7 @@ bool VirtualMemoryBlock::Read32(const u32 addr, u32* value)
|
||||
u32 realAddr;
|
||||
if (!getRealAddr(addr, realAddr))
|
||||
return false;
|
||||
*value = vm::read32(realAddr);
|
||||
*value = vm::ps3::read32(realAddr);
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -445,7 +445,7 @@ bool VirtualMemoryBlock::Write32(const u32 addr, const u32 value)
|
||||
u32 realAddr;
|
||||
if (!getRealAddr(addr, realAddr))
|
||||
return false;
|
||||
vm::write32(realAddr, value);
|
||||
vm::ps3::write32(realAddr, value);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -142,20 +142,20 @@ namespace vm
|
||||
return cast_ptr<T>::cast(addr, func);
|
||||
}
|
||||
|
||||
static u8 read8(u32 addr)
|
||||
{
|
||||
return get_ref<u8>(addr);
|
||||
}
|
||||
|
||||
static void write8(u32 addr, u8 value)
|
||||
{
|
||||
get_ref<u8>(addr) = value;
|
||||
}
|
||||
|
||||
namespace ps3
|
||||
{
|
||||
void init();
|
||||
|
||||
static u8 read8(u32 addr)
|
||||
{
|
||||
return get_ref<u8>(addr);
|
||||
}
|
||||
|
||||
static void write8(u32 addr, u8 value)
|
||||
{
|
||||
get_ref<u8>(addr) = value;
|
||||
}
|
||||
|
||||
static u16 read16(u32 addr)
|
||||
{
|
||||
return get_ref<be_t<u16>>(addr);
|
||||
@ -216,16 +216,6 @@ namespace vm
|
||||
{
|
||||
void init();
|
||||
|
||||
static u8 read8(u32 addr)
|
||||
{
|
||||
return get_ref<u8>(addr);
|
||||
}
|
||||
|
||||
static void write8(u32 addr, u8 value)
|
||||
{
|
||||
get_ref<u8>(addr) = value;
|
||||
}
|
||||
|
||||
static u16 read16(u32 addr)
|
||||
{
|
||||
return get_ref<u16>(addr);
|
||||
@ -298,15 +288,15 @@ namespace vm
|
||||
u32 alloc_offset;
|
||||
|
||||
template<typename T = char>
|
||||
ptr<T> alloc(u32 count = 1) const
|
||||
_ptr_base<T> alloc(u32 count = 1) const
|
||||
{
|
||||
return ptr<T>::make(allocator(count * sizeof(T)));
|
||||
return{ allocator(count * sizeof32(T)) };
|
||||
}
|
||||
|
||||
template<typename T = char>
|
||||
ptr<T> fixed_alloc(u32 addr, u32 count = 1) const
|
||||
_ptr_base<T> fixed_alloc(u32 addr, u32 count = 1) const
|
||||
{
|
||||
return ptr<T>::make(fixed_allocator(addr, count * sizeof(T)));
|
||||
return{ fixed_allocator(addr, count * sizeof32(T)) };
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -184,9 +184,6 @@ namespace vm
|
||||
template<typename T> using lcptr = lptr<const T>;
|
||||
}
|
||||
|
||||
// PS3 emulation is main now, so lets it be as default
|
||||
using namespace ps3;
|
||||
|
||||
struct null_t
|
||||
{
|
||||
template<typename T, typename AT> operator _ptr_base<T, AT>() const
|
||||
|
@ -103,9 +103,6 @@ namespace vm
|
||||
// default reference for PSV HLE structures (LE reference to LE data)
|
||||
template<typename T> using lref = lrefl<T>;
|
||||
}
|
||||
|
||||
//PS3 emulation is main now, so lets it be as default
|
||||
using namespace ps3;
|
||||
}
|
||||
|
||||
// postfix increment operator for vm::_ref_base
|
||||
|
@ -1,10 +1,10 @@
|
||||
#include "stdafx.h"
|
||||
#include "FragmentProgramDecompiler.h"
|
||||
|
||||
#include "Utilities/Log.h"
|
||||
#include "Emu/Memory/Memory.h"
|
||||
#include "Emu/System.h"
|
||||
|
||||
#include "FragmentProgramDecompiler.h"
|
||||
|
||||
FragmentProgramDecompiler::FragmentProgramDecompiler(u32 addr, u32& size, u32 ctrl) :
|
||||
m_addr(addr),
|
||||
m_size(size),
|
||||
@ -114,7 +114,7 @@ std::string FragmentProgramDecompiler::AddConst()
|
||||
return name;
|
||||
}
|
||||
|
||||
auto data = vm::ptr<u32>::make(m_addr + m_size + 4 * sizeof(u32));
|
||||
auto data = vm::ps3::ptr<u32>::make(m_addr + m_size + 4 * sizeof(u32));
|
||||
|
||||
m_offset = 2 * 4 * sizeof(u32);
|
||||
u32 x = GetData(data[0]);
|
||||
@ -335,7 +335,7 @@ std::string FragmentProgramDecompiler::BuildCode()
|
||||
|
||||
std::string FragmentProgramDecompiler::Decompile()
|
||||
{
|
||||
auto data = vm::ptr<u32>::make(m_addr);
|
||||
auto data = vm::ps3::ptr<u32>::make(m_addr);
|
||||
m_size = 0;
|
||||
m_location = 0;
|
||||
m_loop_count = 0;
|
||||
|
@ -1,8 +1,9 @@
|
||||
#include "stdafx.h"
|
||||
#include "VertexProgramDecompiler.h"
|
||||
#include "Utilities/Log.h"
|
||||
#include "Emu/System.h"
|
||||
|
||||
#include "VertexProgramDecompiler.h"
|
||||
|
||||
std::string VertexProgramDecompiler::GetMask(bool is_sca)
|
||||
{
|
||||
std::string ret;
|
||||
|
@ -1,5 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
namespace vm { using namespace ps3; }
|
||||
|
||||
enum
|
||||
{
|
||||
CELL_GCM_DISPLAY_HSYNC = 1,
|
||||
|
@ -1,5 +1,6 @@
|
||||
#pragma once
|
||||
#include "GSRender.h"
|
||||
|
||||
struct GSRender;
|
||||
|
||||
struct GSInfo
|
||||
{
|
||||
@ -13,7 +14,6 @@ struct GSInfo
|
||||
u16 refreshRates;
|
||||
u32 pitch;
|
||||
} mode;
|
||||
//CellVideoOutDisplayMode mode;
|
||||
|
||||
GSInfo()
|
||||
{
|
||||
|
@ -1,125 +0,0 @@
|
||||
// Copyright (C) 2015 AlexAltea (https://github.com/AlexAltea/nucleus)
|
||||
#include "stdafx.h"
|
||||
#include "RSXDMA.h"
|
||||
#include "Emu/Memory/Memory.h"
|
||||
#include "Utilities/Log.h"
|
||||
|
||||
DMAObject dma_address(u32 dma_object)
|
||||
{
|
||||
// NOTE: RAMIN is not emulated, therefore DMA Objects are hardcoded in this function
|
||||
switch (dma_object) {
|
||||
case RSX_CONTEXT_DMA_REPORT_LOCATION_LOCAL:
|
||||
return DMAObject{ 0x40300000, 0x8000, DMAObject::READWRITE }; // TODO: Inconsistency: Gitbrew says R starting at 0x1400, test says RW starting at 0x0.
|
||||
case RSX_CONTEXT_DMA_DEVICE_RW:
|
||||
return DMAObject{ 0x40000000, 0x1000, DMAObject::READWRITE };
|
||||
case RSX_CONTEXT_DMA_DEVICE_R:
|
||||
return DMAObject{ 0x40000000, 0x1000, DMAObject::READWRITE }; // TODO: Inconsistency: Gitbrew says R, test says RW
|
||||
case RSX_CONTEXT_DMA_SEMAPHORE_RW:
|
||||
return DMAObject{ 0x40100000, 0x1000, DMAObject::READWRITE };
|
||||
case RSX_CONTEXT_DMA_SEMAPHORE_R:
|
||||
return DMAObject{ 0x40100000, 0x1000, DMAObject::READWRITE }; // TODO: Inconsistency: Gitbrew says R, test says RW
|
||||
default:
|
||||
LOG_WARNING(RSX, "Unknown DMA object (0x%08x)", dma_object);
|
||||
return DMAObject{};
|
||||
}
|
||||
}
|
||||
|
||||
u8 dma_read8(u32 dma_object, u8 offset)
|
||||
{
|
||||
const DMAObject& dma = dma_address(dma_object);
|
||||
|
||||
if (dma.addr && dma.flags & DMAObject::READ)
|
||||
{
|
||||
return vm::read8(dma.addr + offset);
|
||||
}
|
||||
|
||||
LOG_WARNING(RSX, "Illegal DMA 8-bit read");
|
||||
return 0;
|
||||
}
|
||||
|
||||
u16 dma_read16(u32 dma_object, u16 offset)
|
||||
{
|
||||
const DMAObject& dma = dma_address(dma_object);
|
||||
|
||||
if (dma.addr && dma.flags & DMAObject::READ)
|
||||
{
|
||||
return vm::read16(dma.addr + offset);
|
||||
}
|
||||
|
||||
LOG_WARNING(RSX, "Illegal DMA 16-bit read");
|
||||
return 0;
|
||||
}
|
||||
|
||||
u32 dma_read32(u32 dma_object, u32 offset)
|
||||
{
|
||||
const DMAObject& dma = dma_address(dma_object);
|
||||
|
||||
if (dma.addr && dma.flags & DMAObject::READ)
|
||||
{
|
||||
return vm::read32(dma.addr + offset);
|
||||
}
|
||||
|
||||
LOG_WARNING(RSX, "Illegal DMA 32-bit read");
|
||||
return 0;
|
||||
}
|
||||
|
||||
u64 dma_read64(u32 dma_object, u64 offset)
|
||||
{
|
||||
const DMAObject& dma = dma_address(dma_object);
|
||||
|
||||
if (dma.addr && dma.flags & DMAObject::READ)
|
||||
{
|
||||
return vm::read64(dma.addr + offset);
|
||||
}
|
||||
|
||||
LOG_WARNING(RSX, "Illegal DMA 64-bit read");
|
||||
return 0;
|
||||
}
|
||||
|
||||
void dma_write8(u32 dma_object, u32 offset, u8 value)
|
||||
{
|
||||
const DMAObject& dma = dma_address(dma_object);
|
||||
|
||||
if (dma.addr && dma.flags & DMAObject::WRITE)
|
||||
{
|
||||
return vm::write8(dma.addr + offset, value);
|
||||
}
|
||||
|
||||
LOG_WARNING(RSX, "Illegal DMA 32-bit write");
|
||||
}
|
||||
|
||||
void dma_write16(u32 dma_object, u32 offset, u16 value)
|
||||
{
|
||||
const DMAObject& dma = dma_address(dma_object);
|
||||
|
||||
if (dma.addr && dma.flags & DMAObject::WRITE)
|
||||
{
|
||||
return vm::write16(dma.addr + offset, value);
|
||||
}
|
||||
|
||||
LOG_WARNING(RSX, "Illegal DMA 32-bit write");
|
||||
}
|
||||
|
||||
void dma_write32(u32 dma_object, u32 offset, u32 value)
|
||||
{
|
||||
const DMAObject& dma = dma_address(dma_object);
|
||||
|
||||
if (dma.addr && dma.flags & DMAObject::WRITE)
|
||||
{
|
||||
return vm::write32(dma.addr + offset, value);
|
||||
}
|
||||
|
||||
LOG_WARNING(RSX, "Illegal DMA 32-bit write");
|
||||
}
|
||||
|
||||
void dma_write64(u32 dma_object, u32 offset, u64 value)
|
||||
{
|
||||
const DMAObject& dma = dma_address(dma_object);
|
||||
|
||||
if (dma.addr && dma.flags & DMAObject::WRITE)
|
||||
{
|
||||
return vm::write64(dma.addr + offset, value);
|
||||
}
|
||||
|
||||
LOG_WARNING(RSX, "Illegal DMA 64-bit write");
|
||||
}
|
@ -1,46 +0,0 @@
|
||||
// Copyright (C) 2015 AlexAltea (https://github.com/AlexAltea/nucleus)
|
||||
#pragma once
|
||||
|
||||
enum {
|
||||
RSX_CONTEXT_DMA_TO_MEMORY_GET_NOTIFY0 = 0x66604200, // Target: lpar_reports[0x1000 : 0x????]
|
||||
RSX_CONTEXT_DMA_TO_MEMORY_GET_NOTIFY1 = 0x66604201, // Target: lpar_reports[0x1000 : 0x????]
|
||||
RSX_CONTEXT_DMA_TO_MEMORY_GET_NOTIFY2 = 0x66604202, // Target: lpar_reports[0x1000 : 0x????]
|
||||
RSX_CONTEXT_DMA_TO_MEMORY_GET_NOTIFY3 = 0x66604203, // Target: lpar_reports[0x1000 : 0x????]
|
||||
RSX_CONTEXT_DMA_TO_MEMORY_GET_NOTIFY4 = 0x66604204, // Target: lpar_reports[0x1000 : 0x????]
|
||||
RSX_CONTEXT_DMA_TO_MEMORY_GET_NOTIFY5 = 0x66604205, // Target: lpar_reports[0x1000 : 0x????]
|
||||
RSX_CONTEXT_DMA_TO_MEMORY_GET_NOTIFY6 = 0x66604206, // Target: lpar_reports[0x1000 : 0x????]
|
||||
RSX_CONTEXT_DMA_TO_MEMORY_GET_NOTIFY7 = 0x66604207, // Target: lpar_reports[0x1000 : 0x????]
|
||||
RSX_CONTEXT_DMA_TO_MEMORY_GET_NOTIFY8 = 0x66604208, // Target: lpar_reports[0x1000 : 0x????]
|
||||
RSX_CONTEXT_DMA_NOTIFY_MAIN_0 = 0x6660420F,
|
||||
RSX_CONTEXT_DMA_SEMAPHORE_RW = 0x66606660, // Target: lpar_reports[0x0000 : 0x1000] (Read/Write)
|
||||
RSX_CONTEXT_DMA_SEMAPHORE_R = 0x66616661, // Target: lpar_reports[0x0000 : 0x1000] (Read)
|
||||
RSX_CONTEXT_DMA_REPORT_LOCATION_LOCAL = 0x66626660, // Target: lpar_reports[0x1400 : 0x9400]
|
||||
RSX_CONTEXT_DMA_REPORT_LOCATION_MAIN = 0xBAD68000,
|
||||
RSX_CONTEXT_DMA_DEVICE_RW = 0x56616660,
|
||||
RSX_CONTEXT_DMA_DEVICE_R = 0x56616661,
|
||||
};
|
||||
|
||||
struct DMAObject {
|
||||
// Flags
|
||||
enum {
|
||||
READ = 1 << 0,
|
||||
WRITE = 1 << 1,
|
||||
READWRITE = READ | WRITE,
|
||||
};
|
||||
u32 addr;
|
||||
u32 size;
|
||||
u32 flags;
|
||||
};
|
||||
|
||||
// RSX Direct Memory Access
|
||||
DMAObject dma_address(u32 dma_object);
|
||||
|
||||
u8 dma_read8(u32 dma_object, u32 offset);
|
||||
u16 dma_read16(u32 dma_object, u32 offset);
|
||||
u32 dma_read32(u32 dma_object, u32 offset);
|
||||
u64 dma_read64(u32 dma_object, u32 offset);
|
||||
|
||||
void dma_write8(u32 dma_object, u32 offset, u8 value);
|
||||
void dma_write16(u32 dma_object, u32 offset, u16 value);
|
||||
void dma_write32(u32 dma_object, u32 offset, u32 value);
|
||||
void dma_write64(u32 dma_object, u32 offset, u64 value);
|
@ -4,19 +4,20 @@
|
||||
#include "Emu/Memory/Memory.h"
|
||||
#include "Emu/System.h"
|
||||
#include "Emu/RSX/GSManager.h"
|
||||
#include "Emu/RSX/RSXDMA.h"
|
||||
#include "Emu/RSX/GSRender.h"
|
||||
#include "Emu/RSX/sysutil_video.h"
|
||||
#include "RSXThread.h"
|
||||
|
||||
#include "Emu/SysCalls/Callback.h"
|
||||
#include "Emu/SysCalls/CB_FUNC.h"
|
||||
#include "Emu/SysCalls/lv2/sys_time.h"
|
||||
|
||||
extern "C"
|
||||
{
|
||||
#include "libswscale/swscale.h"
|
||||
}
|
||||
|
||||
extern u64 get_system_time();
|
||||
|
||||
#define ARGS(x) (x >= count ? OutOfArgsCount(x, cmd, count, args.addr()) : args[x].value())
|
||||
#define CMD_DEBUG 0
|
||||
|
||||
|
@ -9,28 +9,24 @@
|
||||
|
||||
void CallbackManager::Register(const std::function<s32(PPUThread& PPU)>& func)
|
||||
{
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(m_mutex);
|
||||
std::lock_guard<std::mutex> lock(m_mutex);
|
||||
|
||||
m_cb_list.push_back([=](CPUThread& CPU) -> s32
|
||||
{
|
||||
assert(CPU.GetType() == CPU_THREAD_PPU);
|
||||
return func(static_cast<PPUThread&>(CPU));
|
||||
});
|
||||
}
|
||||
m_cb_list.push_back([=](CPUThread& CPU) -> s32
|
||||
{
|
||||
assert(CPU.GetType() == CPU_THREAD_PPU);
|
||||
return func(static_cast<PPUThread&>(CPU));
|
||||
});
|
||||
}
|
||||
|
||||
void CallbackManager::Async(const std::function<void(PPUThread& PPU)>& func)
|
||||
{
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(m_mutex);
|
||||
std::lock_guard<std::mutex> lock(m_mutex);
|
||||
|
||||
m_async_list.push_back([=](CPUThread& CPU)
|
||||
{
|
||||
assert(CPU.GetType() == CPU_THREAD_PPU);
|
||||
func(static_cast<PPUThread&>(CPU));
|
||||
});
|
||||
}
|
||||
m_async_list.push_back([=](CPUThread& CPU)
|
||||
{
|
||||
assert(CPU.GetType() == CPU_THREAD_PPU);
|
||||
func(static_cast<PPUThread&>(CPU));
|
||||
});
|
||||
|
||||
m_cv.notify_one();
|
||||
}
|
||||
|
@ -1,4 +1,5 @@
|
||||
#include "stdafx.h"
|
||||
#include "Modules.h"
|
||||
#include "ModuleManager.h"
|
||||
|
||||
extern Module cellAdec;
|
||||
|
@ -1,5 +1,6 @@
|
||||
#pragma once
|
||||
#include "Modules.h"
|
||||
|
||||
class Module;
|
||||
|
||||
class ModuleManager
|
||||
{
|
||||
|
@ -1,8 +1,11 @@
|
||||
#pragma once
|
||||
|
||||
#include "Emu/SysCalls/SC_FUNC.h"
|
||||
#include "ErrorCodes.h"
|
||||
#include "LogBase.h"
|
||||
|
||||
namespace vm { using namespace ps3; }
|
||||
|
||||
class Module;
|
||||
|
||||
// flags set in ModuleFunc
|
||||
|
@ -1,5 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
namespace vm { using namespace ps3; }
|
||||
|
||||
// Error Codes
|
||||
enum
|
||||
{
|
||||
|
@ -1,5 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
namespace vm { using namespace ps3; }
|
||||
|
||||
// Return Codes
|
||||
enum
|
||||
{
|
||||
|
@ -1,5 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
namespace vm { using namespace ps3; }
|
||||
|
||||
// Error codes
|
||||
enum
|
||||
{
|
||||
|
90
rpcs3/Emu/SysCalls/Modules/cellAudioIn.h
Normal file
90
rpcs3/Emu/SysCalls/Modules/cellAudioIn.h
Normal file
@ -0,0 +1,90 @@
|
||||
#pragma once
|
||||
|
||||
namespace vm { using namespace ps3; }
|
||||
|
||||
// Error codes
|
||||
enum
|
||||
{
|
||||
CELL_AUDIO_IN_ERROR_NOT_IMPLEMENTED = 0x8002b260,
|
||||
CELL_AUDIO_IN_ERROR_ILLEGAL_CONFIGURATION = 0x8002b261,
|
||||
CELL_AUDIO_IN_ERROR_ILLEGAL_PARAMETER = 0x8002b262,
|
||||
CELL_AUDIO_IN_ERROR_PARAMETER_OUT_OF_RANGE = 0x8002b263,
|
||||
CELL_AUDIO_IN_ERROR_DEVICE_NOT_FOUND = 0x8002b264,
|
||||
CELL_AUDIO_IN_ERROR_UNSUPPORTED_AUDIO_IN = 0x8002b265,
|
||||
CELL_AUDIO_IN_ERROR_UNSUPPORTED_SOUND_MODE = 0x8002b266,
|
||||
CELL_AUDIO_IN_ERROR_CONDITION_BUSY = 0x8002b267,
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
CELL_AUDIO_IN_SINGLE_DEVICE_MODE = 0,
|
||||
CELL_AUDIO_IN_MULTI_DEVICE_MODE = 1,
|
||||
CELL_AUDIO_IN_MULTI_DEVICE_MODE_2 = 2,
|
||||
};
|
||||
|
||||
enum CellAudioInPortType
|
||||
{
|
||||
CELL_AUDIO_IN_PORT_USB = 3,
|
||||
CELL_AUDIO_IN_PORT_BLUETOOTH = 4,
|
||||
};
|
||||
|
||||
enum CellAudioInDeviceState
|
||||
{
|
||||
CELL_AUDIO_IN_DEVICE_STATE_UNAVAILABLE = 0,
|
||||
CELL_AUDIO_IN_DEVICE_STATE_AVAILABLE = 1,
|
||||
};
|
||||
|
||||
enum CellAudioInCodingType
|
||||
{
|
||||
CELL_AUDIO_IN_CODING_TYPE_LPCM = 0,
|
||||
};
|
||||
|
||||
enum CellAudioInChnum
|
||||
{
|
||||
CELL_AUDIO_IN_CHNUM_NONE = 0,
|
||||
CELL_AUDIO_IN_CHNUM_1 = 1,
|
||||
CELL_AUDIO_IN_CHNUM_2 = 2,
|
||||
};
|
||||
|
||||
enum CellAudioInFs
|
||||
{
|
||||
CELL_AUDIO_IN_FS_UNDEFINED = 0x00,
|
||||
CELL_AUDIO_IN_FS_8KHZ = 0x01,
|
||||
CELL_AUDIO_IN_FS_12KHZ = 0x02,
|
||||
CELL_AUDIO_IN_FS_16KHZ = 0x04,
|
||||
CELL_AUDIO_IN_FS_24KHZ = 0x08,
|
||||
CELL_AUDIO_IN_FS_32KHZ = 0x10,
|
||||
CELL_AUDIO_IN_FS_48KHZ = 0x20,
|
||||
};
|
||||
|
||||
struct CellAudioInSoundMode
|
||||
{
|
||||
u8 type;
|
||||
u8 channel;
|
||||
be_t<u16> fs;
|
||||
u8 reserved[4];
|
||||
};
|
||||
|
||||
struct CellAudioInDeviceInfo
|
||||
{
|
||||
u8 portType;
|
||||
u8 availableModeCount;
|
||||
u8 state;
|
||||
u8 deviceNumber;
|
||||
u8 reserved[12];
|
||||
be_t<u64> deviceId;
|
||||
be_t<u64> type;
|
||||
char name[64];
|
||||
CellAudioInSoundMode availableModes[16];
|
||||
};
|
||||
|
||||
struct CellAudioInRegistrationOption
|
||||
{
|
||||
//(Omitted)
|
||||
};
|
||||
|
||||
struct CellAudioInDeviceConfiguration
|
||||
{
|
||||
u8 volume;
|
||||
u8 reserved[31];
|
||||
};
|
179
rpcs3/Emu/SysCalls/Modules/cellAudioOut.h
Normal file
179
rpcs3/Emu/SysCalls/Modules/cellAudioOut.h
Normal file
@ -0,0 +1,179 @@
|
||||
#pragma once
|
||||
|
||||
namespace vm { using namespace ps3; }
|
||||
|
||||
// Error codes
|
||||
enum
|
||||
{
|
||||
CELL_AUDIO_OUT_ERROR_NOT_IMPLEMENTED = 0x8002b240,
|
||||
CELL_AUDIO_OUT_ERROR_ILLEGAL_CONFIGURATION = 0x8002b241,
|
||||
CELL_AUDIO_OUT_ERROR_ILLEGAL_PARAMETER = 0x8002b242,
|
||||
CELL_AUDIO_OUT_ERROR_PARAMETER_OUT_OF_RANGE = 0x8002b243,
|
||||
CELL_AUDIO_OUT_ERROR_DEVICE_NOT_FOUND = 0x8002b244,
|
||||
CELL_AUDIO_OUT_ERROR_UNSUPPORTED_AUDIO_OUT = 0x8002b245,
|
||||
CELL_AUDIO_OUT_ERROR_UNSUPPORTED_SOUND_MODE = 0x8002b246,
|
||||
CELL_AUDIO_OUT_ERROR_CONDITION_BUSY = 0x8002b247,
|
||||
};
|
||||
|
||||
|
||||
enum CellAudioOut
|
||||
{
|
||||
CELL_AUDIO_OUT_PRIMARY = 0,
|
||||
CELL_AUDIO_OUT_SECONDARY = 1,
|
||||
};
|
||||
|
||||
enum CellAudioOutDownMixer
|
||||
{
|
||||
CELL_AUDIO_OUT_DOWNMIXER_NONE = 0,
|
||||
CELL_AUDIO_OUT_DOWNMIXER_TYPE_A = 1,
|
||||
CELL_AUDIO_OUT_DOWNMIXER_TYPE_B = 2,
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
CELL_AUDIO_OUT_SINGLE_DEVICE_MODE = 0,
|
||||
CELL_AUDIO_OUT_MULTI_DEVICE_MODE = 1,
|
||||
CELL_AUDIO_OUT_MULTI_DEVICE_MODE_2 = 2,
|
||||
};
|
||||
|
||||
enum CellAudioOutPortType
|
||||
{
|
||||
CELL_AUDIO_OUT_PORT_HDMI = 0,
|
||||
CELL_AUDIO_OUT_PORT_SPDIF = 1,
|
||||
CELL_AUDIO_OUT_PORT_ANALOG = 2,
|
||||
CELL_AUDIO_OUT_PORT_USB = 3,
|
||||
CELL_AUDIO_OUT_PORT_BLUETOOTH = 4,
|
||||
CELL_AUDIO_OUT_PORT_NETWORK = 5,
|
||||
};
|
||||
|
||||
enum CellAudioOutDeviceState
|
||||
{
|
||||
CELL_AUDIO_OUT_DEVICE_STATE_UNAVAILABLE = 0,
|
||||
CELL_AUDIO_OUT_DEVICE_STATE_AVAILABLE = 1,
|
||||
};
|
||||
|
||||
enum CellAudioOutOutputState
|
||||
{
|
||||
CELL_AUDIO_OUT_OUTPUT_STATE_ENABLED = 0,
|
||||
CELL_AUDIO_OUT_OUTPUT_STATE_DISABLED = 1,
|
||||
CELL_AUDIO_OUT_OUTPUT_STATE_PREPARING = 2,
|
||||
};
|
||||
|
||||
enum CellAudioOutCodingType
|
||||
{
|
||||
CELL_AUDIO_OUT_CODING_TYPE_LPCM = 0,
|
||||
CELL_AUDIO_OUT_CODING_TYPE_AC3 = 1,
|
||||
CELL_AUDIO_OUT_CODING_TYPE_MPEG1 = 2,
|
||||
CELL_AUDIO_OUT_CODING_TYPE_MP3 = 3,
|
||||
CELL_AUDIO_OUT_CODING_TYPE_MPEG2 = 4,
|
||||
CELL_AUDIO_OUT_CODING_TYPE_AAC = 5,
|
||||
CELL_AUDIO_OUT_CODING_TYPE_DTS = 6,
|
||||
CELL_AUDIO_OUT_CODING_TYPE_ATRAC = 7,
|
||||
CELL_AUDIO_OUT_CODING_TYPE_BITSTREAM = 0xff,
|
||||
};
|
||||
|
||||
enum CellAudioOutChnum
|
||||
{
|
||||
CELL_AUDIO_OUT_CHNUM_2 = 2,
|
||||
CELL_AUDIO_OUT_CHNUM_4 = 4,
|
||||
CELL_AUDIO_OUT_CHNUM_6 = 6,
|
||||
CELL_AUDIO_OUT_CHNUM_8 = 8,
|
||||
};
|
||||
|
||||
enum CellAudioOutFs
|
||||
{
|
||||
CELL_AUDIO_OUT_FS_32KHZ = 0x01,
|
||||
CELL_AUDIO_OUT_FS_44KHZ = 0x02,
|
||||
CELL_AUDIO_OUT_FS_48KHZ = 0x04,
|
||||
CELL_AUDIO_OUT_FS_88KHZ = 0x08,
|
||||
CELL_AUDIO_OUT_FS_96KHZ = 0x10,
|
||||
CELL_AUDIO_OUT_FS_176KHZ = 0x20,
|
||||
CELL_AUDIO_OUT_FS_192KHZ = 0x40,
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
CELL_AUDIO_OUT_SPEAKER_LAYOUT_2CH = 0x00000001,
|
||||
CELL_AUDIO_OUT_SPEAKER_LAYOUT_6CH_LREClr = 0x00010000,
|
||||
CELL_AUDIO_OUT_SPEAKER_LAYOUT_8CH_LREClrxy = 0x40000000,
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
CELL_AUDIO_OUT_COPY_CONTROL_COPY_FREE = 0,
|
||||
CELL_AUDIO_OUT_COPY_CONTROL_COPY_ONCE = 1,
|
||||
CELL_AUDIO_OUT_COPY_CONTROL_COPY_NEVER = 2,
|
||||
};
|
||||
|
||||
|
||||
struct CellAudioOutConfiguration
|
||||
{
|
||||
u8 channel;
|
||||
u8 encoder;
|
||||
u8 reserved[10];
|
||||
be_t<u32> downMixer;
|
||||
};
|
||||
|
||||
struct CellAudioOutSoundMode
|
||||
{
|
||||
u8 type;
|
||||
u8 channel;
|
||||
u8 fs;
|
||||
u8 reserved;
|
||||
be_t<u32> layout;
|
||||
};
|
||||
|
||||
struct CellAudioOutDeviceInfo
|
||||
{
|
||||
u8 portType;
|
||||
u8 availableModeCount;
|
||||
u8 state;
|
||||
u8 reserved[3];
|
||||
be_t<u16> latency;
|
||||
CellAudioOutSoundMode availableModes[16];
|
||||
};
|
||||
|
||||
struct CellAudioOutState
|
||||
{
|
||||
u8 state;
|
||||
u8 encoder;
|
||||
u8 reserved[6];
|
||||
be_t<u32> downMixer;
|
||||
CellAudioOutSoundMode soundMode;
|
||||
};
|
||||
|
||||
struct CellAudioOutSoundMode2
|
||||
{
|
||||
u8 type;
|
||||
u8 channel;
|
||||
be_t<u16> fs;
|
||||
u8 reserved[4];
|
||||
};
|
||||
|
||||
struct CellAudioOutDeviceInfo2
|
||||
{
|
||||
u8 portType;
|
||||
u8 availableModeCount;
|
||||
u8 state;
|
||||
u8 deviceNumber;
|
||||
u8 reserved[12];
|
||||
be_t<u64> deviceId;
|
||||
be_t<u64> type;
|
||||
char name[64];
|
||||
CellAudioOutSoundMode2 availableModes2[16];
|
||||
};
|
||||
|
||||
struct CellAudioOutOption
|
||||
{
|
||||
//(Omitted)
|
||||
};
|
||||
|
||||
struct CellAudioOutRegistrationOption
|
||||
{
|
||||
//(Omitted)
|
||||
};
|
||||
|
||||
struct CellAudioOutDeviceConfiguration
|
||||
{
|
||||
//(Omitted)
|
||||
};
|
@ -4,6 +4,8 @@
|
||||
#include "Emu/SysCalls/Modules.h"
|
||||
#include "Emu/RSX/sysutil_video.h"
|
||||
|
||||
namespace vm { using namespace ps3; }
|
||||
|
||||
extern Module cellAvconfExt;
|
||||
|
||||
s32 cellVideoOutConvertCursorColor()
|
||||
|
@ -1,5 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
namespace vm { using namespace ps3; }
|
||||
|
||||
// Error Codes
|
||||
enum
|
||||
{
|
||||
|
@ -1,5 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
namespace vm { using namespace ps3; }
|
||||
|
||||
// Error Codes
|
||||
enum
|
||||
{
|
||||
|
@ -1,5 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
namespace vm { using namespace ps3; }
|
||||
|
||||
// Return Codes
|
||||
enum
|
||||
{
|
||||
|
@ -1,5 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
namespace vm { using namespace ps3; }
|
||||
|
||||
// Error codes
|
||||
enum
|
||||
{
|
||||
|
@ -1,5 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
namespace vm { using namespace ps3; }
|
||||
|
||||
struct CellFontLibraryConfigFT
|
||||
{
|
||||
u32 library_addr; //void*
|
||||
|
@ -1,5 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
namespace vm { using namespace ps3; }
|
||||
|
||||
struct CellFsDirectoryEntry
|
||||
{
|
||||
CellFsStat attribute;
|
||||
|
@ -1,5 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
namespace vm { using namespace ps3; }
|
||||
|
||||
// Return Codes
|
||||
enum
|
||||
{
|
||||
|
@ -7,6 +7,7 @@
|
||||
|
||||
//#include "Emu/RSX/GCM.h"
|
||||
#include "Emu/RSX/GSManager.h"
|
||||
#include "Emu/RSX/GSRender.h"
|
||||
//#include "Emu/SysCalls/lv2/sys_process.h"
|
||||
#include "cellGcmSys.h"
|
||||
|
||||
|
@ -1,4 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
namespace vm { using namespace ps3; }
|
||||
|
||||
#include "Emu/RSX/GCM.h"
|
||||
|
||||
enum
|
||||
|
@ -1,7 +1,8 @@
|
||||
#pragma once
|
||||
|
||||
// Had to use define, since enum doesn't allow floats
|
||||
#define CELL_GEM_SPHERE_RADIUS_MM = 22.5f;
|
||||
namespace vm { using namespace ps3; }
|
||||
|
||||
static const float CELL_GEM_SPHERE_RADIUS_MM = 22.5f;
|
||||
|
||||
// Error Codes
|
||||
enum
|
||||
|
@ -1,5 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
namespace vm { using namespace ps3; }
|
||||
|
||||
// Return Codes
|
||||
enum
|
||||
{
|
||||
|
@ -1,5 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
namespace vm { using namespace ps3; }
|
||||
|
||||
//Return Codes
|
||||
enum
|
||||
{
|
||||
|
@ -1,5 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
namespace vm { using namespace ps3; }
|
||||
|
||||
enum CELL_KB_ERROR_CODE
|
||||
{
|
||||
CELL_KB_ERROR_FATAL = 0x80121001,
|
||||
|
@ -33,7 +33,7 @@ s32 UTF16stoUTF8s(vm::ptr<const char16_t> utf16, vm::ref<u32> utf16_len, vm::ptr
|
||||
// return SRCIllegal;
|
||||
//}
|
||||
|
||||
if (utf8)
|
||||
if (utf8 != vm::null)
|
||||
{
|
||||
if (len > max_len)
|
||||
{
|
||||
|
@ -1,5 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
namespace vm { using namespace ps3; }
|
||||
|
||||
// L10nResult
|
||||
enum
|
||||
{
|
||||
|
@ -1,5 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
namespace vm { using namespace ps3; }
|
||||
|
||||
// Error Codes
|
||||
enum
|
||||
{
|
||||
@ -20,4 +22,4 @@ enum
|
||||
CELL_MICIN_ERROR_SYSTEM_NOT_FOUND = 0x8014010e,
|
||||
CELL_MICIN_ERROR_FATAL = 0x8014010f,
|
||||
CELL_MICIN_ERROR_DEVICE_NOT_SUPPORT = 0x80140110,
|
||||
};
|
||||
};
|
||||
|
@ -1,5 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
namespace vm { using namespace ps3; }
|
||||
|
||||
enum CELL_MOUSE_ERROR_CODE
|
||||
{
|
||||
CELL_MOUSE_ERROR_FATAL = 0x80121201,
|
||||
|
@ -1,5 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
namespace vm { using namespace ps3; }
|
||||
|
||||
enum
|
||||
{
|
||||
CELL_MSGDIALOG_ERROR_PARAM = 0x8002b301,
|
||||
|
@ -1,5 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
namespace vm { using namespace ps3; }
|
||||
|
||||
// Error Codes
|
||||
enum
|
||||
{
|
||||
|
@ -2,6 +2,8 @@
|
||||
#include "Emu/Memory/Memory.h"
|
||||
#include "Emu/SysCalls/Modules.h"
|
||||
|
||||
namespace vm { using namespace ps3; }
|
||||
|
||||
extern Module cellOvis;
|
||||
|
||||
// Return Codes
|
||||
|
@ -1,5 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
namespace vm { using namespace ps3; }
|
||||
|
||||
enum CELL_PAD_ERROR_CODE
|
||||
{
|
||||
CELL_PAD_ERROR_FATAL = 0x80121101,
|
||||
|
@ -1,5 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
namespace vm { using namespace ps3; }
|
||||
|
||||
// Error Codes
|
||||
enum
|
||||
{
|
||||
|
@ -1,5 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
namespace vm { using namespace ps3; }
|
||||
|
||||
enum CellPngTxtType
|
||||
{
|
||||
CELL_PNG_TEXT = 0,
|
||||
|
@ -1,4 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
namespace vm { using namespace ps3; }
|
||||
|
||||
#include "cellPng.h"
|
||||
|
||||
enum : u32
|
||||
|
@ -6,6 +6,7 @@
|
||||
#include "cellSysutil.h"
|
||||
#include "Emu/RSX/sysutil_video.h"
|
||||
#include "Emu/RSX/GSManager.h"
|
||||
#include "Emu/RSX/GSRender.h"
|
||||
#include "cellResc.h"
|
||||
|
||||
extern Module cellResc;
|
||||
|
@ -3,6 +3,8 @@
|
||||
#define roundup(x,a) (((x)+(a)-1)&(~((a)-1)))
|
||||
#define SEVIRITY 80.f
|
||||
|
||||
namespace vm { using namespace ps3; }
|
||||
|
||||
#include "Emu/RSX/GCM.h"
|
||||
|
||||
enum
|
||||
|
@ -1,5 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
namespace vm { using namespace ps3; }
|
||||
|
||||
// Return Codes
|
||||
enum
|
||||
{
|
||||
|
@ -1,3 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
namespace vm { using namespace ps3; }
|
||||
|
||||
// Return Codes
|
||||
enum
|
||||
{
|
||||
@ -42,11 +46,11 @@ enum
|
||||
CELL_RUDP_ERROR_KEEP_ALIVE_FAILURE = 0x80770026,
|
||||
};
|
||||
|
||||
typedef vm::ptr<u32>(CellRudpAllocatorFuncAlloc)(u32 size);
|
||||
typedef u32(CellRudpAllocatorFuncFree)(vm::ptr<u32> ptr);
|
||||
using CellRudpAllocatorFuncAlloc = func_def<vm::ptr<u32>(u32 size)>;
|
||||
using CellRudpAllocatorFuncFree = func_def<u32(vm::ptr<u32> ptr)>;
|
||||
|
||||
struct CellRudpAllocator
|
||||
{
|
||||
vm::ptr<CellRudpAllocatorFuncAlloc> app_malloc;
|
||||
vm::ptr<CellRudpAllocatorFuncFree> app_free;
|
||||
};
|
||||
vm::bptr<CellRudpAllocatorFuncAlloc> app_malloc;
|
||||
vm::bptr<CellRudpAllocatorFuncFree> app_free;
|
||||
};
|
||||
|
@ -1,5 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
namespace vm { using namespace ps3; }
|
||||
|
||||
// Error Codes
|
||||
enum
|
||||
{
|
||||
|
@ -1,5 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
namespace vm { using namespace ps3; }
|
||||
|
||||
// Return codes
|
||||
enum
|
||||
{
|
||||
|
@ -1,3 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
namespace vm { using namespace ps3; }
|
||||
|
||||
// Return Codes
|
||||
enum
|
||||
{
|
||||
@ -11,7 +15,7 @@ enum
|
||||
|
||||
struct CellScreenShotSetParam
|
||||
{
|
||||
const char *photo_title;
|
||||
const char *game_title;
|
||||
const char *game_comment;
|
||||
};
|
||||
vm::bcptr<char> photo_title;
|
||||
vm::bcptr<char> game_title;
|
||||
vm::bcptr<char> game_comment;
|
||||
};
|
||||
|
@ -1,3 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
namespace vm { using namespace ps3; }
|
||||
|
||||
// Error Codes
|
||||
enum
|
||||
{
|
||||
@ -162,7 +166,7 @@ enum CellSearchEvent
|
||||
CELL_SEARCH_EVENT_SCENESEARCH_RESULT,
|
||||
};
|
||||
|
||||
typedef void(CellSearchSystemCallback)(CellSearchEvent event, s32 result, vm::ptr<const u32> param, vm::ptr<u32> userData);
|
||||
using CellSearchSystemCallback = func_def<void(CellSearchEvent event, s32 result, vm::cptr<u32> param, vm::ptr<u32> userData)>;
|
||||
|
||||
struct CellSearchContentId
|
||||
{
|
||||
|
@ -17,7 +17,6 @@
|
||||
#include "Emu/SysCalls/lv2/sys_process.h"
|
||||
#include "Emu/SysCalls/lv2/sys_semaphore.h"
|
||||
#include "Emu/SysCalls/lv2/sys_event.h"
|
||||
#include "Emu/Cell/SPURSManager.h"
|
||||
#include "sysPrxForUser.h"
|
||||
#include "cellSpurs.h"
|
||||
|
||||
@ -111,7 +110,7 @@ s32 spursInit(
|
||||
u32 sem;
|
||||
for (u32 i = 0; i < 0x10; i++)
|
||||
{
|
||||
sem = Emu.GetIdManager().make<lv2_sema_t>(0, 1, SYS_SYNC_PRIORITY, *(u64*)"_spuWkl");
|
||||
sem = Emu.GetIdManager().make<lv2_sema_t>(SYS_SYNC_PRIORITY, 1, *(u64*)"_spuWkl", 0);
|
||||
assert(sem && ~sem); // should rollback if semaphore creation failed and return the error
|
||||
spurs->m.wklF1[i].sem = sem;
|
||||
}
|
||||
@ -119,12 +118,12 @@ s32 spursInit(
|
||||
{
|
||||
for (u32 i = 0; i < 0x10; i++)
|
||||
{
|
||||
sem = Emu.GetIdManager().make<lv2_sema_t>(0, 1, SYS_SYNC_PRIORITY, *(u64*)"_spuWkl");
|
||||
sem = Emu.GetIdManager().make<lv2_sema_t>(SYS_SYNC_PRIORITY, 1, *(u64*)"_spuWkl", 0);
|
||||
assert(sem && ~sem);
|
||||
spurs->m.wklF2[i].sem = sem;
|
||||
}
|
||||
}
|
||||
sem = Emu.GetIdManager().make<lv2_sema_t>(0, 1, SYS_SYNC_PRIORITY, *(u64*)"_spuPrv");
|
||||
sem = Emu.GetIdManager().make<lv2_sema_t>(SYS_SYNC_PRIORITY, 1, *(u64*)"_spuPrv", 0);
|
||||
assert(sem && ~sem);
|
||||
spurs->m.semPrv = sem;
|
||||
spurs->m.unk11 = -1;
|
||||
@ -1556,7 +1555,7 @@ s32 cellSpursEventFlagAttachLv2EventQueue(vm::ptr<CellSpursEventFlag> eventFlag)
|
||||
if (eventFlag->m.direction == CELL_SPURS_EVENT_FLAG_ANY2ANY)
|
||||
{
|
||||
vm::var<be_t<u32>> eventPortId;
|
||||
rc = sys_event_port_create(vm::ptr<u32>::make(eventPortId.addr()), SYS_EVENT_PORT_LOCAL, 0);
|
||||
rc = sys_event_port_create(vm::ref<u32>::make(eventPortId.addr()), SYS_EVENT_PORT_LOCAL, 0);
|
||||
if (rc == CELL_OK)
|
||||
{
|
||||
rc = sys_event_port_connect_local(eventPortId.value(), eventQueueId);
|
||||
|
@ -1,5 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
namespace vm { using namespace ps3; }
|
||||
|
||||
// Core return codes.
|
||||
enum
|
||||
{
|
||||
@ -292,11 +294,6 @@ struct CellSpursAttribute
|
||||
be_t<u32> swlMaxSpu; // 0x40
|
||||
be_t<u32> swlIsPreem; // 0x44
|
||||
} m;
|
||||
|
||||
// alternative implementation
|
||||
struct
|
||||
{
|
||||
} c;
|
||||
};
|
||||
};
|
||||
|
||||
@ -520,12 +517,6 @@ struct CellSpurs
|
||||
_sub_str1 wklF2[0x10]; // 0x1200
|
||||
_sub_str4 wklH2[0x10]; // 0x1A00
|
||||
} m;
|
||||
|
||||
// alternative implementation
|
||||
struct
|
||||
{
|
||||
SPURSManager *spurs;
|
||||
} c;
|
||||
};
|
||||
|
||||
force_inline atomic_be_t<u8>& wklState(const u32 wid)
|
||||
@ -614,8 +605,6 @@ struct CellSpursEventFlag
|
||||
be_t<u32> eventPortId; // 0x78
|
||||
be_t<u32> eventQueueId; // 0x7C
|
||||
} m;
|
||||
|
||||
SPURSManagerEventFlag *eventFlag;
|
||||
};
|
||||
};
|
||||
|
||||
@ -679,8 +668,6 @@ struct CellSpursTaskset
|
||||
u32 event_flag_id2; // 0x189C
|
||||
u8 unk3[0x60]; // 0x18A0
|
||||
} m;
|
||||
|
||||
SPURSManagerTaskset *taskset;
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -1,2 +1,3 @@
|
||||
#pragma once
|
||||
|
||||
namespace vm { using namespace ps3; }
|
||||
|
@ -1,5 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
namespace vm { using namespace ps3; }
|
||||
|
||||
// Return Codes
|
||||
enum
|
||||
{
|
||||
@ -58,8 +60,8 @@ struct CellSubDisplayParam
|
||||
be_t<s32> mode;
|
||||
be_t<s32> nGroup;
|
||||
be_t<s32> nPeer;
|
||||
vm::ptr<CellSubDisplayVideoParam> videoParam;
|
||||
vm::ptr<CellSubDisplayAudioParam> audioParam;
|
||||
vm::bptr<CellSubDisplayVideoParam> videoParam;
|
||||
vm::bptr<CellSubDisplayAudioParam> audioParam;
|
||||
};
|
||||
|
||||
struct CellSubDisplayPSPId
|
||||
@ -80,4 +82,4 @@ struct CellSubDisplayPeerInfo
|
||||
CellSubDisplayNickname pspNickname;
|
||||
};
|
||||
|
||||
typedef void(*CellSubDisplayHandler)(s32 cbMsg, u64 cbParam, u32 *userdata);
|
||||
using CellSubDisplayHandler = func_def<void(s32 cbMsg, u64 cbParam, vm::ptr<void> userdata)>;
|
||||
|
@ -1,5 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
namespace vm { using namespace ps3; }
|
||||
|
||||
// Return Codes
|
||||
enum
|
||||
{
|
||||
|
@ -1,5 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
namespace vm { using namespace ps3; }
|
||||
|
||||
// Return Codes
|
||||
enum
|
||||
{
|
||||
|
@ -4,6 +4,8 @@
|
||||
#include "Emu/SysCalls/ModuleManager.h"
|
||||
#include "Emu/SysCalls/Modules.h"
|
||||
|
||||
namespace vm { using namespace ps3; }
|
||||
|
||||
extern Module cellSysmodule;
|
||||
|
||||
enum
|
||||
|
@ -10,12 +10,13 @@
|
||||
#include "rpcs3/Ini.h"
|
||||
#include "Emu/FS/vfsFile.h"
|
||||
#include "Loader/PSF.h"
|
||||
#include "Emu/Audio/sysutil_audio.h"
|
||||
#include "Emu/RSX/sysutil_video.h"
|
||||
#include "Emu/RSX/GSManager.h"
|
||||
#include "Emu/Audio/AudioManager.h"
|
||||
#include "Emu/FS/VFS.h"
|
||||
#include "cellMsgDialog.h"
|
||||
#include "cellAudioIn.h"
|
||||
#include "cellAudioOut.h"
|
||||
#include "cellSysutil.h"
|
||||
|
||||
extern Module cellSysutil;
|
||||
@ -479,21 +480,21 @@ int cellAudioOutGetState(u32 audioOut, u32 deviceIndex, vm::ptr<CellAudioOutStat
|
||||
switch(audioOut)
|
||||
{
|
||||
case CELL_AUDIO_OUT_PRIMARY:
|
||||
state->state = Emu.GetAudioManager().GetState();
|
||||
state->encoder = Emu.GetAudioManager().GetInfo().mode.encoder;
|
||||
state->downMixer = Emu.GetAudioManager().GetInfo().mode.downMixer;
|
||||
state->soundMode.type = Emu.GetAudioManager().GetInfo().mode.type;
|
||||
state->soundMode.channel = Emu.GetAudioManager().GetInfo().mode.channel;
|
||||
state->soundMode.fs = Emu.GetAudioManager().GetInfo().mode.fs;
|
||||
state->state = CELL_AUDIO_OUT_OUTPUT_STATE_ENABLED;
|
||||
state->encoder = CELL_AUDIO_OUT_CODING_TYPE_LPCM;
|
||||
state->downMixer = CELL_AUDIO_OUT_DOWNMIXER_NONE;
|
||||
state->soundMode.type = CELL_AUDIO_OUT_CODING_TYPE_LPCM;
|
||||
state->soundMode.channel = CELL_AUDIO_OUT_CHNUM_8;
|
||||
state->soundMode.fs = CELL_AUDIO_OUT_FS_48KHZ;
|
||||
state->soundMode.reserved = 0;
|
||||
state->soundMode.layout = Emu.GetAudioManager().GetInfo().mode.layout;
|
||||
state->soundMode.layout = CELL_AUDIO_OUT_SPEAKER_LAYOUT_8CH_LREClrxy;
|
||||
|
||||
return CELL_AUDIO_OUT_SUCCEEDED;
|
||||
return CELL_OK;
|
||||
|
||||
case CELL_AUDIO_OUT_SECONDARY:
|
||||
state->state = CELL_AUDIO_OUT_OUTPUT_STATE_DISABLED;
|
||||
|
||||
return CELL_AUDIO_OUT_SUCCEEDED;
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
return CELL_AUDIO_OUT_ERROR_UNSUPPORTED_AUDIO_OUT;
|
||||
@ -509,20 +510,20 @@ int cellAudioOutConfigure(u32 audioOut, vm::ptr<CellAudioOutConfiguration> confi
|
||||
case CELL_AUDIO_OUT_PRIMARY:
|
||||
if (config->channel)
|
||||
{
|
||||
Emu.GetAudioManager().GetInfo().mode.channel = config->channel;
|
||||
//Emu.GetAudioManager().GetInfo().mode.channel = config->channel;
|
||||
}
|
||||
|
||||
Emu.GetAudioManager().GetInfo().mode.encoder = config->encoder;
|
||||
//Emu.GetAudioManager().GetInfo().mode.encoder = config->encoder;
|
||||
|
||||
if(config->downMixer)
|
||||
{
|
||||
Emu.GetAudioManager().GetInfo().mode.downMixer = config->downMixer;
|
||||
//Emu.GetAudioManager().GetInfo().mode.downMixer = config->downMixer;
|
||||
}
|
||||
|
||||
return CELL_AUDIO_OUT_SUCCEEDED;
|
||||
return CELL_OK;
|
||||
|
||||
case CELL_AUDIO_OUT_SECONDARY:
|
||||
return CELL_AUDIO_OUT_SUCCEEDED;
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
return CELL_AUDIO_OUT_ERROR_UNSUPPORTED_AUDIO_OUT;
|
||||
@ -538,15 +539,15 @@ int cellAudioOutGetConfiguration(u32 audioOut, vm::ptr<CellAudioOutConfiguration
|
||||
switch(audioOut)
|
||||
{
|
||||
case CELL_AUDIO_OUT_PRIMARY:
|
||||
config->channel = Emu.GetAudioManager().GetInfo().mode.channel;
|
||||
config->encoder = Emu.GetAudioManager().GetInfo().mode.encoder;
|
||||
config->downMixer = Emu.GetAudioManager().GetInfo().mode.downMixer;
|
||||
config->channel = CELL_AUDIO_OUT_CHNUM_8;
|
||||
config->encoder = CELL_AUDIO_OUT_CODING_TYPE_LPCM;
|
||||
config->downMixer = CELL_AUDIO_OUT_DOWNMIXER_NONE;
|
||||
|
||||
return CELL_AUDIO_OUT_SUCCEEDED;
|
||||
return CELL_OK;
|
||||
|
||||
case CELL_AUDIO_OUT_SECONDARY:
|
||||
|
||||
return CELL_AUDIO_OUT_SUCCEEDED;
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
return CELL_AUDIO_OUT_ERROR_UNSUPPORTED_AUDIO_OUT;
|
||||
@ -580,7 +581,7 @@ int cellAudioOutGetDeviceInfo(u32 audioOut, u32 deviceIndex, vm::ptr<CellAudioOu
|
||||
info->availableModes[0].fs = CELL_AUDIO_OUT_FS_48KHZ;
|
||||
info->availableModes[0].layout = CELL_AUDIO_OUT_SPEAKER_LAYOUT_8CH_LREClrxy;
|
||||
|
||||
return CELL_AUDIO_OUT_SUCCEEDED;
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
int cellAudioOutSetCopyControl(u32 audioOut, u32 control)
|
||||
@ -606,7 +607,7 @@ int cellAudioOutSetCopyControl(u32 audioOut, u32 control)
|
||||
default: return CELL_AUDIO_OUT_ERROR_ILLEGAL_PARAMETER;
|
||||
}
|
||||
|
||||
return CELL_AUDIO_OUT_SUCCEEDED;
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,5 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
namespace vm { using namespace ps3; }
|
||||
|
||||
enum
|
||||
{
|
||||
CELL_SYSUTIL_ERROR_TYPE = 0x8002b101,
|
||||
@ -218,3 +220,39 @@ struct CellWebBrowserConfig2
|
||||
be_t<float> resolution_factor;
|
||||
be_t<s32> magic_number_;
|
||||
};
|
||||
|
||||
enum CellSysutilBgmPlaybackStatusState
|
||||
{
|
||||
CELL_SYSUTIL_BGMPLAYBACK_STATUS_PLAY = 0,
|
||||
CELL_SYSUTIL_BGMPLAYBACK_STATUS_STOP = 1
|
||||
};
|
||||
|
||||
enum CellSysutilBgmPlaybackStatusEnabled
|
||||
{
|
||||
CELL_SYSUTIL_BGMPLAYBACK_STATUS_ENABLE = 0,
|
||||
CELL_SYSUTIL_BGMPLAYBACK_STATUS_DISABLE = 1
|
||||
};
|
||||
|
||||
struct CellSysutilBgmPlaybackStatus
|
||||
{
|
||||
u8 playerState;
|
||||
u8 enableState;
|
||||
char contentId[16];
|
||||
u8 currentFadeRatio;
|
||||
char reserved[13];
|
||||
};
|
||||
|
||||
struct CellSysutilBgmPlaybackStatus2
|
||||
{
|
||||
u8 playerState;
|
||||
char reserved[7];
|
||||
};
|
||||
|
||||
struct CellSysutilBgmPlaybackExtraParam
|
||||
{
|
||||
be_t<s32> systemBgmFadeInTime;
|
||||
be_t<s32> systemBgmFadeOutTime;
|
||||
be_t<s32> gameBgmFadeInTime;
|
||||
be_t<s32> gameBgmFadeOutTime;
|
||||
char reserved[8];
|
||||
};
|
||||
|
@ -2,6 +2,8 @@
|
||||
#include "Emu/Memory/Memory.h"
|
||||
#include "Emu/SysCalls/Modules.h"
|
||||
|
||||
namespace vm { using namespace ps3; }
|
||||
|
||||
extern Module cellSysutilAp;
|
||||
|
||||
// Return Codes
|
||||
|
@ -1,3 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
namespace vm { using namespace ps3; }
|
||||
|
||||
// Return Codes
|
||||
enum
|
||||
{
|
||||
@ -36,4 +40,4 @@ enum
|
||||
USBD_HC_CC_XACT = 0x2,
|
||||
USBD_HC_CC_BABBLE = 0x4,
|
||||
USBD_HC_CC_DATABUF = 0x8,
|
||||
};
|
||||
};
|
||||
|
@ -1,5 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
namespace vm { using namespace ps3; }
|
||||
|
||||
// Return Codes
|
||||
enum
|
||||
{
|
||||
|
@ -1,5 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
namespace vm { using namespace ps3; }
|
||||
|
||||
// Error Codes
|
||||
enum
|
||||
{
|
||||
|
@ -3,6 +3,8 @@
|
||||
#include "Emu/System.h"
|
||||
#include "Emu/SysCalls/Modules.h"
|
||||
|
||||
namespace vm { using namespace ps3; }
|
||||
|
||||
extern Module cellVoice;
|
||||
|
||||
// Error Codes
|
||||
|
@ -1,5 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
namespace vm { using namespace ps3; }
|
||||
|
||||
// Error Codes
|
||||
enum
|
||||
{
|
||||
@ -325,4 +327,4 @@ public:
|
||||
: to_rgba(rgba)
|
||||
{
|
||||
}
|
||||
};
|
||||
};
|
||||
|
@ -1,5 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
namespace vm { using namespace ps3; }
|
||||
|
||||
// Error Codes
|
||||
enum
|
||||
{
|
||||
|
@ -1,4 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
namespace vm { using namespace ps3; }
|
||||
|
||||
#include "cellRtc.h"
|
||||
|
||||
// Error Codes
|
||||
|
@ -1,5 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
namespace vm { using namespace ps3; }
|
||||
|
||||
// Return codes
|
||||
enum
|
||||
{
|
||||
|
@ -1,4 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
namespace vm { using namespace ps3; }
|
||||
|
||||
#include "cellRtc.h"
|
||||
|
||||
// Return codes
|
||||
|
@ -1,5 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
namespace vm { using namespace ps3; }
|
||||
|
||||
// Return codes
|
||||
enum
|
||||
{
|
||||
|
@ -1,5 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
namespace vm { using namespace ps3; }
|
||||
|
||||
// Error codes
|
||||
enum
|
||||
{
|
||||
|
@ -1,4 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
namespace vm { using namespace ps3; }
|
||||
|
||||
#include "cellRtc.h"
|
||||
|
||||
// Constants for TUS functions and structures
|
||||
|
@ -1,5 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
namespace vm { using namespace ps3; }
|
||||
|
||||
struct HeapInfo
|
||||
{
|
||||
const std::string name;
|
||||
|
@ -4,6 +4,8 @@
|
||||
#include "Emu/SysCalls/Modules.h"
|
||||
#include "Emu/Cell/PPUInstrTable.h"
|
||||
|
||||
namespace vm { using namespace ps3; }
|
||||
|
||||
extern Module sys_libc;
|
||||
|
||||
namespace sys_libc_func
|
||||
|
@ -1,5 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
namespace vm { using namespace ps3; }
|
||||
|
||||
struct sys_net_initialize_parameter
|
||||
{
|
||||
be_t<u32> memory_addr;
|
||||
|
@ -1,5 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
namespace vm { using namespace ps3; }
|
||||
|
||||
//error codes
|
||||
enum AudioErrorCode
|
||||
{
|
@ -4,7 +4,7 @@
|
||||
#include "Utilities/AutoPause.h"
|
||||
#include "Emu/Memory/Memory.h"
|
||||
#include "Emu/System.h"
|
||||
#include "ModuleManager.h"
|
||||
#include "Modules.h"
|
||||
|
||||
#include "lv2/sleep_queue.h"
|
||||
#include "lv2/sys_lwmutex.h"
|
||||
|
@ -1,5 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
namespace vm { using namespace ps3; }
|
||||
|
||||
// attr_protocol (waiting scheduling policy)
|
||||
enum
|
||||
{
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
SysCallBase sys_cond("sys_cond");
|
||||
|
||||
s32 sys_cond_create(vm::ptr<u32> cond_id, u32 mutex_id, vm::ptr<sys_cond_attribute_t> attr)
|
||||
s32 sys_cond_create(vm::ref<u32> cond_id, u32 mutex_id, vm::ptr<sys_cond_attribute_t> attr)
|
||||
{
|
||||
sys_cond.Warning("sys_cond_create(cond_id=*0x%x, mutex_id=0x%x, attr=*0x%x)", cond_id, mutex_id, attr);
|
||||
|
||||
@ -37,7 +37,7 @@ s32 sys_cond_create(vm::ptr<u32> cond_id, u32 mutex_id, vm::ptr<sys_cond_attribu
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
|
||||
*cond_id = Emu.GetIdManager().make<lv2_cond_t>(mutex, attr->name_u64);
|
||||
cond_id = Emu.GetIdManager().make<lv2_cond_t>(mutex, attr->name_u64);
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
@ -1,5 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
namespace vm { using namespace ps3; }
|
||||
|
||||
struct lv2_mutex_t;
|
||||
|
||||
struct sys_cond_attribute_t
|
||||
@ -40,7 +42,7 @@ REG_ID_TYPE(lv2_cond_t, 0x86); // SYS_COND_OBJECT
|
||||
class PPUThread;
|
||||
|
||||
// SysCalls
|
||||
s32 sys_cond_create(vm::ptr<u32> cond_id, u32 mutex_id, vm::ptr<sys_cond_attribute_t> attr);
|
||||
s32 sys_cond_create(vm::ref<u32> cond_id, u32 mutex_id, vm::ptr<sys_cond_attribute_t> attr);
|
||||
s32 sys_cond_destroy(u32 cond_id);
|
||||
s32 sys_cond_wait(PPUThread& CPU, u32 cond_id, u64 timeout);
|
||||
s32 sys_cond_signal(u32 cond_id);
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
SysCallBase sys_event("sys_event");
|
||||
|
||||
s32 sys_event_queue_create(vm::ptr<u32> equeue_id, vm::ptr<sys_event_queue_attr> attr, u64 event_queue_key, s32 size)
|
||||
s32 sys_event_queue_create(vm::ref<u32> equeue_id, vm::ptr<sys_event_queue_attr> attr, u64 event_queue_key, s32 size)
|
||||
{
|
||||
sys_event.Warning("sys_event_queue_create(equeue_id=*0x%x, attr=*0x%x, event_queue_key=0x%llx, size=%d)", equeue_id, attr, event_queue_key, size);
|
||||
|
||||
@ -47,7 +47,7 @@ s32 sys_event_queue_create(vm::ptr<u32> equeue_id, vm::ptr<sys_event_queue_attr>
|
||||
return CELL_EEXIST;
|
||||
}
|
||||
|
||||
*equeue_id = Emu.GetIdManager().add(std::move(queue));
|
||||
equeue_id = Emu.GetIdManager().add(std::move(queue));
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
@ -91,7 +91,7 @@ s32 sys_event_queue_destroy(u32 equeue_id, s32 mode)
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 sys_event_queue_tryreceive(u32 equeue_id, vm::ptr<sys_event_t> event_array, s32 size, vm::ptr<u32> number)
|
||||
s32 sys_event_queue_tryreceive(u32 equeue_id, vm::ptr<sys_event_t> event_array, s32 size, vm::ref<u32> number)
|
||||
{
|
||||
sys_event.Log("sys_event_queue_tryreceive(equeue_id=0x%x, event_array=*0x%x, size=%d, number=*0x%x)", equeue_id, event_array, size, number);
|
||||
|
||||
@ -124,7 +124,7 @@ s32 sys_event_queue_tryreceive(u32 equeue_id, vm::ptr<sys_event_t> event_array,
|
||||
queue->events.pop_front();
|
||||
}
|
||||
|
||||
*number = count;
|
||||
number = count;
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
@ -206,7 +206,7 @@ s32 sys_event_queue_drain(u32 equeue_id)
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 sys_event_port_create(vm::ptr<u32> eport_id, s32 port_type, u64 name)
|
||||
s32 sys_event_port_create(vm::ref<u32> eport_id, s32 port_type, u64 name)
|
||||
{
|
||||
sys_event.Warning("sys_event_port_create(eport_id=*0x%x, port_type=%d, name=0x%llx)", eport_id, port_type, name);
|
||||
|
||||
@ -216,7 +216,7 @@ s32 sys_event_port_create(vm::ptr<u32> eport_id, s32 port_type, u64 name)
|
||||
return CELL_EINVAL;
|
||||
}
|
||||
|
||||
*eport_id = Emu.GetIdManager().make<lv2_event_port_t>(port_type, name);
|
||||
eport_id = Emu.GetIdManager().make<lv2_event_port_t>(port_type, name);
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user