mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-23 19:22:48 +01:00
commit
872e41825e
@ -270,7 +270,7 @@ void decode_x64_reg_op(const u8* code, x64_op_t& out_op, x64_reg_t& out_reg, siz
|
||||
{
|
||||
case 0x7f:
|
||||
{
|
||||
if (repe && !oso) // MOVDQU xmm/m, xmm
|
||||
if ((repe && !oso) || (!repe && oso)) // MOVDQU/MOVDQA xmm/m, xmm
|
||||
{
|
||||
out_op = X64OP_STORE;
|
||||
out_reg = get_modRM_reg_xmm(code, rex);
|
||||
|
@ -28,22 +28,22 @@ public:
|
||||
|
||||
double GetElapsedTimeInSec() const
|
||||
{
|
||||
return GetElapsedTimeInMicroSec() / 1000000.0;
|
||||
return double(GetElapsedTimeInMicroSec()) / 1000000.0;
|
||||
}
|
||||
|
||||
double GetElapsedTimeInMilliSec() const
|
||||
{
|
||||
return GetElapsedTimeInMicroSec() / 1000.0;
|
||||
return double(GetElapsedTimeInMicroSec()) / 1000.0;
|
||||
}
|
||||
|
||||
double GetElapsedTimeInMicroSec() const
|
||||
u64 GetElapsedTimeInMicroSec() const
|
||||
{
|
||||
std::chrono::high_resolution_clock::time_point now = m_stopped ? m_end : std::chrono::high_resolution_clock::now();
|
||||
|
||||
return std::chrono::duration_cast<std::chrono::microseconds>(now - m_start).count();
|
||||
}
|
||||
|
||||
double GetElapsedTimeInNanoSec() const
|
||||
u64 GetElapsedTimeInNanoSec() const
|
||||
{
|
||||
std::chrono::high_resolution_clock::time_point now = m_stopped ? m_end : std::chrono::high_resolution_clock::now();
|
||||
|
||||
|
@ -1286,17 +1286,10 @@ void armv7_decoder_initialize(u32 addr, u32 end_addr, bool dump)
|
||||
// possibly a call to imported function:
|
||||
if (target >= end_addr && ((target - end_addr) % 16) == 0 && (instr & 0xfff000f0) == 0xe0700090)
|
||||
{
|
||||
// check if implemented
|
||||
if (const u32 func = (instr & 0xfff00) >> 4 | (instr & 0xf))
|
||||
{
|
||||
// replace BLX with "HACK" instruction directly (in Thumb form), it can help to see where it was called from
|
||||
vm::psv::write32(addr, 0xf870 | func << 16);
|
||||
g_opct[0xf8700000 | func] = g_op4t.HACK();
|
||||
}
|
||||
else
|
||||
{
|
||||
// leave as is if unimplemented
|
||||
}
|
||||
// replace BLX with "HACK" instruction directly (in Thumb form), it can help to see where it was called from
|
||||
const u32 index = (instr & 0xfff00) >> 4 | (instr & 0xf);
|
||||
vm::psv::write32(addr, 0xf870 | index << 16);
|
||||
g_opct[0xf8700000 | index] = g_op4t.HACK();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -503,20 +503,20 @@ void ARMv7_instrs::UNK(ARMv7Context& context, const ARMv7Code code)
|
||||
|
||||
void ARMv7_instrs::HACK(ARMv7Context& context, const ARMv7Code code, const ARMv7_encoding type)
|
||||
{
|
||||
u32 cond, func;
|
||||
u32 cond, index;
|
||||
|
||||
switch (type)
|
||||
{
|
||||
case T1:
|
||||
{
|
||||
cond = context.ITSTATE.advance();
|
||||
func = code.data & 0xffff;
|
||||
index = code.data & 0xffff;
|
||||
break;
|
||||
}
|
||||
case A1:
|
||||
{
|
||||
cond = code.data >> 28;
|
||||
func = (code.data & 0xfff00) >> 4 | (code.data & 0xf);
|
||||
index = (code.data & 0xfff00) >> 4 | (code.data & 0xf);
|
||||
break;
|
||||
}
|
||||
default: throw __FUNCTION__;
|
||||
@ -524,13 +524,30 @@ void ARMv7_instrs::HACK(ARMv7Context& context, const ARMv7Code code, const ARMv7
|
||||
|
||||
if (context.debug)
|
||||
{
|
||||
if (context.debug & DF_DISASM) context.debug_str = fmt::format("hack%s %s", fmt_cond(cond), get_psv_func_by_index(func)->name);
|
||||
if (context.debug & DF_DISASM)
|
||||
{
|
||||
if (auto func = get_psv_func_by_index(index))
|
||||
{
|
||||
if (func->func)
|
||||
{
|
||||
context.debug_str = fmt::format("hack%s %s", fmt_cond(cond), func->name);
|
||||
}
|
||||
else
|
||||
{
|
||||
context.debug_str = fmt::format("hack%s UNIMPLEMENTED:0x%08X (%s)", fmt_cond(cond), func->nid, func->name);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
context.debug_str = fmt::format("hack%s %d", fmt_cond(cond), index);
|
||||
}
|
||||
}
|
||||
if (process_debug(context)) return;
|
||||
}
|
||||
|
||||
if (ConditionPassed(context, cond))
|
||||
{
|
||||
execute_psv_func_by_index(context, func);
|
||||
execute_psv_func_by_index(context, index);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -5,30 +5,50 @@
|
||||
std::vector<psv_func> g_psv_func_list;
|
||||
std::vector<psv_log_base*> g_psv_modules;
|
||||
|
||||
void add_psv_func(psv_func& data)
|
||||
u32 add_psv_func(psv_func data)
|
||||
{
|
||||
for (auto& f : g_psv_func_list)
|
||||
{
|
||||
if (f.nid == data.nid && &f - g_psv_func_list.data() >= 2 /* special functions count */)
|
||||
if (f.nid == data.nid)
|
||||
{
|
||||
const u32 index = (u32)(&f - g_psv_func_list.data());
|
||||
|
||||
if (index < SFI_MAX)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (data.func)
|
||||
{
|
||||
f.func = data.func;
|
||||
}
|
||||
|
||||
return;
|
||||
return index;
|
||||
}
|
||||
}
|
||||
|
||||
g_psv_func_list.push_back(data);
|
||||
return (u32)(g_psv_func_list.size() - 1);
|
||||
}
|
||||
|
||||
const psv_func* get_psv_func_by_nid(u32 nid)
|
||||
psv_func* get_psv_func_by_nid(u32 nid, u32* out_index)
|
||||
{
|
||||
for (auto& f : g_psv_func_list)
|
||||
{
|
||||
if (f.nid == nid && &f - g_psv_func_list.data() >= 2 /* special functions count */)
|
||||
if (f.nid == nid && &f - g_psv_func_list.data())
|
||||
{
|
||||
const u32 index = (u32)(&f - g_psv_func_list.data());
|
||||
|
||||
if (index < SFI_MAX)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (out_index)
|
||||
{
|
||||
*out_index = index;
|
||||
}
|
||||
|
||||
return &f;
|
||||
}
|
||||
}
|
||||
@ -36,19 +56,7 @@ const psv_func* get_psv_func_by_nid(u32 nid)
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
u32 get_psv_func_index(const psv_func* func)
|
||||
{
|
||||
auto res = func - g_psv_func_list.data();
|
||||
|
||||
if ((size_t)res >= g_psv_func_list.size())
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
|
||||
return (u32)res;
|
||||
}
|
||||
|
||||
const psv_func* get_psv_func_by_index(u32 index)
|
||||
psv_func* get_psv_func_by_index(u32 index)
|
||||
{
|
||||
if (index >= g_psv_func_list.size())
|
||||
{
|
||||
@ -210,24 +218,15 @@ void initialize_psv_modules()
|
||||
g_psv_modules.push_back(&sceXml);
|
||||
|
||||
// setup special functions (without NIDs)
|
||||
psv_func unimplemented;
|
||||
unimplemented.nid = 0;
|
||||
unimplemented.name = "UNIMPLEMENTED";
|
||||
unimplemented.func.reset(new psv_func_detail::func_binder<void, ARMv7Context&>([](ARMv7Context& context)
|
||||
{
|
||||
context.thread.m_last_syscall = vm::psv::read32(context.thread.PC + 4);
|
||||
throw "Unimplemented function";
|
||||
}));
|
||||
g_psv_func_list.push_back(unimplemented);
|
||||
g_psv_func_list.resize(SFI_MAX);
|
||||
|
||||
psv_func hle_return;
|
||||
hle_return.nid = 1;
|
||||
psv_func& hle_return = g_psv_func_list[SFI_HLE_RETURN];
|
||||
hle_return.nid = 0;
|
||||
hle_return.name = "HLE_RETURN";
|
||||
hle_return.func.reset(new psv_func_detail::func_binder<void, ARMv7Context&>([](ARMv7Context& context)
|
||||
{
|
||||
context.thread.FastStop();
|
||||
}));
|
||||
g_psv_func_list.push_back(hle_return);
|
||||
|
||||
// load functions
|
||||
for (auto module : g_psv_modules)
|
||||
|
@ -478,8 +478,15 @@ struct psv_func
|
||||
psv_log_base* module; // Module for information
|
||||
};
|
||||
|
||||
enum psv_special_function_index : u16
|
||||
{
|
||||
SFI_HLE_RETURN,
|
||||
|
||||
SFI_MAX
|
||||
};
|
||||
|
||||
// Do not call directly
|
||||
void add_psv_func(psv_func& data);
|
||||
u32 add_psv_func(psv_func data);
|
||||
// Do not call directly
|
||||
template<typename RT, typename... T> void reg_psv_func(u32 nid, psv_log_base* module, const char* name, RT(*func)(T...))
|
||||
{
|
||||
@ -491,12 +498,10 @@ template<typename RT, typename... T> void reg_psv_func(u32 nid, psv_log_base* mo
|
||||
|
||||
add_psv_func(f);
|
||||
}
|
||||
// Find registered HLE function by its ID
|
||||
const psv_func* get_psv_func_by_nid(u32 nid);
|
||||
// Get index of registered HLE function
|
||||
u32 get_psv_func_index(const psv_func* func);
|
||||
// Find registered HLE function by NID
|
||||
psv_func* get_psv_func_by_nid(u32 nid, u32* out_index = nullptr);
|
||||
// Find registered HLE function by its index
|
||||
const psv_func* get_psv_func_by_index(u32 index);
|
||||
psv_func* get_psv_func_by_index(u32 index);
|
||||
// Execute registered HLE function by its index
|
||||
void execute_psv_func_by_index(ARMv7Context& context, u32 index);
|
||||
// Register all HLE functions
|
||||
|
@ -189,7 +189,7 @@ u64 PPUThread::GetStackArg(s32 i)
|
||||
return vm::read64(vm::cast(GPR[1] + 0x70 + 0x8 * (i - 9)));
|
||||
}
|
||||
|
||||
u64 PPUThread::FastCall2(u32 addr, u32 rtoc)
|
||||
void PPUThread::FastCall2(u32 addr, u32 rtoc)
|
||||
{
|
||||
auto old_status = m_status;
|
||||
auto old_PC = PC;
|
||||
@ -212,8 +212,6 @@ u64 PPUThread::FastCall2(u32 addr, u32 rtoc)
|
||||
GPR[2] = old_rtoc;
|
||||
LR = old_LR;
|
||||
SetCurrentNamedThread(old_thread);
|
||||
|
||||
return GPR[3];
|
||||
}
|
||||
|
||||
void PPUThread::FastStop()
|
||||
|
@ -793,13 +793,27 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
u64 get_next_gpr_arg(u32& g_count, u32& f_count, u32& v_count)
|
||||
{
|
||||
assert(!f_count && !v_count); // not supported
|
||||
|
||||
if (g_count < 8)
|
||||
{
|
||||
return GPR[g_count++ + 3];
|
||||
}
|
||||
else
|
||||
{
|
||||
return GetStackArg(++g_count);
|
||||
}
|
||||
}
|
||||
|
||||
public:
|
||||
virtual void InitRegs() override;
|
||||
virtual void InitStack() override;
|
||||
virtual void CloseStack() override;
|
||||
virtual void Task() override;
|
||||
u64 GetStackArg(s32 i);
|
||||
u64 FastCall2(u32 addr, u32 rtoc);
|
||||
void FastCall2(u32 addr, u32 rtoc);
|
||||
void FastStop();
|
||||
virtual void DoRun() override;
|
||||
|
||||
|
@ -1,7 +1,9 @@
|
||||
#include "stdafx.h"
|
||||
#include "Utilities/Log.h"
|
||||
#include "Emu/Memory/Memory.h"
|
||||
#include "Emu/System.h"
|
||||
#include "Emu/SysCalls/Modules.h"
|
||||
#include "Emu/SysCalls/SysCalls.h"
|
||||
#include "Emu/SysCalls/Static.h"
|
||||
#include "Emu/SysCalls/CB_FUNC.h"
|
||||
#include "Crypto/sha1.h"
|
||||
@ -84,7 +86,8 @@ void execute_ps3_func_by_index(PPUThread& CPU, u32 index)
|
||||
}
|
||||
else
|
||||
{
|
||||
throw "Unimplemented function";
|
||||
LOG_ERROR(HLE, "Unimplemented function %s", SysCalls::GetHLEFuncName(func->id));
|
||||
CPU.GPR[3] = 0;
|
||||
}
|
||||
|
||||
CPU.m_last_syscall = old_last_syscall;
|
||||
|
@ -179,4 +179,4 @@ void fix_relocs(Module* module, u32 lib, u32 start, u32 end, u32 seg2);
|
||||
|
||||
#define REG_FUNC(module, name) module.AddFunc(get_function_id(#name), name)
|
||||
|
||||
#define UNIMPLEMENTED_FUNC(module) module.Fatal("%s", __FUNCTION__)
|
||||
#define UNIMPLEMENTED_FUNC(module) module.Error("%s", __FUNCTION__)
|
||||
|
@ -7,65 +7,44 @@ extern Module cellAtrac;
|
||||
|
||||
#include "cellAtrac.h"
|
||||
|
||||
#ifdef PRX_DEBUG
|
||||
#include "prx_libatrac3plus.h"
|
||||
u32 libatrac3plus;
|
||||
u32 libatrac3plus_rtoc;
|
||||
#endif
|
||||
|
||||
s64 cellAtracSetDataAndGetMemSize(vm::ptr<CellAtracHandle> pHandle, u32 pucBufferAddr, u32 uiReadByte, u32 uiBufferByte, vm::ptr<u32> puiWorkMemByte)
|
||||
s32 cellAtracSetDataAndGetMemSize(vm::ptr<CellAtracHandle> pHandle, u32 pucBufferAddr, u32 uiReadByte, u32 uiBufferByte, vm::ptr<u32> puiWorkMemByte)
|
||||
{
|
||||
cellAtrac.Warning("cellAtracSetDataAndGetMemSize(pHandle=0x%x, pucBufferAddr=0x%x, uiReadByte=0x%x, uiBufferByte=0x%x, puiWorkMemByte_addr=0x%x)",
|
||||
pHandle.addr(), pucBufferAddr, uiReadByte, uiBufferByte, puiWorkMemByte.addr());
|
||||
#ifdef PRX_DEBUG
|
||||
return GetCurrentPPUThread().FastCall2(libatrac3plus + 0x11F4, libatrac3plus_rtoc);
|
||||
#endif
|
||||
|
||||
*puiWorkMemByte = 0x1000; // unproved
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s64 cellAtracCreateDecoder(vm::ptr<CellAtracHandle> pHandle, u32 pucWorkMem_addr, u32 uiPpuThreadPriority, u32 uiSpuThreadPriority)
|
||||
s32 cellAtracCreateDecoder(vm::ptr<CellAtracHandle> pHandle, u32 pucWorkMem_addr, u32 uiPpuThreadPriority, u32 uiSpuThreadPriority)
|
||||
{
|
||||
cellAtrac.Warning("cellAtracCreateDecoder(pHandle=0x%x, pucWorkMem_addr=0x%x, uiPpuThreadPriority=%d, uiSpuThreadPriority=%d)",
|
||||
pHandle.addr(), pucWorkMem_addr, uiPpuThreadPriority, uiSpuThreadPriority);
|
||||
#ifdef PRX_DEBUG
|
||||
return GetCurrentPPUThread().FastCall2(libatrac3plus + 0x0FF0, libatrac3plus_rtoc);
|
||||
#endif
|
||||
|
||||
pHandle->data.pucWorkMem_addr = pucWorkMem_addr;
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s64 cellAtracCreateDecoderExt(vm::ptr<CellAtracHandle> pHandle, u32 pucWorkMem_addr, u32 uiPpuThreadPriority, vm::ptr<CellAtracExtRes> pExtRes)
|
||||
s32 cellAtracCreateDecoderExt(vm::ptr<CellAtracHandle> pHandle, u32 pucWorkMem_addr, u32 uiPpuThreadPriority, vm::ptr<CellAtracExtRes> pExtRes)
|
||||
{
|
||||
cellAtrac.Warning("cellAtracCreateDecoderExt(pHandle=0x%x, pucWorkMem_addr=0x%x, uiPpuThreadPriority=%d, pExtRes_addr=0x%x)",
|
||||
pHandle.addr(), pucWorkMem_addr, uiPpuThreadPriority, pExtRes.addr());
|
||||
#ifdef PRX_DEBUG
|
||||
return GetCurrentPPUThread().FastCall2(libatrac3plus + 0x0DB0, libatrac3plus_rtoc);
|
||||
#endif
|
||||
|
||||
pHandle->data.pucWorkMem_addr = pucWorkMem_addr;
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s64 cellAtracDeleteDecoder(vm::ptr<CellAtracHandle> pHandle)
|
||||
s32 cellAtracDeleteDecoder(vm::ptr<CellAtracHandle> pHandle)
|
||||
{
|
||||
cellAtrac.Warning("cellAtracDeleteDecoder(pHandle=0x%x)", pHandle.addr());
|
||||
#ifdef PRX_DEBUG
|
||||
return GetCurrentPPUThread().FastCall2(libatrac3plus + 0x0D08, libatrac3plus_rtoc);
|
||||
#endif
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s64 cellAtracDecode(vm::ptr<CellAtracHandle> pHandle, u32 pfOutAddr, vm::ptr<u32> puiSamples, vm::ptr<u32> puiFinishflag, vm::ptr<u32> piRemainFrame)
|
||||
s32 cellAtracDecode(vm::ptr<CellAtracHandle> pHandle, u32 pfOutAddr, vm::ptr<u32> puiSamples, vm::ptr<u32> puiFinishflag, vm::ptr<u32> piRemainFrame)
|
||||
{
|
||||
cellAtrac.Warning("cellAtracDecode(pHandle=0x%x, pfOutAddr=0x%x, puiSamples_addr=0x%x, puiFinishFlag_addr=0x%x, piRemainFrame_addr=0x%x)",
|
||||
pHandle.addr(), pfOutAddr, puiSamples.addr(), puiFinishflag.addr(), piRemainFrame.addr());
|
||||
#ifdef PRX_DEBUG
|
||||
return GetCurrentPPUThread().FastCall2(libatrac3plus + 0x09A8, libatrac3plus_rtoc);
|
||||
#endif
|
||||
|
||||
*puiSamples = 0;
|
||||
*puiFinishflag = 1;
|
||||
@ -73,13 +52,10 @@ s64 cellAtracDecode(vm::ptr<CellAtracHandle> pHandle, u32 pfOutAddr, vm::ptr<u32
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s64 cellAtracGetStreamDataInfo(vm::ptr<CellAtracHandle> pHandle, vm::ptr<u32> ppucWritePointer, vm::ptr<u32> puiWritableByte, vm::ptr<u32> puiReadPosition)
|
||||
s32 cellAtracGetStreamDataInfo(vm::ptr<CellAtracHandle> pHandle, vm::ptr<u32> ppucWritePointer, vm::ptr<u32> puiWritableByte, vm::ptr<u32> puiReadPosition)
|
||||
{
|
||||
cellAtrac.Warning("cellAtracGetStreamDataInfo(pHandle=0x%x, ppucWritePointer_addr=0x%x, puiWritableByte_addr=0x%x, puiReadPosition_addr=0x%x)",
|
||||
pHandle.addr(), ppucWritePointer.addr(), puiWritableByte.addr(), puiReadPosition.addr());
|
||||
#ifdef PRX_DEBUG
|
||||
return GetCurrentPPUThread().FastCall2(libatrac3plus + 0x0BE8, libatrac3plus_rtoc);
|
||||
#endif
|
||||
|
||||
*ppucWritePointer = pHandle->data.pucWorkMem_addr;
|
||||
*puiWritableByte = 0x1000;
|
||||
@ -87,112 +63,82 @@ s64 cellAtracGetStreamDataInfo(vm::ptr<CellAtracHandle> pHandle, vm::ptr<u32> pp
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s64 cellAtracAddStreamData(vm::ptr<CellAtracHandle> pHandle, u32 uiAddByte)
|
||||
s32 cellAtracAddStreamData(vm::ptr<CellAtracHandle> pHandle, u32 uiAddByte)
|
||||
{
|
||||
cellAtrac.Warning("cellAtracAddStreamData(pHandle=0x%x, uiAddByte=0x%x)", pHandle.addr(), uiAddByte);
|
||||
#ifdef PRX_DEBUG
|
||||
return GetCurrentPPUThread().FastCall2(libatrac3plus + 0x0AFC, libatrac3plus_rtoc);
|
||||
#endif
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s64 cellAtracGetRemainFrame(vm::ptr<CellAtracHandle> pHandle, vm::ptr<u32> piRemainFrame)
|
||||
s32 cellAtracGetRemainFrame(vm::ptr<CellAtracHandle> pHandle, vm::ptr<u32> piRemainFrame)
|
||||
{
|
||||
cellAtrac.Warning("cellAtracGetRemainFrame(pHandle=0x%x, piRemainFrame_addr=0x%x)", pHandle.addr(), piRemainFrame.addr());
|
||||
#ifdef PRX_DEBUG
|
||||
return GetCurrentPPUThread().FastCall2(libatrac3plus + 0x092C, libatrac3plus_rtoc);
|
||||
#endif
|
||||
|
||||
*piRemainFrame = CELL_ATRAC_ALLDATA_IS_ON_MEMORY;
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s64 cellAtracGetVacantSize(vm::ptr<CellAtracHandle> pHandle, vm::ptr<u32> puiVacantSize)
|
||||
s32 cellAtracGetVacantSize(vm::ptr<CellAtracHandle> pHandle, vm::ptr<u32> puiVacantSize)
|
||||
{
|
||||
cellAtrac.Warning("cellAtracGetVacantSize(pHandle=0x%x, puiVacantSize_addr=0x%x)", pHandle.addr(), puiVacantSize.addr());
|
||||
#ifdef PRX_DEBUG
|
||||
return GetCurrentPPUThread().FastCall2(libatrac3plus + 0x08B0, libatrac3plus_rtoc);
|
||||
#endif
|
||||
|
||||
*puiVacantSize = 0x1000;
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s64 cellAtracIsSecondBufferNeeded(vm::ptr<CellAtracHandle> pHandle)
|
||||
s32 cellAtracIsSecondBufferNeeded(vm::ptr<CellAtracHandle> pHandle)
|
||||
{
|
||||
cellAtrac.Warning("cellAtracIsSecondBufferNeeded(pHandle=0x%x)", pHandle.addr());
|
||||
#ifdef PRX_DEBUG
|
||||
return GetCurrentPPUThread().FastCall2(libatrac3plus + 0x0010, libatrac3plus_rtoc);
|
||||
#endif
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s64 cellAtracGetSecondBufferInfo(vm::ptr<CellAtracHandle> pHandle, vm::ptr<u32> puiReadPosition, vm::ptr<u32> puiDataByte)
|
||||
s32 cellAtracGetSecondBufferInfo(vm::ptr<CellAtracHandle> pHandle, vm::ptr<u32> puiReadPosition, vm::ptr<u32> puiDataByte)
|
||||
{
|
||||
cellAtrac.Warning("cellAtracGetSecondBufferInfo(pHandle=0x%x, puiReadPosition_addr=0x%x, puiDataByte_addr=0x%x)",
|
||||
pHandle.addr(), puiReadPosition.addr(), puiDataByte.addr());
|
||||
#ifdef PRX_DEBUG
|
||||
return GetCurrentPPUThread().FastCall2(libatrac3plus + 0x07E8, libatrac3plus_rtoc);
|
||||
#endif
|
||||
|
||||
*puiReadPosition = 0;
|
||||
*puiDataByte = 0; // write to null block will occur
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s64 cellAtracSetSecondBuffer(vm::ptr<CellAtracHandle> pHandle, u32 pucSecondBufferAddr, u32 uiSecondBufferByte)
|
||||
s32 cellAtracSetSecondBuffer(vm::ptr<CellAtracHandle> pHandle, u32 pucSecondBufferAddr, u32 uiSecondBufferByte)
|
||||
{
|
||||
cellAtrac.Warning("cellAtracSetSecondBuffer(pHandle=0x%x, pucSecondBufferAddr=0x%x, uiSecondBufferByte=0x%x)",
|
||||
pHandle.addr(), pucSecondBufferAddr, uiSecondBufferByte);
|
||||
#ifdef PRX_DEBUG
|
||||
return GetCurrentPPUThread().FastCall2(libatrac3plus + 0x0704, libatrac3plus_rtoc);
|
||||
#endif
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s64 cellAtracGetChannel(vm::ptr<CellAtracHandle> pHandle, vm::ptr<u32> puiChannel)
|
||||
s32 cellAtracGetChannel(vm::ptr<CellAtracHandle> pHandle, vm::ptr<u32> puiChannel)
|
||||
{
|
||||
cellAtrac.Warning("cellAtracGetChannel(pHandle=0x%x, puiChannel_addr=0x%x)", pHandle.addr(), puiChannel.addr());
|
||||
#ifdef PRX_DEBUG
|
||||
return GetCurrentPPUThread().FastCall2(libatrac3plus + 0x0060, libatrac3plus_rtoc);
|
||||
#endif
|
||||
|
||||
*puiChannel = 2;
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s64 cellAtracGetMaxSample(vm::ptr<CellAtracHandle> pHandle, vm::ptr<u32> puiMaxSample)
|
||||
s32 cellAtracGetMaxSample(vm::ptr<CellAtracHandle> pHandle, vm::ptr<u32> puiMaxSample)
|
||||
{
|
||||
cellAtrac.Warning("cellAtracGetMaxSample(pHandle=0x%x, puiMaxSample_addr=0x%x)", pHandle.addr(), puiMaxSample.addr());
|
||||
#ifdef PRX_DEBUG
|
||||
return GetCurrentPPUThread().FastCall2(libatrac3plus + 0x00AC, libatrac3plus_rtoc);
|
||||
#endif
|
||||
|
||||
*puiMaxSample = 512;
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s64 cellAtracGetNextSample(vm::ptr<CellAtracHandle> pHandle, vm::ptr<u32> puiNextSample)
|
||||
s32 cellAtracGetNextSample(vm::ptr<CellAtracHandle> pHandle, vm::ptr<u32> puiNextSample)
|
||||
{
|
||||
cellAtrac.Warning("cellAtracGetNextSample(pHandle=0x%x, puiNextSample_addr=0x%x)", pHandle.addr(), puiNextSample.addr());
|
||||
#ifdef PRX_DEBUG
|
||||
return GetCurrentPPUThread().FastCall2(libatrac3plus + 0x0688, libatrac3plus_rtoc);
|
||||
#endif
|
||||
|
||||
*puiNextSample = 0;
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s64 cellAtracGetSoundInfo(vm::ptr<CellAtracHandle> pHandle, vm::ptr<u32> piEndSample, vm::ptr<u32> piLoopStartSample, vm::ptr<u32> piLoopEndSample)
|
||||
s32 cellAtracGetSoundInfo(vm::ptr<CellAtracHandle> pHandle, vm::ptr<u32> piEndSample, vm::ptr<u32> piLoopStartSample, vm::ptr<u32> piLoopEndSample)
|
||||
{
|
||||
cellAtrac.Warning("cellAtracGetSoundInfo(pHandle=0x%x, piEndSample_addr=0x%x, piLoopStartSample_addr=0x%x, piLoopEndSample_addr=0x%x)",
|
||||
pHandle.addr(), piEndSample.addr(), piLoopStartSample.addr(), piLoopEndSample.addr());
|
||||
#ifdef PRX_DEBUG
|
||||
return GetCurrentPPUThread().FastCall2(libatrac3plus + 0x0104, libatrac3plus_rtoc);
|
||||
#endif
|
||||
|
||||
*piEndSample = 0;
|
||||
*piLoopStartSample = 0;
|
||||
@ -200,60 +146,45 @@ s64 cellAtracGetSoundInfo(vm::ptr<CellAtracHandle> pHandle, vm::ptr<u32> piEndSa
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s64 cellAtracGetNextDecodePosition(vm::ptr<CellAtracHandle> pHandle, vm::ptr<u32> puiSamplePosition)
|
||||
s32 cellAtracGetNextDecodePosition(vm::ptr<CellAtracHandle> pHandle, vm::ptr<u32> puiSamplePosition)
|
||||
{
|
||||
cellAtrac.Warning("cellAtracGetNextDecodePosition(pHandle=0x%x, puiSamplePosition_addr=0x%x)",
|
||||
pHandle.addr(), puiSamplePosition.addr());
|
||||
#ifdef PRX_DEBUG
|
||||
return GetCurrentPPUThread().FastCall2(libatrac3plus + 0x0190, libatrac3plus_rtoc);
|
||||
#endif
|
||||
|
||||
*puiSamplePosition = 0;
|
||||
return CELL_ATRAC_ERROR_ALLDATA_WAS_DECODED;
|
||||
}
|
||||
|
||||
s64 cellAtracGetBitrate(vm::ptr<CellAtracHandle> pHandle, vm::ptr<u32> puiBitrate)
|
||||
s32 cellAtracGetBitrate(vm::ptr<CellAtracHandle> pHandle, vm::ptr<u32> puiBitrate)
|
||||
{
|
||||
cellAtrac.Warning("cellAtracGetBitrate(pHandle=0x%x, puiBitrate_addr=0x%x)",
|
||||
pHandle.addr(), puiBitrate.addr());
|
||||
#ifdef PRX_DEBUG
|
||||
return GetCurrentPPUThread().FastCall2(libatrac3plus + 0x0374, libatrac3plus_rtoc);
|
||||
#endif
|
||||
|
||||
*puiBitrate = 128;
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s64 cellAtracGetLoopInfo(vm::ptr<CellAtracHandle> pHandle, vm::ptr<u32> piLoopNum, vm::ptr<u32> puiLoopStatus)
|
||||
s32 cellAtracGetLoopInfo(vm::ptr<CellAtracHandle> pHandle, vm::ptr<u32> piLoopNum, vm::ptr<u32> puiLoopStatus)
|
||||
{
|
||||
cellAtrac.Warning("cellAtracGetLoopInfo(pHandle=0x%x, piLoopNum_addr=0x%x, puiLoopStatus_addr=0x%x)",
|
||||
pHandle.addr(), piLoopNum.addr(), puiLoopStatus.addr());
|
||||
#ifdef PRX_DEBUG
|
||||
return GetCurrentPPUThread().FastCall2(libatrac3plus + 0x025C, libatrac3plus_rtoc);
|
||||
#endif
|
||||
|
||||
*piLoopNum = 0;
|
||||
*puiLoopStatus = 0;
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s64 cellAtracSetLoopNum(vm::ptr<CellAtracHandle> pHandle, int iLoopNum)
|
||||
s32 cellAtracSetLoopNum(vm::ptr<CellAtracHandle> pHandle, int iLoopNum)
|
||||
{
|
||||
cellAtrac.Warning("cellAtracSetLoopNum(pHandle=0x%x, iLoopNum=0x%x)", pHandle.addr(), iLoopNum);
|
||||
#ifdef PRX_DEBUG
|
||||
return GetCurrentPPUThread().FastCall2(libatrac3plus + 0x1538, libatrac3plus_rtoc);
|
||||
#endif
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s64 cellAtracGetBufferInfoForResetting(vm::ptr<CellAtracHandle> pHandle, u32 uiSample, vm::ptr<CellAtracBufferInfo> pBufferInfo)
|
||||
s32 cellAtracGetBufferInfoForResetting(vm::ptr<CellAtracHandle> pHandle, u32 uiSample, vm::ptr<CellAtracBufferInfo> pBufferInfo)
|
||||
{
|
||||
cellAtrac.Warning("cellAtracGetBufferInfoForResetting(pHandle=0x%x, uiSample=0x%x, pBufferInfo_addr=0x%x)",
|
||||
pHandle.addr(), uiSample, pBufferInfo.addr());
|
||||
#ifdef PRX_DEBUG
|
||||
return GetCurrentPPUThread().FastCall2(libatrac3plus + 0x05BC, libatrac3plus_rtoc);
|
||||
#endif
|
||||
|
||||
pBufferInfo->pucWriteAddr = pHandle->data.pucWorkMem_addr;
|
||||
pBufferInfo->uiWritableByte = 0x1000;
|
||||
@ -262,24 +193,18 @@ s64 cellAtracGetBufferInfoForResetting(vm::ptr<CellAtracHandle> pHandle, u32 uiS
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s64 cellAtracResetPlayPosition(vm::ptr<CellAtracHandle> pHandle, u32 uiSample, u32 uiWriteByte)
|
||||
s32 cellAtracResetPlayPosition(vm::ptr<CellAtracHandle> pHandle, u32 uiSample, u32 uiWriteByte)
|
||||
{
|
||||
cellAtrac.Warning("cellAtracResetPlayPosition(pHandle=0x%x, uiSample=0x%x, uiWriteByte=0x%x)",
|
||||
pHandle.addr(), uiSample, uiWriteByte);
|
||||
#ifdef PRX_DEBUG
|
||||
return GetCurrentPPUThread().FastCall2(libatrac3plus + 0x04E4, libatrac3plus_rtoc);
|
||||
#endif
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s64 cellAtracGetInternalErrorInfo(vm::ptr<CellAtracHandle> pHandle, vm::ptr<u32> piResult)
|
||||
s32 cellAtracGetInternalErrorInfo(vm::ptr<CellAtracHandle> pHandle, vm::ptr<u32> piResult)
|
||||
{
|
||||
cellAtrac.Warning("cellAtracGetInternalErrorInfo(pHandle=0x%x, piResult_addr=0x%x)",
|
||||
pHandle.addr(), piResult.addr());
|
||||
#ifdef PRX_DEBUG
|
||||
return GetCurrentPPUThread().FastCall2(libatrac3plus + 0x02E4, libatrac3plus_rtoc);
|
||||
#endif
|
||||
|
||||
*piResult = 0;
|
||||
return CELL_OK;
|
||||
@ -317,27 +242,4 @@ Module cellAtrac("cellAtrac", []()
|
||||
cellAtrac.AddFunc(0x7772eb2b, cellAtracResetPlayPosition);
|
||||
|
||||
cellAtrac.AddFunc(0xb5c11938, cellAtracGetInternalErrorInfo);
|
||||
|
||||
#ifdef PRX_DEBUG
|
||||
CallAfter([]()
|
||||
{
|
||||
if (!Memory.MainMem.GetStartAddr()) return;
|
||||
|
||||
libatrac3plus = (u32)Memory.MainMem.AllocAlign(sizeof(libatrac3plus_data), 0x100000);
|
||||
memcpy(vm::get_ptr<void>(libatrac3plus), libatrac3plus_data, sizeof(libatrac3plus_data));
|
||||
libatrac3plus_rtoc = libatrac3plus + 0xBED0;
|
||||
|
||||
extern Module* cellAdec;
|
||||
|
||||
FIX_IMPORT(cellAdec, cellAdecDecodeAu, libatrac3plus + 0x399C);
|
||||
FIX_IMPORT(cellAdec, cellAdecStartSeq, libatrac3plus + 0x39BC);
|
||||
FIX_IMPORT(cellAdec, cellAdecQueryAttr, libatrac3plus + 0x39DC);
|
||||
FIX_IMPORT(cellAdec, cellAdecClose, libatrac3plus + 0x39FC);
|
||||
FIX_IMPORT(cellAdec, cellAdecGetPcm, libatrac3plus + 0x3A1C);
|
||||
FIX_IMPORT(cellAdec, cellAdecOpen, libatrac3plus + 0x3A3C);
|
||||
fix_import(cellAdec, 0xDF982D2C, libatrac3plus + 0x3A5C);
|
||||
|
||||
fix_relocs(cellAtrac, libatrac3plus, 0x3EF0, 0x5048, 0x3CE0);
|
||||
});
|
||||
#endif
|
||||
});
|
||||
|
@ -10,15 +10,7 @@
|
||||
|
||||
extern Module cellPngDec;
|
||||
|
||||
#undef PRX_DEBUG
|
||||
|
||||
#ifdef PRX_DEBUG
|
||||
#include "prx_libpngdec.h"
|
||||
u32 libpngdec;
|
||||
u32 libpngdec_rtoc;
|
||||
#endif
|
||||
|
||||
s64 pngDecCreate(
|
||||
s32 pngDecCreate(
|
||||
vm::ptr<u32> mainHandle,
|
||||
vm::ptr<const CellPngDecThreadInParam> param,
|
||||
vm::ptr<const CellPngDecExtThreadInParam> ext = vm::ptr<const CellPngDecExtThreadInParam>::make(0))
|
||||
@ -47,7 +39,7 @@ s64 pngDecCreate(
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s64 pngDecDestroy(CellPngDecMainHandle dec)
|
||||
s32 pngDecDestroy(CellPngDecMainHandle dec)
|
||||
{
|
||||
if (!Memory.Free(dec.addr()))
|
||||
{
|
||||
@ -57,7 +49,7 @@ s64 pngDecDestroy(CellPngDecMainHandle dec)
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s64 pngDecOpen(
|
||||
s32 pngDecOpen(
|
||||
CellPngDecMainHandle dec,
|
||||
vm::ptr<u32> subHandle,
|
||||
vm::ptr<const CellPngDecSrc> src,
|
||||
@ -117,7 +109,7 @@ s64 pngDecOpen(
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s64 pngDecClose(CellPngDecSubHandle stream)
|
||||
s32 pngDecClose(CellPngDecSubHandle stream)
|
||||
{
|
||||
cellFsClose(stream->fd);
|
||||
if (!Memory.Free(stream.addr()))
|
||||
@ -128,7 +120,7 @@ s64 pngDecClose(CellPngDecSubHandle stream)
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s64 pngReadHeader(
|
||||
s32 pngReadHeader(
|
||||
CellPngDecSubHandle stream,
|
||||
vm::ptr<CellPngDecInfo> info,
|
||||
vm::ptr<CellPngDecExtInfo> extInfo = vm::ptr<CellPngDecExtInfo>::make(0))
|
||||
@ -191,7 +183,7 @@ s64 pngReadHeader(
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s64 pngDecSetParameter(
|
||||
s32 pngDecSetParameter(
|
||||
CellPngDecSubHandle stream,
|
||||
vm::ptr<const CellPngDecInParam> inParam,
|
||||
vm::ptr<CellPngDecOutParam> outParam,
|
||||
@ -236,7 +228,7 @@ s64 pngDecSetParameter(
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s64 pngDecodeData(
|
||||
s32 pngDecodeData(
|
||||
CellPngDecSubHandle stream,
|
||||
vm::ptr<u8> data,
|
||||
vm::ptr<const CellPngDecDataCtrlParam> dataCtrlParam,
|
||||
@ -365,13 +357,8 @@ s64 pngDecodeData(
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s64 cellPngDecCreate(vm::ptr<u32> mainHandle, vm::ptr<const CellPngDecThreadInParam> threadInParam, vm::ptr<CellPngDecThreadOutParam> threadOutParam)
|
||||
s32 cellPngDecCreate(vm::ptr<u32> mainHandle, vm::ptr<const CellPngDecThreadInParam> threadInParam, vm::ptr<CellPngDecThreadOutParam> threadOutParam)
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellPngDec.Warning("%s()", __FUNCTION__);
|
||||
const_cast<CellPngDecThreadInParam&>(*threadInParam).spuThreadEnable = CELL_PNGDEC_SPU_THREAD_DISABLE; // hack
|
||||
return GetCurrentPPUThread().FastCall2(libpngdec + 0x295C, libpngdec_rtoc);
|
||||
#else
|
||||
cellPngDec.Warning("cellPngDecCreate(mainHandle_addr=0x%x, threadInParam_addr=0x%x, threadOutParam_addr=0x%x)",
|
||||
mainHandle.addr(), threadInParam.addr(), threadOutParam.addr());
|
||||
|
||||
@ -382,20 +369,15 @@ s64 cellPngDecCreate(vm::ptr<u32> mainHandle, vm::ptr<const CellPngDecThreadInPa
|
||||
threadOutParam->pngCodecVersion = PNGDEC_CODEC_VERSION;
|
||||
|
||||
return CELL_OK;
|
||||
#endif
|
||||
}
|
||||
|
||||
s64 cellPngDecExtCreate(
|
||||
s32 cellPngDecExtCreate(
|
||||
vm::ptr<u32> mainHandle,
|
||||
vm::ptr<const CellPngDecThreadInParam> threadInParam,
|
||||
vm::ptr<CellPngDecThreadOutParam> threadOutParam,
|
||||
vm::ptr<const CellPngDecExtThreadInParam> extThreadInParam,
|
||||
vm::ptr<CellPngDecExtThreadOutParam> extThreadOutParam)
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellPngDec.Warning("%s()", __FUNCTION__);
|
||||
return GetCurrentPPUThread().FastCall2(libpngdec + 0x296C, libpngdec_rtoc);
|
||||
#else
|
||||
cellPngDec.Warning("cellPngDecCreate(mainHandle_addr=0x%x, threadInParam_addr=0x%x, threadOutParam_addr=0x%x, extThreadInParam_addr=0x%x, extThreadOutParam_addr=0x%x)",
|
||||
mainHandle.addr(), threadInParam.addr(), threadOutParam.addr(), extThreadInParam.addr(), extThreadOutParam.addr());
|
||||
|
||||
@ -408,41 +390,30 @@ s64 cellPngDecExtCreate(
|
||||
extThreadOutParam->reserved = 0;
|
||||
|
||||
return CELL_OK;
|
||||
#endif
|
||||
}
|
||||
|
||||
s64 cellPngDecDestroy(CellPngDecMainHandle mainHandle)
|
||||
s32 cellPngDecDestroy(CellPngDecMainHandle mainHandle)
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellPngDec.Warning("%s()", __FUNCTION__);
|
||||
return GetCurrentPPUThread().FastCall2(libpngdec + 0x1E6C, libpngdec_rtoc);
|
||||
#else
|
||||
cellPngDec.Warning("cellPngDecDestroy(mainHandle=0x%x)", mainHandle.addr());
|
||||
|
||||
// destroy decoder
|
||||
return pngDecDestroy(mainHandle);
|
||||
#endif
|
||||
}
|
||||
|
||||
s64 cellPngDecOpen(
|
||||
s32 cellPngDecOpen(
|
||||
CellPngDecMainHandle mainHandle,
|
||||
vm::ptr<u32> subHandle,
|
||||
vm::ptr<const CellPngDecSrc> src,
|
||||
vm::ptr<CellPngDecOpnInfo> openInfo)
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellPngDec.Warning("%s()", __FUNCTION__);
|
||||
return GetCurrentPPUThread().FastCall2(libpngdec + 0x3F3C, libpngdec_rtoc);
|
||||
#else
|
||||
cellPngDec.Warning("cellPngDecOpen(mainHandle=0x%x, subHandle_addr=0x%x, src_addr=0x%x, openInfo_addr=0x%x)",
|
||||
mainHandle.addr(), subHandle.addr(), src.addr(), openInfo.addr());
|
||||
|
||||
// create stream handle
|
||||
return pngDecOpen(mainHandle, subHandle, src, openInfo);
|
||||
#endif
|
||||
}
|
||||
|
||||
s64 cellPngDecExtOpen(
|
||||
s32 cellPngDecExtOpen(
|
||||
CellPngDecMainHandle mainHandle,
|
||||
vm::ptr<u32> subHandle,
|
||||
vm::ptr<const CellPngDecSrc> src,
|
||||
@ -450,78 +421,53 @@ s64 cellPngDecExtOpen(
|
||||
vm::ptr<const CellPngDecCbCtrlStrm> cbCtrlStrm,
|
||||
vm::ptr<const CellPngDecOpnParam> opnParam)
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellPngDec.Warning("%s()", __FUNCTION__);
|
||||
return GetCurrentPPUThread().FastCall2(libpngdec + 0x3F34, libpngdec_rtoc);
|
||||
#else
|
||||
cellPngDec.Warning("cellPngDecExtOpen(mainHandle=0x%x, subHandle_addr=0x%x, src_addr=0x%x, openInfo_addr=0x%x, cbCtrlStrm_addr=0x%x, opnParam_addr=0x%x)",
|
||||
mainHandle.addr(), subHandle.addr(), src.addr(), openInfo.addr(), cbCtrlStrm.addr(), opnParam.addr());
|
||||
|
||||
// create stream handle
|
||||
return pngDecOpen(mainHandle, subHandle, src, openInfo, cbCtrlStrm, opnParam);
|
||||
#endif
|
||||
}
|
||||
|
||||
s64 cellPngDecClose(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle)
|
||||
s32 cellPngDecClose(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle)
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellPngDec.Warning("%s()", __FUNCTION__);
|
||||
return GetCurrentPPUThread().FastCall2(libpngdec + 0x066C, libpngdec_rtoc);
|
||||
#else
|
||||
cellPngDec.Warning("cellPngDecClose(mainHandle=0x%x, subHandle=0x%x)", mainHandle.addr(), subHandle.addr());
|
||||
|
||||
return pngDecClose(subHandle);
|
||||
#endif
|
||||
}
|
||||
|
||||
s64 cellPngDecReadHeader(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngDecInfo> info)
|
||||
s32 cellPngDecReadHeader(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngDecInfo> info)
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellPngDec.Warning("%s()", __FUNCTION__);
|
||||
return GetCurrentPPUThread().FastCall2(libpngdec + 0x3A3C, libpngdec_rtoc);
|
||||
#else
|
||||
cellPngDec.Warning("cellPngDecReadHeader(mainHandle=0x%x, subHandle=0x%x, info_addr=0x%x)",
|
||||
mainHandle.addr(), subHandle.addr(), info.addr());
|
||||
|
||||
return pngReadHeader(subHandle, info);
|
||||
#endif
|
||||
}
|
||||
|
||||
s64 cellPngDecExtReadHeader(
|
||||
s32 cellPngDecExtReadHeader(
|
||||
CellPngDecMainHandle mainHandle,
|
||||
CellPngDecSubHandle subHandle,
|
||||
vm::ptr<CellPngDecInfo> info,
|
||||
vm::ptr<CellPngDecExtInfo> extInfo)
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellPngDec.Warning("%s()", __FUNCTION__);
|
||||
return GetCurrentPPUThread().FastCall2(libpngdec + 0x3A34, libpngdec_rtoc);
|
||||
#else
|
||||
cellPngDec.Warning("cellPngDecExtReadHeader(mainHandle=0x%x, subHandle=0x%x, info_addr=0x%x, extInfo_addr=0x%x)",
|
||||
mainHandle.addr(), subHandle.addr(), info.addr(), extInfo.addr());
|
||||
|
||||
return pngReadHeader(subHandle, info, extInfo);
|
||||
#endif
|
||||
}
|
||||
|
||||
s64 cellPngDecSetParameter(
|
||||
s32 cellPngDecSetParameter(
|
||||
CellPngDecMainHandle mainHandle,
|
||||
CellPngDecSubHandle subHandle,
|
||||
vm::ptr<const CellPngDecInParam> inParam,
|
||||
vm::ptr<CellPngDecOutParam> outParam)
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellPngDec.Warning("%s()", __FUNCTION__);
|
||||
return GetCurrentPPUThread().FastCall2(libpngdec + 0x33F4, libpngdec_rtoc);
|
||||
#else
|
||||
cellPngDec.Warning("cellPngDecSetParameter(mainHandle=0x%x, subHandle=0x%x, inParam_addr=0x%x, outParam_addr=0x%x)",
|
||||
mainHandle.addr(), subHandle.addr(), inParam.addr(), outParam.addr());
|
||||
|
||||
return pngDecSetParameter(subHandle, inParam, outParam);
|
||||
#endif
|
||||
}
|
||||
|
||||
s64 cellPngDecExtSetParameter(
|
||||
s32 cellPngDecExtSetParameter(
|
||||
CellPngDecMainHandle mainHandle,
|
||||
CellPngDecSubHandle subHandle,
|
||||
vm::ptr<const CellPngDecInParam> inParam,
|
||||
@ -529,36 +475,26 @@ s64 cellPngDecExtSetParameter(
|
||||
vm::ptr<const CellPngDecExtInParam> extInParam,
|
||||
vm::ptr<CellPngDecExtOutParam> extOutParam)
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellPngDec.Warning("%s()", __FUNCTION__);
|
||||
return GetCurrentPPUThread().FastCall2(libpngdec + 0x33EC, libpngdec_rtoc);
|
||||
#else
|
||||
cellPngDec.Warning("cellPngDecExtSetParameter(mainHandle=0x%x, subHandle=0x%x, inParam_addr=0x%x, outParam_addr=0x%x, extInParam=0x%x, extOutParam=0x%x",
|
||||
mainHandle.addr(), subHandle.addr(), inParam.addr(), outParam.addr(), extInParam.addr(), extOutParam.addr());
|
||||
|
||||
return pngDecSetParameter(subHandle, inParam, outParam, extInParam, extOutParam);
|
||||
#endif
|
||||
}
|
||||
|
||||
s64 cellPngDecDecodeData(
|
||||
s32 cellPngDecDecodeData(
|
||||
CellPngDecMainHandle mainHandle,
|
||||
CellPngDecSubHandle subHandle,
|
||||
vm::ptr<u8> data,
|
||||
vm::ptr<const CellPngDecDataCtrlParam> dataCtrlParam,
|
||||
vm::ptr<CellPngDecDataOutInfo> dataOutInfo)
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellPngDec.Warning("%s()", __FUNCTION__);
|
||||
return GetCurrentPPUThread().FastCall2(libpngdec + 0x5D40, libpngdec_rtoc);
|
||||
#else
|
||||
cellPngDec.Warning("cellPngDecDecodeData(mainHandle=0x%x, subHandle=0x%x, data_addr=0x%x, dataCtrlParam_addr=0x%x, dataOutInfo_addr=0x%x)",
|
||||
mainHandle.addr(), subHandle.addr(), data.addr(), dataCtrlParam.addr(), dataOutInfo.addr());
|
||||
|
||||
return pngDecodeData(subHandle, data, dataCtrlParam, dataOutInfo);
|
||||
#endif
|
||||
}
|
||||
|
||||
s64 cellPngDecExtDecodeData(
|
||||
s32 cellPngDecExtDecodeData(
|
||||
CellPngDecMainHandle mainHandle,
|
||||
CellPngDecSubHandle subHandle,
|
||||
vm::ptr<u8> data,
|
||||
@ -567,210 +503,120 @@ s64 cellPngDecExtDecodeData(
|
||||
vm::ptr<const CellPngDecCbCtrlDisp> cbCtrlDisp,
|
||||
vm::ptr<CellPngDecDispParam> dispParam)
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellPngDec.Warning("%s()", __FUNCTION__);
|
||||
return GetCurrentPPUThread().FastCall2(libpngdec + 0x5D38, libpngdec_rtoc);
|
||||
#else
|
||||
cellPngDec.Warning("cellPngDecExtDecodeData(mainHandle=0x%x, subHandle=0x%x, data_addr=0x%x, dataCtrlParam_addr=0x%x, dataOutInfo_addr=0x%x, cbCtrlDisp_addr=0x%x, dispParam_addr=0x%x)",
|
||||
mainHandle.addr(), subHandle.addr(), data.addr(), dataCtrlParam.addr(), dataOutInfo.addr(), cbCtrlDisp.addr(), dispParam.addr());
|
||||
|
||||
return pngDecodeData(subHandle, data, dataCtrlParam, dataOutInfo, cbCtrlDisp, dispParam);
|
||||
#endif
|
||||
}
|
||||
|
||||
s64 cellPngDecGetUnknownChunks(
|
||||
s32 cellPngDecGetUnknownChunks(
|
||||
CellPngDecMainHandle mainHandle,
|
||||
CellPngDecSubHandle subHandle,
|
||||
vm::ptr<vm::bptr<CellPngUnknownChunk>> unknownChunk,
|
||||
vm::ptr<u32> unknownChunkNumber)
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellPngDec.Warning("%s()", __FUNCTION__);
|
||||
return GetCurrentPPUThread().FastCall2(libpngdec + 0x03EC, libpngdec_rtoc);
|
||||
#else
|
||||
UNIMPLEMENTED_FUNC(cellPngDec);
|
||||
return CELL_OK;
|
||||
#endif
|
||||
}
|
||||
|
||||
s64 cellPngDecGetpCAL(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngPCAL> pcal)
|
||||
s32 cellPngDecGetpCAL(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngPCAL> pcal)
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellPngDec.Warning("%s()", __FUNCTION__);
|
||||
return GetCurrentPPUThread().FastCall2(libpngdec + 0x0730, libpngdec_rtoc);
|
||||
#else
|
||||
UNIMPLEMENTED_FUNC(cellPngDec);
|
||||
return CELL_OK;
|
||||
#endif
|
||||
}
|
||||
|
||||
s64 cellPngDecGetcHRM(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngCHRM> chrm)
|
||||
s32 cellPngDecGetcHRM(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngCHRM> chrm)
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellPngDec.Warning("%s()", __FUNCTION__);
|
||||
return GetCurrentPPUThread().FastCall2(libpngdec + 0x0894, libpngdec_rtoc);
|
||||
#else
|
||||
UNIMPLEMENTED_FUNC(cellPngDec);
|
||||
return CELL_OK;
|
||||
#endif
|
||||
}
|
||||
|
||||
s64 cellPngDecGetsCAL(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngSCAL> scal)
|
||||
s32 cellPngDecGetsCAL(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngSCAL> scal)
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellPngDec.Warning("%s()", __FUNCTION__);
|
||||
return GetCurrentPPUThread().FastCall2(libpngdec + 0x09EC, libpngdec_rtoc);
|
||||
#else
|
||||
UNIMPLEMENTED_FUNC(cellPngDec);
|
||||
return CELL_OK;
|
||||
#endif
|
||||
}
|
||||
|
||||
s64 cellPngDecGetpHYs(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngPHYS> phys)
|
||||
s32 cellPngDecGetpHYs(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngPHYS> phys)
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellPngDec.Warning("%s()", __FUNCTION__);
|
||||
return GetCurrentPPUThread().FastCall2(libpngdec + 0x0B14, libpngdec_rtoc);
|
||||
#else
|
||||
UNIMPLEMENTED_FUNC(cellPngDec);
|
||||
return CELL_OK;
|
||||
#endif
|
||||
}
|
||||
|
||||
s64 cellPngDecGetoFFs(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngOFFS> offs)
|
||||
s32 cellPngDecGetoFFs(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngOFFS> offs)
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellPngDec.Warning("%s()", __FUNCTION__);
|
||||
return GetCurrentPPUThread().FastCall2(libpngdec + 0x0C58, libpngdec_rtoc);
|
||||
#else
|
||||
UNIMPLEMENTED_FUNC(cellPngDec);
|
||||
return CELL_OK;
|
||||
#endif
|
||||
}
|
||||
|
||||
s64 cellPngDecGetsPLT(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngSPLT> splt)
|
||||
s32 cellPngDecGetsPLT(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngSPLT> splt)
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellPngDec.Warning("%s()", __FUNCTION__);
|
||||
return GetCurrentPPUThread().FastCall2(libpngdec + 0x0D9C, libpngdec_rtoc);
|
||||
#else
|
||||
UNIMPLEMENTED_FUNC(cellPngDec);
|
||||
return CELL_OK;
|
||||
#endif
|
||||
}
|
||||
|
||||
s64 cellPngDecGetbKGD(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngBKGD> bkgd)
|
||||
s32 cellPngDecGetbKGD(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngBKGD> bkgd)
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellPngDec.Warning("%s()", __FUNCTION__);
|
||||
return GetCurrentPPUThread().FastCall2(libpngdec + 0x0ED0, libpngdec_rtoc);
|
||||
#else
|
||||
UNIMPLEMENTED_FUNC(cellPngDec);
|
||||
return CELL_OK;
|
||||
#endif
|
||||
}
|
||||
|
||||
s64 cellPngDecGettIME(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngTIME> time)
|
||||
s32 cellPngDecGettIME(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngTIME> time)
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellPngDec.Warning("%s()", __FUNCTION__);
|
||||
return GetCurrentPPUThread().FastCall2(libpngdec + 0x1024, libpngdec_rtoc);
|
||||
#else
|
||||
UNIMPLEMENTED_FUNC(cellPngDec);
|
||||
return CELL_OK;
|
||||
#endif
|
||||
}
|
||||
|
||||
s64 cellPngDecGethIST(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngHIST> hist)
|
||||
s32 cellPngDecGethIST(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngHIST> hist)
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellPngDec.Warning("%s()", __FUNCTION__);
|
||||
return GetCurrentPPUThread().FastCall2(libpngdec + 0x116C, libpngdec_rtoc);
|
||||
#else
|
||||
UNIMPLEMENTED_FUNC(cellPngDec);
|
||||
return CELL_OK;
|
||||
#endif
|
||||
}
|
||||
|
||||
s64 cellPngDecGettRNS(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngTRNS> trns)
|
||||
s32 cellPngDecGettRNS(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngTRNS> trns)
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellPngDec.Warning("%s()", __FUNCTION__);
|
||||
return GetCurrentPPUThread().FastCall2(libpngdec + 0x12A4, libpngdec_rtoc);
|
||||
#else
|
||||
UNIMPLEMENTED_FUNC(cellPngDec);
|
||||
return CELL_OK;
|
||||
#endif
|
||||
}
|
||||
|
||||
s64 cellPngDecGetsBIT(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngSBIT> sbit)
|
||||
s32 cellPngDecGetsBIT(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngSBIT> sbit)
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellPngDec.Warning("%s()", __FUNCTION__);
|
||||
return GetCurrentPPUThread().FastCall2(libpngdec + 0x1420, libpngdec_rtoc);
|
||||
#else
|
||||
UNIMPLEMENTED_FUNC(cellPngDec);
|
||||
return CELL_OK;
|
||||
#endif
|
||||
}
|
||||
|
||||
s64 cellPngDecGetiCCP(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngICCP> iccp)
|
||||
s32 cellPngDecGetiCCP(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngICCP> iccp)
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellPngDec.Warning("%s()", __FUNCTION__);
|
||||
return GetCurrentPPUThread().FastCall2(libpngdec + 0x1574, libpngdec_rtoc);
|
||||
#else
|
||||
UNIMPLEMENTED_FUNC(cellPngDec);
|
||||
return CELL_OK;
|
||||
#endif
|
||||
}
|
||||
|
||||
s64 cellPngDecGetsRGB(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngSRGB> srgb)
|
||||
s32 cellPngDecGetsRGB(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngSRGB> srgb)
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellPngDec.Warning("%s()", __FUNCTION__);
|
||||
return GetCurrentPPUThread().FastCall2(libpngdec + 0x16B4, libpngdec_rtoc);
|
||||
#else
|
||||
UNIMPLEMENTED_FUNC(cellPngDec);
|
||||
return CELL_OK;
|
||||
#endif
|
||||
}
|
||||
|
||||
s64 cellPngDecGetgAMA(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngGAMA> gama)
|
||||
s32 cellPngDecGetgAMA(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngGAMA> gama)
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellPngDec.Warning("%s()", __FUNCTION__);
|
||||
return GetCurrentPPUThread().FastCall2(libpngdec + 0x17CC, libpngdec_rtoc);
|
||||
#else
|
||||
UNIMPLEMENTED_FUNC(cellPngDec);
|
||||
return CELL_OK;
|
||||
#endif
|
||||
}
|
||||
|
||||
s64 cellPngDecGetPLTE(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngPLTE> plte)
|
||||
s32 cellPngDecGetPLTE(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngPLTE> plte)
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellPngDec.Warning("%s()", __FUNCTION__);
|
||||
return GetCurrentPPUThread().FastCall2(libpngdec + 0x18E4, libpngdec_rtoc);
|
||||
#else
|
||||
UNIMPLEMENTED_FUNC(cellPngDec);
|
||||
return CELL_OK;
|
||||
#endif
|
||||
}
|
||||
|
||||
s64 cellPngDecGetTextChunk(
|
||||
s32 cellPngDecGetTextChunk(
|
||||
CellPngDecMainHandle mainHandle,
|
||||
CellPngDecSubHandle subHandle,
|
||||
vm::ptr<u32> textInfoNum,
|
||||
vm::ptr<vm::bptr<CellPngTextInfo>> textInfo)
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellPngDec.Warning("%s()", __FUNCTION__);
|
||||
return GetCurrentPPUThread().FastCall2(libpngdec + 0x19FC, libpngdec_rtoc);
|
||||
#else
|
||||
UNIMPLEMENTED_FUNC(cellPngDec);
|
||||
return CELL_OK;
|
||||
#endif
|
||||
}
|
||||
|
||||
Module cellPngDec("cellPngDec", []()
|
||||
@ -804,51 +650,4 @@ Module cellPngDec("cellPngDec", []()
|
||||
REG_FUNC(cellPngDec, cellPngDecOpen);
|
||||
REG_FUNC(cellPngDec, cellPngDecExtDecodeData);
|
||||
REG_FUNC(cellPngDec, cellPngDecDecodeData);
|
||||
|
||||
#ifdef PRX_DEBUG
|
||||
CallAfter([]()
|
||||
{
|
||||
if (!Memory.MainMem.GetStartAddr()) return;
|
||||
|
||||
libpngdec = (u32)Memory.MainMem.AllocAlign(sizeof(libpngdec_data), 0x100000);
|
||||
memcpy(vm::get_ptr<void>(libpngdec), libpngdec_data, sizeof(libpngdec_data));
|
||||
libpngdec_rtoc = libpngdec + 0x49710;
|
||||
|
||||
extern Module* sysPrxForUser;
|
||||
extern Module* cellSpurs;
|
||||
extern Module* sys_fs;
|
||||
|
||||
FIX_IMPORT(sysPrxForUser, _sys_snprintf , libpngdec + 0x1E6D0);
|
||||
FIX_IMPORT(sysPrxForUser, _sys_strlen , libpngdec + 0x1E6F0);
|
||||
fix_import(sysPrxForUser, 0x3EF17F8C , libpngdec + 0x1E710);
|
||||
FIX_IMPORT(sysPrxForUser, _sys_memset , libpngdec + 0x1E730);
|
||||
FIX_IMPORT(sysPrxForUser, _sys_memcpy , libpngdec + 0x1E750);
|
||||
FIX_IMPORT(sysPrxForUser, _sys_strcpy , libpngdec + 0x1E770);
|
||||
FIX_IMPORT(sysPrxForUser, _sys_strncpy , libpngdec + 0x1E790);
|
||||
FIX_IMPORT(sysPrxForUser, _sys_memcmp , libpngdec + 0x1E7B0);
|
||||
FIX_IMPORT(cellSpurs, cellSpursQueueDetachLv2EventQueue , libpngdec + 0x1E7D0);
|
||||
FIX_IMPORT(cellSpurs, cellSpursAttributeSetNamePrefix , libpngdec + 0x1E7F0);
|
||||
FIX_IMPORT(cellSpurs, _cellSpursQueueInitialize , libpngdec + 0x1E810);
|
||||
FIX_IMPORT(cellSpurs, _cellSpursTasksetAttributeInitialize, libpngdec + 0x1E830);
|
||||
FIX_IMPORT(cellSpurs, cellSpursTasksetAttributeSetName , libpngdec + 0x1E850);
|
||||
FIX_IMPORT(cellSpurs, cellSpursTaskGetReadOnlyAreaPattern , libpngdec + 0x1E870);
|
||||
FIX_IMPORT(cellSpurs, cellSpursTaskGetContextSaveAreaSize , libpngdec + 0x1E890);
|
||||
FIX_IMPORT(cellSpurs, cellSpursQueuePopBody , libpngdec + 0x1E8B0);
|
||||
FIX_IMPORT(cellSpurs, cellSpursQueuePushBody , libpngdec + 0x1E8D0);
|
||||
FIX_IMPORT(cellSpurs, _cellSpursAttributeInitialize , libpngdec + 0x1E8F0);
|
||||
FIX_IMPORT(cellSpurs, cellSpursJoinTaskset , libpngdec + 0x1E910);
|
||||
FIX_IMPORT(cellSpurs, cellSpursShutdownTaskset , libpngdec + 0x1E930);
|
||||
FIX_IMPORT(cellSpurs, cellSpursInitializeWithAttribute , libpngdec + 0x1E950);
|
||||
FIX_IMPORT(cellSpurs, cellSpursCreateTask , libpngdec + 0x1E970);
|
||||
FIX_IMPORT(cellSpurs, cellSpursCreateTasksetWithAttribute , libpngdec + 0x1E990);
|
||||
FIX_IMPORT(cellSpurs, cellSpursFinalize , libpngdec + 0x1E9B0);
|
||||
FIX_IMPORT(cellSpurs, cellSpursQueueAttachLv2EventQueue , libpngdec + 0x1E9D0);
|
||||
FIX_IMPORT(sys_fs, cellFsClose , libpngdec + 0x1E9F0);
|
||||
FIX_IMPORT(sys_fs, cellFsRead , libpngdec + 0x1EA10);
|
||||
FIX_IMPORT(sys_fs, cellFsOpen , libpngdec + 0x1EA30);
|
||||
FIX_IMPORT(sys_fs, cellFsLseek , libpngdec + 0x1EA50);
|
||||
|
||||
fix_relocs(cellPngDec, libpngdec, 0x41C30, 0x47AB0, 0x40A00);
|
||||
});
|
||||
#endif
|
||||
});
|
||||
|
@ -183,77 +183,77 @@ struct CellPngDecDataOutInfo
|
||||
};
|
||||
|
||||
// Functions
|
||||
s64 cellPngDecCreate(vm::ptr<u32> mainHandle, vm::ptr<const CellPngDecThreadInParam> threadInParam, vm::ptr<CellPngDecThreadOutParam> threadOutParam);
|
||||
s32 cellPngDecCreate(vm::ptr<u32> mainHandle, vm::ptr<const CellPngDecThreadInParam> threadInParam, vm::ptr<CellPngDecThreadOutParam> threadOutParam);
|
||||
|
||||
s64 cellPngDecExtCreate(
|
||||
s32 cellPngDecExtCreate(
|
||||
vm::ptr<u32> mainHandle,
|
||||
vm::ptr<const CellPngDecThreadInParam> threadInParam,
|
||||
vm::ptr<CellPngDecThreadOutParam> threadOutParam,
|
||||
vm::ptr<const CellPngDecExtThreadInParam> extThreadInParam,
|
||||
vm::ptr<CellPngDecExtThreadOutParam> extThreadOutParam);
|
||||
|
||||
s64 cellPngDecOpen(
|
||||
s32 cellPngDecOpen(
|
||||
CellPngDecMainHandle mainHandle,
|
||||
vm::ptr<u32> subHandle,
|
||||
vm::ptr<const CellPngDecSrc> src,
|
||||
vm::ptr<CellPngDecOpnInfo> openInfo);
|
||||
|
||||
s64 cellPngDecReadHeader(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngDecInfo> info);
|
||||
s32 cellPngDecReadHeader(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngDecInfo> info);
|
||||
|
||||
s64 cellPngDecSetParameter(
|
||||
s32 cellPngDecSetParameter(
|
||||
CellPngDecMainHandle mainHandle,
|
||||
CellPngDecSubHandle subHandle,
|
||||
vm::ptr<const CellPngDecInParam> inParam,
|
||||
vm::ptr<CellPngDecOutParam> outParam);
|
||||
|
||||
s64 cellPngDecDecodeData(
|
||||
s32 cellPngDecDecodeData(
|
||||
CellPngDecMainHandle mainHandle,
|
||||
CellPngDecSubHandle subHandle,
|
||||
vm::ptr<u8> data,
|
||||
vm::ptr<const CellPngDecDataCtrlParam> dataCtrlParam,
|
||||
vm::ptr<CellPngDecDataOutInfo> dataOutInfo);
|
||||
|
||||
s64 cellPngDecClose(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle);
|
||||
s32 cellPngDecClose(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle);
|
||||
|
||||
s64 cellPngDecDestroy(CellPngDecMainHandle mainHandle);
|
||||
s32 cellPngDecDestroy(CellPngDecMainHandle mainHandle);
|
||||
|
||||
s64 cellPngDecGetTextChunk(
|
||||
s32 cellPngDecGetTextChunk(
|
||||
CellPngDecMainHandle mainHandle,
|
||||
CellPngDecSubHandle subHandle,
|
||||
vm::ptr<u32> textInfoNum,
|
||||
vm::ptr<vm::bptr<CellPngTextInfo>> textInfo);
|
||||
|
||||
s64 cellPngDecGetPLTE(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngPLTE> plte);
|
||||
s32 cellPngDecGetPLTE(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngPLTE> plte);
|
||||
|
||||
s64 cellPngDecGetgAMA(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngGAMA> gama);
|
||||
s32 cellPngDecGetgAMA(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngGAMA> gama);
|
||||
|
||||
s64 cellPngDecGetsRGB(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngSRGB> srgb);
|
||||
s32 cellPngDecGetsRGB(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngSRGB> srgb);
|
||||
|
||||
s64 cellPngDecGetiCCP(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngICCP> iccp);
|
||||
s32 cellPngDecGetiCCP(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngICCP> iccp);
|
||||
|
||||
s64 cellPngDecGetsBIT(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngSBIT> sbit);
|
||||
s32 cellPngDecGetsBIT(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngSBIT> sbit);
|
||||
|
||||
s64 cellPngDecGettRNS(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngTRNS> trns);
|
||||
s32 cellPngDecGettRNS(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngTRNS> trns);
|
||||
|
||||
s64 cellPngDecGethIST(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngHIST> hist);
|
||||
s32 cellPngDecGethIST(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngHIST> hist);
|
||||
|
||||
s64 cellPngDecGettIME(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngTIME> time);
|
||||
s32 cellPngDecGettIME(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngTIME> time);
|
||||
|
||||
s64 cellPngDecGetbKGD(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngBKGD> bkgd);
|
||||
s32 cellPngDecGetbKGD(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngBKGD> bkgd);
|
||||
|
||||
s64 cellPngDecGetsPLT(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngSPLT> splt);
|
||||
s32 cellPngDecGetsPLT(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngSPLT> splt);
|
||||
|
||||
s64 cellPngDecGetoFFs(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngOFFS> offs);
|
||||
s32 cellPngDecGetoFFs(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngOFFS> offs);
|
||||
|
||||
s64 cellPngDecGetpHYs(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngPHYS> phys);
|
||||
s32 cellPngDecGetpHYs(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngPHYS> phys);
|
||||
|
||||
s64 cellPngDecGetsCAL(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngSCAL> scal);
|
||||
s32 cellPngDecGetsCAL(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngSCAL> scal);
|
||||
|
||||
s64 cellPngDecGetcHRM(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngCHRM> chrm);
|
||||
s32 cellPngDecGetcHRM(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngCHRM> chrm);
|
||||
|
||||
s64 cellPngDecGetpCAL(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngPCAL> pcal);
|
||||
s32 cellPngDecGetpCAL(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHandle, vm::ptr<CellPngPCAL> pcal);
|
||||
|
||||
s64 cellPngDecGetUnknownChunks(
|
||||
s32 cellPngDecGetUnknownChunks(
|
||||
CellPngDecMainHandle mainHandle,
|
||||
CellPngDecSubHandle subHandle,
|
||||
vm::ptr<vm::bptr<CellPngUnknownChunk>> unknownChunk,
|
||||
@ -345,7 +345,7 @@ struct CellPngDecCbCtrlDisp
|
||||
};
|
||||
|
||||
// Functions
|
||||
s64 cellPngDecExtOpen(
|
||||
s32 cellPngDecExtOpen(
|
||||
CellPngDecMainHandle mainHandle,
|
||||
vm::ptr<u32> subHandle,
|
||||
vm::ptr<const CellPngDecSrc> src,
|
||||
@ -353,13 +353,13 @@ s64 cellPngDecExtOpen(
|
||||
vm::ptr<const CellPngDecCbCtrlStrm> cbCtrlStrm,
|
||||
vm::ptr<const CellPngDecOpnParam> opnParam);
|
||||
|
||||
s64 cellPngDecExtReadHeader(
|
||||
s32 cellPngDecExtReadHeader(
|
||||
CellPngDecMainHandle mainHandle,
|
||||
CellPngDecSubHandle subHandle,
|
||||
vm::ptr<CellPngDecInfo> info,
|
||||
vm::ptr<CellPngDecExtInfo> extInfo);
|
||||
|
||||
s64 cellPngDecExtSetParameter(
|
||||
s32 cellPngDecExtSetParameter(
|
||||
CellPngDecMainHandle mainHandle,
|
||||
CellPngDecSubHandle subHandle,
|
||||
vm::ptr<const CellPngDecInParam> inParam,
|
||||
@ -367,7 +367,7 @@ s64 cellPngDecExtSetParameter(
|
||||
vm::ptr<const CellPngDecExtInParam> extInParam,
|
||||
vm::ptr<CellPngDecExtOutParam> extOutParam);
|
||||
|
||||
s64 cellPngDecExtDecodeData(
|
||||
s32 cellPngDecExtDecodeData(
|
||||
CellPngDecMainHandle mainHandle,
|
||||
CellPngDecSubHandle subHandle,
|
||||
vm::ptr<u8> data,
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -957,5 +957,5 @@ struct SpursTasksetContext
|
||||
|
||||
static_assert(sizeof(SpursTasksetContext) == 0x900, "Incorrect size for SpursTasksetContext");
|
||||
|
||||
s64 spursAttachLv2EventQueue(vm::ptr<CellSpurs> spurs, u32 queue, vm::ptr<u8> port, s32 isDynamic, bool wasCreated);
|
||||
s64 spursWakeUp(PPUThread& CPU, vm::ptr<CellSpurs> spurs);
|
||||
s32 spursAttachLv2EventQueue(vm::ptr<CellSpurs> spurs, u32 queue, vm::ptr<u8> port, s32 isDynamic, bool wasCreated);
|
||||
s32 spursWakeUp(PPUThread& CPU, vm::ptr<CellSpurs> spurs);
|
||||
|
@ -13,692 +13,376 @@
|
||||
|
||||
extern Module cellSpursJq;
|
||||
|
||||
#ifdef PRX_DEBUG
|
||||
#include "prx_libspurs_jq.h"
|
||||
u32 libspurs_jq;
|
||||
u32 libspurs_jq_rtoc;
|
||||
#endif
|
||||
|
||||
s64 cellSpursJobQueueAttributeInitialize()
|
||||
s32 cellSpursJobQueueAttributeInitialize()
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellSpursJq.Warning("%s()", __FUNCTION__);
|
||||
return GetCurrentPPUThread().FastCall2(libspurs_jq + 0x000010, libspurs_jq_rtoc);
|
||||
#else
|
||||
UNIMPLEMENTED_FUNC(cellSpursJq);
|
||||
return CELL_OK;
|
||||
#endif
|
||||
}
|
||||
|
||||
s64 cellSpursJobQueueAttributeSetMaxGrab()
|
||||
s32 cellSpursJobQueueAttributeSetMaxGrab()
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellSpursJq.Warning("%s()", __FUNCTION__);
|
||||
return GetCurrentPPUThread().FastCall2(libspurs_jq + 0x000058, libspurs_jq_rtoc);
|
||||
#else
|
||||
UNIMPLEMENTED_FUNC(cellSpursJq);
|
||||
return CELL_OK;
|
||||
#endif
|
||||
}
|
||||
|
||||
s64 cellSpursJobQueueAttributeSetSubmitWithEntryLock()
|
||||
s32 cellSpursJobQueueAttributeSetSubmitWithEntryLock()
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellSpursJq.Warning("%s()", __FUNCTION__);
|
||||
return GetCurrentPPUThread().FastCall2(libspurs_jq + 0x000098, libspurs_jq_rtoc);
|
||||
#else
|
||||
UNIMPLEMENTED_FUNC(cellSpursJq);
|
||||
return CELL_OK;
|
||||
#endif
|
||||
}
|
||||
|
||||
s64 cellSpursJobQueueAttributeSetDoBusyWaiting()
|
||||
s32 cellSpursJobQueueAttributeSetDoBusyWaiting()
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellSpursJq.Warning("%s()", __FUNCTION__);
|
||||
return GetCurrentPPUThread().FastCall2(libspurs_jq + 0x0000BC, libspurs_jq_rtoc);
|
||||
#else
|
||||
UNIMPLEMENTED_FUNC(cellSpursJq);
|
||||
return CELL_OK;
|
||||
#endif
|
||||
}
|
||||
|
||||
s64 cellSpursJobQueueAttributeSetIsHaltOnError()
|
||||
s32 cellSpursJobQueueAttributeSetIsHaltOnError()
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellSpursJq.Warning("%s()", __FUNCTION__);
|
||||
return GetCurrentPPUThread().FastCall2(libspurs_jq + 0x0000E0, libspurs_jq_rtoc);
|
||||
#else
|
||||
UNIMPLEMENTED_FUNC(cellSpursJq);
|
||||
return CELL_OK;
|
||||
#endif
|
||||
}
|
||||
|
||||
s64 cellSpursJobQueueAttributeSetIsJobTypeMemoryCheck()
|
||||
s32 cellSpursJobQueueAttributeSetIsJobTypeMemoryCheck()
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellSpursJq.Warning("%s()", __FUNCTION__);
|
||||
return GetCurrentPPUThread().FastCall2(libspurs_jq + 0x000104, libspurs_jq_rtoc);
|
||||
#else
|
||||
UNIMPLEMENTED_FUNC(cellSpursJq);
|
||||
return CELL_OK;
|
||||
#endif
|
||||
}
|
||||
|
||||
s64 cellSpursJobQueueAttributeSetMaxSizeJobDescriptor()
|
||||
s32 cellSpursJobQueueAttributeSetMaxSizeJobDescriptor()
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellSpursJq.Warning("%s()", __FUNCTION__);
|
||||
return GetCurrentPPUThread().FastCall2(libspurs_jq + 0x000128, libspurs_jq_rtoc);
|
||||
#else
|
||||
UNIMPLEMENTED_FUNC(cellSpursJq);
|
||||
return CELL_OK;
|
||||
#endif
|
||||
}
|
||||
|
||||
s64 cellSpursJobQueueAttributeSetGrabParameters()
|
||||
s32 cellSpursJobQueueAttributeSetGrabParameters()
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellSpursJq.Warning("%s()", __FUNCTION__);
|
||||
return GetCurrentPPUThread().FastCall2(libspurs_jq + 0x000178, libspurs_jq_rtoc);
|
||||
#else
|
||||
UNIMPLEMENTED_FUNC(cellSpursJq);
|
||||
return CELL_OK;
|
||||
#endif
|
||||
}
|
||||
|
||||
s64 cellSpursJobQueueSetWaitingMode()
|
||||
s32 cellSpursJobQueueSetWaitingMode()
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellSpursJq.Warning("%s()", __FUNCTION__);
|
||||
return GetCurrentPPUThread().FastCall2(libspurs_jq + 0x0001C8, libspurs_jq_rtoc);
|
||||
#else
|
||||
UNIMPLEMENTED_FUNC(cellSpursJq);
|
||||
return CELL_OK;
|
||||
#endif
|
||||
}
|
||||
|
||||
s64 cellSpursShutdownJobQueue()
|
||||
s32 cellSpursShutdownJobQueue()
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellSpursJq.Warning("%s()", __FUNCTION__);
|
||||
return GetCurrentPPUThread().FastCall2(libspurs_jq + 0x0002F0, libspurs_jq_rtoc);
|
||||
#else
|
||||
UNIMPLEMENTED_FUNC(cellSpursJq);
|
||||
return CELL_OK;
|
||||
#endif
|
||||
}
|
||||
|
||||
s64 _cellSpursCreateJobQueueWithJobDescriptorPool()
|
||||
s32 _cellSpursCreateJobQueueWithJobDescriptorPool()
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellSpursJq.Warning("%s()", __FUNCTION__);
|
||||
return GetCurrentPPUThread().FastCall2(libspurs_jq + 0x0003CC, libspurs_jq_rtoc);
|
||||
#else
|
||||
UNIMPLEMENTED_FUNC(cellSpursJq);
|
||||
return CELL_OK;
|
||||
#endif
|
||||
}
|
||||
|
||||
s64 _cellSpursCreateJobQueue()
|
||||
s32 _cellSpursCreateJobQueue()
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellSpursJq.Warning("%s()", __FUNCTION__);
|
||||
return GetCurrentPPUThread().FastCall2(libspurs_jq + 0x000CA8, libspurs_jq_rtoc);
|
||||
#else
|
||||
UNIMPLEMENTED_FUNC(cellSpursJq);
|
||||
return CELL_OK;
|
||||
#endif
|
||||
}
|
||||
|
||||
s64 cellSpursJoinJobQueue()
|
||||
s32 cellSpursJoinJobQueue()
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellSpursJq.Warning("%s()", __FUNCTION__);
|
||||
return GetCurrentPPUThread().FastCall2(libspurs_jq + 0x000CF0, libspurs_jq_rtoc);
|
||||
#else
|
||||
UNIMPLEMENTED_FUNC(cellSpursJq);
|
||||
return CELL_OK;
|
||||
#endif
|
||||
}
|
||||
|
||||
s64 _cellSpursJobQueuePushJobListBody()
|
||||
s32 _cellSpursJobQueuePushJobListBody()
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellSpursJq.Warning("%s()", __FUNCTION__);
|
||||
return GetCurrentPPUThread().FastCall2(libspurs_jq + 0x001B24, libspurs_jq_rtoc);
|
||||
#else
|
||||
UNIMPLEMENTED_FUNC(cellSpursJq);
|
||||
return CELL_OK;
|
||||
#endif
|
||||
}
|
||||
|
||||
s64 _cellSpursJobQueuePushJobBody2()
|
||||
s32 _cellSpursJobQueuePushJobBody2()
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellSpursJq.Warning("%s()", __FUNCTION__);
|
||||
return GetCurrentPPUThread().FastCall2(libspurs_jq + 0x001BF0, libspurs_jq_rtoc);
|
||||
#else
|
||||
UNIMPLEMENTED_FUNC(cellSpursJq);
|
||||
return CELL_OK;
|
||||
#endif
|
||||
}
|
||||
|
||||
s64 _cellSpursJobQueuePushJob2Body()
|
||||
s32 _cellSpursJobQueuePushJob2Body()
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellSpursJq.Warning("%s()", __FUNCTION__);
|
||||
return GetCurrentPPUThread().FastCall2(libspurs_jq + 0x001CD0, libspurs_jq_rtoc);
|
||||
#else
|
||||
UNIMPLEMENTED_FUNC(cellSpursJq);
|
||||
return CELL_OK;
|
||||
#endif
|
||||
}
|
||||
|
||||
s64 _cellSpursJobQueuePushAndReleaseJobBody()
|
||||
s32 _cellSpursJobQueuePushAndReleaseJobBody()
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellSpursJq.Warning("%s()", __FUNCTION__);
|
||||
return GetCurrentPPUThread().FastCall2(libspurs_jq + 0x001DC8, libspurs_jq_rtoc);
|
||||
#else
|
||||
UNIMPLEMENTED_FUNC(cellSpursJq);
|
||||
return CELL_OK;
|
||||
#endif
|
||||
}
|
||||
|
||||
s64 _cellSpursJobQueuePushJobBody()
|
||||
s32 _cellSpursJobQueuePushJobBody()
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellSpursJq.Warning("%s()", __FUNCTION__);
|
||||
return GetCurrentPPUThread().FastCall2(libspurs_jq + 0x001EC8, libspurs_jq_rtoc);
|
||||
#else
|
||||
UNIMPLEMENTED_FUNC(cellSpursJq);
|
||||
return CELL_OK;
|
||||
#endif
|
||||
}
|
||||
|
||||
s64 _cellSpursJobQueuePushBody()
|
||||
s32 _cellSpursJobQueuePushBody()
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellSpursJq.Warning("%s()", __FUNCTION__);
|
||||
return GetCurrentPPUThread().FastCall2(libspurs_jq + 0x001F90, libspurs_jq_rtoc);
|
||||
#else
|
||||
UNIMPLEMENTED_FUNC(cellSpursJq);
|
||||
return CELL_OK;
|
||||
#endif
|
||||
}
|
||||
|
||||
s64 _cellSpursJobQueueAllocateJobDescriptorBody()
|
||||
s32 _cellSpursJobQueueAllocateJobDescriptorBody()
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellSpursJq.Warning("%s()", __FUNCTION__);
|
||||
return GetCurrentPPUThread().FastCall2(libspurs_jq + 0x002434, libspurs_jq_rtoc);
|
||||
#else
|
||||
UNIMPLEMENTED_FUNC(cellSpursJq);
|
||||
return CELL_OK;
|
||||
#endif
|
||||
}
|
||||
|
||||
s64 _cellSpursJobQueuePushSync()
|
||||
s32 _cellSpursJobQueuePushSync()
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellSpursJq.Warning("%s()", __FUNCTION__);
|
||||
return GetCurrentPPUThread().FastCall2(libspurs_jq + 0x002498, libspurs_jq_rtoc);
|
||||
#else
|
||||
UNIMPLEMENTED_FUNC(cellSpursJq);
|
||||
return CELL_OK;
|
||||
#endif
|
||||
}
|
||||
|
||||
s64 _cellSpursJobQueuePushFlush()
|
||||
s32 _cellSpursJobQueuePushFlush()
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellSpursJq.Warning("%s()", __FUNCTION__);
|
||||
return GetCurrentPPUThread().FastCall2(libspurs_jq + 0x002528, libspurs_jq_rtoc);
|
||||
#else
|
||||
UNIMPLEMENTED_FUNC(cellSpursJq);
|
||||
return CELL_OK;
|
||||
#endif
|
||||
}
|
||||
|
||||
s64 cellSpursJobQueueGetSpurs()
|
||||
s32 cellSpursJobQueueGetSpurs()
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellSpursJq.Warning("%s()", __FUNCTION__);
|
||||
return GetCurrentPPUThread().FastCall2(libspurs_jq + 0x002598, libspurs_jq_rtoc);
|
||||
#else
|
||||
UNIMPLEMENTED_FUNC(cellSpursJq);
|
||||
return CELL_OK;
|
||||
#endif
|
||||
}
|
||||
|
||||
s64 cellSpursJobQueueGetHandleCount()
|
||||
s32 cellSpursJobQueueGetHandleCount()
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellSpursJq.Warning("%s()", __FUNCTION__);
|
||||
return GetCurrentPPUThread().FastCall2(libspurs_jq + 0x0025C4, libspurs_jq_rtoc);
|
||||
#else
|
||||
UNIMPLEMENTED_FUNC(cellSpursJq);
|
||||
return CELL_OK;
|
||||
#endif
|
||||
}
|
||||
|
||||
s64 cellSpursJobQueueGetError()
|
||||
s32 cellSpursJobQueueGetError()
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellSpursJq.Warning("%s()", __FUNCTION__);
|
||||
return GetCurrentPPUThread().FastCall2(libspurs_jq + 0x002600, libspurs_jq_rtoc);
|
||||
#else
|
||||
UNIMPLEMENTED_FUNC(cellSpursJq);
|
||||
return CELL_OK;
|
||||
#endif
|
||||
}
|
||||
|
||||
s64 cellSpursJobQueueGetMaxSizeJobDescriptor()
|
||||
s32 cellSpursJobQueueGetMaxSizeJobDescriptor()
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellSpursJq.Warning("%s()", __FUNCTION__);
|
||||
return GetCurrentPPUThread().FastCall2(libspurs_jq + 0x002668, libspurs_jq_rtoc);
|
||||
#else
|
||||
UNIMPLEMENTED_FUNC(cellSpursJq);
|
||||
return CELL_OK;
|
||||
#endif
|
||||
}
|
||||
|
||||
s64 cellSpursGetJobQueueId()
|
||||
s32 cellSpursGetJobQueueId()
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellSpursJq.Warning("%s()", __FUNCTION__);
|
||||
return GetCurrentPPUThread().FastCall2(libspurs_jq + 0x0026A4, libspurs_jq_rtoc);
|
||||
#else
|
||||
UNIMPLEMENTED_FUNC(cellSpursJq);
|
||||
return CELL_OK;
|
||||
#endif
|
||||
}
|
||||
|
||||
s64 cellSpursJobQueueGetSuspendedJobSize()
|
||||
s32 cellSpursJobQueueGetSuspendedJobSize()
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellSpursJq.Warning("%s()", __FUNCTION__);
|
||||
return GetCurrentPPUThread().FastCall2(libspurs_jq + 0x002700, libspurs_jq_rtoc);
|
||||
#else
|
||||
UNIMPLEMENTED_FUNC(cellSpursJq);
|
||||
return CELL_OK;
|
||||
#endif
|
||||
}
|
||||
|
||||
s64 cellSpursJobQueueClose()
|
||||
s32 cellSpursJobQueueClose()
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellSpursJq.Warning("%s()", __FUNCTION__);
|
||||
return GetCurrentPPUThread().FastCall2(libspurs_jq + 0x002D70, libspurs_jq_rtoc);
|
||||
#else
|
||||
UNIMPLEMENTED_FUNC(cellSpursJq);
|
||||
return CELL_OK;
|
||||
#endif
|
||||
}
|
||||
|
||||
s64 cellSpursJobQueueOpen()
|
||||
s32 cellSpursJobQueueOpen()
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellSpursJq.Warning("%s()", __FUNCTION__);
|
||||
return GetCurrentPPUThread().FastCall2(libspurs_jq + 0x002E50, libspurs_jq_rtoc);
|
||||
#else
|
||||
UNIMPLEMENTED_FUNC(cellSpursJq);
|
||||
return CELL_OK;
|
||||
#endif
|
||||
}
|
||||
|
||||
s64 cellSpursJobQueueSemaphoreTryAcquire()
|
||||
s32 cellSpursJobQueueSemaphoreTryAcquire()
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellSpursJq.Warning("%s()", __FUNCTION__);
|
||||
return GetCurrentPPUThread().FastCall2(libspurs_jq + 0x003370, libspurs_jq_rtoc);
|
||||
#else
|
||||
UNIMPLEMENTED_FUNC(cellSpursJq);
|
||||
return CELL_OK;
|
||||
#endif
|
||||
}
|
||||
|
||||
s64 cellSpursJobQueueSemaphoreAcquire()
|
||||
s32 cellSpursJobQueueSemaphoreAcquire()
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellSpursJq.Warning("%s()", __FUNCTION__);
|
||||
return GetCurrentPPUThread().FastCall2(libspurs_jq + 0x003378, libspurs_jq_rtoc);
|
||||
#else
|
||||
UNIMPLEMENTED_FUNC(cellSpursJq);
|
||||
return CELL_OK;
|
||||
#endif
|
||||
}
|
||||
|
||||
s64 cellSpursJobQueueSemaphoreInitialize()
|
||||
s32 cellSpursJobQueueSemaphoreInitialize()
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellSpursJq.Warning("%s()", __FUNCTION__);
|
||||
return GetCurrentPPUThread().FastCall2(libspurs_jq + 0x003380, libspurs_jq_rtoc);
|
||||
#else
|
||||
UNIMPLEMENTED_FUNC(cellSpursJq);
|
||||
return CELL_OK;
|
||||
#endif
|
||||
}
|
||||
|
||||
s64 cellSpursJobQueueSendSignal()
|
||||
s32 cellSpursJobQueueSendSignal()
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellSpursJq.Warning("%s()", __FUNCTION__);
|
||||
return GetCurrentPPUThread().FastCall2(libspurs_jq + 0x0033E0, libspurs_jq_rtoc);
|
||||
#else
|
||||
UNIMPLEMENTED_FUNC(cellSpursJq);
|
||||
return CELL_OK;
|
||||
#endif
|
||||
}
|
||||
|
||||
s64 cellSpursJobQueuePortGetJobQueue()
|
||||
s32 cellSpursJobQueuePortGetJobQueue()
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellSpursJq.Warning("%s()", __FUNCTION__);
|
||||
return GetCurrentPPUThread().FastCall2(libspurs_jq + 0x00354C, libspurs_jq_rtoc);
|
||||
#else
|
||||
UNIMPLEMENTED_FUNC(cellSpursJq);
|
||||
return CELL_OK;
|
||||
#endif
|
||||
}
|
||||
|
||||
s64 _cellSpursJobQueuePortPushSync()
|
||||
s32 _cellSpursJobQueuePortPushSync()
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellSpursJq.Warning("%s()", __FUNCTION__);
|
||||
return GetCurrentPPUThread().FastCall2(libspurs_jq + 0x003554, libspurs_jq_rtoc);
|
||||
#else
|
||||
UNIMPLEMENTED_FUNC(cellSpursJq);
|
||||
return CELL_OK;
|
||||
#endif
|
||||
}
|
||||
|
||||
s64 _cellSpursJobQueuePortPushFlush()
|
||||
s32 _cellSpursJobQueuePortPushFlush()
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellSpursJq.Warning("%s()", __FUNCTION__);
|
||||
return GetCurrentPPUThread().FastCall2(libspurs_jq + 0x0035C0, libspurs_jq_rtoc);
|
||||
#else
|
||||
UNIMPLEMENTED_FUNC(cellSpursJq);
|
||||
return CELL_OK;
|
||||
#endif
|
||||
}
|
||||
|
||||
s64 _cellSpursJobQueuePortPushJobListBody()
|
||||
s32 _cellSpursJobQueuePortPushJobListBody()
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellSpursJq.Warning("%s()", __FUNCTION__);
|
||||
return GetCurrentPPUThread().FastCall2(libspurs_jq + 0x003624, libspurs_jq_rtoc);
|
||||
#else
|
||||
UNIMPLEMENTED_FUNC(cellSpursJq);
|
||||
return CELL_OK;
|
||||
#endif
|
||||
}
|
||||
|
||||
s64 _cellSpursJobQueuePortPushJobBody()
|
||||
s32 _cellSpursJobQueuePortPushJobBody()
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellSpursJq.Warning("%s()", __FUNCTION__);
|
||||
return GetCurrentPPUThread().FastCall2(libspurs_jq + 0x003A88, libspurs_jq_rtoc);
|
||||
#else
|
||||
UNIMPLEMENTED_FUNC(cellSpursJq);
|
||||
return CELL_OK;
|
||||
#endif
|
||||
}
|
||||
|
||||
s64 _cellSpursJobQueuePortPushJobBody2()
|
||||
s32 _cellSpursJobQueuePortPushJobBody2()
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellSpursJq.Warning("%s()", __FUNCTION__);
|
||||
return GetCurrentPPUThread().FastCall2(libspurs_jq + 0x003A94, libspurs_jq_rtoc);
|
||||
#else
|
||||
UNIMPLEMENTED_FUNC(cellSpursJq);
|
||||
return CELL_OK;
|
||||
#endif
|
||||
}
|
||||
|
||||
s64 _cellSpursJobQueuePortPushBody()
|
||||
s32 _cellSpursJobQueuePortPushBody()
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellSpursJq.Warning("%s()", __FUNCTION__);
|
||||
return GetCurrentPPUThread().FastCall2(libspurs_jq + 0x003A98, libspurs_jq_rtoc);
|
||||
#else
|
||||
UNIMPLEMENTED_FUNC(cellSpursJq);
|
||||
return CELL_OK;
|
||||
#endif
|
||||
}
|
||||
|
||||
s64 cellSpursJobQueuePortTrySync()
|
||||
s32 cellSpursJobQueuePortTrySync()
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellSpursJq.Warning("%s()", __FUNCTION__);
|
||||
return GetCurrentPPUThread().FastCall2(libspurs_jq + 0x003C38, libspurs_jq_rtoc);
|
||||
#else
|
||||
UNIMPLEMENTED_FUNC(cellSpursJq);
|
||||
return CELL_OK;
|
||||
#endif
|
||||
}
|
||||
|
||||
s64 cellSpursJobQueuePortSync()
|
||||
s32 cellSpursJobQueuePortSync()
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellSpursJq.Warning("%s()", __FUNCTION__);
|
||||
return GetCurrentPPUThread().FastCall2(libspurs_jq + 0x003C40, libspurs_jq_rtoc);
|
||||
#else
|
||||
UNIMPLEMENTED_FUNC(cellSpursJq);
|
||||
return CELL_OK;
|
||||
#endif
|
||||
}
|
||||
|
||||
s64 cellSpursJobQueuePortInitialize()
|
||||
s32 cellSpursJobQueuePortInitialize()
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellSpursJq.Warning("%s()", __FUNCTION__);
|
||||
return GetCurrentPPUThread().FastCall2(libspurs_jq + 0x003C48, libspurs_jq_rtoc);
|
||||
#else
|
||||
UNIMPLEMENTED_FUNC(cellSpursJq);
|
||||
return CELL_OK;
|
||||
#endif
|
||||
}
|
||||
|
||||
s64 cellSpursJobQueuePortInitializeWithDescriptorBuffer()
|
||||
s32 cellSpursJobQueuePortInitializeWithDescriptorBuffer()
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellSpursJq.Warning("%s()", __FUNCTION__);
|
||||
return GetCurrentPPUThread().FastCall2(libspurs_jq + 0x003D78, libspurs_jq_rtoc);
|
||||
#else
|
||||
UNIMPLEMENTED_FUNC(cellSpursJq);
|
||||
return CELL_OK;
|
||||
#endif
|
||||
}
|
||||
|
||||
s64 cellSpursJobQueuePortFinalize()
|
||||
s32 cellSpursJobQueuePortFinalize()
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellSpursJq.Warning("%s()", __FUNCTION__);
|
||||
return GetCurrentPPUThread().FastCall2(libspurs_jq + 0x003E40, libspurs_jq_rtoc);
|
||||
#else
|
||||
UNIMPLEMENTED_FUNC(cellSpursJq);
|
||||
return CELL_OK;
|
||||
#endif
|
||||
}
|
||||
|
||||
s64 _cellSpursJobQueuePortCopyPushJobBody()
|
||||
s32 _cellSpursJobQueuePortCopyPushJobBody()
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellSpursJq.Warning("%s()", __FUNCTION__);
|
||||
return GetCurrentPPUThread().FastCall2(libspurs_jq + 0x004280, libspurs_jq_rtoc);
|
||||
#else
|
||||
UNIMPLEMENTED_FUNC(cellSpursJq);
|
||||
return CELL_OK;
|
||||
#endif
|
||||
}
|
||||
|
||||
s64 _cellSpursJobQueuePortCopyPushJobBody2()
|
||||
s32 _cellSpursJobQueuePortCopyPushJobBody2()
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellSpursJq.Warning("%s()", __FUNCTION__);
|
||||
return GetCurrentPPUThread().FastCall2(libspurs_jq + 0x00428C, libspurs_jq_rtoc);
|
||||
#else
|
||||
UNIMPLEMENTED_FUNC(cellSpursJq);
|
||||
return CELL_OK;
|
||||
#endif
|
||||
}
|
||||
|
||||
s64 _cellSpursJobQueuePortCopyPushBody()
|
||||
s32 _cellSpursJobQueuePortCopyPushBody()
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellSpursJq.Warning("%s()", __FUNCTION__);
|
||||
return GetCurrentPPUThread().FastCall2(libspurs_jq + 0x004290, libspurs_jq_rtoc);
|
||||
#else
|
||||
UNIMPLEMENTED_FUNC(cellSpursJq);
|
||||
return CELL_OK;
|
||||
#endif
|
||||
}
|
||||
|
||||
s64 cellSpursJobQueuePort2GetJobQueue()
|
||||
s32 cellSpursJobQueuePort2GetJobQueue()
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellSpursJq.Warning("%s()", __FUNCTION__);
|
||||
return GetCurrentPPUThread().FastCall2(libspurs_jq + 0x0042A4, libspurs_jq_rtoc);
|
||||
#else
|
||||
UNIMPLEMENTED_FUNC(cellSpursJq);
|
||||
return CELL_OK;
|
||||
#endif
|
||||
}
|
||||
|
||||
s64 cellSpursJobQueuePort2PushSync()
|
||||
s32 cellSpursJobQueuePort2PushSync()
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellSpursJq.Warning("%s()", __FUNCTION__);
|
||||
return GetCurrentPPUThread().FastCall2(libspurs_jq + 0x0042AC, libspurs_jq_rtoc);
|
||||
#else
|
||||
UNIMPLEMENTED_FUNC(cellSpursJq);
|
||||
return CELL_OK;
|
||||
#endif
|
||||
}
|
||||
|
||||
s64 cellSpursJobQueuePort2PushFlush()
|
||||
s32 cellSpursJobQueuePort2PushFlush()
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellSpursJq.Warning("%s()", __FUNCTION__);
|
||||
return GetCurrentPPUThread().FastCall2(libspurs_jq + 0x004330, libspurs_jq_rtoc);
|
||||
#else
|
||||
UNIMPLEMENTED_FUNC(cellSpursJq);
|
||||
return CELL_OK;
|
||||
#endif
|
||||
}
|
||||
|
||||
s64 _cellSpursJobQueuePort2PushJobListBody()
|
||||
s32 _cellSpursJobQueuePort2PushJobListBody()
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellSpursJq.Warning("%s()", __FUNCTION__);
|
||||
return GetCurrentPPUThread().FastCall2(libspurs_jq + 0x0043B0, libspurs_jq_rtoc);
|
||||
#else
|
||||
UNIMPLEMENTED_FUNC(cellSpursJq);
|
||||
return CELL_OK;
|
||||
#endif
|
||||
}
|
||||
|
||||
s64 cellSpursJobQueuePort2Sync()
|
||||
s32 cellSpursJobQueuePort2Sync()
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellSpursJq.Warning("%s()", __FUNCTION__);
|
||||
return GetCurrentPPUThread().FastCall2(libspurs_jq + 0x0045AC, libspurs_jq_rtoc);
|
||||
#else
|
||||
UNIMPLEMENTED_FUNC(cellSpursJq);
|
||||
return CELL_OK;
|
||||
#endif
|
||||
}
|
||||
|
||||
s64 cellSpursJobQueuePort2Create()
|
||||
s32 cellSpursJobQueuePort2Create()
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellSpursJq.Warning("%s()", __FUNCTION__);
|
||||
return GetCurrentPPUThread().FastCall2(libspurs_jq + 0x0046C4, libspurs_jq_rtoc);
|
||||
#else
|
||||
UNIMPLEMENTED_FUNC(cellSpursJq);
|
||||
return CELL_OK;
|
||||
#endif
|
||||
}
|
||||
|
||||
s64 cellSpursJobQueuePort2Destroy()
|
||||
s32 cellSpursJobQueuePort2Destroy()
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellSpursJq.Warning("%s()", __FUNCTION__);
|
||||
return GetCurrentPPUThread().FastCall2(libspurs_jq + 0x0047E4, libspurs_jq_rtoc);
|
||||
#else
|
||||
UNIMPLEMENTED_FUNC(cellSpursJq);
|
||||
return CELL_OK;
|
||||
#endif
|
||||
}
|
||||
|
||||
s64 cellSpursJobQueuePort2AllocateJobDescriptor()
|
||||
s32 cellSpursJobQueuePort2AllocateJobDescriptor()
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellSpursJq.Warning("%s()", __FUNCTION__);
|
||||
return GetCurrentPPUThread().FastCall2(libspurs_jq + 0x004928, libspurs_jq_rtoc);
|
||||
#else
|
||||
UNIMPLEMENTED_FUNC(cellSpursJq);
|
||||
return CELL_OK;
|
||||
#endif
|
||||
}
|
||||
|
||||
s64 _cellSpursJobQueuePort2PushAndReleaseJobBody()
|
||||
s32 _cellSpursJobQueuePort2PushAndReleaseJobBody()
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellSpursJq.Warning("%s()", __FUNCTION__);
|
||||
return GetCurrentPPUThread().FastCall2(libspurs_jq + 0x004D94, libspurs_jq_rtoc);
|
||||
#else
|
||||
UNIMPLEMENTED_FUNC(cellSpursJq);
|
||||
return CELL_OK;
|
||||
#endif
|
||||
}
|
||||
|
||||
s64 _cellSpursJobQueuePort2CopyPushJobBody()
|
||||
s32 _cellSpursJobQueuePort2CopyPushJobBody()
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellSpursJq.Warning("%s()", __FUNCTION__);
|
||||
return GetCurrentPPUThread().FastCall2(libspurs_jq + 0x004DD0, libspurs_jq_rtoc);
|
||||
#else
|
||||
UNIMPLEMENTED_FUNC(cellSpursJq);
|
||||
return CELL_OK;
|
||||
#endif
|
||||
}
|
||||
|
||||
s64 _cellSpursJobQueuePort2PushJobBody()
|
||||
s32 _cellSpursJobQueuePort2PushJobBody()
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellSpursJq.Warning("%s()", __FUNCTION__);
|
||||
return GetCurrentPPUThread().FastCall2(libspurs_jq + 0x004E0C, libspurs_jq_rtoc);
|
||||
#else
|
||||
UNIMPLEMENTED_FUNC(cellSpursJq);
|
||||
return CELL_OK;
|
||||
#endif
|
||||
}
|
||||
|
||||
s64 cellSpursJobQueueSetExceptionEventHandler()
|
||||
s32 cellSpursJobQueueSetExceptionEventHandler()
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellSpursJq.Warning("%s()", __FUNCTION__);
|
||||
return GetCurrentPPUThread().FastCall2(libspurs_jq + 0x004E48, libspurs_jq_rtoc);
|
||||
#else
|
||||
UNIMPLEMENTED_FUNC(cellSpursJq);
|
||||
return CELL_OK;
|
||||
#endif
|
||||
}
|
||||
|
||||
s64 cellSpursJobQueueUnsetExceptionEventHandler()
|
||||
s32 cellSpursJobQueueUnsetExceptionEventHandler()
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellSpursJq.Warning("%s()", __FUNCTION__);
|
||||
return GetCurrentPPUThread().FastCall2(libspurs_jq + 0x004EC0, libspurs_jq_rtoc);
|
||||
#else
|
||||
UNIMPLEMENTED_FUNC(cellSpursJq);
|
||||
return CELL_OK;
|
||||
#endif
|
||||
}
|
||||
|
||||
Module cellSpursJq("cellSpursJq", []()
|
||||
@ -765,43 +449,4 @@ Module cellSpursJq("cellSpursJq", []()
|
||||
REG_FUNC(cellSpursJq, _cellSpursJobQueuePort2PushJobBody);
|
||||
REG_FUNC(cellSpursJq, cellSpursJobQueueSetExceptionEventHandler);
|
||||
REG_FUNC(cellSpursJq, cellSpursJobQueueUnsetExceptionEventHandler);
|
||||
|
||||
#ifdef PRX_DEBUG
|
||||
CallAfter([]()
|
||||
{
|
||||
if (!Memory.MainMem.GetStartAddr()) return;
|
||||
|
||||
libspurs_jq = (u32)Memory.MainMem.AllocAlign(sizeof(libspurs_jq_data), 0x100000);
|
||||
memcpy(vm::get_ptr<void>(libspurs_jq), libspurs_jq_data, sizeof(libspurs_jq_data));
|
||||
libspurs_jq_rtoc = libspurs_jq + 0x17E80;
|
||||
|
||||
extern Module* sysPrxForUser;
|
||||
extern Module* cellSpurs;
|
||||
extern Module* cellFiber;
|
||||
|
||||
FIX_IMPORT(cellSpurs, cellSpursSendWorkloadSignal , libspurs_jq + 0x6728);
|
||||
FIX_IMPORT(cellSpurs, cellSpursWorkloadAttributeSetName , libspurs_jq + 0x6748);
|
||||
FIX_IMPORT(cellSpurs, cellSpursRemoveWorkload , libspurs_jq + 0x6768);
|
||||
FIX_IMPORT(cellSpurs, cellSpursWaitForWorkloadShutdown , libspurs_jq + 0x6788);
|
||||
FIX_IMPORT(cellSpurs, cellSpursWakeUp , libspurs_jq + 0x67A8);
|
||||
FIX_IMPORT(cellSpurs, cellSpursShutdownWorkload , libspurs_jq + 0x67C8);
|
||||
FIX_IMPORT(cellSpurs, cellSpursAddWorkloadWithAttribute , libspurs_jq + 0x67E8);
|
||||
FIX_IMPORT(cellSpurs, cellSpursSetExceptionEventHandler , libspurs_jq + 0x6808);
|
||||
FIX_IMPORT(cellSpurs, _cellSpursWorkloadAttributeInitialize , libspurs_jq + 0x6828);
|
||||
FIX_IMPORT(cellFiber, cellFiberPpuSelf , libspurs_jq + 0x6848);
|
||||
FIX_IMPORT(cellFiber, cellFiberPpuWaitSignal , libspurs_jq + 0x6868);
|
||||
FIX_IMPORT(sysPrxForUser, _sys_strncmp , libspurs_jq + 0x6888);
|
||||
FIX_IMPORT(sysPrxForUser, _sys_snprintf , libspurs_jq + 0x68A8);
|
||||
FIX_IMPORT(sysPrxForUser, sys_lwcond_destroy , libspurs_jq + 0x68C8);
|
||||
FIX_IMPORT(sysPrxForUser, sys_lwmutex_create , libspurs_jq + 0x68E8);
|
||||
FIX_IMPORT(sysPrxForUser, _sys_memset , libspurs_jq + 0x6908);
|
||||
FIX_IMPORT(sysPrxForUser, _sys_printf , libspurs_jq + 0x6928);
|
||||
fix_import(sysPrxForUser, 0x9FB6228E , libspurs_jq + 0x6948);
|
||||
FIX_IMPORT(sysPrxForUser, sys_lwmutex_destroy , libspurs_jq + 0x6968);
|
||||
FIX_IMPORT(sysPrxForUser, sys_lwcond_create , libspurs_jq + 0x6988);
|
||||
fix_import(sysPrxForUser, 0xE75C40F2 , libspurs_jq + 0x69A8);
|
||||
|
||||
fix_relocs(cellSpursJq, libspurs_jq, 0xFF70, 0x12370, 0xED00);
|
||||
});
|
||||
#endif
|
||||
});
|
||||
|
@ -13,12 +13,6 @@
|
||||
|
||||
extern Module cellSync;
|
||||
|
||||
#ifdef PRX_DEBUG
|
||||
#include "prx_libsre.h"
|
||||
u32 libsre;
|
||||
u32 libsre_rtoc;
|
||||
#endif
|
||||
|
||||
waiter_map_t g_sync_mutex_wm("sync_mutex_wm");
|
||||
waiter_map_t g_sync_barrier_wait_wm("sync_barrier_wait_wm");
|
||||
waiter_map_t g_sync_barrier_notify_wm("sync_barrier_notify_wm");
|
||||
@ -835,15 +829,6 @@ s32 cellSyncQueueClear(vm::ptr<CellSyncQueue> queue)
|
||||
|
||||
// LFQueue functions
|
||||
|
||||
void syncLFQueueDump(vm::ptr<CellSyncLFQueue> queue)
|
||||
{
|
||||
cellSync.Notice("CellSyncLFQueue dump: addr = 0x%x", queue.addr());
|
||||
for (u32 i = 0; i < sizeof(CellSyncLFQueue) / 16; i++)
|
||||
{
|
||||
cellSync.Notice("*** 0x%.16llx 0x%.16llx", vm::read64(queue.addr() + i * 16), vm::read64(queue.addr() + i * 16 + 8));
|
||||
}
|
||||
}
|
||||
|
||||
void syncLFQueueInit(vm::ptr<CellSyncLFQueue> queue, vm::ptr<u8> buffer, u32 size, u32 depth, CellSyncQueueDirection direction, vm::ptr<void> eaSignal)
|
||||
{
|
||||
queue->m_size = size;
|
||||
@ -886,11 +871,6 @@ void syncLFQueueInit(vm::ptr<CellSyncLFQueue> queue, vm::ptr<u8> buffer, u32 siz
|
||||
|
||||
s32 syncLFQueueInitialize(vm::ptr<CellSyncLFQueue> queue, vm::ptr<u8> buffer, u32 size, u32 depth, CellSyncQueueDirection direction, vm::ptr<void> eaSignal)
|
||||
{
|
||||
#ifdef PRX_DEBUG_XXX
|
||||
return cb_caller<s32, vm::ptr<CellSyncLFQueue>, vm::ptr<u8>, u32, u32, CellSyncQueueDirection, vm::ptr<void>>::call(GetCurrentPPUThread(), libsre + 0x205C, libsre_rtoc,
|
||||
queue, buffer, size, depth, direction, eaSignal);
|
||||
#endif
|
||||
|
||||
if (!queue)
|
||||
{
|
||||
return CELL_SYNC_ERROR_NULL_POINTER;
|
||||
@ -1112,10 +1092,7 @@ s32 _cellSyncLFQueueGetPushPointer(vm::ptr<CellSyncLFQueue> queue, vm::ptr<u32>
|
||||
|
||||
s32 syncLFQueueGetPushPointer2(vm::ptr<CellSyncLFQueue> queue, s32& pointer, u32 isBlocking, u32 useEventQueue)
|
||||
{
|
||||
// TODO
|
||||
//pointer = 0;
|
||||
assert(!"syncLFQueueGetPushPointer2()");
|
||||
return CELL_OK;
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
|
||||
s32 _cellSyncLFQueueGetPushPointer2(vm::ptr<CellSyncLFQueue> queue, vm::ptr<u32> pointer, u32 isBlocking, u32 useEventQueue)
|
||||
@ -1274,10 +1251,7 @@ s32 _cellSyncLFQueueCompletePushPointer(vm::ptr<CellSyncLFQueue> queue, s32 poin
|
||||
|
||||
s32 syncLFQueueCompletePushPointer2(vm::ptr<CellSyncLFQueue> queue, s32 pointer, const std::function<s32(u32 addr, u32 arg)> fpSendSignal)
|
||||
{
|
||||
// TODO
|
||||
//if (fpSendSignal) return fpSendSignal(0, 0);
|
||||
assert(!"syncLFQueueCompletePushPointer2()");
|
||||
return CELL_OK;
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
|
||||
s32 _cellSyncLFQueueCompletePushPointer2(vm::ptr<CellSyncLFQueue> queue, s32 pointer, vm::ptr<s32(u32 addr, u32 arg)> fpSendSignal)
|
||||
@ -1304,32 +1278,18 @@ s32 _cellSyncLFQueuePushBody(PPUThread& CPU, vm::ptr<CellSyncLFQueue> queue, vm:
|
||||
}
|
||||
|
||||
s32 position;
|
||||
#ifdef PRX_DEBUG
|
||||
vm::stackvar<be_t<s32>> position_v(CPU);
|
||||
#endif
|
||||
|
||||
while (true)
|
||||
{
|
||||
s32 res;
|
||||
|
||||
if (queue->m_direction != CELL_SYNC_QUEUE_ANY2ANY)
|
||||
{
|
||||
#ifdef PRX_DEBUG_XXX
|
||||
res = cb_call<s32, vm::ptr<CellSyncLFQueue>, u32, u32, u64>(CPU, libsre + 0x24B0, libsre_rtoc,
|
||||
queue, position_v.addr(), isBlocking, 0);
|
||||
position = position_v.value();
|
||||
#else
|
||||
res = syncLFQueueGetPushPointer(queue, position, isBlocking, 0);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
res = cb_call<s32, vm::ptr<CellSyncLFQueue>, u32, u32, u64>(CPU, libsre + 0x3050, libsre_rtoc,
|
||||
queue, position_v.addr(), isBlocking, 0);
|
||||
position = position_v.value();
|
||||
#else
|
||||
res = syncLFQueueGetPushPointer2(queue, position, isBlocking, 0);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (!isBlocking || res != CELL_SYNC_ERROR_AGAIN)
|
||||
@ -1342,6 +1302,7 @@ s32 _cellSyncLFQueuePushBody(PPUThread& CPU, vm::ptr<CellSyncLFQueue> queue, vm:
|
||||
}
|
||||
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(1)); // hack
|
||||
|
||||
if (Emu.IsStopped())
|
||||
{
|
||||
cellSync.Warning("_cellSyncLFQueuePushBody(queue_addr=0x%x) aborted", queue.addr());
|
||||
@ -1355,23 +1316,14 @@ s32 _cellSyncLFQueuePushBody(PPUThread& CPU, vm::ptr<CellSyncLFQueue> queue, vm:
|
||||
memcpy(vm::get_ptr<void>(addr), buffer.get_ptr(), size);
|
||||
|
||||
s32 res;
|
||||
|
||||
if (queue->m_direction != CELL_SYNC_QUEUE_ANY2ANY)
|
||||
{
|
||||
#ifdef PRX_DEBUG_XXX
|
||||
res = cb_call<s32, vm::ptr<CellSyncLFQueue>, s32, u64>(CPU, libsre + 0x26C0, libsre_rtoc,
|
||||
queue, position, 0);
|
||||
#else
|
||||
res = syncLFQueueCompletePushPointer(queue, position, nullptr);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
res = cb_call<s32, vm::ptr<CellSyncLFQueue>, s32, u64>(CPU, libsre + 0x355C, libsre_rtoc,
|
||||
queue, position, 0);
|
||||
#else
|
||||
res = syncLFQueueCompletePushPointer2(queue, position, nullptr);
|
||||
#endif
|
||||
}
|
||||
|
||||
return res;
|
||||
@ -1491,10 +1443,7 @@ s32 _cellSyncLFQueueGetPopPointer(vm::ptr<CellSyncLFQueue> queue, vm::ptr<u32> p
|
||||
|
||||
s32 syncLFQueueGetPopPointer2(vm::ptr<CellSyncLFQueue> queue, s32& pointer, u32 isBlocking, u32 useEventQueue)
|
||||
{
|
||||
// TODO
|
||||
//pointer = 0;
|
||||
assert(!"syncLFQueueGetPopPointer2()");
|
||||
return CELL_OK;
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
|
||||
s32 _cellSyncLFQueueGetPopPointer2(vm::ptr<CellSyncLFQueue> queue, vm::ptr<u32> pointer, u32 isBlocking, u32 useEventQueue)
|
||||
@ -1653,10 +1602,7 @@ s32 _cellSyncLFQueueCompletePopPointer(vm::ptr<CellSyncLFQueue> queue, s32 point
|
||||
|
||||
s32 syncLFQueueCompletePopPointer2(vm::ptr<CellSyncLFQueue> queue, s32 pointer, const std::function<s32(u32 addr, u32 arg)> fpSendSignal, u32 noQueueFull)
|
||||
{
|
||||
// TODO
|
||||
//if (fpSendSignal) fpSendSignal(0, 0);
|
||||
assert(!"syncLFQueueCompletePopPointer2()");
|
||||
return CELL_OK;
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
|
||||
s32 _cellSyncLFQueueCompletePopPointer2(vm::ptr<CellSyncLFQueue> queue, s32 pointer, vm::ptr<s32(u32 addr, u32 arg)> fpSendSignal, u32 noQueueFull)
|
||||
@ -1683,31 +1629,17 @@ s32 _cellSyncLFQueuePopBody(PPUThread& CPU, vm::ptr<CellSyncLFQueue> queue, vm::
|
||||
}
|
||||
|
||||
s32 position;
|
||||
#ifdef PRX_DEBUG
|
||||
vm::stackvar<be_t<s32>> position_v(CPU);
|
||||
#endif
|
||||
|
||||
while (true)
|
||||
{
|
||||
s32 res;
|
||||
if (queue->m_direction != CELL_SYNC_QUEUE_ANY2ANY)
|
||||
{
|
||||
#ifdef PRX_DEBUG_XXX
|
||||
res = cb_call<s32, vm::ptr<CellSyncLFQueue>, u32, u32, u64, u64>(CPU, libsre + 0x2A90, libsre_rtoc,
|
||||
queue, position_v.addr(), isBlocking, 0, 0);
|
||||
position = position_v.value();
|
||||
#else
|
||||
res = syncLFQueueGetPopPointer(queue, position, isBlocking, 0, 0);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
res = cb_call<s32, vm::ptr<CellSyncLFQueue>, u32, u32, u64>(CPU, libsre + 0x39AC, libsre_rtoc,
|
||||
queue, position_v.addr(), isBlocking, 0);
|
||||
position = position_v.value();
|
||||
#else
|
||||
res = syncLFQueueGetPopPointer2(queue, position, isBlocking, 0);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (!isBlocking || res != CELL_SYNC_ERROR_AGAIN)
|
||||
@ -1720,6 +1652,7 @@ s32 _cellSyncLFQueuePopBody(PPUThread& CPU, vm::ptr<CellSyncLFQueue> queue, vm::
|
||||
}
|
||||
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(1)); // hack
|
||||
|
||||
if (Emu.IsStopped())
|
||||
{
|
||||
cellSync.Warning("_cellSyncLFQueuePopBody(queue_addr=0x%x) aborted", queue.addr());
|
||||
@ -1733,23 +1666,14 @@ s32 _cellSyncLFQueuePopBody(PPUThread& CPU, vm::ptr<CellSyncLFQueue> queue, vm::
|
||||
memcpy(buffer.get_ptr(), vm::get_ptr<void>(addr), size);
|
||||
|
||||
s32 res;
|
||||
|
||||
if (queue->m_direction != CELL_SYNC_QUEUE_ANY2ANY)
|
||||
{
|
||||
#ifdef PRX_DEBUG_XXX
|
||||
res = cb_call<s32, vm::ptr<CellSyncLFQueue>, s32, u64, u64>(CPU, libsre + 0x2CA8, libsre_rtoc,
|
||||
queue, position, 0, 0);
|
||||
#else
|
||||
res = syncLFQueueCompletePopPointer(queue, position, nullptr, 0);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
res = cb_call<s32, vm::ptr<CellSyncLFQueue>, s32, u64, u64>(CPU, libsre + 0x3EB8, libsre_rtoc,
|
||||
queue, position, 0, 0);
|
||||
#else
|
||||
res = syncLFQueueCompletePopPointer2(queue, position, nullptr, 0);
|
||||
#endif
|
||||
}
|
||||
|
||||
return res;
|
||||
@ -1910,13 +1834,7 @@ s32 cellSyncLFQueueGetEntrySize(vm::ptr<const CellSyncLFQueue> queue, vm::ptr<u3
|
||||
|
||||
s32 syncLFQueueAttachLv2EventQueue(vm::ptr<u32> spus, u32 num, vm::ptr<CellSyncLFQueue> queue)
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
return cb_call<s32, vm::ptr<u32>, u32, vm::ptr<CellSyncLFQueue>>(GetCurrentPPUThread(), libsre + 0x19A8, libsre_rtoc,
|
||||
spus, num, queue);
|
||||
#endif
|
||||
|
||||
assert(!"syncLFQueueAttachLv2EventQueue()");
|
||||
return CELL_OK;
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
|
||||
s32 _cellSyncLFQueueAttachLv2EventQueue(vm::ptr<u32> spus, u32 num, vm::ptr<CellSyncLFQueue> queue)
|
||||
@ -1928,13 +1846,7 @@ s32 _cellSyncLFQueueAttachLv2EventQueue(vm::ptr<u32> spus, u32 num, vm::ptr<Cell
|
||||
|
||||
s32 syncLFQueueDetachLv2EventQueue(vm::ptr<u32> spus, u32 num, vm::ptr<CellSyncLFQueue> queue)
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
return cb_call<s32, vm::ptr<u32>, u32, vm::ptr<CellSyncLFQueue>>(GetCurrentPPUThread(), libsre + 0x1DA0, libsre_rtoc,
|
||||
spus, num, queue);
|
||||
#endif
|
||||
|
||||
assert(!"syncLFQueueDetachLv2EventQueue()");
|
||||
return CELL_OK;
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
|
||||
s32 _cellSyncLFQueueDetachLv2EventQueue(vm::ptr<u32> spus, u32 num, vm::ptr<CellSyncLFQueue> queue)
|
||||
@ -1992,53 +1904,4 @@ Module cellSync("cellSync", []()
|
||||
cellSync.AddFunc(0xe1bc7add, _cellSyncLFQueuePopBody);
|
||||
cellSync.AddFunc(0xe9bf2110, _cellSyncLFQueueGetPushPointer);
|
||||
cellSync.AddFunc(0xfe74e8e7, _cellSyncLFQueueCompletePopPointer);
|
||||
|
||||
#ifdef PRX_DEBUG
|
||||
CallAfter([]()
|
||||
{
|
||||
if (!Memory.MainMem.GetStartAddr()) return;
|
||||
|
||||
libsre = (u32)Memory.MainMem.AllocAlign(sizeof(libsre_data), 0x100000);
|
||||
memcpy(vm::get_ptr<void>(libsre), libsre_data, sizeof(libsre_data));
|
||||
libsre_rtoc = libsre + 0x399B0;
|
||||
|
||||
extern Module* sysPrxForUser;
|
||||
|
||||
FIX_IMPORT(sysPrxForUser, cellUserTraceRegister , libsre + 0x1D5BC); // ???
|
||||
FIX_IMPORT(sysPrxForUser, cellUserTraceUnregister , libsre + 0x1D5DC); // ???
|
||||
|
||||
FIX_IMPORT(sysPrxForUser, _sys_strncmp , libsre + 0x1D5FC);
|
||||
FIX_IMPORT(sysPrxForUser, _sys_strcat , libsre + 0x1D61C);
|
||||
FIX_IMPORT(sysPrxForUser, _sys_vsnprintf , libsre + 0x1D63C);
|
||||
FIX_IMPORT(sysPrxForUser, _sys_snprintf , libsre + 0x1D65C);
|
||||
FIX_IMPORT(sysPrxForUser, sys_lwmutex_lock , libsre + 0x1D67C);
|
||||
FIX_IMPORT(sysPrxForUser, sys_lwmutex_unlock , libsre + 0x1D69C);
|
||||
FIX_IMPORT(sysPrxForUser, sys_lwcond_destroy , libsre + 0x1D6BC);
|
||||
FIX_IMPORT(sysPrxForUser, sys_ppu_thread_create , libsre + 0x1D6DC);
|
||||
FIX_IMPORT(sysPrxForUser, sys_lwcond_wait , libsre + 0x1D6FC);
|
||||
FIX_IMPORT(sysPrxForUser, _sys_strlen , libsre + 0x1D71C);
|
||||
FIX_IMPORT(sysPrxForUser, sys_lwmutex_create , libsre + 0x1D73C);
|
||||
FIX_IMPORT(sysPrxForUser, _sys_spu_printf_detach_group , libsre + 0x1D75C);
|
||||
FIX_IMPORT(sysPrxForUser, _sys_memset , libsre + 0x1D77C);
|
||||
FIX_IMPORT(sysPrxForUser, _sys_memcpy , libsre + 0x1D79C);
|
||||
FIX_IMPORT(sysPrxForUser, _sys_strncat , libsre + 0x1D7BC);
|
||||
FIX_IMPORT(sysPrxForUser, _sys_strcpy , libsre + 0x1D7DC);
|
||||
FIX_IMPORT(sysPrxForUser, _sys_printf , libsre + 0x1D7FC);
|
||||
fix_import(sysPrxForUser, 0x9FB6228E , libsre + 0x1D81C);
|
||||
FIX_IMPORT(sysPrxForUser, sys_ppu_thread_exit , libsre + 0x1D83C);
|
||||
FIX_IMPORT(sysPrxForUser, sys_lwmutex_destroy , libsre + 0x1D85C);
|
||||
FIX_IMPORT(sysPrxForUser, _sys_strncpy , libsre + 0x1D87C);
|
||||
FIX_IMPORT(sysPrxForUser, sys_lwcond_create , libsre + 0x1D89C);
|
||||
FIX_IMPORT(sysPrxForUser, _sys_spu_printf_attach_group , libsre + 0x1D8BC);
|
||||
FIX_IMPORT(sysPrxForUser, sys_prx_get_module_id_by_name , libsre + 0x1D8DC);
|
||||
FIX_IMPORT(sysPrxForUser, sys_spu_image_close , libsre + 0x1D8FC);
|
||||
fix_import(sysPrxForUser, 0xE75C40F2 , libsre + 0x1D91C);
|
||||
FIX_IMPORT(sysPrxForUser, sys_spu_image_import , libsre + 0x1D93C);
|
||||
FIX_IMPORT(sysPrxForUser, sys_lwcond_signal , libsre + 0x1D95C);
|
||||
FIX_IMPORT(sysPrxForUser, _sys_vprintf , libsre + 0x1D97C);
|
||||
FIX_IMPORT(sysPrxForUser, _sys_memcmp , libsre + 0x1D99C);
|
||||
|
||||
fix_relocs(cellSync, libsre, 0x31EE0, 0x3A4F0, 0x2DF00);
|
||||
});
|
||||
#endif
|
||||
});
|
||||
|
@ -135,16 +135,18 @@ struct CellSyncLFQueue
|
||||
be_t<u16> m_h6;
|
||||
};
|
||||
|
||||
union
|
||||
union // 0x0
|
||||
{
|
||||
atomic_t<pop1_t> pop1; // 0x0
|
||||
atomic_t<pop1_t> pop1;
|
||||
atomic_t<pop3_t> pop3;
|
||||
};
|
||||
union
|
||||
|
||||
union // 0x8
|
||||
{
|
||||
atomic_t<push1_t> push1; // 0x8
|
||||
atomic_t<push1_t> push1;
|
||||
atomic_t<push3_t> push3;
|
||||
};
|
||||
|
||||
be_t<u32> m_size; // 0x10
|
||||
be_t<u32> m_depth; // 0x14
|
||||
vm::bptr<u8, 1, u64> m_buffer; // 0x18
|
||||
@ -159,6 +161,23 @@ struct CellSyncLFQueue
|
||||
vm::bptr<void, 1, u64> m_eaSignal; // 0x70
|
||||
be_t<u32> m_v2; // 0x78
|
||||
be_t<u32> m_eq_id; // 0x7C
|
||||
|
||||
std::string dump()
|
||||
{
|
||||
std::string res = "CellSyncLFQueue dump:";
|
||||
|
||||
auto data = (be_t<u64>*)this;
|
||||
|
||||
for (u32 i = 0; i < sizeof(CellSyncLFQueue) / sizeof(u64); i += 2)
|
||||
{
|
||||
res += "\n*** 0x";
|
||||
res += fmt::to_hex(data[i + 0], 16);
|
||||
res += " 0x";
|
||||
res += fmt::to_hex(data[i + 1], 16);
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
};
|
||||
|
||||
static_assert(sizeof(CellSyncLFQueue) == 128, "CellSyncLFQueue: wrong size");
|
||||
|
@ -7,18 +7,8 @@
|
||||
|
||||
extern Module cellSync2;
|
||||
|
||||
#ifdef PRX_DEBUG
|
||||
#include "prx_libsync2.h"
|
||||
u32 libsync2;
|
||||
u32 libsync2_rtoc;
|
||||
#endif
|
||||
|
||||
s64 _cellSync2MutexAttributeInitialize(vm::ptr<CellSync2MutexAttribute> attr, u32 sdkVersion)
|
||||
s32 _cellSync2MutexAttributeInitialize(vm::ptr<CellSync2MutexAttribute> attr, u32 sdkVersion)
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellSync2.Warning("%s()", __FUNCTION__);
|
||||
return GetCurrentPPUThread().FastCall2(libsync2 + 0x16A0, libsync2_rtoc);
|
||||
#else
|
||||
cellSync2.Warning("_cellSync2MutexAttributeInitialize(attr_addr=0x%x, sdkVersion=0x%x)", attr.addr(), sdkVersion);
|
||||
|
||||
attr->sdkVersion = sdkVersion;
|
||||
@ -30,85 +20,50 @@ s64 _cellSync2MutexAttributeInitialize(vm::ptr<CellSync2MutexAttribute> attr, u3
|
||||
strcpy_trunc(attr->name, "CellSync2Mutex");
|
||||
|
||||
return CELL_OK;
|
||||
#endif
|
||||
}
|
||||
|
||||
s64 cellSync2MutexEstimateBufferSize(vm::ptr<const CellSync2MutexAttribute> attr, vm::ptr<u32> bufferSize)
|
||||
s32 cellSync2MutexEstimateBufferSize(vm::ptr<const CellSync2MutexAttribute> attr, vm::ptr<u32> bufferSize)
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellSync2.Warning("%s()", __FUNCTION__);
|
||||
return GetCurrentPPUThread().FastCall2(libsync2 + 0xC3C, libsync2_rtoc);
|
||||
#else
|
||||
cellSync2.Todo("cellSync2MutexEstimateBufferSize(attr_addr=0x%x, bufferSize_addr=0x%x)", attr.addr(), bufferSize.addr());
|
||||
|
||||
if (attr->maxWaiters > 32768)
|
||||
return CELL_SYNC2_ERROR_INVAL;
|
||||
|
||||
return CELL_OK;
|
||||
#endif
|
||||
}
|
||||
|
||||
s64 cellSync2MutexInitialize()
|
||||
s32 cellSync2MutexInitialize()
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellSync2.Warning("%s()", __FUNCTION__);
|
||||
return GetCurrentPPUThread().FastCall2(libsync2 + 0x1584, libsync2_rtoc);
|
||||
#else
|
||||
UNIMPLEMENTED_FUNC(cellSync2);
|
||||
return CELL_OK;
|
||||
#endif
|
||||
}
|
||||
|
||||
s64 cellSync2MutexFinalize()
|
||||
s32 cellSync2MutexFinalize()
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellSync2.Warning("%s()", __FUNCTION__);
|
||||
return GetCurrentPPUThread().FastCall2(libsync2 + 0x142C, libsync2_rtoc);
|
||||
#else
|
||||
UNIMPLEMENTED_FUNC(cellSync2);
|
||||
return CELL_OK;
|
||||
#endif
|
||||
}
|
||||
|
||||
s64 cellSync2MutexLock()
|
||||
s32 cellSync2MutexLock()
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellSync2.Warning("%s()", __FUNCTION__);
|
||||
return GetCurrentPPUThread().FastCall2(libsync2 + 0x1734, libsync2_rtoc);
|
||||
#else
|
||||
UNIMPLEMENTED_FUNC(cellSync2);
|
||||
return CELL_OK;
|
||||
#endif
|
||||
}
|
||||
|
||||
s64 cellSync2MutexTryLock()
|
||||
s32 cellSync2MutexTryLock()
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellSync2.Warning("%s()", __FUNCTION__);
|
||||
return GetCurrentPPUThread().FastCall2(libsync2 + 0x1A2C, libsync2_rtoc);
|
||||
#else
|
||||
UNIMPLEMENTED_FUNC(cellSync2);
|
||||
return CELL_OK;
|
||||
#endif
|
||||
}
|
||||
|
||||
s64 cellSync2MutexUnlock()
|
||||
s32 cellSync2MutexUnlock()
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellSync2.Warning("%s()", __FUNCTION__);
|
||||
return GetCurrentPPUThread().FastCall2(libsync2 + 0x186C, libsync2_rtoc);
|
||||
#else
|
||||
UNIMPLEMENTED_FUNC(cellSync2);
|
||||
return CELL_OK;
|
||||
#endif
|
||||
}
|
||||
|
||||
s64 _cellSync2CondAttributeInitialize(vm::ptr<CellSync2CondAttribute> attr, u32 sdkVersion)
|
||||
s32 _cellSync2CondAttributeInitialize(vm::ptr<CellSync2CondAttribute> attr, u32 sdkVersion)
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellSync2.Warning("%s()", __FUNCTION__);
|
||||
return GetCurrentPPUThread().FastCall2(libsync2 + 0x26DC, libsync2_rtoc);
|
||||
#else
|
||||
cellSync2.Warning("_cellSync2CondAttributeInitialize(attr_addr=0x%x, sdkVersion=0x%x)", attr.addr(), sdkVersion);
|
||||
|
||||
attr->sdkVersion = sdkVersion;
|
||||
@ -116,85 +71,50 @@ s64 _cellSync2CondAttributeInitialize(vm::ptr<CellSync2CondAttribute> attr, u32
|
||||
strcpy_trunc(attr->name, "CellSync2Cond");
|
||||
|
||||
return CELL_OK;
|
||||
#endif
|
||||
}
|
||||
|
||||
s64 cellSync2CondEstimateBufferSize(vm::ptr<const CellSync2CondAttribute> attr, vm::ptr<u32> bufferSize)
|
||||
s32 cellSync2CondEstimateBufferSize(vm::ptr<const CellSync2CondAttribute> attr, vm::ptr<u32> bufferSize)
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellSync2.Warning("%s()", __FUNCTION__);
|
||||
return GetCurrentPPUThread().FastCall2(libsync2 + 0x1B90, libsync2_rtoc);
|
||||
#else
|
||||
cellSync2.Todo("cellSync2CondEstimateBufferSize(attr_addr=0x%x, bufferSize_addr=0x%x)", attr.addr(), bufferSize.addr());
|
||||
|
||||
if (attr->maxWaiters == 0 || attr->maxWaiters > 32768)
|
||||
return CELL_SYNC2_ERROR_INVAL;
|
||||
|
||||
return CELL_OK;
|
||||
#endif
|
||||
}
|
||||
|
||||
s64 cellSync2CondInitialize()
|
||||
s32 cellSync2CondInitialize()
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellSync2.Warning("%s()", __FUNCTION__);
|
||||
return GetCurrentPPUThread().FastCall2(libsync2 + 0x25DC, libsync2_rtoc);
|
||||
#else
|
||||
UNIMPLEMENTED_FUNC(cellSync2);
|
||||
return CELL_OK;
|
||||
#endif
|
||||
}
|
||||
|
||||
s64 cellSync2CondFinalize()
|
||||
s32 cellSync2CondFinalize()
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellSync2.Warning("%s()", __FUNCTION__);
|
||||
return GetCurrentPPUThread().FastCall2(libsync2 + 0x23E0, libsync2_rtoc);
|
||||
#else
|
||||
UNIMPLEMENTED_FUNC(cellSync2);
|
||||
return CELL_OK;
|
||||
#endif
|
||||
}
|
||||
|
||||
s64 cellSync2CondWait()
|
||||
s32 cellSync2CondWait()
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellSync2.Warning("%s()", __FUNCTION__);
|
||||
return GetCurrentPPUThread().FastCall2(libsync2 + 0x283C, libsync2_rtoc);
|
||||
#else
|
||||
UNIMPLEMENTED_FUNC(cellSync2);
|
||||
return CELL_OK;
|
||||
#endif
|
||||
}
|
||||
|
||||
s64 cellSync2CondSignal()
|
||||
s32 cellSync2CondSignal()
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellSync2.Warning("%s()", __FUNCTION__);
|
||||
return GetCurrentPPUThread().FastCall2(libsync2 + 0x2768, libsync2_rtoc);
|
||||
#else
|
||||
UNIMPLEMENTED_FUNC(cellSync2);
|
||||
return CELL_OK;
|
||||
#endif
|
||||
}
|
||||
|
||||
s64 cellSync2CondSignalAll()
|
||||
s32 cellSync2CondSignalAll()
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellSync2.Warning("%s()", __FUNCTION__);
|
||||
return GetCurrentPPUThread().FastCall2(libsync2 + 0x2910, libsync2_rtoc);
|
||||
#else
|
||||
UNIMPLEMENTED_FUNC(cellSync2);
|
||||
return CELL_OK;
|
||||
#endif
|
||||
}
|
||||
|
||||
s64 _cellSync2SemaphoreAttributeInitialize(vm::ptr<CellSync2SemaphoreAttribute> attr, u32 sdkVersion)
|
||||
s32 _cellSync2SemaphoreAttributeInitialize(vm::ptr<CellSync2SemaphoreAttribute> attr, u32 sdkVersion)
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellSync2.Warning("%s()", __FUNCTION__);
|
||||
return GetCurrentPPUThread().FastCall2(libsync2 + 0x5644, libsync2_rtoc);
|
||||
#else
|
||||
cellSync2.Warning("_cellSync2SemaphoreAttributeInitialize(attr_addr=0x%x, sdkVersion=0x%x)", attr.addr(), sdkVersion);
|
||||
|
||||
attr->sdkVersion = sdkVersion;
|
||||
@ -205,96 +125,56 @@ s64 _cellSync2SemaphoreAttributeInitialize(vm::ptr<CellSync2SemaphoreAttribute>
|
||||
strcpy_trunc(attr->name, "CellSync2Semaphore");
|
||||
|
||||
return CELL_OK;
|
||||
#endif
|
||||
}
|
||||
|
||||
s64 cellSync2SemaphoreEstimateBufferSize(vm::ptr<const CellSync2SemaphoreAttribute> attr, vm::ptr<u32> bufferSize)
|
||||
s32 cellSync2SemaphoreEstimateBufferSize(vm::ptr<const CellSync2SemaphoreAttribute> attr, vm::ptr<u32> bufferSize)
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellSync2.Warning("%s()", __FUNCTION__);
|
||||
return GetCurrentPPUThread().FastCall2(libsync2 + 0x4AC4, libsync2_rtoc);
|
||||
#else
|
||||
cellSync2.Todo("cellSync2SemaphoreEstimateBufferSize(attr_addr=0x%x, bufferSize_addr=0x%x)", attr.addr(), bufferSize.addr());
|
||||
|
||||
if (attr->maxWaiters == 0 || attr->maxWaiters > 32768)
|
||||
return CELL_SYNC2_ERROR_INVAL;
|
||||
|
||||
return CELL_OK;
|
||||
#endif
|
||||
}
|
||||
|
||||
s64 cellSync2SemaphoreInitialize()
|
||||
s32 cellSync2SemaphoreInitialize()
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellSync2.Warning("%s()", __FUNCTION__);
|
||||
return GetCurrentPPUThread().FastCall2(libsync2 + 0x54E0, libsync2_rtoc);
|
||||
#else
|
||||
UNIMPLEMENTED_FUNC(cellSync2);
|
||||
return CELL_OK;
|
||||
#endif
|
||||
}
|
||||
|
||||
s64 cellSync2SemaphoreFinalize()
|
||||
s32 cellSync2SemaphoreFinalize()
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellSync2.Warning("%s()", __FUNCTION__);
|
||||
return GetCurrentPPUThread().FastCall2(libsync2 + 0x52F0, libsync2_rtoc);
|
||||
#else
|
||||
UNIMPLEMENTED_FUNC(cellSync2);
|
||||
return CELL_OK;
|
||||
#endif
|
||||
}
|
||||
|
||||
s64 cellSync2SemaphoreAcquire()
|
||||
s32 cellSync2SemaphoreAcquire()
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellSync2.Warning("%s()", __FUNCTION__);
|
||||
return GetCurrentPPUThread().FastCall2(libsync2 + 0x57A4, libsync2_rtoc);
|
||||
#else
|
||||
UNIMPLEMENTED_FUNC(cellSync2);
|
||||
return CELL_OK;
|
||||
#endif
|
||||
}
|
||||
|
||||
s64 cellSync2SemaphoreTryAcquire()
|
||||
s32 cellSync2SemaphoreTryAcquire()
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellSync2.Warning("%s()", __FUNCTION__);
|
||||
return GetCurrentPPUThread().FastCall2(libsync2 + 0x56D8, libsync2_rtoc);
|
||||
#else
|
||||
UNIMPLEMENTED_FUNC(cellSync2);
|
||||
return CELL_OK;
|
||||
#endif
|
||||
}
|
||||
|
||||
s64 cellSync2SemaphoreRelease()
|
||||
s32 cellSync2SemaphoreRelease()
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellSync2.Warning("%s()", __FUNCTION__);
|
||||
return GetCurrentPPUThread().FastCall2(libsync2 + 0x5870, libsync2_rtoc);
|
||||
#else
|
||||
UNIMPLEMENTED_FUNC(cellSync2);
|
||||
return CELL_OK;
|
||||
#endif
|
||||
}
|
||||
|
||||
s64 cellSync2SemaphoreGetCount()
|
||||
s32 cellSync2SemaphoreGetCount()
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellSync2.Warning("%s()", __FUNCTION__);
|
||||
return GetCurrentPPUThread().FastCall2(libsync2 + 0x4B4C, libsync2_rtoc);
|
||||
#else
|
||||
UNIMPLEMENTED_FUNC(cellSync2);
|
||||
return CELL_OK;
|
||||
#endif
|
||||
}
|
||||
|
||||
s64 _cellSync2QueueAttributeInitialize(vm::ptr<CellSync2QueueAttribute> attr, u32 sdkVersion)
|
||||
s32 _cellSync2QueueAttributeInitialize(vm::ptr<CellSync2QueueAttribute> attr, u32 sdkVersion)
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellSync2.Warning("%s()", __FUNCTION__);
|
||||
return GetCurrentPPUThread().FastCall2(libsync2 + 0x3C5C, libsync2_rtoc);
|
||||
#else
|
||||
cellSync2.Warning("_cellSync2QueueAttributeInitialize(attr_addr=0x%x, sdkVersion=0x%x)", attr.addr(), sdkVersion);
|
||||
|
||||
attr->sdkVersion = sdkVersion;
|
||||
@ -308,15 +188,10 @@ s64 _cellSync2QueueAttributeInitialize(vm::ptr<CellSync2QueueAttribute> attr, u3
|
||||
strcpy_trunc(attr->name, "CellSync2Queue");
|
||||
|
||||
return CELL_OK;
|
||||
#endif
|
||||
}
|
||||
|
||||
s64 cellSync2QueueEstimateBufferSize(vm::ptr<const CellSync2QueueAttribute> attr, vm::ptr<u32> bufferSize)
|
||||
s32 cellSync2QueueEstimateBufferSize(vm::ptr<const CellSync2QueueAttribute> attr, vm::ptr<u32> bufferSize)
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellSync2.Warning("%s()", __FUNCTION__);
|
||||
return GetCurrentPPUThread().FastCall2(libsync2 + 0x2A98, libsync2_rtoc);
|
||||
#else
|
||||
cellSync2.Todo("cellSync2QueueEstimateBufferSize(attr_addr=0x%x, bufferSize_addr=0x%x)", attr.addr(), bufferSize.addr());
|
||||
|
||||
if (attr->elementSize == 0 || attr->elementSize > 16384 || attr->elementSize % 16 || attr->depth == 0 || attr->depth > 4294967292 ||
|
||||
@ -324,95 +199,54 @@ s64 cellSync2QueueEstimateBufferSize(vm::ptr<const CellSync2QueueAttribute> attr
|
||||
return CELL_SYNC2_ERROR_INVAL;
|
||||
|
||||
return CELL_OK;
|
||||
#endif
|
||||
}
|
||||
|
||||
s64 cellSync2QueueInitialize()
|
||||
s32 cellSync2QueueInitialize()
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellSync2.Warning("%s()", __FUNCTION__);
|
||||
return GetCurrentPPUThread().FastCall2(libsync2 + 0x3F98, libsync2_rtoc);
|
||||
#else
|
||||
UNIMPLEMENTED_FUNC(cellSync2);
|
||||
return CELL_OK;
|
||||
#endif
|
||||
}
|
||||
|
||||
s64 cellSync2QueueFinalize()
|
||||
s32 cellSync2QueueFinalize()
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellSync2.Warning("%s()", __FUNCTION__);
|
||||
return GetCurrentPPUThread().FastCall2(libsync2 + 0x3C28, libsync2_rtoc);
|
||||
#else
|
||||
UNIMPLEMENTED_FUNC(cellSync2);
|
||||
return CELL_OK;
|
||||
#endif
|
||||
}
|
||||
|
||||
s64 cellSync2QueuePush()
|
||||
s32 cellSync2QueuePush()
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellSync2.Warning("%s()", __FUNCTION__);
|
||||
return GetCurrentPPUThread().FastCall2(libsync2 + 0x478C, libsync2_rtoc);
|
||||
#else
|
||||
UNIMPLEMENTED_FUNC(cellSync2);
|
||||
return CELL_OK;
|
||||
#endif
|
||||
}
|
||||
|
||||
s64 cellSync2QueueTryPush()
|
||||
s32 cellSync2QueueTryPush()
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellSync2.Warning("%s()", __FUNCTION__);
|
||||
return GetCurrentPPUThread().FastCall2(libsync2 + 0x4680, libsync2_rtoc);
|
||||
#else
|
||||
UNIMPLEMENTED_FUNC(cellSync2);
|
||||
return CELL_OK;
|
||||
#endif
|
||||
}
|
||||
|
||||
s64 cellSync2QueuePop()
|
||||
s32 cellSync2QueuePop()
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellSync2.Warning("%s()", __FUNCTION__);
|
||||
return GetCurrentPPUThread().FastCall2(libsync2 + 0x4974, libsync2_rtoc);
|
||||
#else
|
||||
UNIMPLEMENTED_FUNC(cellSync2);
|
||||
return CELL_OK;
|
||||
#endif
|
||||
}
|
||||
|
||||
s64 cellSync2QueueTryPop()
|
||||
s32 cellSync2QueueTryPop()
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellSync2.Warning("%s()", __FUNCTION__);
|
||||
return GetCurrentPPUThread().FastCall2(libsync2 + 0x4880, libsync2_rtoc);
|
||||
#else
|
||||
UNIMPLEMENTED_FUNC(cellSync2);
|
||||
return CELL_OK;
|
||||
#endif
|
||||
}
|
||||
|
||||
s64 cellSync2QueueGetSize()
|
||||
s32 cellSync2QueueGetSize()
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellSync2.Warning("%s()", __FUNCTION__);
|
||||
return GetCurrentPPUThread().FastCall2(libsync2 + 0x2C00, libsync2_rtoc);
|
||||
#else
|
||||
UNIMPLEMENTED_FUNC(cellSync2);
|
||||
return CELL_OK;
|
||||
#endif
|
||||
}
|
||||
|
||||
s64 cellSync2QueueGetDepth()
|
||||
s32 cellSync2QueueGetDepth()
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellSync2.Warning("%s()", __FUNCTION__);
|
||||
return GetCurrentPPUThread().FastCall2(libsync2 + 0x2B90, libsync2_rtoc);
|
||||
#else
|
||||
UNIMPLEMENTED_FUNC(cellSync2);
|
||||
return CELL_OK;
|
||||
#endif
|
||||
}
|
||||
|
||||
Module cellSync2("cellSync2", []()
|
||||
@ -452,37 +286,4 @@ Module cellSync2("cellSync2", []()
|
||||
cellSync2.AddFunc(0x0c9a0ea9, cellSync2QueueTryPop);
|
||||
cellSync2.AddFunc(0x12f0a27d, cellSync2QueueGetSize);
|
||||
cellSync2.AddFunc(0xf0e1471c, cellSync2QueueGetDepth);
|
||||
|
||||
#ifdef PRX_DEBUG
|
||||
CallAfter([]()
|
||||
{
|
||||
if (!Memory.MainMem.GetStartAddr()) return;
|
||||
|
||||
libsync2 = (u32)Memory.MainMem.AllocAlign(sizeof(libsync2_data), 0x100000);
|
||||
memcpy(vm::get_ptr<void>(libsync2), libsync2_data, sizeof(libsync2_data));
|
||||
libsync2_rtoc = libsync2 + 0xF280;
|
||||
|
||||
extern Module* sysPrxForUser;
|
||||
extern Module* cellSpurs;
|
||||
extern Module* cellSpursJq;
|
||||
extern Module* cellFiber;
|
||||
|
||||
FIX_IMPORT(cellSpurs, _cellSpursSendSignal , libsync2 + 0x61F0);
|
||||
FIX_IMPORT(cellSpursJq, cellSpursJobQueueSendSignal , libsync2 + 0x6210);
|
||||
FIX_IMPORT(cellFiber, cellFiberPpuUtilWorkerControlSendSignal , libsync2 + 0x6230);
|
||||
FIX_IMPORT(cellFiber, cellFiberPpuSelf , libsync2 + 0x6250);
|
||||
FIX_IMPORT(cellFiber, cellFiberPpuWaitSignal , libsync2 + 0x6270);
|
||||
FIX_IMPORT(sysPrxForUser, sys_lwmutex_lock , libsync2 + 0x6290);
|
||||
FIX_IMPORT(sysPrxForUser, sys_lwmutex_unlock , libsync2 + 0x62B0);
|
||||
FIX_IMPORT(sysPrxForUser, sys_lwmutex_create , libsync2 + 0x62D0);
|
||||
FIX_IMPORT(sysPrxForUser, sys_ppu_thread_get_id , libsync2 + 0x62F0);
|
||||
FIX_IMPORT(sysPrxForUser, _sys_memset , libsync2 + 0x6310);
|
||||
FIX_IMPORT(sysPrxForUser, _sys_printf , libsync2 + 0x6330);
|
||||
fix_import(sysPrxForUser, 0x9FB6228E , libsync2 + 0x6350);
|
||||
FIX_IMPORT(sysPrxForUser, sys_lwmutex_destroy , libsync2 + 0x6370);
|
||||
FIX_IMPORT(sysPrxForUser, _sys_strncpy , libsync2 + 0x6390);
|
||||
|
||||
fix_relocs(cellSync2, libsync2, 0x73A0, 0x95A0, 0x6B90);
|
||||
});
|
||||
#endif
|
||||
});
|
||||
|
@ -126,7 +126,7 @@ s32 sys_prx_get_module_id_by_address()
|
||||
s32 sys_prx_get_module_id_by_name()
|
||||
{
|
||||
sys_prx.Todo("sys_prx_get_module_id_by_name()");
|
||||
return CELL_OK;
|
||||
return CELL_PRX_ERROR_UNKNOWN_MODULE;
|
||||
}
|
||||
|
||||
s32 sys_prx_get_module_info()
|
||||
|
@ -134,7 +134,7 @@ namespace loader
|
||||
|
||||
auto armv7_thr_stop_data = vm::psv::ptr<u32>::make(Memory.PSV.RAM.AllocAlign(3 * 4));
|
||||
armv7_thr_stop_data[0] = 0xf870; // HACK instruction (Thumb)
|
||||
armv7_thr_stop_data[1] = 0x0001; // index 1
|
||||
armv7_thr_stop_data[1] = SFI_HLE_RETURN;
|
||||
Emu.SetCPUThreadStop(armv7_thr_stop_data.addr());
|
||||
|
||||
u32 entry = 0; // actual entry point (ELFs entry point is ignored)
|
||||
@ -228,28 +228,34 @@ namespace loader
|
||||
const u32 nid = fnid[j];
|
||||
const u32 addr = fstub[j];
|
||||
|
||||
if (auto func = get_psv_func_by_nid(nid))
|
||||
u32 index;
|
||||
|
||||
if (auto func = get_psv_func_by_nid(nid, &index))
|
||||
{
|
||||
if (func->module)
|
||||
{
|
||||
func->module->Notice("Imported function %s (nid=0x%08x, addr=0x%x)", func->name, nid, addr);
|
||||
LOG_NOTICE(LOADER, "Imported function '%s' in module '%s' (nid=0x%08x, addr=0x%x)", func->name, func->module->GetName(), nid, addr);
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG_NOTICE(LOADER, "Imported function %s (nid=0x%08x, addr=0x%x)", func->name, nid, addr);
|
||||
LOG_NOTICE(LOADER, "Imported function '%s' (nid=0x%08x, addr=0x%x)", func->name, nid, addr);
|
||||
}
|
||||
|
||||
const u32 code = get_psv_func_index(func);
|
||||
vm::psv::write32(addr + 0, 0xe0700090 | (code & 0xfff0) << 4 | (code & 0xf)); // HACK instruction (ARM)
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG_ERROR(LOADER, "Unknown function 0x%08x (addr=0x%x)", nid, addr);
|
||||
|
||||
vm::psv::write32(addr + 0, 0xe0700090); // HACK instruction (ARM), unimplemented stub (code 0)
|
||||
vm::psv::write32(addr + 4, nid); // nid
|
||||
psv_func unimplemented;
|
||||
unimplemented.nid = nid;
|
||||
unimplemented.module = nullptr;
|
||||
unimplemented.name = "UNKNOWN"; // TODO: set correct name if possible
|
||||
unimplemented.func = nullptr;
|
||||
|
||||
index = add_psv_func(unimplemented);
|
||||
}
|
||||
|
||||
vm::psv::write32(addr + 0, 0xe0700090 | (index & 0xfff0) << 4 | (index & 0xf)); // HACK instruction (ARM)
|
||||
|
||||
code_end = std::min<u32>(addr, code_end);
|
||||
}
|
||||
}
|
||||
|
@ -303,6 +303,7 @@ namespace loader
|
||||
|
||||
std::vector<u32> start_funcs;
|
||||
std::vector<u32> stop_funcs;
|
||||
std::vector<u32> exit_funcs;
|
||||
|
||||
//load modules
|
||||
vfsDir lle_dir("/dev_flash/sys/external");
|
||||
@ -341,12 +342,48 @@ namespace loader
|
||||
{
|
||||
for (auto &e : m.second.exports)
|
||||
{
|
||||
auto code = vm::ptr<const u32>::make(vm::check_addr(e.second, 8) ? vm::read32(e.second) : 0);
|
||||
|
||||
bool is_empty = !code || (code[0] == 0x38600000 && code[1] == BLR());
|
||||
|
||||
if (!code)
|
||||
{
|
||||
LOG_ERROR(LOADER, "bad OPD of special function 0x%08x in '%s' library (0x%x)", e.first, info.name.c_str(), code);
|
||||
}
|
||||
|
||||
switch (e.first)
|
||||
{
|
||||
case 0xbc9a0086: start_funcs.push_back(e.second); break;
|
||||
case 0xab779874: stop_funcs.push_back(e.second); break;
|
||||
case 0xbc9a0086:
|
||||
{
|
||||
if (!is_empty)
|
||||
{
|
||||
LOG_ERROR(LOADER, "start func found in '%s' library (0x%x)", info.name.c_str(), code);
|
||||
start_funcs.push_back(e.second);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
default: LOG_ERROR(LOADER, "unknown special func 0x%08x in '%s' library", e.first, info.name.c_str()); break;
|
||||
case 0xab779874:
|
||||
{
|
||||
if (!is_empty)
|
||||
{
|
||||
LOG_ERROR(LOADER, "stop func found in '%s' library (0x%x)", info.name.c_str(), code);
|
||||
stop_funcs.push_back(e.second);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case 0x3ab9a95e:
|
||||
{
|
||||
if (!is_empty)
|
||||
{
|
||||
LOG_ERROR(LOADER, "exit func found in '%s' library (0x%x)", info.name.c_str(), code);
|
||||
exit_funcs.push_back(e.second);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
default: LOG_ERROR(LOADER, "unknown special func 0x%08x in '%s' library (0x%x)", e.first, info.name.c_str(), code); break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -385,8 +422,15 @@ namespace loader
|
||||
LOG_NOTICE(LOADER, "Imported function '%s' (0x%x)", SysCalls::GetHLEFuncName(nid), addr);
|
||||
}
|
||||
|
||||
vm::write32(addr + 0, HACK(index));
|
||||
vm::write32(addr + 4, BLR());
|
||||
if (!vm::check_addr(addr, 8))
|
||||
{
|
||||
LOG_ERROR(LOADER, "Failed to inject code for function '%s' (0x%x)", SysCalls::GetHLEFuncName(nid), addr);
|
||||
}
|
||||
else
|
||||
{
|
||||
vm::write32(addr + 0, HACK(index));
|
||||
vm::write32(addr + 4, BLR());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user