mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-22 02:32:36 +01:00
commit
7c6c20ef18
@ -35,6 +35,11 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
void initialize()
|
||||
{
|
||||
(T&)owner = free_value;
|
||||
}
|
||||
|
||||
~SMutexBase()
|
||||
{
|
||||
lock((T)dead_value);
|
||||
@ -46,6 +51,16 @@ public:
|
||||
return (T&)owner;
|
||||
}
|
||||
|
||||
__forceinline T GetFreeValue() const
|
||||
{
|
||||
return (T)free_value;
|
||||
}
|
||||
|
||||
__forceinline T GetDeadValue() const
|
||||
{
|
||||
return (T)dead_value;
|
||||
}
|
||||
|
||||
SMutexResult trylock(T tid)
|
||||
{
|
||||
if (Emu.IsStopped())
|
||||
|
@ -32,12 +32,99 @@ private:
|
||||
//0 - 10
|
||||
void STOP(u32 code)
|
||||
{
|
||||
if (CPU.SPU.Out_MBox.GetCount()) // the real exit status is probably stored there
|
||||
ConLog.Warning("STOP: 0x%x (message=0x%x)", code, CPU.SPU.Out_MBox.GetValue());
|
||||
else
|
||||
ConLog.Warning("STOP: 0x%x (no message)", code);
|
||||
CPU.SetExitStatus(code);
|
||||
CPU.Stop();
|
||||
CPU.SetExitStatus(code); // exit code (not status)
|
||||
|
||||
switch (code)
|
||||
{
|
||||
case 0x110: /* ===== sys_spu_thread_receive_event ===== */
|
||||
{
|
||||
u32 spuq = 0;
|
||||
if (!CPU.SPU.Out_MBox.Pop(spuq))
|
||||
{
|
||||
ConLog.Error("sys_spu_thread_receive_event: cannot read Out_MBox");
|
||||
CPU.SPU.In_MBox.PushUncond(CELL_EINVAL); // ???
|
||||
return;
|
||||
}
|
||||
|
||||
if (CPU.SPU.In_MBox.GetCount())
|
||||
{
|
||||
ConLog.Error("sys_spu_thread_receive_event(spuq=0x%x): In_MBox is not empty", spuq);
|
||||
CPU.SPU.In_MBox.PushUncond(CELL_EBUSY); // ???
|
||||
return;
|
||||
}
|
||||
|
||||
if (Ini.HLELogging.GetValue())
|
||||
{
|
||||
ConLog.Write("sys_spu_thread_receive_event(spuq=0x%x)", spuq);
|
||||
}
|
||||
|
||||
EventQueue* eq;
|
||||
if (!CPU.SPUQs.GetEventQueue(FIX_SPUQ(spuq), eq))
|
||||
{
|
||||
CPU.SPU.In_MBox.PushUncond(CELL_EINVAL); // TODO: check error value
|
||||
return;
|
||||
}
|
||||
|
||||
u32 tid = GetCurrentSPUThread().GetId();
|
||||
|
||||
eq->sq.push(tid); // add thread to sleep queue
|
||||
|
||||
while (true)
|
||||
{
|
||||
switch (eq->owner.trylock(tid))
|
||||
{
|
||||
case SMR_OK:
|
||||
if (!eq->events.count())
|
||||
{
|
||||
eq->owner.unlock(tid);
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
u32 next = (eq->protocol == SYS_SYNC_FIFO) ? eq->sq.pop() : eq->sq.pop_prio();
|
||||
if (next != tid)
|
||||
{
|
||||
eq->owner.unlock(tid, next);
|
||||
break;
|
||||
}
|
||||
}
|
||||
case SMR_SIGNAL:
|
||||
{
|
||||
sys_event_data event;
|
||||
eq->events.pop(event);
|
||||
eq->owner.unlock(tid);
|
||||
CPU.SPU.In_MBox.PushUncond(CELL_OK);
|
||||
CPU.SPU.In_MBox.PushUncond(event.data1);
|
||||
CPU.SPU.In_MBox.PushUncond(event.data2);
|
||||
CPU.SPU.In_MBox.PushUncond(event.data3);
|
||||
return;
|
||||
}
|
||||
case SMR_FAILED: break;
|
||||
default: eq->sq.invalidate(tid); CPU.SPU.In_MBox.PushUncond(CELL_ECANCELED); return;
|
||||
}
|
||||
|
||||
Sleep(1);
|
||||
if (Emu.IsStopped())
|
||||
{
|
||||
ConLog.Warning("sys_spu_thread_receive_event(spuq=0x%x) aborted", spuq);
|
||||
eq->sq.invalidate(tid);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 0x102: default:
|
||||
if (!CPU.SPU.Out_MBox.GetCount()) // the real exit status
|
||||
{
|
||||
ConLog.Warning("STOP: 0x%x (no message)", code);
|
||||
}
|
||||
else if (Ini.HLELogging.GetValue() || code != 0x102)
|
||||
{
|
||||
ConLog.Warning("STOP: 0x%x (message=0x%x)", code, CPU.SPU.Out_MBox.GetValue());
|
||||
}
|
||||
CPU.Stop();
|
||||
break;
|
||||
}
|
||||
}
|
||||
void LNOP()
|
||||
{
|
||||
|
@ -95,3 +95,22 @@ void SPUThread::DoStop()
|
||||
delete m_dec;
|
||||
m_dec = nullptr;
|
||||
}
|
||||
|
||||
void SPUThread::DoClose()
|
||||
{
|
||||
// disconnect all event ports
|
||||
if (Emu.IsStopped())
|
||||
{
|
||||
return;
|
||||
}
|
||||
for (u32 i = 0; i < 64; i++)
|
||||
{
|
||||
EventPort& port = SPUPs[i];
|
||||
SMutexLocker lock(port.mutex);
|
||||
if (port.eq)
|
||||
{
|
||||
port.eq->ports.remove(&port);
|
||||
port.eq = nullptr;
|
||||
}
|
||||
}
|
||||
}
|
@ -275,6 +275,9 @@ public:
|
||||
FPSCR FPSCR;
|
||||
SPU_SNRConfig_hdr cfg; //Signal Notification Registers Configuration (OR-mode enabled: 0x1 for SNR1, 0x2 for SNR2)
|
||||
|
||||
EventPort SPUPs[64]; // SPU Thread Event Ports
|
||||
EventManager SPUQs; // SPU Queue Mapping
|
||||
|
||||
template<size_t _max_count>
|
||||
class Channel
|
||||
{
|
||||
@ -317,8 +320,13 @@ public:
|
||||
{
|
||||
return false;
|
||||
}
|
||||
res = m_value[--m_index];
|
||||
m_value[m_index] = 0;
|
||||
res = m_value[0];
|
||||
for (u32 i = 1; i < max_count; i++) // FIFO
|
||||
{
|
||||
m_value[i-1] = m_value[i];
|
||||
}
|
||||
m_value[max_count-1] = 0;
|
||||
m_index--;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
@ -479,7 +487,6 @@ public:
|
||||
struct
|
||||
{
|
||||
Channel<1> Out_MBox;
|
||||
Channel<1> OutIntr_Mbox;
|
||||
Channel<4> In_MBox;
|
||||
Channel<1> MBox_Status;
|
||||
Channel<1> RunCntl;
|
||||
@ -616,11 +623,14 @@ public:
|
||||
|
||||
case SPU_WrOutIntrMbox:
|
||||
ConLog.Warning("GetChannelCount(%s) = 0", wxString(spu_ch_name[ch]).wx_str());
|
||||
return 0;//return SPU.OutIntr_Mbox.GetFreeCount();
|
||||
return 0;
|
||||
|
||||
case MFC_RdTagStat:
|
||||
return Prxy.TagStatus.GetCount();
|
||||
|
||||
case MFC_WrTagUpdate:
|
||||
return Prxy.TagStatus.GetCount(); // hack
|
||||
|
||||
case SPU_RdSigNotify1:
|
||||
return SPU.SNR[0].GetCount();
|
||||
|
||||
@ -646,12 +656,63 @@ public:
|
||||
switch(ch)
|
||||
{
|
||||
case SPU_WrOutIntrMbox:
|
||||
ConLog.Warning("%s: %s = 0x%x", wxString(__FUNCTION__).wx_str(), wxString(spu_ch_name[ch]).wx_str(), v);
|
||||
while (!SPU.OutIntr_Mbox.Push(v) && !Emu.IsStopped()) Sleep(1);
|
||||
{
|
||||
u8 code = v >> 24;
|
||||
if (code < 64)
|
||||
{
|
||||
/* ===== sys_spu_thread_send_event ===== */
|
||||
|
||||
u8 spup = code & 63;
|
||||
|
||||
u32 data;
|
||||
if (!SPU.Out_MBox.Pop(data))
|
||||
{
|
||||
ConLog.Error("sys_spu_thread_send_event(v=0x%x, spup=%d): Out_MBox is empty", v, spup);
|
||||
return;
|
||||
}
|
||||
|
||||
if (SPU.In_MBox.GetCount())
|
||||
{
|
||||
ConLog.Error("sys_spu_thread_send_event(v=0x%x, spup=%d): In_MBox is not empty", v, spup);
|
||||
SPU.In_MBox.PushUncond(CELL_EBUSY); // ???
|
||||
return;
|
||||
}
|
||||
|
||||
if (Ini.HLELogging.GetValue())
|
||||
{
|
||||
ConLog.Write("sys_spu_thread_send_event(spup=%d, data0=0x%x, data1=0x%x)", spup, v & 0x00ffffff, data);
|
||||
}
|
||||
|
||||
EventPort& port = SPUPs[spup];
|
||||
|
||||
SMutexLocker lock(port.mutex);
|
||||
|
||||
if (!port.eq)
|
||||
{
|
||||
SPU.In_MBox.PushUncond(CELL_ENOTCONN); // check error passing
|
||||
return;
|
||||
}
|
||||
|
||||
if (!port.eq->events.push(SYS_SPU_THREAD_EVENT_USER_KEY, lock.tid, ((u64)code << 32) | (v & 0x00ffffff), data))
|
||||
{
|
||||
SPU.In_MBox.PushUncond(CELL_EBUSY);
|
||||
return;
|
||||
}
|
||||
|
||||
SPU.In_MBox.PushUncond(CELL_OK);
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
ConLog.Error("SPU_WrOutIntrMbox: unknown data (v=0x%x)", v);
|
||||
SPU.In_MBox.PushUncond(CELL_EINVAL); // ???
|
||||
return;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case SPU_WrOutMbox:
|
||||
ConLog.Warning("%s: %s = 0x%x", wxString(__FUNCTION__).wx_str(), wxString(spu_ch_name[ch]).wx_str(), v);
|
||||
//ConLog.Warning("%s: %s = 0x%x", wxString(__FUNCTION__).wx_str(), wxString(spu_ch_name[ch]).wx_str(), v);
|
||||
while (!SPU.Out_MBox.Push(v) && !Emu.IsStopped()) Sleep(1);
|
||||
break;
|
||||
|
||||
@ -707,7 +768,7 @@ public:
|
||||
{
|
||||
case SPU_RdInMbox:
|
||||
while (!SPU.In_MBox.Pop(v) && !Emu.IsStopped()) Sleep(1);
|
||||
ConLog.Warning("%s: 0x%x = %s", wxString(__FUNCTION__).wx_str(), v, wxString(spu_ch_name[ch]).wx_str());
|
||||
//ConLog.Warning("%s: 0x%x = %s", wxString(__FUNCTION__).wx_str(), v, wxString(spu_ch_name[ch]).wx_str());
|
||||
break;
|
||||
|
||||
case MFC_RdTagStat:
|
||||
@ -738,7 +799,7 @@ public:
|
||||
}
|
||||
|
||||
bool IsGoodLSA(const u32 lsa) const { return Memory.IsGoodAddr(lsa + m_offset) && lsa < 0x40000; }
|
||||
virtual u8 ReadLS8 (const u32 lsa) const { return Memory.Read8 (lsa + (m_offset & 0x3fffc)); }
|
||||
virtual u8 ReadLS8 (const u32 lsa) const { return Memory.Read8 (lsa + m_offset); } // m_offset & 0x3fffc ?????
|
||||
virtual u16 ReadLS16 (const u32 lsa) const { return Memory.Read16 (lsa + m_offset); }
|
||||
virtual u32 ReadLS32 (const u32 lsa) const { return Memory.Read32 (lsa + m_offset); }
|
||||
virtual u64 ReadLS64 (const u32 lsa) const { return Memory.Read64 (lsa + m_offset); }
|
||||
@ -805,6 +866,7 @@ protected:
|
||||
virtual void DoPause();
|
||||
virtual void DoResume();
|
||||
virtual void DoStop();
|
||||
virtual void DoClose();
|
||||
};
|
||||
|
||||
SPUThread& GetCurrentSPUThread();
|
||||
|
@ -26,6 +26,11 @@ bool EventManager::RegisterKey(EventQueue* data, u64 key)
|
||||
|
||||
if (key_map.find(key) != key_map.end()) return false;
|
||||
|
||||
for (auto& v = key_map.begin(); v != key_map.end(); ++v)
|
||||
{
|
||||
if (v->second == data) return false;
|
||||
}
|
||||
|
||||
key_map[key] = data;
|
||||
|
||||
return true;
|
||||
@ -58,4 +63,20 @@ bool EventManager::UnregisterKey(u64 key)
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool EventManager::SendEvent(u64 key, u64 source, u64 d1, u64 d2, u64 d3)
|
||||
{
|
||||
if (!key) return false;
|
||||
SMutexLocker lock(m_lock);
|
||||
|
||||
auto f = key_map.find(key);
|
||||
if (f == key_map.end())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
EventQueue* eq = f->second;
|
||||
|
||||
eq->events.push(source, d1, d2, d3);
|
||||
return true;
|
||||
}
|
@ -1,71 +1,64 @@
|
||||
#include "stdafx.h"
|
||||
#include "Emu/SysCalls/SysCalls.h"
|
||||
#include "Emu/SysCalls/SC_FUNC.h"
|
||||
#include "cellAdec.h"
|
||||
|
||||
void cellAdec_init();
|
||||
Module cellAdec(0x0006, cellAdec_init);
|
||||
|
||||
// Error Codes
|
||||
enum
|
||||
int cellAdecQueryAttr(mem_ptr_t<CellAdecType> type, mem_ptr_t<CellAdecAttr> attr)
|
||||
{
|
||||
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()
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(cellAdec);
|
||||
cellAdec.Error("cellAdecQueryAttr(type_addr=0x%x, attr_addr=0x%x)", type.GetAddr(), attr.GetAddr());
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
int cellAdecOpen()
|
||||
int cellAdecOpen(mem_ptr_t<CellAdecType> type, mem_ptr_t<CellAdecResource> res, mem_ptr_t<CellAdecCb> cb, mem32_t handle)
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(cellAdec);
|
||||
cellAdec.Error("cellAdecOpen(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;
|
||||
}
|
||||
|
||||
int cellAdecOpenEx()
|
||||
int cellAdecOpenEx(mem_ptr_t<CellAdecType> type, mem_ptr_t<CellAdecResourceEx> res, mem_ptr_t<CellAdecCb> cb, mem32_t handle)
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(cellAdec);
|
||||
cellAdec.Error("cellAdecOpenEx(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;
|
||||
}
|
||||
|
||||
int cellAdecClose()
|
||||
int cellAdecClose(u32 handle)
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(cellAdec);
|
||||
cellAdec.Error("cellAdecClose(handle=0x%x)", handle);
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
int cellAdecStartSeq()
|
||||
int cellAdecStartSeq(u32 handle, u32 param_addr)
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(cellAdec);
|
||||
cellAdec.Error("cellAdecStartSeq(handle=0x%x, param_addr=0x%x)", handle, param_addr);
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
int cellAdecEndSeq()
|
||||
int cellAdecEndSeq(u32 handle)
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(cellAdec);
|
||||
cellAdec.Error("cellAdecEndSeq(handle=0x%x)", handle);
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
int cellAdecDecodeAu()
|
||||
int cellAdecDecodeAu(u32 handle, mem_ptr_t<CellAdecAuInfo> auInfo)
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(cellAdec);
|
||||
cellAdec.Error("cellAdecDecodeAu(handle=0x%x, auInfo_addr=0x%x)", handle, auInfo.GetAddr());
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
int cellAdecGetPcm()
|
||||
int cellAdecGetPcm(u32 handle, u32 outBuffer_addr)
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(cellAdec);
|
||||
cellAdec.Error("cellAdecGetPcm(handle=0x%x, outBuffer_addr=0x%x)", handle, outBuffer_addr);
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
int cellAdecGetPcmItem()
|
||||
int cellAdecGetPcmItem(u32 handle, u32 pcmItem_ptr_addr)
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(cellAdec);
|
||||
cellAdec.Error("cellAdecGetPcmItem(handle=0x%x, pcmItem_ptr_addr=0x%x)", handle, pcmItem_ptr_addr);
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
|
983
rpcs3/Emu/SysCalls/Modules/cellAdec.h
Normal file
983
rpcs3/Emu/SysCalls/Modules/cellAdec.h
Normal file
@ -0,0 +1,983 @@
|
||||
#pragma once
|
||||
#include "cellPamf.h"
|
||||
|
||||
// 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,
|
||||
|
||||
CELL_ADEC_ERROR_CELP_BUSY = 0x80612e01,
|
||||
CELL_ADEC_ERROR_CELP_EMPTY = 0x80612e02,
|
||||
CELL_ADEC_ERROR_CELP_ARG = 0x80612e03,
|
||||
CELL_ADEC_ERROR_CELP_SEQ = 0x80612e04,
|
||||
CELL_ADEC_ERROR_CELP_CORE_FATAL = 0x80612e81,
|
||||
CELL_ADEC_ERROR_CELP_CORE_ARG = 0x80612e82,
|
||||
CELL_ADEC_ERROR_CELP_CORE_SEQ = 0x80612e83,
|
||||
|
||||
CELL_ADEC_ERROR_CELP8_BUSY = 0x80612ea1,
|
||||
CELL_ADEC_ERROR_CELP8_EMPTY = 0x80612ea2,
|
||||
CELL_ADEC_ERROR_CELP8_ARG = 0x80612ea3,
|
||||
CELL_ADEC_ERROR_CELP8_SEQ = 0x80612ea4,
|
||||
CELL_ADEC_ERROR_CELP8_CORE_FATAL = 0x80612eb1,
|
||||
CELL_ADEC_ERROR_CELP8_CORE_ARG = 0x80612eb2,
|
||||
CELL_ADEC_ERROR_CELP8_CORE_SEQ = 0x80612eb3,
|
||||
|
||||
CELL_ADEC_ERROR_M4AAC_FATAL = 0x80612401,
|
||||
CELL_ADEC_ERROR_M4AAC_SEQ = 0x80612402,
|
||||
CELL_ADEC_ERROR_M4AAC_ARG = 0x80612403,
|
||||
CELL_ADEC_ERROR_M4AAC_BUSY = 0x80612404,
|
||||
CELL_ADEC_ERROR_M4AAC_EMPTY = 0x80612405,
|
||||
CELL_ADEC_ERROR_M4AAC_BUFFER_OVERFLOW = 0x80612406,
|
||||
CELL_ADEC_ERROR_M4AAC_END_OF_BITSTREAM = 0x80612407,
|
||||
|
||||
/* Core */
|
||||
CELL_ADEC_ERROR_M4AAC_CH_CONFIG_INCONSISTENCY = 0x80612410,
|
||||
CELL_ADEC_ERROR_M4AAC_NO_CH_DEFAULT_POS = 0x80612411,
|
||||
CELL_ADEC_ERROR_M4AAC_INVALID_CH_POS = 0x80612412,
|
||||
CELL_ADEC_ERROR_M4AAC_UNANTICIPATED_COUPLING_CH = 0x80612413,
|
||||
CELL_ADEC_ERROR_M4AAC_INVALID_LAYER_ID = 0x80612414,
|
||||
CELL_ADEC_ERROR_M4AAC_ADTS_SYNCWORD_ERROR = 0x80612415,
|
||||
CELL_ADEC_ERROR_M4AAC_INVALID_ADTS_ID = 0x80612416,
|
||||
CELL_ADEC_ERROR_M4AAC_CH_CHANGED = 0x80612417,
|
||||
CELL_ADEC_ERROR_M4AAC_SAMPLING_FREQ_CHANGED = 0x80612418,
|
||||
CELL_ADEC_ERROR_M4AAC_WRONG_SBR_CH = 0x80612419,
|
||||
CELL_ADEC_ERROR_M4AAC_WRONG_SCALE_FACTOR = 0x8061241a,
|
||||
CELL_ADEC_ERROR_M4AAC_INVALID_BOOKS = 0x8061241b,
|
||||
CELL_ADEC_ERROR_M4AAC_INVALID_SECTION_DATA = 0x8061241c,
|
||||
CELL_ADEC_ERROR_M4AAC_PULSE_IS_NOT_LONG = 0x8061241d,
|
||||
CELL_ADEC_ERROR_M4AAC_GC_IS_NOT_SUPPORTED = 0x8061241e,
|
||||
CELL_ADEC_ERROR_M4AAC_INVALID_ELEMENT_ID = 0x8061241f,
|
||||
CELL_ADEC_ERROR_M4AAC_NO_CH_CONFIG = 0x80612420,
|
||||
CELL_ADEC_ERROR_M4AAC_UNEXPECTED_OVERLAP_CRC = 0x80612421,
|
||||
CELL_ADEC_ERROR_M4AAC_CRC_BUFFER_EXCEEDED = 0x80612422,
|
||||
CELL_ADEC_ERROR_M4AAC_INVALID_CRC = 0x80612423,
|
||||
CELL_ADEC_ERROR_M4AAC_BAD_WINDOW_CODE = 0x80612424,
|
||||
CELL_ADEC_ERROR_M4AAC_INVALID_ADIF_HEADER_ID = 0x80612425,
|
||||
CELL_ADEC_ERROR_M4AAC_NOT_SUPPORTED_PROFILE = 0x80612426,
|
||||
CELL_ADEC_ERROR_M4AAC_PROG_NUMBER_NOT_FOUND = 0x80612427,
|
||||
CELL_ADEC_ERROR_M4AAC_INVALID_SAMP_RATE_INDEX = 0x80612428,
|
||||
CELL_ADEC_ERROR_M4AAC_UNANTICIPATED_CH_CONFIG = 0x80612429,
|
||||
CELL_ADEC_ERROR_M4AAC_PULSE_OVERFLOWED = 0x8061242a,
|
||||
CELL_ADEC_ERROR_M4AAC_CAN_NOT_UNPACK_INDEX = 0x8061242b,
|
||||
CELL_ADEC_ERROR_M4AAC_DEINTERLEAVE_FAILED = 0x8061242c,
|
||||
CELL_ADEC_ERROR_M4AAC_CALC_BAND_OFFSET_FAILED = 0x8061242d,
|
||||
CELL_ADEC_ERROR_M4AAC_GET_SCALE_FACTOR_FAILED = 0x8061242e,
|
||||
CELL_ADEC_ERROR_M4AAC_GET_CC_GAIN_FAILED = 0x8061242f,
|
||||
CELL_ADEC_ERROR_M4AAC_MIX_COUPLING_CH_FAILED = 0x80612430,
|
||||
CELL_ADEC_ERROR_M4AAC_GROUP_IS_INVALID = 0x80612431,
|
||||
CELL_ADEC_ERROR_M4AAC_PREDICT_FAILED = 0x80612432,
|
||||
CELL_ADEC_ERROR_M4AAC_INVALID_PREDICT_RESET_PATTERN = 0x80612433,
|
||||
CELL_ADEC_ERROR_M4AAC_INVALID_TNS_FRAME_INFO = 0x80612434,
|
||||
CELL_ADEC_ERROR_M4AAC_GET_MASK_FAILED = 0x80612435,
|
||||
CELL_ADEC_ERROR_M4AAC_GET_GROUP_FAILED = 0x80612436,
|
||||
CELL_ADEC_ERROR_M4AAC_GET_LPFLAG_FAILED = 0x80612437,
|
||||
CELL_ADEC_ERROR_M4AAC_INVERSE_QUANTIZATION_FAILED = 0x80612438,
|
||||
CELL_ADEC_ERROR_M4AAC_GET_CB_MAP_FAILED = 0x80612439,
|
||||
CELL_ADEC_ERROR_M4AAC_GET_PULSE_FAILED = 0x8061243a,
|
||||
CELL_ADEC_ERROR_M4AAC_MONO_MIXDOWN_ELEMENT_IS_NOT_SUPPORTED
|
||||
= 0x8061243b,
|
||||
CELL_ADEC_ERROR_M4AAC_STEREO_MIXDOWN_ELEMENT_IS_NOT_SUPPORTED
|
||||
= 0x8061243c,
|
||||
|
||||
CELL_ADEC_ERROR_M4AAC_SBR_CH_OVERFLOW = 0x80612480,
|
||||
CELL_ADEC_ERROR_M4AAC_SBR_NOSYNCH = 0x80612481,
|
||||
CELL_ADEC_ERROR_M4AAC_SBR_ILLEGAL_PROGRAM = 0x80612482,
|
||||
CELL_ADEC_ERROR_M4AAC_SBR_ILLEGAL_TAG = 0x80612483,
|
||||
CELL_ADEC_ERROR_M4AAC_SBR_ILLEGAL_CHN_CONFIG = 0x80612484,
|
||||
CELL_ADEC_ERROR_M4AAC_SBR_ILLEGAL_SECTION = 0x80612485,
|
||||
CELL_ADEC_ERROR_M4AAC_SBR_ILLEGAL_SCFACTORS = 0x80612486,
|
||||
CELL_ADEC_ERROR_M4AAC_SBR_ILLEGAL_PULSE_DATA = 0x80612487,
|
||||
CELL_ADEC_ERROR_M4AAC_SBR_MAIN_PROFILE_NOT_IMPLEMENTED = 0x80612488,
|
||||
CELL_ADEC_ERROR_M4AAC_SBR_GC_NOT_IMPLEMENTED = 0x80612489,
|
||||
CELL_ADEC_ERROR_M4AAC_SBR_ILLEGAL_PLUS_ELE_ID = 0x8061248a,
|
||||
CELL_ADEC_ERROR_M4AAC_SBR_CREATE_ERROR = 0x8061248b,
|
||||
CELL_ADEC_ERROR_M4AAC_SBR_NOT_INITIALIZED = 0x8061248c,
|
||||
CELL_ADEC_ERROR_M4AAC_SBR_INVALID_ENVELOPE = 0x8061248d,
|
||||
|
||||
|
||||
CELL_ADEC_ERROR_AC3_BUSY = 0x80612500,
|
||||
CELL_ADEC_ERROR_AC3_EMPTY = 0x80612501,
|
||||
CELL_ADEC_ERROR_AC3_PARAM = 0x80612502,
|
||||
CELL_ADEC_ERROR_AC3_FRAME = 0x80612503,
|
||||
|
||||
|
||||
CELL_ADEC_ERROR_AT3_OFFSET = 0x80612100,
|
||||
CELL_ADEC_ERROR_AT3_OK = 0x80612100,
|
||||
CELL_ADEC_ERROR_AT3_BUSY = 0x80612164,
|
||||
CELL_ADEC_ERROR_AT3_EMPTY = 0x80612165,
|
||||
CELL_ADEC_ERROR_AT3_ERROR = 0x80612180,
|
||||
|
||||
|
||||
CELL_ADEC_ERROR_ATX_OFFSET = 0x80612200,
|
||||
CELL_ADEC_ERROR_ATX_NONE = 0x80612200,
|
||||
CELL_ADEC_ERROR_ATX_OK = 0x80612200,
|
||||
CELL_ADEC_ERROR_ATX_BUSY = 0x80612264,
|
||||
CELL_ADEC_ERROR_ATX_EMPTY = 0x80612265,
|
||||
CELL_ADEC_ERROR_ATX_ATSHDR = 0x80612266,
|
||||
CELL_ADEC_ERROR_ATX_NON_FATAL = 0x80612281,
|
||||
CELL_ADEC_ERROR_ATX_NOT_IMPLE = 0x80612282,
|
||||
CELL_ADEC_ERROR_ATX_PACK_CE_OVERFLOW = 0x80612283,
|
||||
CELL_ADEC_ERROR_ATX_ILLEGAL_NPROCQUS = 0x80612284,
|
||||
CELL_ADEC_ERROR_ATX_FATAL = 0x8061228c,
|
||||
CELL_ADEC_ERROR_ATX_ENC_OVERFLOW = 0x8061228d,
|
||||
CELL_ADEC_ERROR_ATX_PACK_CE_UNDERFLOW = 0x8061228e,
|
||||
CELL_ADEC_ERROR_ATX_SYNTAX_IDCT = 0x8061228f,
|
||||
CELL_ADEC_ERROR_ATX_SYNTAX_GAINADJ = 0x80612290,
|
||||
CELL_ADEC_ERROR_ATX_SYNTAX_IDSF = 0x80612291,
|
||||
CELL_ADEC_ERROR_ATX_SYNTAX_SPECTRA = 0x80612292,
|
||||
CELL_ADEC_ERROR_ATX_SYNTAX_IDWL = 0x80612293,
|
||||
CELL_ADEC_ERROR_ATX_SYNTAX_GHWAVE = 0x80612294,
|
||||
CELL_ADEC_ERROR_ATX_SYNTAX_SHEADER = 0x80612295,
|
||||
CELL_ADEC_ERROR_ATX_SYNTAX_IDWL_A = 0x80612296,
|
||||
CELL_ADEC_ERROR_ATX_SYNTAX_IDWL_B = 0x80612297,
|
||||
CELL_ADEC_ERROR_ATX_SYNTAX_IDWL_C = 0x80612298,
|
||||
CELL_ADEC_ERROR_ATX_SYNTAX_IDWL_D = 0x80612299,
|
||||
CELL_ADEC_ERROR_ATX_SYNTAX_IDWL_E = 0x8061229a,
|
||||
CELL_ADEC_ERROR_ATX_SYNTAX_IDSF_A = 0x8061229b,
|
||||
CELL_ADEC_ERROR_ATX_SYNTAX_IDSF_B = 0x8061229c,
|
||||
CELL_ADEC_ERROR_ATX_SYNTAX_IDSF_C = 0x8061229d,
|
||||
CELL_ADEC_ERROR_ATX_SYNTAX_IDSF_D = 0x8061229e,
|
||||
CELL_ADEC_ERROR_ATX_SYNTAX_IDCT_A = 0x8061229f,
|
||||
CELL_ADEC_ERROR_ATX_SYNTAX_GC_NGC = 0x806122a0,
|
||||
CELL_ADEC_ERROR_ATX_SYNTAX_GC_IDLEV_A = 0x806122a1,
|
||||
CELL_ADEC_ERROR_ATX_SYNTAX_GC_IDLOC_A = 0x806122a2,
|
||||
CELL_ADEC_ERROR_ATX_SYNTAX_GC_IDLEV_B = 0x806122a3,
|
||||
CELL_ADEC_ERROR_ATX_SYNTAX_GC_IDLOC_B = 0x806122a4,
|
||||
CELL_ADEC_ERROR_ATX_SYNTAX_SN_NWVS = 0x806122a5,
|
||||
CELL_ADEC_ERROR_ATX_FATAL_HANDLE = 0x806122aa,
|
||||
CELL_ADEC_ERROR_ATX_ASSERT_SAMPLING_FREQ = 0x806122ab,
|
||||
CELL_ADEC_ERROR_ATX_ASSERT_CH_CONFIG_INDEX = 0x806122ac,
|
||||
CELL_ADEC_ERROR_ATX_ASSERT_NBYTES = 0x806122ad,
|
||||
CELL_ADEC_ERROR_ATX_ASSERT_BLOCK_NUM = 0x806122ae,
|
||||
CELL_ADEC_ERROR_ATX_ASSERT_BLOCK_ID = 0x806122af,
|
||||
CELL_ADEC_ERROR_ATX_ASSERT_CHANNELS = 0x806122b0,
|
||||
CELL_ADEC_ERROR_ATX_UNINIT_BLOCK_SPECIFIED = 0x806122b1,
|
||||
CELL_ADEC_ERROR_ATX_POSCFG_PRESENT = 0x806122b2,
|
||||
CELL_ADEC_ERROR_ATX_BUFFER_OVERFLOW = 0x806122b3,
|
||||
CELL_ADEC_ERROR_ATX_ILL_BLK_TYPE_ID = 0x806122b4,
|
||||
CELL_ADEC_ERROR_ATX_UNPACK_CHANNEL_BLK_FAILED = 0x806122b5,
|
||||
CELL_ADEC_ERROR_ATX_ILL_BLK_ID_USED_1 = 0x806122b6,
|
||||
CELL_ADEC_ERROR_ATX_ILL_BLK_ID_USED_2 = 0x806122b7,
|
||||
CELL_ADEC_ERROR_ATX_ILLEGAL_ENC_SETTING = 0x806122b8,
|
||||
CELL_ADEC_ERROR_ATX_ILLEGAL_DEC_SETTING = 0x806122b9,
|
||||
CELL_ADEC_ERROR_ATX_ASSERT_NSAMPLES = 0x806122ba,
|
||||
|
||||
CELL_ADEC_ERROR_ATX_ILL_SYNCWORD = 0x806122bb,
|
||||
CELL_ADEC_ERROR_ATX_ILL_SAMPLING_FREQ = 0x806122bc,
|
||||
CELL_ADEC_ERROR_ATX_ILL_CH_CONFIG_INDEX = 0x806122bd,
|
||||
CELL_ADEC_ERROR_ATX_RAW_DATA_FRAME_SIZE_OVER = 0x806122be,
|
||||
CELL_ADEC_ERROR_ATX_SYNTAX_ENHANCE_LENGTH_OVER = 0x806122bf,
|
||||
CELL_ADEC_ERROR_ATX_SPU_INTERNAL_FAIL = 0x806122c8,
|
||||
|
||||
|
||||
CELL_ADEC_ERROR_LPCM_FATAL = 0x80612001,
|
||||
CELL_ADEC_ERROR_LPCM_SEQ = 0x80612002,
|
||||
CELL_ADEC_ERROR_LPCM_ARG = 0x80612003,
|
||||
CELL_ADEC_ERROR_LPCM_BUSY = 0x80612004,
|
||||
CELL_ADEC_ERROR_LPCM_EMPTY = 0x80612005,
|
||||
|
||||
|
||||
CELL_ADEC_ERROR_MP3_OFFSET = 0x80612700U,
|
||||
CELL_ADEC_ERROR_MP3_OK = 0x80612700,
|
||||
CELL_ADEC_ERROR_MP3_BUSY = 0x80612764,
|
||||
CELL_ADEC_ERROR_MP3_EMPTY = 0x80612765,
|
||||
CELL_ADEC_ERROR_MP3_ERROR = 0x80612781,
|
||||
CELL_ADEC_ERROR_MP3_LOST_SYNC = 0x80612782,
|
||||
CELL_ADEC_ERROR_MP3_NOT_L3 = 0x80612783,
|
||||
CELL_ADEC_ERROR_MP3_BAD_BITRATE = 0x80612784,
|
||||
CELL_ADEC_ERROR_MP3_BAD_SFREQ = 0x80612785,
|
||||
CELL_ADEC_ERROR_MP3_BAD_EMPHASIS = 0x80612786,
|
||||
CELL_ADEC_ERROR_MP3_BAD_BLKTYPE = 0x80612787,
|
||||
CELL_ADEC_ERROR_MP3_BAD_VERSION = 0x8061278c,
|
||||
CELL_ADEC_ERROR_MP3_BAD_MODE = 0x8061278d,
|
||||
CELL_ADEC_ERROR_MP3_BAD_MODE_EXT = 0x8061278e,
|
||||
CELL_ADEC_ERROR_MP3_HUFFMAN_NUM = 0x80612796,
|
||||
CELL_ADEC_ERROR_MP3_HUFFMAN_CASE_ID = 0x80612797,
|
||||
CELL_ADEC_ERROR_MP3_SCALEFAC_COMPRESS = 0x80612798,
|
||||
CELL_ADEC_ERROR_MP3_HGETBIT = 0x80612799,
|
||||
CELL_ADEC_ERROR_MP3_FLOATING_EXCEPTION = 0x8061279a,
|
||||
CELL_ADEC_ERROR_MP3_ARRAY_OVERFLOW = 0x8061279b,
|
||||
CELL_ADEC_ERROR_MP3_STEREO_PROCESSING = 0x8061279c,
|
||||
CELL_ADEC_ERROR_MP3_JS_BOUND = 0x8061279d,
|
||||
CELL_ADEC_ERROR_MP3_PCMOUT = 0x8061279e,
|
||||
|
||||
|
||||
CELL_ADEC_ERROR_M2BC_FATAL = 0x80612b01,
|
||||
CELL_ADEC_ERROR_M2BC_SEQ = 0x80612b02,
|
||||
CELL_ADEC_ERROR_M2BC_ARG = 0x80612b03,
|
||||
CELL_ADEC_ERROR_M2BC_BUSY = 0x80612b04,
|
||||
CELL_ADEC_ERROR_M2BC_EMPTY = 0x80612b05,
|
||||
|
||||
CELL_ADEC_ERROR_M2BC_SYNCF = 0x80612b11,
|
||||
CELL_ADEC_ERROR_M2BC_LAYER = 0x80612b12,
|
||||
CELL_ADEC_ERROR_M2BC_BITRATE = 0x80612b13,
|
||||
CELL_ADEC_ERROR_M2BC_SAMPLEFREQ = 0x80612b14,
|
||||
CELL_ADEC_ERROR_M2BC_VERSION = 0x80612b15,
|
||||
CELL_ADEC_ERROR_M2BC_MODE_EXT = 0x80612b16,
|
||||
CELL_ADEC_ERROR_M2BC_UNSUPPORT = 0x80612b17,
|
||||
|
||||
CELL_ADEC_ERROR_M2BC_OPENBS_EX = 0x80612b21,
|
||||
CELL_ADEC_ERROR_M2BC_SYNCF_EX = 0x80612b22,
|
||||
CELL_ADEC_ERROR_M2BC_CRCGET_EX = 0x80612b23,
|
||||
CELL_ADEC_ERROR_M2BC_CRC_EX = 0x80612b24,
|
||||
|
||||
CELL_ADEC_ERROR_M2BC_CRCGET = 0x80612b31,
|
||||
CELL_ADEC_ERROR_M2BC_CRC = 0x80612b32,
|
||||
CELL_ADEC_ERROR_M2BC_BITALLOC = 0x80612b33,
|
||||
CELL_ADEC_ERROR_M2BC_SCALE = 0x80612b34,
|
||||
CELL_ADEC_ERROR_M2BC_SAMPLE = 0x80612b35,
|
||||
CELL_ADEC_ERROR_M2BC_OPENBS = 0x80612b36,
|
||||
|
||||
CELL_ADEC_ERROR_M2BC_MC_CRCGET = 0x80612b41,
|
||||
CELL_ADEC_ERROR_M2BC_MC_CRC = 0x80612b42,
|
||||
CELL_ADEC_ERROR_M2BC_MC_BITALLOC = 0x80612b43,
|
||||
CELL_ADEC_ERROR_M2BC_MC_SCALE = 0x80612b44,
|
||||
CELL_ADEC_ERROR_M2BC_MC_SAMPLE = 0x80612b45,
|
||||
CELL_ADEC_ERROR_M2BC_MC_HEADER = 0x80612b46,
|
||||
CELL_ADEC_ERROR_M2BC_MC_STATUS = 0x80612b47,
|
||||
|
||||
CELL_ADEC_ERROR_M2BC_AG_CCRCGET = 0x80612b51,
|
||||
CELL_ADEC_ERROR_M2BC_AG_CRC = 0x80612b52,
|
||||
CELL_ADEC_ERROR_M2BC_AG_BITALLOC = 0x80612b53,
|
||||
CELL_ADEC_ERROR_M2BC_AG_SCALE = 0x80612b54,
|
||||
CELL_ADEC_ERROR_M2BC_AG_SAMPLE = 0x80612b55,
|
||||
CELL_ADEC_ERROR_M2BC_AG_STATUS = 0x80612b57,
|
||||
};
|
||||
|
||||
// Audio Codec Type
|
||||
enum AudioCodecType
|
||||
{
|
||||
CELL_ADEC_TYPE_RESERVED1,
|
||||
CELL_ADEC_TYPE_LPCM_PAMF,
|
||||
CELL_ADEC_TYPE_AC3,
|
||||
CELL_ADEC_TYPE_ATRACX,
|
||||
CELL_ADEC_TYPE_MP3,
|
||||
CELL_ADEC_TYPE_ATRAC3,
|
||||
CELL_ADEC_TYPE_MPEG_L2,
|
||||
CELL_ADEC_TYPE_RESERVED5,
|
||||
CELL_ADEC_TYPE_RESERVED6,
|
||||
CELL_ADEC_TYPE_RESERVED7,
|
||||
CELL_ADEC_TYPE_RESERVED8,
|
||||
CELL_ADEC_TYPE_CELP,
|
||||
CELL_ADEC_TYPE_RESERVED10,
|
||||
CELL_ADEC_TYPE_ATRACX_2CH,
|
||||
CELL_ADEC_TYPE_ATRACX_6CH,
|
||||
CELL_ADEC_TYPE_ATRACX_8CH,
|
||||
CELL_ADEC_TYPE_M4AAC,
|
||||
CELL_ADEC_TYPE_RESERVED12,
|
||||
CELL_ADEC_TYPE_RESERVED13,
|
||||
CELL_ADEC_TYPE_RESERVED14,
|
||||
CELL_ADEC_TYPE_RESERVED15,
|
||||
CELL_ADEC_TYPE_RESERVED16,
|
||||
CELL_ADEC_TYPE_RESERVED17,
|
||||
CELL_ADEC_TYPE_RESERVED18,
|
||||
CELL_ADEC_TYPE_RESERVED19,
|
||||
CELL_ADEC_TYPE_CELP8,
|
||||
CELL_ADEC_TYPE_RESERVED20,
|
||||
CELL_ADEC_TYPE_RESERVED21,
|
||||
CELL_ADEC_TYPE_RESERVED22,
|
||||
CELL_ADEC_TYPE_RESERVED23,
|
||||
CELL_ADEC_TYPE_RESERVED24,
|
||||
CELL_ADEC_TYPE_RESERVED25,
|
||||
};
|
||||
|
||||
// Output Channel Number
|
||||
enum CellAdecChannel
|
||||
{
|
||||
CELL_ADEC_CH_RESERVED1,
|
||||
CELL_ADEC_CH_MONO,
|
||||
CELL_ADEC_CH_RESERVED2,
|
||||
CELL_ADEC_CH_STEREO,
|
||||
CELL_ADEC_CH_3_0,
|
||||
CELL_ADEC_CH_2_1,
|
||||
CELL_ADEC_CH_3_1,
|
||||
CELL_ADEC_CH_2_2,
|
||||
CELL_ADEC_CH_3_2,
|
||||
CELL_ADEC_CH_3_2_LFE,
|
||||
CELL_ADEC_CH_3_4,
|
||||
CELL_ADEC_CH_3_4_LFE,
|
||||
CELL_ADEC_CH_RESERVED3,
|
||||
};
|
||||
|
||||
// Sampling Rate
|
||||
enum CellAdecSampleRate
|
||||
{
|
||||
CELL_ADEC_FS_RESERVED1 = 0,
|
||||
CELL_ADEC_FS_48kHz = 1,
|
||||
CELL_ADEC_FS_16kHz = 2,
|
||||
CELL_ADEC_FS_8kHz = 5,
|
||||
};
|
||||
|
||||
enum CellAdecBitLength
|
||||
{
|
||||
CELL_ADEC_BIT_LENGTH_RESERVED1,
|
||||
CELL_ADEC_BIT_LENGTH_16,
|
||||
CELL_ADEC_BIT_LENGTH_20,
|
||||
CELL_ADEC_BIT_LENGTH_24,
|
||||
};
|
||||
|
||||
struct CellAdecType
|
||||
{
|
||||
be_t<AudioCodecType> audioCodecType;
|
||||
};
|
||||
|
||||
struct CellAdecAttr
|
||||
{
|
||||
be_t<u32> workMemSize;
|
||||
be_t<u32> adecVerUpper;
|
||||
be_t<u32> adecVerLower;
|
||||
};
|
||||
|
||||
struct CellAdecResource
|
||||
{
|
||||
be_t<u32> totalMemSize;
|
||||
be_t<u32> startAddr;
|
||||
be_t<u32> ppuThreadPriority;
|
||||
be_t<u32> spuThreadPriority;
|
||||
be_t<u32> ppuThreadStackSize;
|
||||
};
|
||||
|
||||
// Callback Messages
|
||||
enum CellAdecMsgType
|
||||
{
|
||||
CELL_ADEC_MSG_TYPE_AUDONE,
|
||||
CELL_ADEC_MSG_TYPE_PCMOUT,
|
||||
CELL_ADEC_MSG_TYPE_ERROR,
|
||||
CELL_ADEC_MSG_TYPE_SEQDONE,
|
||||
};
|
||||
|
||||
struct CellAdecCb
|
||||
{
|
||||
be_t<mem_func_ptr_t<int (*)(u32 handle, CellAdecMsgType msgType, int msgData, u32 cbArg_addr)>> cbFunc;
|
||||
be_t<u32> cbArg_addr;
|
||||
};
|
||||
|
||||
typedef CellCodecTimeStamp CellAdecTimeStamp;
|
||||
|
||||
// AU Info
|
||||
struct CellAdecAuInfo
|
||||
{
|
||||
be_t<u32> startAddr;
|
||||
be_t<u32> size;
|
||||
CellCodecTimeStamp pts;
|
||||
be_t<u64> userData;
|
||||
};
|
||||
|
||||
// BSI Info
|
||||
struct CellAdecPcmAttr
|
||||
{
|
||||
be_t<u32> bsiInfo_addr;
|
||||
};
|
||||
|
||||
struct CellAdecPcmItem
|
||||
{
|
||||
be_t<u32> pcmHandle;
|
||||
be_t<u32> status;
|
||||
be_t<u32> startAddr;
|
||||
be_t<u32> size;
|
||||
CellAdecPcmAttr pcmAttr;
|
||||
CellAdecAuInfo auInfo;
|
||||
};
|
||||
|
||||
struct CellAdecParamLpcm
|
||||
{
|
||||
be_t<u32> channelNumber;
|
||||
be_t<u32> sampleRate;
|
||||
be_t<u32> sizeOfWord;
|
||||
be_t<u32> audioPayloadSize;
|
||||
};
|
||||
|
||||
// LPCM BSI
|
||||
struct CellAdecLpcmInfo
|
||||
{
|
||||
be_t<u32> channelNumber;
|
||||
be_t<u32> sampleRate;
|
||||
be_t<u32> outputDataSize;
|
||||
};
|
||||
|
||||
struct CellAdecResourceEx
|
||||
{
|
||||
be_t<u32> totalMemSize;
|
||||
be_t<u32> startAddr;
|
||||
be_t<u32> ppuThreadPriority;
|
||||
be_t<u32> ppuThreadStackSize;
|
||||
be_t<u32> spurs_addr;
|
||||
u8 priority[8];
|
||||
be_t<u32> maxContention;
|
||||
};
|
||||
|
||||
// CELP Excitation Mode
|
||||
enum CELP_ExcitationMode
|
||||
{
|
||||
CELL_ADEC_CELP_EXCITATION_MODE_RPE = 1,
|
||||
};
|
||||
|
||||
// CELP RPE Configuration
|
||||
enum CELP_RPEConfig
|
||||
{
|
||||
CELL_ADEC_CELP_RPE_CONFIG_0,
|
||||
CELL_ADEC_CELP_RPE_CONFIG_1,
|
||||
CELL_ADEC_CELP_RPE_CONFIG_2,
|
||||
CELL_ADEC_CELP_RPE_CONFIG_3,
|
||||
};
|
||||
|
||||
// CELP Word Size
|
||||
enum CELP_WordSize
|
||||
{
|
||||
CELL_ADEC_CELP_WORD_SZ_INT16_LE,
|
||||
CELL_ADEC_CELP_WORD_SZ_FLOAT,
|
||||
};
|
||||
|
||||
// CELP Parameters
|
||||
struct CellAdecParamCelp
|
||||
{
|
||||
be_t<u32> excitationMode;
|
||||
be_t<u32> sampleRate; // CELL_ADEC_FS_16kHz
|
||||
be_t<u32> configuration;
|
||||
be_t<u32> wordSize;
|
||||
};
|
||||
|
||||
// CELP BSI (same as CellAdecParamCelp ???)
|
||||
struct CellAdecCelpInfo
|
||||
{
|
||||
be_t<u32> excitationMode;
|
||||
be_t<u32> sampleRate; // CELL_ADEC_FS_16kHz
|
||||
be_t<u32> configuration;
|
||||
be_t<u32> wordSize;
|
||||
};
|
||||
|
||||
// CELP8 Excitation Mode
|
||||
enum CELP8_ExcitationMode
|
||||
{
|
||||
CELL_ADEC_CELP8_EXCITATION_MODE_MPE = 0,
|
||||
};
|
||||
|
||||
// CELP8 MPE Configuration
|
||||
enum CELP8_MPEConfig
|
||||
{
|
||||
CELL_ADEC_CELP8_MPE_CONFIG_0 = 0,
|
||||
CELL_ADEC_CELP8_MPE_CONFIG_2 = 2,
|
||||
CELL_ADEC_CELP8_MPE_CONFIG_6 = 6,
|
||||
CELL_ADEC_CELP8_MPE_CONFIG_9 = 9,
|
||||
CELL_ADEC_CELP8_MPE_CONFIG_12 = 12,
|
||||
CELL_ADEC_CELP8_MPE_CONFIG_15 = 15,
|
||||
CELL_ADEC_CELP8_MPE_CONFIG_18 = 18,
|
||||
CELL_ADEC_CELP8_MPE_CONFIG_21 = 21,
|
||||
CELL_ADEC_CELP8_MPE_CONFIG_24 = 24,
|
||||
CELL_ADEC_CELP8_MPE_CONFIG_26 = 26,
|
||||
};
|
||||
|
||||
// CELP8 Word Size
|
||||
enum CELP8_WordSize
|
||||
{
|
||||
CELL_ADEC_CELP8_WORD_SZ_FLOAT,
|
||||
};
|
||||
|
||||
// CELP8 Parameters
|
||||
struct CellAdecParamCelp8
|
||||
{
|
||||
be_t<u32> excitationMode;
|
||||
be_t<u32> sampleRate; // CELL_ADEC_FS_8kHz
|
||||
be_t<u32> configuration;
|
||||
be_t<u32> wordSize;
|
||||
};
|
||||
|
||||
// CELP8 BSI
|
||||
struct CellAdecCelp8Info
|
||||
{
|
||||
be_t<u32> excitationMode;
|
||||
be_t<u32> sampleRate; // CELL_ADEC_FS_8kHz
|
||||
be_t<u32> configuration;
|
||||
be_t<u32> wordSize;
|
||||
};
|
||||
|
||||
enum MPEG4AAC_ConfigType
|
||||
{
|
||||
ADIFHeader = 0,
|
||||
ADTSHeader = 1,
|
||||
RawDataBlockOnly = 2,
|
||||
};
|
||||
|
||||
enum MPEG4AAC_SamplingFreq
|
||||
{
|
||||
SF_96000 = 0,
|
||||
SF_88200 = 1,
|
||||
SF_64000 = 2,
|
||||
SF_48000 = 3,
|
||||
SF_44100 = 4,
|
||||
SF_32000 = 5,
|
||||
SF_24000 = 6,
|
||||
SF_22050 = 7,
|
||||
SF_16000 = 8,
|
||||
SF_12000 = 9,
|
||||
SF_11025 = 10,
|
||||
SF_8000 = 11,
|
||||
};
|
||||
|
||||
// MPEG4 AAC Parameters
|
||||
struct CellAdecParamM4Aac
|
||||
{
|
||||
be_t<MPEG4AAC_ConfigType> configNumber;
|
||||
|
||||
union {
|
||||
struct { struct
|
||||
{
|
||||
be_t<u32> adifProgramNumber; // 0
|
||||
} adifConfig; };
|
||||
|
||||
struct { struct
|
||||
{
|
||||
be_t<MPEG4AAC_SamplingFreq> samplingFreqIndex;
|
||||
be_t<u32> profile; // LC profile (1)
|
||||
} rawDataBlockConfig; };
|
||||
} configInfo;
|
||||
|
||||
be_t<u32> enableDownmix; // enable downmix to 2.0 (if (enableDownmix))
|
||||
};
|
||||
|
||||
// MPEG4 AAC BSI
|
||||
struct CellAdecM4AacInfo
|
||||
{
|
||||
be_t<u32> samplingFreq; // [Hz]
|
||||
be_t<u32> numberOfChannels;
|
||||
be_t<u32> numberOfFrontChannels;
|
||||
be_t<u32> numberOfFrontMonoChannels;
|
||||
be_t<u32> numberOfSideChannels;
|
||||
be_t<u32> numberOfBackChannels;
|
||||
be_t<u32> numberOfLfeChannels;
|
||||
be_t<u32> enableSBR;
|
||||
be_t<u32> SBRUpsamplingFactor;
|
||||
be_t<u32> isBsiValid;
|
||||
be_t<MPEG4AAC_ConfigType> configNumber;
|
||||
|
||||
be_t<u32> pad1; // TODO: check alignment
|
||||
|
||||
union {
|
||||
struct { struct
|
||||
{
|
||||
be_t<u32> copyrightIdPresent;
|
||||
char copyrightId[9];
|
||||
be_t<u32> originalCopy;
|
||||
be_t<u32> home;
|
||||
be_t<u32> bitstreamType;
|
||||
be_t<u32> bitrate;
|
||||
be_t<u32> numberOfProgramConfigElements;
|
||||
be_t<u32> bufferFullness;
|
||||
} adif; };
|
||||
|
||||
struct { struct
|
||||
{
|
||||
be_t<u32> id;
|
||||
be_t<u32> layer;
|
||||
be_t<u32> protectionAbsent;
|
||||
be_t<u32> profile;
|
||||
be_t<u32> samplingFreqIndex;
|
||||
be_t<u32> privateBit;
|
||||
be_t<u32> channelConfiguration;
|
||||
be_t<u32> originalCopy;
|
||||
be_t<u32> home;
|
||||
be_t<u32> copyrightIdBit;
|
||||
be_t<u32> copyrightIdStart;
|
||||
be_t<u32> frameLength;
|
||||
be_t<u32> bufferFullness;
|
||||
be_t<u32> numberOfRawDataBlocks;
|
||||
be_t<u32> crcCheck;
|
||||
} adts; };
|
||||
} bsi;
|
||||
|
||||
be_t<u32> pad2; // TODO: check alignment
|
||||
|
||||
struct
|
||||
{
|
||||
be_t<u32> matrixMixdownPresent;
|
||||
be_t<u32> mixdownIndex;
|
||||
be_t<u32> pseudoSurroundEnable;
|
||||
} matrixMixdown;
|
||||
|
||||
be_t<u32> reserved;
|
||||
};
|
||||
|
||||
enum AC3_WordSize : u8
|
||||
{
|
||||
CELL_ADEC_AC3_WORD_SZ_INT16 = 0,
|
||||
CELL_ADEC_AC3_WORD_SZ_FLOAT = 1,
|
||||
};
|
||||
|
||||
enum AC3_OutputMode : u8
|
||||
{
|
||||
CELL_ADEC_AC3_OUTPUT_MODE_RESERVED = 0,
|
||||
CELL_ADEC_AC3_OUTPUT_MODE_1_0 = 1,
|
||||
CELL_ADEC_AC3_OUTPUT_MODE_2_0 = 2,
|
||||
CELL_ADEC_AC3_OUTPUT_MODE_3_0 = 3,
|
||||
CELL_ADEC_AC3_OUTPUT_MODE_2_1 = 4,
|
||||
CELL_ADEC_AC3_OUTPUT_MODE_3_1 = 5,
|
||||
CELL_ADEC_AC3_OUTPUT_MODE_2_2 = 6,
|
||||
CELL_ADEC_AC3_OUTPUT_MODE_3_2 = 7,
|
||||
};
|
||||
|
||||
enum AC3_LFE : u8
|
||||
{
|
||||
CELL_ADEC_AC3_LFE_NOT_PRESENT = 0,
|
||||
CELL_ADEC_AC3_LFE_PRESENT = 1,
|
||||
};
|
||||
|
||||
enum AC3_CompressionMode : u8
|
||||
{
|
||||
CELL_ADEC_AC3_COMPRESSION_MODE_CUSTOM_ANALOG = 0,
|
||||
CELL_ADEC_AC3_COMPRESSION_MODE_CUSTOM_DIGITAL = 1,
|
||||
CELL_ADEC_AC3_COMPRESSION_MODE_LINE_OUT = 2,
|
||||
CELL_ADEC_AC3_COMPRESSION_MODE_RF_REMOD = 3,
|
||||
};
|
||||
|
||||
enum AC3_StereoMode : u8
|
||||
{
|
||||
CELL_ADEC_AC3_STEREO_MODE_AUTO_DETECT = 0,
|
||||
CELL_ADEC_AC3_STEREO_MODE_DOLBY_SURROUND_COMPATIBLE = 1,
|
||||
CELL_ADEC_AC3_STEREO_MODE_STEREO = 2,
|
||||
};
|
||||
|
||||
enum AC3_DualmonoMode : u8
|
||||
{
|
||||
CELL_ADEC_AC3_DUALMONO_MODE_STEREO = 0,
|
||||
CELL_ADEC_AC3_DUALMONO_MODE_LEFT_MONO = 1,
|
||||
CELL_ADEC_AC3_DUALMONO_MODE_RIGHT_MONO = 2,
|
||||
CELL_ADEC_AC3_DUALMONO_MODE_MIXED_MONO = 3,
|
||||
};
|
||||
|
||||
enum AC3_KaraokeCapableMode : u8
|
||||
{
|
||||
CELL_ADEC_AC3_KARAOKE_CAPABLE_MODE_NO_VOCAL = 0,
|
||||
CELL_ADEC_AC3_KARAOKE_CAPABLE_MODE_LEFT_VOCAL = 1,
|
||||
CELL_ADEC_AC3_KARAOKE_CAPABLE_MODE_RIGHT_VOCAL = 2,
|
||||
CELL_ADEC_AC3_KARAOKE_CAPABLE_MODE_BOTH_VOCAL = 3,
|
||||
};
|
||||
|
||||
enum AC3_InputChannel : u8
|
||||
{
|
||||
CELL_ADEC_AC3_INPUT_CHANNEL_L = 0,
|
||||
CELL_ADEC_AC3_INPUT_CHANNEL_C = 1,
|
||||
CELL_ADEC_AC3_INPUT_CHANNEL_R = 2,
|
||||
CELL_ADEC_AC3_INPUT_CHANNEL_l = 3,
|
||||
CELL_ADEC_AC3_INPUT_CHANNEL_r = 4,
|
||||
CELL_ADEC_AC3_INPUT_CHANNEL_s = 5,
|
||||
};
|
||||
|
||||
struct CellAdecParamAc3
|
||||
{
|
||||
AC3_WordSize wordSize;
|
||||
AC3_OutputMode outputMode;
|
||||
AC3_LFE outLfeOn;
|
||||
|
||||
be_t<float> drcCutScaleFactor;
|
||||
be_t<float> drcBoostScaleFactor;
|
||||
|
||||
AC3_CompressionMode compressionMode;
|
||||
AC3_InputChannel numberOfChannels;
|
||||
AC3_StereoMode stereoMode;
|
||||
AC3_DualmonoMode dualmonoMode;
|
||||
AC3_KaraokeCapableMode karaokeCapableMode;
|
||||
|
||||
be_t<float> pcmScaleFactor;
|
||||
|
||||
be_t<s32> channelPointer0;
|
||||
be_t<s32> channelPointer1;
|
||||
be_t<s32> channelPointer2;
|
||||
be_t<s32> channelPointer3;
|
||||
be_t<s32> channelPointer4;
|
||||
be_t<s32> channelPointer5;
|
||||
};
|
||||
|
||||
struct CellAdecBsiAc3
|
||||
{
|
||||
be_t<u32> codecType;
|
||||
be_t<u32> versionInfo;
|
||||
be_t<u32> totalCallCarryRun;
|
||||
be_t<u32> totalCallNum;
|
||||
be_t<u32> bitrateValue;
|
||||
be_t<u32> pcmSize;
|
||||
be_t<u32> esSizeBit;
|
||||
be_t<s32> errorCode;
|
||||
u8 libInfoFlag;
|
||||
u8 validity;
|
||||
u8 channelValue;
|
||||
u8 fsIndex;
|
||||
u8 outputQuantization;
|
||||
u8 outputChannel;
|
||||
u8 monoFlag;
|
||||
be_t<u32> bsi[2];
|
||||
be_t<u16> frmSizeCod;
|
||||
u8 acmod;
|
||||
u8 lfeOn;
|
||||
u8 karaokeMode;
|
||||
u8 cmixlev;
|
||||
u8 surmixlev;
|
||||
u8 dsurmod;
|
||||
u8 copyright;
|
||||
u8 original;
|
||||
u8 bsmod;
|
||||
u8 bsid;
|
||||
u8 xbsi1e;
|
||||
u8 dmixmod;
|
||||
u8 xbsi2e;
|
||||
u8 dsurexmod;
|
||||
u8 dheadphonmod;
|
||||
u8 adconvtyp;
|
||||
u8 crcErrorFlag;
|
||||
u8 execDmixType;
|
||||
};
|
||||
|
||||
enum ATRAC3_WordSize : s32
|
||||
{
|
||||
CELL_ADEC_ATRAC3_WORD_SZ_16BIT = 0x02,
|
||||
CELL_ADEC_ATRAC3_WORD_SZ_24BIT = 0x03,
|
||||
CELL_ADEC_ATRAC3_WORD_SZ_32BIT = 0x04,
|
||||
CELL_ADEC_ATRAC3_WORD_SZ_FLOAT = 0x84,
|
||||
};
|
||||
|
||||
enum ATRAC3_JointType : s32
|
||||
{
|
||||
ATRAC3_DUAL_STEREO = 0,
|
||||
ATRAC3_JOINT_STEREO = 1,
|
||||
};
|
||||
|
||||
struct CellAdecParamAtrac3
|
||||
{
|
||||
be_t<s32> nch; // channel count
|
||||
be_t<ATRAC3_JointType> isJoint;
|
||||
be_t<s32> nbytes; // byte count of single AU (???)
|
||||
be_t<ATRAC3_WordSize> bw_pcm; // bit length of output PCM sample
|
||||
};
|
||||
|
||||
struct CellAdecAtrac3Info
|
||||
{
|
||||
be_t<s32> nch;
|
||||
be_t<ATRAC3_JointType> isJoint;
|
||||
be_t<s32> nbytes;
|
||||
};
|
||||
|
||||
enum ATRACX_WordSize : s32
|
||||
{
|
||||
CELL_ADEC_ATRACX_WORD_SZ_16BIT = 0x02,
|
||||
CELL_ADEC_ATRACX_WORD_SZ_24BIT = 0x03,
|
||||
CELL_ADEC_ATRACX_WORD_SZ_32BIT = 0x04,
|
||||
CELL_ADEC_ATRACX_WORD_SZ_FLOAT = 0x84,
|
||||
};
|
||||
|
||||
enum ATRACX_ATSHeaderInclude : u8
|
||||
{
|
||||
CELL_ADEC_ATRACX_ATS_HDR_NOTINC = 0,
|
||||
CELL_ADEC_ATRACX_ATS_HDR_INC = 1,
|
||||
};
|
||||
|
||||
enum ATRACX_DownmixFlag : u8
|
||||
{
|
||||
ATRACX_DOWNMIX_OFF = 0,
|
||||
ATRACX_DOWNMIX_ON = 1,
|
||||
};
|
||||
|
||||
struct CellAdecParamAtracX
|
||||
{
|
||||
be_t<s32> sampling_freq;
|
||||
be_t<s32> ch_config_idx;
|
||||
be_t<s32> nch_out;
|
||||
be_t<s32> nbytes;
|
||||
u8 extra_config_data[4]; // downmix coefficients
|
||||
be_t<ATRACX_WordSize> bw_pcm;
|
||||
ATRACX_DownmixFlag downmix_flag;
|
||||
ATRACX_ATSHeaderInclude au_includes_ats_hdr_flg;
|
||||
};
|
||||
|
||||
struct CellAdecAtracXInfo
|
||||
{
|
||||
be_t<u32> samplingFreq; // [Hz]
|
||||
be_t<u32> channelConfigIndex;
|
||||
be_t<u32> nbytes;
|
||||
};
|
||||
|
||||
enum MP3_WordSize : s32
|
||||
{
|
||||
CELL_ADEC_MP3_WORD_SZ_16BIT = 3,
|
||||
CELL_ADEC_MP3_WORD_SZ_FLOAT = 4,
|
||||
};
|
||||
|
||||
enum MP3_ChannelMode : u8
|
||||
{
|
||||
MP3_STEREO = 0,
|
||||
MP3_JOINT_STEREO = 1,
|
||||
MP3_DUAL = 2,
|
||||
MP3_MONO = 3,
|
||||
};
|
||||
|
||||
enum MP3_CRCMode : u8
|
||||
{
|
||||
MP3_CRC = 0,
|
||||
MP3_NO_CRC = 1,
|
||||
};
|
||||
|
||||
struct CellAdecParamMP3
|
||||
{
|
||||
be_t<MP3_WordSize> bw_pcm;
|
||||
};
|
||||
|
||||
struct CellAdecMP3Info
|
||||
{
|
||||
be_t<u32> ui_header;
|
||||
be_t<u32> ui_main_data_begin;
|
||||
be_t<u32> ui_main_data_remain_size;
|
||||
be_t<u32> ui_main_data_now_size;
|
||||
MP3_CRCMode uc_crc;
|
||||
MP3_ChannelMode uc_mode;
|
||||
u8 uc_mode_extension;
|
||||
u8 uc_copyright;
|
||||
u8 uc_original;
|
||||
u8 uc_emphasis;
|
||||
u8 uc_crc_error_flag;
|
||||
be_t<s32> i_error_code;
|
||||
};
|
||||
|
||||
enum M2BC_SampleFrequency
|
||||
{
|
||||
CELL_ADEC_BSI_M2BC_SAMPLE_FREQUENCY_44 = 0,
|
||||
CELL_ADEC_BSI_M2BC_SAMPLE_FREQUENCY_48 = 1,
|
||||
CELL_ADEC_BSI_M2BC_SAMPLE_FREQUENCY_32 = 2,
|
||||
};
|
||||
|
||||
enum M2BC_ErrorProtection
|
||||
{
|
||||
CELL_ADEC_BSI_M2BC_ERROR_PROTECTION_NONE = 0,
|
||||
CELL_ADEC_BSI_M2BC_ERROR_PROTECTION_EXIST = 1,
|
||||
};
|
||||
|
||||
enum M2BC_BitrateIndex
|
||||
{
|
||||
CELL_ADEC_BSI_M2BC_BITRATE_32 = 1,
|
||||
CELL_ADEC_BSI_M2BC_BITRATE_48 = 2,
|
||||
CELL_ADEC_BSI_M2BC_BITRATE_56 = 3,
|
||||
CELL_ADEC_BSI_M2BC_BITRATE_64 = 4,
|
||||
CELL_ADEC_BSI_M2BC_BITRATE_80 = 5,
|
||||
CELL_ADEC_BSI_M2BC_BITRATE_96 = 6,
|
||||
CELL_ADEC_BSI_M2BC_BITRATE_112 = 7,
|
||||
CELL_ADEC_BSI_M2BC_BITRATE_128 = 8,
|
||||
CELL_ADEC_BSI_M2BC_BITRATE_160 = 9,
|
||||
CELL_ADEC_BSI_M2BC_BITRATE_192 = 10,
|
||||
CELL_ADEC_BSI_M2BC_BITRATE_224 = 11,
|
||||
CELL_ADEC_BSI_M2BC_BITRATE_256 = 12,
|
||||
CELL_ADEC_BSI_M2BC_BITRATE_320 = 13,
|
||||
CELL_ADEC_BSI_M2BC_BITRATE_384 = 14,
|
||||
};
|
||||
|
||||
enum M2BC_StereoMode
|
||||
{
|
||||
CELL_ADEC_BSI_M2BC_STEREO_MODE_STERO = 0,
|
||||
CELL_ADEC_BSI_M2BC_STEREO_MODE_JOINTSTERO = 1,
|
||||
CELL_ADEC_BSI_M2BC_STEREO_MODE_DUAL = 2,
|
||||
CELL_ADEC_BSI_M2BC_STEREO_MODE_MONO = 3,
|
||||
};
|
||||
|
||||
enum M2BC_StereoModeEx
|
||||
{
|
||||
CELL_ADEC_BSI_M2BC_STEREO_EXMODE_0 = 0,
|
||||
CELL_ADEC_BSI_M2BC_STEREO_EXMODE_1 = 1,
|
||||
CELL_ADEC_BSI_M2BC_STEREO_EXMODE_2 = 2,
|
||||
CELL_ADEC_BSI_M2BC_STEREO_EXMODE_3 = 3,
|
||||
};
|
||||
|
||||
enum M2BC_Emphasis
|
||||
{
|
||||
CELL_ADEC_BSI_M2BC_EMPHASIS_NONE = 0,
|
||||
CELL_ADEC_BSI_M2BC_EMPHASIS_50_15 = 1,
|
||||
CELL_ADEC_BSI_M2BC_EMPHASIS_CCITT = 3,
|
||||
};
|
||||
|
||||
enum M2BC_CopyrightBit
|
||||
{
|
||||
CELL_ADEC_BSI_M2BC_COPYRIGHT_NONE = 0,
|
||||
CELL_ADEC_BSI_M2BC_COPYRIGHT_ON = 1,
|
||||
};
|
||||
|
||||
enum M2BC_OriginalBit
|
||||
{
|
||||
CELL_ADEC_BSI_M2BC_ORIGINAL_COPY = 0,
|
||||
CELL_ADEC_BSI_M2BC_ORIGINAL_ORIGINAL = 1,
|
||||
};
|
||||
|
||||
enum M2BC_SurroundMode
|
||||
{
|
||||
CELL_ADEC_BSI_M2BC_SURROUND_NONE = 0,
|
||||
CELL_ADEC_BSI_M2BC_SURROUND_MONO = 1,
|
||||
CELL_ADEC_BSI_M2BC_SURROUND_STEREO = 2,
|
||||
CELL_ADEC_BSI_M2BC_SURROUND_SECOND = 3,
|
||||
};
|
||||
|
||||
enum M2BC_CenterMode
|
||||
{
|
||||
CELL_ADEC_BSI_M2BC_CENTER_NONE = 0,
|
||||
CELL_ADEC_BSI_M2BC_CENTER_EXIST = 1,
|
||||
CELL_ADEC_BSI_M2BC_CENTER_PHANTOM = 3,
|
||||
};
|
||||
|
||||
enum M2BC_LFE
|
||||
{
|
||||
CELL_ADEC_BSI_M2BC_LFE_NONE = 0,
|
||||
CELL_ADEC_BSI_M2BC_LFE_EXIST = 1,
|
||||
};
|
||||
|
||||
enum M2BC_AudioMixMode
|
||||
{
|
||||
CELL_ADEC_BSI_M2BC_AUDIOMIX_LARGE = 0,
|
||||
CELL_ADEC_BSI_M2BC_AUDIOMIX_SMALLE = 1,
|
||||
};
|
||||
|
||||
enum M2BC_MCExtension
|
||||
{
|
||||
CELL_ADEC_BSI_M2BC_MCEXTENSION_2CH = 0,
|
||||
CELL_ADEC_BSI_M2BC_MCEXTENSION_5CH = 1,
|
||||
CELL_ADEC_BSI_M2BC_MCEXTENSION_7CH = 2,
|
||||
};
|
||||
|
||||
enum M2BC_ChannelConfig
|
||||
{
|
||||
CELL_ADEC_BSI_M2BC_CH_CONFIG_MONO = 0,
|
||||
CELL_ADEC_BSI_M2BC_CH_CONFIG_DUAL = 1,
|
||||
CELL_ADEC_BSI_M2BC_CH_CONFIG_L_R = 2,
|
||||
CELL_ADEC_BSI_M2BC_CH_CONFIG_L_R_S = 3,
|
||||
CELL_ADEC_BSI_M2BC_CH_CONFIG_L_R_C = 4,
|
||||
CELL_ADEC_BSI_M2BC_CH_CONFIG_L_R_LS_RS = 5,
|
||||
CELL_ADEC_BSI_M2BC_CH_CONFIG_L_R_C_S = 6,
|
||||
CELL_ADEC_BSI_M2BC_CH_CONFIG_L_R_C_LS_RS = 7,
|
||||
CELL_ADEC_BSI_M2BC_CH_CONFIG_LL_RR_CC_LS_RS_LC_RC = 8,
|
||||
CELL_ADEC_BSI_M2BC_CH_CONFIG_MONO_SECONDSTEREO = 9,
|
||||
CELL_ADEC_BSI_M2BC_CH_CONFIG_L_R_SECONDSTEREO = 10,
|
||||
CELL_ADEC_BSI_M2BC_CH_CONFIG_L_R_C_SECONDSTEREO = 11,
|
||||
};
|
||||
|
||||
struct CellAdecParamMpmc
|
||||
{
|
||||
be_t<u32> channelNumber;
|
||||
be_t<u32> downmix;
|
||||
be_t<u32> lfeUpSample;
|
||||
};
|
||||
|
||||
struct CellAdecMpmcInfo
|
||||
{
|
||||
be_t<u32> channelNumber;
|
||||
be_t<u32> sampleFreq;
|
||||
be_t<u32> errorPprotection;
|
||||
be_t<u32> bitrateIndex;
|
||||
be_t<u32> stereoMode;
|
||||
be_t<u32> stereoModeEextention;
|
||||
be_t<u32> emphasis;
|
||||
be_t<u32> copyright;
|
||||
be_t<u32> original;
|
||||
be_t<u32> surroundMode;
|
||||
be_t<u32> centerMode;
|
||||
be_t<u32> audioMmix;
|
||||
be_t<u32> outputFramSize;
|
||||
be_t<u32> multiCodecMode;
|
||||
be_t<u32> lfePresent;
|
||||
be_t<u32> channelCoufiguration;
|
||||
};
|
@ -135,66 +135,49 @@ struct CellAudioPortConfig
|
||||
|
||||
struct AudioPortConfig
|
||||
{
|
||||
bool m_is_audio_port_opened;
|
||||
bool m_is_audio_port_started;
|
||||
bool m_is_audio_port_stopped;
|
||||
CellAudioPortParam m_param;
|
||||
|
||||
const u32 m_buffer; // 64 KB or 128 KB with 8x16 config
|
||||
const u32 m_index;
|
||||
|
||||
AudioPortConfig();
|
||||
|
||||
void finalize();
|
||||
u8 channel;
|
||||
u8 block;
|
||||
float level;
|
||||
u64 attr;
|
||||
u64 tag;
|
||||
u64 counter; // copy of global counter
|
||||
};
|
||||
|
||||
struct AudioConfig //custom structure
|
||||
{
|
||||
Array<AudioPortConfig*> m_ports;
|
||||
enum
|
||||
{
|
||||
AUDIO_PORT_COUNT = 8,
|
||||
};
|
||||
AudioPortConfig m_ports[AUDIO_PORT_COUNT];
|
||||
u32 m_buffer; // 1 MB memory for audio ports
|
||||
u32 m_indexes; // current block indexes and other info
|
||||
bool m_is_audio_initialized;
|
||||
bool m_is_audio_finalized;
|
||||
u32 m_port_in_use;
|
||||
u64 event_key;
|
||||
u64 counter;
|
||||
u64 start_time;
|
||||
|
||||
AudioConfig()
|
||||
: m_is_audio_initialized(false)
|
||||
, m_is_audio_finalized(false)
|
||||
, m_port_in_use(0)
|
||||
, event_key(0)
|
||||
, counter(0)
|
||||
{
|
||||
m_ports.SetCount(8);
|
||||
for (u32 i = 0; i < m_ports.GetCount(); i++)
|
||||
m_ports[i] = nullptr;
|
||||
memset(&m_ports, 0, sizeof(AudioPortConfig) * AUDIO_PORT_COUNT);
|
||||
}
|
||||
|
||||
void Clear()
|
||||
{
|
||||
for (u32 i = 0; i < m_ports.GetCount(); i++)
|
||||
{
|
||||
if (m_ports[i])
|
||||
{
|
||||
delete m_ports[i];
|
||||
m_ports[i] = nullptr;
|
||||
}
|
||||
}
|
||||
memset(&m_ports, 0, sizeof(AudioPortConfig) * AUDIO_PORT_COUNT);
|
||||
m_port_in_use = 0;
|
||||
}
|
||||
} m_config;
|
||||
|
||||
AudioPortConfig::AudioPortConfig()
|
||||
: m_is_audio_port_started(false)
|
||||
, m_buffer(Memory.Alloc(1024 * 128, 1024)) // max 128K size
|
||||
, m_index(Memory.Alloc(16, 16)) // allocation for u64 value "read index"
|
||||
{
|
||||
m_config.m_port_in_use++;
|
||||
mem64_t index(m_index);
|
||||
index = 0;
|
||||
}
|
||||
|
||||
void AudioPortConfig::finalize()
|
||||
{
|
||||
m_config.m_port_in_use--;
|
||||
Memory.Free(m_buffer);
|
||||
Memory.Free(m_index);
|
||||
}
|
||||
|
||||
//libmixer datatypes
|
||||
typedef void * CellAANHandle;
|
||||
|
||||
@ -307,6 +290,130 @@ int cellAudioInit()
|
||||
}
|
||||
|
||||
m_config.m_is_audio_initialized = true;
|
||||
m_config.counter = 0;
|
||||
|
||||
// alloc memory
|
||||
m_config.m_buffer = Memory.Alloc(128 * 1024 * m_config.AUDIO_PORT_COUNT, 1024);
|
||||
memset(Memory + m_config.m_buffer, 0, 128 * 1024 * m_config.AUDIO_PORT_COUNT);
|
||||
m_config.m_indexes = Memory.Alloc(sizeof(u64) * m_config.AUDIO_PORT_COUNT, 16);
|
||||
memset(Memory + m_config.m_indexes, 0, sizeof(u64) * m_config.AUDIO_PORT_COUNT);
|
||||
|
||||
thread t("AudioThread", []()
|
||||
{
|
||||
WAVHeader header(2); // WAV file header (stereo)
|
||||
|
||||
wxString output_name = "audio.wav";
|
||||
|
||||
wxFile output(output_name, wxFile::write); // create output file
|
||||
if (!output.IsOpened())
|
||||
{
|
||||
ConLog.Error("Audio aborted: cannot create %s", output_name.wx_str());
|
||||
return;
|
||||
}
|
||||
|
||||
ConLog.Write("Audio started");
|
||||
|
||||
m_config.start_time = get_system_time();
|
||||
|
||||
output.Write(&header, sizeof(header)); // write file header
|
||||
|
||||
float buffer[2*256]; // buffer for 2 channels
|
||||
float buffer2[8*256]; // buffer for 8 channels (max count)
|
||||
memset(&buffer, 0, sizeof(buffer));
|
||||
memset(&buffer2, 0, sizeof(buffer2));
|
||||
|
||||
while (m_config.m_is_audio_initialized)
|
||||
{
|
||||
if (Emu.IsStopped())
|
||||
{
|
||||
ConLog.Warning("Audio aborted");
|
||||
goto abort;
|
||||
}
|
||||
|
||||
// TODO: send beforemix event (in ~2,6 ms before mixing)
|
||||
|
||||
// Sleep(5); // precise time of sleeping: 5,(3) ms (or 256/48000 sec)
|
||||
if (m_config.counter * 256000000 / 48000 >= get_system_time() - m_config.start_time)
|
||||
{
|
||||
Sleep(1);
|
||||
continue;
|
||||
}
|
||||
|
||||
m_config.counter++;
|
||||
|
||||
if (Emu.IsPaused())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
bool first_mix = true;
|
||||
|
||||
// MIX:
|
||||
for (u32 i = 0; i < m_config.AUDIO_PORT_COUNT; i++)
|
||||
{
|
||||
if (!m_config.m_ports[i].m_is_audio_port_started) continue;
|
||||
|
||||
AudioPortConfig& port = m_config.m_ports[i];
|
||||
mem64_t index(m_config.m_indexes + i * sizeof(u64));
|
||||
|
||||
const u32 block_size = port.channel * 256;
|
||||
|
||||
u32 position = port.tag % port.block; // old value
|
||||
|
||||
u32 buf_addr = m_config.m_buffer + (i * 128 * 1024) + (position * block_size * sizeof(float));
|
||||
|
||||
memcpy(buffer2, Memory + buf_addr, block_size * sizeof(float));
|
||||
memset(Memory + buf_addr, 0, block_size * sizeof(float));
|
||||
|
||||
// TODO: atomic
|
||||
port.counter = m_config.counter;
|
||||
port.tag++; // absolute index of block that will be read
|
||||
index = (position + 1) % port.block; // write new value
|
||||
|
||||
|
||||
|
||||
if (first_mix)
|
||||
{
|
||||
for (u32 i = 0; i < (sizeof(buffer) / sizeof(float)); i++)
|
||||
{
|
||||
// reverse byte order (TODO: use port.m_param.level)
|
||||
buffer[i] = re(buffer2[i]);
|
||||
}
|
||||
first_mix = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
for (u32 i = 0; i < (sizeof(buffer) / sizeof(float)); i++)
|
||||
{
|
||||
float value = re(buffer2[i]);
|
||||
buffer[i] = (buffer[i] + value) * 0.5; // TODO: valid mixing
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// send aftermix event (normal audio event)
|
||||
// TODO: check event source
|
||||
Emu.GetEventManager().SendEvent(m_config.event_key, 0x10103000e010e07, 0, 0, 0);
|
||||
|
||||
if (output.Write(&buffer, sizeof(buffer)) != sizeof(buffer)) // write file data
|
||||
{
|
||||
ConLog.Error("Port aborted: cannot write %s", output_name.wx_str());
|
||||
goto abort;
|
||||
}
|
||||
|
||||
header.Size += sizeof(buffer); // update file header
|
||||
header.RIFF.Size += sizeof(buffer);
|
||||
}
|
||||
ConLog.Write("Audio finished");
|
||||
abort:
|
||||
output.Seek(0);
|
||||
output.Write(&header, sizeof(header)); // write fixed file header
|
||||
|
||||
output.Close();
|
||||
m_config.m_is_audio_finalized = true;
|
||||
});
|
||||
t.detach();
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
@ -320,6 +427,19 @@ int cellAudioQuit()
|
||||
}
|
||||
|
||||
m_config.m_is_audio_initialized = false;
|
||||
|
||||
while (!m_config.m_is_audio_finalized)
|
||||
{
|
||||
Sleep(1);
|
||||
if (Emu.IsStopped())
|
||||
{
|
||||
ConLog.Warning("cellAudioQuit() aborted");
|
||||
return CELL_OK;
|
||||
}
|
||||
}
|
||||
|
||||
Memory.Free(m_config.m_buffer);
|
||||
Memory.Free(m_config.m_indexes);
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
@ -332,26 +452,36 @@ int cellAudioPortOpen(mem_ptr_t<CellAudioPortParam> audioParam, mem32_t portNum)
|
||||
return CELL_AUDIO_ERROR_PARAM;
|
||||
}
|
||||
|
||||
if (m_config.m_port_in_use >= m_config.m_ports.GetCount())
|
||||
if (audioParam->nChannel > 8 || audioParam->nBlock > 16)
|
||||
{
|
||||
return CELL_AUDIO_ERROR_PARAM;
|
||||
}
|
||||
|
||||
if (m_config.m_port_in_use >= m_config.AUDIO_PORT_COUNT)
|
||||
{
|
||||
return CELL_AUDIO_ERROR_PORT_FULL;
|
||||
}
|
||||
|
||||
for (u32 i = 0; i < m_config.m_ports.GetCount(); i++)
|
||||
for (u32 i = 0; i < m_config.AUDIO_PORT_COUNT; i++)
|
||||
{
|
||||
if (m_config.m_ports[i] == nullptr)
|
||||
if (!m_config.m_ports[i].m_is_audio_port_opened)
|
||||
{
|
||||
CellAudioPortParam& ref = (m_config.m_ports[i] = new AudioPortConfig)->m_param;
|
||||
AudioPortConfig& port = m_config.m_ports[i];
|
||||
|
||||
ref.nChannel = audioParam->nChannel;
|
||||
ref.nBlock = audioParam->nBlock;
|
||||
ref.attr = audioParam->attr;
|
||||
ref.level = audioParam->level;
|
||||
port.channel = audioParam->nChannel;
|
||||
port.block = audioParam->nBlock;
|
||||
port.attr = audioParam->attr;
|
||||
port.level = audioParam->level;
|
||||
|
||||
portNum = i;
|
||||
cellAudio.Warning("*** audio port opened(nChannel=%lld, nBlock=0x%llx, attr=0x%llx, level=%f): port = %d",
|
||||
(u64)ref.nChannel, (u64)ref.nBlock, (u64)ref.attr, (float)ref.level, portNum.GetValue());
|
||||
//TODO: implementation of ring buffer
|
||||
cellAudio.Warning("*** audio port opened(nChannel=%d, nBlock=%d, attr=0x%llx, level=%f): port = %d",
|
||||
port.channel, port.block, port.attr, port.level, i);
|
||||
|
||||
port.m_is_audio_port_opened = true;
|
||||
port.m_is_audio_port_started = false;
|
||||
port.tag = 0;
|
||||
|
||||
m_config.m_port_in_use++;
|
||||
return CELL_OK;
|
||||
}
|
||||
}
|
||||
@ -363,35 +493,36 @@ int cellAudioGetPortConfig(u32 portNum, mem_ptr_t<CellAudioPortConfig> portConfi
|
||||
{
|
||||
cellAudio.Warning("cellAudioGetPortConfig(portNum=0x%x, portConfig_addr=0x%x)", portNum, portConfig.GetAddr());
|
||||
|
||||
if (!portConfig.IsGood() || portNum >= m_config.m_ports.GetCount())
|
||||
if (!portConfig.IsGood() || portNum >= m_config.AUDIO_PORT_COUNT)
|
||||
{
|
||||
return CELL_AUDIO_ERROR_PARAM;
|
||||
}
|
||||
|
||||
if (!m_config.m_ports[portNum])
|
||||
if (!m_config.m_ports[portNum].m_is_audio_port_opened)
|
||||
{
|
||||
portConfig->status = CELL_AUDIO_STATUS_CLOSE;
|
||||
}
|
||||
else if (m_config.m_ports[portNum]->m_is_audio_port_started)
|
||||
else if (m_config.m_ports[portNum].m_is_audio_port_started)
|
||||
{
|
||||
portConfig->status = CELL_AUDIO_STATUS_RUN;
|
||||
}
|
||||
else
|
||||
{
|
||||
CellAudioPortParam& ref = m_config.m_ports[portNum]->m_param;
|
||||
|
||||
portConfig->status = CELL_AUDIO_STATUS_READY;
|
||||
portConfig->nChannel = ref.nChannel;
|
||||
portConfig->nBlock = ref.nBlock;
|
||||
portConfig->portSize = ref.nChannel * ref.nBlock * 256 * sizeof(float);
|
||||
portConfig->portAddr = m_config.m_ports[portNum]->m_buffer; // 0x20020000
|
||||
portConfig->readIndexAddr = m_config.m_ports[portNum]->m_index; // 0x20010010 on ps3
|
||||
|
||||
ConLog.Write("*** nChannel=%d, nBlock=%d, portSize=0x%x, portAddr=0x%x, readIndexAddr=0x%x",
|
||||
(u32)portConfig->nChannel, (u32)portConfig->nBlock, (u32)portConfig->portSize, (u32)portConfig->portAddr, (u32)portConfig->readIndexAddr);
|
||||
// portAddr - readIndexAddr == 0xFFF0 on ps3
|
||||
}
|
||||
|
||||
AudioPortConfig& port = m_config.m_ports[portNum];
|
||||
|
||||
portConfig->nChannel = port.channel;
|
||||
portConfig->nBlock = port.block;
|
||||
portConfig->portSize = port.channel * port.block * 256 * sizeof(float);
|
||||
portConfig->portAddr = m_config.m_buffer + (128 * 1024 * portNum); // 0x20020000
|
||||
portConfig->readIndexAddr = m_config.m_indexes + (sizeof(u64) * portNum); // 0x20010010 on ps3
|
||||
|
||||
cellAudio.Log("*** port config: nChannel=%d, nBlock=%d, portSize=0x%x, portAddr=0x%x, readIndexAddr=0x%x",
|
||||
(u32)portConfig->nChannel, (u32)portConfig->nBlock, (u32)portConfig->portSize, (u32)portConfig->portAddr, (u32)portConfig->readIndexAddr);
|
||||
// portAddr - readIndexAddr == 0xFFF0 on ps3
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
@ -399,120 +530,22 @@ int cellAudioPortStart(u32 portNum)
|
||||
{
|
||||
cellAudio.Warning("cellAudioPortStart(portNum=0x%x)", portNum);
|
||||
|
||||
if (portNum >= m_config.m_ports.GetCount())
|
||||
if (portNum >= m_config.AUDIO_PORT_COUNT)
|
||||
{
|
||||
return CELL_AUDIO_ERROR_PARAM;
|
||||
}
|
||||
|
||||
if (!m_config.m_ports[portNum])
|
||||
if (!m_config.m_ports[portNum].m_is_audio_port_opened)
|
||||
{
|
||||
return CELL_AUDIO_ERROR_PORT_OPEN;
|
||||
}
|
||||
|
||||
if (m_config.m_ports[portNum]->m_is_audio_port_started)
|
||||
if (m_config.m_ports[portNum].m_is_audio_port_started)
|
||||
{
|
||||
return CELL_AUDIO_ERROR_PORT_ALREADY_RUN;
|
||||
}
|
||||
|
||||
m_config.m_ports[portNum]->m_is_audio_port_started = true;
|
||||
m_config.m_ports[portNum]->m_is_audio_port_stopped = false;
|
||||
|
||||
std::string t_name = "AudioPort0";
|
||||
t_name[9] += portNum;
|
||||
|
||||
thread t(t_name, [portNum]()
|
||||
{
|
||||
AudioPortConfig& port = *m_config.m_ports[portNum];
|
||||
mem64_t index(port.m_index); // index storage
|
||||
|
||||
if (port.m_param.nChannel > 8)
|
||||
{
|
||||
ConLog.Error("Port aborted: invalid channel count (%d)", port.m_param.nChannel);
|
||||
port.m_is_audio_port_stopped = true;
|
||||
return;
|
||||
}
|
||||
|
||||
WAVHeader header(port.m_param.nChannel); // WAV file header
|
||||
|
||||
wxString output_name = "audioport0.wav";
|
||||
output_name[9] = '0' + portNum;
|
||||
|
||||
wxFile output(output_name, wxFile::write); // create output file
|
||||
if (!output.IsOpened())
|
||||
{
|
||||
ConLog.Error("Port aborted: cannot create %s", output_name.wx_str());
|
||||
port.m_is_audio_port_stopped = true;
|
||||
return;
|
||||
}
|
||||
|
||||
ConLog.Write("Port started");
|
||||
|
||||
u64 start_time = get_system_time();
|
||||
u64 counter = 0;
|
||||
|
||||
output.Write(&header, sizeof(header)); // write file header
|
||||
|
||||
const u32 block_size = port.m_param.nChannel * 256 * sizeof(float);
|
||||
|
||||
float buffer[32*256]; // buffer for max channel count (8)
|
||||
|
||||
while (port.m_is_audio_port_started)
|
||||
{
|
||||
if (Emu.IsStopped())
|
||||
{
|
||||
ConLog.Warning("Port aborted");
|
||||
goto abort;
|
||||
}
|
||||
|
||||
// TODO: send beforemix event (in ~2,6 ms before mixing)
|
||||
|
||||
// Sleep(5); // precise time of sleeping: 5,(3) ms (or 256/48000 sec)
|
||||
if (counter * 256000000 / 48000 >= get_system_time() - start_time)
|
||||
{
|
||||
Sleep(1);
|
||||
continue;
|
||||
}
|
||||
|
||||
counter++;
|
||||
|
||||
if (Emu.IsPaused())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
u32 position = index.GetValue(); // get old value
|
||||
|
||||
memcpy(buffer, Memory + port.m_buffer + position * block_size, block_size);
|
||||
memset(Memory + port.m_buffer + position * block_size, 0, block_size);
|
||||
|
||||
index = (position + 1) % port.m_param.nBlock; // write new value
|
||||
|
||||
// TODO: send aftermix event (normal audio event)
|
||||
|
||||
for (u32 i = 0; i < block_size; i++)
|
||||
{
|
||||
// reverse byte order (TODO: use port.m_param.level)
|
||||
buffer[i] = re(buffer[i]);
|
||||
}
|
||||
|
||||
if (output.Write(&buffer, block_size) != (size_t)block_size) // write file data
|
||||
{
|
||||
ConLog.Error("Port aborted: cannot write %s", output_name.wx_str());
|
||||
goto abort;
|
||||
}
|
||||
|
||||
header.Size += block_size; // update file header
|
||||
header.RIFF.Size += block_size;
|
||||
}
|
||||
ConLog.Write("Port finished");
|
||||
abort:
|
||||
output.Seek(0);
|
||||
output.Write(&header, sizeof(header)); // write fixed file header
|
||||
|
||||
output.Close();
|
||||
port.m_is_audio_port_stopped = true;
|
||||
});
|
||||
t.detach();
|
||||
m_config.m_ports[portNum].m_is_audio_port_started = true;
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
@ -521,18 +554,18 @@ int cellAudioPortClose(u32 portNum)
|
||||
{
|
||||
cellAudio.Warning("cellAudioPortClose(portNum=0x%x)", portNum);
|
||||
|
||||
if (portNum >= m_config.m_ports.GetCount())
|
||||
if (portNum >= m_config.AUDIO_PORT_COUNT)
|
||||
{
|
||||
return CELL_AUDIO_ERROR_PARAM;
|
||||
}
|
||||
|
||||
if (!m_config.m_ports[portNum])
|
||||
if (!m_config.m_ports[portNum].m_is_audio_port_opened)
|
||||
{
|
||||
return CELL_AUDIO_ERROR_PORT_NOT_OPEN;
|
||||
}
|
||||
|
||||
m_config.m_ports[portNum]->finalize();
|
||||
safe_delete(m_config.m_ports[portNum]);
|
||||
m_config.m_ports[portNum].m_is_audio_port_started = false;
|
||||
m_config.m_port_in_use--;
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
@ -540,43 +573,92 @@ int cellAudioPortStop(u32 portNum)
|
||||
{
|
||||
cellAudio.Warning("cellAudioPortStop(portNum=0x%x)",portNum);
|
||||
|
||||
if (portNum >= m_config.m_ports.GetCount())
|
||||
if (portNum >= m_config.AUDIO_PORT_COUNT)
|
||||
{
|
||||
return CELL_AUDIO_ERROR_PARAM;
|
||||
}
|
||||
|
||||
if (!m_config.m_ports[portNum])
|
||||
if (!m_config.m_ports[portNum].m_is_audio_port_opened)
|
||||
{
|
||||
return CELL_AUDIO_ERROR_PORT_NOT_OPEN;
|
||||
}
|
||||
|
||||
if (!m_config.m_ports[portNum]->m_is_audio_port_started)
|
||||
if (!m_config.m_ports[portNum].m_is_audio_port_started)
|
||||
{
|
||||
return CELL_AUDIO_ERROR_PORT_NOT_RUN;
|
||||
}
|
||||
|
||||
m_config.m_ports[portNum]->m_is_audio_port_started = false;
|
||||
while (!m_config.m_ports[portNum]->m_is_audio_port_stopped)
|
||||
{
|
||||
Sleep(1);
|
||||
if (Emu.IsStopped())
|
||||
{
|
||||
ConLog.Warning("cellAudioPortStop(%d) aborted", portNum);
|
||||
break;
|
||||
}
|
||||
}
|
||||
m_config.m_ports[portNum].m_is_audio_port_started = false;
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
int cellAudioGetPortTimestamp(u32 portNum, u64 tag, mem64_t stamp)
|
||||
{
|
||||
cellAudio.Error("cellAudioGetPortTimestamp(portNum=0x%x, tag=0x%llx, stamp_addr=0x%x)", portNum, tag, stamp.GetAddr());
|
||||
cellAudio.Warning("cellAudioGetPortTimestamp(portNum=0x%x, tag=0x%llx, stamp_addr=0x%x)", portNum, tag, stamp.GetAddr());
|
||||
|
||||
if (portNum >= m_config.AUDIO_PORT_COUNT)
|
||||
{
|
||||
return CELL_AUDIO_ERROR_PARAM;
|
||||
}
|
||||
|
||||
if (!m_config.m_ports[portNum].m_is_audio_port_opened)
|
||||
{
|
||||
return CELL_AUDIO_ERROR_PORT_NOT_OPEN;
|
||||
}
|
||||
|
||||
if (!m_config.m_ports[portNum].m_is_audio_port_started)
|
||||
{
|
||||
return CELL_AUDIO_ERROR_PORT_NOT_RUN;
|
||||
}
|
||||
|
||||
AudioPortConfig& port = m_config.m_ports[portNum];
|
||||
|
||||
// TODO: atomic
|
||||
stamp = m_config.start_time + (port.counter + (tag - port.tag)) * 256000000 / 48000;
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
int cellAudioGetPortBlockTag(u32 portNum, u64 blockNo, mem64_t tag)
|
||||
{
|
||||
cellAudio.Error("cellAudioGetPortBlockTag(portNum=0x%x, blockNo=0x%llx, tag_addr=0x%x)", portNum, blockNo, tag.GetAddr());
|
||||
cellAudio.Warning("cellAudioGetPortBlockTag(portNum=0x%x, blockNo=0x%llx, tag_addr=0x%x)", portNum, blockNo, tag.GetAddr());
|
||||
|
||||
if (portNum >= m_config.AUDIO_PORT_COUNT)
|
||||
{
|
||||
return CELL_AUDIO_ERROR_PARAM;
|
||||
}
|
||||
|
||||
if (!m_config.m_ports[portNum].m_is_audio_port_opened)
|
||||
{
|
||||
return CELL_AUDIO_ERROR_PORT_NOT_OPEN;
|
||||
}
|
||||
|
||||
if (!m_config.m_ports[portNum].m_is_audio_port_started)
|
||||
{
|
||||
return CELL_AUDIO_ERROR_PORT_NOT_RUN;
|
||||
}
|
||||
|
||||
AudioPortConfig& port = m_config.m_ports[portNum];
|
||||
|
||||
if (blockNo >= port.block)
|
||||
{
|
||||
cellAudio.Error("cellAudioGetPortBlockTag: wrong blockNo(%lld)", blockNo);
|
||||
return CELL_AUDIO_ERROR_PARAM;
|
||||
}
|
||||
|
||||
// TODO: atomic
|
||||
u64 tag_base = port.tag;
|
||||
if (tag_base % port.block > blockNo)
|
||||
{
|
||||
tag_base &= ~(port.block-1);
|
||||
tag_base += port.block;
|
||||
}
|
||||
else
|
||||
{
|
||||
tag_base &= ~(port.block-1);
|
||||
}
|
||||
tag = tag_base + blockNo;
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
@ -589,8 +671,24 @@ int cellAudioSetPortLevel(u32 portNum, float level)
|
||||
// Utility Functions
|
||||
int cellAudioCreateNotifyEventQueue(mem32_t id, mem64_t key)
|
||||
{
|
||||
cellAudio.Error("cellAudioCreateNotifyEventQueue(id_addr=0x%x, key_addr=0x%x)", id.GetAddr(), key.GetAddr());
|
||||
key = 0x123456789ABCDEF0;
|
||||
cellAudio.Warning("cellAudioCreateNotifyEventQueue(id_addr=0x%x, key_addr=0x%x)", id.GetAddr(), key.GetAddr());
|
||||
|
||||
if (Emu.GetEventManager().CheckKey(0x80004d494f323221))
|
||||
{
|
||||
return CELL_AUDIO_ERROR_EVENT_QUEUE;
|
||||
}
|
||||
|
||||
EventQueue* eq = new EventQueue(SYS_SYNC_FIFO, SYS_PPU_QUEUE, 0x80004d494f323221, 0x80004d494f323221, 32);
|
||||
|
||||
if (!Emu.GetEventManager().RegisterKey(eq, 0x80004d494f323221))
|
||||
{
|
||||
delete eq;
|
||||
return CELL_AUDIO_ERROR_EVENT_QUEUE;
|
||||
}
|
||||
|
||||
id = cellAudio.GetNewId(eq);
|
||||
key = 0x80004d494f323221;
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
@ -609,11 +707,10 @@ int cellAudioSetNotifyEventQueue(u64 key)
|
||||
EventQueue* eq;
|
||||
if (!Emu.GetEventManager().GetEventQueue(key, eq))
|
||||
{
|
||||
//return CELL_AUDIO_ERROR_PARAM;
|
||||
return CELL_OK;
|
||||
return CELL_AUDIO_ERROR_PARAM;
|
||||
}
|
||||
|
||||
// eq->events.push(0, 0, 0, 0);
|
||||
// TODO: connect port
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
@ -626,7 +723,18 @@ int cellAudioSetNotifyEventQueueEx(u64 key, u32 iFlags)
|
||||
|
||||
int cellAudioRemoveNotifyEventQueue(u64 key)
|
||||
{
|
||||
cellAudio.Error("cellAudioRemoveNotifyEventQueue(key=0x%llx)", key);
|
||||
cellAudio.Warning("cellAudioRemoveNotifyEventQueue(key=0x%llx)", key);
|
||||
|
||||
EventQueue* eq;
|
||||
if (!Emu.GetEventManager().GetEventQueue(key, eq))
|
||||
{
|
||||
return CELL_AUDIO_ERROR_PARAM;
|
||||
}
|
||||
|
||||
m_config.event_key = 0;
|
||||
|
||||
// TODO: disconnect port
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
|
@ -7,142 +7,142 @@
|
||||
void 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());
|
||||
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());
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
int cellDmuxOpen(mem_ptr_t<CellDmuxType> demuxerType, mem_ptr_t<CellDmuxResource> demuxerResource,
|
||||
mem_ptr_t<CellDmuxCb> demuxerCb, u32 demuxerHandle_addr)
|
||||
int cellDmuxOpen(const mem_ptr_t<CellDmuxType> demuxerType, const mem_ptr_t<CellDmuxResource> demuxerResource,
|
||||
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)",
|
||||
demuxerType.GetAddr(), demuxerResource.GetAddr(), demuxerCb.GetAddr(), demuxerHandle_addr);
|
||||
demuxerType.GetAddr(), demuxerResource.GetAddr(), demuxerCb.GetAddr(), demuxerHandle.GetAddr());
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
int cellDmuxOpenEx(mem_ptr_t<CellDmuxType> demuxerType, mem_ptr_t<CellDmuxResourceEx> demuxerResourceEx,
|
||||
mem_ptr_t<CellDmuxCb> demuxerCb, u32 demuxerHandle_addr)
|
||||
int cellDmuxOpenEx(const mem_ptr_t<CellDmuxType> demuxerType, const mem_ptr_t<CellDmuxResourceEx> demuxerResourceEx,
|
||||
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)",
|
||||
demuxerType.GetAddr(), demuxerResourceEx.GetAddr(), demuxerCb.GetAddr(), demuxerHandle_addr);
|
||||
demuxerType.GetAddr(), demuxerResourceEx.GetAddr(), demuxerCb.GetAddr(), demuxerHandle.GetAddr());
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
int cellDmuxOpen2(mem_ptr_t<CellDmuxType2> demuxerType2, mem_ptr_t<CellDmuxResource2> demuxerResource2,
|
||||
mem_ptr_t<CellDmuxCb> demuxerCb, u32 demuxerHandle_addr)
|
||||
int cellDmuxOpen2(const mem_ptr_t<CellDmuxType2> demuxerType2, const mem_ptr_t<CellDmuxResource2> demuxerResource2,
|
||||
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)",
|
||||
demuxerType2.GetAddr(), demuxerResource2.GetAddr(), demuxerCb.GetAddr(), demuxerHandle_addr);
|
||||
demuxerType2.GetAddr(), demuxerResource2.GetAddr(), demuxerCb.GetAddr(), demuxerHandle.GetAddr());
|
||||
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;
|
||||
}
|
||||
|
||||
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",
|
||||
demuxerHandle_addr, streamAddress, streamSize, discontinuity, userData);
|
||||
cellDmux.Error("cellDmuxSetStream(demuxerHandle=0x%x, streamAddress=0x%x, streamSize=%d, discontinuity=%d, userData=0x%llx",
|
||||
demuxerHandle, streamAddress, streamSize, discontinuity, userData);
|
||||
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;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
int cellDmuxQueryEsAttr(mem_ptr_t<CellDmuxType> demuxerType, mem_ptr_t<CellCodecEsFilterId> esFilterId,
|
||||
u32 esSpecificInfo_addr, mem_ptr_t<CellDmuxEsAttr> esAttr)
|
||||
int cellDmuxQueryEsAttr(const mem_ptr_t<CellDmuxType> demuxerType, const mem_ptr_t<CellCodecEsFilterId> esFilterId,
|
||||
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)",
|
||||
demuxerType.GetAddr(), esFilterId.GetAddr(), esSpecificInfo_addr, esAttr.GetAddr());
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
int cellDmuxQueryEsAttr2(mem_ptr_t<CellDmuxType2> demuxerType2, mem_ptr_t<CellCodecEsFilterId> esFilterId,
|
||||
u32 esSpecificInfo_addr, mem_ptr_t<CellDmuxEsAttr> esAttr)
|
||||
int cellDmuxQueryEsAttr2(const mem_ptr_t<CellDmuxType2> demuxerType2, const mem_ptr_t<CellCodecEsFilterId> esFilterId,
|
||||
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)",
|
||||
demuxerType2.GetAddr(), esFilterId.GetAddr(), esSpecificInfo_addr, esAttr.GetAddr());
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
int cellDmuxEnableEs(u32 demuxerHandle_addr, mem_ptr_t<CellCodecEsFilterId> esFilterId,
|
||||
mem_ptr_t<CellDmuxEsResource> esResourceInfo, mem_ptr_t<CellDmuxEsCb> esCb,
|
||||
u32 esSpecificInfo_addr, u32 esHandle_addr)
|
||||
int cellDmuxEnableEs(u32 demuxerHandle, const mem_ptr_t<CellCodecEsFilterId> esFilterId,
|
||||
const mem_ptr_t<CellDmuxEsResource> esResourceInfo, const mem_ptr_t<CellDmuxEsCb> esCb,
|
||||
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, "
|
||||
"esSpecificInfo_addr=0x%x, esHandle_addr=0x%x)", demuxerHandle_addr, esFilterId.GetAddr(), esResourceInfo.GetAddr(),
|
||||
esCb.GetAddr(), esSpecificInfo_addr, esHandle_addr);
|
||||
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, esFilterId.GetAddr(), esResourceInfo.GetAddr(),
|
||||
esCb.GetAddr(), esSpecificInfo_addr, esHandle.GetAddr());
|
||||
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;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
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)",
|
||||
esHandle_addr, auInfo_ptr_addr, auSpecificInfo_ptr_addr);
|
||||
cellDmux.Error("cellDmuxGetAu(esHandle=0x%x, auInfo_ptr_addr=0x%x, auSpecificInfo_ptr_addr=0x%x)",
|
||||
esHandle, auInfo_ptr_addr, auSpecificInfo_ptr_addr);
|
||||
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)",
|
||||
esHandle_addr, auInfo_ptr_addr, auSpecificInfo_ptr_addr);
|
||||
cellDmux.Error("cellDmuxPeekAu(esHandle=0x%x, auInfo_ptr_addr=0x%x, auSpecificInfo_ptr_addr=0x%x)",
|
||||
esHandle, auInfo_ptr_addr, auSpecificInfo_ptr_addr);
|
||||
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)",
|
||||
esHandle_addr, auInfoEx_ptr_addr, auSpecificInfo_ptr_addr);
|
||||
cellDmux.Error("cellDmuxGetAuEx(esHandle=0x%x, auInfoEx_ptr_addr=0x%x, auSpecificInfo_ptr_addr=0x%x)",
|
||||
esHandle, auInfoEx_ptr_addr, auSpecificInfo_ptr_addr);
|
||||
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)",
|
||||
esHandle_addr, auInfoEx_ptr_addr, auSpecificInfo_ptr_addr);
|
||||
cellDmux.Error("cellDmuxPeekAuEx(esHandle=0x%x, auInfoEx_ptr_addr=0x%x, auSpecificInfo_ptr_addr=0x%x)",
|
||||
esHandle, auInfoEx_ptr_addr, auSpecificInfo_ptr_addr);
|
||||
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;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -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)",
|
||||
pAddr.GetAddr(), fileSize, pSize.GetAddr());
|
||||
|
||||
if ((u32)pAddr->magic != 0x464d4150)
|
||||
return CELL_PAMF_ERROR_UNKNOWN_TYPE;
|
||||
//if ((u32)pAddr->magic != 0x464d4150)
|
||||
//return CELL_PAMF_ERROR_UNKNOWN_TYPE;
|
||||
|
||||
const u64 offset = (u64)pAddr->data_offset << 11;
|
||||
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;
|
||||
}
|
||||
|
||||
extern std::atomic<u32> g_FsAioReadID;
|
||||
extern std::atomic<u32> g_FsAioReadCur;
|
||||
|
||||
int cellSysutilCheckCallback()
|
||||
{
|
||||
cellSysutil.Log("cellSysutilCheckCallback()");
|
||||
@ -477,7 +480,7 @@ int cellSysutilCheckCallback()
|
||||
|
||||
CPUThread& thr = Emu.GetCallbackThread();
|
||||
|
||||
while (thr.IsAlive())
|
||||
while (thr.IsAlive() || (g_FsAioReadCur < g_FsAioReadID))
|
||||
{
|
||||
Sleep(1);
|
||||
if (Emu.IsStopped())
|
||||
|
@ -1,83 +1,76 @@
|
||||
#include "stdafx.h"
|
||||
#include "Emu/SysCalls/SysCalls.h"
|
||||
#include "Emu/SysCalls/SC_FUNC.h"
|
||||
#include "cellVdec.h"
|
||||
|
||||
void cellVdec_init();
|
||||
Module cellVdec(0x0005, cellVdec_init);
|
||||
|
||||
// Error Codes
|
||||
enum
|
||||
int cellVdecQueryAttr(const mem_ptr_t<CellVdecType> type, mem_ptr_t<CellVdecAttr> attr)
|
||||
{
|
||||
CELL_VDEC_ERROR_ARG = 0x80610101,
|
||||
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);
|
||||
cellVdec.Error("cellVdecQueryAttr(type_addr=0x%x, attr_addr=0x%x)", type.GetAddr(), attr.GetAddr());
|
||||
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;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
int cellVdecClose()
|
||||
int cellVdecClose(u32 handle)
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(cellVdec);
|
||||
cellVdec.Error("cellVdecClose(handle=0x%x)", handle);
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
int cellVdecStartSeq()
|
||||
int cellVdecStartSeq(u32 handle)
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(cellVdec);
|
||||
cellVdec.Error("cellVdecStartSeq(handle=0x%x)", handle);
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
int cellVdecEndSeq()
|
||||
int cellVdecEndSeq(u32 handle)
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(cellVdec);
|
||||
cellVdec.Error("cellVdecEndSeq(handle=0x%x)", handle);
|
||||
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;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
|
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,174 +1,42 @@
|
||||
#include "stdafx.h"
|
||||
#include "Emu/SysCalls/SysCalls.h"
|
||||
#include "Emu/SysCalls/SC_FUNC.h"
|
||||
#include "cellVpost.h"
|
||||
|
||||
void cellVpost_init();
|
||||
Module cellVpost(0x0008, cellVpost_init);
|
||||
|
||||
// Error Codes
|
||||
enum
|
||||
int cellVpostQueryAttr(const mem_ptr_t<CellVpostCfgParam> cfgParam, mem_ptr_t<CellVpostAttr> attr)
|
||||
{
|
||||
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()
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(cellVpost);
|
||||
cellVpost.Error("cellVpostQueryAttr(cfgParam_addr=0x%x, attr_addr=0x%x)", cfgParam.GetAddr(), attr.GetAddr());
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
int cellVpostOpen()
|
||||
int cellVpostOpen(const mem_ptr_t<CellVpostCfgParam> cfgParam, const mem_ptr_t<CellVpostResource> resource, mem32_t handle)
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(cellVpost);
|
||||
cellVpost.Error("cellVpostOpen(cfgParam_addr=0x%x, resource_addr=0x%x, handle_addr=0x%x)",
|
||||
cfgParam.GetAddr(), resource.GetAddr(), handle.GetAddr());
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
int cellVpostOpenEx()
|
||||
int cellVpostOpenEx(const mem_ptr_t<CellVpostCfgParam> cfgParam, const mem_ptr_t<CellVpostResourceEx> resource, mem32_t handle)
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(cellVpost);
|
||||
cellVpost.Error("cellVpostOpenEx(cfgParam_addr=0x%x, resource_addr=0x%x, handle_addr=0x%x)",
|
||||
cfgParam.GetAddr(), resource.GetAddr(), handle.GetAddr());
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
int cellVpostClose()
|
||||
int cellVpostClose(u32 handle)
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(cellVpost);
|
||||
cellVpost.Error("cellVpostClose(handle=0x%x)", handle);
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
int cellVpostExec()
|
||||
int cellVpostExec(u32 handle, const u32 inPicBuff_addr, const mem_ptr_t<CellVpostCtrlParam> ctrlParam,
|
||||
u32 outPicBuff_addr, mem_ptr_t<CellVpostPictureInfo> picInfo)
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(cellVpost);
|
||||
cellVpost.Error("cellVpostExec(handle=0x%x, inPicBuff_addr=0x%x, ctrlParam_addr=0x%x, outPicBuff_addr=0x%x, picInfo_addr=0x%x)",
|
||||
handle, inPicBuff_addr, ctrlParam.GetAddr(), outPicBuff_addr, picInfo.GetAddr());
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
|
317
rpcs3/Emu/SysCalls/Modules/cellVpost.h
Normal file
317
rpcs3/Emu/SysCalls/Modules/cellVpost.h
Normal file
@ -0,0 +1,317 @@
|
||||
#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,
|
||||
};
|
||||
|
||||
enum CellVpostPictureDepth
|
||||
{
|
||||
CELL_VPOST_PIC_DEPTH_8,
|
||||
};
|
||||
|
||||
enum CellVpostPictureFormatIn
|
||||
{
|
||||
CELL_VPOST_PIC_FMT_IN_YUV420_PLANAR,
|
||||
};
|
||||
|
||||
enum CellVpostPictureFormatOut
|
||||
{
|
||||
CELL_VPOST_PIC_FMT_OUT_RGBA_ILV,
|
||||
CELL_VPOST_PIC_FMT_OUT_YUV420_PLANAR,
|
||||
};
|
||||
|
||||
enum CellVpostPictureStructure
|
||||
{
|
||||
CELL_VPOST_PIC_STRUCT_PFRM,
|
||||
CELL_VPOST_PIC_STRUCT_IFRM,
|
||||
CELL_VPOST_PIC_STRUCT_ITOP,
|
||||
CELL_VPOST_PIC_STRUCT_IBTM,
|
||||
};
|
||||
|
||||
enum CellVpostExecType
|
||||
{
|
||||
CELL_VPOST_EXEC_TYPE_PFRM_PFRM,
|
||||
CELL_VPOST_EXEC_TYPE_PTOP_ITOP,
|
||||
CELL_VPOST_EXEC_TYPE_PBTM_IBTM,
|
||||
CELL_VPOST_EXEC_TYPE_ITOP_PFRM,
|
||||
CELL_VPOST_EXEC_TYPE_IBTM_PFRM,
|
||||
CELL_VPOST_EXEC_TYPE_IFRM_IFRM,
|
||||
CELL_VPOST_EXEC_TYPE_ITOP_ITOP,
|
||||
CELL_VPOST_EXEC_TYPE_IBTM_IBTM,
|
||||
};
|
||||
|
||||
enum CellVpostChromaPositionType
|
||||
{
|
||||
CELL_VPOST_CHROMA_POS_TYPE_A,
|
||||
CELL_VPOST_CHROMA_POS_TYPE_B,
|
||||
};
|
||||
|
||||
enum CellVpostScanType
|
||||
{
|
||||
CELL_VPOST_SCAN_TYPE_P,
|
||||
CELL_VPOST_SCAN_TYPE_I,
|
||||
};
|
||||
|
||||
enum CellVpostQuantRange
|
||||
{
|
||||
CELL_VPOST_QUANT_RANGE_FULL,
|
||||
CELL_VPOST_QUANT_RANGE_BROADCAST,
|
||||
};
|
||||
|
||||
enum CellVpostColorMatrix
|
||||
{
|
||||
CELL_VPOST_COLOR_MATRIX_BT601,
|
||||
CELL_VPOST_COLOR_MATRIX_BT709,
|
||||
};
|
||||
|
||||
enum CellVpostScalerType
|
||||
{
|
||||
CELL_VPOST_SCALER_TYPE_BILINEAR,
|
||||
CELL_VPOST_SCALER_TYPE_LINEAR_SHARP,
|
||||
CELL_VPOST_SCALER_TYPE_2X4TAP,
|
||||
CELL_VPOST_SCALER_TYPE_8X4TAP,
|
||||
};
|
||||
|
||||
enum CellVpostIpcType
|
||||
{
|
||||
CELL_VPOST_IPC_TYPE_DOUBLING,
|
||||
CELL_VPOST_IPC_TYPE_LINEAR,
|
||||
CELL_VPOST_IPC_TYPE_MAVG,
|
||||
};
|
||||
|
||||
struct CellVpostCfgParam
|
||||
{
|
||||
be_t<u32> inMaxWidth;
|
||||
be_t<u32> inMaxHeight;
|
||||
be_t<CellVpostPictureDepth> inDepth;
|
||||
be_t<CellVpostPictureFormatIn> inPicFmt;
|
||||
|
||||
be_t<u32> outMaxWidth;
|
||||
be_t<u32> outMaxHeight;
|
||||
be_t<CellVpostPictureDepth> outDepth;
|
||||
be_t<CellVpostPictureFormatOut> outPicFmt;
|
||||
|
||||
be_t<u32> reserved1;
|
||||
be_t<u32> reserved2;
|
||||
};
|
||||
|
||||
struct CellVpostAttr
|
||||
{
|
||||
be_t<u32> memSize;
|
||||
u8 delay;
|
||||
be_t<u32> vpostVerUpper;
|
||||
be_t<u32> vpostVerLower;
|
||||
};
|
||||
|
||||
struct CellVpostResource
|
||||
{
|
||||
be_t<u32> memAddr;
|
||||
be_t<u32> memSize;
|
||||
be_t<s32> ppuThreadPriority;
|
||||
be_t<u32> ppuThreadStackSize;
|
||||
be_t<s32> spuThreadPriority;
|
||||
be_t<u32> numOfSpus;
|
||||
};
|
||||
|
||||
struct CellVpostResourceEx
|
||||
{
|
||||
be_t<u32> memAddr;
|
||||
be_t<u32> memSize;
|
||||
be_t<u32> spurs_addr;
|
||||
u8 priority[8];
|
||||
be_t<u32> maxContention;
|
||||
};
|
||||
|
||||
struct CellVpostWindow
|
||||
{
|
||||
be_t<u32> x;
|
||||
be_t<u32> y;
|
||||
be_t<u32> width;
|
||||
be_t<u32> height;
|
||||
};
|
||||
|
||||
struct CellVpostCtrlParam
|
||||
{
|
||||
be_t<CellVpostExecType> execType;
|
||||
|
||||
be_t<CellVpostScalerType> scalerType;
|
||||
be_t<CellVpostIpcType> ipcType;
|
||||
|
||||
be_t<u32> inWidth;
|
||||
be_t<u32> inHeight;
|
||||
be_t<CellVpostChromaPositionType> inChromaPosType;
|
||||
be_t<CellVpostQuantRange> inQuantRange;
|
||||
be_t<CellVpostColorMatrix> inColorMatrix;
|
||||
CellVpostWindow inWindow;
|
||||
|
||||
be_t<u32> outWidth;
|
||||
be_t<u32> outHeight;
|
||||
CellVpostWindow outWindow;
|
||||
u8 outAlpha;
|
||||
|
||||
be_t<u64> userData;
|
||||
|
||||
be_t<u32> reserved1;
|
||||
be_t<u32> reserved2;
|
||||
};
|
||||
|
||||
struct CellVpostPictureInfo
|
||||
{
|
||||
be_t<u32> inWidth;
|
||||
be_t<u32> inHeight;
|
||||
be_t<CellVpostPictureDepth> inDepth;
|
||||
be_t<CellVpostScanType> inScanType;
|
||||
be_t<CellVpostPictureFormatIn> inPicFmt;
|
||||
be_t<CellVpostChromaPositionType> inChromaPosType;
|
||||
be_t<CellVpostPictureStructure> inPicStruct;
|
||||
be_t<CellVpostQuantRange> inQuantRange;
|
||||
be_t<CellVpostColorMatrix> inColorMatrix;
|
||||
|
||||
be_t<u32> outWidth;
|
||||
be_t<u32> outHeight;
|
||||
be_t<CellVpostPictureDepth> outDepth;
|
||||
be_t<CellVpostScanType> outScanType;
|
||||
be_t<CellVpostPictureFormatOut> outPicFmt;
|
||||
be_t<CellVpostChromaPositionType> outChromaPosType;
|
||||
be_t<CellVpostPictureStructure> outPicStruct;
|
||||
be_t<CellVpostQuantRange> outQuantRange;
|
||||
be_t<CellVpostColorMatrix> outColorMatrix;
|
||||
|
||||
be_t<u64> userData;
|
||||
|
||||
be_t<u32> reserved1;
|
||||
be_t<u32> reserved2;
|
||||
};
|
@ -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_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)
|
||||
{
|
||||
@ -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])",
|
||||
fd, (u64)aio->offset, buf_addr, (u64)aio->size, res, xid, path.wx_str());
|
||||
|
||||
//start callback thread
|
||||
if(func)
|
||||
if (func) // start callback thread
|
||||
{
|
||||
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++;
|
||||
}
|
||||
|
||||
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());
|
||||
|
||||
@ -202,7 +214,7 @@ int cellFsAioRead(mem_ptr_t<CellFsAio> aio, mem32_t aio_id, mem_func_ptr_t<void
|
||||
|
||||
if (!aio_init)
|
||||
{
|
||||
//return CELL_ENXIO;
|
||||
return CELL_ENXIO;
|
||||
}
|
||||
|
||||
vfsFileBase* orig_file;
|
||||
@ -233,6 +245,7 @@ int cellFsAioFinish(mem8_ptr_t mount_point)
|
||||
{
|
||||
wxString mp = Memory.ReadString(mount_point.GetAddr());
|
||||
sys_fs.Warning("cellFsAioFinish(mount_point_addr=0x%x (%s))", mount_point.GetAddr(), mp.wx_str());
|
||||
aio_init = false;
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
|
@ -130,7 +130,7 @@ extern void sys_game_process_exitspawn2(u32 path_addr, u32 argv_addr, u32 envp_a
|
||||
//sys_event
|
||||
extern int sys_event_queue_create(mem32_t equeue_id, mem_ptr_t<sys_event_queue_attr> attr, u64 event_queue_key, int size);
|
||||
extern int sys_event_queue_destroy(u32 equeue_id, int mode);
|
||||
extern int sys_event_queue_receive(u32 equeue_id, mem_ptr_t<sys_event_data> _event, u64 timeout);
|
||||
extern int sys_event_queue_receive(u32 equeue_id, mem_ptr_t<sys_event_data> event, u64 timeout);
|
||||
extern int sys_event_queue_tryreceive(u32 equeue_id, mem_ptr_t<sys_event_data> event_array, int size, mem32_t number);
|
||||
extern int sys_event_queue_drain(u32 event_queue_id);
|
||||
extern int sys_event_port_create(mem32_t eport_id, int port_type, u64 name);
|
||||
|
@ -128,7 +128,7 @@ int sys_cond_signal(u32 cond_id)
|
||||
Mutex* mutex = cond->mutex;
|
||||
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)
|
||||
{
|
||||
@ -159,7 +159,7 @@ int sys_cond_signal_all(u32 cond_id)
|
||||
Mutex* mutex = cond->mutex;
|
||||
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)
|
||||
{
|
||||
|
@ -74,18 +74,18 @@ int sys_event_queue_destroy(u32 equeue_id, int mode)
|
||||
|
||||
u32 tid = GetCurrentPPUThread().GetId();
|
||||
|
||||
eq->m_mutex.lock(tid);
|
||||
eq->sq.m_mutex.lock(tid);
|
||||
eq->owner.lock(tid);
|
||||
// check if some threads are waiting for an event
|
||||
if (!mode && eq->list.GetCount())
|
||||
if (!mode && eq->sq.list.GetCount())
|
||||
{
|
||||
eq->owner.unlock(tid);
|
||||
eq->m_mutex.unlock(tid);
|
||||
eq->sq.m_mutex.unlock(tid);
|
||||
return CELL_EBUSY;
|
||||
}
|
||||
eq->owner.unlock(tid, ~0);
|
||||
eq->m_mutex.unlock(tid);
|
||||
while (eq->list.GetCount())
|
||||
eq->sq.m_mutex.unlock(tid);
|
||||
while (eq->sq.list.GetCount())
|
||||
{
|
||||
Sleep(1);
|
||||
if (Emu.IsStopped())
|
||||
@ -136,18 +136,18 @@ int sys_event_queue_tryreceive(u32 equeue_id, mem_ptr_t<sys_event_data> event_ar
|
||||
|
||||
u32 tid = GetCurrentPPUThread().GetId();
|
||||
|
||||
eq->m_mutex.lock(tid);
|
||||
eq->sq.m_mutex.lock(tid);
|
||||
eq->owner.lock(tid);
|
||||
if (eq->list.GetCount())
|
||||
if (eq->sq.list.GetCount())
|
||||
{
|
||||
number = 0;
|
||||
eq->owner.unlock(tid);
|
||||
eq->m_mutex.unlock(tid);
|
||||
eq->sq.m_mutex.unlock(tid);
|
||||
return CELL_OK;
|
||||
}
|
||||
number = eq->events.pop_all((sys_event_data*)(Memory + event_array.GetAddr()), size);
|
||||
eq->owner.unlock(tid);
|
||||
eq->m_mutex.unlock(tid);
|
||||
eq->sq.m_mutex.unlock(tid);
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
@ -174,7 +174,7 @@ int sys_event_queue_receive(u32 equeue_id, mem_ptr_t<sys_event_data> event, u64
|
||||
|
||||
u32 tid = GetCurrentPPUThread().GetId();
|
||||
|
||||
eq->push(tid); // add thread to sleep queue
|
||||
eq->sq.push(tid); // add thread to sleep queue
|
||||
|
||||
timeout = timeout ? (timeout / 1000) : ~0;
|
||||
u64 counter = 0;
|
||||
@ -190,7 +190,7 @@ int sys_event_queue_receive(u32 equeue_id, mem_ptr_t<sys_event_data> event, u64
|
||||
}
|
||||
else
|
||||
{
|
||||
u32 next = (eq->protocol == SYS_SYNC_FIFO) ? eq->pop() : eq->pop_prio();
|
||||
u32 next = (eq->protocol == SYS_SYNC_FIFO) ? eq->sq.pop() : eq->sq.pop_prio();
|
||||
if (next != tid)
|
||||
{
|
||||
eq->owner.unlock(tid, next);
|
||||
@ -199,80 +199,35 @@ int sys_event_queue_receive(u32 equeue_id, mem_ptr_t<sys_event_data> event, u64
|
||||
}
|
||||
case SMR_SIGNAL:
|
||||
{
|
||||
eq->events.pop(*(sys_event_data*)(Memory + event));
|
||||
eq->events.pop(*event);
|
||||
eq->owner.unlock(tid);
|
||||
sys_event.Log(" *** event received: source=0x%llx, d1=0x%llx, d2=0x%llx, d3=0x%llx",
|
||||
(u64)event->source, (u64)event->data1, (u64)event->data2, (u64)event->data3);
|
||||
/* HACK: passing event data in registers */
|
||||
PPUThread& t = GetCurrentPPUThread();
|
||||
t.GPR[4] = event->source;
|
||||
t.GPR[5] = event->data1;
|
||||
t.GPR[6] = event->data2;
|
||||
t.GPR[7] = event->data3;
|
||||
return CELL_OK;
|
||||
}
|
||||
case SMR_FAILED: break;
|
||||
default: eq->invalidate(tid); return CELL_ECANCELED;
|
||||
default: eq->sq.invalidate(tid); return CELL_ECANCELED;
|
||||
}
|
||||
|
||||
Sleep(1);
|
||||
if (counter++ > timeout || Emu.IsStopped())
|
||||
{
|
||||
if (Emu.IsStopped()) ConLog.Warning("sys_event_queue_receive(equeue=%d) aborted", equeue_id);
|
||||
eq->invalidate(tid);
|
||||
eq->sq.invalidate(tid);
|
||||
return CELL_ETIMEDOUT;
|
||||
}
|
||||
}
|
||||
/* auto queue_receive = [&](int status) -> bool
|
||||
{
|
||||
if(status == CPUThread_Stopped)
|
||||
{
|
||||
result = CELL_ECANCELED;
|
||||
return false;
|
||||
}
|
||||
|
||||
EventQueue* equeue;
|
||||
if (!Emu.GetIdManager().GetIDData(equeue_id, equeue))
|
||||
{
|
||||
result = CELL_ESRCH;
|
||||
return false;
|
||||
}
|
||||
|
||||
for(int i=0; i<equeue->pos; ++i)
|
||||
{
|
||||
if(!equeue->ports[i]->has_data && equeue->ports[i]->thread)
|
||||
{
|
||||
SPUThread* thr = (SPUThread*)equeue->ports[i]->thread;
|
||||
if(thr->SPU.OutIntr_Mbox.GetCount())
|
||||
{
|
||||
u32 val;
|
||||
thr->SPU.OutIntr_Mbox.Pop(val);
|
||||
if(!thr->SPU.Out_MBox.Pop(val)) val = 0;
|
||||
equeue->ports[i]->data1 = val;
|
||||
equeue->ports[i]->data2 = 0;
|
||||
equeue->ports[i]->data3 = 0;
|
||||
equeue->ports[i]->has_data = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for(int i=0; i<equeue->pos; i++)
|
||||
{
|
||||
if(equeue->ports[i]->has_data)
|
||||
{
|
||||
event->source = equeue->ports[i]->name;
|
||||
event->data1 = equeue->ports[i]->data1;
|
||||
event->data2 = equeue->ports[i]->data2;
|
||||
event->data3 = equeue->ports[i]->data3;
|
||||
|
||||
equeue->ports[i]->has_data = false;
|
||||
|
||||
result = CELL_OK;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
};
|
||||
|
||||
GetCurrentPPUThread().WaitFor(queue_receive);*/
|
||||
}
|
||||
|
||||
int sys_event_queue_drain(u32 equeue_id)
|
||||
{
|
||||
sys_event.Warning("sys_event_queue_drain(equeue_id=%d)", equeue_id);
|
||||
sys_event.Log("sys_event_queue_drain(equeue_id=%d)", equeue_id);
|
||||
|
||||
EventQueue* eq;
|
||||
if (!Emu.GetIdManager().GetIDData(equeue_id, eq))
|
||||
@ -401,14 +356,14 @@ int sys_event_port_disconnect(u32 eport_id)
|
||||
}
|
||||
|
||||
eport->eq->ports.remove(eport);
|
||||
eport->eq = 0;
|
||||
eport->eq = nullptr;
|
||||
eport->mutex.unlock(tid);
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
int sys_event_port_send(u32 eport_id, u64 data1, u64 data2, u64 data3)
|
||||
{
|
||||
sys_event.Warning("sys_event_port_send(eport_id=%d, data1=0x%llx, data2=0x%llx, data3=0x%llx)",
|
||||
sys_event.Log("sys_event_port_send(eport_id=%d, data1=0x%llx, data2=0x%llx, data3=0x%llx)",
|
||||
eport_id, data1, data2, data3);
|
||||
|
||||
EventPort* eport;
|
||||
@ -419,12 +374,13 @@ int sys_event_port_send(u32 eport_id, u64 data1, u64 data2, u64 data3)
|
||||
|
||||
SMutexLocker lock(eport->mutex);
|
||||
|
||||
if (!eport->eq)
|
||||
EventQueue* eq = eport->eq;
|
||||
if (!eq)
|
||||
{
|
||||
return CELL_ENOTCONN;
|
||||
}
|
||||
|
||||
if (!eport->eq->events.push(eport->name, data1, data2, data3))
|
||||
if (!eq->events.push(eport->name, data1, data2, data3))
|
||||
{
|
||||
return CELL_EBUSY;
|
||||
}
|
||||
|
@ -84,7 +84,7 @@ int sys_lwcond_signal(mem_ptr_t<sys_lwcond_t> lwcond)
|
||||
mem_ptr_t<sys_lwmutex_t> mutex(lwcond->lwmutex);
|
||||
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)
|
||||
{
|
||||
@ -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);
|
||||
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)
|
||||
{
|
||||
|
@ -29,6 +29,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->all_info = 0;
|
||||
lwmutex->owner.initialize();
|
||||
//lwmutex->waiter = lwmutex->owner.GetOwner();
|
||||
lwmutex->pad = 0;
|
||||
lwmutex->recursive_count = 0;
|
||||
|
||||
@ -51,9 +53,10 @@ int sys_lwmutex_destroy(mem_ptr_t<sys_lwmutex_t> lwmutex)
|
||||
if (!Emu.GetIdManager().CheckID(sq_id)) return CELL_ESRCH;
|
||||
|
||||
// try to make it unable to lock
|
||||
switch (int res = lwmutex->trylock(~0))
|
||||
switch (int res = lwmutex->trylock(lwmutex->owner.GetDeadValue()))
|
||||
{
|
||||
case CELL_OK:
|
||||
lwmutex->all_info = 0;
|
||||
lwmutex->attribute = 0;
|
||||
lwmutex->sleep_queue = 0;
|
||||
Emu.GetIdManager().RemoveID(sq_id);
|
||||
@ -128,7 +131,7 @@ u32 SleepQueue::pop_prio() // SYS_SYNC_PRIORITY
|
||||
{
|
||||
if (list.GetCount())
|
||||
{
|
||||
u64 max_prio = 0;
|
||||
u32 highest_prio = ~0;
|
||||
u32 sel = 0;
|
||||
for (u32 i = 0; i < list.GetCount(); i++)
|
||||
{
|
||||
@ -140,9 +143,9 @@ u32 SleepQueue::pop_prio() // SYS_SYNC_PRIORITY
|
||||
break;
|
||||
}
|
||||
u64 prio = t->GetPrio();
|
||||
if (prio > max_prio)
|
||||
if (prio < highest_prio)
|
||||
{
|
||||
max_prio = prio;
|
||||
highest_prio = prio;
|
||||
sel = i;
|
||||
}
|
||||
}
|
||||
@ -245,8 +248,10 @@ int sys_lwmutex_t::unlock(be_t<u32> tid)
|
||||
SleepQueue* sq;
|
||||
if (!Emu.GetIdManager().GetIDData(sleep_queue, sq)) return CELL_ESRCH;
|
||||
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;
|
||||
}
|
||||
|
@ -69,7 +69,7 @@ struct sys_lwmutex_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
|
||||
};
|
||||
struct
|
||||
|
@ -91,8 +91,9 @@ int sys_mutex_lock(u32 mutex_id, u64 timeout)
|
||||
}
|
||||
|
||||
u32 tid = GetCurrentPPUThread().GetId();
|
||||
u32 owner = mutex->m_mutex.GetOwner();
|
||||
|
||||
if (mutex->m_mutex.GetOwner() == tid)
|
||||
if (owner == tid)
|
||||
{
|
||||
if (mutex->is_recursive)
|
||||
{
|
||||
@ -107,6 +108,13 @@ int sys_mutex_lock(u32 mutex_id, u64 timeout)
|
||||
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))
|
||||
{
|
||||
@ -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))
|
||||
{
|
||||
case SMR_OK: mutex->m_queue.invalidate(tid);
|
||||
case SMR_SIGNAL: mutex->recursive = 1; return CELL_OK;
|
||||
case SMR_TIMEOUT: return CELL_ETIMEDOUT;
|
||||
default: goto abort;
|
||||
case SMR_OK:
|
||||
mutex->m_queue.invalidate(tid);
|
||||
case SMR_SIGNAL:
|
||||
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:
|
||||
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_ESRCH;
|
||||
@ -145,8 +157,9 @@ int sys_mutex_trylock(u32 mutex_id)
|
||||
}
|
||||
|
||||
u32 tid = GetCurrentPPUThread().GetId();
|
||||
u32 owner = mutex->m_mutex.GetOwner();
|
||||
|
||||
if (mutex->m_mutex.GetOwner() == tid)
|
||||
if (owner == tid)
|
||||
{
|
||||
if (mutex->is_recursive)
|
||||
{
|
||||
@ -161,6 +174,13 @@ int sys_mutex_trylock(u32 mutex_id)
|
||||
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))
|
||||
{
|
||||
@ -184,6 +204,10 @@ int sys_mutex_unlock(u32 mutex_id)
|
||||
|
||||
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--;
|
||||
if (!mutex->recursive)
|
||||
{
|
||||
|
@ -222,6 +222,8 @@ int sys_spu_thread_group_destroy(u32 id)
|
||||
|
||||
for (u32 i = 0; i < group_info->list.GetCount(); i++)
|
||||
{
|
||||
// TODO: disconnect all event ports
|
||||
|
||||
Emu.GetCPU().RemoveThread(group_info->list[i]);
|
||||
}
|
||||
|
||||
@ -550,6 +552,152 @@ int sys_spu_thread_group_disconnect_event(u32 id, u32 et)
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
/*
|
||||
SPU-Side functions:
|
||||
int sys_spu_thread_receive_event(u32 spuq_num, mem32_t d1, mem32_t d2, mem32_t d3);
|
||||
int sys_spu_thread_send_event(u8 spup, u24 data0, u32 data1);
|
||||
int sys_spu_thread_throw_event(u8 spup, u24 data0, u32 data1);
|
||||
int sys_spu_thread_tryreceive_event(u32 spuq_num, mem32_t d1, mem32_t d2, mem32_t d3);
|
||||
*/
|
||||
|
||||
int sys_spu_thread_connect_event(u32 id, u32 eq_id, u32 et, u8 spup)
|
||||
{
|
||||
sc_spu.Warning("sys_spu_thread_connect_event(id=%d, eq_id=%d, event_type=0x%x, spup=%d)", id, eq_id, et, spup);
|
||||
|
||||
CPUThread* thr = Emu.GetCPU().GetThread(id);
|
||||
|
||||
if(!thr || (thr->GetType() != CPU_THREAD_SPU && thr->GetType() != CPU_THREAD_RAW_SPU))
|
||||
{
|
||||
return CELL_ESRCH;
|
||||
}
|
||||
|
||||
EventQueue* eq;
|
||||
if (!Emu.GetIdManager().GetIDData(eq_id, eq))
|
||||
{
|
||||
return CELL_ESRCH;
|
||||
}
|
||||
|
||||
if (spup > 63)
|
||||
{
|
||||
sc_spu.Error("sys_spu_thread_connect_event: invalid spup (%d)", spup);
|
||||
return CELL_EINVAL;
|
||||
}
|
||||
|
||||
if (et != SYS_SPU_THREAD_EVENT_USER)
|
||||
{
|
||||
sc_spu.Error("sys_spu_thread_connect_event: unsupported event type (0x%x)", et);
|
||||
return CELL_EINVAL;
|
||||
}
|
||||
|
||||
// TODO: check if can receive this events
|
||||
|
||||
SPUThread& spu = *(SPUThread*)thr;
|
||||
|
||||
EventPort& port = spu.SPUPs[spup];
|
||||
|
||||
SMutexLocker lock(port.mutex);
|
||||
|
||||
if (port.eq)
|
||||
{
|
||||
return CELL_EISCONN;
|
||||
}
|
||||
|
||||
eq->ports.add(&port);
|
||||
port.eq = eq;
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
//
|
||||
int sys_spu_thread_disconnect_event(u32 id, u32 et, u8 spup)
|
||||
{
|
||||
sc_spu.Warning("sys_spu_thread_disconnect_event(id=%d, event_type=0x%x, spup=%d)", id, et, spup);
|
||||
|
||||
CPUThread* thr = Emu.GetCPU().GetThread(id);
|
||||
|
||||
if(!thr || (thr->GetType() != CPU_THREAD_SPU && thr->GetType() != CPU_THREAD_RAW_SPU))
|
||||
{
|
||||
return CELL_ESRCH;
|
||||
}
|
||||
|
||||
if (spup > 63)
|
||||
{
|
||||
sc_spu.Error("sys_spu_thread_connect_event: invalid spup (%d)", spup);
|
||||
return CELL_EINVAL;
|
||||
}
|
||||
|
||||
if (et != SYS_SPU_THREAD_EVENT_USER)
|
||||
{
|
||||
sc_spu.Error("sys_spu_thread_connect_event: unsupported event type (0x%x)", et);
|
||||
return CELL_EINVAL;
|
||||
}
|
||||
|
||||
SPUThread& spu = *(SPUThread*)thr;
|
||||
|
||||
EventPort& port = spu.SPUPs[spup];
|
||||
|
||||
SMutexLocker lock(port.mutex);
|
||||
|
||||
if (!port.eq)
|
||||
{
|
||||
return CELL_ENOTCONN;
|
||||
}
|
||||
|
||||
port.eq->ports.remove(&port);
|
||||
port.eq = nullptr;
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
int sys_spu_thread_bind_queue(u32 id, u32 eq_id, u32 spuq_num)
|
||||
{
|
||||
sc_spu.Warning("sys_spu_thread_bind_queue(id=%d, equeue_id=%d, spuq_num=0x%x)", id, eq_id, spuq_num);
|
||||
|
||||
EventQueue* eq;
|
||||
if (!Emu.GetIdManager().GetIDData(eq_id, eq))
|
||||
{
|
||||
return CELL_ESRCH;
|
||||
}
|
||||
|
||||
if (eq->type != SYS_SPU_QUEUE)
|
||||
{
|
||||
return CELL_EINVAL;
|
||||
}
|
||||
|
||||
CPUThread* thr = Emu.GetCPU().GetThread(id);
|
||||
|
||||
if(!thr || (thr->GetType() != CPU_THREAD_SPU && thr->GetType() != CPU_THREAD_RAW_SPU))
|
||||
{
|
||||
return CELL_ESRCH;
|
||||
}
|
||||
|
||||
if (!(*(SPUThread*)thr).SPUQs.RegisterKey(eq, FIX_SPUQ(spuq_num)))
|
||||
{
|
||||
return CELL_EBUSY;
|
||||
}
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
int sys_spu_thread_unbind_queue(u32 id, u32 spuq_num)
|
||||
{
|
||||
sc_spu.Warning("sys_spu_thread_unbind_queue(id=0x%x, spuq_num=0x%x)", id, spuq_num);
|
||||
|
||||
CPUThread* thr = Emu.GetCPU().GetThread(id);
|
||||
|
||||
if(!thr || (thr->GetType() != CPU_THREAD_SPU && thr->GetType() != CPU_THREAD_RAW_SPU))
|
||||
{
|
||||
return CELL_ESRCH;
|
||||
}
|
||||
|
||||
if (!(*(SPUThread*)thr).SPUQs.UnregisterKey(FIX_SPUQ(spuq_num)))
|
||||
{
|
||||
return CELL_ESRCH; // may be CELL_EINVAL
|
||||
}
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
int sys_spu_thread_group_connect_event_all_threads(u32 id, u32 eq, u64 req, u32 spup_addr)
|
||||
{
|
||||
sc_spu.Error("sys_spu_thread_group_connect_event_all_threads(id=%d, eq=%d, req=0x%llx, spup_addr=0x%x)",
|
||||
@ -602,82 +750,4 @@ int sys_spu_thread_group_disconnect_event_all_threads(u32 id, u8 spup)
|
||||
sc_spu.Error("sys_spu_thread_group_disconnect_event_all_threads(id=%d, spup=%d)", id, spup);
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
int sys_spu_thread_connect_event(u32 id, u32 eq, u32 et, u8 spup)
|
||||
{
|
||||
sc_spu.Error("sys_spu_thread_connect_event(id=%d, eq=%d, et=0x%x, spup=%d)", id, eq, et, spup);
|
||||
|
||||
EventQueue* equeue;
|
||||
if(!sys_event.CheckId(eq, equeue))
|
||||
{
|
||||
return CELL_ESRCH;
|
||||
}
|
||||
|
||||
if(spup > 63)
|
||||
{
|
||||
return CELL_EINVAL;
|
||||
}
|
||||
|
||||
CPUThread* thr = Emu.GetCPU().GetThread(id);
|
||||
|
||||
if(!thr || (thr->GetType() != CPU_THREAD_SPU && thr->GetType() != CPU_THREAD_RAW_SPU))
|
||||
{
|
||||
return CELL_ESRCH;
|
||||
}
|
||||
/*
|
||||
for(int j=0; j<equeue->pos; ++j)
|
||||
{
|
||||
if(!equeue->ports[j]->thread)
|
||||
{
|
||||
equeue->ports[j]->thread = thr;
|
||||
return CELL_OK;
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
return CELL_EISCONN;
|
||||
}
|
||||
|
||||
//
|
||||
int sys_spu_thread_disconnect_event(u32 id, u32 event_type, u8 spup)
|
||||
{
|
||||
sc_spu.Error("sys_spu_thread_disconnect_event(id=%d, event_type=0x%x, spup=%d", id, event_type, spup);
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
/*
|
||||
SPU-Side functions:
|
||||
int sys_spu_thread_receive_event(u32 spuq_num, mem32_t d1, mem32_t d2, mem32_t d3);
|
||||
int sys_spu_thread_send_event(u8 spup, u24 data0, u32 data1);
|
||||
int sys_spu_thread_throw_event(u8 spup, u24 data0, u32 data1);
|
||||
int sys_spu_thread_tryreceive_event(u32 spuq_num, mem32_t d1, mem32_t d2, mem32_t d3);
|
||||
*/
|
||||
|
||||
int sys_spu_thread_bind_queue(u32 id, u32 eq, u32 spuq_num)
|
||||
{
|
||||
sc_spu.Error("sys_spu_thread_bind_queue(id=%d, equeue_id=%d, spuq_num=%d)", id, eq, spuq_num);
|
||||
|
||||
EventQueue* equeue;
|
||||
if(!sys_event.CheckId(eq, equeue))
|
||||
{
|
||||
return CELL_ESRCH;
|
||||
}
|
||||
|
||||
CPUThread* thr = Emu.GetCPU().GetThread(id);
|
||||
|
||||
if(!thr || (thr->GetType() != CPU_THREAD_SPU && thr->GetType() != CPU_THREAD_RAW_SPU))
|
||||
{
|
||||
return CELL_ESRCH;
|
||||
}
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
int sys_spu_thread_unbind_queue(u32 id, u32 spuq_num)
|
||||
{
|
||||
sc_spu.Error("sys_spu_thread_unbind_queue(id=0x%x, spuq_num=%d)", id, spuq_num);
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
}
|
@ -24,14 +24,14 @@ int sys_time_get_timezone(mem32_t timezone, mem32_t summertime)
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
u64 get_system_time()
|
||||
u64 get_time()
|
||||
{
|
||||
#ifdef _WIN32
|
||||
LARGE_INTEGER cycle;
|
||||
LARGE_INTEGER freq;
|
||||
QueryPerformanceCounter(&cycle);
|
||||
QueryPerformanceFrequency(&freq);
|
||||
return cycle.QuadPart * 1000000 / freq.QuadPart;
|
||||
return cycle.QuadPart * 10000000 / freq.QuadPart;
|
||||
#else
|
||||
struct timespec ts;
|
||||
if (!clock_gettime(CLOCK_MONOTONIC, &ts))
|
||||
@ -39,14 +39,20 @@ u64 get_system_time()
|
||||
#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)
|
||||
{
|
||||
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(nsec_addr, time % 1000000);
|
||||
Memory.Write64(sec_addr, time / 10000000);
|
||||
Memory.Write64(nsec_addr, (time % 10000000) * 100);
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
@ -60,17 +66,5 @@ s64 sys_time_get_system_time()
|
||||
u64 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;
|
||||
#endif
|
||||
*/
|
||||
}
|
||||
|
@ -1,6 +1,9 @@
|
||||
#pragma once
|
||||
#include "Emu/SysCalls/lv2/SC_Lwmutex.h"
|
||||
|
||||
#define FIX_SPUQ(x) ((u64)x | 0x5350555100000000ULL)
|
||||
// arbitrary code to prevent "special" zero value in key argument
|
||||
|
||||
enum EventQueueType
|
||||
{
|
||||
SYS_PPU_QUEUE = 1,
|
||||
@ -158,6 +161,7 @@ public:
|
||||
SMutexLocker lock(m_lock);
|
||||
for (u32 i = 0; i < data.GetCount(); i++)
|
||||
{
|
||||
SMutexLocker lock2(data[i]->mutex);
|
||||
data[i]->eq = nullptr; // force all ports to disconnect
|
||||
}
|
||||
data.Clear();
|
||||
@ -183,8 +187,9 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
struct EventQueue : SleepQueue
|
||||
struct EventQueue
|
||||
{
|
||||
SleepQueue sq;
|
||||
EventPortList ports;
|
||||
EventRingBuffer events;
|
||||
SMutex owner;
|
||||
@ -220,4 +225,5 @@ public:
|
||||
bool RegisterKey(EventQueue* data, u64 key);
|
||||
bool GetEventQueue(u64 key, EventQueue*& data);
|
||||
bool UnregisterKey(u64 key);
|
||||
bool SendEvent(u64 key, u64 source, u64 d1, u64 d2, u64 d3);
|
||||
};
|
@ -279,6 +279,7 @@
|
||||
<ClCompile Include="Emu\SysCalls\lv2\SC_TTY.cpp" />
|
||||
<ClCompile Include="Emu\SysCalls\lv2\SC_VM.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\cellDmux.cpp" />
|
||||
<ClCompile Include="Emu\SysCalls\Modules\cellFont.cpp" />
|
||||
@ -295,6 +296,8 @@
|
||||
<ClCompile Include="Emu\SysCalls\Modules\cellSysmodule.cpp" />
|
||||
<ClCompile Include="Emu\SysCalls\Modules\cellSysutil.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\sysPrxForUser.cpp" />
|
||||
<ClCompile Include="Emu\SysCalls\Modules\sys_fs.cpp" />
|
||||
|
@ -406,6 +406,15 @@
|
||||
<ClCompile Include="Emu\FS\vfsDir.cpp">
|
||||
<Filter>Emu\FS</Filter>
|
||||
</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>
|
||||
<ResourceCompile Include="rpcs3.rc" />
|
||||
|
Loading…
Reference in New Issue
Block a user