diff --git a/rpcs3/Emu/GS/GCM.h b/rpcs3/Emu/GS/GCM.h index 28fbdb2265..8d57541ff6 100644 --- a/rpcs3/Emu/GS/GCM.h +++ b/rpcs3/Emu/GS/GCM.h @@ -132,6 +132,13 @@ enum CELL_GCM_ZCULL_STATS3 = 5, }; +// GPU Class Handles +enum +{ + CELL_GCM_CONTEXT_SURFACE2D = 0x313371C3, + CELL_GCM_CONTEXT_SWIZZLE2D = 0x31337A73, +}; + struct CellGcmControl { be_t put; diff --git a/rpcs3/Emu/GS/RSXThread.cpp b/rpcs3/Emu/GS/RSXThread.cpp index 096ef0de48..e2b0fe61c8 100644 --- a/rpcs3/Emu/GS/RSXThread.cpp +++ b/rpcs3/Emu/GS/RSXThread.cpp @@ -1780,7 +1780,7 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, mem32_ptr_t& args, const u3 case NV3089_SET_CONTEXT_SURFACE: { - if(ARGS(0) != 0x313371C3) + if (ARGS(0) != CELL_GCM_CONTEXT_SURFACE2D) { ConLog.Warning("NV3089_SET_CONTEXT_SURFACE: Unsupported surface (0x%x)", ARGS(0)); } diff --git a/rpcs3/Emu/SysCalls/Modules/cellPngDec.cpp b/rpcs3/Emu/SysCalls/Modules/cellPngDec.cpp index 448677dad1..eb7537f3d8 100644 --- a/rpcs3/Emu/SysCalls/Modules/cellPngDec.cpp +++ b/rpcs3/Emu/SysCalls/Modules/cellPngDec.cpp @@ -68,11 +68,11 @@ int cellPngDecOpen(u32 mainHandle, mem32_t subHandle, mem_ptr_t s switch(src->srcSelect.ToBE()) { - case const_se_t::value: + case se32(CELL_PNGDEC_BUFFER): current_subHandle->fileSize = src->streamSize.ToLE(); break; - case const_se_t::value: + case se32(CELL_PNGDEC_FILE): // Get file descriptor MemoryAllocator> fd; int ret = cellFsOpen(src->fileName_addr, 0, fd.GetAddr(), 0, 0); @@ -128,12 +128,12 @@ int cellPngDecReadHeader(u32 mainHandle, u32 subHandle, mem_ptr_t> buffer(34); // Alloc buffer for PNG header MemoryAllocator> pos, nread; - switch(subHandle_data->src.srcSelect.ToLE()) + switch(subHandle_data->src.srcSelect.ToBE()) { - case CELL_PNGDEC_BUFFER: + case se32(CELL_PNGDEC_BUFFER): Memory.Copy(buffer.GetAddr(), subHandle_data->src.streamPtr.ToLE(), buffer.GetSize()); break; - case CELL_PNGDEC_FILE: + case se32(CELL_PNGDEC_FILE): cellFsLseek(fd, 0, CELL_SEEK_SET, pos.GetAddr()); cellFsRead(fd, buffer.GetAddr(), buffer.GetSize(), nread.GetAddr()); break; diff --git a/rpcs3/Emu/SysCalls/SysCalls.cpp b/rpcs3/Emu/SysCalls/SysCalls.cpp index 7ee82b5eb5..4bff0b64d7 100644 --- a/rpcs3/Emu/SysCalls/SysCalls.cpp +++ b/rpcs3/Emu/SysCalls/SysCalls.cpp @@ -533,18 +533,6 @@ void default_syscall() //TODO: remove this switch(code) { - /* - //process - case 2: RESULT(lv2ProcessWaitForChild(CPU)); return; - case 4: RESULT(lv2ProcessGetStatus(CPU)); return; - case 5: RESULT(lv2ProcessDetachChild(CPU)); return; - case 12: RESULT(lv2ProcessGetNumberOfObject(CPU)); return; - case 13: RESULT(lv2ProcessGetId(CPU)); return; - case 18: RESULT(lv2ProcessGetPpid(CPU)); return; - case 19: RESULT(lv2ProcessKill(CPU)); return; - case 23: RESULT(lv2ProcessWaitForChild2(CPU)); return; - case 25: RESULT(lv2ProcessGetSdkVersion(CPU)); return; - */ //tty case 988: ConLog.Warning("SysCall 988! r3: 0x%llx, r4: 0x%llx, pc: 0x%llx", @@ -583,7 +571,7 @@ void SysCalls::DoSyscall(u32 code) } - ConLog.Error("Unknown function 0x%08x", code); + ConLog.Error("TODO: %s", GetHLEFuncName(code).c_str()); declCPU(); RESULT(0); }