From 6305d4edf98449522e247d3df4d75e9b95e1adbc Mon Sep 17 00:00:00 2001 From: Raul Tambre Date: Thu, 16 Jul 2015 14:31:59 +0300 Subject: [PATCH] Minor savedata fix and cellSail callback fixes --- rpcs3/Emu/SysCalls/Modules/cellSail.cpp | 3 +- rpcs3/Emu/SysCalls/Modules/cellSail.h | 92 ++++++++++----------- rpcs3/Emu/SysCalls/Modules/cellSaveData.cpp | 2 +- 3 files changed, 49 insertions(+), 48 deletions(-) diff --git a/rpcs3/Emu/SysCalls/Modules/cellSail.cpp b/rpcs3/Emu/SysCalls/Modules/cellSail.cpp index 8c7b302b89..1cb397cfc2 100644 --- a/rpcs3/Emu/SysCalls/Modules/cellSail.cpp +++ b/rpcs3/Emu/SysCalls/Modules/cellSail.cpp @@ -8,12 +8,13 @@ extern Module cellSail; +// TODO: Create an internal cellSail thread + s32 cellSailMemAllocatorInitialize(vm::ptr pSelf, vm::ptr pCallbacks) { cellSail.Warning("cellSailMemAllocatorInitialize(pSelf_addr=0x%x, pCallbacks_addr=0x%x)", pSelf.addr(), pCallbacks.addr()); pSelf->callbacks = pCallbacks; - // TODO: Create a cellSail thread return CELL_OK; } diff --git a/rpcs3/Emu/SysCalls/Modules/cellSail.h b/rpcs3/Emu/SysCalls/Modules/cellSail.h index 93167e3967..7d1b886748 100644 --- a/rpcs3/Emu/SysCalls/Modules/cellSail.h +++ b/rpcs3/Emu/SysCalls/Modules/cellSail.h @@ -620,64 +620,64 @@ union CellSailEvent }; }; -typedef vm::ptr(CellSailMemAllocatorFuncAlloc)(vm::ptr pArg, u32 boundary, u32 size); -typedef u32(CellSailMemAllocatorFuncFree)(vm::ptr pArg, u32 boundary, vm::ptr pMemory); +typedef vm::ptr(CellSailMemAllocatorFuncAlloc)(vm::ptr pArg, u32 boundary, u32 size); +typedef void(CellSailMemAllocatorFuncFree)(vm::ptr pArg, u32 boundary, vm::ptr pMemory); -typedef s32(CellSailSoundAdapterFuncMakeup)(vm::ptr pArg); -typedef s32(CellSailSoundAdapterFuncCleanup)(vm::ptr pArg); -typedef u32(CellSailSoundAdapterFuncFormatChanged)(vm::ptr pArg, vm::ptr pFormat, u32 sessionId); +typedef s32(CellSailSoundAdapterFuncMakeup)(vm::ptr pArg); +typedef s32(CellSailSoundAdapterFuncCleanup)(vm::ptr pArg); +typedef void(CellSailSoundAdapterFuncFormatChanged)(vm::ptr pArg, vm::ptr pFormat, u32 sessionId); -typedef s32(CellSailGraphicsAdapterFuncMakeup)(vm::ptr pArg); -typedef s32(CellSailGraphicsAdapterFuncCleanup)(vm::ptr pArg); -typedef u32(CellSailGraphicsAdapterFuncFormatChanged)(vm::ptr pArg, vm::ptr pFormat, u32 sessionId); -typedef s32(CellSailGraphicsAdapterFuncAllocFrame)(vm::ptr pArg, u32 size, s32 num, vm::ptr ppFrame); -typedef s32(CellSailGraphicsAdapterFuncFreeFrame)(vm::ptr pArg, s32 num, vm::ptr ppFrame); +typedef s32(CellSailGraphicsAdapterFuncMakeup)(vm::ptr pArg); +typedef s32(CellSailGraphicsAdapterFuncCleanup)(vm::ptr pArg); +typedef void(CellSailGraphicsAdapterFuncFormatChanged)(vm::ptr pArg, vm::ptr pFormat, u32 sessionId); +typedef s32(CellSailGraphicsAdapterFuncAllocFrame)(vm::ptr pArg, u32 size, s32 num, vm::pptr ppFrame); +typedef s32(CellSailGraphicsAdapterFuncFreeFrame)(vm::ptr pArg, s32 num, vm::pptr ppFrame); -typedef s32(CellSailSourceFuncMakeup)(vm::ptr pArg, vm::cptr pProtocolNames); -typedef s32(CellSailSourceFuncCleanup)(vm::ptr pArg); -typedef u32(CellSailSourceFuncOpen)(vm::ptr pArg, s32 streamType, vm::ptr pMediaInfo, vm::cptr pUri, vm::ptr pProfile); -typedef u32(CellSailSourceFuncClose)(vm::ptr pArg); -typedef u32(CellSailSourceFuncStart)(vm::ptr pArg, vm::ptr pCommand, u32 sessionId); -typedef u32(CellSailSourceFuncStop)(vm::ptr pArg); -typedef u32(CellSailSourceFuncCancel)(vm::ptr pArg); -typedef s32(CellSailSourceFuncCheckout)(vm::ptr pArg, vm::ptr ppItem); -typedef s32(CellSailSourceFuncCheckin)(vm::ptr pArg, vm::ptr pItem); -typedef s32(CellSailSourceFuncClear)(vm::ptr pArg); -typedef s32(CellSailSourceFuncRead)(vm::ptr pArg, s32 streamType, vm::ptr pMediaInfo, vm::cptr pUri, u64 offset, vm::ptr pBuf, u32 size, vm::ptr pTotalSize); -typedef s32(CellSailSourceFuncReadSync)(vm::ptr pArg, s32 streamType, vm::ptr pMediaInfo, vm::cptr pUri, u64 offset, vm::ptr pBuf, u32 size, vm::ptr pTotalSize); -typedef s32(CellSailSourceFuncGetCapabilities)(vm::ptr pArg, s32 streamType, vm::ptr pMediaInfo, vm::cptr pUri, vm::ptr pCapabilities); -typedef s32(CellSailSourceFuncInquireCapability)(vm::ptr pArg, s32 streamType, vm::ptr pMediaInfo, vm::cptr pUri, vm::ptr pCommand); -typedef u32(CellSailSourceCheckFuncError)(vm::ptr pArg, vm::cptr pMsg, s32 line); +typedef s32(CellSailSourceFuncMakeup)(vm::ptr pArg, vm::cptr pProtocolNames); +typedef s32(CellSailSourceFuncCleanup)(vm::ptr pArg); +typedef void(CellSailSourceFuncOpen)(vm::ptr pArg, s32 streamType, vm::ptr pMediaInfo, vm::cptr pUri, vm::ptr pProfile); +typedef void(CellSailSourceFuncClose)(vm::ptr pArg); +typedef void(CellSailSourceFuncStart)(vm::ptr pArg, vm::ptr pCommand, u32 sessionId); +typedef void(CellSailSourceFuncStop)(vm::ptr pArg); +typedef void(CellSailSourceFuncCancel)(vm::ptr pArg); +typedef s32(CellSailSourceFuncCheckout)(vm::ptr pArg, vm::pptr ppItem); +typedef s32(CellSailSourceFuncCheckin)(vm::ptr pArg, vm::ptr pItem); +typedef s32(CellSailSourceFuncClear)(vm::ptr pArg); +typedef s32(CellSailSourceFuncRead)(vm::ptr pArg, s32 streamType, vm::ptr pMediaInfo, vm::cptr pUri, u64 offset, vm::ptr pBuf, u32 size, vm::ptr pTotalSize); +typedef s32(CellSailSourceFuncReadSync)(vm::ptr pArg, s32 streamType, vm::ptr pMediaInfo, vm::cptr pUri, u64 offset, vm::ptr pBuf, u32 size, vm::ptr pTotalSize); +typedef s32(CellSailSourceFuncGetCapabilities)(vm::ptr pArg, s32 streamType, vm::ptr pMediaInfo, vm::cptr pUri, vm::ptr pCapabilities); +typedef s32(CellSailSourceFuncInquireCapability)(vm::ptr pArg, s32 streamType, vm::ptr pMediaInfo, vm::cptr pUri, vm::ptr pCommand); +typedef void(CellSailSourceCheckFuncError)(vm::ptr pArg, vm::cptr pMsg, s32 line); -typedef s32(CellSailFsFuncOpen)(vm::cptr pPath, s32 flag, vm::ptr pFd, vm::ptr pArg, u64 size); -typedef s32(CellSailFsFuncOpenSecond)(vm::cptr pPath, s32 flag, s32 fd, vm::ptr pArg, u64 size); +typedef s32(CellSailFsFuncOpen)(vm::cptr pPath, s32 flag, vm::ptr pFd, vm::ptr pArg, u64 size); +typedef s32(CellSailFsFuncOpenSecond)(vm::cptr pPath, s32 flag, s32 fd, vm::ptr pArg, u64 size); typedef s32(CellSailFsFuncClose)(s32 fd); typedef s32(CellSailFsFuncFstat)(s32 fd, vm::ptr pStat_addr); typedef s32(CellSailFsFuncRead)(s32 fd, vm::ptr pBuf, u64 numBytes, vm::ptr pNumRead); typedef s32(CellSailFsFuncLseek)(s32 fd, s64 offset, s32 whence, vm::ptr pPosition); typedef s32(CellSailFsFuncCancel)(s32 fd); -typedef s32(CellSailRendererAudioFuncMakeup)(vm::ptr pArg); -typedef s32(CellSailRendererAudioFuncCleanup)(vm::ptr pArg); -typedef u32(CellSailRendererAudioFuncOpen)(vm::ptr pArg, vm::ptr pInfo, u32 frameNum); -typedef u32(CellSailRendererAudioFuncClose)(vm::ptr pArg); -typedef u32(CellSailRendererAudioFuncStart)(vm::ptr pArg, bool buffering); -typedef u32(CellSailRendererAudioFuncStop)(vm::ptr pArg, bool flush); -typedef u32(CellSailRendererAudioFuncCancel)(vm::ptr pArg); -typedef s32(CellSailRendererAudioFuncCheckout)(vm::ptr pArg, vm::ptr ppInfo); -typedef s32(CellSailRendererAudioFuncCheckin)(vm::ptr pArg, vm::ptr pInfo); +typedef s32(CellSailRendererAudioFuncMakeup)(vm::ptr pArg); +typedef s32(CellSailRendererAudioFuncCleanup)(vm::ptr pArg); +typedef void(CellSailRendererAudioFuncOpen)(vm::ptr pArg, vm::ptr pInfo, u32 frameNum); +typedef void(CellSailRendererAudioFuncClose)(vm::ptr pArg); +typedef void(CellSailRendererAudioFuncStart)(vm::ptr pArg, bool buffering); +typedef void(CellSailRendererAudioFuncStop)(vm::ptr pArg, bool flush); +typedef void(CellSailRendererAudioFuncCancel)(vm::ptr pArg); +typedef s32(CellSailRendererAudioFuncCheckout)(vm::ptr pArg, vm::pptr ppInfo); +typedef s32(CellSailRendererAudioFuncCheckin)(vm::ptr pArg, vm::ptr pInfo); -typedef s32(CellSailRendererVideoFuncMakeup)(vm::ptr pArg); -typedef s32(CellSailRendererVideoFuncCleanup)(vm::ptr pArg); -typedef u32(CellSailRendererVideoFuncOpen)(vm::ptr pArg, vm::ptr pInfo, u32 frameNum, u32 minFrameNum); -typedef u32(CellSailRendererVideoFuncClose)(vm::ptr pArg); -typedef u32(CellSailRendererVideoFuncStart)(vm::ptr pArg, bool buffering); -typedef u32(CellSailRendererVideoFuncStop)(vm::ptr pArg, bool flush, bool keepRendering); -typedef u32(CellSailRendererVideoFuncCancel)(vm::ptr pArg); -typedef s32(CellSailRendererVideoFuncCheckout)(vm::ptr pArg, vm::ptr ppInfo); -typedef s32(CellSailRendererVideoFuncCheckin)(vm::ptr pArg, vm::ptr pInfo); +typedef s32(CellSailRendererVideoFuncMakeup)(vm::ptr pArg); +typedef s32(CellSailRendererVideoFuncCleanup)(vm::ptr pArg); +typedef void(CellSailRendererVideoFuncOpen)(vm::ptr pArg, vm::ptr pInfo, u32 frameNum, u32 minFrameNum); +typedef void(CellSailRendererVideoFuncClose)(vm::ptr pArg); +typedef void(CellSailRendererVideoFuncStart)(vm::ptr pArg, bool buffering); +typedef void(CellSailRendererVideoFuncStop)(vm::ptr pArg, bool flush, bool keepRendering); +typedef void(CellSailRendererVideoFuncCancel)(vm::ptr pArg); +typedef s32(CellSailRendererVideoFuncCheckout)(vm::ptr pArg, vm::pptr ppInfo); +typedef s32(CellSailRendererVideoFuncCheckin)(vm::ptr pArg, vm::ptr pInfo); -typedef void(CellSailPlayerFuncNotified)(vm::ptr pArg, CellSailEvent event, u64 arg0, u64 arg1); +typedef void(CellSailPlayerFuncNotified)(vm::ptr pArg, CellSailEvent event, u64 arg0, u64 arg1); struct CellSailMemAllocatorFuncs { diff --git a/rpcs3/Emu/SysCalls/Modules/cellSaveData.cpp b/rpcs3/Emu/SysCalls/Modules/cellSaveData.cpp index 474e400e99..166b40b6bb 100644 --- a/rpcs3/Emu/SysCalls/Modules/cellSaveData.cpp +++ b/rpcs3/Emu/SysCalls/Modules/cellSaveData.cpp @@ -389,7 +389,7 @@ never_inline s32 savedata_op( } statGet->hddFreeSizeKB = 40 * 1024 * 1024; // 40 GB - statGet->isNewData = save_entry.isNew = !psf; + statGet->isNewData = save_entry.isNew = psf; statGet->dir.atime = save_entry.atime = dir_info.atime; statGet->dir.mtime = save_entry.mtime = dir_info.mtime;