mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-09 00:11:24 +12:00
Minor changes, some bugs fixed
cellVdec headers, cellFsAioRead review, sync stuff review, cellAdec and cellVpost
This commit is contained in:
parent
d6fe398f79
commit
9351e50f63
19 changed files with 969 additions and 270 deletions
|
@ -35,6 +35,11 @@ public:
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void initialize()
|
||||||
|
{
|
||||||
|
(T&)owner = free_value;
|
||||||
|
}
|
||||||
|
|
||||||
~SMutexBase()
|
~SMutexBase()
|
||||||
{
|
{
|
||||||
lock((T)dead_value);
|
lock((T)dead_value);
|
||||||
|
@ -46,6 +51,16 @@ public:
|
||||||
return (T&)owner;
|
return (T&)owner;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
__forceinline T GetFreeValue() const
|
||||||
|
{
|
||||||
|
return (T)free_value;
|
||||||
|
}
|
||||||
|
|
||||||
|
__forceinline T GetDeadValue() const
|
||||||
|
{
|
||||||
|
return (T)dead_value;
|
||||||
|
}
|
||||||
|
|
||||||
SMutexResult trylock(T tid)
|
SMutexResult trylock(T tid)
|
||||||
{
|
{
|
||||||
if (Emu.IsStopped())
|
if (Emu.IsStopped())
|
||||||
|
|
|
@ -1,20 +1,11 @@
|
||||||
#include "stdafx.h"
|
#include "stdafx.h"
|
||||||
#include "Emu/SysCalls/SysCalls.h"
|
#include "Emu/SysCalls/SysCalls.h"
|
||||||
#include "Emu/SysCalls/SC_FUNC.h"
|
#include "Emu/SysCalls/SC_FUNC.h"
|
||||||
|
#include "cellAdec.h"
|
||||||
|
|
||||||
void cellAdec_init();
|
void cellAdec_init();
|
||||||
Module cellAdec(0x0006, cellAdec_init);
|
Module cellAdec(0x0006, cellAdec_init);
|
||||||
|
|
||||||
// Error Codes
|
|
||||||
enum
|
|
||||||
{
|
|
||||||
CELL_ADEC_ERROR_FATAL = 0x80610001,
|
|
||||||
CELL_ADEC_ERROR_SEQ = 0x80610002,
|
|
||||||
CELL_ADEC_ERROR_ARG = 0x80610003,
|
|
||||||
CELL_ADEC_ERROR_BUSY = 0x80610004,
|
|
||||||
CELL_ADEC_ERROR_EMPTY = 0x80610005,
|
|
||||||
};
|
|
||||||
|
|
||||||
int cellAdecQueryAttr()
|
int cellAdecQueryAttr()
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED_FUNC(cellAdec);
|
UNIMPLEMENTED_FUNC(cellAdec);
|
||||||
|
|
11
rpcs3/Emu/SysCalls/Modules/cellAdec.h
Normal file
11
rpcs3/Emu/SysCalls/Modules/cellAdec.h
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
// Error Codes
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
CELL_ADEC_ERROR_FATAL = 0x80610001,
|
||||||
|
CELL_ADEC_ERROR_SEQ = 0x80610002,
|
||||||
|
CELL_ADEC_ERROR_ARG = 0x80610003,
|
||||||
|
CELL_ADEC_ERROR_BUSY = 0x80610004,
|
||||||
|
CELL_ADEC_ERROR_EMPTY = 0x80610005,
|
||||||
|
};
|
|
@ -7,142 +7,142 @@
|
||||||
void cellDmux_init();
|
void cellDmux_init();
|
||||||
Module cellDmux(0x0007, cellDmux_init);
|
Module cellDmux(0x0007, cellDmux_init);
|
||||||
|
|
||||||
int cellDmuxQueryAttr(mem_ptr_t<CellDmuxType> demuxerType, mem_ptr_t<CellDmuxAttr> demuxerAttr)
|
int cellDmuxQueryAttr(const mem_ptr_t<CellDmuxType> demuxerType, mem_ptr_t<CellDmuxAttr> demuxerAttr)
|
||||||
{
|
{
|
||||||
cellDmux.Error("cellDmuxQueryAttr(demuxerType_addr=0x%x, demuxerAttr_addr=0x%x)", demuxerType.GetAddr(), demuxerAttr.GetAddr());
|
cellDmux.Error("cellDmuxQueryAttr(demuxerType_addr=0x%x, demuxerAttr_addr=0x%x)", demuxerType.GetAddr(), demuxerAttr.GetAddr());
|
||||||
return CELL_OK;
|
return CELL_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
int cellDmuxQueryAttr2(mem_ptr_t<CellDmuxType2> demuxerType2, mem_ptr_t<CellDmuxAttr> demuxerAttr)
|
int cellDmuxQueryAttr2(const mem_ptr_t<CellDmuxType2> demuxerType2, mem_ptr_t<CellDmuxAttr> demuxerAttr)
|
||||||
{
|
{
|
||||||
cellDmux.Error("cellDmuxQueryAttr2(demuxerType2_addr=0x%x, demuxerAttr_addr=0x%x)", demuxerType2.GetAddr(), demuxerAttr.GetAddr());
|
cellDmux.Error("cellDmuxQueryAttr2(demuxerType2_addr=0x%x, demuxerAttr_addr=0x%x)", demuxerType2.GetAddr(), demuxerAttr.GetAddr());
|
||||||
return CELL_OK;
|
return CELL_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
int cellDmuxOpen(mem_ptr_t<CellDmuxType> demuxerType, mem_ptr_t<CellDmuxResource> demuxerResource,
|
int cellDmuxOpen(const mem_ptr_t<CellDmuxType> demuxerType, const mem_ptr_t<CellDmuxResource> demuxerResource,
|
||||||
mem_ptr_t<CellDmuxCb> demuxerCb, u32 demuxerHandle_addr)
|
const mem_ptr_t<CellDmuxCb> demuxerCb, mem32_t demuxerHandle)
|
||||||
{
|
{
|
||||||
cellDmux.Error("cellDmuxOpen(demuxerType_addr=0x%x, demuxerResource_addr=0x%x, demuxerCb_addr=0x%x, demuxerHandle_addr=0x%x)",
|
cellDmux.Error("cellDmuxOpen(demuxerType_addr=0x%x, demuxerResource_addr=0x%x, demuxerCb_addr=0x%x, demuxerHandle_addr=0x%x)",
|
||||||
demuxerType.GetAddr(), demuxerResource.GetAddr(), demuxerCb.GetAddr(), demuxerHandle_addr);
|
demuxerType.GetAddr(), demuxerResource.GetAddr(), demuxerCb.GetAddr(), demuxerHandle.GetAddr());
|
||||||
return CELL_OK;
|
return CELL_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
int cellDmuxOpenEx(mem_ptr_t<CellDmuxType> demuxerType, mem_ptr_t<CellDmuxResourceEx> demuxerResourceEx,
|
int cellDmuxOpenEx(const mem_ptr_t<CellDmuxType> demuxerType, const mem_ptr_t<CellDmuxResourceEx> demuxerResourceEx,
|
||||||
mem_ptr_t<CellDmuxCb> demuxerCb, u32 demuxerHandle_addr)
|
const mem_ptr_t<CellDmuxCb> demuxerCb, mem32_t demuxerHandle)
|
||||||
{
|
{
|
||||||
cellDmux.Error("cellDmuxOpenEx(demuxerType_addr=0x%x, demuxerResourceEx_addr=0x%x, demuxerCb_addr=0x%x, demuxerHandle_addr=0x%x)",
|
cellDmux.Error("cellDmuxOpenEx(demuxerType_addr=0x%x, demuxerResourceEx_addr=0x%x, demuxerCb_addr=0x%x, demuxerHandle_addr=0x%x)",
|
||||||
demuxerType.GetAddr(), demuxerResourceEx.GetAddr(), demuxerCb.GetAddr(), demuxerHandle_addr);
|
demuxerType.GetAddr(), demuxerResourceEx.GetAddr(), demuxerCb.GetAddr(), demuxerHandle.GetAddr());
|
||||||
return CELL_OK;
|
return CELL_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
int cellDmuxOpen2(mem_ptr_t<CellDmuxType2> demuxerType2, mem_ptr_t<CellDmuxResource2> demuxerResource2,
|
int cellDmuxOpen2(const mem_ptr_t<CellDmuxType2> demuxerType2, const mem_ptr_t<CellDmuxResource2> demuxerResource2,
|
||||||
mem_ptr_t<CellDmuxCb> demuxerCb, u32 demuxerHandle_addr)
|
const mem_ptr_t<CellDmuxCb> demuxerCb, mem32_t demuxerHandle)
|
||||||
{
|
{
|
||||||
cellDmux.Error("cellDmuxOpen2(demuxerType2_addr=0x%x, demuxerResource2_addr=0x%x, demuxerCb_addr=0x%x, demuxerHandle_addr=0x%x)",
|
cellDmux.Error("cellDmuxOpen2(demuxerType2_addr=0x%x, demuxerResource2_addr=0x%x, demuxerCb_addr=0x%x, demuxerHandle_addr=0x%x)",
|
||||||
demuxerType2.GetAddr(), demuxerResource2.GetAddr(), demuxerCb.GetAddr(), demuxerHandle_addr);
|
demuxerType2.GetAddr(), demuxerResource2.GetAddr(), demuxerCb.GetAddr(), demuxerHandle.GetAddr());
|
||||||
return CELL_OK;
|
return CELL_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
int cellDmuxClose(u32 demuxerHandle_addr)
|
int cellDmuxClose(u32 demuxerHandle)
|
||||||
{
|
{
|
||||||
cellDmux.Error("cellDmuxClose(demuxerHandle_addr=0x%x)", demuxerHandle_addr);
|
cellDmux.Error("cellDmuxClose(demuxerHandle=0x%x)", demuxerHandle);
|
||||||
return CELL_OK;
|
return CELL_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
int cellDmuxSetStream(u32 demuxerHandle_addr, u32 streamAddress, u32 streamSize, bool discontinuity, u64 userData)
|
int cellDmuxSetStream(u32 demuxerHandle, const u32 streamAddress, u32 streamSize, bool discontinuity, u64 userData)
|
||||||
{
|
{
|
||||||
cellDmux.Error("cellDmuxSetStream(demuxerHandle_addr=0x%x, streamAddress=0x%x, streamSize=%d, discontinuity=%d, userData=0x%llx",
|
cellDmux.Error("cellDmuxSetStream(demuxerHandle=0x%x, streamAddress=0x%x, streamSize=%d, discontinuity=%d, userData=0x%llx",
|
||||||
demuxerHandle_addr, streamAddress, streamSize, discontinuity, userData);
|
demuxerHandle, streamAddress, streamSize, discontinuity, userData);
|
||||||
return CELL_OK;
|
return CELL_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
int cellDmuxResetStream(u32 demuxerHandle_addr)
|
int cellDmuxResetStream(u32 demuxerHandle)
|
||||||
{
|
{
|
||||||
cellDmux.Error("cellDmuxResetStream(demuxerHandle_addr=0x%x)", demuxerHandle_addr);
|
cellDmux.Error("cellDmuxResetStream(demuxerHandle=0x%x)", demuxerHandle);
|
||||||
return CELL_OK;
|
return CELL_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
int cellDmuxResetStreamAndWaitDone(u32 demuxerHandle_addr)
|
int cellDmuxResetStreamAndWaitDone(u32 demuxerHandle)
|
||||||
{
|
{
|
||||||
cellDmux.Error("cellDmuxResetStreamAndWaitDone(demuxerHandle_addr=0x%x)", demuxerHandle_addr);
|
cellDmux.Error("cellDmuxResetStreamAndWaitDone(demuxerHandle=0x%x)", demuxerHandle);
|
||||||
return CELL_OK;
|
return CELL_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
int cellDmuxQueryEsAttr(mem_ptr_t<CellDmuxType> demuxerType, mem_ptr_t<CellCodecEsFilterId> esFilterId,
|
int cellDmuxQueryEsAttr(const mem_ptr_t<CellDmuxType> demuxerType, const mem_ptr_t<CellCodecEsFilterId> esFilterId,
|
||||||
u32 esSpecificInfo_addr, mem_ptr_t<CellDmuxEsAttr> esAttr)
|
const u32 esSpecificInfo_addr, mem_ptr_t<CellDmuxEsAttr> esAttr)
|
||||||
{
|
{
|
||||||
cellDmux.Error("cellDmuxQueryEsAttr(demuxerType_addr=0x%x, esFilterId_addr=0x%x, esSpecificInfo_addr=0x%x, esAttr_addr=0x%x)",
|
cellDmux.Error("cellDmuxQueryEsAttr(demuxerType_addr=0x%x, esFilterId_addr=0x%x, esSpecificInfo_addr=0x%x, esAttr_addr=0x%x)",
|
||||||
demuxerType.GetAddr(), esFilterId.GetAddr(), esSpecificInfo_addr, esAttr.GetAddr());
|
demuxerType.GetAddr(), esFilterId.GetAddr(), esSpecificInfo_addr, esAttr.GetAddr());
|
||||||
return CELL_OK;
|
return CELL_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
int cellDmuxQueryEsAttr2(mem_ptr_t<CellDmuxType2> demuxerType2, mem_ptr_t<CellCodecEsFilterId> esFilterId,
|
int cellDmuxQueryEsAttr2(const mem_ptr_t<CellDmuxType2> demuxerType2, const mem_ptr_t<CellCodecEsFilterId> esFilterId,
|
||||||
u32 esSpecificInfo_addr, mem_ptr_t<CellDmuxEsAttr> esAttr)
|
const u32 esSpecificInfo_addr, mem_ptr_t<CellDmuxEsAttr> esAttr)
|
||||||
{
|
{
|
||||||
cellDmux.Error("cellDmuxQueryEsAttr2(demuxerType2_addr=0x%x, esFilterId_addr=0x%x, esSpecificInfo_addr=0x%x, esAttr_addr=0x%x)",
|
cellDmux.Error("cellDmuxQueryEsAttr2(demuxerType2_addr=0x%x, esFilterId_addr=0x%x, esSpecificInfo_addr=0x%x, esAttr_addr=0x%x)",
|
||||||
demuxerType2.GetAddr(), esFilterId.GetAddr(), esSpecificInfo_addr, esAttr.GetAddr());
|
demuxerType2.GetAddr(), esFilterId.GetAddr(), esSpecificInfo_addr, esAttr.GetAddr());
|
||||||
return CELL_OK;
|
return CELL_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
int cellDmuxEnableEs(u32 demuxerHandle_addr, mem_ptr_t<CellCodecEsFilterId> esFilterId,
|
int cellDmuxEnableEs(u32 demuxerHandle, const mem_ptr_t<CellCodecEsFilterId> esFilterId,
|
||||||
mem_ptr_t<CellDmuxEsResource> esResourceInfo, mem_ptr_t<CellDmuxEsCb> esCb,
|
const mem_ptr_t<CellDmuxEsResource> esResourceInfo, const mem_ptr_t<CellDmuxEsCb> esCb,
|
||||||
u32 esSpecificInfo_addr, u32 esHandle_addr)
|
const u32 esSpecificInfo_addr, mem32_t esHandle)
|
||||||
{
|
{
|
||||||
cellDmux.Error("cellDmuxEnableEs(demuxerHandle_addr=0x%x, esFilterId_addr=0x%x, esResourceInfo_addr=0x%x, esCb_addr=0x%x, "
|
cellDmux.Error("cellDmuxEnableEs(demuxerHandle=0x%x, esFilterId_addr=0x%x, esResourceInfo_addr=0x%x, esCb_addr=0x%x, "
|
||||||
"esSpecificInfo_addr=0x%x, esHandle_addr=0x%x)", demuxerHandle_addr, esFilterId.GetAddr(), esResourceInfo.GetAddr(),
|
"esSpecificInfo_addr=0x%x, esHandle_addr=0x%x)", demuxerHandle, esFilterId.GetAddr(), esResourceInfo.GetAddr(),
|
||||||
esCb.GetAddr(), esSpecificInfo_addr, esHandle_addr);
|
esCb.GetAddr(), esSpecificInfo_addr, esHandle.GetAddr());
|
||||||
return CELL_OK;
|
return CELL_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
int cellDmuxDisableEs(u32 esHandle_addr)
|
int cellDmuxDisableEs(u32 esHandle)
|
||||||
{
|
{
|
||||||
cellDmux.Error("cellDmuxDisableEs(esHandle_addr=0x%x)", esHandle_addr);
|
cellDmux.Error("cellDmuxDisableEs(esHandle=0x%x)", esHandle);
|
||||||
return CELL_OK;
|
return CELL_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
int cellDmuxResetEs(u32 esHandle_addr)
|
int cellDmuxResetEs(u32 esHandle)
|
||||||
{
|
{
|
||||||
cellDmux.Error("cellDmuxResetEs(esHandle_addr=0x%x)", esHandle_addr);
|
cellDmux.Error("cellDmuxResetEs(esHandle=0x%x)", esHandle);
|
||||||
return CELL_OK;
|
return CELL_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
int cellDmuxGetAu(u32 esHandle_addr, u32 auInfo_ptr_addr, u32 auSpecificInfo_ptr_addr)
|
int cellDmuxGetAu(u32 esHandle, const u32 auInfo_ptr_addr, u32 auSpecificInfo_ptr_addr)
|
||||||
{
|
{
|
||||||
cellDmux.Error("cellDmuxGetAu(esHandle_addr=0x%x, auInfo_ptr_addr=0x%x, auSpecificInfo_ptr_addr=0x%x)",
|
cellDmux.Error("cellDmuxGetAu(esHandle=0x%x, auInfo_ptr_addr=0x%x, auSpecificInfo_ptr_addr=0x%x)",
|
||||||
esHandle_addr, auInfo_ptr_addr, auSpecificInfo_ptr_addr);
|
esHandle, auInfo_ptr_addr, auSpecificInfo_ptr_addr);
|
||||||
return CELL_OK;
|
return CELL_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
int cellDmuxPeekAu(u32 esHandle_addr, u32 auInfo_ptr_addr, u32 auSpecificInfo_ptr_addr)
|
int cellDmuxPeekAu(u32 esHandle, const u32 auInfo_ptr_addr, u32 auSpecificInfo_ptr_addr)
|
||||||
{
|
{
|
||||||
cellDmux.Error("cellDmuxPeekAu(esHandle_addr=0x%x, auInfo_ptr_addr=0x%x, auSpecificInfo_ptr_addr=0x%x)",
|
cellDmux.Error("cellDmuxPeekAu(esHandle=0x%x, auInfo_ptr_addr=0x%x, auSpecificInfo_ptr_addr=0x%x)",
|
||||||
esHandle_addr, auInfo_ptr_addr, auSpecificInfo_ptr_addr);
|
esHandle, auInfo_ptr_addr, auSpecificInfo_ptr_addr);
|
||||||
return CELL_OK;
|
return CELL_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
int cellDmuxGetAuEx(u32 esHandle_addr, u32 auInfoEx_ptr_addr, u32 auSpecificInfo_ptr_addr)
|
int cellDmuxGetAuEx(u32 esHandle, const u32 auInfoEx_ptr_addr, u32 auSpecificInfo_ptr_addr)
|
||||||
{
|
{
|
||||||
cellDmux.Error("cellDmuxGetAuEx(esHandle_addr=0x%x, auInfoEx_ptr_addr=0x%x, auSpecificInfo_ptr_addr=0x%x)",
|
cellDmux.Error("cellDmuxGetAuEx(esHandle=0x%x, auInfoEx_ptr_addr=0x%x, auSpecificInfo_ptr_addr=0x%x)",
|
||||||
esHandle_addr, auInfoEx_ptr_addr, auSpecificInfo_ptr_addr);
|
esHandle, auInfoEx_ptr_addr, auSpecificInfo_ptr_addr);
|
||||||
return CELL_OK;
|
return CELL_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
int cellDmuxPeekAuEx(u32 esHandle_addr, u32 auInfoEx_ptr_addr, u32 auSpecificInfo_ptr_addr)
|
int cellDmuxPeekAuEx(u32 esHandle, const u32 auInfoEx_ptr_addr, u32 auSpecificInfo_ptr_addr)
|
||||||
{
|
{
|
||||||
cellDmux.Error("cellDmuxPeekAuEx(esHandle_addr=0x%x, auInfoEx_ptr_addr=0x%x, auSpecificInfo_ptr_addr=0x%x)",
|
cellDmux.Error("cellDmuxPeekAuEx(esHandle=0x%x, auInfoEx_ptr_addr=0x%x, auSpecificInfo_ptr_addr=0x%x)",
|
||||||
esHandle_addr, auInfoEx_ptr_addr, auSpecificInfo_ptr_addr);
|
esHandle, auInfoEx_ptr_addr, auSpecificInfo_ptr_addr);
|
||||||
return CELL_OK;
|
return CELL_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
int cellDmuxReleaseAu(u32 esHandle_addr)
|
int cellDmuxReleaseAu(u32 esHandle)
|
||||||
{
|
{
|
||||||
cellDmux.Error("cellDmuxReleaseAu(esHandle_addr=0x%x)", esHandle_addr);
|
cellDmux.Error("cellDmuxReleaseAu(esHandle=0x%x)", esHandle);
|
||||||
return CELL_OK;
|
return CELL_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
int cellDmuxFlushEs(u32 esHandle_addr)
|
int cellDmuxFlushEs(u32 esHandle)
|
||||||
{
|
{
|
||||||
cellDmux.Error("cellDmuxFlushEs(esHandle_addr=0x%x)", esHandle_addr);
|
cellDmux.Error("cellDmuxFlushEs(esHandle=0x%x)", esHandle);
|
||||||
return CELL_OK;
|
return CELL_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -118,8 +118,8 @@ int cellPamfGetHeaderSize(mem_ptr_t<PamfHeader> pAddr, u64 fileSize, mem64_t pSi
|
||||||
cellPamf.Warning("cellPamfGetHeaderSize(pAddr=0x%x, fileSize=%d, pSize_addr=0x%x)",
|
cellPamf.Warning("cellPamfGetHeaderSize(pAddr=0x%x, fileSize=%d, pSize_addr=0x%x)",
|
||||||
pAddr.GetAddr(), fileSize, pSize.GetAddr());
|
pAddr.GetAddr(), fileSize, pSize.GetAddr());
|
||||||
|
|
||||||
if ((u32)pAddr->magic != 0x464d4150)
|
//if ((u32)pAddr->magic != 0x464d4150)
|
||||||
return CELL_PAMF_ERROR_UNKNOWN_TYPE;
|
//return CELL_PAMF_ERROR_UNKNOWN_TYPE;
|
||||||
|
|
||||||
const u64 offset = (u64)pAddr->data_offset << 11;
|
const u64 offset = (u64)pAddr->data_offset << 11;
|
||||||
pSize = offset /*? offset : 2048*/; //hack
|
pSize = offset /*? offset : 2048*/; //hack
|
||||||
|
|
|
@ -469,6 +469,9 @@ int cellVideoOutGetResolutionAvailability(u32 videoOut, u32 resolutionId, u32 as
|
||||||
return CELL_VIDEO_OUT_ERROR_UNSUPPORTED_VIDEO_OUT;
|
return CELL_VIDEO_OUT_ERROR_UNSUPPORTED_VIDEO_OUT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
extern std::atomic<u32> g_FsAioReadID;
|
||||||
|
extern std::atomic<u32> g_FsAioReadCur;
|
||||||
|
|
||||||
int cellSysutilCheckCallback()
|
int cellSysutilCheckCallback()
|
||||||
{
|
{
|
||||||
cellSysutil.Log("cellSysutilCheckCallback()");
|
cellSysutil.Log("cellSysutilCheckCallback()");
|
||||||
|
@ -477,7 +480,7 @@ int cellSysutilCheckCallback()
|
||||||
|
|
||||||
CPUThread& thr = Emu.GetCallbackThread();
|
CPUThread& thr = Emu.GetCallbackThread();
|
||||||
|
|
||||||
while (thr.IsAlive())
|
while (thr.IsAlive() || (g_FsAioReadCur < g_FsAioReadID))
|
||||||
{
|
{
|
||||||
Sleep(1);
|
Sleep(1);
|
||||||
if (Emu.IsStopped())
|
if (Emu.IsStopped())
|
||||||
|
|
|
@ -1,83 +1,76 @@
|
||||||
#include "stdafx.h"
|
#include "stdafx.h"
|
||||||
#include "Emu/SysCalls/SysCalls.h"
|
#include "Emu/SysCalls/SysCalls.h"
|
||||||
#include "Emu/SysCalls/SC_FUNC.h"
|
#include "Emu/SysCalls/SC_FUNC.h"
|
||||||
|
#include "cellVdec.h"
|
||||||
|
|
||||||
void cellVdec_init();
|
void cellVdec_init();
|
||||||
Module cellVdec(0x0005, cellVdec_init);
|
Module cellVdec(0x0005, cellVdec_init);
|
||||||
|
|
||||||
// Error Codes
|
int cellVdecQueryAttr(const mem_ptr_t<CellVdecType> type, mem_ptr_t<CellVdecAttr> attr)
|
||||||
enum
|
|
||||||
{
|
{
|
||||||
CELL_VDEC_ERROR_ARG = 0x80610101,
|
cellVdec.Error("cellVdecQueryAttr(type_addr=0x%x, attr_addr=0x%x)", type.GetAddr(), attr.GetAddr());
|
||||||
CELL_VDEC_ERROR_SEQ = 0x80610102,
|
|
||||||
CELL_VDEC_ERROR_BUSY = 0x80610103,
|
|
||||||
CELL_VDEC_ERROR_EMPTY = 0x80610104,
|
|
||||||
CELL_VDEC_ERROR_FATAL = 0x80610180,
|
|
||||||
};
|
|
||||||
|
|
||||||
int cellVdecQueryAttr()
|
|
||||||
{
|
|
||||||
UNIMPLEMENTED_FUNC(cellVdec);
|
|
||||||
return CELL_OK;
|
return CELL_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
int cellVdecQueryAttrEx()
|
int cellVdecQueryAttrEx(const mem_ptr_t<CellVdecTypeEx> type, mem_ptr_t<CellVdecAttr> attr)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED_FUNC(cellVdec);
|
cellVdec.Error("cellVdecQueryAttrEx(type_addr=0x%x, attr_addr=0x%x)", type.GetAddr(), attr.GetAddr());
|
||||||
return CELL_OK;
|
return CELL_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
int cellVdecOpen()
|
int cellVdecOpen(const mem_ptr_t<CellVdecType> type, const mem_ptr_t<CellVdecResource> res, const mem_ptr_t<CellVdecCb> cb, mem32_t handle)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED_FUNC(cellVdec);
|
cellVdec.Error("cellVdecOpen(type_addr=0x%x, res_addr=0x%x, cb_addr=0x%x, handle_addr=0x%x)",
|
||||||
|
type.GetAddr(), res.GetAddr(), cb.GetAddr(), handle.GetAddr());
|
||||||
return CELL_OK;
|
return CELL_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
int cellVdecOpenEx()
|
int cellVdecOpenEx(const mem_ptr_t<CellVdecTypeEx> type, const mem_ptr_t<CellVdecResourceEx> res, const mem_ptr_t<CellVdecCb> cb, mem32_t handle)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED_FUNC(cellVdec);
|
cellVdec.Error("cellVdecOpenEx(type_addr=0x%x, res_addr=0x%x, cb_addr=0x%x, handle_addr=0x%x)",
|
||||||
|
type.GetAddr(), res.GetAddr(), cb.GetAddr(), handle.GetAddr());
|
||||||
return CELL_OK;
|
return CELL_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
int cellVdecClose()
|
int cellVdecClose(u32 handle)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED_FUNC(cellVdec);
|
cellVdec.Error("cellVdecClose(handle=0x%x)", handle);
|
||||||
return CELL_OK;
|
return CELL_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
int cellVdecStartSeq()
|
int cellVdecStartSeq(u32 handle)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED_FUNC(cellVdec);
|
cellVdec.Error("cellVdecStartSeq(handle=0x%x)", handle);
|
||||||
return CELL_OK;
|
return CELL_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
int cellVdecEndSeq()
|
int cellVdecEndSeq(u32 handle)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED_FUNC(cellVdec);
|
cellVdec.Error("cellVdecEndSeq(handle=0x%x)", handle);
|
||||||
return CELL_OK;
|
return CELL_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
int cellVdecDecodeAu()
|
int cellVdecDecodeAu(u32 handle, CellVdecDecodeMode mode, const mem_ptr_t<CellVdecAuInfo> auInfo)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED_FUNC(cellVdec);
|
cellVdec.Error("cellVdecDecodeAu(handle=0x%x, mode=0x%x, auInfo_addr=0x%x)", handle, mode, auInfo.GetAddr());
|
||||||
return CELL_OK;
|
return CELL_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
int cellVdecGetPicture()
|
int cellVdecGetPicture(u32 handle, const mem_ptr_t<CellVdecPicFormat> format, u32 out_addr)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED_FUNC(cellVdec);
|
cellVdec.Error("cellVdecGetPicture(handle=0x%x, format_addr=0x%x, out_addr=0x%x)", handle, format.GetAddr(), out_addr);
|
||||||
return CELL_OK;
|
return CELL_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
int cellVdecGetPicItem()
|
int cellVdecGetPicItem(u32 handle, const u32 picItem_ptr_addr)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED_FUNC(cellVdec);
|
cellVdec.Error("cellVdecGetPicItem(handle=0x%x, picItem_ptr_addr=0x%x)", handle, picItem_ptr_addr);
|
||||||
return CELL_OK;
|
return CELL_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
int cellVdecSetFrameRate()
|
int cellVdecSetFrameRate(u32 handle, CellVdecFrameRate frc)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED_FUNC(cellVdec);
|
cellVdec.Error("cellVdecSetFrameRate(handle=0x%x, frc=0x%x)", handle, frc);
|
||||||
return CELL_OK;
|
return CELL_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
637
rpcs3/Emu/SysCalls/Modules/cellVdec.h
Normal file
637
rpcs3/Emu/SysCalls/Modules/cellVdec.h
Normal file
|
@ -0,0 +1,637 @@
|
||||||
|
#pragma once
|
||||||
|
#include "cellPamf.h"
|
||||||
|
|
||||||
|
// Error Codes
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
CELL_VDEC_ERROR_ARG = 0x80610101,
|
||||||
|
CELL_VDEC_ERROR_SEQ = 0x80610102,
|
||||||
|
CELL_VDEC_ERROR_BUSY = 0x80610103,
|
||||||
|
CELL_VDEC_ERROR_EMPTY = 0x80610104,
|
||||||
|
CELL_VDEC_ERROR_AU = 0x80610105,
|
||||||
|
CELL_VDEC_ERROR_PIC = 0x80610106,
|
||||||
|
CELL_VDEC_ERROR_FATAL = 0x80610180,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum CellVdecCodecType
|
||||||
|
{
|
||||||
|
CELL_VDEC_CODEC_TYPE_MPEG2 = 0x00000000,
|
||||||
|
CELL_VDEC_CODEC_TYPE_AVC = 0x00000001,
|
||||||
|
CELL_VDEC_CODEC_TYPE_DIVX = 0x00000005,
|
||||||
|
};
|
||||||
|
|
||||||
|
// Callback Messages
|
||||||
|
enum CellVdecMsgType
|
||||||
|
{
|
||||||
|
CELL_VDEC_MSG_TYPE_AUDONE, // decoding finished
|
||||||
|
CELL_VDEC_MSG_TYPE_PICOUT, // picture done
|
||||||
|
CELL_VDEC_MSG_TYPE_SEQDONE, // finishing done
|
||||||
|
CELL_VDEC_MSG_TYPE_ERROR,
|
||||||
|
};
|
||||||
|
|
||||||
|
// Decoder Operation Mode
|
||||||
|
enum CellVdecDecodeMode
|
||||||
|
{
|
||||||
|
CELL_VDEC_DEC_MODE_NORMAL,
|
||||||
|
CELL_VDEC_DEC_MODE_B_SKIP,
|
||||||
|
CELL_VDEC_DEC_MODE_PB_SKIP,
|
||||||
|
};
|
||||||
|
|
||||||
|
// Output Picture Format Type
|
||||||
|
enum CellVdecPicFormatType
|
||||||
|
{
|
||||||
|
CELL_VDEC_PICFMT_ARGB32_ILV,
|
||||||
|
CELL_VDEC_PICFMT_RGBA32_ILV,
|
||||||
|
CELL_VDEC_PICFMT_UYVY422_ILV,
|
||||||
|
CELL_VDEC_PICFMT_YUV420_PLANAR,
|
||||||
|
};
|
||||||
|
|
||||||
|
// Output Color Matrix Coef
|
||||||
|
enum CellVdecColorMatrixType
|
||||||
|
{
|
||||||
|
CELL_VDEC_COLOR_MATRIX_TYPE_BT601,
|
||||||
|
CELL_VDEC_COLOR_MATRIX_TYPE_BT709,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum CellVdecPicAttr
|
||||||
|
{
|
||||||
|
CELL_VDEC_PICITEM_ATTR_NORMAL,
|
||||||
|
CELL_VDEC_PICITEM_ATTR_SKIPPED,
|
||||||
|
};
|
||||||
|
|
||||||
|
// Universal Frame Rate Code
|
||||||
|
enum CellVdecFrameRate : u8
|
||||||
|
{
|
||||||
|
CELL_VDEC_FRC_24000DIV1001 = 0x80,
|
||||||
|
CELL_VDEC_FRC_24 = 0x81,
|
||||||
|
CELL_VDEC_FRC_25 = 0x82,
|
||||||
|
CELL_VDEC_FRC_30000DIV1001 = 0x83,
|
||||||
|
CELL_VDEC_FRC_30 = 0x84,
|
||||||
|
CELL_VDEC_FRC_50 = 0x85,
|
||||||
|
CELL_VDEC_FRC_60000DIV1001 = 0x86,
|
||||||
|
CELL_VDEC_FRC_60 = 0x87,
|
||||||
|
};
|
||||||
|
|
||||||
|
// Codec Type Information
|
||||||
|
struct CellVdecType
|
||||||
|
{
|
||||||
|
be_t<CellVdecCodecType> codecType;
|
||||||
|
be_t<u32> profileLevel;
|
||||||
|
};
|
||||||
|
|
||||||
|
// Extended Codec Type Information
|
||||||
|
struct CellVdecTypeEx
|
||||||
|
{
|
||||||
|
be_t<CellVdecCodecType> codecType;
|
||||||
|
be_t<u32> profileLevel;
|
||||||
|
be_t<u32> codecSpecificInfo_addr;
|
||||||
|
};
|
||||||
|
|
||||||
|
// Library Attributes
|
||||||
|
struct CellVdecAttr
|
||||||
|
{
|
||||||
|
be_t<u32> memSize; // required memory
|
||||||
|
u8 cmdDepth; // command queue depth
|
||||||
|
be_t<u32> decoderVerUpper;
|
||||||
|
be_t<u32> decoderVerLower;
|
||||||
|
};
|
||||||
|
|
||||||
|
// Configurable Information
|
||||||
|
struct CellVdecResource
|
||||||
|
{
|
||||||
|
be_t<u32> memAddr;
|
||||||
|
be_t<u32> memSize;
|
||||||
|
be_t<s32> ppuThreadPriority;
|
||||||
|
be_t<u32> ppuThreadStackSize;
|
||||||
|
be_t<s32> spuThreadPriority;
|
||||||
|
be_t<u32> numOfSpus;
|
||||||
|
};
|
||||||
|
|
||||||
|
// SPURS Information
|
||||||
|
struct CellVdecResourceSpurs
|
||||||
|
{
|
||||||
|
be_t<u32> spursAddr;
|
||||||
|
u8 tasksetPriority[8];
|
||||||
|
be_t<u32> tasksetMaxContention;
|
||||||
|
};
|
||||||
|
|
||||||
|
// Extended Configurable Information
|
||||||
|
struct CellVdecResourceEx
|
||||||
|
{
|
||||||
|
be_t<u32> memAddr;
|
||||||
|
be_t<u32> memSize;
|
||||||
|
be_t<s32> ppuThreadPriority;
|
||||||
|
be_t<u32> ppuThreadStackSize;
|
||||||
|
be_t<s32> spuThreadPriority;
|
||||||
|
be_t<u32> numOfSpus;
|
||||||
|
be_t<u32> spursResource_addr;
|
||||||
|
};
|
||||||
|
|
||||||
|
// Presentation Time Stamp
|
||||||
|
typedef CellCodecTimeStamp CellVdecTimeStamp;
|
||||||
|
|
||||||
|
// Access Unit Information
|
||||||
|
struct CellVdecAuInfo
|
||||||
|
{
|
||||||
|
be_t<u32> startAddr;
|
||||||
|
be_t<u32> size;
|
||||||
|
CellCodecTimeStamp pts;
|
||||||
|
CellCodecTimeStamp dts;
|
||||||
|
be_t<u64> userData;
|
||||||
|
be_t<u64> codecSpecificData;
|
||||||
|
};
|
||||||
|
|
||||||
|
// Output Picture Information
|
||||||
|
struct CellVdecPicItem
|
||||||
|
{
|
||||||
|
be_t<CellVdecCodecType> codecType;
|
||||||
|
be_t<u32> startAddr;
|
||||||
|
be_t<u32> size;
|
||||||
|
u8 auNum;
|
||||||
|
CellCodecTimeStamp auPts[2];
|
||||||
|
CellCodecTimeStamp auDts[2];
|
||||||
|
be_t<u64> auUserData[2];
|
||||||
|
be_t<s32> status;
|
||||||
|
be_t<CellVdecPicAttr> attr;
|
||||||
|
be_t<u32> picInfo_addr;
|
||||||
|
};
|
||||||
|
|
||||||
|
// Output Picture Format
|
||||||
|
struct CellVdecPicFormat
|
||||||
|
{
|
||||||
|
be_t<CellVdecPicFormatType> formatType;
|
||||||
|
be_t<CellVdecColorMatrixType> colorMatrixType;
|
||||||
|
u8 alpha;
|
||||||
|
};
|
||||||
|
|
||||||
|
// Callback Function Information
|
||||||
|
struct CellVdecCb
|
||||||
|
{
|
||||||
|
be_t<mem_func_ptr_t<void (*)(u32 handle_addr, CellVdecMsgType msgType, int msgData, u32 cbArg_addr)>> cbFunc;
|
||||||
|
be_t<u32> cbArg_addr;
|
||||||
|
};
|
||||||
|
|
||||||
|
// Max CC Data Length
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
CELL_VDEC_AVC_CCD_MAX = 128,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum AVC_level : u8
|
||||||
|
{
|
||||||
|
CELL_VDEC_AVC_LEVEL_1P0 = 10,
|
||||||
|
CELL_VDEC_AVC_LEVEL_1P1 = 11,
|
||||||
|
CELL_VDEC_AVC_LEVEL_1P2 = 12,
|
||||||
|
CELL_VDEC_AVC_LEVEL_1P3 = 13,
|
||||||
|
CELL_VDEC_AVC_LEVEL_2P0 = 20,
|
||||||
|
CELL_VDEC_AVC_LEVEL_2P1 = 21,
|
||||||
|
CELL_VDEC_AVC_LEVEL_2P2 = 22,
|
||||||
|
CELL_VDEC_AVC_LEVEL_3P0 = 30,
|
||||||
|
CELL_VDEC_AVC_LEVEL_3P1 = 31,
|
||||||
|
CELL_VDEC_AVC_LEVEL_3P2 = 32,
|
||||||
|
CELL_VDEC_AVC_LEVEL_4P0 = 40,
|
||||||
|
CELL_VDEC_AVC_LEVEL_4P1 = 41,
|
||||||
|
CELL_VDEC_AVC_LEVEL_4P2 = 42,
|
||||||
|
};
|
||||||
|
|
||||||
|
struct CellVdecAvcSpecificInfo
|
||||||
|
{
|
||||||
|
be_t<u32> thisSize;
|
||||||
|
be_t<u16> maxDecodedFrameWidth;
|
||||||
|
be_t<u16> maxDecodedFrameHeight;
|
||||||
|
bool disableDeblockingFilter;
|
||||||
|
u8 numberOfDecodedFrameBuffer;
|
||||||
|
};
|
||||||
|
|
||||||
|
enum AVC_video_format : u8
|
||||||
|
{
|
||||||
|
CELL_VDEC_AVC_VF_COMPONENT = 0x00,
|
||||||
|
CELL_VDEC_AVC_VF_PAL = 0x01,
|
||||||
|
CELL_VDEC_AVC_VF_NTSC = 0x02,
|
||||||
|
CELL_VDEC_AVC_VF_SECAM = 0x03,
|
||||||
|
CELL_VDEC_AVC_VF_MAC = 0x04,
|
||||||
|
CELL_VDEC_AVC_VF_UNSPECIFIED = 0x05,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum AVC_colour_primaries : u8
|
||||||
|
{
|
||||||
|
CELL_VDEC_AVC_CP_ITU_R_BT_709_5 = 0x01,
|
||||||
|
CELL_VDEC_AVC_CP_UNSPECIFIED = 0x02,
|
||||||
|
CELL_VDEC_AVC_CP_ITU_R_BT_470_6_SYS_M = 0x04,
|
||||||
|
CELL_VDEC_AVC_CP_ITU_R_BT_470_6_SYS_BG = 0x05,
|
||||||
|
CELL_VDEC_AVC_CP_SMPTE_170_M = 0x06,
|
||||||
|
CELL_VDEC_AVC_CP_SMPTE_240_M = 0x07,
|
||||||
|
CELL_VDEC_AVC_CP_GENERIC_FILM = 0x08,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum AVC_transfer_characteristics : u8
|
||||||
|
{
|
||||||
|
CELL_VDEC_AVC_TC_ITU_R_BT_709_5 = 0x01,
|
||||||
|
CELL_VDEC_AVC_TC_UNSPECIFIED = 0x02,
|
||||||
|
CELL_VDEC_AVC_TC_ITU_R_BT_470_6_SYS_M = 0x04,
|
||||||
|
CELL_VDEC_AVC_TC_ITU_R_BT_470_6_SYS_BG = 0x05,
|
||||||
|
CELL_VDEC_AVC_TC_SMPTE_170_M = 0x06,
|
||||||
|
CELL_VDEC_AVC_TC_SMPTE_240_M = 0x07,
|
||||||
|
CELL_VDEC_AVC_TC_LINEAR = 0x08,
|
||||||
|
CELL_VDEC_AVC_TC_LOG_100_1 = 0x09,
|
||||||
|
CELL_VDEC_AVC_TC_LOG_316_1 = 0x0a,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum AVC_matrix_coefficients : u8
|
||||||
|
{
|
||||||
|
CELL_VDEC_AVC_MXC_GBR = 0x00,
|
||||||
|
CELL_VDEC_AVC_MXC_ITU_R_BT_709_5 = 0x01,
|
||||||
|
CELL_VDEC_AVC_MXC_UNSPECIFIED = 0x02,
|
||||||
|
CELL_VDEC_AVC_MXC_FCC = 0x04,
|
||||||
|
CELL_VDEC_AVC_MXC_ITU_R_BT_470_6_SYS_BG = 0x05,
|
||||||
|
CELL_VDEC_AVC_MXC_SMPTE_170_M = 0x06,
|
||||||
|
CELL_VDEC_AVC_MXC_SMPTE_240_M = 0x07,
|
||||||
|
CELL_VDEC_AVC_MXC_YCGCO = 0x08,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum AVC_FrameRateCode : u8
|
||||||
|
{
|
||||||
|
CELL_VDEC_AVC_FRC_24000DIV1001 = 0x00,
|
||||||
|
CELL_VDEC_AVC_FRC_24 = 0x01,
|
||||||
|
CELL_VDEC_AVC_FRC_25 = 0x02,
|
||||||
|
CELL_VDEC_AVC_FRC_30000DIV1001 = 0x03,
|
||||||
|
CELL_VDEC_AVC_FRC_30 = 0x04,
|
||||||
|
CELL_VDEC_AVC_FRC_50 = 0x05,
|
||||||
|
CELL_VDEC_AVC_FRC_60000DIV1001 = 0x06,
|
||||||
|
CELL_VDEC_AVC_FRC_60 = 0x07,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum AVC_NulUnitPresentFlags : u16
|
||||||
|
{
|
||||||
|
CELL_VDEC_AVC_FLG_SPS = 0x0001,
|
||||||
|
CELL_VDEC_AVC_FLG_PPS = 0x0002,
|
||||||
|
CELL_VDEC_AVC_FLG_AUD = 0x0004,
|
||||||
|
CELL_VDEC_AVC_FLG_EO_SEQ = 0x0008,
|
||||||
|
CELL_VDEC_AVC_FLG_EO_STREAM = 0x0100,
|
||||||
|
CELL_VDEC_AVC_FLG_FILLER_DATA = 0x0200,
|
||||||
|
CELL_VDEC_AVC_FLG_PIC_TIMING_SEI = 0x0400,
|
||||||
|
CELL_VDEC_AVC_FLG_BUFF_PERIOD_SEI = 0x0800,
|
||||||
|
CELL_VDEC_AVC_FLG_USER_DATA_UNREG_SEI = 0x1000,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum AVC_aspect_ratio_idc : u8
|
||||||
|
{
|
||||||
|
CELL_VDEC_AVC_ARI_SAR_UNSPECIFIED = 0x00,
|
||||||
|
CELL_VDEC_AVC_ARI_SAR_1_1 = 0x01,
|
||||||
|
CELL_VDEC_AVC_ARI_SAR_12_11 = 0x02,
|
||||||
|
CELL_VDEC_AVC_ARI_SAR_10_11 = 0x03,
|
||||||
|
CELL_VDEC_AVC_ARI_SAR_16_11 = 0x04,
|
||||||
|
CELL_VDEC_AVC_ARI_SAR_40_33 = 0x05,
|
||||||
|
CELL_VDEC_AVC_ARI_SAR_24_11 = 0x06,
|
||||||
|
CELL_VDEC_AVC_ARI_SAR_20_11 = 0x07,
|
||||||
|
CELL_VDEC_AVC_ARI_SAR_32_11 = 0x08,
|
||||||
|
CELL_VDEC_AVC_ARI_SAR_80_33 = 0x09,
|
||||||
|
CELL_VDEC_AVC_ARI_SAR_18_11 = 0x0a,
|
||||||
|
CELL_VDEC_AVC_ARI_SAR_15_11 = 0x0b,
|
||||||
|
CELL_VDEC_AVC_ARI_SAR_64_33 = 0x0c,
|
||||||
|
CELL_VDEC_AVC_ARI_SAR_160_99 = 0x0d,
|
||||||
|
CELL_VDEC_AVC_ARI_SAR_4_3 = 0x0e,
|
||||||
|
CELL_VDEC_AVC_ARI_SAR_3_2 = 0x0f,
|
||||||
|
CELL_VDEC_AVC_ARI_SAR_2_1 = 0x10,
|
||||||
|
CELL_VDEC_AVC_ARI_SAR_EXTENDED_SAR = 0xff,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum AVC_PictureType : u8
|
||||||
|
{
|
||||||
|
CELL_VDEC_AVC_PCT_I = 0x00,
|
||||||
|
CELL_VDEC_AVC_PCT_P = 0x01,
|
||||||
|
CELL_VDEC_AVC_PCT_B = 0x02,
|
||||||
|
CELL_VDEC_AVC_PCT_UNKNOWN = 0x03,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum AVC_pic_struct : u8
|
||||||
|
{
|
||||||
|
CELL_VDEC_AVC_PSTR_FRAME = 0x00,
|
||||||
|
CELL_VDEC_AVC_PSTR_FIELD_TOP = 0x01,
|
||||||
|
CELL_VDEC_AVC_PSTR_FIELD_BTM = 0x02,
|
||||||
|
CELL_VDEC_AVC_PSTR_FIELD_TOP_BTM = 0x03,
|
||||||
|
CELL_VDEC_AVC_PSTR_FIELD_BTM_TOP = 0x04,
|
||||||
|
CELL_VDEC_AVC_PSTR_FIELD_TOP_BTM_TOP = 0x05,
|
||||||
|
CELL_VDEC_AVC_PSTR_FIELD_BTM_TOP_BTM = 0x06,
|
||||||
|
CELL_VDEC_AVC_PSTR_FRAME_DOUBLING = 0x07,
|
||||||
|
CELL_VDEC_AVC_PSTR_FRAME_TRIPLING = 0x08,
|
||||||
|
};
|
||||||
|
|
||||||
|
struct CellVdecAvcInfo
|
||||||
|
{
|
||||||
|
be_t<u16> horizontalSize;
|
||||||
|
be_t<u16> verticalSize;
|
||||||
|
AVC_PictureType pictureType[2];
|
||||||
|
bool idrPictureFlag;
|
||||||
|
AVC_aspect_ratio_idc aspect_ratio_idc;
|
||||||
|
be_t<u16> sar_height;
|
||||||
|
be_t<u16> sar_width;
|
||||||
|
AVC_pic_struct pic_struct;
|
||||||
|
be_t<s16> picOrderCount[2];
|
||||||
|
bool vui_parameters_present_flag;
|
||||||
|
bool frame_mbs_only_flag;
|
||||||
|
bool video_signal_type_present_flag;
|
||||||
|
AVC_video_format video_format;
|
||||||
|
bool video_full_range_flag;
|
||||||
|
bool colour_description_present_flag;
|
||||||
|
AVC_colour_primaries colour_primaries;
|
||||||
|
AVC_transfer_characteristics transfer_characteristics;
|
||||||
|
AVC_matrix_coefficients matrix_coefficients;
|
||||||
|
bool timing_info_present_flag;
|
||||||
|
CellVdecFrameRate frameRateCode;
|
||||||
|
bool fixed_frame_rate_flag;
|
||||||
|
bool low_delay_hrd_flag;
|
||||||
|
bool entropy_coding_mode_flag;
|
||||||
|
be_t<AVC_NulUnitPresentFlags> nalUnitPresentFlags;
|
||||||
|
u8 ccDataLength[2];
|
||||||
|
u8 ccData[2][CELL_VDEC_AVC_CCD_MAX];
|
||||||
|
be_t<u64> reserved[2];
|
||||||
|
};
|
||||||
|
|
||||||
|
// DIVX Profile
|
||||||
|
enum DIVX_level : u8
|
||||||
|
{
|
||||||
|
CELL_VDEC_DIVX_QMOBILE = 10,
|
||||||
|
CELL_VDEC_DIVX_MOBILE = 11,
|
||||||
|
CELL_VDEC_DIVX_HOME_THEATER = 12,
|
||||||
|
CELL_VDEC_DIVX_HD_720 = 13,
|
||||||
|
CELL_VDEC_DIVX_HD_1080 = 14,
|
||||||
|
};
|
||||||
|
|
||||||
|
struct CellVdecDivxSpecificInfo
|
||||||
|
{
|
||||||
|
be_t<u32> thisSize;
|
||||||
|
be_t<u16> maxDecodedFrameWidth;
|
||||||
|
be_t<u16> maxDecodedFrameHeight;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct CellVdecDivxSpecificInfo2
|
||||||
|
{
|
||||||
|
be_t<u32> thisSize;
|
||||||
|
be_t<u16> maxDecodedFrameWidth;
|
||||||
|
be_t<u16> maxDecodedFrameHeight;
|
||||||
|
be_t<u16> numberOfDecodedFrameBuffer;
|
||||||
|
};
|
||||||
|
|
||||||
|
enum DIVX_frameRateCode : u16
|
||||||
|
{
|
||||||
|
CELL_VDEC_DIVX_FRC_UNDEFINED = 0x00,
|
||||||
|
CELL_VDEC_DIVX_FRC_24000DIV1001 = 0x01,
|
||||||
|
CELL_VDEC_DIVX_FRC_24 = 0x02,
|
||||||
|
CELL_VDEC_DIVX_FRC_25 = 0x03,
|
||||||
|
CELL_VDEC_DIVX_FRC_30000DIV1001 = 0x04,
|
||||||
|
CELL_VDEC_DIVX_FRC_30 = 0x05,
|
||||||
|
CELL_VDEC_DIVX_FRC_50 = 0x06,
|
||||||
|
CELL_VDEC_DIVX_FRC_60000DIV1001 = 0x07,
|
||||||
|
CELL_VDEC_DIVX_FRC_60 = 0x08,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum DIVX_pixelAspectRatio : u8
|
||||||
|
{
|
||||||
|
CELL_VDEC_DIVX_ARI_PAR_1_1 = 0x1,
|
||||||
|
CELL_VDEC_DIVX_ARI_PAR_12_11 = 0x2,
|
||||||
|
CELL_VDEC_DIVX_ARI_PAR_10_11 = 0x3,
|
||||||
|
CELL_VDEC_DIVX_ARI_PAR_16_11 = 0x4,
|
||||||
|
CELL_VDEC_DIVX_ARI_PAR_40_33 = 0x5,
|
||||||
|
CELL_VDEC_DIVX_ARI_PAR_EXTENDED_PAR = 0xF,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum DIVX_pictureType : u8
|
||||||
|
{
|
||||||
|
CELL_VDEC_DIVX_VCT_I = 0x0,
|
||||||
|
CELL_VDEC_DIVX_VCT_P = 0x1,
|
||||||
|
CELL_VDEC_DIVX_VCT_B = 0x2,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum DIVX_pictureStruct : u8
|
||||||
|
{
|
||||||
|
CELL_VDEC_DIVX_PSTR_FRAME = 0x0,
|
||||||
|
CELL_VDEC_DIVX_PSTR_TOP_BTM = 0x1,
|
||||||
|
CELL_VDEC_DIVX_PSTR_BTM_TOP = 0x2,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum DIVX_colourPrimaries : u8
|
||||||
|
{
|
||||||
|
CELL_VDEC_DIVX_CP_ITU_R_BT_709 = 0x01,
|
||||||
|
CELL_VDEC_DIVX_CP_UNSPECIFIED = 0x02,
|
||||||
|
CELL_VDEC_DIVX_CP_ITU_R_BT_470_SYS_M = 0x04,
|
||||||
|
CELL_VDEC_DIVX_CP_ITU_R_BT_470_SYS_BG = 0x05,
|
||||||
|
CELL_VDEC_DIVX_CP_SMPTE_170_M = 0x06,
|
||||||
|
CELL_VDEC_DIVX_CP_SMPTE_240_M = 0x07,
|
||||||
|
CELL_VDEC_DIVX_CP_GENERIC_FILM = 0x08,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum DIVX_transferCharacteristics : u8
|
||||||
|
{
|
||||||
|
CELL_VDEC_DIVX_TC_ITU_R_BT_709 = 0x01,
|
||||||
|
CELL_VDEC_DIVX_TC_UNSPECIFIED = 0x02,
|
||||||
|
CELL_VDEC_DIVX_TC_ITU_R_BT_470_SYS_M = 0x04,
|
||||||
|
CELL_VDEC_DIVX_TC_ITU_R_BT_470_SYS_BG = 0x05,
|
||||||
|
CELL_VDEC_DIVX_TC_SMPTE_170_M = 0x06,
|
||||||
|
CELL_VDEC_DIVX_TC_SMPTE_240_M = 0x07,
|
||||||
|
CELL_VDEC_DIVX_TC_LINEAR = 0x08,
|
||||||
|
CELL_VDEC_DIVX_TC_LOG_100_1 = 0x09,
|
||||||
|
CELL_VDEC_DIVX_TC_LOG_316_1 = 0x0a,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum DIVX_matrixCoefficients : u8
|
||||||
|
{
|
||||||
|
CELL_VDEC_DIVX_MXC_ITU_R_BT_709 = 0x01,
|
||||||
|
CELL_VDEC_DIVX_MXC_UNSPECIFIED = 0x02,
|
||||||
|
CELL_VDEC_DIVX_MXC_FCC = 0x04,
|
||||||
|
CELL_VDEC_DIVX_MXC_ITU_R_BT_470_SYS_BG = 0x05,
|
||||||
|
CELL_VDEC_DIVX_MXC_SMPTE_170_M = 0x06,
|
||||||
|
CELL_VDEC_DIVX_MXC_SMPTE_240_M = 0x07,
|
||||||
|
CELL_VDEC_DIVX_MXC_YCGCO = 0x08,
|
||||||
|
};
|
||||||
|
|
||||||
|
struct CellVdecDivxInfo
|
||||||
|
{
|
||||||
|
DIVX_pictureType pictureType;
|
||||||
|
be_t<u16> horizontalSize;
|
||||||
|
be_t<u16> verticalSize;
|
||||||
|
DIVX_pixelAspectRatio pixelAspectRatio;
|
||||||
|
u8 parWidth;
|
||||||
|
u8 parHeight;
|
||||||
|
bool colourDescription;
|
||||||
|
DIVX_colourPrimaries colourPrimaries;
|
||||||
|
DIVX_transferCharacteristics transferCharacteristics;
|
||||||
|
DIVX_matrixCoefficients matrixCoefficients;
|
||||||
|
DIVX_pictureStruct pictureStruct;
|
||||||
|
be_t<DIVX_frameRateCode> frameRateCode;
|
||||||
|
};
|
||||||
|
|
||||||
|
enum MPEG2_level
|
||||||
|
{
|
||||||
|
CELL_VDEC_MPEG2_MP_LL,
|
||||||
|
CELL_VDEC_MPEG2_MP_ML,
|
||||||
|
CELL_VDEC_MPEG2_MP_H14,
|
||||||
|
CELL_VDEC_MPEG2_MP_HL,
|
||||||
|
};
|
||||||
|
|
||||||
|
struct CellVdecMpeg2SpecificInfo
|
||||||
|
{
|
||||||
|
be_t<u32> thisSize;
|
||||||
|
be_t<u16> maxDecodedFrameWidth;
|
||||||
|
be_t<u16> maxDecodedFrameHeight;
|
||||||
|
};
|
||||||
|
|
||||||
|
enum MPEG2_headerFlags : u32
|
||||||
|
{
|
||||||
|
CELL_VDEC_MPEG2_FLG_SEQ_HDR = 0x00000001,
|
||||||
|
CELL_VDEC_MPEG2_FLG_SEQ_EXT = 0x00000002,
|
||||||
|
CELL_VDEC_MPEG2_FLG_SEQ_DSP_EXT = 0x00000004,
|
||||||
|
CELL_VDEC_MPEG2_FLG_SEQ_USR_DAT = 0x00000008,
|
||||||
|
CELL_VDEC_MPEG2_FLG_SEQ_END = 0x00000010,
|
||||||
|
CELL_VDEC_MPEG2_FLG_GOP_HDR = 0x00000020,
|
||||||
|
CELL_VDEC_MPEG2_FLG_GOP_USR_DAT = 0x00000040,
|
||||||
|
CELL_VDEC_MPEG2_FLG_PIC_HDR_1 = 0x00000100,
|
||||||
|
CELL_VDEC_MPEG2_FLG_PIC_EXT_1 = 0x00000200,
|
||||||
|
CELL_VDEC_MPEG2_FLG_PIC_DSP_EXT_1 = 0x00000400,
|
||||||
|
CELL_VDEC_MPEG2_FLG_PIC_USR_DAT_1 = 0x00000800,
|
||||||
|
CELL_VDEC_MPEG2_FLG_PIC_HDR_2 = 0x00001000,
|
||||||
|
CELL_VDEC_MPEG2_FLG_PIC_EXT_2 = 0x00002000,
|
||||||
|
CELL_VDEC_MPEG2_FLG_PIC_DSP_EXT_2 = 0x00004000,
|
||||||
|
CELL_VDEC_MPEG2_FLG_PIC_USR_DAT_2 = 0x00008000,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum MPEG2_aspectRatio : u8
|
||||||
|
{
|
||||||
|
CELL_VDEC_MPEG2_ARI_SAR_1_1 = 0x01,
|
||||||
|
CELL_VDEC_MPEG2_ARI_DAR_4_3 = 0x02,
|
||||||
|
CELL_VDEC_MPEG2_ARI_DAR_16_9 = 0x03,
|
||||||
|
CELL_VDEC_MPEG2_ARI_DAR_2P21_1 = 0x04,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum MPEG1_aspectRatio : u8
|
||||||
|
{
|
||||||
|
CELL_VDEC_MPEG1_ARI_SAR_1P0 = 0x01,
|
||||||
|
CELL_VDEC_MPEG1_ARI_SAR_0P6735 = 0x02,
|
||||||
|
CELL_VDEC_MPEG1_ARI_SAR_0P7031 = 0x03,
|
||||||
|
CELL_VDEC_MPEG1_ARI_SAR_0P7615 = 0x04,
|
||||||
|
CELL_VDEC_MPEG1_ARI_SAR_0P8055 = 0x05,
|
||||||
|
CELL_VDEC_MPEG1_ARI_SAR_0P8437 = 0x06,
|
||||||
|
CELL_VDEC_MPEG1_ARI_SAR_0P8935 = 0x07,
|
||||||
|
CELL_VDEC_MPEG1_ARI_SAR_0P9157 = 0x08,
|
||||||
|
CELL_VDEC_MPEG1_ARI_SAR_0P9815 = 0x09,
|
||||||
|
CELL_VDEC_MPEG1_ARI_SAR_1P0255 = 0x0a,
|
||||||
|
CELL_VDEC_MPEG1_ARI_SAR_1P0695 = 0x0b,
|
||||||
|
CELL_VDEC_MPEG1_ARI_SAR_1P0950 = 0x0c,
|
||||||
|
CELL_VDEC_MPEG1_ARI_SAR_1P1575 = 0x0d,
|
||||||
|
CELL_VDEC_MPEG1_ARI_SAR_1P2015 = 0x0e,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum MPEG2_frameRate : u8
|
||||||
|
{
|
||||||
|
CELL_VDEC_MPEG2_FRC_FORBIDDEN = 0x00,
|
||||||
|
CELL_VDEC_MPEG2_FRC_24000DIV1001 = 0x01,
|
||||||
|
CELL_VDEC_MPEG2_FRC_24 = 0x02,
|
||||||
|
CELL_VDEC_MPEG2_FRC_25 = 0x03,
|
||||||
|
CELL_VDEC_MPEG2_FRC_30000DIV1001 = 0x04,
|
||||||
|
CELL_VDEC_MPEG2_FRC_30 = 0x05,
|
||||||
|
CELL_VDEC_MPEG2_FRC_50 = 0x06,
|
||||||
|
CELL_VDEC_MPEG2_FRC_60000DIV1001 = 0x07,
|
||||||
|
CELL_VDEC_MPEG2_FRC_60 = 0x08,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum MPEG2_videoFormat : u8
|
||||||
|
{
|
||||||
|
CELL_VDEC_MPEG2_VF_COMPONENT = 0x00,
|
||||||
|
CELL_VDEC_MPEG2_VF_PAL = 0x01,
|
||||||
|
CELL_VDEC_MPEG2_VF_NTSC = 0x02,
|
||||||
|
CELL_VDEC_MPEG2_VF_SECAM = 0x03,
|
||||||
|
CELL_VDEC_MPEG2_VF_MAC = 0x04,
|
||||||
|
CELL_VDEC_MPEG2_VF_UNSPECIFIED = 0x05,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum MPEG2_colourPrimaries : u8
|
||||||
|
{
|
||||||
|
CELL_VDEC_MPEG2_CP_FORBIDDEN = 0x00,
|
||||||
|
CELL_VDEC_MPEG2_CP_ITU_R_BT_709 = 0x01,
|
||||||
|
CELL_VDEC_MPEG2_CP_UNSPECIFIED = 0x02,
|
||||||
|
CELL_VDEC_MPEG2_CP_ITU_R_BT_470_2_SYS_M = 0x04,
|
||||||
|
CELL_VDEC_MPEG2_CP_ITU_R_BT_470_2_SYS_BG = 0x05,
|
||||||
|
CELL_VDEC_MPEG2_CP_SMPTE_170_M = 0x06,
|
||||||
|
CELL_VDEC_MPEG2_CP_SMPTE_240_M = 0x07,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum MPEG2_transferCharacteristics : u8
|
||||||
|
{
|
||||||
|
CELL_VDEC_MPEG2_TC_FORBIDDEN = 0x00,
|
||||||
|
CELL_VDEC_MPEG2_TC_ITU_R_BT_709 = 0x01,
|
||||||
|
CELL_VDEC_MPEG2_TC_UNSPECIFIED = 0x02,
|
||||||
|
CELL_VDEC_MPEG2_TC_ITU_R_BT_470_2_SYS_M = 0x04,
|
||||||
|
CELL_VDEC_MPEG2_TC_ITU_R_BT_470_2_SYS_BG = 0x05,
|
||||||
|
CELL_VDEC_MPEG2_TC_SMPTE_170_M = 0x06,
|
||||||
|
CELL_VDEC_MPEG2_TC_SMPTE_240_M = 0x07,
|
||||||
|
CELL_VDEC_MPEG2_TC_LINEAR = 0x08,
|
||||||
|
CELL_VDEC_MPEG2_TC_LOG_100_1 = 0x09,
|
||||||
|
CELL_VDEC_MPEG2_TC_LOG_316_1 = 0x0a,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum MPEG2_matrixCoefficients : u8
|
||||||
|
{
|
||||||
|
CELL_VDEC_MPEG2_MXC_FORBIDDEN = 0x00,
|
||||||
|
CELL_VDEC_MPEG2_MXC_ITU_R_BT_709 = 0x01,
|
||||||
|
CELL_VDEC_MPEG2_MXC_UNSPECIFIED = 0x02,
|
||||||
|
CELL_VDEC_MPEG2_MXC_FCC = 0x04,
|
||||||
|
CELL_VDEC_MPEG2_MXC_ITU_R_BT_470_2_SYS_BG = 0x05,
|
||||||
|
CELL_VDEC_MPEG2_MXC_SMPTE_170_M = 0x06,
|
||||||
|
CELL_VDEC_MPEG2_MXC_SMPTE_240_M = 0x07,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum MPEG2_pictureCodingType : u8
|
||||||
|
{
|
||||||
|
CELL_VDEC_MPEG2_PCT_FORBIDDEN = 0x00,
|
||||||
|
CELL_VDEC_MPEG2_PCT_I = 0x01,
|
||||||
|
CELL_VDEC_MPEG2_PCT_P = 0x02,
|
||||||
|
CELL_VDEC_MPEG2_PCT_B = 0x03,
|
||||||
|
CELL_VDEC_MPEG2_PCT_D = 0x04,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum MPEG2_pictureStructure : u8
|
||||||
|
{
|
||||||
|
CELL_VDEC_MPEG2_PSTR_TOP_FIELD = 0x01,
|
||||||
|
CELL_VDEC_MPEG2_PSTR_BOTTOM_FIELD = 0x02,
|
||||||
|
CELL_VDEC_MPEG2_PSTR_FRAME = 0x03,
|
||||||
|
};
|
||||||
|
|
||||||
|
struct CellVdecMpeg2Info
|
||||||
|
{
|
||||||
|
be_t<u16> horizontal_size;
|
||||||
|
be_t<u16> vertical_size;
|
||||||
|
union
|
||||||
|
{
|
||||||
|
MPEG2_aspectRatio aspect_ratio_information;
|
||||||
|
MPEG1_aspectRatio aspect_ratio_information1;
|
||||||
|
};
|
||||||
|
MPEG2_frameRate frame_rate_code;
|
||||||
|
bool progressive_sequence;
|
||||||
|
bool low_delay;
|
||||||
|
MPEG2_videoFormat video_format;
|
||||||
|
bool colour_description;
|
||||||
|
MPEG2_colourPrimaries colour_primaries;
|
||||||
|
MPEG2_transferCharacteristics transfer_characteristics;
|
||||||
|
MPEG2_matrixCoefficients matrix_coefficients;
|
||||||
|
be_t<u16> temporal_reference[2];
|
||||||
|
MPEG2_pictureCodingType picture_coding_type[2];
|
||||||
|
MPEG2_pictureStructure picture_structure[2];
|
||||||
|
bool top_field_first;
|
||||||
|
bool repeat_first_field;
|
||||||
|
bool progressive_frame;
|
||||||
|
be_t<u32> time_code;
|
||||||
|
bool closed_gop;
|
||||||
|
bool broken_link;
|
||||||
|
be_t<u16> vbv_delay[2];
|
||||||
|
be_t<u16> display_horizontal_size;
|
||||||
|
be_t<u16> display_vertical_size;
|
||||||
|
u8 number_of_frame_centre_offsets[2];
|
||||||
|
be_t<u16> frame_centre_horizontal_offset[2][3];
|
||||||
|
be_t<u16> frame_centre_vertical_offset[2][3];
|
||||||
|
be_t<MPEG2_headerFlags> headerPresentFlags;
|
||||||
|
be_t<MPEG2_headerFlags> headerRetentionFlags;
|
||||||
|
bool mpeg1Flag;
|
||||||
|
u8 ccDataLength[2];
|
||||||
|
u8 ccData[2][128];
|
||||||
|
be_t<u64> reserved[2];
|
||||||
|
};
|
|
@ -1,147 +1,11 @@
|
||||||
#include "stdafx.h"
|
#include "stdafx.h"
|
||||||
#include "Emu/SysCalls/SysCalls.h"
|
#include "Emu/SysCalls/SysCalls.h"
|
||||||
#include "Emu/SysCalls/SC_FUNC.h"
|
#include "Emu/SysCalls/SC_FUNC.h"
|
||||||
|
#include "cellVpost.h"
|
||||||
|
|
||||||
void cellVpost_init();
|
void cellVpost_init();
|
||||||
Module cellVpost(0x0008, cellVpost_init);
|
Module cellVpost(0x0008, cellVpost_init);
|
||||||
|
|
||||||
// Error Codes
|
|
||||||
enum
|
|
||||||
{
|
|
||||||
CELL_VPOST_ERROR_Q_ARG_CFG_NULL = 0x80610410,
|
|
||||||
CELL_VPOST_ERROR_Q_ARG_CFG_INVALID = 0x80610411,
|
|
||||||
CELL_VPOST_ERROR_Q_ARG_ATTR_NULL = 0x80610412,
|
|
||||||
CELL_VPOST_ERROR_O_ARG_CFG_NULL = 0x80610440,
|
|
||||||
CELL_VPOST_ERROR_O_ARG_CFG_INVALID = 0x80610441,
|
|
||||||
CELL_VPOST_ERROR_O_ARG_RSRC_NULL = 0x80610442,
|
|
||||||
CELL_VPOST_ERROR_O_ARG_RSRC_INVALID = 0x80610443,
|
|
||||||
CELL_VPOST_ERROR_O_ARG_HDL_NULL = 0x80610444,
|
|
||||||
CELL_VPOST_ERROR_O_FATAL_QUERY_FAIL = 0x80610460,
|
|
||||||
CELL_VPOST_ERROR_O_FATAL_CREATEMON_FAIL = 0x80610461,
|
|
||||||
CELL_VPOST_ERROR_O_FATAL_INITSPURS_FAIL = 0x80610462,
|
|
||||||
CELL_VPOST_ERROR_C_ARG_HDL_NULL = 0x80610470,
|
|
||||||
CELL_VPOST_ERROR_C_ARG_HDL_INVALID = 0x80610471,
|
|
||||||
CELL_VPOST_ERROR_C_FATAL_LOCKMON_FAIL = 0x80610490,
|
|
||||||
CELL_VPOST_ERROR_C_FATAL_UNLOCKMON_FAIL = 0x80610491,
|
|
||||||
CELL_VPOST_ERROR_C_FATAL_DESTROYMON_FAIL = 0x80610492,
|
|
||||||
CELL_VPOST_ERROR_C_FATAL_FINSPURS_FAIL = 0x80610463,
|
|
||||||
CELL_VPOST_ERROR_E_ARG_HDL_NULL = 0x806104a0,
|
|
||||||
CELL_VPOST_ERROR_E_ARG_HDL_INVALID = 0x806104a1,
|
|
||||||
CELL_VPOST_ERROR_E_ARG_INPICBUF_NULL = 0x806104a2,
|
|
||||||
CELL_VPOST_ERROR_E_ARG_INPICBUF_INVALID = 0x806104a3,
|
|
||||||
CELL_VPOST_ERROR_E_ARG_CTRL_NULL = 0x806104a4,
|
|
||||||
CELL_VPOST_ERROR_E_ARG_CTRL_INVALID = 0x806104a5,
|
|
||||||
CELL_VPOST_ERROR_E_ARG_OUTPICBUF_NULL = 0x806104a6,
|
|
||||||
CELL_VPOST_ERROR_E_ARG_OUTPICBUF_INVALID = 0x806104a7,
|
|
||||||
CELL_VPOST_ERROR_E_ARG_PICINFO_NULL = 0x806104a8,
|
|
||||||
CELL_VPOST_ERROR_E_FATAL_LOCKMON_FAIL = 0x806104c0,
|
|
||||||
CELL_VPOST_ERROR_E_FATAL_UNLOCKMON_FAIL = 0x806104c1,
|
|
||||||
CELL_VPOST_ENT_ERROR_Q_ARG_ATTR_NULL = 0x80618110,
|
|
||||||
CELL_VPOST_ENT_ERROR_O_ARG_RSRC_NULL = 0x80618140,
|
|
||||||
CELL_VPOST_ENT_ERROR_O_ARG_RSRC_INVALID = 0x80618141,
|
|
||||||
CELL_VPOST_ENT_ERROR_O_ARG_HDL_NULL = 0x80618142,
|
|
||||||
CELL_VPOST_ENT_ERROR_O_FATAL_QUERY_FAIL = 0x80618160,
|
|
||||||
CELL_VPOST_ENT_ERROR_O_FATAL_CSPUCORE_FAIL = 0x80618161,
|
|
||||||
CELL_VPOST_ENT_ERROR_C_ARG_HDL_NULL = 0x80618170,
|
|
||||||
CELL_VPOST_ENT_ERROR_C_ARG_HDL_INVALID = 0x80618171,
|
|
||||||
CELL_VPOST_ENT_ERROR_C_FATAL_SNDCMD_FAIL = 0x80618190,
|
|
||||||
CELL_VPOST_ENT_ERROR_C_FATAL_RCVRES_FAIL = 0x80618191,
|
|
||||||
CELL_VPOST_ENT_ERROR_C_FATAL_DSPUCORE_FAIL = 0x80618192,
|
|
||||||
CELL_VPOST_ENT_ERROR_E_ARG_HDL_NULL = 0x806181a0,
|
|
||||||
CELL_VPOST_ENT_ERROR_E_ARG_HDL_INVALID = 0x806181a1,
|
|
||||||
CELL_VPOST_ENT_ERROR_E_ARG_INPICBUF_NULL = 0x806181a2,
|
|
||||||
CELL_VPOST_ENT_ERROR_E_ARG_INPICBUF_INVALID = 0x806181a3,
|
|
||||||
CELL_VPOST_ENT_ERROR_E_ARG_INPICINFO_NULL = 0x806181a4,
|
|
||||||
CELL_VPOST_ENT_ERROR_E_ARG_INPICINFO_INVALID = 0x806181a5,
|
|
||||||
CELL_VPOST_ENT_ERROR_E_ARG_CTRL_NULL = 0x806181a6,
|
|
||||||
CELL_VPOST_ENT_ERROR_E_ARG_CTRL_INVALID = 0x806181a7,
|
|
||||||
CELL_VPOST_ENT_ERROR_E_ARG_COMB_INVALID = 0x806181a8,
|
|
||||||
CELL_VPOST_ENT_ERROR_E_ARG_OUTPICBUF_NULL = 0x806181a9,
|
|
||||||
CELL_VPOST_ENT_ERROR_E_ARG_OUTPICBUF_INVALID = 0x806181aa,
|
|
||||||
CELL_VPOST_ENT_ERROR_E_ARG_OUTPICINFO_NULL = 0x806181ab,
|
|
||||||
CELL_VPOST_ENT_ERROR_E_FATAL_SNDCMD_FAIL = 0x806181c0,
|
|
||||||
CELL_VPOST_ENT_ERROR_E_FATAL_RCVRES_FAIL = 0x806181c1,
|
|
||||||
CELL_VPOST_ENT_ERROR_E_FATAL_SPUCORE_FAIL = 0x806181c2,
|
|
||||||
CELL_VPOST_IPC_ERROR_Q_ARG_ATTR_NULL = 0x80618210,
|
|
||||||
CELL_VPOST_IPC_ERROR_O_ARG_RSRC_NULL = 0x80618240,
|
|
||||||
CELL_VPOST_IPC_ERROR_O_ARG_RSRC_INVALID = 0x80618241,
|
|
||||||
CELL_VPOST_IPC_ERROR_O_ARG_HDL_NULL = 0x80618242,
|
|
||||||
CELL_VPOST_IPC_ERROR_O_FATAL_QUERY_FAIL = 0x80618260,
|
|
||||||
CELL_VPOST_IPC_ERROR_O_FATAL_CSPUCORE_FAIL = 0x80618261,
|
|
||||||
CELL_VPOST_IPC_ERROR_C_ARG_HDL_NULL = 0x80618270,
|
|
||||||
CELL_VPOST_IPC_ERROR_C_ARG_HDL_INVALID = 0x80618271,
|
|
||||||
CELL_VPOST_IPC_ERROR_C_FATAL_SNDCMD_FAIL = 0x80618290,
|
|
||||||
CELL_VPOST_IPC_ERROR_C_FATAL_RCVRES_FAIL = 0x80618291,
|
|
||||||
CELL_VPOST_IPC_ERROR_C_FATAL_DSPUCORE_FAIL = 0x80618292,
|
|
||||||
CELL_VPOST_IPC_ERROR_E_ARG_HDL_NULL = 0x806182a0,
|
|
||||||
CELL_VPOST_IPC_ERROR_E_ARG_HDL_INVALID = 0x806182a1,
|
|
||||||
CELL_VPOST_IPC_ERROR_E_ARG_INPICBUF_NULL = 0x806182a2,
|
|
||||||
CELL_VPOST_IPC_ERROR_E_ARG_INPICBUF_INVALID = 0x806182a3,
|
|
||||||
CELL_VPOST_IPC_ERROR_E_ARG_INPICINFO_NULL = 0x806182a4,
|
|
||||||
CELL_VPOST_IPC_ERROR_E_ARG_INPICINFO_INVALID = 0x806182a5,
|
|
||||||
CELL_VPOST_IPC_ERROR_E_ARG_CTRL_NULL = 0x806182a6,
|
|
||||||
CELL_VPOST_IPC_ERROR_E_ARG_CTRL_INVALID = 0x806182a7,
|
|
||||||
CELL_VPOST_IPC_ERROR_E_ARG_COMB_INVALID = 0x806182a8,
|
|
||||||
CELL_VPOST_IPC_ERROR_E_ARG_OUTPICBUF_NULL = 0x806182a9,
|
|
||||||
CELL_VPOST_IPC_ERROR_E_ARG_OUTPICBUF_INVALID = 0x806182aa,
|
|
||||||
CELL_VPOST_IPC_ERROR_E_ARG_OUTPICINFO_NULL = 0x806182ab,
|
|
||||||
CELL_VPOST_IPC_ERROR_E_FATAL_SNDCMD_FAIL = 0x806182c0,
|
|
||||||
CELL_VPOST_IPC_ERROR_E_FATAL_RCVRES_FAIL = 0x806182c1,
|
|
||||||
CELL_VPOST_IPC_ERROR_E_FATAL_SPUCORE_FAIL = 0x806182c2,
|
|
||||||
CELL_VPOST_VSC_ERROR_Q_ARG_ATTR_NULL = 0x80618310,
|
|
||||||
CELL_VPOST_VSC_ERROR_O_ARG_RSRC_NULL = 0x80618340,
|
|
||||||
CELL_VPOST_VSC_ERROR_O_ARG_RSRC_INVALID = 0x80618341,
|
|
||||||
CELL_VPOST_VSC_ERROR_O_ARG_HDL_NULL = 0x80618342,
|
|
||||||
CELL_VPOST_VSC_ERROR_O_FATAL_QUERY_FAIL = 0x80618360,
|
|
||||||
CELL_VPOST_VSC_ERROR_O_FATAL_CSPUCORE_FAIL = 0x80618361,
|
|
||||||
CELL_VPOST_VSC_ERROR_C_ARG_HDL_NULL = 0x80618370,
|
|
||||||
CELL_VPOST_VSC_ERROR_C_ARG_HDL_INVALID = 0x80618371,
|
|
||||||
CELL_VPOST_VSC_ERROR_C_FATAL_SNDCMD_FAIL = 0x80618390,
|
|
||||||
CELL_VPOST_VSC_ERROR_C_FATAL_RCVRES_FAIL = 0x80618391,
|
|
||||||
CELL_VPOST_VSC_ERROR_C_FATAL_DSPUCORE_FAIL = 0x80618392,
|
|
||||||
CELL_VPOST_VSC_ERROR_E_ARG_HDL_NULL = 0x806183a0,
|
|
||||||
CELL_VPOST_VSC_ERROR_E_ARG_HDL_INVALID = 0x806183a1,
|
|
||||||
CELL_VPOST_VSC_ERROR_E_ARG_INPICBUF_NULL = 0x806183a2,
|
|
||||||
CELL_VPOST_VSC_ERROR_E_ARG_INPICBUF_INVALID = 0x806183a3,
|
|
||||||
CELL_VPOST_VSC_ERROR_E_ARG_INPICINFO_NULL = 0x806183a4,
|
|
||||||
CELL_VPOST_VSC_ERROR_E_ARG_INPICINFO_INVALID = 0x806183a5,
|
|
||||||
CELL_VPOST_VSC_ERROR_E_ARG_CTRL_NULL = 0x806183a6,
|
|
||||||
CELL_VPOST_VSC_ERROR_E_ARG_CTRL_INVALID = 0x806183a7,
|
|
||||||
CELL_VPOST_VSC_ERROR_E_ARG_COMB_INVALID = 0x806183a8,
|
|
||||||
CELL_VPOST_VSC_ERROR_E_ARG_OUTPICBUF_NULL = 0x806183a9,
|
|
||||||
CELL_VPOST_VSC_ERROR_E_ARG_OUTPICBUF_INVALID = 0x806183aa,
|
|
||||||
CELL_VPOST_VSC_ERROR_E_ARG_OUTPICINFO_NULL = 0x806183ab,
|
|
||||||
CELL_VPOST_VSC_ERROR_E_FATAL_SNDCMD_FAIL = 0x806183c0,
|
|
||||||
CELL_VPOST_VSC_ERROR_E_FATAL_RCVRES_FAIL = 0x806183c1,
|
|
||||||
CELL_VPOST_VSC_ERROR_E_FATAL_SPUCORE_FAIL = 0x806183c2,
|
|
||||||
CELL_VPOST_CSC_ERROR_Q_ARG_ATTR_NULL = 0x80618410,
|
|
||||||
CELL_VPOST_CSC_ERROR_O_ARG_RSRC_NULL = 0x80618440,
|
|
||||||
CELL_VPOST_CSC_ERROR_O_ARG_RSRC_INVALID = 0x80618441,
|
|
||||||
CELL_VPOST_CSC_ERROR_O_ARG_HDL_NULL = 0x80618442,
|
|
||||||
CELL_VPOST_CSC_ERROR_O_FATAL_QUERY_FAIL = 0x80618460,
|
|
||||||
CELL_VPOST_CSC_ERROR_O_FATAL_CSPUCORE_FAIL = 0x80618461,
|
|
||||||
CELL_VPOST_CSC_ERROR_C_ARG_HDL_NULL = 0x80618470,
|
|
||||||
CELL_VPOST_CSC_ERROR_C_ARG_HDL_INVALID = 0x80618471,
|
|
||||||
CELL_VPOST_CSC_ERROR_C_FATAL_SNDCMD_FAIL = 0x80618490,
|
|
||||||
CELL_VPOST_CSC_ERROR_C_FATAL_RCVRES_FAIL = 0x80618491,
|
|
||||||
CELL_VPOST_CSC_ERROR_C_FATAL_DSPUCORE_FAIL = 0x80618492,
|
|
||||||
CELL_VPOST_CSC_ERROR_E_ARG_HDL_NULL = 0x806184a0,
|
|
||||||
CELL_VPOST_CSC_ERROR_E_ARG_HDL_INVALID = 0x806184a1,
|
|
||||||
CELL_VPOST_CSC_ERROR_E_ARG_INPICBUF_NULL = 0x806184a2,
|
|
||||||
CELL_VPOST_CSC_ERROR_E_ARG_INPICBUF_INVALID = 0x806184a3,
|
|
||||||
CELL_VPOST_CSC_ERROR_E_ARG_INPICINFO_NULL = 0x806184a4,
|
|
||||||
CELL_VPOST_CSC_ERROR_E_ARG_INPICINFO_INVALID = 0x806184a5,
|
|
||||||
CELL_VPOST_CSC_ERROR_E_ARG_CTRL_NULL = 0x806184a6,
|
|
||||||
CELL_VPOST_CSC_ERROR_E_ARG_CTRL_INVALID = 0x806184a7,
|
|
||||||
CELL_VPOST_CSC_ERROR_E_ARG_COMB_INVALID = 0x806184a8,
|
|
||||||
CELL_VPOST_CSC_ERROR_E_ARG_OUTPICBUF_NULL = 0x806184a9,
|
|
||||||
CELL_VPOST_CSC_ERROR_E_ARG_OUTPICBUF_INVALID = 0x806184aa,
|
|
||||||
CELL_VPOST_CSC_ERROR_E_ARG_OUTPICINFO_NULL = 0x806184ab,
|
|
||||||
CELL_VPOST_CSC_ERROR_E_FATAL_SNDCMD_FAIL = 0x806184c0,
|
|
||||||
CELL_VPOST_CSC_ERROR_E_FATAL_RCVRES_FAIL = 0x806184c1,
|
|
||||||
CELL_VPOST_CSC_ERROR_E_FATAL_SPUCORE_FAIL = 0x806184c2,
|
|
||||||
};
|
|
||||||
|
|
||||||
int cellVpostQueryAttr()
|
int cellVpostQueryAttr()
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED_FUNC(cellVpost);
|
UNIMPLEMENTED_FUNC(cellVpost);
|
||||||
|
|
138
rpcs3/Emu/SysCalls/Modules/cellVpost.h
Normal file
138
rpcs3/Emu/SysCalls/Modules/cellVpost.h
Normal file
|
@ -0,0 +1,138 @@
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
// Error Codes
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
CELL_VPOST_ERROR_Q_ARG_CFG_NULL = 0x80610410,
|
||||||
|
CELL_VPOST_ERROR_Q_ARG_CFG_INVALID = 0x80610411,
|
||||||
|
CELL_VPOST_ERROR_Q_ARG_ATTR_NULL = 0x80610412,
|
||||||
|
CELL_VPOST_ERROR_O_ARG_CFG_NULL = 0x80610440,
|
||||||
|
CELL_VPOST_ERROR_O_ARG_CFG_INVALID = 0x80610441,
|
||||||
|
CELL_VPOST_ERROR_O_ARG_RSRC_NULL = 0x80610442,
|
||||||
|
CELL_VPOST_ERROR_O_ARG_RSRC_INVALID = 0x80610443,
|
||||||
|
CELL_VPOST_ERROR_O_ARG_HDL_NULL = 0x80610444,
|
||||||
|
CELL_VPOST_ERROR_O_FATAL_QUERY_FAIL = 0x80610460,
|
||||||
|
CELL_VPOST_ERROR_O_FATAL_CREATEMON_FAIL = 0x80610461,
|
||||||
|
CELL_VPOST_ERROR_O_FATAL_INITSPURS_FAIL = 0x80610462,
|
||||||
|
CELL_VPOST_ERROR_C_ARG_HDL_NULL = 0x80610470,
|
||||||
|
CELL_VPOST_ERROR_C_ARG_HDL_INVALID = 0x80610471,
|
||||||
|
CELL_VPOST_ERROR_C_FATAL_LOCKMON_FAIL = 0x80610490,
|
||||||
|
CELL_VPOST_ERROR_C_FATAL_UNLOCKMON_FAIL = 0x80610491,
|
||||||
|
CELL_VPOST_ERROR_C_FATAL_DESTROYMON_FAIL = 0x80610492,
|
||||||
|
CELL_VPOST_ERROR_C_FATAL_FINSPURS_FAIL = 0x80610463,
|
||||||
|
CELL_VPOST_ERROR_E_ARG_HDL_NULL = 0x806104a0,
|
||||||
|
CELL_VPOST_ERROR_E_ARG_HDL_INVALID = 0x806104a1,
|
||||||
|
CELL_VPOST_ERROR_E_ARG_INPICBUF_NULL = 0x806104a2,
|
||||||
|
CELL_VPOST_ERROR_E_ARG_INPICBUF_INVALID = 0x806104a3,
|
||||||
|
CELL_VPOST_ERROR_E_ARG_CTRL_NULL = 0x806104a4,
|
||||||
|
CELL_VPOST_ERROR_E_ARG_CTRL_INVALID = 0x806104a5,
|
||||||
|
CELL_VPOST_ERROR_E_ARG_OUTPICBUF_NULL = 0x806104a6,
|
||||||
|
CELL_VPOST_ERROR_E_ARG_OUTPICBUF_INVALID = 0x806104a7,
|
||||||
|
CELL_VPOST_ERROR_E_ARG_PICINFO_NULL = 0x806104a8,
|
||||||
|
CELL_VPOST_ERROR_E_FATAL_LOCKMON_FAIL = 0x806104c0,
|
||||||
|
CELL_VPOST_ERROR_E_FATAL_UNLOCKMON_FAIL = 0x806104c1,
|
||||||
|
CELL_VPOST_ENT_ERROR_Q_ARG_ATTR_NULL = 0x80618110,
|
||||||
|
CELL_VPOST_ENT_ERROR_O_ARG_RSRC_NULL = 0x80618140,
|
||||||
|
CELL_VPOST_ENT_ERROR_O_ARG_RSRC_INVALID = 0x80618141,
|
||||||
|
CELL_VPOST_ENT_ERROR_O_ARG_HDL_NULL = 0x80618142,
|
||||||
|
CELL_VPOST_ENT_ERROR_O_FATAL_QUERY_FAIL = 0x80618160,
|
||||||
|
CELL_VPOST_ENT_ERROR_O_FATAL_CSPUCORE_FAIL = 0x80618161,
|
||||||
|
CELL_VPOST_ENT_ERROR_C_ARG_HDL_NULL = 0x80618170,
|
||||||
|
CELL_VPOST_ENT_ERROR_C_ARG_HDL_INVALID = 0x80618171,
|
||||||
|
CELL_VPOST_ENT_ERROR_C_FATAL_SNDCMD_FAIL = 0x80618190,
|
||||||
|
CELL_VPOST_ENT_ERROR_C_FATAL_RCVRES_FAIL = 0x80618191,
|
||||||
|
CELL_VPOST_ENT_ERROR_C_FATAL_DSPUCORE_FAIL = 0x80618192,
|
||||||
|
CELL_VPOST_ENT_ERROR_E_ARG_HDL_NULL = 0x806181a0,
|
||||||
|
CELL_VPOST_ENT_ERROR_E_ARG_HDL_INVALID = 0x806181a1,
|
||||||
|
CELL_VPOST_ENT_ERROR_E_ARG_INPICBUF_NULL = 0x806181a2,
|
||||||
|
CELL_VPOST_ENT_ERROR_E_ARG_INPICBUF_INVALID = 0x806181a3,
|
||||||
|
CELL_VPOST_ENT_ERROR_E_ARG_INPICINFO_NULL = 0x806181a4,
|
||||||
|
CELL_VPOST_ENT_ERROR_E_ARG_INPICINFO_INVALID = 0x806181a5,
|
||||||
|
CELL_VPOST_ENT_ERROR_E_ARG_CTRL_NULL = 0x806181a6,
|
||||||
|
CELL_VPOST_ENT_ERROR_E_ARG_CTRL_INVALID = 0x806181a7,
|
||||||
|
CELL_VPOST_ENT_ERROR_E_ARG_COMB_INVALID = 0x806181a8,
|
||||||
|
CELL_VPOST_ENT_ERROR_E_ARG_OUTPICBUF_NULL = 0x806181a9,
|
||||||
|
CELL_VPOST_ENT_ERROR_E_ARG_OUTPICBUF_INVALID = 0x806181aa,
|
||||||
|
CELL_VPOST_ENT_ERROR_E_ARG_OUTPICINFO_NULL = 0x806181ab,
|
||||||
|
CELL_VPOST_ENT_ERROR_E_FATAL_SNDCMD_FAIL = 0x806181c0,
|
||||||
|
CELL_VPOST_ENT_ERROR_E_FATAL_RCVRES_FAIL = 0x806181c1,
|
||||||
|
CELL_VPOST_ENT_ERROR_E_FATAL_SPUCORE_FAIL = 0x806181c2,
|
||||||
|
CELL_VPOST_IPC_ERROR_Q_ARG_ATTR_NULL = 0x80618210,
|
||||||
|
CELL_VPOST_IPC_ERROR_O_ARG_RSRC_NULL = 0x80618240,
|
||||||
|
CELL_VPOST_IPC_ERROR_O_ARG_RSRC_INVALID = 0x80618241,
|
||||||
|
CELL_VPOST_IPC_ERROR_O_ARG_HDL_NULL = 0x80618242,
|
||||||
|
CELL_VPOST_IPC_ERROR_O_FATAL_QUERY_FAIL = 0x80618260,
|
||||||
|
CELL_VPOST_IPC_ERROR_O_FATAL_CSPUCORE_FAIL = 0x80618261,
|
||||||
|
CELL_VPOST_IPC_ERROR_C_ARG_HDL_NULL = 0x80618270,
|
||||||
|
CELL_VPOST_IPC_ERROR_C_ARG_HDL_INVALID = 0x80618271,
|
||||||
|
CELL_VPOST_IPC_ERROR_C_FATAL_SNDCMD_FAIL = 0x80618290,
|
||||||
|
CELL_VPOST_IPC_ERROR_C_FATAL_RCVRES_FAIL = 0x80618291,
|
||||||
|
CELL_VPOST_IPC_ERROR_C_FATAL_DSPUCORE_FAIL = 0x80618292,
|
||||||
|
CELL_VPOST_IPC_ERROR_E_ARG_HDL_NULL = 0x806182a0,
|
||||||
|
CELL_VPOST_IPC_ERROR_E_ARG_HDL_INVALID = 0x806182a1,
|
||||||
|
CELL_VPOST_IPC_ERROR_E_ARG_INPICBUF_NULL = 0x806182a2,
|
||||||
|
CELL_VPOST_IPC_ERROR_E_ARG_INPICBUF_INVALID = 0x806182a3,
|
||||||
|
CELL_VPOST_IPC_ERROR_E_ARG_INPICINFO_NULL = 0x806182a4,
|
||||||
|
CELL_VPOST_IPC_ERROR_E_ARG_INPICINFO_INVALID = 0x806182a5,
|
||||||
|
CELL_VPOST_IPC_ERROR_E_ARG_CTRL_NULL = 0x806182a6,
|
||||||
|
CELL_VPOST_IPC_ERROR_E_ARG_CTRL_INVALID = 0x806182a7,
|
||||||
|
CELL_VPOST_IPC_ERROR_E_ARG_COMB_INVALID = 0x806182a8,
|
||||||
|
CELL_VPOST_IPC_ERROR_E_ARG_OUTPICBUF_NULL = 0x806182a9,
|
||||||
|
CELL_VPOST_IPC_ERROR_E_ARG_OUTPICBUF_INVALID = 0x806182aa,
|
||||||
|
CELL_VPOST_IPC_ERROR_E_ARG_OUTPICINFO_NULL = 0x806182ab,
|
||||||
|
CELL_VPOST_IPC_ERROR_E_FATAL_SNDCMD_FAIL = 0x806182c0,
|
||||||
|
CELL_VPOST_IPC_ERROR_E_FATAL_RCVRES_FAIL = 0x806182c1,
|
||||||
|
CELL_VPOST_IPC_ERROR_E_FATAL_SPUCORE_FAIL = 0x806182c2,
|
||||||
|
CELL_VPOST_VSC_ERROR_Q_ARG_ATTR_NULL = 0x80618310,
|
||||||
|
CELL_VPOST_VSC_ERROR_O_ARG_RSRC_NULL = 0x80618340,
|
||||||
|
CELL_VPOST_VSC_ERROR_O_ARG_RSRC_INVALID = 0x80618341,
|
||||||
|
CELL_VPOST_VSC_ERROR_O_ARG_HDL_NULL = 0x80618342,
|
||||||
|
CELL_VPOST_VSC_ERROR_O_FATAL_QUERY_FAIL = 0x80618360,
|
||||||
|
CELL_VPOST_VSC_ERROR_O_FATAL_CSPUCORE_FAIL = 0x80618361,
|
||||||
|
CELL_VPOST_VSC_ERROR_C_ARG_HDL_NULL = 0x80618370,
|
||||||
|
CELL_VPOST_VSC_ERROR_C_ARG_HDL_INVALID = 0x80618371,
|
||||||
|
CELL_VPOST_VSC_ERROR_C_FATAL_SNDCMD_FAIL = 0x80618390,
|
||||||
|
CELL_VPOST_VSC_ERROR_C_FATAL_RCVRES_FAIL = 0x80618391,
|
||||||
|
CELL_VPOST_VSC_ERROR_C_FATAL_DSPUCORE_FAIL = 0x80618392,
|
||||||
|
CELL_VPOST_VSC_ERROR_E_ARG_HDL_NULL = 0x806183a0,
|
||||||
|
CELL_VPOST_VSC_ERROR_E_ARG_HDL_INVALID = 0x806183a1,
|
||||||
|
CELL_VPOST_VSC_ERROR_E_ARG_INPICBUF_NULL = 0x806183a2,
|
||||||
|
CELL_VPOST_VSC_ERROR_E_ARG_INPICBUF_INVALID = 0x806183a3,
|
||||||
|
CELL_VPOST_VSC_ERROR_E_ARG_INPICINFO_NULL = 0x806183a4,
|
||||||
|
CELL_VPOST_VSC_ERROR_E_ARG_INPICINFO_INVALID = 0x806183a5,
|
||||||
|
CELL_VPOST_VSC_ERROR_E_ARG_CTRL_NULL = 0x806183a6,
|
||||||
|
CELL_VPOST_VSC_ERROR_E_ARG_CTRL_INVALID = 0x806183a7,
|
||||||
|
CELL_VPOST_VSC_ERROR_E_ARG_COMB_INVALID = 0x806183a8,
|
||||||
|
CELL_VPOST_VSC_ERROR_E_ARG_OUTPICBUF_NULL = 0x806183a9,
|
||||||
|
CELL_VPOST_VSC_ERROR_E_ARG_OUTPICBUF_INVALID = 0x806183aa,
|
||||||
|
CELL_VPOST_VSC_ERROR_E_ARG_OUTPICINFO_NULL = 0x806183ab,
|
||||||
|
CELL_VPOST_VSC_ERROR_E_FATAL_SNDCMD_FAIL = 0x806183c0,
|
||||||
|
CELL_VPOST_VSC_ERROR_E_FATAL_RCVRES_FAIL = 0x806183c1,
|
||||||
|
CELL_VPOST_VSC_ERROR_E_FATAL_SPUCORE_FAIL = 0x806183c2,
|
||||||
|
CELL_VPOST_CSC_ERROR_Q_ARG_ATTR_NULL = 0x80618410,
|
||||||
|
CELL_VPOST_CSC_ERROR_O_ARG_RSRC_NULL = 0x80618440,
|
||||||
|
CELL_VPOST_CSC_ERROR_O_ARG_RSRC_INVALID = 0x80618441,
|
||||||
|
CELL_VPOST_CSC_ERROR_O_ARG_HDL_NULL = 0x80618442,
|
||||||
|
CELL_VPOST_CSC_ERROR_O_FATAL_QUERY_FAIL = 0x80618460,
|
||||||
|
CELL_VPOST_CSC_ERROR_O_FATAL_CSPUCORE_FAIL = 0x80618461,
|
||||||
|
CELL_VPOST_CSC_ERROR_C_ARG_HDL_NULL = 0x80618470,
|
||||||
|
CELL_VPOST_CSC_ERROR_C_ARG_HDL_INVALID = 0x80618471,
|
||||||
|
CELL_VPOST_CSC_ERROR_C_FATAL_SNDCMD_FAIL = 0x80618490,
|
||||||
|
CELL_VPOST_CSC_ERROR_C_FATAL_RCVRES_FAIL = 0x80618491,
|
||||||
|
CELL_VPOST_CSC_ERROR_C_FATAL_DSPUCORE_FAIL = 0x80618492,
|
||||||
|
CELL_VPOST_CSC_ERROR_E_ARG_HDL_NULL = 0x806184a0,
|
||||||
|
CELL_VPOST_CSC_ERROR_E_ARG_HDL_INVALID = 0x806184a1,
|
||||||
|
CELL_VPOST_CSC_ERROR_E_ARG_INPICBUF_NULL = 0x806184a2,
|
||||||
|
CELL_VPOST_CSC_ERROR_E_ARG_INPICBUF_INVALID = 0x806184a3,
|
||||||
|
CELL_VPOST_CSC_ERROR_E_ARG_INPICINFO_NULL = 0x806184a4,
|
||||||
|
CELL_VPOST_CSC_ERROR_E_ARG_INPICINFO_INVALID = 0x806184a5,
|
||||||
|
CELL_VPOST_CSC_ERROR_E_ARG_CTRL_NULL = 0x806184a6,
|
||||||
|
CELL_VPOST_CSC_ERROR_E_ARG_CTRL_INVALID = 0x806184a7,
|
||||||
|
CELL_VPOST_CSC_ERROR_E_ARG_COMB_INVALID = 0x806184a8,
|
||||||
|
CELL_VPOST_CSC_ERROR_E_ARG_OUTPICBUF_NULL = 0x806184a9,
|
||||||
|
CELL_VPOST_CSC_ERROR_E_ARG_OUTPICBUF_INVALID = 0x806184aa,
|
||||||
|
CELL_VPOST_CSC_ERROR_E_ARG_OUTPICINFO_NULL = 0x806184ab,
|
||||||
|
CELL_VPOST_CSC_ERROR_E_FATAL_SNDCMD_FAIL = 0x806184c0,
|
||||||
|
CELL_VPOST_CSC_ERROR_E_FATAL_RCVRES_FAIL = 0x806184c1,
|
||||||
|
CELL_VPOST_CSC_ERROR_E_FATAL_SPUCORE_FAIL = 0x806184c2,
|
||||||
|
};
|
|
@ -131,9 +131,9 @@ int cellFsSdataOpen(u32 path_addr, int flags, mem32_t fd, mem32_t arg, u64 size)
|
||||||
|
|
||||||
std::atomic<u32> g_FsAioReadID = 0;
|
std::atomic<u32> g_FsAioReadID = 0;
|
||||||
std::atomic<u32> g_FsAioReadCur = 0;
|
std::atomic<u32> g_FsAioReadCur = 0;
|
||||||
bool aio_init;
|
bool aio_init = false;
|
||||||
|
|
||||||
void fsAioRead(u32 fd, mem_ptr_t<CellFsAio> aio, int xid, mem_func_ptr_t<void (*)(mem_ptr_t<CellFsAio> xaio, u32 error, int xid, u64 size)> func)
|
void fsAioRead(u32 fd, mem_ptr_t<CellFsAio> aio, int xid, mem_func_ptr_t<void (*)(mem_ptr_t<CellFsAio> xaio, int error, int xid, u64 size)> func)
|
||||||
{
|
{
|
||||||
while (g_FsAioReadCur != xid)
|
while (g_FsAioReadCur != xid)
|
||||||
{
|
{
|
||||||
|
@ -184,14 +184,26 @@ void fsAioRead(u32 fd, mem_ptr_t<CellFsAio> aio, int xid, mem_func_ptr_t<void (*
|
||||||
ConLog.Warning("*** fsAioRead(fd=%d, offset=0x%llx, buf_addr=0x%x, size=0x%x, res=0x%x, xid=0x%x [%s])",
|
ConLog.Warning("*** fsAioRead(fd=%d, offset=0x%llx, buf_addr=0x%x, size=0x%x, res=0x%x, xid=0x%x [%s])",
|
||||||
fd, (u64)aio->offset, buf_addr, (u64)aio->size, res, xid, path.wx_str());
|
fd, (u64)aio->offset, buf_addr, (u64)aio->size, res, xid, path.wx_str());
|
||||||
|
|
||||||
//start callback thread
|
if (func) // start callback thread
|
||||||
if(func)
|
{
|
||||||
func.async(aio, error, xid, res);
|
func.async(aio, error, xid, res);
|
||||||
|
}
|
||||||
|
|
||||||
|
CPUThread& thr = Emu.GetCallbackThread();
|
||||||
|
while (thr.IsAlive())
|
||||||
|
{
|
||||||
|
Sleep(1);
|
||||||
|
if (Emu.IsStopped())
|
||||||
|
{
|
||||||
|
ConLog.Warning("fsAioRead() aborted");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
g_FsAioReadCur++;
|
g_FsAioReadCur++;
|
||||||
}
|
}
|
||||||
|
|
||||||
int cellFsAioRead(mem_ptr_t<CellFsAio> aio, mem32_t aio_id, mem_func_ptr_t<void (*)(mem_ptr_t<CellFsAio> xaio, u32 error, int xid, u64 size)> func)
|
int cellFsAioRead(mem_ptr_t<CellFsAio> aio, mem32_t aio_id, mem_func_ptr_t<void (*)(mem_ptr_t<CellFsAio> xaio, int error, int xid, u64 size)> func)
|
||||||
{
|
{
|
||||||
sys_fs.Warning("cellFsAioRead(aio_addr=0x%x, id_addr=0x%x, func_addr=0x%x)", aio.GetAddr(), aio_id.GetAddr(), func.GetAddr());
|
sys_fs.Warning("cellFsAioRead(aio_addr=0x%x, id_addr=0x%x, func_addr=0x%x)", aio.GetAddr(), aio_id.GetAddr(), func.GetAddr());
|
||||||
|
|
||||||
|
@ -202,7 +214,7 @@ int cellFsAioRead(mem_ptr_t<CellFsAio> aio, mem32_t aio_id, mem_func_ptr_t<void
|
||||||
|
|
||||||
if (!aio_init)
|
if (!aio_init)
|
||||||
{
|
{
|
||||||
//return CELL_ENXIO;
|
return CELL_ENXIO;
|
||||||
}
|
}
|
||||||
|
|
||||||
vfsFileBase* orig_file;
|
vfsFileBase* orig_file;
|
||||||
|
@ -233,6 +245,7 @@ int cellFsAioFinish(mem8_ptr_t mount_point)
|
||||||
{
|
{
|
||||||
wxString mp = Memory.ReadString(mount_point.GetAddr());
|
wxString mp = Memory.ReadString(mount_point.GetAddr());
|
||||||
sys_fs.Warning("cellFsAioFinish(mount_point_addr=0x%x (%s))", mount_point.GetAddr(), mp.wx_str());
|
sys_fs.Warning("cellFsAioFinish(mount_point_addr=0x%x (%s))", mount_point.GetAddr(), mp.wx_str());
|
||||||
|
aio_init = false;
|
||||||
return CELL_OK;
|
return CELL_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -128,7 +128,7 @@ int sys_cond_signal(u32 cond_id)
|
||||||
Mutex* mutex = cond->mutex;
|
Mutex* mutex = cond->mutex;
|
||||||
u32 tid = GetCurrentPPUThread().GetId();
|
u32 tid = GetCurrentPPUThread().GetId();
|
||||||
|
|
||||||
if (u32 target = mutex->protocol == SYS_SYNC_PRIORITY ? mutex->m_queue.pop_prio() : mutex->m_queue.pop())
|
if (u32 target = (mutex->protocol == SYS_SYNC_PRIORITY ? mutex->m_queue.pop_prio() : mutex->m_queue.pop()))
|
||||||
{
|
{
|
||||||
if (mutex->m_mutex.trylock(target) != SMR_OK)
|
if (mutex->m_mutex.trylock(target) != SMR_OK)
|
||||||
{
|
{
|
||||||
|
@ -159,7 +159,7 @@ int sys_cond_signal_all(u32 cond_id)
|
||||||
Mutex* mutex = cond->mutex;
|
Mutex* mutex = cond->mutex;
|
||||||
u32 tid = GetCurrentPPUThread().GetId();
|
u32 tid = GetCurrentPPUThread().GetId();
|
||||||
|
|
||||||
while (u32 target = mutex->protocol == SYS_SYNC_PRIORITY ? mutex->m_queue.pop_prio() : mutex->m_queue.pop())
|
while (u32 target = (mutex->protocol == SYS_SYNC_PRIORITY ? mutex->m_queue.pop_prio() : mutex->m_queue.pop()))
|
||||||
{
|
{
|
||||||
if (mutex->m_mutex.trylock(target) != SMR_OK)
|
if (mutex->m_mutex.trylock(target) != SMR_OK)
|
||||||
{
|
{
|
||||||
|
|
|
@ -84,7 +84,7 @@ int sys_lwcond_signal(mem_ptr_t<sys_lwcond_t> lwcond)
|
||||||
mem_ptr_t<sys_lwmutex_t> mutex(lwcond->lwmutex);
|
mem_ptr_t<sys_lwmutex_t> mutex(lwcond->lwmutex);
|
||||||
be_t<u32> tid = GetCurrentPPUThread().GetId();
|
be_t<u32> tid = GetCurrentPPUThread().GetId();
|
||||||
|
|
||||||
if (be_t<u32> target = mutex->attribute.ToBE() == se32(SYS_SYNC_PRIORITY) ? sq->pop_prio() : sq->pop())
|
if (be_t<u32> target = (mutex->attribute.ToBE() == se32(SYS_SYNC_PRIORITY) ? sq->pop_prio() : sq->pop()))
|
||||||
{
|
{
|
||||||
if (mutex->owner.trylock(target) != SMR_OK)
|
if (mutex->owner.trylock(target) != SMR_OK)
|
||||||
{
|
{
|
||||||
|
@ -120,7 +120,7 @@ int sys_lwcond_signal_all(mem_ptr_t<sys_lwcond_t> lwcond)
|
||||||
mem_ptr_t<sys_lwmutex_t> mutex(lwcond->lwmutex);
|
mem_ptr_t<sys_lwmutex_t> mutex(lwcond->lwmutex);
|
||||||
be_t<u32> tid = GetCurrentPPUThread().GetId();
|
be_t<u32> tid = GetCurrentPPUThread().GetId();
|
||||||
|
|
||||||
while (be_t<u32> target = mutex->attribute.ToBE() == se32(SYS_SYNC_PRIORITY) ? sq->pop_prio() : sq->pop())
|
while (be_t<u32> target = (mutex->attribute.ToBE() == se32(SYS_SYNC_PRIORITY) ? sq->pop_prio() : sq->pop()))
|
||||||
{
|
{
|
||||||
if (mutex->owner.trylock(target) != SMR_OK)
|
if (mutex->owner.trylock(target) != SMR_OK)
|
||||||
{
|
{
|
||||||
|
|
|
@ -28,7 +28,8 @@ int sys_lwmutex_create(mem_ptr_t<sys_lwmutex_t> lwmutex, mem_ptr_t<sys_lwmutex_a
|
||||||
}
|
}
|
||||||
|
|
||||||
lwmutex->attribute = attr->attr_protocol | attr->attr_recursive;
|
lwmutex->attribute = attr->attr_protocol | attr->attr_recursive;
|
||||||
lwmutex->all_info = 0;
|
lwmutex->owner.initialize();
|
||||||
|
lwmutex->waiter = lwmutex->owner.GetOwner();
|
||||||
lwmutex->pad = 0;
|
lwmutex->pad = 0;
|
||||||
lwmutex->recursive_count = 0;
|
lwmutex->recursive_count = 0;
|
||||||
|
|
||||||
|
@ -51,9 +52,10 @@ int sys_lwmutex_destroy(mem_ptr_t<sys_lwmutex_t> lwmutex)
|
||||||
if (!Emu.GetIdManager().CheckID(sq_id)) return CELL_ESRCH;
|
if (!Emu.GetIdManager().CheckID(sq_id)) return CELL_ESRCH;
|
||||||
|
|
||||||
// try to make it unable to lock
|
// try to make it unable to lock
|
||||||
switch (int res = lwmutex->trylock(~0))
|
switch (int res = lwmutex->trylock(lwmutex->owner.GetDeadValue()))
|
||||||
{
|
{
|
||||||
case CELL_OK:
|
case CELL_OK:
|
||||||
|
lwmutex->all_info = 0;
|
||||||
lwmutex->attribute = 0;
|
lwmutex->attribute = 0;
|
||||||
lwmutex->sleep_queue = 0;
|
lwmutex->sleep_queue = 0;
|
||||||
Emu.GetIdManager().RemoveID(sq_id);
|
Emu.GetIdManager().RemoveID(sq_id);
|
||||||
|
@ -245,8 +247,10 @@ int sys_lwmutex_t::unlock(be_t<u32> tid)
|
||||||
SleepQueue* sq;
|
SleepQueue* sq;
|
||||||
if (!Emu.GetIdManager().GetIDData(sleep_queue, sq)) return CELL_ESRCH;
|
if (!Emu.GetIdManager().GetIDData(sleep_queue, sq)) return CELL_ESRCH;
|
||||||
target = attribute.ToBE() & se32(SYS_SYNC_FIFO) ? sq->pop() : sq->pop_prio();
|
target = attribute.ToBE() & se32(SYS_SYNC_FIFO) ? sq->pop() : sq->pop_prio();
|
||||||
case se32(SYS_SYNC_RETRY): default: owner.unlock(tid, target); break;
|
case se32(SYS_SYNC_RETRY): break;
|
||||||
}
|
}
|
||||||
|
if (target) owner.unlock(tid, target);
|
||||||
|
else owner.unlock(tid);
|
||||||
}
|
}
|
||||||
return CELL_OK;
|
return CELL_OK;
|
||||||
}
|
}
|
||||||
|
|
|
@ -69,7 +69,7 @@ struct sys_lwmutex_t
|
||||||
{
|
{
|
||||||
struct // sys_lwmutex_lock_info_t
|
struct // sys_lwmutex_lock_info_t
|
||||||
{
|
{
|
||||||
/* volatile */ SMutexBE owner;
|
/* volatile */ SMutexBase<be_t<u32>, 0xffffffff, 0> owner;
|
||||||
/* volatile */ be_t<u32> waiter; // not used
|
/* volatile */ be_t<u32> waiter; // not used
|
||||||
};
|
};
|
||||||
struct
|
struct
|
||||||
|
|
|
@ -91,8 +91,9 @@ int sys_mutex_lock(u32 mutex_id, u64 timeout)
|
||||||
}
|
}
|
||||||
|
|
||||||
u32 tid = GetCurrentPPUThread().GetId();
|
u32 tid = GetCurrentPPUThread().GetId();
|
||||||
|
u32 owner = mutex->m_mutex.GetOwner();
|
||||||
|
|
||||||
if (mutex->m_mutex.GetOwner() == tid)
|
if (owner == tid)
|
||||||
{
|
{
|
||||||
if (mutex->is_recursive)
|
if (mutex->is_recursive)
|
||||||
{
|
{
|
||||||
|
@ -107,6 +108,13 @@ int sys_mutex_lock(u32 mutex_id, u64 timeout)
|
||||||
return CELL_EDEADLK;
|
return CELL_EDEADLK;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (owner && !Emu.GetIdManager().CheckID(owner))
|
||||||
|
{
|
||||||
|
sys_mtx.Error("sys_mutex_lock(%d): deadlock on invalid thread(%d)", mutex_id, owner);
|
||||||
|
mutex->m_mutex.unlock(owner, tid);
|
||||||
|
mutex->recursive = 1;
|
||||||
|
return CELL_OK;
|
||||||
|
}
|
||||||
|
|
||||||
switch (mutex->m_mutex.trylock(tid))
|
switch (mutex->m_mutex.trylock(tid))
|
||||||
{
|
{
|
||||||
|
@ -119,16 +127,20 @@ int sys_mutex_lock(u32 mutex_id, u64 timeout)
|
||||||
|
|
||||||
switch (mutex->m_mutex.lock(tid, timeout ? ((timeout < 1000) ? 1 : (timeout / 1000)) : 0))
|
switch (mutex->m_mutex.lock(tid, timeout ? ((timeout < 1000) ? 1 : (timeout / 1000)) : 0))
|
||||||
{
|
{
|
||||||
case SMR_OK: mutex->m_queue.invalidate(tid);
|
case SMR_OK:
|
||||||
case SMR_SIGNAL: mutex->recursive = 1; return CELL_OK;
|
mutex->m_queue.invalidate(tid);
|
||||||
case SMR_TIMEOUT: return CELL_ETIMEDOUT;
|
case SMR_SIGNAL:
|
||||||
default: goto abort;
|
mutex->recursive = 1; return CELL_OK;
|
||||||
|
case SMR_TIMEOUT:
|
||||||
|
mutex->m_queue.invalidate(tid); return CELL_ETIMEDOUT;
|
||||||
|
default:
|
||||||
|
mutex->m_queue.invalidate(tid); goto abort;
|
||||||
}
|
}
|
||||||
|
|
||||||
abort:
|
abort:
|
||||||
if (Emu.IsStopped())
|
if (Emu.IsStopped())
|
||||||
{
|
{
|
||||||
ConLog.Warning("sys_mutex_lock(id=%d) aborted", mutex_id);
|
sys_mtx.Warning("sys_mutex_lock(id=%d) aborted", mutex_id);
|
||||||
return CELL_OK;
|
return CELL_OK;
|
||||||
}
|
}
|
||||||
return CELL_ESRCH;
|
return CELL_ESRCH;
|
||||||
|
@ -145,8 +157,9 @@ int sys_mutex_trylock(u32 mutex_id)
|
||||||
}
|
}
|
||||||
|
|
||||||
u32 tid = GetCurrentPPUThread().GetId();
|
u32 tid = GetCurrentPPUThread().GetId();
|
||||||
|
u32 owner = mutex->m_mutex.GetOwner();
|
||||||
|
|
||||||
if (mutex->m_mutex.GetOwner() == tid)
|
if (owner == tid)
|
||||||
{
|
{
|
||||||
if (mutex->is_recursive)
|
if (mutex->is_recursive)
|
||||||
{
|
{
|
||||||
|
@ -161,6 +174,13 @@ int sys_mutex_trylock(u32 mutex_id)
|
||||||
return CELL_EDEADLK;
|
return CELL_EDEADLK;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (owner && !Emu.GetIdManager().CheckID(owner))
|
||||||
|
{
|
||||||
|
sys_mtx.Error("sys_mutex_trylock(%d): deadlock on invalid thread(%d)", mutex_id, owner);
|
||||||
|
mutex->m_mutex.unlock(owner, tid);
|
||||||
|
mutex->recursive = 1;
|
||||||
|
return CELL_OK;
|
||||||
|
}
|
||||||
|
|
||||||
switch (mutex->m_mutex.trylock(tid))
|
switch (mutex->m_mutex.trylock(tid))
|
||||||
{
|
{
|
||||||
|
@ -184,6 +204,10 @@ int sys_mutex_unlock(u32 mutex_id)
|
||||||
|
|
||||||
if (mutex->m_mutex.GetOwner() == tid)
|
if (mutex->m_mutex.GetOwner() == tid)
|
||||||
{
|
{
|
||||||
|
if (!mutex->recursive || (mutex->recursive > 1 && !mutex->is_recursive))
|
||||||
|
{
|
||||||
|
sys_mtx.Warning("sys_mutex_unlock(%d): wrong recursive value (%d)", mutex_id, mutex->recursive);
|
||||||
|
}
|
||||||
mutex->recursive--;
|
mutex->recursive--;
|
||||||
if (!mutex->recursive)
|
if (!mutex->recursive)
|
||||||
{
|
{
|
||||||
|
|
|
@ -24,14 +24,14 @@ int sys_time_get_timezone(mem32_t timezone, mem32_t summertime)
|
||||||
return CELL_OK;
|
return CELL_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
u64 get_system_time()
|
u64 get_time()
|
||||||
{
|
{
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
LARGE_INTEGER cycle;
|
LARGE_INTEGER cycle;
|
||||||
LARGE_INTEGER freq;
|
LARGE_INTEGER freq;
|
||||||
QueryPerformanceCounter(&cycle);
|
QueryPerformanceCounter(&cycle);
|
||||||
QueryPerformanceFrequency(&freq);
|
QueryPerformanceFrequency(&freq);
|
||||||
return cycle.QuadPart * 1000000 / freq.QuadPart;
|
return cycle.QuadPart * 10000000 / freq.QuadPart;
|
||||||
#else
|
#else
|
||||||
struct timespec ts;
|
struct timespec ts;
|
||||||
if (!clock_gettime(CLOCK_MONOTONIC, &ts))
|
if (!clock_gettime(CLOCK_MONOTONIC, &ts))
|
||||||
|
@ -39,14 +39,20 @@ u64 get_system_time()
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
u64 get_system_time()
|
||||||
|
{
|
||||||
|
// returns some relative time in microseconds, don't change this fact
|
||||||
|
return get_time() / 10;
|
||||||
|
}
|
||||||
|
|
||||||
int sys_time_get_current_time(u32 sec_addr, u32 nsec_addr)
|
int sys_time_get_current_time(u32 sec_addr, u32 nsec_addr)
|
||||||
{
|
{
|
||||||
sys_time.Log("sys_time_get_current_time(sec_addr=0x%x, nsec_addr=0x%x)", sec_addr, nsec_addr);
|
sys_time.Log("sys_time_get_current_time(sec_addr=0x%x, nsec_addr=0x%x)", sec_addr, nsec_addr);
|
||||||
|
|
||||||
u64 time = get_system_time();
|
u64 time = get_time();
|
||||||
|
|
||||||
Memory.Write64(sec_addr, time / 1000000);
|
Memory.Write64(sec_addr, time / 10000000);
|
||||||
Memory.Write64(nsec_addr, time % 1000000);
|
Memory.Write64(nsec_addr, (time % 10000000) * 100);
|
||||||
|
|
||||||
return CELL_OK;
|
return CELL_OK;
|
||||||
}
|
}
|
||||||
|
@ -60,17 +66,5 @@ s64 sys_time_get_system_time()
|
||||||
u64 sys_time_get_timebase_frequency()
|
u64 sys_time_get_timebase_frequency()
|
||||||
{
|
{
|
||||||
sys_time.Log("sys_time_get_timebase_frequency()");
|
sys_time.Log("sys_time_get_timebase_frequency()");
|
||||||
return 1000000;
|
|
||||||
|
|
||||||
/*
|
|
||||||
#ifdef _WIN32
|
|
||||||
static LARGE_INTEGER frequency = {0ULL};
|
|
||||||
|
|
||||||
if(!frequency.QuadPart) QueryPerformanceFrequency(&frequency);
|
|
||||||
|
|
||||||
return frequency.QuadPart;
|
|
||||||
#else
|
|
||||||
return 10000000;
|
return 10000000;
|
||||||
#endif
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -279,6 +279,7 @@
|
||||||
<ClCompile Include="Emu\SysCalls\lv2\SC_TTY.cpp" />
|
<ClCompile Include="Emu\SysCalls\lv2\SC_TTY.cpp" />
|
||||||
<ClCompile Include="Emu\SysCalls\lv2\SC_VM.cpp" />
|
<ClCompile Include="Emu\SysCalls\lv2\SC_VM.cpp" />
|
||||||
<ClCompile Include="Emu\SysCalls\Modules.cpp" />
|
<ClCompile Include="Emu\SysCalls\Modules.cpp" />
|
||||||
|
<ClCompile Include="Emu\SysCalls\Modules\cellAdec.cpp" />
|
||||||
<ClCompile Include="Emu\SysCalls\Modules\cellAudio.cpp" />
|
<ClCompile Include="Emu\SysCalls\Modules\cellAudio.cpp" />
|
||||||
<ClCompile Include="Emu\SysCalls\Modules\cellDmux.cpp" />
|
<ClCompile Include="Emu\SysCalls\Modules\cellDmux.cpp" />
|
||||||
<ClCompile Include="Emu\SysCalls\Modules\cellFont.cpp" />
|
<ClCompile Include="Emu\SysCalls\Modules\cellFont.cpp" />
|
||||||
|
@ -295,6 +296,8 @@
|
||||||
<ClCompile Include="Emu\SysCalls\Modules\cellSysmodule.cpp" />
|
<ClCompile Include="Emu\SysCalls\Modules\cellSysmodule.cpp" />
|
||||||
<ClCompile Include="Emu\SysCalls\Modules\cellSysutil.cpp" />
|
<ClCompile Include="Emu\SysCalls\Modules\cellSysutil.cpp" />
|
||||||
<ClCompile Include="Emu\SysCalls\Modules\cellSysutilAp.cpp" />
|
<ClCompile Include="Emu\SysCalls\Modules\cellSysutilAp.cpp" />
|
||||||
|
<ClCompile Include="Emu\SysCalls\Modules\cellVdec.cpp" />
|
||||||
|
<ClCompile Include="Emu\SysCalls\Modules\cellVpost.cpp" />
|
||||||
<ClCompile Include="Emu\SysCalls\Modules\sceNpTrophy.cpp" />
|
<ClCompile Include="Emu\SysCalls\Modules\sceNpTrophy.cpp" />
|
||||||
<ClCompile Include="Emu\SysCalls\Modules\sysPrxForUser.cpp" />
|
<ClCompile Include="Emu\SysCalls\Modules\sysPrxForUser.cpp" />
|
||||||
<ClCompile Include="Emu\SysCalls\Modules\sys_fs.cpp" />
|
<ClCompile Include="Emu\SysCalls\Modules\sys_fs.cpp" />
|
||||||
|
|
|
@ -406,6 +406,15 @@
|
||||||
<ClCompile Include="Emu\FS\vfsDir.cpp">
|
<ClCompile Include="Emu\FS\vfsDir.cpp">
|
||||||
<Filter>Emu\FS</Filter>
|
<Filter>Emu\FS</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
<ClCompile Include="Emu\SysCalls\Modules\cellVdec.cpp">
|
||||||
|
<Filter>Emu\SysCalls\Modules</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="Emu\SysCalls\Modules\cellVpost.cpp">
|
||||||
|
<Filter>Emu\SysCalls\Modules</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="Emu\SysCalls\Modules\cellAdec.cpp">
|
||||||
|
<Filter>Emu\SysCalls\Modules</Filter>
|
||||||
|
</ClCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ResourceCompile Include="rpcs3.rc" />
|
<ResourceCompile Include="rpcs3.rc" />
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue