From 34ac4688e6bac6235ac0026a9aae655e042ab632 Mon Sep 17 00:00:00 2001 From: Nekotekina Date: Sun, 8 Dec 2013 18:03:51 +0400 Subject: [PATCH] MFC Minor changes --- rpcs3/Emu/Cell/MFC.h | 12 ++++++++++ rpcs3/Emu/Cell/SPUThread.h | 46 ++++++++++++++------------------------ 2 files changed, 29 insertions(+), 29 deletions(-) diff --git a/rpcs3/Emu/Cell/MFC.h b/rpcs3/Emu/Cell/MFC.h index c928078c46..c15947cbc7 100644 --- a/rpcs3/Emu/Cell/MFC.h +++ b/rpcs3/Emu/Cell/MFC.h @@ -5,6 +5,18 @@ enum { MFC_PUT_CMD = 0x20, MFC_GET_CMD = 0x40, + MFC_PUTL_CMD = 0x24, + MFC_GETL_CMD = 0x44, + MFC_GETLLAR_CMD = 0xD0, + MFC_PUTLLC_CMD = 0xB4, + MFC_PUTLLUC_CMD = 0xB0, + MFC_PUTQLLUC_CMD= 0xB8, + MFC_SNDSIG_CMD = 0xA0, + MFC_BARRIER_CMD = 0xC0, + MFC_EIEIO_CMD = 0xC8, + MFC_SYNC_CMD = 0xCC, + MFC_BARRIER_MASK= 0x01, + MFC_FENCE_MASK = 0x02, MFC_MASK_CMD = 0xffff, }; diff --git a/rpcs3/Emu/Cell/SPUThread.h b/rpcs3/Emu/Cell/SPUThread.h index 020882af20..1745fc37b6 100644 --- a/rpcs3/Emu/Cell/SPUThread.h +++ b/rpcs3/Emu/Cell/SPUThread.h @@ -358,7 +358,7 @@ public: u32 cmd = MFC.CMDStatus.GetValue(); u16 op = cmd & MFC_MASK_CMD; - switch(op & (MFC_PUT_CMD | MFC_GET_CMD)) + switch(op & ~(MFC_BARRIER_MASK | MFC_FENCE_MASK)) { case MFC_PUT_CMD: case MFC_GET_CMD: @@ -391,34 +391,6 @@ public: { switch(ch) { - case SPU_RdEventStat: //Read event status with mask applied - case SPU_WrEventMask: //Write event mask - case SPU_WrEventAck: //Write end of event processing - case SPU_RdSigNotify1: //Signal notification 1 - case SPU_RdSigNotify2: //Signal notification 2 - case SPU_WrDec: //Write decrementer count - case SPU_RdDec: //Read decrementer count - case SPU_RdEventMask: //Read event mask - case SPU_RdMachStat: //Read SPU run status - case SPU_WrSRR0: //Write SPU machine state save/restore register 0 (SRR0) - case SPU_RdSRR0: //Read SPU machine state save/restore register 0 (SRR0) - case MFC_WrMSSyncReq: //Write multisource synchronization request - case MFC_RdTagMask: //Read tag mask - case MFC_LSA: //Write local memory address command parameter - case MFC_EAH: //Write high order DMA effective address command parameter - case MFC_EAL: //Write low order DMA effective address command parameter - case MFC_Size: //Write DMA transfer size command parameter - case MFC_TagID: //Write tag identifier command parameter - case MFC_Cmd: //Write and enqueue DMA command with associated class ID - case MFC_WrTagMask: //Write tag mask - case MFC_WrTagUpdate: //Write request for conditional or unconditional tag status update - case MFC_RdTagStat: //Read tag status with mask applied - case MFC_RdListStallStat: //Read DMA list stall-and-notify status - case MFC_WrListStallAck: //Write DMA list stall-and-notify acknowledge - case MFC_RdAtomicStat: //Read completion status of last completed immediate MFC atomic update command - ConLog.Error("%s error: unimplemented channel (%s).", __FUNCTION__, spu_ch_name[ch]); - break; - case SPU_WrOutMbox: return SPU.Out_MBox.GetFreeCount(); @@ -428,6 +400,22 @@ public: case SPU_WrOutIntrMbox: return 0;//return SPU.OutIntr_Mbox.GetFreeCount(); + case MFC_LSA: + return MFC.LSA.max_count; + + case MFC_EAH: + return MFC.EAH.max_count; + + case MFC_EAL: + return MFC.EAL.max_count; + + case MFC_Size: + case MFC_TagID: + return MFC.Size_Tag.max_count; + + case MFC_Cmd: + return MFC.CMDStatus.max_count; + default: ConLog.Error("%s error: unknown/illegal channel (%d [%s]).", __FUNCTION__, ch, spu_ch_name[ch]); break;