From da9c778a4c691b7d1a004fc2a1fb877095b077d0 Mon Sep 17 00:00:00 2001 From: DH Date: Sat, 23 Nov 2013 20:50:54 +0200 Subject: [PATCH] Improved RAW SPU Fixed sc binder_func_10 --- rpcs3/Emu/CPU/CPUThread.h | 2 +- rpcs3/Emu/Cell/MFC.h | 6 +- rpcs3/Emu/Cell/RawSPUThread.cpp | 24 ++++++-- rpcs3/Emu/Cell/SPUInterpreter.h | 103 ++++++++++++++++++++++++++------ rpcs3/Emu/Cell/SPUThread.cpp | 9 ++- rpcs3/Emu/Cell/SPUThread.h | 19 +++--- rpcs3/Emu/SysCalls/SC_FUNC.h | 2 +- 7 files changed, 125 insertions(+), 40 deletions(-) diff --git a/rpcs3/Emu/CPU/CPUThread.h b/rpcs3/Emu/CPU/CPUThread.h index bde7140c8b..9568e80dbd 100644 --- a/rpcs3/Emu/CPU/CPUThread.h +++ b/rpcs3/Emu/CPU/CPUThread.h @@ -1,6 +1,6 @@ #pragma once #include "Emu/Memory/MemoryBlock.h" -#include "Emu/Cell/PPCDecoder.h" +#include "Emu/CPU/CPUDecoder.h" enum CPUThreadType { diff --git a/rpcs3/Emu/Cell/MFC.h b/rpcs3/Emu/Cell/MFC.h index 7031505600..c928078c46 100644 --- a/rpcs3/Emu/Cell/MFC.h +++ b/rpcs3/Emu/Cell/MFC.h @@ -163,16 +163,16 @@ struct DMAC if(proxy_pos) { DMAC_Proxy p = proxy[0]; - memcpy(proxy, proxy + 1, proxy_pos--); + memcpy(proxy, proxy + 1, --proxy_pos * sizeof(DMAC_Proxy)); switch(p.cmd) { case MFC_PUT_CMD: - memcpy(Memory + ls_offset + p.lsa, Memory + p.ea, p.size); + memcpy(Memory + p.ea, Memory + ls_offset + p.lsa, p.size); break; case MFC_GET_CMD: - memcpy(Memory + p.ea, Memory + ls_offset + p.lsa, p.size); + memcpy(Memory + ls_offset + p.lsa, Memory + p.ea, p.size); break; default: diff --git a/rpcs3/Emu/Cell/RawSPUThread.cpp b/rpcs3/Emu/Cell/RawSPUThread.cpp index 6cf6b212f8..86d8addf0c 100644 --- a/rpcs3/Emu/Cell/RawSPUThread.cpp +++ b/rpcs3/Emu/Cell/RawSPUThread.cpp @@ -11,7 +11,14 @@ RawSPUThread::RawSPUThread(u32 index, CPUThreadType type) RawSPUThread::~RawSPUThread() { - MemoryBlock::Delete(); + for(int i=0; iDecodeMemory(PC + m_offset)); for(uint i=0; i : public fun public: binder_func_10(func_t call) : func_caller(), m_call(call) {} - virtual void operator()() { declCPU(); m_call(ARG(1), ARG(2), ARG(3), ARG(4), ARG(5), ARG(6), ARG(7), ARG(8), ARG(9), ARG(10), ARG(11)); } + virtual void operator()() { declCPU(); m_call(ARG(1), ARG(2), ARG(3), ARG(4), ARG(5), ARG(6), ARG(7), ARG(8), ARG(9), ARG(10)); } }; template