From 0f602e0e13d8fec6a604a1e254e168e70c764f7f Mon Sep 17 00:00:00 2001 From: Nekotekina Date: Tue, 28 Oct 2014 19:46:14 +0300 Subject: [PATCH] Bugfix --- rpcs3/Emu/Cell/SPURecompiler.h | 16 ++++----- rpcs3/Emu/SysCalls/Modules/cellAtrac.cpp | 46 ++++++++++++------------ 2 files changed, 31 insertions(+), 31 deletions(-) diff --git a/rpcs3/Emu/Cell/SPURecompiler.h b/rpcs3/Emu/Cell/SPURecompiler.h index d1d3916d8d..437ebbcd97 100644 --- a/rpcs3/Emu/Cell/SPURecompiler.h +++ b/rpcs3/Emu/Cell/SPURecompiler.h @@ -1571,8 +1571,8 @@ private: { // assuming that SP % 16 is always zero const XmmLink& vr = XmmAlloc(rt); - u128 value = u128::from32r(0x10111213, 0x14151617, 0x18191a1b, 0x1c1d1e1f); - value._u8[i7 & 0xf] = 0x03; + u128 value = u128::fromV(_mm_set_epi32(0x10111213, 0x14151617, 0x18191a1b, 0x1c1d1e1f)); + value.u8r[i7 & 0xf] = 0x03; c.movdqa(vr.get(), XmmConst(value.vi)); XmmFinalize(vr, rt); } @@ -1596,8 +1596,8 @@ private: { // assuming that SP % 16 is always zero const XmmLink& vr = XmmAlloc(rt); - u128 value = u128::from32r(0x10111213, 0x14151617, 0x18191a1b, 0x1c1d1e1f); - value._u16[i7 & 0x7] = 0x0203; + u128 value = u128::fromV(_mm_set_epi32(0x10111213, 0x14151617, 0x18191a1b, 0x1c1d1e1f)); + value.u16r[(i7 >> 1) & 0x7] = 0x0203; c.movdqa(vr.get(), XmmConst(value.vi)); XmmFinalize(vr, rt); } @@ -1621,8 +1621,8 @@ private: { // assuming that SP % 16 is always zero const XmmLink& vr = XmmAlloc(rt); - u128 value = u128::from32r(0x10111213, 0x14151617, 0x18191a1b, 0x1c1d1e1f); - value._u32[i7 & 0x3] = 0x00010203; + u128 value = u128::fromV(_mm_set_epi32(0x10111213, 0x14151617, 0x18191a1b, 0x1c1d1e1f)); + value.u32r[(i7 >> 2) & 0x3] = 0x00010203; c.movdqa(vr.get(), XmmConst(value.vi)); XmmFinalize(vr, rt); } @@ -1646,8 +1646,8 @@ private: { // assuming that SP % 16 is always zero const XmmLink& vr = XmmAlloc(rt); - u128 value = u128::from32r(0x10111213, 0x14151617, 0x18191a1b, 0x1c1d1e1f); - value._u64[i7 & 0x1] = 0x0001020304050607ull; + u128 value = u128::fromV(_mm_set_epi32(0x10111213, 0x14151617, 0x18191a1b, 0x1c1d1e1f)); + value.u64r[(i7 >> 3) & 0x1] = 0x0001020304050607ull; c.movdqa(vr.get(), XmmConst(value.vi)); XmmFinalize(vr, rt); } diff --git a/rpcs3/Emu/SysCalls/Modules/cellAtrac.cpp b/rpcs3/Emu/SysCalls/Modules/cellAtrac.cpp index d2cf50a532..57442cdd91 100644 --- a/rpcs3/Emu/SysCalls/Modules/cellAtrac.cpp +++ b/rpcs3/Emu/SysCalls/Modules/cellAtrac.cpp @@ -15,7 +15,7 @@ u32 libatrac3plus_rtoc; s32 cellAtracSetDataAndGetMemSize(vm::ptr pHandle, u32 pucBufferAddr, u32 uiReadByte, u32 uiBufferByte, vm::ptr puiWorkMemByte) { - cellAtrac->Todo("cellAtracSetDataAndGetMemSize(pHandle=0x%x, pucBufferAddr=0x%x, uiReadByte=0x%x, uiBufferByte=0x%x, puiWorkMemByte_addr=0x%x)", + 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); @@ -27,7 +27,7 @@ s32 cellAtracSetDataAndGetMemSize(vm::ptr pHandle, u32 pucBuffe s32 cellAtracCreateDecoder(vm::ptr pHandle, u32 pucWorkMem_addr, u32 uiPpuThreadPriority, u32 uiSpuThreadPriority) { - cellAtrac->Todo("cellAtracCreateDecoder(pHandle=0x%x, pucWorkMem_addr=0x%x, uiPpuThreadPriority=%d, uiSpuThreadPriority=%d)", + 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); @@ -39,7 +39,7 @@ s32 cellAtracCreateDecoder(vm::ptr pHandle, u32 pucWorkMem_addr s32 cellAtracCreateDecoderExt(vm::ptr pHandle, u32 pucWorkMem_addr, u32 uiPpuThreadPriority, vm::ptr pExtRes) { - cellAtrac->Todo("cellAtracCreateDecoderExt(pHandle=0x%x, pucWorkMem_addr=0x%x, uiPpuThreadPriority=%d, pExtRes_addr=0x%x)", + 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); @@ -51,7 +51,7 @@ s32 cellAtracCreateDecoderExt(vm::ptr pHandle, u32 pucWorkMem_a s32 cellAtracDeleteDecoder(vm::ptr pHandle) { - cellAtrac->Todo("cellAtracDeleteDecoder(pHandle=0x%x)", pHandle.addr()); + cellAtrac->Warning("cellAtracDeleteDecoder(pHandle=0x%x)", pHandle.addr()); #ifdef PRX_DEBUG return GetCurrentPPUThread().FastCall2(libatrac3plus + 0x0D08, libatrac3plus_rtoc); #endif @@ -61,7 +61,7 @@ s32 cellAtracDeleteDecoder(vm::ptr pHandle) s32 cellAtracDecode(vm::ptr pHandle, u32 pfOutAddr, vm::ptr puiSamples, vm::ptr puiFinishflag, vm::ptr piRemainFrame) { - cellAtrac->Todo("cellAtracDecode(pHandle=0x%x, pfOutAddr=0x%x, puiSamples_addr=0x%x, puiFinishFlag_addr=0x%x, piRemainFrame_addr=0x%x)", + 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); @@ -75,7 +75,7 @@ s32 cellAtracDecode(vm::ptr pHandle, u32 pfOutAddr, vm::ptr pHandle, vm::ptr ppucWritePointer, vm::ptr puiWritableByte, vm::ptr puiReadPosition) { - cellAtrac->Todo("cellAtracGetStreamDataInfo(pHandle=0x%x, ppucWritePointer_addr=0x%x, puiWritableByte_addr=0x%x, puiReadPosition_addr=0x%x)", + 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); @@ -89,7 +89,7 @@ s32 cellAtracGetStreamDataInfo(vm::ptr pHandle, vm::ptr pp s32 cellAtracAddStreamData(vm::ptr pHandle, u32 uiAddByte) { - cellAtrac->Todo("cellAtracAddStreamData(pHandle=0x%x, uiAddByte=0x%x)", pHandle.addr(), uiAddByte); + cellAtrac->Warning("cellAtracAddStreamData(pHandle=0x%x, uiAddByte=0x%x)", pHandle.addr(), uiAddByte); #ifdef PRX_DEBUG return GetCurrentPPUThread().FastCall2(libatrac3plus + 0x0AFC, libatrac3plus_rtoc); #endif @@ -99,7 +99,7 @@ s32 cellAtracAddStreamData(vm::ptr pHandle, u32 uiAddByte) s32 cellAtracGetRemainFrame(vm::ptr pHandle, vm::ptr piRemainFrame) { - cellAtrac->Todo("cellAtracGetRemainFrame(pHandle=0x%x, piRemainFrame_addr=0x%x)", pHandle.addr(), piRemainFrame.addr()); + 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 @@ -110,7 +110,7 @@ s32 cellAtracGetRemainFrame(vm::ptr pHandle, vm::ptr piRem s32 cellAtracGetVacantSize(vm::ptr pHandle, vm::ptr puiVacantSize) { - cellAtrac->Todo("cellAtracGetVacantSize(pHandle=0x%x, puiVacantSize_addr=0x%x)", pHandle.addr(), puiVacantSize.addr()); + 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 @@ -121,7 +121,7 @@ s32 cellAtracGetVacantSize(vm::ptr pHandle, vm::ptr puiVac s32 cellAtracIsSecondBufferNeeded(vm::ptr pHandle) { - cellAtrac->Todo("cellAtracIsSecondBufferNeeded(pHandle=0x%x)", pHandle.addr()); + cellAtrac->Warning("cellAtracIsSecondBufferNeeded(pHandle=0x%x)", pHandle.addr()); #ifdef PRX_DEBUG return GetCurrentPPUThread().FastCall2(libatrac3plus + 0x0010, libatrac3plus_rtoc); #endif @@ -131,7 +131,7 @@ s32 cellAtracIsSecondBufferNeeded(vm::ptr pHandle) s32 cellAtracGetSecondBufferInfo(vm::ptr pHandle, vm::ptr puiReadPosition, vm::ptr puiDataByte) { - cellAtrac->Todo("cellAtracGetSecondBufferInfo(pHandle=0x%x, puiReadPosition_addr=0x%x, puiDataByte_addr=0x%x)", + 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); @@ -144,7 +144,7 @@ s32 cellAtracGetSecondBufferInfo(vm::ptr pHandle, vm::ptr s32 cellAtracSetSecondBuffer(vm::ptr pHandle, u32 pucSecondBufferAddr, u32 uiSecondBufferByte) { - cellAtrac->Todo("cellAtracSetSecondBuffer(pHandle=0x%x, pucSecondBufferAddr=0x%x, uiSecondBufferByte=0x%x)", + 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); @@ -155,7 +155,7 @@ s32 cellAtracSetSecondBuffer(vm::ptr pHandle, u32 pucSecondBuff s32 cellAtracGetChannel(vm::ptr pHandle, vm::ptr puiChannel) { - cellAtrac->Todo("cellAtracGetChannel(pHandle=0x%x, puiChannel_addr=0x%x)", pHandle.addr(), puiChannel.addr()); + 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 @@ -166,7 +166,7 @@ s32 cellAtracGetChannel(vm::ptr pHandle, vm::ptr puiChanne s32 cellAtracGetMaxSample(vm::ptr pHandle, vm::ptr puiMaxSample) { - cellAtrac->Todo("cellAtracGetMaxSample(pHandle=0x%x, puiMaxSample_addr=0x%x)", pHandle.addr(), puiMaxSample.addr()); + 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 @@ -177,7 +177,7 @@ s32 cellAtracGetMaxSample(vm::ptr pHandle, vm::ptr puiMaxS s32 cellAtracGetNextSample(vm::ptr pHandle, vm::ptr puiNextSample) { - cellAtrac->Todo("cellAtracGetNextSample(pHandle=0x%x, puiNextSample_addr=0x%x)", pHandle.addr(), puiNextSample.addr()); + 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 @@ -188,7 +188,7 @@ s32 cellAtracGetNextSample(vm::ptr pHandle, vm::ptr puiNex s32 cellAtracGetSoundInfo(vm::ptr pHandle, vm::ptr piEndSample, vm::ptr piLoopStartSample, vm::ptr piLoopEndSample) { - cellAtrac->Todo("cellAtracGetSoundInfo(pHandle=0x%x, piEndSample_addr=0x%x, piLoopStartSample_addr=0x%x, piLoopEndSample_addr=0x%x)", + 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); @@ -202,7 +202,7 @@ s32 cellAtracGetSoundInfo(vm::ptr pHandle, vm::ptr piEndSa s32 cellAtracGetNextDecodePosition(vm::ptr pHandle, vm::ptr puiSamplePosition) { - cellAtrac->Todo("cellAtracGetNextDecodePosition(pHandle=0x%x, puiSamplePosition_addr=0x%x)", + cellAtrac->Warning("cellAtracGetNextDecodePosition(pHandle=0x%x, puiSamplePosition_addr=0x%x)", pHandle.addr(), puiSamplePosition.addr()); #ifdef PRX_DEBUG return GetCurrentPPUThread().FastCall2(libatrac3plus + 0x0190, libatrac3plus_rtoc); @@ -214,7 +214,7 @@ s32 cellAtracGetNextDecodePosition(vm::ptr pHandle, vm::ptr pHandle, vm::ptr puiBitrate) { - cellAtrac->Todo("cellAtracGetBitrate(pHandle=0x%x, puiBitrate_addr=0x%x)", + cellAtrac->Warning("cellAtracGetBitrate(pHandle=0x%x, puiBitrate_addr=0x%x)", pHandle.addr(), puiBitrate.addr()); #ifdef PRX_DEBUG return GetCurrentPPUThread().FastCall2(libatrac3plus + 0x0374, libatrac3plus_rtoc); @@ -226,7 +226,7 @@ s32 cellAtracGetBitrate(vm::ptr pHandle, vm::ptr puiBitrat s32 cellAtracGetLoopInfo(vm::ptr pHandle, vm::ptr piLoopNum, vm::ptr puiLoopStatus) { - cellAtrac->Todo("cellAtracGetLoopInfo(pHandle=0x%x, piLoopNum_addr=0x%x, puiLoopStatus_addr=0x%x)", + 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); @@ -239,7 +239,7 @@ s32 cellAtracGetLoopInfo(vm::ptr pHandle, vm::ptr piLoopNu s32 cellAtracSetLoopNum(vm::ptr pHandle, int iLoopNum) { - cellAtrac->Todo("cellAtracSetLoopNum(pHandle=0x%x, iLoopNum=0x%x)", pHandle.addr(), iLoopNum); + cellAtrac->Warning("cellAtracSetLoopNum(pHandle=0x%x, iLoopNum=0x%x)", pHandle.addr(), iLoopNum); #ifdef PRX_DEBUG return GetCurrentPPUThread().FastCall2(libatrac3plus + 0x1538, libatrac3plus_rtoc); #endif @@ -249,7 +249,7 @@ s32 cellAtracSetLoopNum(vm::ptr pHandle, int iLoopNum) s32 cellAtracGetBufferInfoForResetting(vm::ptr pHandle, u32 uiSample, vm::ptr pBufferInfo) { - cellAtrac->Todo("cellAtracGetBufferInfoForResetting(pHandle=0x%x, uiSample=0x%x, pBufferInfo_addr=0x%x)", + 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); @@ -264,7 +264,7 @@ s32 cellAtracGetBufferInfoForResetting(vm::ptr pHandle, u32 uiS s32 cellAtracResetPlayPosition(vm::ptr pHandle, u32 uiSample, u32 uiWriteByte) { - cellAtrac->Todo("cellAtracResetPlayPosition(pHandle=0x%x, uiSample=0x%x, uiWriteByte=0x%x)", + 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); @@ -275,7 +275,7 @@ s32 cellAtracResetPlayPosition(vm::ptr pHandle, u32 uiSample, u s32 cellAtracGetInternalErrorInfo(vm::ptr pHandle, vm::ptr piResult) { - cellAtrac->Todo("cellAtracGetInternalErrorInfo(pHandle=0x%x, piResult_addr=0x%x)", + cellAtrac->Warning("cellAtracGetInternalErrorInfo(pHandle=0x%x, piResult_addr=0x%x)", pHandle.addr(), piResult.addr()); #ifdef PRX_DEBUG return GetCurrentPPUThread().FastCall2(libatrac3plus + 0x02E4, libatrac3plus_rtoc);