diff --git a/rpcs3/Emu/Cell/Modules/cellDaisy.cpp b/rpcs3/Emu/Cell/Modules/cellDaisy.cpp index f68ed1aee8..b41f7a3bc1 100644 --- a/rpcs3/Emu/Cell/Modules/cellDaisy.cpp +++ b/rpcs3/Emu/Cell/Modules/cellDaisy.cpp @@ -1,22 +1,43 @@ -#include "stdafx.h" +#include "stdafx.h" #include "Emu/Cell/PPUModule.h" #include "cellDaisy.h" LOG_CHANNEL(cellDaisy); +template <> +void fmt_class_string::format(std::string& out, u64 arg) +{ + format_enum(out, arg, [](CellDaisyError value) + { + switch (value) + { + STR_CASE(CELL_DAISY_ERROR_NO_BEGIN); + STR_CASE(CELL_DAISY_ERROR_INVALID_PORT_ATTACH); + STR_CASE(CELL_DAISY_ERROR_NOT_IMPLEMENTED); + STR_CASE(CELL_DAISY_ERROR_AGAIN); + STR_CASE(CELL_DAISY_ERROR_INVAL); + STR_CASE(CELL_DAISY_ERROR_PERM); + STR_CASE(CELL_DAISY_ERROR_BUSY); + STR_CASE(CELL_DAISY_ERROR_STAT); + } + + return unknown; + }); +} + using LFQueue2 = struct CellDaisyLFQueue2; using Lock = struct CellDaisyLock; using ScatterGatherInterlock = struct CellDaisyScatterGatherInterlock; using AtomicInterlock = volatile struct CellDaisyAtomicInterlock; -s32 cellDaisyLFQueue2GetPopPointer(vm::ptr queue, vm::ptr pPointer, u32 isBlocking) +error_code cellDaisyLFQueue2GetPopPointer(vm::ptr queue, vm::ptr pPointer, u32 isBlocking) { cellDaisy.todo("cellDaisyLFQueue2GetPopPointer()"); return CELL_OK; } -s32 cellDaisyLFQueue2CompletePopPointer(vm::ptr queue, s32 pointer, vm::ptr, u32)> fpSendSignal, u32 isQueueFull) +error_code cellDaisyLFQueue2CompletePopPointer(vm::ptr queue, s32 pointer, vm::ptr, u32)> fpSendSignal, u32 isQueueFull) { cellDaisy.todo("cellDaisyLFQueue2CompletePopPointer()"); return CELL_OK; @@ -27,7 +48,7 @@ void cellDaisyLFQueue2PushOpen(vm::ptr queue) cellDaisy.todo("cellDaisyLFQueue2PushOpen()"); } -s32 cellDaisyLFQueue2PushClose(vm::ptr queue, vm::ptr, u32)> fpSendSignal) +error_code cellDaisyLFQueue2PushClose(vm::ptr queue, vm::ptr, u32)> fpSendSignal) { cellDaisy.todo("cellDaisyLFQueue2PushClose()"); return CELL_OK; @@ -38,73 +59,73 @@ void cellDaisyLFQueue2PopOpen(vm::ptr queue) cellDaisy.todo("cellDaisyLFQueue2PopOpen()"); } -s32 cellDaisyLFQueue2PopClose(vm::ptr queue, vm::ptr, u32)> fpSendSignal) +error_code cellDaisyLFQueue2PopClose(vm::ptr queue, vm::ptr, u32)> fpSendSignal) { cellDaisy.todo("cellDaisyLFQueue2PopClose()"); return CELL_OK; } -s32 cellDaisyLFQueue2HasUnfinishedConsumer(vm::ptr queue, u32 isCancelled) +error_code cellDaisyLFQueue2HasUnfinishedConsumer(vm::ptr queue, u32 isCancelled) { cellDaisy.todo("cellDaisyLFQueue2HasUnfinishedConsumer()"); return CELL_OK; } -s32 cellDaisy_snprintf(vm::ptr buffer, u32 count, vm::cptr fmt, ppu_va_args_t fmt_args) +error_code cellDaisy_snprintf(vm::ptr buffer, u32 count, vm::cptr fmt, ppu_va_args_t fmt_args) { cellDaisy.todo("cellDaisy_snprintf()"); return CELL_OK; } -s32 cellDaisyLock_initialize(vm::ptr _this, u32 depth) +error_code cellDaisyLock_initialize(vm::ptr _this, u32 depth) { cellDaisy.todo("cellDaisyLock_initialize()"); return CELL_OK; } -s32 cellDaisyLock_getNextHeadPointer(vm::ptr _this) +error_code cellDaisyLock_getNextHeadPointer(vm::ptr _this) { cellDaisy.todo("cellDaisyLock_getNextHeadPointer()"); return CELL_OK; } -s32 cellDaisyLock_getNextTailPointer(vm::ptr _this) +error_code cellDaisyLock_getNextTailPointer(vm::ptr _this) { cellDaisy.todo("cellDaisyLock_getNextTailPointer()"); return CELL_OK; } -s32 cellDaisyLock_completeConsume(vm::ptr _this, u32 pointer) +error_code cellDaisyLock_completeConsume(vm::ptr _this, u32 pointer) { cellDaisy.todo("cellDaisyLock_completeConsume()"); return CELL_OK; } -s32 cellDaisyLock_completeProduce(vm::ptr _this, u32 pointer) +error_code cellDaisyLock_completeProduce(vm::ptr _this, u32 pointer) { cellDaisy.todo("cellDaisyLock_completeProduce()"); return CELL_OK; } -s32 cellDaisyLock_pushOpen(vm::ptr _this) +error_code cellDaisyLock_pushOpen(vm::ptr _this) { cellDaisy.todo("cellDaisyLock_pushOpen()"); return CELL_OK; } -s32 cellDaisyLock_pushClose(vm::ptr _this) +error_code cellDaisyLock_pushClose(vm::ptr _this) { cellDaisy.todo("cellDaisyLock_pushClose()"); return CELL_OK; } -s32 cellDaisyLock_popOpen(vm::ptr _this) +error_code cellDaisyLock_popOpen(vm::ptr _this) { cellDaisy.todo("cellDaisyLock_popOpen()"); return CELL_OK; } -s32 cellDaisyLock_popClose(vm::ptr _this) +error_code cellDaisyLock_popClose(vm::ptr _this) { cellDaisy.todo("cellDaisyLock_popClose()"); return CELL_OK; @@ -125,13 +146,13 @@ void cellDaisyScatterGatherInterlock_9tor(vm::ptr _this) cellDaisy.todo("cellDaisyScatterGatherInterlock_9tor()"); } -s32 cellDaisyScatterGatherInterlock_probe(vm::ptr _this, u32 isBlocking) +error_code cellDaisyScatterGatherInterlock_probe(vm::ptr _this, u32 isBlocking) { cellDaisy.todo("cellDaisyScatterGatherInterlock_probe()"); return CELL_OK; } -s32 cellDaisyScatterGatherInterlock_release(vm::ptr _this) +error_code cellDaisyScatterGatherInterlock_release(vm::ptr _this) { cellDaisy.todo("cellDaisyScatterGatherInterlock_release()"); return CELL_OK; diff --git a/rpcs3/Emu/Cell/Modules/cellDaisy.h b/rpcs3/Emu/Cell/Modules/cellDaisy.h index aad3bd051b..62984ba170 100644 --- a/rpcs3/Emu/Cell/Modules/cellDaisy.h +++ b/rpcs3/Emu/Cell/Modules/cellDaisy.h @@ -1,11 +1,11 @@ -#pragma once +#pragma once // libDaisy = 0x80410501 - 0x804105ff // Error codes -enum +enum CellDaisyError : u32 { CELL_DAISY_ERROR_NO_BEGIN = 0x80410501, CELL_DAISY_ERROR_INVALID_PORT_ATTACH = 0x80410502, diff --git a/rpcs3/Emu/Cell/Modules/cellDmux.cpp b/rpcs3/Emu/Cell/Modules/cellDmux.cpp index 3df2229bba..0befe5e813 100644 --- a/rpcs3/Emu/Cell/Modules/cellDmux.cpp +++ b/rpcs3/Emu/Cell/Modules/cellDmux.cpp @@ -10,6 +10,24 @@ LOG_CHANNEL(cellDmux); +template <> +void fmt_class_string::format(std::string& out, u64 arg) +{ + format_enum(out, arg, [](CellDmuxError value) + { + switch (value) + { + STR_CASE(CELL_DMUX_ERROR_ARG); + STR_CASE(CELL_DMUX_ERROR_SEQ); + STR_CASE(CELL_DMUX_ERROR_BUSY); + STR_CASE(CELL_DMUX_ERROR_EMPTY); + STR_CASE(CELL_DMUX_ERROR_FATAL); + } + + return unknown; + }); +} + /* Demuxer Thread Classes */ enum @@ -940,7 +958,7 @@ void dmuxQueryEsAttr(u32 info /* may be 0 */, vm::cptr esFi cellDmux.warning("*** filter(0x%x, 0x%x, 0x%x, 0x%x)", esFilterId->filterIdMajor, esFilterId->filterIdMinor, esFilterId->supplementalInfo1, esFilterId->supplementalInfo2); } -s32 cellDmuxQueryAttr(vm::cptr type, vm::ptr attr) +error_code cellDmuxQueryAttr(vm::cptr type, vm::ptr attr) { cellDmux.warning("cellDmuxQueryAttr(type=*0x%x, attr=*0x%x)", type, attr); @@ -953,7 +971,7 @@ s32 cellDmuxQueryAttr(vm::cptr type, vm::ptr attr) return CELL_OK; } -s32 cellDmuxQueryAttr2(vm::cptr type2, vm::ptr attr) +error_code cellDmuxQueryAttr2(vm::cptr type2, vm::ptr attr) { cellDmux.warning("cellDmuxQueryAttr2(demuxerType2=*0x%x, demuxerAttr=*0x%x)", type2, attr); @@ -966,7 +984,7 @@ s32 cellDmuxQueryAttr2(vm::cptr type2, vm::ptr attr return CELL_OK; } -s32 cellDmuxOpen(vm::cptr type, vm::cptr res, vm::cptr cb, vm::ptr handle) +error_code cellDmuxOpen(vm::cptr type, vm::cptr res, vm::cptr cb, vm::ptr handle) { cellDmux.warning("cellDmuxOpen(type=*0x%x, res=*0x%x, cb=*0x%x, handle=*0x%x)", type, res, cb, handle); @@ -979,7 +997,7 @@ s32 cellDmuxOpen(vm::cptr type, vm::cptr res, vm fmt::throw_exception("cellDmux disabled, use LLE."); } -s32 cellDmuxOpenEx(vm::cptr type, vm::cptr resEx, vm::cptr cb, vm::ptr handle) +error_code cellDmuxOpenEx(vm::cptr type, vm::cptr resEx, vm::cptr cb, vm::ptr handle) { cellDmux.warning("cellDmuxOpenEx(type=*0x%x, resEx=*0x%x, cb=*0x%x, handle=*0x%x)", type, resEx, cb, handle); @@ -992,14 +1010,14 @@ s32 cellDmuxOpenEx(vm::cptr type, vm::cptr res fmt::throw_exception("cellDmux disabled, use LLE."); } -s32 cellDmuxOpenExt(vm::cptr type, vm::cptr resEx, vm::cptr cb, vm::ptr handle) +error_code cellDmuxOpenExt(vm::cptr type, vm::cptr resEx, vm::cptr cb, vm::ptr handle) { cellDmux.warning("cellDmuxOpenExt(type=*0x%x, resEx=*0x%x, cb=*0x%x, handle=*0x%x)", type, resEx, cb, handle); return cellDmuxOpenEx(type, resEx, cb, handle); } -s32 cellDmuxOpen2(vm::cptr type2, vm::cptr res2, vm::cptr cb, vm::ptr handle) +error_code cellDmuxOpen2(vm::cptr type2, vm::cptr res2, vm::cptr cb, vm::ptr handle) { cellDmux.warning("cellDmuxOpen2(type2=*0x%x, res2=*0x%x, cb=*0x%x, handle=*0x%x)", type2, res2, cb, handle); @@ -1012,7 +1030,7 @@ s32 cellDmuxOpen2(vm::cptr type2, vm::cptr res fmt::throw_exception("cellDmux disabled, use LLE."); } -s32 cellDmuxClose(u32 handle) +error_code cellDmuxClose(u32 handle) { cellDmux.warning("cellDmuxClose(handle=0x%x)", handle); @@ -1041,7 +1059,7 @@ s32 cellDmuxClose(u32 handle) return CELL_OK; } -s32 cellDmuxSetStream(u32 handle, u32 streamAddress, u32 streamSize, b8 discontinuity, u64 userData) +error_code cellDmuxSetStream(u32 handle, u32 streamAddress, u32 streamSize, b8 discontinuity, u64 userData) { cellDmux.trace("cellDmuxSetStream(handle=0x%x, streamAddress=0x%x, streamSize=%d, discontinuity=%d, userData=0x%llx)", handle, streamAddress, streamSize, discontinuity, userData); @@ -1069,7 +1087,7 @@ s32 cellDmuxSetStream(u32 handle, u32 streamAddress, u32 streamSize, b8 disconti return CELL_OK; } -s32 cellDmuxResetStream(u32 handle) +error_code cellDmuxResetStream(u32 handle) { cellDmux.warning("cellDmuxResetStream(handle=0x%x)", handle); @@ -1084,7 +1102,7 @@ s32 cellDmuxResetStream(u32 handle) return CELL_OK; } -s32 cellDmuxResetStreamAndWaitDone(u32 handle) +error_code cellDmuxResetStreamAndWaitDone(u32 handle) { cellDmux.warning("cellDmuxResetStreamAndWaitDone(handle=0x%x)", handle); @@ -1117,7 +1135,7 @@ s32 cellDmuxResetStreamAndWaitDone(u32 handle) return CELL_OK; } -s32 cellDmuxQueryEsAttr(vm::cptr type, vm::cptr esFilterId, u32 esSpecificInfo, vm::ptr esAttr) +error_code cellDmuxQueryEsAttr(vm::cptr type, vm::cptr esFilterId, u32 esSpecificInfo, vm::ptr esAttr) { cellDmux.warning("cellDmuxQueryEsAttr(demuxerType=*0x%x, esFilterId=*0x%x, esSpecificInfo=*0x%x, esAttr=*0x%x)", type, esFilterId, esSpecificInfo, esAttr); @@ -1131,7 +1149,7 @@ s32 cellDmuxQueryEsAttr(vm::cptr type, vm::cptr type2, vm::cptr esFilterId, u32 esSpecificInfo, vm::ptr esAttr) +error_code cellDmuxQueryEsAttr2(vm::cptr type2, vm::cptr esFilterId, u32 esSpecificInfo, vm::ptr esAttr) { cellDmux.warning("cellDmuxQueryEsAttr2(type2=*0x%x, esFilterId=*0x%x, esSpecificInfo=*0x%x, esAttr=*0x%x)", type2, esFilterId, esSpecificInfo, esAttr); @@ -1145,7 +1163,7 @@ s32 cellDmuxQueryEsAttr2(vm::cptr type2, vm::cptr esFilterId, vm::cptr esResourceInfo, vm::cptr esCb, u32 esSpecificInfo, vm::ptr esHandle) +error_code cellDmuxEnableEs(u32 handle, vm::cptr esFilterId, vm::cptr esResourceInfo, vm::cptr esCb, u32 esSpecificInfo, vm::ptr esHandle) { cellDmux.warning("cellDmuxEnableEs(handle=0x%x, esFilterId=*0x%x, esResourceInfo=*0x%x, esCb=*0x%x, esSpecificInfo=*0x%x, esHandle=*0x%x)", handle, esFilterId, esResourceInfo, esCb, esSpecificInfo, esHandle); @@ -1175,7 +1193,7 @@ s32 cellDmuxEnableEs(u32 handle, vm::cptr esFilterId, vm::c return CELL_OK; } -s32 cellDmuxDisableEs(u32 esHandle) +error_code cellDmuxDisableEs(u32 esHandle) { cellDmux.warning("cellDmuxDisableEs(esHandle=0x%x)", esHandle); @@ -1194,7 +1212,7 @@ s32 cellDmuxDisableEs(u32 esHandle) return CELL_OK; } -s32 cellDmuxResetEs(u32 esHandle) +error_code cellDmuxResetEs(u32 esHandle) { cellDmux.trace("cellDmuxResetEs(esHandle=0x%x)", esHandle); @@ -1213,7 +1231,7 @@ s32 cellDmuxResetEs(u32 esHandle) return CELL_OK; } -s32 cellDmuxGetAu(u32 esHandle, vm::ptr auInfo, vm::ptr auSpecificInfo) +error_code cellDmuxGetAu(u32 esHandle, vm::ptr auInfo, vm::ptr auSpecificInfo) { cellDmux.trace("cellDmuxGetAu(esHandle=0x%x, auInfo=**0x%x, auSpecificInfo=**0x%x)", esHandle, auInfo, auSpecificInfo); @@ -1236,7 +1254,7 @@ s32 cellDmuxGetAu(u32 esHandle, vm::ptr auInfo, vm::ptr auSpecificInfo return CELL_OK; } -s32 cellDmuxPeekAu(u32 esHandle, vm::ptr auInfo, vm::ptr auSpecificInfo) +error_code cellDmuxPeekAu(u32 esHandle, vm::ptr auInfo, vm::ptr auSpecificInfo) { cellDmux.trace("cellDmuxPeekAu(esHandle=0x%x, auInfo=**0x%x, auSpecificInfo=**0x%x)", esHandle, auInfo, auSpecificInfo); @@ -1259,7 +1277,7 @@ s32 cellDmuxPeekAu(u32 esHandle, vm::ptr auInfo, vm::ptr auSpecificInf return CELL_OK; } -s32 cellDmuxGetAuEx(u32 esHandle, vm::ptr auInfoEx, vm::ptr auSpecificInfo) +error_code cellDmuxGetAuEx(u32 esHandle, vm::ptr auInfoEx, vm::ptr auSpecificInfo) { cellDmux.trace("cellDmuxGetAuEx(esHandle=0x%x, auInfoEx=**0x%x, auSpecificInfo=**0x%x)", esHandle, auInfoEx, auSpecificInfo); @@ -1282,7 +1300,7 @@ s32 cellDmuxGetAuEx(u32 esHandle, vm::ptr auInfoEx, vm::ptr auSpecific return CELL_OK; } -s32 cellDmuxPeekAuEx(u32 esHandle, vm::ptr auInfoEx, vm::ptr auSpecificInfo) +error_code cellDmuxPeekAuEx(u32 esHandle, vm::ptr auInfoEx, vm::ptr auSpecificInfo) { cellDmux.trace("cellDmuxPeekAuEx(esHandle=0x%x, auInfoEx=**0x%x, auSpecificInfo=**0x%x)", esHandle, auInfoEx, auSpecificInfo); @@ -1305,7 +1323,7 @@ s32 cellDmuxPeekAuEx(u32 esHandle, vm::ptr auInfoEx, vm::ptr auSpecifi return CELL_OK; } -s32 cellDmuxReleaseAu(u32 esHandle) +error_code cellDmuxReleaseAu(u32 esHandle) { cellDmux.trace("cellDmuxReleaseAu(esHandle=0x%x)", esHandle); @@ -1323,7 +1341,7 @@ s32 cellDmuxReleaseAu(u32 esHandle) return CELL_OK; } -s32 cellDmuxFlushEs(u32 esHandle) +error_code cellDmuxFlushEs(u32 esHandle) { cellDmux.warning("cellDmuxFlushEs(esHandle=0x%x)", esHandle); diff --git a/rpcs3/Emu/Cell/Modules/cellDmux.h b/rpcs3/Emu/Cell/Modules/cellDmux.h index f950df33de..93c15a3bed 100644 --- a/rpcs3/Emu/Cell/Modules/cellDmux.h +++ b/rpcs3/Emu/Cell/Modules/cellDmux.h @@ -1,9 +1,9 @@ -#pragma once +#pragma once #include "Emu/Memory/vm_ptr.h" // Error Codes -enum +enum CellDmuxError :u32 { CELL_DMUX_ERROR_ARG = 0x80610201, CELL_DMUX_ERROR_SEQ = 0x80610202, diff --git a/rpcs3/Emu/Cell/Modules/cellDtcpIpUtility.cpp b/rpcs3/Emu/Cell/Modules/cellDtcpIpUtility.cpp index 70522154f0..1e4841001e 100644 --- a/rpcs3/Emu/Cell/Modules/cellDtcpIpUtility.cpp +++ b/rpcs3/Emu/Cell/Modules/cellDtcpIpUtility.cpp @@ -1,81 +1,81 @@ -#include "stdafx.h" +#include "stdafx.h" #include "Emu/Cell/PPUModule.h" LOG_CHANNEL(cellDtcpIpUtility); -s32 cellDtcpIpRead() +error_code cellDtcpIpRead() { UNIMPLEMENTED_FUNC(cellDtcpIpUtility); return CELL_OK; } -s32 cellDtcpIpFinalize() +error_code cellDtcpIpFinalize() { UNIMPLEMENTED_FUNC(cellDtcpIpUtility); return CELL_OK; } -s32 cellDtcpIpActivate() +error_code cellDtcpIpActivate() { UNIMPLEMENTED_FUNC(cellDtcpIpUtility); return CELL_OK; } -s32 cellDtcpIpOpen() +error_code cellDtcpIpOpen() { UNIMPLEMENTED_FUNC(cellDtcpIpUtility); return CELL_OK; } -s32 cellDtcpIpCheckActivation() +error_code cellDtcpIpCheckActivation() { UNIMPLEMENTED_FUNC(cellDtcpIpUtility); return CELL_OK; } -s32 cellDtcpIpInitialize() +error_code cellDtcpIpInitialize() { UNIMPLEMENTED_FUNC(cellDtcpIpUtility); return CELL_OK; } -s32 cellDtcpIpGetDecryptedData() +error_code cellDtcpIpGetDecryptedData() { UNIMPLEMENTED_FUNC(cellDtcpIpUtility); return CELL_OK; } -s32 cellDtcpIpStopSequence() +error_code cellDtcpIpStopSequence() { UNIMPLEMENTED_FUNC(cellDtcpIpUtility); return CELL_OK; } -s32 cellDtcpIpSeek() +error_code cellDtcpIpSeek() { UNIMPLEMENTED_FUNC(cellDtcpIpUtility); return CELL_OK; } -s32 cellDtcpIpStartSequence() +error_code cellDtcpIpStartSequence() { UNIMPLEMENTED_FUNC(cellDtcpIpUtility); return CELL_OK; } -s32 cellDtcpIpSetEncryptedData() +error_code cellDtcpIpSetEncryptedData() { UNIMPLEMENTED_FUNC(cellDtcpIpUtility); return CELL_OK; } -s32 cellDtcpIpClose() +error_code cellDtcpIpClose() { UNIMPLEMENTED_FUNC(cellDtcpIpUtility); return CELL_OK; } -s32 cellDtcpIpSuspendActivationForDebug() +error_code cellDtcpIpSuspendActivationForDebug() { UNIMPLEMENTED_FUNC(cellDtcpIpUtility); return CELL_OK; diff --git a/rpcs3/Emu/Cell/Modules/cellFontFT.cpp b/rpcs3/Emu/Cell/Modules/cellFontFT.cpp index 02ed3e2fcf..60dd55e957 100644 --- a/rpcs3/Emu/Cell/Modules/cellFontFT.cpp +++ b/rpcs3/Emu/Cell/Modules/cellFontFT.cpp @@ -5,13 +5,13 @@ LOG_CHANNEL(cellFontFT); -s32 cellFontInitLibraryFreeType() +error_code cellFontInitLibraryFreeType() { UNIMPLEMENTED_FUNC(cellFontFT); return CELL_OK; } -s32 cellFontInitLibraryFreeTypeWithRevision(u64 revisionFlags, vm::ptr config, vm::pptr lib) +error_code cellFontInitLibraryFreeTypeWithRevision(u64 revisionFlags, vm::ptr config, vm::pptr lib) { cellFontFT.warning("cellFontInitLibraryFreeTypeWithRevision(revisionFlags=0x%llx, config=*0x%x, lib=**0x%x)", revisionFlags, config, lib); @@ -20,247 +20,247 @@ s32 cellFontInitLibraryFreeTypeWithRevision(u64 revisionFlags, vm::ptr exportPath) +error_code cellGameGetHomeDataExportPath(vm::ptr exportPath) { cellGameExec.warning("cellGameGetHomeDataExportPath(exportPath=*0x%x)", exportPath); @@ -25,13 +25,13 @@ s32 cellGameGetHomeDataExportPath(vm::ptr exportPath) return CELL_GAME_ERROR_NOAPP; } -s32 cellGameGetHomePath() +error_code cellGameGetHomePath() { UNIMPLEMENTED_FUNC(cellGameExec); return CELL_OK; } -s32 cellGameGetHomeDataImportPath(vm::ptr importPath) +error_code cellGameGetHomeDataImportPath(vm::ptr importPath) { cellGameExec.warning("cellGameGetHomeDataImportPath(importPath=*0x%x)", importPath); @@ -45,7 +45,7 @@ s32 cellGameGetHomeDataImportPath(vm::ptr importPath) return CELL_GAME_ERROR_NOAPP; } -s32 cellGameGetHomeLaunchOptionPath(vm::ptr commonPath, vm::ptr personalPath) +error_code cellGameGetHomeLaunchOptionPath(vm::ptr commonPath, vm::ptr personalPath) { cellGameExec.todo("cellGameGetHomeLaunchOptionPath(commonPath=%s, personalPath=%s)", commonPath, personalPath); @@ -58,13 +58,13 @@ s32 cellGameGetHomeLaunchOptionPath(vm::ptr commonPath, vm::ptr pers return CELL_GAME_ERROR_NOAPP; } -s32 cellGameExecGame() +error_code cellGameExecGame() { UNIMPLEMENTED_FUNC(cellGameExec); return CELL_OK; } -s32 cellGameGetBootGameInfo(vm::ptr type, vm::ptr dirName, vm::ptr execdata) +error_code cellGameGetBootGameInfo(vm::ptr type, vm::ptr dirName, vm::ptr execdata) { cellGameExec.todo("cellGameGetBootGameInfo(type=*0x%x, dirName=%s, execdata=*0x%x)", type, dirName, execdata); diff --git a/rpcs3/Emu/Cell/Modules/cellGifDec.cpp b/rpcs3/Emu/Cell/Modules/cellGifDec.cpp index cddc536236..248183ea89 100644 --- a/rpcs3/Emu/Cell/Modules/cellGifDec.cpp +++ b/rpcs3/Emu/Cell/Modules/cellGifDec.cpp @@ -11,6 +11,27 @@ LOG_CHANNEL(cellGifDec); +template <> +void fmt_class_string::format(std::string& out, u64 arg) +{ + format_enum(out, arg, [](auto error) + { + switch (error) + { + STR_CASE(CELL_GIFDEC_ERROR_OPEN_FILE); + STR_CASE(CELL_GIFDEC_ERROR_STREAM_FORMAT); + STR_CASE(CELL_GIFDEC_ERROR_SEQ); + STR_CASE(CELL_GIFDEC_ERROR_ARG); + STR_CASE(CELL_GIFDEC_ERROR_FATAL); + STR_CASE(CELL_GIFDEC_ERROR_SPU_UNSUPPORT); + STR_CASE(CELL_GIFDEC_ERROR_SPU_ERROR); + STR_CASE(CELL_GIFDEC_ERROR_CB_PARAM); + } + + return unknown; + }); +} + // cellGifDec aliases (only for cellGifDec.cpp) using PPMainHandle = vm::pptr; using PMainHandle = vm::ptr; @@ -28,19 +49,19 @@ using POutParam = vm::ptr; using PDataCtrlParam = vm::cptr; using PDataOutInfo = vm::ptr; -s32 cellGifDecCreate(PPMainHandle mainHandle, PThreadInParam threadInParam, PThreadOutParam threadOutParam) +error_code cellGifDecCreate(PPMainHandle mainHandle, PThreadInParam threadInParam, PThreadOutParam threadOutParam) { UNIMPLEMENTED_FUNC(cellGifDec); return CELL_OK; } -s32 cellGifDecExtCreate(PPMainHandle mainHandle, PThreadInParam threadInParam, PThreadOutParam threadOutParam, PExtThreadInParam extThreadInParam, PExtThreadOutParam extThreadOutParam) +error_code cellGifDecExtCreate(PPMainHandle mainHandle, PThreadInParam threadInParam, PThreadOutParam threadOutParam, PExtThreadInParam extThreadInParam, PExtThreadOutParam extThreadOutParam) { UNIMPLEMENTED_FUNC(cellGifDec); return CELL_OK; } -s32 cellGifDecOpen(PMainHandle mainHandle, PPSubHandle subHandle, PSrc src, POpenInfo openInfo) +error_code cellGifDecOpen(PMainHandle mainHandle, PPSubHandle subHandle, PSrc src, POpenInfo openInfo) { cellGifDec.warning("cellGifDecOpen(mainHandle=*0x%x, subHandle=**0x%x, src=*0x%x, openInfo=*0x%x)", mainHandle, subHandle, src, openInfo); @@ -73,13 +94,13 @@ s32 cellGifDecOpen(PMainHandle mainHandle, PPSubHandle subHandle, PSrc src, POpe return CELL_OK; } -s32 cellGifDecExtOpen() +error_code cellGifDecExtOpen() { cellGifDec.todo("cellGifDecExtOpen()"); return CELL_OK; } -s32 cellGifDecReadHeader(PMainHandle mainHandle, PSubHandle subHandle, PInfo info) +error_code cellGifDecReadHeader(PMainHandle mainHandle, PSubHandle subHandle, PInfo info) { cellGifDec.warning("cellGifDecReadHeader(mainHandle=*0x%x, subHandle=*0x%x, info=*0x%x)", mainHandle, subHandle, info); @@ -126,13 +147,13 @@ s32 cellGifDecReadHeader(PMainHandle mainHandle, PSubHandle subHandle, PInfo inf return CELL_OK; } -s32 cellGifDecExtReadHeader() +error_code cellGifDecExtReadHeader() { cellGifDec.todo("cellGifDecExtReadHeader()"); return CELL_OK; } -s32 cellGifDecSetParameter(PMainHandle mainHandle, PSubHandle subHandle, PInParam inParam, POutParam outParam) +error_code cellGifDecSetParameter(PMainHandle mainHandle, PSubHandle subHandle, PInParam inParam, POutParam outParam) { cellGifDec.warning("cellGifDecSetParameter(mainHandle=*0x%x, subHandle=*0x%x, inParam=*0x%x, outParam=*0x%x)", mainHandle, subHandle, inParam, outParam); @@ -157,13 +178,13 @@ s32 cellGifDecSetParameter(PMainHandle mainHandle, PSubHandle subHandle, PInPara return CELL_OK; } -s32 cellGifDecExtSetParameter() +error_code cellGifDecExtSetParameter() { cellGifDec.todo("cellGifDecExtSetParameter()"); return CELL_OK; } -s32 cellGifDecDecodeData(PMainHandle mainHandle, PSubHandle subHandle, vm::ptr data, PDataCtrlParam dataCtrlParam, PDataOutInfo dataOutInfo) +error_code cellGifDecDecodeData(PMainHandle mainHandle, PSubHandle subHandle, vm::ptr data, PDataCtrlParam dataCtrlParam, PDataOutInfo dataOutInfo) { cellGifDec.warning("cellGifDecDecodeData(mainHandle=*0x%x, subHandle=*0x%x, data=*0x%x, dataCtrlParam=*0x%x, dataOutInfo=*0x%x)", mainHandle, subHandle, data, dataCtrlParam, dataOutInfo); @@ -275,13 +296,13 @@ s32 cellGifDecDecodeData(PMainHandle mainHandle, PSubHandle subHandle, vm::ptr uri, vm::cptr str, vm::ptr pool, u32 size, vm::ptr required) +template <> +void fmt_class_string::format(std::string& out, u64 arg) +{ + format_enum(out, arg, [](auto error) + { + switch (error) + { + STR_CASE(CELL_HTTP_UTIL_ERROR_NO_MEMORY); + STR_CASE(CELL_HTTP_UTIL_ERROR_NO_BUFFER); + STR_CASE(CELL_HTTP_UTIL_ERROR_NO_STRING); + STR_CASE(CELL_HTTP_UTIL_ERROR_INSUFFICIENT); + STR_CASE(CELL_HTTP_UTIL_ERROR_INVALID_URI); + STR_CASE(CELL_HTTP_UTIL_ERROR_INVALID_HEADER); + STR_CASE(CELL_HTTP_UTIL_ERROR_INVALID_REQUEST); + STR_CASE(CELL_HTTP_UTIL_ERROR_INVALID_RESPONSE); + STR_CASE(CELL_HTTP_UTIL_ERROR_INVALID_LENGTH); + STR_CASE(CELL_HTTP_UTIL_ERROR_INVALID_CHARACTER); + } + + return unknown; + }); +} + +error_code cellHttpUtilParseUri(vm::ptr uri, vm::cptr str, vm::ptr pool, u32 size, vm::ptr required) { cellHttpUtil.trace("cellHttpUtilParseUri(uri=*0x%x, str=%s, pool=*0x%x, size=%d, required=*0x%x)", uri, str, pool, size, required); LUrlParser::clParseURL URL = LUrlParser::clParseURL::ParseURL(str.get_ptr()); @@ -102,31 +125,31 @@ s32 cellHttpUtilParseUri(vm::ptr uri, vm::cptr str, vm::ptr path, vm::cptr str, vm::ptr pool, u32 size, vm::ptr required) +error_code cellHttpUtilParseUriPath(vm::ptr path, vm::cptr str, vm::ptr pool, u32 size, vm::ptr required) { cellHttpUtil.todo("cellHttpUtilParseUriPath(path=*0x%x, str=%s, pool=*0x%x, size=%d, required=*0x%x)", path, str, pool, size, required); return CELL_OK; } -s32 cellHttpUtilParseProxy(vm::ptr uri, vm::cptr str, vm::ptr pool, u32 size, vm::ptr required) +error_code cellHttpUtilParseProxy(vm::ptr uri, vm::cptr str, vm::ptr pool, u32 size, vm::ptr required) { cellHttpUtil.todo("cellHttpUtilParseProxy(uri=*0x%x, str=%s, pool=*0x%x, size=%d, required=*0x%x)", uri, str, pool, size, required); return CELL_OK; } -s32 cellHttpUtilParseStatusLine(vm::ptr resp, vm::cptr str, u32 len, vm::ptr pool, u32 size, vm::ptr required, vm::ptr parsedLength) +error_code cellHttpUtilParseStatusLine(vm::ptr resp, vm::cptr str, u32 len, vm::ptr pool, u32 size, vm::ptr required, vm::ptr parsedLength) { cellHttpUtil.todo("cellHttpUtilParseStatusLine(resp=*0x%x, str=%s, len=%d, pool=*0x%x, size=%d, required=*0x%x, parsedLength=*0x%x)", resp, str, len, pool, size, required, parsedLength); return CELL_OK; } -s32 cellHttpUtilParseHeader(vm::ptr header, vm::cptr str, u32 len, vm::ptr pool, u32 size, vm::ptr required, vm::ptr parsedLength) +error_code cellHttpUtilParseHeader(vm::ptr header, vm::cptr str, u32 len, vm::ptr pool, u32 size, vm::ptr required, vm::ptr parsedLength) { cellHttpUtil.todo("cellHttpUtilParseHeader(header=*0x%x, str=%s, len=%d, pool=*0x%x, size=%d, required=*0x%x, parsedLength=*0x%x)", header, str, len, pool, size, required, parsedLength); return CELL_OK; } -s32 cellHttpUtilBuildRequestLine(vm::cptr req, vm::ptr buf, u32 len, vm::ptr required) +error_code cellHttpUtilBuildRequestLine(vm::cptr req, vm::ptr buf, u32 len, vm::ptr required) { cellHttpUtil.todo("cellHttpUtilBuildRequestLine(req=*0x%x, buf=*0x%x, len=%d, required=*0x%x)", req, buf, len, required); @@ -142,7 +165,7 @@ s32 cellHttpUtilBuildRequestLine(vm::cptr req, vm::ptr header, vm::ptr buf, u32 len, vm::ptr required) +error_code cellHttpUtilBuildHeader(vm::cptr header, vm::ptr buf, u32 len, vm::ptr required) { cellHttpUtil.todo("cellHttpUtilBuildHeader(header=*0x%x, buf=*0x%x, len=%d, required=*0x%x)", header, buf, len, required); @@ -158,7 +181,7 @@ s32 cellHttpUtilBuildHeader(vm::cptr header, vm::ptr buf, return CELL_OK; } -s32 cellHttpUtilBuildUri(vm::cptr uri, vm::ptr buf, u32 len, vm::ptr required, s32 flags) +error_code cellHttpUtilBuildUri(vm::cptr uri, vm::ptr buf, u32 len, vm::ptr required, s32 flags) { cellHttpUtil.todo("cellHttpUtilBuildUri(uri=*0x%x, buf=*0x%x, len=%d, required=*0x%x, flags=%d)", uri, buf, len, required, flags); @@ -170,73 +193,73 @@ s32 cellHttpUtilBuildUri(vm::cptr uri, vm::ptr buf, u32 len, return CELL_OK; } -s32 cellHttpUtilCopyUri(vm::ptr dest, vm::cptr src, vm::ptr pool, u32 poolSize, vm::ptr required) +error_code cellHttpUtilCopyUri(vm::ptr dest, vm::cptr src, vm::ptr pool, u32 poolSize, vm::ptr required) { cellHttpUtil.todo("cellHttpUtilCopyUri(dest=*0x%x, src=*0x%x, pool=*0x%x, poolSize=%d, required=*0x%x)", dest, src, pool, poolSize, required); return CELL_OK; } -s32 cellHttpUtilMergeUriPath(vm::ptr uri, vm::cptr src, vm::cptr path, vm::ptr pool, u32 poolSize, vm::ptr required) +error_code cellHttpUtilMergeUriPath(vm::ptr uri, vm::cptr src, vm::cptr path, vm::ptr pool, u32 poolSize, vm::ptr required) { cellHttpUtil.todo("cellHttpUtilMergeUriPath(uri=*0x%x, src=*0x%x, path=%s, pool=*0x%x, poolSize=%d, required=*0x%x)", uri, src, path, pool, poolSize, required); return CELL_OK; } -s32 cellHttpUtilSweepPath(vm::ptr dst, vm::cptr src, u32 srcSize) +error_code cellHttpUtilSweepPath(vm::ptr dst, vm::cptr src, u32 srcSize) { cellHttpUtil.todo("cellHttpUtilSweepPath(dst=*0x%x, src=%s, srcSize=%d)", dst, src, srcSize); return CELL_OK; } -s32 cellHttpUtilCopyStatusLine(vm::ptr dest, vm::cptr src, vm::ptr pool, u32 poolSize, vm::ptr required) +error_code cellHttpUtilCopyStatusLine(vm::ptr dest, vm::cptr src, vm::ptr pool, u32 poolSize, vm::ptr required) { cellHttpUtil.todo("cellHttpUtilCopyStatusLine(dest=*0x%x, src=*0x%x, pool=*0x%x, poolSize=%d, required=*0x%x)", dest, src, pool, poolSize, required); return CELL_OK; } -s32 cellHttpUtilCopyHeader(vm::ptr dest, vm::cptr src, vm::ptr pool, u32 poolSize, vm::ptr required) +error_code cellHttpUtilCopyHeader(vm::ptr dest, vm::cptr src, vm::ptr pool, u32 poolSize, vm::ptr required) { cellHttpUtil.todo("cellHttpUtilCopyHeader(dest=*0x%x, src=*0x%x, pool=*0x%x, poolSize=%d, required=*0x%x)", dest, src, pool, poolSize, required); return CELL_OK; } -s32 cellHttpUtilAppendHeaderValue(vm::ptr dest, vm::cptr src, vm::cptr value, vm::ptr pool, u32 poolSize, vm::ptr required) +error_code cellHttpUtilAppendHeaderValue(vm::ptr dest, vm::cptr src, vm::cptr value, vm::ptr pool, u32 poolSize, vm::ptr required) { cellHttpUtil.todo("cellHttpUtilAppendHeaderValue(dest=*0x%x, src=*0x%x, value=%s, pool=*0x%x, poolSize=%d, required=*0x%x)", dest, src, value, pool, poolSize, required); return CELL_OK; } -s32 cellHttpUtilEscapeUri(vm::ptr out, u32 outSize, vm::cptr in, u32 inSize, vm::ptr required) +error_code cellHttpUtilEscapeUri(vm::ptr out, u32 outSize, vm::cptr in, u32 inSize, vm::ptr required) { cellHttpUtil.todo("cellHttpUtilEscapeUri(out=*0x%x, outSize=%d, in=*0x%x, inSize=%d, required=*0x%x)", out, outSize, in, inSize, required); return CELL_OK; } -s32 cellHttpUtilUnescapeUri(vm::ptr out, u32 size, vm::cptr in, vm::ptr required) +error_code cellHttpUtilUnescapeUri(vm::ptr out, u32 size, vm::cptr in, vm::ptr required) { cellHttpUtil.todo("cellHttpUtilUnescapeUri(out=*0x%x, size=%d, in=*0x%x, required=*0x%x)", out, size, in, required); return CELL_OK; } -s32 cellHttpUtilFormUrlEncode(vm::ptr out, u32 outSize, vm::cptr in, u32 inSize, vm::ptr required) +error_code cellHttpUtilFormUrlEncode(vm::ptr out, u32 outSize, vm::cptr in, u32 inSize, vm::ptr required) { cellHttpUtil.todo("cellHttpUtilFormUrlEncode(out=*0x%x, outSize=%d, in=*0x%x, inSize=%d, required=*0x%x)", out, outSize, in, inSize, required); return CELL_OK; } -s32 cellHttpUtilFormUrlDecode(vm::ptr out, u32 size, vm::cptr in, vm::ptr required) +error_code cellHttpUtilFormUrlDecode(vm::ptr out, u32 size, vm::cptr in, vm::ptr required) { cellHttpUtil.todo("cellHttpUtilFormUrlDecode(out=*0x%x, size=%d, in=%s, required=*0x%x)", out, size, in, required); return CELL_OK; } -s32 cellHttpUtilBase64Encoder(vm::ptr out, vm::cptr input, u32 len) +error_code cellHttpUtilBase64Encoder(vm::ptr out, vm::cptr input, u32 len) { cellHttpUtil.todo("cellHttpUtilBase64Encoder(out=*0x%x, input=*0x%x, len=%d)", out, input, len); return CELL_OK; } -s32 cellHttpUtilBase64Decoder(vm::ptr output, vm::cptr in, u32 len) +error_code cellHttpUtilBase64Decoder(vm::ptr output, vm::cptr in, u32 len) { cellHttpUtil.todo("cellHttpUtilBase64Decoder(output=*0x%x, in=*0x%x, len=%d)", output, in, len); return CELL_OK; diff --git a/rpcs3/Emu/Cell/Modules/cellHttpUtil.h b/rpcs3/Emu/Cell/Modules/cellHttpUtil.h index 04fa26f439..ac5f912c08 100644 --- a/rpcs3/Emu/Cell/Modules/cellHttpUtil.h +++ b/rpcs3/Emu/Cell/Modules/cellHttpUtil.h @@ -1,11 +1,11 @@ -#pragma once +#pragma once #include "Emu/Memory/vm_ptr.h" // libHttp_Util: 0x80711001 - 0x807110ff // Error Codes -enum +enum CellHttpUtilError : u32 { CELL_HTTP_UTIL_ERROR_NO_MEMORY = 0x80711001, CELL_HTTP_UTIL_ERROR_NO_BUFFER = 0x80711002, diff --git a/rpcs3/Emu/Cell/Modules/cellJpgDec.cpp b/rpcs3/Emu/Cell/Modules/cellJpgDec.cpp index da87be4faf..5a4bab8bb3 100644 --- a/rpcs3/Emu/Cell/Modules/cellJpgDec.cpp +++ b/rpcs3/Emu/Cell/Modules/cellJpgDec.cpp @@ -11,25 +11,47 @@ LOG_CHANNEL(cellJpgDec); -s32 cellJpgDecCreate(u32 mainHandle, u32 threadInParam, u32 threadOutParam) +template <> +void fmt_class_string::format(std::string& out, u64 arg) +{ + format_enum(out, arg, [](auto error) + { + switch (error) + { + STR_CASE(CELL_JPGDEC_ERROR_HEADER); + STR_CASE(CELL_JPGDEC_ERROR_STREAM_FORMAT); + STR_CASE(CELL_JPGDEC_ERROR_ARG); + STR_CASE(CELL_JPGDEC_ERROR_SEQ); + STR_CASE(CELL_JPGDEC_ERROR_BUSY); + STR_CASE(CELL_JPGDEC_ERROR_FATAL); + STR_CASE(CELL_JPGDEC_ERROR_OPEN_FILE); + STR_CASE(CELL_JPGDEC_ERROR_SPU_UNSUPPORT); + STR_CASE(CELL_JPGDEC_ERROR_CB_PARAM); + } + + return unknown; + }); +} + +error_code cellJpgDecCreate(u32 mainHandle, u32 threadInParam, u32 threadOutParam) { UNIMPLEMENTED_FUNC(cellJpgDec); return CELL_OK; } -s32 cellJpgDecExtCreate(u32 mainHandle, u32 threadInParam, u32 threadOutParam, u32 extThreadInParam, u32 extThreadOutParam) +error_code cellJpgDecExtCreate(u32 mainHandle, u32 threadInParam, u32 threadOutParam, u32 extThreadInParam, u32 extThreadOutParam) { UNIMPLEMENTED_FUNC(cellJpgDec); return CELL_OK; } -s32 cellJpgDecDestroy(u32 mainHandle) +error_code cellJpgDecDestroy(u32 mainHandle) { UNIMPLEMENTED_FUNC(cellJpgDec); return CELL_OK; } -s32 cellJpgDecOpen(u32 mainHandle, vm::ptr subHandle, vm::ptr src, vm::ptr openInfo) +error_code cellJpgDecOpen(u32 mainHandle, vm::ptr subHandle, vm::ptr src, vm::ptr openInfo) { cellJpgDec.warning("cellJpgDecOpen(mainHandle=0x%x, subHandle=*0x%x, src=*0x%x, openInfo=*0x%x)", mainHandle, subHandle, src, openInfo); @@ -62,13 +84,13 @@ s32 cellJpgDecOpen(u32 mainHandle, vm::ptr subHandle, vm::ptr info) +error_code cellJpgDecReadHeader(u32 mainHandle, u32 subHandle, vm::ptr info) { cellJpgDec.trace("cellJpgDecReadHeader(mainHandle=0x%x, subHandle=0x%x, info=*0x%x)", mainHandle, subHandle, info); @@ -157,13 +179,13 @@ s32 cellJpgDecReadHeader(u32 mainHandle, u32 subHandle, vm::ptr return CELL_OK; } -s32 cellJpgDecExtReadHeader() +error_code cellJpgDecExtReadHeader() { cellJpgDec.todo("cellJpgDecExtReadHeader()"); return CELL_OK; } -s32 cellJpgDecDecodeData(u32 mainHandle, u32 subHandle, vm::ptr data, vm::cptr dataCtrlParam, vm::ptr dataOutInfo) +error_code cellJpgDecDecodeData(u32 mainHandle, u32 subHandle, vm::ptr data, vm::cptr dataCtrlParam, vm::ptr dataOutInfo) { cellJpgDec.trace("cellJpgDecDecodeData(mainHandle=0x%x, subHandle=0x%x, data=*0x%x, dataCtrlParam=*0x%x, dataOutInfo=*0x%x)", mainHandle, subHandle, data, dataCtrlParam, dataOutInfo); @@ -297,13 +319,13 @@ s32 cellJpgDecDecodeData(u32 mainHandle, u32 subHandle, vm::ptr data, vm::cp return CELL_OK; } -s32 cellJpgDecExtDecodeData() +error_code cellJpgDecExtDecodeData() { cellJpgDec.todo("cellJpgDecExtDecodeData()"); return CELL_OK; } -s32 cellJpgDecSetParameter(u32 mainHandle, u32 subHandle, vm::cptr inParam, vm::ptr outParam) +error_code cellJpgDecSetParameter(u32 mainHandle, u32 subHandle, vm::cptr inParam, vm::ptr outParam) { cellJpgDec.trace("cellJpgDecSetParameter(mainHandle=0x%x, subHandle=0x%x, inParam=*0x%x, outParam=*0x%x)", mainHandle, subHandle, inParam, outParam); @@ -348,7 +370,7 @@ s32 cellJpgDecSetParameter(u32 mainHandle, u32 subHandle, vm::cptr +void fmt_class_string::format(std::string& out, u64 arg) +{ + format_enum(out, arg, [](auto error) + { + switch (error) + { + STR_CASE(CELL_JPGENC_ERROR_ARG); + STR_CASE(CELL_JPGENC_ERROR_SEQ); + STR_CASE(CELL_JPGENC_ERROR_BUSY); + STR_CASE(CELL_JPGENC_ERROR_EMPTY); + STR_CASE(CELL_JPGENC_ERROR_RESET); + STR_CASE(CELL_JPGENC_ERROR_FATAL); + STR_CASE(CELL_JPGENC_ERROR_STREAM_ABORT); + STR_CASE(CELL_JPGENC_ERROR_STREAM_SKIP); + STR_CASE(CELL_JPGENC_ERROR_STREAM_OVERFLOW); + STR_CASE(CELL_JPGENC_ERROR_STREAM_FILE_OPEN); + } + + return unknown; + }); +} + s32 cellJpgEncQueryAttr() { diff --git a/rpcs3/Emu/Cell/Modules/cellJpgEnc.h b/rpcs3/Emu/Cell/Modules/cellJpgEnc.h index 89fd0961f3..cfd4d6ff1f 100644 --- a/rpcs3/Emu/Cell/Modules/cellJpgEnc.h +++ b/rpcs3/Emu/Cell/Modules/cellJpgEnc.h @@ -1,9 +1,9 @@ -#pragma once +#pragma once // Error Codes -enum +enum CellJpgEncError : u32 { CELL_JPGENC_ERROR_ARG = 0x80611191, CELL_JPGENC_ERROR_SEQ = 0x80611192, diff --git a/rpcs3/Emu/Cell/Modules/cellMusicDecode.cpp b/rpcs3/Emu/Cell/Modules/cellMusicDecode.cpp index de18a4d815..7b4fde25d4 100644 --- a/rpcs3/Emu/Cell/Modules/cellMusicDecode.cpp +++ b/rpcs3/Emu/Cell/Modules/cellMusicDecode.cpp @@ -1,4 +1,4 @@ -#include "stdafx.h" +#include "stdafx.h" #include "Emu/Cell/PPUModule.h" #include "Emu/Cell/lv2/sys_lwmutex.h" #include "Emu/Cell/lv2/sys_lwcond.h" @@ -13,7 +13,7 @@ LOG_CHANNEL(cellMusicDecode); // Return Codes -enum +enum CellMusicDecodeError : u32 { CELL_MUSIC_DECODE_DECODE_FINISHED = 0x8002C101, CELL_MUSIC_DECODE_ERROR_PARAM = 0x8002C102, @@ -30,6 +30,32 @@ enum CELL_MUSIC_DECODE_ERROR_GENERIC = 0x8002C1FF, }; +template<> +void fmt_class_string::format(std::string& out, u64 arg) +{ + format_enum(out, arg, [](auto error) + { + switch (error) + { + STR_CASE(CELL_MUSIC_DECODE_DECODE_FINISHED); + STR_CASE(CELL_MUSIC_DECODE_ERROR_PARAM); + STR_CASE(CELL_MUSIC_DECODE_ERROR_BUSY); + STR_CASE(CELL_MUSIC_DECODE_ERROR_NO_ACTIVE_CONTENT); + STR_CASE(CELL_MUSIC_DECODE_ERROR_NO_MATCH_FOUND); + STR_CASE(CELL_MUSIC_DECODE_ERROR_INVALID_CONTEXT); + STR_CASE(CELL_MUSIC_DECODE_ERROR_DECODE_FAILURE); + STR_CASE(CELL_MUSIC_DECODE_ERROR_NO_MORE_CONTENT); + STR_CASE(CELL_MUSIC_DECODE_DIALOG_OPEN); + STR_CASE(CELL_MUSIC_DECODE_DIALOG_CLOSE); + STR_CASE(CELL_MUSIC_DECODE_ERROR_NO_LPCM_DATA); + STR_CASE(CELL_MUSIC_DECODE_NEXT_CONTENTS_READY); + STR_CASE(CELL_MUSIC_DECODE_ERROR_GENERIC); + } + + return unknown; + }); +} + enum { CELL_MUSIC_DECODE_EVENT_STATUS_NOTIFICATION = 0, @@ -69,7 +95,7 @@ struct music_decode2 vm::ptr userData; }; -s32 cellMusicDecodeInitialize(s32 mode, u32 container, s32 spuPriority, vm::ptr func, vm::ptr userData) +error_code cellMusicDecodeInitialize(s32 mode, u32 container, s32 spuPriority, vm::ptr func, vm::ptr userData) { cellMusicDecode.todo("cellMusicDecodeInitialize(mode=0x%x, container=0x%x, spuPriority=0x%x, func=*0x%x, userData=*0x%x)", mode, container, spuPriority, func, userData); @@ -86,7 +112,7 @@ s32 cellMusicDecodeInitialize(s32 mode, u32 container, s32 spuPriority, vm::ptr< return CELL_OK; } -s32 cellMusicDecodeInitializeSystemWorkload(s32 mode, u32 container, vm::ptr func, vm::ptr userData, s32 spuUsageRate, vm::ptr spurs, vm::cptr priority, vm::cptr attr) +error_code cellMusicDecodeInitializeSystemWorkload(s32 mode, u32 container, vm::ptr func, vm::ptr userData, s32 spuUsageRate, vm::ptr spurs, vm::cptr priority, vm::cptr attr) { cellMusicDecode.todo("cellMusicDecodeInitializeSystemWorkload(mode=0x%x, container=0x%x, func=*0x%x, userData=*0x%x, spuUsageRate=0x%x, spurs=*0x%x, priority=*0x%x, attr=*0x%x)", mode, container, func, userData, spuUsageRate, spurs, priority, attr); @@ -103,7 +129,7 @@ s32 cellMusicDecodeInitializeSystemWorkload(s32 mode, u32 container, vm::ptr status) +error_code cellMusicDecodeGetDecodeStatus(vm::ptr status) { cellMusicDecode.todo("cellMusicDecodeGetDecodeStatus(status=*0x%x)", status); return CELL_OK; } -s32 cellMusicDecodeRead(vm::ptr buf, vm::ptr startTime, u64 reqSize, vm::ptr readSize, vm::ptr position) +error_code cellMusicDecodeRead(vm::ptr buf, vm::ptr startTime, u64 reqSize, vm::ptr readSize, vm::ptr position) { cellMusicDecode.todo("cellMusicDecodeRead(buf=*0x%x, startTime=*0x%x, reqSize=0x%llx, readSize=*0x%x, position=*0x%x)", buf, startTime, reqSize, readSize, position); return CELL_OK; } -s32 cellMusicDecodeGetSelectionContext(vm::ptr context) +error_code cellMusicDecodeGetSelectionContext(vm::ptr context) { cellMusicDecode.todo("cellMusicDecodeGetSelectionContext(context=*0x%x)", context); return CELL_OK; } -s32 cellMusicDecodeSetSelectionContext(vm::ptr context) +error_code cellMusicDecodeSetSelectionContext(vm::ptr context) { cellMusicDecode.todo("cellMusicDecodeSetSelectionContext(context=*0x%x)", context); @@ -193,15 +219,15 @@ s32 cellMusicDecodeSetSelectionContext(vm::ptr contex return CELL_OK; } -s32 cellMusicDecodeGetContentsId(vm::ptr contents_id) +error_code cellMusicDecodeGetContentsId(vm::ptr contents_id) { cellMusicDecode.todo("cellMusicDecodeGetContentsId(contents_id=*0x%x)", contents_id); return CELL_OK; } -s32 cellMusicDecodeInitialize2(s32 mode, u32 container, s32 spuPriority, vm::ptr func, vm::ptr userData, s32 speed, s32 bufsize) +error_code cellMusicDecodeInitialize2(s32 mode, u32 container, s32 spuPriority, vm::ptr func, vm::ptr userData, s32 speed, s32 bufsize) { - cellMusicDecode.todo("cellMusicDecodeInitialize2(mode=0x%x, container=0x%x, spuPriority=0x%x, func=*0x%x, userData=*0x%x, speed=0x%x, bufsize=0x%x)", mode, container, spuPriority, func, userData, speed, bufsize); + cellMusicDecode.todo("cellMusicDecodeInitialize2(mode=0x%x, container=0x%x, spuPriority=0x%x, func=*0x%x, userData=*0x%x, speed=0x%x, bufsize=0x%x)", mode, container, spuPriority, func, userData, speed, bufsize); const auto musicDecode = g_fxo->get(); musicDecode->func = func; @@ -216,7 +242,7 @@ s32 cellMusicDecodeInitialize2(s32 mode, u32 container, s32 spuPriority, vm::ptr return CELL_OK; } -s32 cellMusicDecodeInitialize2SystemWorkload(s32 mode, u32 container, vm::ptr func, vm::ptr userData, s32 spuUsageRate, s32 bufsize, vm::ptr spurs, vm::cptr priority, vm::cptr attr) +error_code cellMusicDecodeInitialize2SystemWorkload(s32 mode, u32 container, vm::ptr func, vm::ptr userData, s32 spuUsageRate, s32 bufsize, vm::ptr spurs, vm::cptr priority, vm::cptr attr) { cellMusicDecode.todo("cellMusicDecodeInitialize2SystemWorkload(mode=0x%x, container=0x%x, func=*0x%x, userData=*0x%x, spuUsageRate=0x%x, bufsize=0x%x, spurs=*0x%x, priority=*0x%x, attr=*0x%x)", mode, container, func, userData, spuUsageRate, bufsize, spurs, priority, attr); @@ -233,7 +259,7 @@ s32 cellMusicDecodeInitialize2SystemWorkload(s32 mode, u32 container, vm::ptr status) +error_code cellMusicDecodeGetDecodeStatus2(vm::ptr status) { cellMusicDecode.todo("cellMusicDecodeGetDecodeStatus2(status=*0x%x)", status); return CELL_OK; } -s32 cellMusicDecodeRead2(vm::ptr buf, vm::ptr startTime, u64 reqSize, vm::ptr readSize, vm::ptr position) +error_code cellMusicDecodeRead2(vm::ptr buf, vm::ptr startTime, u64 reqSize, vm::ptr readSize, vm::ptr position) { cellMusicDecode.todo("cellMusicDecodeRead2(buf=*0x%x, startTime=*0x%x, reqSize=0x%llx, readSize=*0x%x, position=*0x%x)", buf, startTime, reqSize, readSize, position); return CELL_OK; } -s32 cellMusicDecodeGetSelectionContext2(vm::ptr context) +error_code cellMusicDecodeGetSelectionContext2(vm::ptr context) { cellMusicDecode.todo("cellMusicDecodeGetSelectionContext2(context=*0x%x)", context); return CELL_OK; } -s32 cellMusicDecodeSetSelectionContext2(vm::ptr context) +error_code cellMusicDecodeSetSelectionContext2(vm::ptr context) { cellMusicDecode.todo("cellMusicDecodeSetSelectionContext2(context=*0x%x)", context); @@ -323,7 +349,7 @@ s32 cellMusicDecodeSetSelectionContext2(vm::ptr conte return CELL_OK; } -s32 cellMusicDecodeGetContentsId2(vm::ptr contents_id ) +error_code cellMusicDecodeGetContentsId2(vm::ptr contents_id ) { cellMusicDecode.todo("cellMusicDecodeGetContentsId2(contents_id=*0x%x)", contents_id); return CELL_OK; diff --git a/rpcs3/Emu/Cell/Modules/cellMusicExport.cpp b/rpcs3/Emu/Cell/Modules/cellMusicExport.cpp index b1cf3729fb..525e233e9b 100644 --- a/rpcs3/Emu/Cell/Modules/cellMusicExport.cpp +++ b/rpcs3/Emu/Cell/Modules/cellMusicExport.cpp @@ -1,4 +1,4 @@ -#include "stdafx.h" +#include "stdafx.h" #include "Emu/Cell/PPUModule.h" #include "cellSysutil.h" @@ -7,7 +7,7 @@ LOG_CHANNEL(cellMusicExport); // Return Codes -enum +enum CellMusicExportError : u32 { CELL_MUSIC_EXPORT_UTIL_ERROR_BUSY = 0x8002c601, CELL_MUSIC_EXPORT_UTIL_ERROR_INTERNAL = 0x8002c602, @@ -21,6 +21,29 @@ enum CELL_MUSIC_EXPORT_UTIL_ERROR_INITIALIZE = 0x8002c60a, }; +template<> +void fmt_class_string::format(std::string& out, u64 arg) +{ + format_enum(out, arg, [](auto error) + { + switch (error) + { + STR_CASE(CELL_MUSIC_EXPORT_UTIL_ERROR_BUSY); + STR_CASE(CELL_MUSIC_EXPORT_UTIL_ERROR_INTERNAL); + STR_CASE(CELL_MUSIC_EXPORT_UTIL_ERROR_PARAM); + STR_CASE(CELL_MUSIC_EXPORT_UTIL_ERROR_ACCESS_ERROR); + STR_CASE(CELL_MUSIC_EXPORT_UTIL_ERROR_DB_INTERNAL); + STR_CASE(CELL_MUSIC_EXPORT_UTIL_ERROR_DB_REGIST); + STR_CASE(CELL_MUSIC_EXPORT_UTIL_ERROR_SET_META); + STR_CASE(CELL_MUSIC_EXPORT_UTIL_ERROR_FLUSH_META); + STR_CASE(CELL_MUSIC_EXPORT_UTIL_ERROR_MOVE); + STR_CASE(CELL_MUSIC_EXPORT_UTIL_ERROR_INITIALIZE); + } + + return unknown; + }); +} + struct CellMusicExportSetParam { vm::bptr title; diff --git a/rpcs3/Emu/Cell/Modules/cellNetAoi.cpp b/rpcs3/Emu/Cell/Modules/cellNetAoi.cpp index ca487caf3d..4aa7d095ac 100644 --- a/rpcs3/Emu/Cell/Modules/cellNetAoi.cpp +++ b/rpcs3/Emu/Cell/Modules/cellNetAoi.cpp @@ -1,57 +1,57 @@ -#include "stdafx.h" +#include "stdafx.h" #include "Emu/Cell/PPUModule.h" LOG_CHANNEL(cellNetAoi); -s32 cellNetAoiDeletePeer() +error_code cellNetAoiDeletePeer() { UNIMPLEMENTED_FUNC(cellNetAoi); return CELL_OK; } -s32 cellNetAoiInit() +error_code cellNetAoiInit() { UNIMPLEMENTED_FUNC(cellNetAoi); return CELL_OK; } -s32 cellNetAoiGetPspTitleId() +error_code cellNetAoiGetPspTitleId() { UNIMPLEMENTED_FUNC(cellNetAoi); return CELL_OK; } -s32 cellNetAoiTerm() +error_code cellNetAoiTerm() { UNIMPLEMENTED_FUNC(cellNetAoi); return CELL_OK; } -s32 cellNetAoiStop() +error_code cellNetAoiStop() { UNIMPLEMENTED_FUNC(cellNetAoi); return CELL_OK; } -s32 cellNetAoiGetRemotePeerInfo() +error_code cellNetAoiGetRemotePeerInfo() { UNIMPLEMENTED_FUNC(cellNetAoi); return CELL_OK; } -s32 cellNetAoiStart() +error_code cellNetAoiStart() { UNIMPLEMENTED_FUNC(cellNetAoi); return CELL_OK; } -s32 cellNetAoiGetLocalInfo() +error_code cellNetAoiGetLocalInfo() { UNIMPLEMENTED_FUNC(cellNetAoi); return CELL_OK; } -s32 cellNetAoiAddPeer() +error_code cellNetAoiAddPeer() { UNIMPLEMENTED_FUNC(cellNetAoi); return CELL_OK; diff --git a/rpcs3/Emu/Cell/Modules/cellOvis.cpp b/rpcs3/Emu/Cell/Modules/cellOvis.cpp index 1681d6f3a3..b5e1a3a75f 100644 --- a/rpcs3/Emu/Cell/Modules/cellOvis.cpp +++ b/rpcs3/Emu/Cell/Modules/cellOvis.cpp @@ -1,4 +1,4 @@ -#include "stdafx.h" +#include "stdafx.h" #include "Emu/Cell/PPUModule.h" #include "Emu/Cell/lv2/sys_spu.h" @@ -7,20 +7,36 @@ LOG_CHANNEL(cellOvis); // Return Codes -enum +enum CellOvisError : u32 { CELL_OVIS_ERROR_INVAL = 0x80410402, CELL_OVIS_ERROR_ABORT = 0x8041040C, CELL_OVIS_ERROR_ALIGN = 0x80410410, }; -s32 cellOvisGetOverlayTableSize(vm::cptr elf) +template<> +void fmt_class_string::format(std::string& out, u64 arg) +{ + format_enum(out, arg, [](auto error) + { + switch (error) + { + STR_CASE(CELL_OVIS_ERROR_INVAL); + STR_CASE(CELL_OVIS_ERROR_ABORT); + STR_CASE(CELL_OVIS_ERROR_ALIGN); + } + + return unknown; + }); +} + +error_code cellOvisGetOverlayTableSize(vm::cptr elf) { cellOvis.todo("cellOvisGetOverlayTableSize(elf=%s)", elf); return CELL_OK; } -s32 cellOvisInitializeOverlayTable(vm::ptr ea_ovly_table, vm::cptr elf) +error_code cellOvisInitializeOverlayTable(vm::ptr ea_ovly_table, vm::cptr elf) { cellOvis.todo("cellOvisInitializeOverlayTable(ea_ovly_table=*0x%x, elf=%s)", ea_ovly_table, elf); return CELL_OK; diff --git a/rpcs3/Emu/Cell/Modules/cellPamf.cpp b/rpcs3/Emu/Cell/Modules/cellPamf.cpp index e8dfcbab79..5a57ef6510 100644 --- a/rpcs3/Emu/Cell/Modules/cellPamf.cpp +++ b/rpcs3/Emu/Cell/Modules/cellPamf.cpp @@ -14,7 +14,27 @@ bool squeue_test_exit() LOG_CHANNEL(cellPamf); -s32 pamfStreamTypeToEsFilterId(u8 type, u8 ch, CellCodecEsFilterId& pEsFilterId) +template<> +void fmt_class_string::format(std::string& out, u64 arg) +{ + format_enum(out, arg, [](auto error) + { + switch (error) + { + STR_CASE(CELL_PAMF_ERROR_STREAM_NOT_FOUND); + STR_CASE(CELL_PAMF_ERROR_INVALID_PAMF); + STR_CASE(CELL_PAMF_ERROR_INVALID_ARG); + STR_CASE(CELL_PAMF_ERROR_UNKNOWN_TYPE); + STR_CASE(CELL_PAMF_ERROR_UNSUPPORTED_VERSION); + STR_CASE(CELL_PAMF_ERROR_UNKNOWN_STREAM); + STR_CASE(CELL_PAMF_ERROR_EP_NOT_FOUND); + } + + return unknown; + }); +} + +error_code pamfStreamTypeToEsFilterId(u8 type, u8 ch, CellCodecEsFilterId& pEsFilterId) { // convert type and ch to EsFilterId verify(HERE), (ch < 16); @@ -178,7 +198,7 @@ u8 pamfGetStreamChannel(vm::ptr pSelf, u32 stream) return 0xff; } -s32 cellPamfGetHeaderSize(vm::ptr pAddr, u64 fileSize, vm::ptr pSize) +error_code cellPamfGetHeaderSize(vm::ptr pAddr, u64 fileSize, vm::ptr pSize) { cellPamf.warning("cellPamfGetHeaderSize(pAddr=*0x%x, fileSize=0x%llx, pSize=*0x%x)", pAddr, fileSize, pSize); @@ -189,7 +209,7 @@ s32 cellPamfGetHeaderSize(vm::ptr pAddr, u64 fileSize, vm::ptr return CELL_OK; } -s32 cellPamfGetHeaderSize2(vm::ptr pAddr, u64 fileSize, u32 attribute, vm::ptr pSize) +error_code cellPamfGetHeaderSize2(vm::ptr pAddr, u64 fileSize, u32 attribute, vm::ptr pSize) { cellPamf.warning("cellPamfGetHeaderSize2(pAddr=*0x%x, fileSize=0x%llx, attribute=0x%x, pSize=*0x%x)", pAddr, fileSize, attribute, pSize); @@ -200,7 +220,7 @@ s32 cellPamfGetHeaderSize2(vm::ptr pAddr, u64 fileSize, u32 attribut return CELL_OK; } -s32 cellPamfGetStreamOffsetAndSize(vm::ptr pAddr, u64 fileSize, vm::ptr pOffset, vm::ptr pSize) +error_code cellPamfGetStreamOffsetAndSize(vm::ptr pAddr, u64 fileSize, vm::ptr pOffset, vm::ptr pSize) { cellPamf.warning("cellPamfGetStreamOffsetAndSize(pAddr=*0x%x, fileSize=0x%llx, pOffset=*0x%x, pSize=*0x%x)", pAddr, fileSize, pOffset, pSize); @@ -213,7 +233,7 @@ s32 cellPamfGetStreamOffsetAndSize(vm::ptr pAddr, u64 fileSize, vm:: return CELL_OK; } -s32 cellPamfVerify(vm::ptr pAddr, u64 fileSize) +error_code cellPamfVerify(vm::ptr pAddr, u64 fileSize) { cellPamf.todo("cellPamfVerify(pAddr=*0x%x, fileSize=0x%llx)", pAddr, fileSize); @@ -221,7 +241,7 @@ s32 cellPamfVerify(vm::ptr pAddr, u64 fileSize) return CELL_OK; } -s32 cellPamfReaderInitialize(vm::ptr pSelf, vm::cptr pAddr, u64 fileSize, u32 attribute) +error_code cellPamfReaderInitialize(vm::ptr pSelf, vm::cptr pAddr, u64 fileSize, u32 attribute) { cellPamf.warning("cellPamfReaderInitialize(pSelf=*0x%x, pAddr=*0x%x, fileSize=0x%llx, attribute=0x%x)", pSelf, pAddr, fileSize, attribute); @@ -245,7 +265,7 @@ s32 cellPamfReaderInitialize(vm::ptr pSelf, vm::cptr return CELL_OK; } -s32 cellPamfReaderGetPresentationStartTime(vm::ptr pSelf, vm::ptr pTimeStamp) +error_code cellPamfReaderGetPresentationStartTime(vm::ptr pSelf, vm::ptr pTimeStamp) { cellPamf.warning("cellPamfReaderGetPresentationStartTime(pSelf=*0x%x, pTimeStamp=*0x%x)", pSelf, pTimeStamp); @@ -256,7 +276,7 @@ s32 cellPamfReaderGetPresentationStartTime(vm::ptr pSelf, vm::pt return CELL_OK; } -s32 cellPamfReaderGetPresentationEndTime(vm::ptr pSelf, vm::ptr pTimeStamp) +error_code cellPamfReaderGetPresentationEndTime(vm::ptr pSelf, vm::ptr pTimeStamp) { cellPamf.warning("cellPamfReaderGetPresentationEndTime(pSelf=*0x%x, pTimeStamp=*0x%x)", pSelf, pTimeStamp); @@ -324,7 +344,7 @@ u8 cellPamfReaderGetNumberOfSpecificStreams(vm::ptr pSelf, u8 st return 0; } -s32 cellPamfReaderSetStreamWithIndex(vm::ptr pSelf, u8 streamIndex) +error_code cellPamfReaderSetStreamWithIndex(vm::ptr pSelf, u8 streamIndex) { cellPamf.warning("cellPamfReaderSetStreamWithIndex(pSelf=*0x%x, streamIndex=%d)", pSelf, streamIndex); @@ -337,14 +357,13 @@ s32 cellPamfReaderSetStreamWithIndex(vm::ptr pSelf, u8 streamInd return CELL_OK; } -s32 cellPamfReaderSetStreamWithTypeAndChannel(vm::ptr pSelf, u8 streamType, u8 ch) +error_code cellPamfReaderSetStreamWithTypeAndChannel(vm::ptr pSelf, u8 streamType, u8 ch) { cellPamf.warning("cellPamfReaderSetStreamWithTypeAndChannel(pSelf=*0x%x, streamType=%d, ch=%d)", pSelf, streamType, ch); // it probably doesn't support "any audio" or "any video" argument if (streamType > 5 || ch >= 16) { - cellPamf.error("cellPamfReaderSetStreamWithTypeAndChannel(): invalid arguments (streamType=%d, ch=%d)", streamType, ch); Emu.Pause(); return CELL_PAMF_ERROR_INVALID_ARG; } @@ -364,7 +383,7 @@ s32 cellPamfReaderSetStreamWithTypeAndChannel(vm::ptr pSelf, u8 return CELL_PAMF_ERROR_STREAM_NOT_FOUND; } -s32 cellPamfReaderSetStreamWithTypeAndIndex(vm::ptr pSelf, u8 streamType, u8 streamIndex) +error_code cellPamfReaderSetStreamWithTypeAndIndex(vm::ptr pSelf, u8 streamType, u8 streamIndex) { cellPamf.warning("cellPamfReaderSetStreamWithTypeAndIndex(pSelf=*0x%x, streamType=%d, streamIndex=%d)", pSelf, streamType, streamIndex); @@ -417,7 +436,7 @@ s32 cellPamfReaderSetStreamWithTypeAndIndex(vm::ptr pSelf, u8 st return CELL_PAMF_ERROR_STREAM_NOT_FOUND; } -s32 cellPamfStreamTypeToEsFilterId(u8 type, u8 ch, vm::ptr pEsFilterId) +error_code cellPamfStreamTypeToEsFilterId(u8 type, u8 ch, vm::ptr pEsFilterId) { cellPamf.warning("cellPamfStreamTypeToEsFilterId(type=%d, ch=%d, pEsFilterId=*0x%x)", type, ch, pEsFilterId); @@ -437,7 +456,7 @@ s32 cellPamfReaderGetStreamIndex(vm::ptr pSelf) return pSelf->stream; } -s32 cellPamfReaderGetStreamTypeAndChannel(vm::ptr pSelf, vm::ptr pType, vm::ptr pCh) +error_code cellPamfReaderGetStreamTypeAndChannel(vm::ptr pSelf, vm::ptr pType, vm::ptr pCh) { cellPamf.warning("cellPamfReaderGetStreamTypeAndChannel(pSelf=*0x%x, pType=*0x%x, pCh=*0x%x", pSelf, pType, pCh); @@ -448,7 +467,7 @@ s32 cellPamfReaderGetStreamTypeAndChannel(vm::ptr pSelf, vm::ptr return CELL_OK; } -s32 cellPamfReaderGetEsFilterId(vm::ptr pSelf, vm::ptr pEsFilterId) +error_code cellPamfReaderGetEsFilterId(vm::ptr pSelf, vm::ptr pEsFilterId) { cellPamf.warning("cellPamfReaderGetEsFilterId(pSelf=*0x%x, pEsFilterId=*0x%x)", pSelf, pEsFilterId); @@ -463,7 +482,7 @@ s32 cellPamfReaderGetEsFilterId(vm::ptr pSelf, vm::ptr pSelf, vm::ptr pInfo, u32 size) +error_code cellPamfReaderGetStreamInfo(vm::ptr pSelf, vm::ptr pInfo, u32 size) { cellPamf.warning("cellPamfReaderGetStreamInfo(pSelf=*0x%x, pInfo=*0x%x, size=%d)", pSelf, pInfo, size); @@ -706,7 +725,7 @@ u32 cellPamfReaderGetNumberOfEp(vm::ptr pSelf) return 0; //pSelf->pAddr->stream_headers[pSelf->stream].ep_num; } -s32 cellPamfReaderGetEpIteratorWithIndex(vm::ptr pSelf, u32 epIndex, vm::ptr pIt) +error_code cellPamfReaderGetEpIteratorWithIndex(vm::ptr pSelf, u32 epIndex, vm::ptr pIt) { cellPamf.todo("cellPamfReaderGetEpIteratorWithIndex(pSelf=*0x%x, epIndex=%d, pIt=*0x%x)", pSelf, epIndex, pIt); @@ -714,7 +733,7 @@ s32 cellPamfReaderGetEpIteratorWithIndex(vm::ptr pSelf, u32 epIn return CELL_OK; } -s32 cellPamfReaderGetEpIteratorWithTimeStamp(vm::ptr pSelf, vm::ptr pTimeStamp, vm::ptr pIt) +error_code cellPamfReaderGetEpIteratorWithTimeStamp(vm::ptr pSelf, vm::ptr pTimeStamp, vm::ptr pIt) { cellPamf.todo("cellPamfReaderGetEpIteratorWithTimeStamp(pSelf=*0x%x, pTimeStamp=*0x%x, pIt=*0x%x)", pSelf, pTimeStamp, pIt); @@ -722,7 +741,7 @@ s32 cellPamfReaderGetEpIteratorWithTimeStamp(vm::ptr pSelf, vm:: return CELL_OK; } -s32 cellPamfEpIteratorGetEp(vm::ptr pIt, vm::ptr pEp) +error_code cellPamfEpIteratorGetEp(vm::ptr pIt, vm::ptr pEp) { cellPamf.todo("cellPamfEpIteratorGetEp(pIt=*0x%x, pEp=*0x%x)", pIt, pEp); diff --git a/rpcs3/Emu/Cell/Modules/cellPamf.h b/rpcs3/Emu/Cell/Modules/cellPamf.h index 87621732eb..b3cd294950 100644 --- a/rpcs3/Emu/Cell/Modules/cellPamf.h +++ b/rpcs3/Emu/Cell/Modules/cellPamf.h @@ -1,9 +1,9 @@ -#pragma once +#pragma once #include "Emu/Memory/vm_ptr.h" // Error Codes -enum +enum CellPamfError : u32 { CELL_PAMF_ERROR_STREAM_NOT_FOUND = 0x80610501, CELL_PAMF_ERROR_INVALID_PAMF = 0x80610502, @@ -396,7 +396,7 @@ struct CellPamfReader CHECK_SIZE(CellPamfReader, 128); -s32 cellPamfReaderInitialize(vm::ptr pSelf, vm::cptr pAddr, u64 fileSize, u32 attribute); +error_code cellPamfReaderInitialize(vm::ptr pSelf, vm::cptr pAddr, u64 fileSize, u32 attribute); #include #include diff --git a/rpcs3/Emu/Cell/Modules/cellPesmUtility.cpp b/rpcs3/Emu/Cell/Modules/cellPesmUtility.cpp index bfe776c01c..cc3c713c08 100644 --- a/rpcs3/Emu/Cell/Modules/cellPesmUtility.cpp +++ b/rpcs3/Emu/Cell/Modules/cellPesmUtility.cpp @@ -1,93 +1,93 @@ -#include "stdafx.h" +#include "stdafx.h" #include "Emu/Cell/PPUModule.h" LOG_CHANNEL(cellPesmUtility); -s32 cellPesmCloseDevice() +error_code cellPesmCloseDevice() { UNIMPLEMENTED_FUNC(cellPesmUtility); return CELL_OK; } -s32 cellPesmEncryptSample() +error_code cellPesmEncryptSample() { UNIMPLEMENTED_FUNC(cellPesmUtility); return CELL_OK; } -s32 cellPesmEncryptSample2() +error_code cellPesmEncryptSample2() { UNIMPLEMENTED_FUNC(cellPesmUtility); return CELL_OK; } -s32 cellPesmEndMovieRec() +error_code cellPesmEndMovieRec() { UNIMPLEMENTED_FUNC(cellPesmUtility); return CELL_OK; } -s32 cellPesmFinalize() +error_code cellPesmFinalize() { UNIMPLEMENTED_FUNC(cellPesmUtility); return CELL_OK; } -s32 cellPesmFinalize2() +error_code cellPesmFinalize2() { UNIMPLEMENTED_FUNC(cellPesmUtility); return CELL_OK; } -s32 cellPesmGetSinf() +error_code cellPesmGetSinf() { UNIMPLEMENTED_FUNC(cellPesmUtility); return CELL_OK; } -s32 cellPesmInitEntry() +error_code cellPesmInitEntry() { UNIMPLEMENTED_FUNC(cellPesmUtility); return CELL_OK; } -s32 cellPesmInitEntry2() +error_code cellPesmInitEntry2() { UNIMPLEMENTED_FUNC(cellPesmUtility); return CELL_OK; } -s32 cellPesmInitialize() +error_code cellPesmInitialize() { UNIMPLEMENTED_FUNC(cellPesmUtility); return CELL_OK; } -s32 cellPesmLoadAsync() +error_code cellPesmLoadAsync() { UNIMPLEMENTED_FUNC(cellPesmUtility); return CELL_OK; } -s32 cellPesmOpenDevice() +error_code cellPesmOpenDevice() { UNIMPLEMENTED_FUNC(cellPesmUtility); return CELL_OK; } -s32 cellPesmPrepareRec() +error_code cellPesmPrepareRec() { UNIMPLEMENTED_FUNC(cellPesmUtility); return CELL_OK; } -s32 cellPesmStartMovieRec() +error_code cellPesmStartMovieRec() { UNIMPLEMENTED_FUNC(cellPesmUtility); return CELL_OK; } -s32 cellPesmUnloadAsync() +error_code cellPesmUnloadAsync() { UNIMPLEMENTED_FUNC(cellPesmUtility); return CELL_OK; diff --git a/rpcs3/Emu/Cell/Modules/cellPhotoDecode.cpp b/rpcs3/Emu/Cell/Modules/cellPhotoDecode.cpp index 996fe1b9ef..15aebe6cf1 100644 --- a/rpcs3/Emu/Cell/Modules/cellPhotoDecode.cpp +++ b/rpcs3/Emu/Cell/Modules/cellPhotoDecode.cpp @@ -1,4 +1,4 @@ -#include "stdafx.h" +#include "stdafx.h" #include "Emu/Cell/PPUModule.h" #include "cellSysutil.h" @@ -7,7 +7,7 @@ LOG_CHANNEL(cellPhotoDecode); // Return Codes -enum +enum CellPhotoDecodeError : u32 { CELL_PHOTO_DECODE_ERROR_BUSY = 0x8002c901, CELL_PHOTO_DECODE_ERROR_INTERNAL = 0x8002c902, @@ -17,6 +17,25 @@ enum CELL_PHOTO_DECODE_ERROR_DECODE = 0x8002c906, }; +template<> +void fmt_class_string::format(std::string& out, u64 arg) +{ + format_enum(out, arg, [](auto error) + { + switch (error) + { + STR_CASE(CELL_PHOTO_DECODE_ERROR_BUSY); + STR_CASE(CELL_PHOTO_DECODE_ERROR_INTERNAL); + STR_CASE(CELL_PHOTO_DECODE_ERROR_PARAM); + STR_CASE(CELL_PHOTO_DECODE_ERROR_ACCESS_ERROR); + STR_CASE(CELL_PHOTO_DECODE_ERROR_INITIALIZE); + STR_CASE(CELL_PHOTO_DECODE_ERROR_DECODE); + } + + return unknown; + }); +} + struct CellPhotoDecodeSetParam { vm::bptr dstBuffer; diff --git a/rpcs3/Emu/Cell/Modules/cellPhotoExport.cpp b/rpcs3/Emu/Cell/Modules/cellPhotoExport.cpp index f480bed437..8123082455 100644 --- a/rpcs3/Emu/Cell/Modules/cellPhotoExport.cpp +++ b/rpcs3/Emu/Cell/Modules/cellPhotoExport.cpp @@ -1,4 +1,4 @@ -#include "stdafx.h" +#include "stdafx.h" #include "Emu/Cell/PPUModule.h" #include "cellSysutil.h" @@ -7,7 +7,7 @@ LOG_CHANNEL(cellPhotoExport); // Return Codes -enum +enum CellPhotoExportError : u32 { CELL_PHOTO_EXPORT_UTIL_ERROR_BUSY = 0x8002c201, CELL_PHOTO_EXPORT_UTIL_ERROR_INTERNAL = 0x8002c202, @@ -21,6 +21,29 @@ enum CELL_PHOTO_EXPORT_UTIL_ERROR_INITIALIZE = 0x8002c20a, }; +template<> +void fmt_class_string::format(std::string& out, u64 arg) +{ + format_enum(out, arg, [](auto error) + { + switch (error) + { + STR_CASE(CELL_PHOTO_EXPORT_UTIL_ERROR_BUSY); + STR_CASE(CELL_PHOTO_EXPORT_UTIL_ERROR_INTERNAL); + STR_CASE(CELL_PHOTO_EXPORT_UTIL_ERROR_PARAM); + STR_CASE(CELL_PHOTO_EXPORT_UTIL_ERROR_ACCESS_ERROR); + STR_CASE(CELL_PHOTO_EXPORT_UTIL_ERROR_DB_INTERNAL); + STR_CASE(CELL_PHOTO_EXPORT_UTIL_ERROR_DB_REGIST); + STR_CASE(CELL_PHOTO_EXPORT_UTIL_ERROR_SET_META); + STR_CASE(CELL_PHOTO_EXPORT_UTIL_ERROR_FLUSH_META); + STR_CASE(CELL_PHOTO_EXPORT_UTIL_ERROR_MOVE); + STR_CASE(CELL_PHOTO_EXPORT_UTIL_ERROR_INITIALIZE); + } + + return unknown; + }); +} + struct CellPhotoExportSetParam { vm::bptr photo_title; @@ -31,19 +54,19 @@ struct CellPhotoExportSetParam using CellPhotoExportUtilFinishCallback = void(s32 result, vm::ptr userdata); -s32 cellPhotoInitialize() +error_code cellPhotoInitialize() { UNIMPLEMENTED_FUNC(cellPhotoExport); return CELL_OK; } -s32 cellPhotoFinalize() +error_code cellPhotoFinalize() { UNIMPLEMENTED_FUNC(cellPhotoExport); return CELL_OK; } -s32 cellPhotoRegistFromFile() +error_code cellPhotoRegistFromFile() { UNIMPLEMENTED_FUNC(cellPhotoExport); return CELL_OK; diff --git a/rpcs3/Emu/Cell/Modules/cellPhotoImport.cpp b/rpcs3/Emu/Cell/Modules/cellPhotoImport.cpp index be11e46a8f..dec344cead 100644 --- a/rpcs3/Emu/Cell/Modules/cellPhotoImport.cpp +++ b/rpcs3/Emu/Cell/Modules/cellPhotoImport.cpp @@ -1,4 +1,4 @@ -#include "stdafx.h" +#include "stdafx.h" #include "Emu/Cell/PPUModule.h" #include "Emu/Cell/lv2/sys_fs.h" #include "cellSysutil.h" @@ -8,7 +8,7 @@ LOG_CHANNEL(cellPhotoImportUtil); // Return Codes -enum +enum CellPhotoImportError : u32 { CELL_PHOTO_IMPORT_ERROR_BUSY = 0x8002c701, CELL_PHOTO_IMPORT_ERROR_INTERNAL = 0x8002c702, @@ -18,6 +18,25 @@ enum CELL_PHOTO_IMPORT_ERROR_INITIALIZE = 0x8002c706, }; +template<> +void fmt_class_string::format(std::string& out, u64 arg) +{ + format_enum(out, arg, [](auto error) + { + switch (error) + { + STR_CASE(CELL_PHOTO_IMPORT_ERROR_BUSY); + STR_CASE(CELL_PHOTO_IMPORT_ERROR_INTERNAL); + STR_CASE(CELL_PHOTO_IMPORT_ERROR_PARAM); + STR_CASE(CELL_PHOTO_IMPORT_ERROR_ACCESS_ERROR); + STR_CASE(CELL_PHOTO_IMPORT_ERROR_COPY); + STR_CASE(CELL_PHOTO_IMPORT_ERROR_INITIALIZE); + } + + return unknown; + }); +} + enum { CELL_PHOTO_IMPORT_HDD_PATH_MAX = 1055, diff --git a/rpcs3/Emu/Cell/Modules/cellRtcAlarm.cpp b/rpcs3/Emu/Cell/Modules/cellRtcAlarm.cpp index c357d7dbf5..f311f079a5 100644 --- a/rpcs3/Emu/Cell/Modules/cellRtcAlarm.cpp +++ b/rpcs3/Emu/Cell/Modules/cellRtcAlarm.cpp @@ -1,33 +1,33 @@ -#include "stdafx.h" +#include "stdafx.h" #include "Emu/Cell/PPUModule.h" LOG_CHANNEL(cellRtcAlarm); -s32 cellRtcAlarmRegister() +error_code cellRtcAlarmRegister() { UNIMPLEMENTED_FUNC(cellRtcAlarm); return CELL_OK; } -s32 cellRtcAlarmUnregister() +error_code cellRtcAlarmUnregister() { UNIMPLEMENTED_FUNC(cellRtcAlarm); return CELL_OK; } -s32 cellRtcAlarmNotification() +error_code cellRtcAlarmNotification() { UNIMPLEMENTED_FUNC(cellRtcAlarm); return CELL_OK; } -s32 cellRtcAlarmStopRunning() +error_code cellRtcAlarmStopRunning() { UNIMPLEMENTED_FUNC(cellRtcAlarm); return CELL_OK; } -s32 cellRtcAlarmGetStatus() +error_code cellRtcAlarmGetStatus() { UNIMPLEMENTED_FUNC(cellRtcAlarm); return CELL_OK; diff --git a/rpcs3/Emu/Cell/Modules/cellRudp.cpp b/rpcs3/Emu/Cell/Modules/cellRudp.cpp index e18812f023..0d672bdb40 100644 --- a/rpcs3/Emu/Cell/Modules/cellRudp.cpp +++ b/rpcs3/Emu/Cell/Modules/cellRudp.cpp @@ -6,6 +6,57 @@ LOG_CHANNEL(cellRudp); +template <> +void fmt_class_string::format(std::string& out, u64 arg) +{ + format_enum(out, arg, [](auto error) + { + switch (error) + { + STR_CASE(CELL_RUDP_ERROR_NOT_INITIALIZED); + STR_CASE(CELL_RUDP_ERROR_ALREADY_INITIALIZED); + STR_CASE(CELL_RUDP_ERROR_INVALID_CONTEXT_ID); + STR_CASE(CELL_RUDP_ERROR_INVALID_ARGUMENT); + STR_CASE(CELL_RUDP_ERROR_INVALID_OPTION); + STR_CASE(CELL_RUDP_ERROR_INVALID_MUXMODE); + STR_CASE(CELL_RUDP_ERROR_MEMORY); + STR_CASE(CELL_RUDP_ERROR_INTERNAL); + STR_CASE(CELL_RUDP_ERROR_CONN_RESET); + STR_CASE(CELL_RUDP_ERROR_CONN_REFUSED); + STR_CASE(CELL_RUDP_ERROR_CONN_TIMEOUT); + STR_CASE(CELL_RUDP_ERROR_CONN_VERSION_MISMATCH); + STR_CASE(CELL_RUDP_ERROR_CONN_TRANSPORT_TYPE_MISMATCH); + STR_CASE(CELL_RUDP_ERROR_QUALITY_LEVEL_MISMATCH); + STR_CASE(CELL_RUDP_ERROR_THREAD); + STR_CASE(CELL_RUDP_ERROR_THREAD_IN_USE); + STR_CASE(CELL_RUDP_ERROR_NOT_ACCEPTABLE); + STR_CASE(CELL_RUDP_ERROR_MSG_TOO_LARGE); + STR_CASE(CELL_RUDP_ERROR_NOT_BOUND); + STR_CASE(CELL_RUDP_ERROR_CANCELLED); + STR_CASE(CELL_RUDP_ERROR_INVALID_VPORT); + STR_CASE(CELL_RUDP_ERROR_WOULDBLOCK); + STR_CASE(CELL_RUDP_ERROR_VPORT_IN_USE); + STR_CASE(CELL_RUDP_ERROR_VPORT_EXHAUSTED); + STR_CASE(CELL_RUDP_ERROR_INVALID_SOCKET); + STR_CASE(CELL_RUDP_ERROR_BUFFER_TOO_SMALL); + STR_CASE(CELL_RUDP_ERROR_MSG_MALFORMED); + STR_CASE(CELL_RUDP_ERROR_ADDR_IN_USE); + STR_CASE(CELL_RUDP_ERROR_ALREADY_BOUND); + STR_CASE(CELL_RUDP_ERROR_ALREADY_EXISTS); + STR_CASE(CELL_RUDP_ERROR_INVALID_POLL_ID); + STR_CASE(CELL_RUDP_ERROR_TOO_MANY_CONTEXTS); + STR_CASE(CELL_RUDP_ERROR_IN_PROGRESS); + STR_CASE(CELL_RUDP_ERROR_NO_EVENT_HANDLER); + STR_CASE(CELL_RUDP_ERROR_PAYLOAD_TOO_LARGE); + STR_CASE(CELL_RUDP_ERROR_END_OF_DATA); + STR_CASE(CELL_RUDP_ERROR_ALREADY_ESTABLISHED); + STR_CASE(CELL_RUDP_ERROR_KEEP_ALIVE_FAILURE); + } + + return unknown; + }); +} + struct rudp_info { // allocator functions @@ -17,7 +68,7 @@ struct rudp_info vm::ptr handler_arg; }; -s32 cellRudpInit(vm::ptr allocator) +error_code cellRudpInit(vm::ptr allocator) { cellRudp.warning("cellRudpInit(allocator=*0x%x)", allocator); @@ -52,7 +103,7 @@ s32 cellRudpInit(vm::ptr allocator) return CELL_OK; } -s32 cellRudpEnd() +error_code cellRudpEnd() { cellRudp.warning("cellRudpEnd()"); @@ -70,13 +121,13 @@ s32 cellRudpEnd() return CELL_OK; } -s32 cellRudpEnableInternalIOThread() +error_code cellRudpEnableInternalIOThread() { UNIMPLEMENTED_FUNC(cellRudp); return CELL_OK; } -s32 cellRudpSetEventHandler(vm::ptr handler, vm::ptr arg) +error_code cellRudpSetEventHandler(vm::ptr handler, vm::ptr arg) { cellRudp.todo("cellRudpSetEventHandler(handler=*0x%x, arg=*0x%x)", handler, arg); @@ -93,163 +144,163 @@ s32 cellRudpSetEventHandler(vm::ptr handler, vm::ptr return CELL_OK; } -s32 cellRudpSetMaxSegmentSize(u16 mss) +error_code cellRudpSetMaxSegmentSize(u16 mss) { cellRudp.todo("cellRudpSetMaxSegmentSize(mss=%d)", mss); return CELL_OK; } -s32 cellRudpGetMaxSegmentSize() +error_code cellRudpGetMaxSegmentSize() { UNIMPLEMENTED_FUNC(cellRudp); return CELL_OK; } -s32 cellRudpCreateContext() +error_code cellRudpCreateContext() { UNIMPLEMENTED_FUNC(cellRudp); return CELL_OK; } -s32 cellRudpSetOption() +error_code cellRudpSetOption() { UNIMPLEMENTED_FUNC(cellRudp); return CELL_OK; } -s32 cellRudpGetOption() +error_code cellRudpGetOption() { UNIMPLEMENTED_FUNC(cellRudp); return CELL_OK; } -s32 cellRudpGetContextStatus() +error_code cellRudpGetContextStatus() { UNIMPLEMENTED_FUNC(cellRudp); return CELL_OK; } -s32 cellRudpGetStatus() +error_code cellRudpGetStatus() { UNIMPLEMENTED_FUNC(cellRudp); return CELL_OK; } -s32 cellRudpGetLocalInfo() +error_code cellRudpGetLocalInfo() { UNIMPLEMENTED_FUNC(cellRudp); return CELL_OK; } -s32 cellRudpGetRemoteInfo() +error_code cellRudpGetRemoteInfo() { UNIMPLEMENTED_FUNC(cellRudp); return CELL_OK; } -s32 cellRudpAccept() +error_code cellRudpAccept() { UNIMPLEMENTED_FUNC(cellRudp); return CELL_OK; } -s32 cellRudpBind() +error_code cellRudpBind() { UNIMPLEMENTED_FUNC(cellRudp); return CELL_OK; } -s32 cellRudpListen() +error_code cellRudpListen() { UNIMPLEMENTED_FUNC(cellRudp); return CELL_OK; } -s32 cellRudpInitiate() +error_code cellRudpInitiate() { UNIMPLEMENTED_FUNC(cellRudp); return CELL_OK; } -s32 cellRudpActivate() +error_code cellRudpActivate() { UNIMPLEMENTED_FUNC(cellRudp); return CELL_OK; } -s32 cellRudpTerminate() +error_code cellRudpTerminate() { UNIMPLEMENTED_FUNC(cellRudp); return CELL_OK; } -s32 cellRudpRead() +error_code cellRudpRead() { UNIMPLEMENTED_FUNC(cellRudp); return CELL_OK; } -s32 cellRudpWrite() +error_code cellRudpWrite() { UNIMPLEMENTED_FUNC(cellRudp); return CELL_OK; } -s32 cellRudpGetSizeReadable() +error_code cellRudpGetSizeReadable() { UNIMPLEMENTED_FUNC(cellRudp); return CELL_OK; } -s32 cellRudpGetSizeWritable() +error_code cellRudpGetSizeWritable() { UNIMPLEMENTED_FUNC(cellRudp); return CELL_OK; } -s32 cellRudpFlush() +error_code cellRudpFlush() { UNIMPLEMENTED_FUNC(cellRudp); return CELL_OK; } -s32 cellRudpPollCreate() +error_code cellRudpPollCreate() { UNIMPLEMENTED_FUNC(cellRudp); return CELL_OK; } -s32 cellRudpPollDestroy() +error_code cellRudpPollDestroy() { UNIMPLEMENTED_FUNC(cellRudp); return CELL_OK; } -s32 cellRudpPollControl() +error_code cellRudpPollControl() { UNIMPLEMENTED_FUNC(cellRudp); return CELL_OK; } -s32 cellRudpPollWait() +error_code cellRudpPollWait() { UNIMPLEMENTED_FUNC(cellRudp); return CELL_OK; } -s32 cellRudpPollCancel() +error_code cellRudpPollCancel() { UNIMPLEMENTED_FUNC(cellRudp); return CELL_OK; } -s32 cellRudpNetReceived() +error_code cellRudpNetReceived() { UNIMPLEMENTED_FUNC(cellRudp); return CELL_OK; } -s32 cellRudpProcessEvents() +error_code cellRudpProcessEvents() { UNIMPLEMENTED_FUNC(cellRudp); return CELL_OK; diff --git a/rpcs3/Emu/Cell/Modules/cellRudp.h b/rpcs3/Emu/Cell/Modules/cellRudp.h index b06e920c90..0c934236dd 100644 --- a/rpcs3/Emu/Cell/Modules/cellRudp.h +++ b/rpcs3/Emu/Cell/Modules/cellRudp.h @@ -1,9 +1,9 @@ -#pragma once +#pragma once #include "Emu/Memory/vm_ptr.h" // Return Codes -enum +enum CellRudpError : u32 { CELL_RUDP_SUCCESS = 0, CELL_RUDP_ERROR_NOT_INITIALIZED = 0x80770001, diff --git a/rpcs3/Emu/Cell/Modules/cellSail.cpp b/rpcs3/Emu/Cell/Modules/cellSail.cpp index 31aee3a67a..55666f4508 100644 --- a/rpcs3/Emu/Cell/Modules/cellSail.cpp +++ b/rpcs3/Emu/Cell/Modules/cellSail.cpp @@ -7,7 +7,32 @@ LOG_CHANNEL(cellSail); -s32 cellSailMemAllocatorInitialize(vm::ptr pSelf, vm::ptr pCallbacks) +template <> +void fmt_class_string::format(std::string& out, u64 arg) +{ + format_enum(out, arg, [](auto error) + { + switch (error) + { + STR_CASE(CELL_SAIL_ERROR_INVALID_ARG); + STR_CASE(CELL_SAIL_ERROR_INVALID_STATE); + STR_CASE(CELL_SAIL_ERROR_UNSUPPORTED_STREAM); + STR_CASE(CELL_SAIL_ERROR_INDEX_OUT_OF_RANGE); + STR_CASE(CELL_SAIL_ERROR_EMPTY); + STR_CASE(CELL_SAIL_ERROR_FULLED); + STR_CASE(CELL_SAIL_ERROR_USING); + STR_CASE(CELL_SAIL_ERROR_NOT_AVAILABLE); + STR_CASE(CELL_SAIL_ERROR_CANCEL); + STR_CASE(CELL_SAIL_ERROR_MEMORY); + STR_CASE(CELL_SAIL_ERROR_INVALID_FD); + STR_CASE(CELL_SAIL_ERROR_FATAL); + } + + return unknown; + }); +} + +error_code cellSailMemAllocatorInitialize(vm::ptr pSelf, vm::ptr pCallbacks) { cellSail.warning("cellSailMemAllocatorInitialize(pSelf=*0x%x, pCallbacks=*0x%x)", pSelf, pCallbacks); @@ -16,61 +41,61 @@ s32 cellSailMemAllocatorInitialize(vm::ptr pSelf, vm::ptr< return CELL_OK; } -s32 cellSailFutureInitialize(vm::ptr pSelf) +error_code cellSailFutureInitialize(vm::ptr pSelf) { cellSail.todo("cellSailFutureInitialize(pSelf=*0x%x)", pSelf); return CELL_OK; } -s32 cellSailFutureFinalize(vm::ptr pSelf) +error_code cellSailFutureFinalize(vm::ptr pSelf) { cellSail.todo("cellSailFutureFinalize(pSelf=*0x%x)", pSelf); return CELL_OK; } -s32 cellSailFutureReset(vm::ptr pSelf, b8 wait) +error_code cellSailFutureReset(vm::ptr pSelf, b8 wait) { cellSail.todo("cellSailFutureReset(pSelf=*0x%x, wait=%d)", pSelf, wait); return CELL_OK; } -s32 cellSailFutureSet(vm::ptr pSelf, s32 result) +error_code cellSailFutureSet(vm::ptr pSelf, s32 result) { cellSail.todo("cellSailFutureSet(pSelf=*0x%x, result=%d)", pSelf, result); return CELL_OK; } -s32 cellSailFutureGet(vm::ptr pSelf, u64 timeout, vm::ptr pResult) +error_code cellSailFutureGet(vm::ptr pSelf, u64 timeout, vm::ptr pResult) { cellSail.todo("cellSailFutureGet(pSelf=*0x%x, timeout=%lld, result=*0x%x)", pSelf, timeout, pResult); return CELL_OK; } -s32 cellSailFutureIsDone(vm::ptr pSelf, vm::ptr pResult) +error_code cellSailFutureIsDone(vm::ptr pSelf, vm::ptr pResult) { cellSail.todo("cellSailFutureIsDone(pSelf=*0x%x, result=*0x%x)", pSelf, pResult); return CELL_OK; } -s32 cellSailDescriptorGetStreamType() +error_code cellSailDescriptorGetStreamType() { UNIMPLEMENTED_FUNC(cellSail); return CELL_OK; } -s32 cellSailDescriptorGetUri() +error_code cellSailDescriptorGetUri() { UNIMPLEMENTED_FUNC(cellSail); return CELL_OK; } -s32 cellSailDescriptorGetMediaInfo() +error_code cellSailDescriptorGetMediaInfo() { UNIMPLEMENTED_FUNC(cellSail); return CELL_OK; } -s32 cellSailDescriptorSetAutoSelection(vm::ptr pSelf, b8 autoSelection) +error_code cellSailDescriptorSetAutoSelection(vm::ptr pSelf, b8 autoSelection) { cellSail.warning("cellSailDescriptorSetAutoSelection(pSelf=*0x%x, autoSelection=%d)", pSelf, autoSelection); @@ -83,7 +108,7 @@ s32 cellSailDescriptorSetAutoSelection(vm::ptr pSelf, b8 aut return CELL_OK; } -s32 cellSailDescriptorIsAutoSelection(vm::ptr pSelf) +error_code cellSailDescriptorIsAutoSelection(vm::ptr pSelf) { cellSail.warning("cellSailDescriptorIsAutoSelection(pSelf=*0x%x)", pSelf); @@ -95,7 +120,7 @@ s32 cellSailDescriptorIsAutoSelection(vm::ptr pSelf) return CELL_OK; } -s32 cellSailDescriptorCreateDatabase(vm::ptr pSelf, vm::ptr pDatabase, u32 size, u64 arg) +error_code cellSailDescriptorCreateDatabase(vm::ptr pSelf, vm::ptr pDatabase, u32 size, u64 arg) { cellSail.warning("cellSailDescriptorCreateDatabase(pSelf=*0x%x, pDatabase=*0x%x, size=0x%x, arg=0x%llx)", pSelf, pDatabase, size, arg); @@ -115,55 +140,55 @@ s32 cellSailDescriptorCreateDatabase(vm::ptr pSelf, vm::ptr< return CELL_OK; } -s32 cellSailDescriptorDestroyDatabase() +error_code cellSailDescriptorDestroyDatabase() { UNIMPLEMENTED_FUNC(cellSail); return CELL_OK; } -s32 cellSailDescriptorOpen() +error_code cellSailDescriptorOpen() { UNIMPLEMENTED_FUNC(cellSail); return CELL_OK; } -s32 cellSailDescriptorClose() +error_code cellSailDescriptorClose() { UNIMPLEMENTED_FUNC(cellSail); return CELL_OK; } -s32 cellSailDescriptorSetEs() +error_code cellSailDescriptorSetEs() { UNIMPLEMENTED_FUNC(cellSail); return CELL_OK; } -s32 cellSailDescriptorClearEs() +error_code cellSailDescriptorClearEs() { UNIMPLEMENTED_FUNC(cellSail); return CELL_OK; } -s32 cellSailDescriptorGetCapabilities() +error_code cellSailDescriptorGetCapabilities() { UNIMPLEMENTED_FUNC(cellSail); return CELL_OK; } -s32 cellSailDescriptorInquireCapability() +error_code cellSailDescriptorInquireCapability() { UNIMPLEMENTED_FUNC(cellSail); return CELL_OK; } -s32 cellSailDescriptorSetParameter() +error_code cellSailDescriptorSetParameter() { UNIMPLEMENTED_FUNC(cellSail); return CELL_OK; } -s32 cellSailSoundAdapterInitialize(vm::ptr pSelf, vm::cptr pCallbacks, vm::ptr pArg) +error_code cellSailSoundAdapterInitialize(vm::ptr pSelf, vm::cptr pCallbacks, vm::ptr pArg) { cellSail.warning("cellSailSoundAdapterInitialize(pSelf=*0x%x, pCallbacks=*0x%x, pArg=*0x%x)", pSelf, pCallbacks, pArg); @@ -187,7 +212,7 @@ s32 cellSailSoundAdapterInitialize(vm::ptr pSelf, vm::cptr return CELL_OK; } -s32 cellSailSoundAdapterFinalize(vm::ptr pSelf) +error_code cellSailSoundAdapterFinalize(vm::ptr pSelf) { cellSail.warning("cellSailSoundAdapterFinalize(pSelf=*0x%x)", pSelf); @@ -204,7 +229,7 @@ s32 cellSailSoundAdapterFinalize(vm::ptr pSelf) return CELL_OK; } -s32 cellSailSoundAdapterSetPreferredFormat(vm::ptr pSelf, vm::cptr pFormat) +error_code cellSailSoundAdapterSetPreferredFormat(vm::ptr pSelf, vm::cptr pFormat) { cellSail.warning("cellSailSoundAdapterSetPreferredFormat(pSelf=*0x%x, pFormat=*0x%x)", pSelf, pFormat); @@ -213,7 +238,7 @@ s32 cellSailSoundAdapterSetPreferredFormat(vm::ptr pSelf, return CELL_OK; } -s32 cellSailSoundAdapterGetFrame(vm::ptr pSelf, u32 samples, vm::ptr pInfo) +error_code cellSailSoundAdapterGetFrame(vm::ptr pSelf, u32 samples, vm::ptr pInfo) { cellSail.todo("cellSailSoundAdapterGetFrame(pSelf=*0x%x, samples=%d, pInfo=*0x%x)", pSelf, samples, pInfo); @@ -235,7 +260,7 @@ s32 cellSailSoundAdapterGetFrame(vm::ptr pSelf, u32 sample return CELL_OK; } -s32 cellSailSoundAdapterGetFormat(vm::ptr pSelf, vm::ptr pFormat) +error_code cellSailSoundAdapterGetFormat(vm::ptr pSelf, vm::ptr pFormat) { cellSail.warning("cellSailSoundAdapterGetFormat(pSelf=*0x%x, pFormat=*0x%x)", pSelf, pFormat); @@ -244,19 +269,19 @@ s32 cellSailSoundAdapterGetFormat(vm::ptr pSelf, vm::ptr pSelf, vm::cptr pCallbacks, vm::ptr pArg) +error_code cellSailGraphicsAdapterInitialize(vm::ptr pSelf, vm::cptr pCallbacks, vm::ptr pArg) { cellSail.warning("cellSailGraphicsAdapterInitialize(pSelf=*0x%x, pCallbacks=*0x%x, pArg=*0x%x)", pSelf, pCallbacks, pArg); @@ -282,7 +307,7 @@ s32 cellSailGraphicsAdapterInitialize(vm::ptr pSelf, vm return CELL_OK; } -s32 cellSailGraphicsAdapterFinalize(vm::ptr pSelf) +error_code cellSailGraphicsAdapterFinalize(vm::ptr pSelf) { cellSail.todo("cellSailGraphicsAdapterFinalize(pSelf=*0x%x)", pSelf); @@ -299,7 +324,7 @@ s32 cellSailGraphicsAdapterFinalize(vm::ptr pSelf) return CELL_OK; } -s32 cellSailGraphicsAdapterSetPreferredFormat(vm::ptr pSelf, vm::cptr pFormat) +error_code cellSailGraphicsAdapterSetPreferredFormat(vm::ptr pSelf, vm::cptr pFormat) { cellSail.warning("cellSailGraphicsAdapterSetPreferredFormat(pSelf=*0x%x, pFormat=*0x%x)", pSelf, pFormat); @@ -308,20 +333,20 @@ s32 cellSailGraphicsAdapterSetPreferredFormat(vm::ptr p return CELL_OK; } -s32 cellSailGraphicsAdapterGetFrame(vm::ptr pSelf, vm::ptr pInfo) +error_code cellSailGraphicsAdapterGetFrame(vm::ptr pSelf, vm::ptr pInfo) { cellSail.todo("cellSailGraphicsAdapterGetFrame(pSelf=*0x%x, pInfo=*0x%x)", pSelf, pInfo); return CELL_OK; } -s32 cellSailGraphicsAdapterGetFrame2(vm::ptr pSelf, vm::ptr pInfo, vm::ptr pPrevInfo, vm::ptr pFlipTime, u64 flags) +error_code cellSailGraphicsAdapterGetFrame2(vm::ptr pSelf, vm::ptr pInfo, vm::ptr pPrevInfo, vm::ptr pFlipTime, u64 flags) { cellSail.todo("cellSailGraphicsAdapterGetFrame2(pSelf=*0x%x, pInfo=*0x%x, pPrevInfo=*0x%x, flipTime=*0x%x, flags=0x%llx)", pSelf, pInfo, pPrevInfo, pFlipTime, flags); return CELL_OK; } -s32 cellSailGraphicsAdapterGetFormat(vm::ptr pSelf, vm::ptr pFormat) +error_code cellSailGraphicsAdapterGetFormat(vm::ptr pSelf, vm::ptr pFormat) { cellSail.warning("cellSailGraphicsAdapterGetFormat(pSelf=*0x%x, pFormat=*0x%x)", pSelf, pFormat); @@ -330,266 +355,266 @@ s32 cellSailGraphicsAdapterGetFormat(vm::ptr pSelf, vm: return CELL_OK; } -s32 cellSailGraphicsAdapterUpdateAvSync() +error_code cellSailGraphicsAdapterUpdateAvSync() { UNIMPLEMENTED_FUNC(cellSail); return CELL_OK; } -s32 cellSailGraphicsAdapterPtsToTimePosition() +error_code cellSailGraphicsAdapterPtsToTimePosition() { UNIMPLEMENTED_FUNC(cellSail); return CELL_OK; } -s32 cellSailAuReceiverInitialize() +error_code cellSailAuReceiverInitialize() { UNIMPLEMENTED_FUNC(cellSail); return CELL_OK; } -s32 cellSailAuReceiverFinalize() +error_code cellSailAuReceiverFinalize() { UNIMPLEMENTED_FUNC(cellSail); return CELL_OK; } -s32 cellSailAuReceiverGet() +error_code cellSailAuReceiverGet() { UNIMPLEMENTED_FUNC(cellSail); return CELL_OK; } -s32 cellSailRendererAudioInitialize() +error_code cellSailRendererAudioInitialize() { UNIMPLEMENTED_FUNC(cellSail); return CELL_OK; } -s32 cellSailRendererAudioFinalize() +error_code cellSailRendererAudioFinalize() { UNIMPLEMENTED_FUNC(cellSail); return CELL_OK; } -s32 cellSailRendererAudioNotifyCallCompleted() +error_code cellSailRendererAudioNotifyCallCompleted() { UNIMPLEMENTED_FUNC(cellSail); return CELL_OK; } -s32 cellSailRendererAudioNotifyFrameDone() +error_code cellSailRendererAudioNotifyFrameDone() { UNIMPLEMENTED_FUNC(cellSail); return CELL_OK; } -s32 cellSailRendererAudioNotifyOutputEos() +error_code cellSailRendererAudioNotifyOutputEos() { UNIMPLEMENTED_FUNC(cellSail); return CELL_OK; } -s32 cellSailRendererVideoInitialize() +error_code cellSailRendererVideoInitialize() { UNIMPLEMENTED_FUNC(cellSail); return CELL_OK; } -s32 cellSailRendererVideoFinalize() +error_code cellSailRendererVideoFinalize() { UNIMPLEMENTED_FUNC(cellSail); return CELL_OK; } -s32 cellSailRendererVideoNotifyCallCompleted() +error_code cellSailRendererVideoNotifyCallCompleted() { UNIMPLEMENTED_FUNC(cellSail); return CELL_OK; } -s32 cellSailRendererVideoNotifyFrameDone() +error_code cellSailRendererVideoNotifyFrameDone() { UNIMPLEMENTED_FUNC(cellSail); return CELL_OK; } -s32 cellSailRendererVideoNotifyOutputEos() +error_code cellSailRendererVideoNotifyOutputEos() { UNIMPLEMENTED_FUNC(cellSail); return CELL_OK; } -s32 cellSailSourceInitialize() +error_code cellSailSourceInitialize() { UNIMPLEMENTED_FUNC(cellSail); return CELL_OK; } -s32 cellSailSourceFinalize() +error_code cellSailSourceFinalize() { UNIMPLEMENTED_FUNC(cellSail); return CELL_OK; } -s32 cellSailSourceNotifyCallCompleted() +error_code cellSailSourceNotifyCallCompleted() { UNIMPLEMENTED_FUNC(cellSail); return CELL_OK; } -s32 cellSailSourceNotifyInputEos() +error_code cellSailSourceNotifyInputEos() { UNIMPLEMENTED_FUNC(cellSail); return CELL_OK; } -s32 cellSailSourceNotifyStreamOut() +error_code cellSailSourceNotifyStreamOut() { UNIMPLEMENTED_FUNC(cellSail); return CELL_OK; } -s32 cellSailSourceNotifySessionError() +error_code cellSailSourceNotifySessionError() { UNIMPLEMENTED_FUNC(cellSail); return CELL_OK; } -s32 cellSailSourceNotifyMediaStateChanged() +error_code cellSailSourceNotifyMediaStateChanged() { UNIMPLEMENTED_FUNC(cellSail); return CELL_OK; } -s32 cellSailSourceNotifyOpenCompleted() +error_code cellSailSourceNotifyOpenCompleted() { fmt::throw_exception("Unexpected function" HERE); } -s32 cellSailSourceNotifyStartCompleted() +error_code cellSailSourceNotifyStartCompleted() { fmt::throw_exception("Unexpected function" HERE); } -s32 cellSailSourceNotifyStopCompleted() +error_code cellSailSourceNotifyStopCompleted() { fmt::throw_exception("Unexpected function" HERE); } -s32 cellSailSourceNotifyReadCompleted() +error_code cellSailSourceNotifyReadCompleted() { fmt::throw_exception("Unexpected function" HERE); } -s32 cellSailSourceSetDiagHandler() +error_code cellSailSourceSetDiagHandler() { UNIMPLEMENTED_FUNC(cellSail); return CELL_OK; } -s32 cellSailSourceNotifyCloseCompleted() +error_code cellSailSourceNotifyCloseCompleted() { fmt::throw_exception("Unexpected function" HERE); } -s32 cellSailMp4MovieGetBrand() +error_code cellSailMp4MovieGetBrand() { UNIMPLEMENTED_FUNC(cellSail); return CELL_OK; } -s32 cellSailMp4MovieIsCompatibleBrand() +error_code cellSailMp4MovieIsCompatibleBrand() { UNIMPLEMENTED_FUNC(cellSail); return CELL_OK; } -s32 cellSailMp4MovieGetMovieInfo() +error_code cellSailMp4MovieGetMovieInfo() { UNIMPLEMENTED_FUNC(cellSail); return CELL_OK; } -s32 cellSailMp4MovieGetTrackByIndex() +error_code cellSailMp4MovieGetTrackByIndex() { UNIMPLEMENTED_FUNC(cellSail); return CELL_OK; } -s32 cellSailMp4MovieGetTrackById() +error_code cellSailMp4MovieGetTrackById() { UNIMPLEMENTED_FUNC(cellSail); return CELL_OK; } -s32 cellSailMp4MovieGetTrackByTypeAndIndex() +error_code cellSailMp4MovieGetTrackByTypeAndIndex() { UNIMPLEMENTED_FUNC(cellSail); return CELL_OK; } -s32 cellSailMp4TrackGetTrackInfo() +error_code cellSailMp4TrackGetTrackInfo() { UNIMPLEMENTED_FUNC(cellSail); return CELL_OK; } -s32 cellSailMp4TrackGetTrackReferenceCount() +error_code cellSailMp4TrackGetTrackReferenceCount() { UNIMPLEMENTED_FUNC(cellSail); return CELL_OK; } -s32 cellSailMp4TrackGetTrackReference() +error_code cellSailMp4TrackGetTrackReference() { UNIMPLEMENTED_FUNC(cellSail); return CELL_OK; } -s32 cellSailAviMovieGetMovieInfo() +error_code cellSailAviMovieGetMovieInfo() { UNIMPLEMENTED_FUNC(cellSail); return CELL_OK; } -s32 cellSailAviMovieGetStreamByIndex() +error_code cellSailAviMovieGetStreamByIndex() { UNIMPLEMENTED_FUNC(cellSail); return CELL_OK; } -s32 cellSailAviMovieGetStreamByTypeAndIndex() +error_code cellSailAviMovieGetStreamByTypeAndIndex() { UNIMPLEMENTED_FUNC(cellSail); return CELL_OK; } -s32 cellSailAviMovieGetHeader() +error_code cellSailAviMovieGetHeader() { UNIMPLEMENTED_FUNC(cellSail); return CELL_OK; } -s32 cellSailAviStreamGetMediaType() +error_code cellSailAviStreamGetMediaType() { UNIMPLEMENTED_FUNC(cellSail); return CELL_OK; } -s32 cellSailAviStreamGetHeader() +error_code cellSailAviStreamGetHeader() { UNIMPLEMENTED_FUNC(cellSail); return CELL_OK; } -s32 cellSailPlayerInitialize() +error_code cellSailPlayerInitialize() { UNIMPLEMENTED_FUNC(cellSail); return CELL_OK; } -s32 cellSailPlayerInitialize2(ppu_thread& ppu, +error_code cellSailPlayerInitialize2(ppu_thread& ppu, vm::ptr pSelf, vm::ptr pAllocator, vm::ptr pCallback, @@ -618,7 +643,7 @@ s32 cellSailPlayerInitialize2(ppu_thread& ppu, return CELL_OK; } -s32 cellSailPlayerFinalize(vm::ptr pSelf) +error_code cellSailPlayerFinalize(vm::ptr pSelf) { cellSail.todo("cellSailPlayerFinalize(pSelf=*0x%x)", pSelf); @@ -635,19 +660,19 @@ s32 cellSailPlayerFinalize(vm::ptr pSelf) return CELL_OK; } -s32 cellSailPlayerRegisterSource() +error_code cellSailPlayerRegisterSource() { UNIMPLEMENTED_FUNC(cellSail); return CELL_OK; } -s32 cellSailPlayerGetRegisteredProtocols() +error_code cellSailPlayerGetRegisteredProtocols() { UNIMPLEMENTED_FUNC(cellSail); return CELL_OK; } -s32 cellSailPlayerSetSoundAdapter(vm::ptr pSelf, u32 index, vm::ptr pAdapter) +error_code cellSailPlayerSetSoundAdapter(vm::ptr pSelf, u32 index, vm::ptr pAdapter) { cellSail.warning("cellSailPlayerSetSoundAdapter(pSelf=*0x%x, index=%d, pAdapter=*0x%x)", pSelf, index, pAdapter); @@ -663,7 +688,7 @@ s32 cellSailPlayerSetSoundAdapter(vm::ptr pSelf, u32 index, vm:: return CELL_OK; } -s32 cellSailPlayerSetGraphicsAdapter(vm::ptr pSelf, u32 index, vm::ptr pAdapter) +error_code cellSailPlayerSetGraphicsAdapter(vm::ptr pSelf, u32 index, vm::ptr pAdapter) { cellSail.warning("cellSailPlayerSetGraphicsAdapter(pSelf=*0x%x, index=%d, pAdapter=*0x%x)", pSelf, index, pAdapter); @@ -679,25 +704,25 @@ s32 cellSailPlayerSetGraphicsAdapter(vm::ptr pSelf, u32 index, v return CELL_OK; } -s32 cellSailPlayerSetAuReceiver() +error_code cellSailPlayerSetAuReceiver() { UNIMPLEMENTED_FUNC(cellSail); return CELL_OK; } -s32 cellSailPlayerSetRendererAudio() +error_code cellSailPlayerSetRendererAudio() { UNIMPLEMENTED_FUNC(cellSail); return CELL_OK; } -s32 cellSailPlayerSetRendererVideo() +error_code cellSailPlayerSetRendererVideo() { UNIMPLEMENTED_FUNC(cellSail); return CELL_OK; } -s32 cellSailPlayerSetParameter(vm::ptr pSelf, s32 parameterType, u64 param0, u64 param1) +error_code cellSailPlayerSetParameter(vm::ptr pSelf, s32 parameterType, u64 param0, u64 param1) { cellSail.warning("cellSailPlayerSetParameter(pSelf=*0x%x, parameterType=0x%x, param0=0x%llx, param1=0x%llx)", pSelf, parameterType, param0, param1); @@ -712,7 +737,7 @@ s32 cellSailPlayerSetParameter(vm::ptr pSelf, s32 parameterType, return CELL_OK; } -s32 cellSailPlayerGetParameter(vm::ptr pSelf, s32 parameterType, vm::ptr pParam0, vm::ptr pParam1) +error_code cellSailPlayerGetParameter(vm::ptr pSelf, s32 parameterType, vm::ptr pParam0, vm::ptr pParam1) { cellSail.todo("cellSailPlayerGetParameter(pSelf=*0x%x, parameterType=0x%x, param0=*0x%x, param1=*0x%x)", pSelf, parameterType, pParam0, pParam1); @@ -725,25 +750,25 @@ s32 cellSailPlayerGetParameter(vm::ptr pSelf, s32 parameterType, return CELL_OK; } -s32 cellSailPlayerSubscribeEvent() +error_code cellSailPlayerSubscribeEvent() { UNIMPLEMENTED_FUNC(cellSail); return CELL_OK; } -s32 cellSailPlayerUnsubscribeEvent() +error_code cellSailPlayerUnsubscribeEvent() { UNIMPLEMENTED_FUNC(cellSail); return CELL_OK; } -s32 cellSailPlayerReplaceEventHandler() +error_code cellSailPlayerReplaceEventHandler() { UNIMPLEMENTED_FUNC(cellSail); return CELL_OK; } -s32 cellSailPlayerBoot(ppu_thread& ppu, vm::ptr pSelf, u64 userParam) +error_code cellSailPlayerBoot(ppu_thread& ppu, vm::ptr pSelf, u64 userParam) { cellSail.warning("cellSailPlayerBoot(pSelf=*0x%x, userParam=%d)", pSelf, userParam); @@ -767,7 +792,7 @@ s32 cellSailPlayerBoot(ppu_thread& ppu, vm::ptr pSelf, u64 userP return CELL_OK; } -s32 cellSailPlayerAddDescriptor(vm::ptr pSelf, vm::ptr pDesc) +error_code cellSailPlayerAddDescriptor(vm::ptr pSelf, vm::ptr pDesc) { cellSail.warning("cellSailPlayerAddDescriptor(pSelf=*0x%x, pDesc=*0x%x)", pSelf, pDesc); @@ -785,7 +810,7 @@ s32 cellSailPlayerAddDescriptor(vm::ptr pSelf, vm::ptr pSelf, s32 streamType, vm::ptr pMediaInfo, vm::cptr pUri, vm::pptr ppDesc) +error_code cellSailPlayerCreateDescriptor(vm::ptr pSelf, s32 streamType, vm::ptr pMediaInfo, vm::cptr pUri, vm::pptr ppDesc) { cellSail.todo("cellSailPlayerCreateDescriptor(pSelf=*0x%x, streamType=%d, pMediaInfo=*0x%x, pUri=%s, ppDesc=**0x%x)", pSelf, streamType, pMediaInfo, pUri, ppDesc); @@ -837,7 +862,7 @@ s32 cellSailPlayerCreateDescriptor(vm::ptr pSelf, s32 streamType return CELL_OK; } -s32 cellSailPlayerDestroyDescriptor(vm::ptr pSelf, vm::ptr pDesc) +error_code cellSailPlayerDestroyDescriptor(vm::ptr pSelf, vm::ptr pDesc) { cellSail.todo("cellSailPlayerAddDescriptor(pSelf=*0x%x, pDesc=*0x%x)", pSelf, pDesc); @@ -847,7 +872,7 @@ s32 cellSailPlayerDestroyDescriptor(vm::ptr pSelf, vm::ptr pSelf, vm::ptr ppDesc) +error_code cellSailPlayerRemoveDescriptor(vm::ptr pSelf, vm::ptr ppDesc) { cellSail.warning("cellSailPlayerAddDescriptor(pSelf=*0x%x, pDesc=*0x%x)", pSelf, ppDesc); @@ -862,109 +887,109 @@ s32 cellSailPlayerRemoveDescriptor(vm::ptr pSelf, vm::ptrdescriptors; } -s32 cellSailPlayerGetDescriptorCount(vm::ptr pSelf) +error_code cellSailPlayerGetDescriptorCount(vm::ptr pSelf) { cellSail.warning("cellSailPlayerGetDescriptorCount(pSelf=*0x%x)", pSelf); - return pSelf->descriptors; + return not_an_error(pSelf->descriptors); } -s32 cellSailPlayerGetCurrentDescriptor() +error_code cellSailPlayerGetCurrentDescriptor() { UNIMPLEMENTED_FUNC(cellSail); return CELL_OK; } -s32 cellSailPlayerOpenStream() +error_code cellSailPlayerOpenStream() { UNIMPLEMENTED_FUNC(cellSail); return CELL_OK; } -s32 cellSailPlayerCloseStream() +error_code cellSailPlayerCloseStream() { UNIMPLEMENTED_FUNC(cellSail); return CELL_OK; } -s32 cellSailPlayerOpenEsAudio() +error_code cellSailPlayerOpenEsAudio() { UNIMPLEMENTED_FUNC(cellSail); return CELL_OK; } -s32 cellSailPlayerOpenEsVideo() +error_code cellSailPlayerOpenEsVideo() { UNIMPLEMENTED_FUNC(cellSail); return CELL_OK; } -s32 cellSailPlayerOpenEsUser() +error_code cellSailPlayerOpenEsUser() { UNIMPLEMENTED_FUNC(cellSail); return CELL_OK; } -s32 cellSailPlayerReopenEsAudio() +error_code cellSailPlayerReopenEsAudio() { UNIMPLEMENTED_FUNC(cellSail); return CELL_OK; } -s32 cellSailPlayerReopenEsVideo() +error_code cellSailPlayerReopenEsVideo() { UNIMPLEMENTED_FUNC(cellSail); return CELL_OK; } -s32 cellSailPlayerReopenEsUser() +error_code cellSailPlayerReopenEsUser() { UNIMPLEMENTED_FUNC(cellSail); return CELL_OK; } -s32 cellSailPlayerCloseEsAudio() +error_code cellSailPlayerCloseEsAudio() { UNIMPLEMENTED_FUNC(cellSail); return CELL_OK; } -s32 cellSailPlayerCloseEsVideo() +error_code cellSailPlayerCloseEsVideo() { UNIMPLEMENTED_FUNC(cellSail); return CELL_OK; } -s32 cellSailPlayerCloseEsUser() +error_code cellSailPlayerCloseEsUser() { UNIMPLEMENTED_FUNC(cellSail); return CELL_OK; } -s32 cellSailPlayerStart() +error_code cellSailPlayerStart() { UNIMPLEMENTED_FUNC(cellSail); return CELL_OK; } -s32 cellSailPlayerStop() +error_code cellSailPlayerStop() { UNIMPLEMENTED_FUNC(cellSail); return CELL_OK; } -s32 cellSailPlayerNext() +error_code cellSailPlayerNext() { UNIMPLEMENTED_FUNC(cellSail); return CELL_OK; } -s32 cellSailPlayerCancel() +error_code cellSailPlayerCancel() { UNIMPLEMENTED_FUNC(cellSail); return CELL_OK; } -s32 cellSailPlayerSetPaused(vm::ptr pSelf, b8 paused) +error_code cellSailPlayerSetPaused(vm::ptr pSelf, b8 paused) { cellSail.todo("cellSailPlayerSetPaused(pSelf=*0x%x, paused=%d)", pSelf, paused); return CELL_OK; @@ -995,37 +1020,37 @@ s32 cellSailPlayerGetRepeatMode(vm::ptr pSelf, vm::ptrrepeatMode; } -s32 cellSailPlayerSetEsAudioMuted() +error_code cellSailPlayerSetEsAudioMuted() { UNIMPLEMENTED_FUNC(cellSail); return CELL_OK; } -s32 cellSailPlayerSetEsVideoMuted() +error_code cellSailPlayerSetEsVideoMuted() { UNIMPLEMENTED_FUNC(cellSail); return CELL_OK; } -s32 cellSailPlayerIsEsAudioMuted() +error_code cellSailPlayerIsEsAudioMuted() { UNIMPLEMENTED_FUNC(cellSail); return CELL_OK; } -s32 cellSailPlayerIsEsVideoMuted() +error_code cellSailPlayerIsEsVideoMuted() { UNIMPLEMENTED_FUNC(cellSail); return CELL_OK; } -s32 cellSailPlayerDumpImage() +error_code cellSailPlayerDumpImage() { UNIMPLEMENTED_FUNC(cellSail); return CELL_OK; } -s32 cellSailPlayerUnregisterSource() +error_code cellSailPlayerUnregisterSource() { UNIMPLEMENTED_FUNC(cellSail); return CELL_OK; diff --git a/rpcs3/Emu/Cell/Modules/cellSail.h b/rpcs3/Emu/Cell/Modules/cellSail.h index 57ab89000b..60bf6ad40b 100644 --- a/rpcs3/Emu/Cell/Modules/cellSail.h +++ b/rpcs3/Emu/Cell/Modules/cellSail.h @@ -1,11 +1,11 @@ -#pragma once +#pragma once #include "cellVpost.h" #include "Emu/Memory/vm_ptr.h" // Error Codes -enum +enum CellSailError : u32 { CELL_SAIL_ERROR_INVALID_ARG = 0x80610701, CELL_SAIL_ERROR_INVALID_STATE = 0x80610702, diff --git a/rpcs3/Emu/Cell/Modules/cellSailRec.cpp b/rpcs3/Emu/Cell/Modules/cellSailRec.cpp index 4bb158681d..691cbcf0e4 100644 --- a/rpcs3/Emu/Cell/Modules/cellSailRec.cpp +++ b/rpcs3/Emu/Cell/Modules/cellSailRec.cpp @@ -1,368 +1,352 @@ -#include "stdafx.h" +#include "stdafx.h" #include "Emu/Cell/PPUModule.h" +#include "cellSail.h" LOG_CHANNEL(cellSailRec); -// Error Codes -enum -{ - CELL_SAIL_ERROR_INVALID_ARG = 0x80610701, - CELL_SAIL_ERROR_INVALID_STATE = 0x80610702, - CELL_SAIL_ERROR_UNSUPPORTED_STREAM = 0x80610703, - CELL_SAIL_ERROR_INDEX_OUT_OF_RANGE = 0x80610704, - CELL_SAIL_ERROR_EMPTY = 0x80610705, - CELL_SAIL_ERROR_FULLED = 0x80610706, - CELL_SAIL_ERROR_USING = 0x80610707, - CELL_SAIL_ERROR_NOT_AVAILABLE = 0x80610708, - CELL_SAIL_ERROR_CANCEL = 0x80610709, - CELL_SAIL_ERROR_MEMORY = 0x806107F0, - CELL_SAIL_ERROR_INVALID_FD = 0x806107F1, - CELL_SAIL_ERROR_FATAL = 0x806107FF, -}; - -s32 cellSailProfileSetEsAudioParameter() +error_code cellSailProfileSetEsAudioParameter() { UNIMPLEMENTED_FUNC(cellSailRec); return CELL_OK; } -s32 cellSailProfileSetEsVideoParameter() +error_code cellSailProfileSetEsVideoParameter() { UNIMPLEMENTED_FUNC(cellSailRec); return CELL_OK; } -s32 cellSailProfileSetStreamParameter() +error_code cellSailProfileSetStreamParameter() { UNIMPLEMENTED_FUNC(cellSailRec); return CELL_OK; } -s32 cellSailVideoConverterCanProcess() +error_code cellSailVideoConverterCanProcess() { UNIMPLEMENTED_FUNC(cellSailRec); return CELL_OK; } -s32 cellSailVideoConverterProcess() +error_code cellSailVideoConverterProcess() { UNIMPLEMENTED_FUNC(cellSailRec); return CELL_OK; } -s32 cellSailVideoConverterCanGetResult() +error_code cellSailVideoConverterCanGetResult() { UNIMPLEMENTED_FUNC(cellSailRec); return CELL_OK; } -s32 cellSailVideoConverterGetResult() +error_code cellSailVideoConverterGetResult() { UNIMPLEMENTED_FUNC(cellSailRec); return CELL_OK; } -s32 cellSailFeederAudioInitialize() +error_code cellSailFeederAudioInitialize() { UNIMPLEMENTED_FUNC(cellSailRec); return CELL_OK; } -s32 cellSailFeederAudioFinalize() +error_code cellSailFeederAudioFinalize() { UNIMPLEMENTED_FUNC(cellSailRec); return CELL_OK; } -s32 cellSailFeederAudioNotifyCallCompleted() +error_code cellSailFeederAudioNotifyCallCompleted() { UNIMPLEMENTED_FUNC(cellSailRec); return CELL_OK; } -s32 cellSailFeederAudioNotifyFrameOut() +error_code cellSailFeederAudioNotifyFrameOut() { UNIMPLEMENTED_FUNC(cellSailRec); return CELL_OK; } -s32 cellSailFeederAudioNotifySessionEnd() +error_code cellSailFeederAudioNotifySessionEnd() { UNIMPLEMENTED_FUNC(cellSailRec); return CELL_OK; } -s32 cellSailFeederAudioNotifySessionError() +error_code cellSailFeederAudioNotifySessionError() { UNIMPLEMENTED_FUNC(cellSailRec); return CELL_OK; } -s32 cellSailFeederVideoInitialize() +error_code cellSailFeederVideoInitialize() { UNIMPLEMENTED_FUNC(cellSailRec); return CELL_OK; } -s32 cellSailFeederVideoFinalize() +error_code cellSailFeederVideoFinalize() { UNIMPLEMENTED_FUNC(cellSailRec); return CELL_OK; } -s32 cellSailFeederVideoNotifyCallCompleted() +error_code cellSailFeederVideoNotifyCallCompleted() { UNIMPLEMENTED_FUNC(cellSailRec); return CELL_OK; } -s32 cellSailFeederVideoNotifyFrameOut() +error_code cellSailFeederVideoNotifyFrameOut() { UNIMPLEMENTED_FUNC(cellSailRec); return CELL_OK; } -s32 cellSailFeederVideoNotifySessionEnd() +error_code cellSailFeederVideoNotifySessionEnd() { UNIMPLEMENTED_FUNC(cellSailRec); return CELL_OK; } -s32 cellSailFeederVideoNotifySessionError() +error_code cellSailFeederVideoNotifySessionError() { UNIMPLEMENTED_FUNC(cellSailRec); return CELL_OK; } -s32 cellSailRecorderInitialize() +error_code cellSailRecorderInitialize() { UNIMPLEMENTED_FUNC(cellSailRec); return CELL_OK; } -s32 cellSailRecorderFinalize() +error_code cellSailRecorderFinalize() { UNIMPLEMENTED_FUNC(cellSailRec); return CELL_OK; } -s32 cellSailRecorderSetFeederAudio() +error_code cellSailRecorderSetFeederAudio() { UNIMPLEMENTED_FUNC(cellSailRec); return CELL_OK; } -s32 cellSailRecorderSetFeederVideo() +error_code cellSailRecorderSetFeederVideo() { UNIMPLEMENTED_FUNC(cellSailRec); return CELL_OK; } -s32 cellSailRecorderSetParameter() +error_code cellSailRecorderSetParameter() { UNIMPLEMENTED_FUNC(cellSailRec); return CELL_OK; } -s32 cellSailRecorderGetParameter() +error_code cellSailRecorderGetParameter() { UNIMPLEMENTED_FUNC(cellSailRec); return CELL_OK; } -s32 cellSailRecorderSubscribeEvent() +error_code cellSailRecorderSubscribeEvent() { UNIMPLEMENTED_FUNC(cellSailRec); return CELL_OK; } -s32 cellSailRecorderUnsubscribeEvent() +error_code cellSailRecorderUnsubscribeEvent() { UNIMPLEMENTED_FUNC(cellSailRec); return CELL_OK; } -s32 cellSailRecorderReplaceEventHandler() +error_code cellSailRecorderReplaceEventHandler() { UNIMPLEMENTED_FUNC(cellSailRec); return CELL_OK; } -s32 cellSailRecorderBoot() +error_code cellSailRecorderBoot() { UNIMPLEMENTED_FUNC(cellSailRec); return CELL_OK; } -s32 cellSailRecorderCreateProfile() +error_code cellSailRecorderCreateProfile() { UNIMPLEMENTED_FUNC(cellSailRec); return CELL_OK; } -s32 cellSailRecorderDestroyProfile() +error_code cellSailRecorderDestroyProfile() { UNIMPLEMENTED_FUNC(cellSailRec); return CELL_OK; } -s32 cellSailRecorderCreateVideoConverter() +error_code cellSailRecorderCreateVideoConverter() { UNIMPLEMENTED_FUNC(cellSailRec); return CELL_OK; } -s32 cellSailRecorderDestroyVideoConverter() +error_code cellSailRecorderDestroyVideoConverter() { UNIMPLEMENTED_FUNC(cellSailRec); return CELL_OK; } -s32 cellSailRecorderOpenStream() +error_code cellSailRecorderOpenStream() { UNIMPLEMENTED_FUNC(cellSailRec); return CELL_OK; } -s32 cellSailRecorderCloseStream() +error_code cellSailRecorderCloseStream() { UNIMPLEMENTED_FUNC(cellSailRec); return CELL_OK; } -s32 cellSailRecorderStart() +error_code cellSailRecorderStart() { UNIMPLEMENTED_FUNC(cellSailRec); return CELL_OK; } -s32 cellSailRecorderStop() +error_code cellSailRecorderStop() { UNIMPLEMENTED_FUNC(cellSailRec); return CELL_OK; } -s32 cellSailRecorderCancel() +error_code cellSailRecorderCancel() { UNIMPLEMENTED_FUNC(cellSailRec); return CELL_OK; } -s32 cellSailRecorderRegisterComposer() +error_code cellSailRecorderRegisterComposer() { UNIMPLEMENTED_FUNC(cellSailRec); return CELL_OK; } -s32 cellSailRecorderUnregisterComposer() +error_code cellSailRecorderUnregisterComposer() { UNIMPLEMENTED_FUNC(cellSailRec); return CELL_OK; } -s32 cellSailRecorderDumpImage() +error_code cellSailRecorderDumpImage() { UNIMPLEMENTED_FUNC(cellSailRec); return CELL_OK; } -s32 cellSailComposerInitialize() +error_code cellSailComposerInitialize() { UNIMPLEMENTED_FUNC(cellSailRec); return CELL_OK; } -s32 cellSailComposerFinalize() +error_code cellSailComposerFinalize() { UNIMPLEMENTED_FUNC(cellSailRec); return CELL_OK; } -s32 cellSailComposerGetStreamParameter() +error_code cellSailComposerGetStreamParameter() { UNIMPLEMENTED_FUNC(cellSailRec); return CELL_OK; } -s32 cellSailComposerGetEsAudioParameter() +error_code cellSailComposerGetEsAudioParameter() { UNIMPLEMENTED_FUNC(cellSailRec); return CELL_OK; } -s32 cellSailComposerGetEsUserParameter() +error_code cellSailComposerGetEsUserParameter() { UNIMPLEMENTED_FUNC(cellSailRec); return CELL_OK; } -s32 cellSailComposerGetEsVideoParameter() +error_code cellSailComposerGetEsVideoParameter() { UNIMPLEMENTED_FUNC(cellSailRec); return CELL_OK; } -s32 cellSailComposerGetEsAudioAu() +error_code cellSailComposerGetEsAudioAu() { UNIMPLEMENTED_FUNC(cellSailRec); return CELL_OK; } -s32 cellSailComposerGetEsUserAu() +error_code cellSailComposerGetEsUserAu() { UNIMPLEMENTED_FUNC(cellSailRec); return CELL_OK; } -s32 cellSailComposerGetEsVideoAu() +error_code cellSailComposerGetEsVideoAu() { UNIMPLEMENTED_FUNC(cellSailRec); return CELL_OK; } -s32 cellSailComposerTryGetEsAudioAu() +error_code cellSailComposerTryGetEsAudioAu() { UNIMPLEMENTED_FUNC(cellSailRec); return CELL_OK; } -s32 cellSailComposerTryGetEsUserAu() +error_code cellSailComposerTryGetEsUserAu() { UNIMPLEMENTED_FUNC(cellSailRec); return CELL_OK; } -s32 cellSailComposerTryGetEsVideoAu() +error_code cellSailComposerTryGetEsVideoAu() { UNIMPLEMENTED_FUNC(cellSailRec); return CELL_OK; } -s32 cellSailComposerReleaseEsAudioAu() +error_code cellSailComposerReleaseEsAudioAu() { UNIMPLEMENTED_FUNC(cellSailRec); return CELL_OK; } -s32 cellSailComposerReleaseEsUserAu() +error_code cellSailComposerReleaseEsUserAu() { UNIMPLEMENTED_FUNC(cellSailRec); return CELL_OK; } -s32 cellSailComposerReleaseEsVideoAu() +error_code cellSailComposerReleaseEsVideoAu() { UNIMPLEMENTED_FUNC(cellSailRec); return CELL_OK; } -s32 cellSailComposerNotifyCallCompleted() +error_code cellSailComposerNotifyCallCompleted() { UNIMPLEMENTED_FUNC(cellSailRec); return CELL_OK; } -s32 cellSailComposerNotifySessionError() +error_code cellSailComposerNotifySessionError() { UNIMPLEMENTED_FUNC(cellSailRec); return CELL_OK; diff --git a/rpcs3/Emu/Cell/Modules/cellSheap.cpp b/rpcs3/Emu/Cell/Modules/cellSheap.cpp index fe8ac83558..96111e6984 100644 --- a/rpcs3/Emu/Cell/Modules/cellSheap.cpp +++ b/rpcs3/Emu/Cell/Modules/cellSheap.cpp @@ -1,10 +1,10 @@ -#include "stdafx.h" +#include "stdafx.h" #include "Emu/Cell/PPUModule.h" LOG_CHANNEL(cellSheap); // Return Codes -enum +enum CellSheapError : u32 { CELL_SHEAP_ERROR_INVAL = 0x80410302, CELL_SHEAP_ERROR_BUSY = 0x8041030A, @@ -12,109 +12,126 @@ enum CELL_SHEAP_ERROR_SHORTAGE = 0x80410312, }; -s32 cellSheapInitialize() +template <> +void fmt_class_string::format(std::string& out, u64 arg) +{ + format_enum(out, arg, [](auto error) + { + switch (error) + { + STR_CASE(CELL_SHEAP_ERROR_INVAL); + STR_CASE(CELL_SHEAP_ERROR_BUSY); + STR_CASE(CELL_SHEAP_ERROR_ALIGN); + STR_CASE(CELL_SHEAP_ERROR_SHORTAGE); + } + + return unknown; + }); +} + +error_code cellSheapInitialize() { UNIMPLEMENTED_FUNC(cellSheap); return CELL_OK; } -s32 cellSheapAllocate() +error_code cellSheapAllocate() { UNIMPLEMENTED_FUNC(cellSheap); return CELL_OK; } -s32 cellSheapFree() +error_code cellSheapFree() { UNIMPLEMENTED_FUNC(cellSheap); return CELL_OK; } -s32 cellSheapQueryMax() +error_code cellSheapQueryMax() { UNIMPLEMENTED_FUNC(cellSheap); return CELL_OK; } -s32 cellSheapQueryFree() +error_code cellSheapQueryFree() { UNIMPLEMENTED_FUNC(cellSheap); return CELL_OK; } -s32 cellKeySheapInitialize() +error_code cellKeySheapInitialize() { UNIMPLEMENTED_FUNC(cellSheap); return CELL_OK; } -s32 cellKeySheapBufferNew() +error_code cellKeySheapBufferNew() { UNIMPLEMENTED_FUNC(cellSheap); return CELL_OK; } -s32 cellKeySheapBufferDelete() +error_code cellKeySheapBufferDelete() { UNIMPLEMENTED_FUNC(cellSheap); return CELL_OK; } -s32 cellKeySheapMutexNew() +error_code cellKeySheapMutexNew() { UNIMPLEMENTED_FUNC(cellSheap); return CELL_OK; } -s32 cellKeySheapMutexDelete() +error_code cellKeySheapMutexDelete() { UNIMPLEMENTED_FUNC(cellSheap); return CELL_OK; } -s32 cellKeySheapBarrierNew() +error_code cellKeySheapBarrierNew() { UNIMPLEMENTED_FUNC(cellSheap); return CELL_OK; } -s32 cellKeySheapBarrierDelete() +error_code cellKeySheapBarrierDelete() { UNIMPLEMENTED_FUNC(cellSheap); return CELL_OK; } -s32 cellKeySheapSemaphoreNew() +error_code cellKeySheapSemaphoreNew() { UNIMPLEMENTED_FUNC(cellSheap); return CELL_OK; } -s32 cellKeySheapSemaphoreDelete() +error_code cellKeySheapSemaphoreDelete() { UNIMPLEMENTED_FUNC(cellSheap); return CELL_OK; } -s32 cellKeySheapRwmNew() +error_code cellKeySheapRwmNew() { UNIMPLEMENTED_FUNC(cellSheap); return CELL_OK; } -s32 cellKeySheapRwmDelete() +error_code cellKeySheapRwmDelete() { UNIMPLEMENTED_FUNC(cellSheap); return CELL_OK; } -s32 cellKeySheapQueueNew() +error_code cellKeySheapQueueNew() { UNIMPLEMENTED_FUNC(cellSheap); return CELL_OK; } -s32 cellKeySheapQueueDelete() +error_code cellKeySheapQueueDelete() { UNIMPLEMENTED_FUNC(cellSheap); return CELL_OK; diff --git a/rpcs3/Emu/Cell/Modules/cellSpursJq.cpp b/rpcs3/Emu/Cell/Modules/cellSpursJq.cpp index 5d8534e6ff..b3ba9937fb 100644 --- a/rpcs3/Emu/Cell/Modules/cellSpursJq.cpp +++ b/rpcs3/Emu/Cell/Modules/cellSpursJq.cpp @@ -9,379 +9,379 @@ LOG_CHANNEL(cellSpursJq); -s32 cellSpursJobQueueAttributeInitialize() +error_code cellSpursJobQueueAttributeInitialize() { UNIMPLEMENTED_FUNC(cellSpursJq); return CELL_OK; } -s32 cellSpursJobQueueAttributeSetMaxGrab() +error_code cellSpursJobQueueAttributeSetMaxGrab() { UNIMPLEMENTED_FUNC(cellSpursJq); return CELL_OK; } -s32 cellSpursJobQueueAttributeSetSubmitWithEntryLock() +error_code cellSpursJobQueueAttributeSetSubmitWithEntryLock() { UNIMPLEMENTED_FUNC(cellSpursJq); return CELL_OK; } -s32 cellSpursJobQueueAttributeSetDoBusyWaiting() +error_code cellSpursJobQueueAttributeSetDoBusyWaiting() { UNIMPLEMENTED_FUNC(cellSpursJq); return CELL_OK; } -s32 cellSpursJobQueueAttributeSetIsHaltOnError() +error_code cellSpursJobQueueAttributeSetIsHaltOnError() { UNIMPLEMENTED_FUNC(cellSpursJq); return CELL_OK; } -s32 cellSpursJobQueueAttributeSetIsJobTypeMemoryCheck() +error_code cellSpursJobQueueAttributeSetIsJobTypeMemoryCheck() { UNIMPLEMENTED_FUNC(cellSpursJq); return CELL_OK; } -s32 cellSpursJobQueueAttributeSetMaxSizeJobDescriptor() +error_code cellSpursJobQueueAttributeSetMaxSizeJobDescriptor() { UNIMPLEMENTED_FUNC(cellSpursJq); return CELL_OK; } -s32 cellSpursJobQueueAttributeSetGrabParameters() +error_code cellSpursJobQueueAttributeSetGrabParameters() { UNIMPLEMENTED_FUNC(cellSpursJq); return CELL_OK; } -s32 cellSpursJobQueueSetWaitingMode() +error_code cellSpursJobQueueSetWaitingMode() { UNIMPLEMENTED_FUNC(cellSpursJq); return CELL_OK; } -s32 cellSpursShutdownJobQueue() +error_code cellSpursShutdownJobQueue() { UNIMPLEMENTED_FUNC(cellSpursJq); return CELL_OK; } -s32 _cellSpursCreateJobQueueWithJobDescriptorPool() +error_code _cellSpursCreateJobQueueWithJobDescriptorPool() { UNIMPLEMENTED_FUNC(cellSpursJq); return CELL_OK; } -s32 _cellSpursCreateJobQueue() +error_code _cellSpursCreateJobQueue() { UNIMPLEMENTED_FUNC(cellSpursJq); return CELL_OK; } -s32 cellSpursJoinJobQueue() +error_code cellSpursJoinJobQueue() { UNIMPLEMENTED_FUNC(cellSpursJq); return CELL_OK; } -s32 _cellSpursJobQueuePushJobListBody() +error_code _cellSpursJobQueuePushJobListBody() { UNIMPLEMENTED_FUNC(cellSpursJq); return CELL_OK; } -s32 _cellSpursJobQueuePushJobBody2() +error_code _cellSpursJobQueuePushJobBody2() { UNIMPLEMENTED_FUNC(cellSpursJq); return CELL_OK; } -s32 _cellSpursJobQueuePushJob2Body() +error_code _cellSpursJobQueuePushJob2Body() { UNIMPLEMENTED_FUNC(cellSpursJq); return CELL_OK; } -s32 _cellSpursJobQueuePushAndReleaseJobBody() +error_code _cellSpursJobQueuePushAndReleaseJobBody() { UNIMPLEMENTED_FUNC(cellSpursJq); return CELL_OK; } -s32 _cellSpursJobQueuePushJobBody() +error_code _cellSpursJobQueuePushJobBody() { UNIMPLEMENTED_FUNC(cellSpursJq); return CELL_OK; } -s32 _cellSpursJobQueuePushBody() +error_code _cellSpursJobQueuePushBody() { UNIMPLEMENTED_FUNC(cellSpursJq); return CELL_OK; } -s32 _cellSpursJobQueueAllocateJobDescriptorBody() +error_code _cellSpursJobQueueAllocateJobDescriptorBody() { UNIMPLEMENTED_FUNC(cellSpursJq); return CELL_OK; } -s32 _cellSpursJobQueuePushSync() +error_code _cellSpursJobQueuePushSync() { UNIMPLEMENTED_FUNC(cellSpursJq); return CELL_OK; } -s32 _cellSpursJobQueuePushFlush() +error_code _cellSpursJobQueuePushFlush() { UNIMPLEMENTED_FUNC(cellSpursJq); return CELL_OK; } -s32 cellSpursJobQueueGetSpurs() +error_code cellSpursJobQueueGetSpurs() { UNIMPLEMENTED_FUNC(cellSpursJq); return CELL_OK; } -s32 cellSpursJobQueueGetHandleCount() +error_code cellSpursJobQueueGetHandleCount() { UNIMPLEMENTED_FUNC(cellSpursJq); return CELL_OK; } -s32 cellSpursJobQueueGetError() +error_code cellSpursJobQueueGetError() { UNIMPLEMENTED_FUNC(cellSpursJq); return CELL_OK; } -s32 cellSpursJobQueueGetMaxSizeJobDescriptor() +error_code cellSpursJobQueueGetMaxSizeJobDescriptor() { UNIMPLEMENTED_FUNC(cellSpursJq); return CELL_OK; } -s32 cellSpursGetJobQueueId() +error_code cellSpursGetJobQueueId() { UNIMPLEMENTED_FUNC(cellSpursJq); return CELL_OK; } -s32 cellSpursJobQueueGetSuspendedJobSize() +error_code cellSpursJobQueueGetSuspendedJobSize() { UNIMPLEMENTED_FUNC(cellSpursJq); return CELL_OK; } -s32 cellSpursJobQueueClose() +error_code cellSpursJobQueueClose() { UNIMPLEMENTED_FUNC(cellSpursJq); return CELL_OK; } -s32 cellSpursJobQueueOpen() +error_code cellSpursJobQueueOpen() { UNIMPLEMENTED_FUNC(cellSpursJq); return CELL_OK; } -s32 cellSpursJobQueueSemaphoreTryAcquire() +error_code cellSpursJobQueueSemaphoreTryAcquire() { UNIMPLEMENTED_FUNC(cellSpursJq); return CELL_OK; } -s32 cellSpursJobQueueSemaphoreAcquire() +error_code cellSpursJobQueueSemaphoreAcquire() { UNIMPLEMENTED_FUNC(cellSpursJq); return CELL_OK; } -s32 cellSpursJobQueueSemaphoreInitialize() +error_code cellSpursJobQueueSemaphoreInitialize() { UNIMPLEMENTED_FUNC(cellSpursJq); return CELL_OK; } -s32 cellSpursJobQueueSendSignal() +error_code cellSpursJobQueueSendSignal() { UNIMPLEMENTED_FUNC(cellSpursJq); return CELL_OK; } -s32 cellSpursJobQueuePortGetJobQueue() +error_code cellSpursJobQueuePortGetJobQueue() { UNIMPLEMENTED_FUNC(cellSpursJq); return CELL_OK; } -s32 _cellSpursJobQueuePortPushSync() +error_code _cellSpursJobQueuePortPushSync() { UNIMPLEMENTED_FUNC(cellSpursJq); return CELL_OK; } -s32 _cellSpursJobQueuePortPushFlush() +error_code _cellSpursJobQueuePortPushFlush() { UNIMPLEMENTED_FUNC(cellSpursJq); return CELL_OK; } -s32 _cellSpursJobQueuePortPushJobListBody() +error_code _cellSpursJobQueuePortPushJobListBody() { UNIMPLEMENTED_FUNC(cellSpursJq); return CELL_OK; } -s32 _cellSpursJobQueuePortPushJobBody() +error_code _cellSpursJobQueuePortPushJobBody() { UNIMPLEMENTED_FUNC(cellSpursJq); return CELL_OK; } -s32 _cellSpursJobQueuePortPushJobBody2() +error_code _cellSpursJobQueuePortPushJobBody2() { UNIMPLEMENTED_FUNC(cellSpursJq); return CELL_OK; } -s32 _cellSpursJobQueuePortPushBody() +error_code _cellSpursJobQueuePortPushBody() { UNIMPLEMENTED_FUNC(cellSpursJq); return CELL_OK; } -s32 cellSpursJobQueuePortTrySync() +error_code cellSpursJobQueuePortTrySync() { UNIMPLEMENTED_FUNC(cellSpursJq); return CELL_OK; } -s32 cellSpursJobQueuePortSync() +error_code cellSpursJobQueuePortSync() { UNIMPLEMENTED_FUNC(cellSpursJq); return CELL_OK; } -s32 cellSpursJobQueuePortInitialize() +error_code cellSpursJobQueuePortInitialize() { UNIMPLEMENTED_FUNC(cellSpursJq); return CELL_OK; } -s32 cellSpursJobQueuePortInitializeWithDescriptorBuffer() +error_code cellSpursJobQueuePortInitializeWithDescriptorBuffer() { UNIMPLEMENTED_FUNC(cellSpursJq); return CELL_OK; } -s32 cellSpursJobQueuePortFinalize() +error_code cellSpursJobQueuePortFinalize() { UNIMPLEMENTED_FUNC(cellSpursJq); return CELL_OK; } -s32 _cellSpursJobQueuePortCopyPushJobBody() +error_code _cellSpursJobQueuePortCopyPushJobBody() { UNIMPLEMENTED_FUNC(cellSpursJq); return CELL_OK; } -s32 _cellSpursJobQueuePortCopyPushJobBody2() +error_code _cellSpursJobQueuePortCopyPushJobBody2() { UNIMPLEMENTED_FUNC(cellSpursJq); return CELL_OK; } -s32 _cellSpursJobQueuePortCopyPushBody() +error_code _cellSpursJobQueuePortCopyPushBody() { UNIMPLEMENTED_FUNC(cellSpursJq); return CELL_OK; } -s32 cellSpursJobQueuePort2GetJobQueue() +error_code cellSpursJobQueuePort2GetJobQueue() { UNIMPLEMENTED_FUNC(cellSpursJq); return CELL_OK; } -s32 cellSpursJobQueuePort2PushSync() +error_code cellSpursJobQueuePort2PushSync() { UNIMPLEMENTED_FUNC(cellSpursJq); return CELL_OK; } -s32 cellSpursJobQueuePort2PushFlush() +error_code cellSpursJobQueuePort2PushFlush() { UNIMPLEMENTED_FUNC(cellSpursJq); return CELL_OK; } -s32 _cellSpursJobQueuePort2PushJobListBody() +error_code _cellSpursJobQueuePort2PushJobListBody() { UNIMPLEMENTED_FUNC(cellSpursJq); return CELL_OK; } -s32 cellSpursJobQueuePort2Sync() +error_code cellSpursJobQueuePort2Sync() { UNIMPLEMENTED_FUNC(cellSpursJq); return CELL_OK; } -s32 cellSpursJobQueuePort2Create() +error_code cellSpursJobQueuePort2Create() { UNIMPLEMENTED_FUNC(cellSpursJq); return CELL_OK; } -s32 cellSpursJobQueuePort2Destroy() +error_code cellSpursJobQueuePort2Destroy() { UNIMPLEMENTED_FUNC(cellSpursJq); return CELL_OK; } -s32 cellSpursJobQueuePort2AllocateJobDescriptor() +error_code cellSpursJobQueuePort2AllocateJobDescriptor() { UNIMPLEMENTED_FUNC(cellSpursJq); return CELL_OK; } -s32 _cellSpursJobQueuePort2PushAndReleaseJobBody() +error_code _cellSpursJobQueuePort2PushAndReleaseJobBody() { UNIMPLEMENTED_FUNC(cellSpursJq); return CELL_OK; } -s32 _cellSpursJobQueuePort2CopyPushJobBody() +error_code _cellSpursJobQueuePort2CopyPushJobBody() { UNIMPLEMENTED_FUNC(cellSpursJq); return CELL_OK; } -s32 _cellSpursJobQueuePort2PushJobBody() +error_code _cellSpursJobQueuePort2PushJobBody() { UNIMPLEMENTED_FUNC(cellSpursJq); return CELL_OK; } -s32 cellSpursJobQueueSetExceptionEventHandler() +error_code cellSpursJobQueueSetExceptionEventHandler() { UNIMPLEMENTED_FUNC(cellSpursJq); return CELL_OK; } -s32 cellSpursJobQueueSetExceptionEventHandler2() +error_code cellSpursJobQueueSetExceptionEventHandler2() { UNIMPLEMENTED_FUNC(cellSpursJq); return CELL_OK; } -s32 cellSpursJobQueueUnsetExceptionEventHandler() +error_code cellSpursJobQueueUnsetExceptionEventHandler() { UNIMPLEMENTED_FUNC(cellSpursJq); return CELL_OK; diff --git a/rpcs3/Emu/Cell/Modules/cellSsl.cpp b/rpcs3/Emu/Cell/Modules/cellSsl.cpp index e5e04a281d..1de54a1ade 100644 --- a/rpcs3/Emu/Cell/Modules/cellSsl.cpp +++ b/rpcs3/Emu/Cell/Modules/cellSsl.cpp @@ -69,7 +69,7 @@ error_code cellSslEnd() return CELL_OK; } -s32 cellSslGetMemoryInfo() +error_code cellSslGetMemoryInfo() { UNIMPLEMENTED_FUNC(cellSsl); return CELL_OK; @@ -314,505 +314,505 @@ error_code cellSslCertGetMd5Fingerprint(vm::cptr sslCert, vm::cptr buf return CELL_OK; } -s32 _cellSslConvertCipherId() +error_code _cellSslConvertCipherId() { UNIMPLEMENTED_FUNC(cellSsl); return CELL_OK; } -s32 _cellSslConvertSslVersion() +error_code _cellSslConvertSslVersion() { UNIMPLEMENTED_FUNC(cellSsl); return CELL_OK; } -s32 _cellSslIsInitd() +error_code _cellSslIsInitd() { UNIMPLEMENTED_FUNC(cellSsl); return CELL_OK; } -s32 _cellSslPemReadPrivateKey() +error_code _cellSslPemReadPrivateKey() { UNIMPLEMENTED_FUNC(cellSsl); return CELL_OK; } -s32 _cellSslPemReadX509() +error_code _cellSslPemReadX509() { UNIMPLEMENTED_FUNC(cellSsl); return CELL_OK; } -s32 BER_read_item() +error_code BER_read_item() { UNIMPLEMENTED_FUNC(cellSsl); return CELL_OK; } -s32 BIO_ctrl() +error_code BIO_ctrl() { UNIMPLEMENTED_FUNC(cellSsl); return CELL_OK; } -s32 BIO_dump() +error_code BIO_dump() { UNIMPLEMENTED_FUNC(cellSsl); return CELL_OK; } -s32 BIO_free() +error_code BIO_free() { UNIMPLEMENTED_FUNC(cellSsl); return CELL_OK; } -s32 BIO_get_cb_arg() +error_code BIO_get_cb_arg() { UNIMPLEMENTED_FUNC(cellSsl); return CELL_OK; } -s32 BIO_get_retry_reason() +error_code BIO_get_retry_reason() { UNIMPLEMENTED_FUNC(cellSsl); return CELL_OK; } -s32 BIO_new_mem() +error_code BIO_new_mem() { UNIMPLEMENTED_FUNC(cellSsl); return CELL_OK; } -s32 BIO_new_socket() +error_code BIO_new_socket() { UNIMPLEMENTED_FUNC(cellSsl); return CELL_OK; } -s32 BIO_printf() +error_code BIO_printf() { UNIMPLEMENTED_FUNC(cellSsl); return CELL_OK; } -s32 BIO_ptr_ctrl() +error_code BIO_ptr_ctrl() { UNIMPLEMENTED_FUNC(cellSsl); return CELL_OK; } -s32 BIO_set_cb_arg() +error_code BIO_set_cb_arg() { UNIMPLEMENTED_FUNC(cellSsl); return CELL_OK; } -s32 ERR_clear_error() +error_code ERR_clear_error() { UNIMPLEMENTED_FUNC(cellSsl); return CELL_OK; } -s32 ERR_get_error() +error_code ERR_get_error() { UNIMPLEMENTED_FUNC(cellSsl); return CELL_OK; } -s32 ERR_error_string() +error_code ERR_error_string() { UNIMPLEMENTED_FUNC(cellSsl); return CELL_OK; } -s32 ERR_func_error_string() +error_code ERR_func_error_string() { UNIMPLEMENTED_FUNC(cellSsl); return CELL_OK; } -s32 ERR_peek_error() +error_code ERR_peek_error() { UNIMPLEMENTED_FUNC(cellSsl); return CELL_OK; } -s32 EVP_PKEY_free() +error_code EVP_PKEY_free() { UNIMPLEMENTED_FUNC(cellSsl); return CELL_OK; } -s32 R_time() +error_code R_time() { UNIMPLEMENTED_FUNC(cellSsl); return CELL_OK; } -s32 R_time_cmp() +error_code R_time_cmp() { UNIMPLEMENTED_FUNC(cellSsl); return CELL_OK; } -s32 R_time_export() +error_code R_time_export() { UNIMPLEMENTED_FUNC(cellSsl); return CELL_OK; } -s32 R_time_free() +error_code R_time_free() { UNIMPLEMENTED_FUNC(cellSsl); return CELL_OK; } -s32 R_time_import() +error_code R_time_import() { UNIMPLEMENTED_FUNC(cellSsl); return CELL_OK; } -s32 R_time_new() +error_code R_time_new() { UNIMPLEMENTED_FUNC(cellSsl); return CELL_OK; } -s32 SSL_CIPHER_description() +error_code SSL_CIPHER_description() { UNIMPLEMENTED_FUNC(cellSsl); return CELL_OK; } -s32 SSL_CIPHER_get_bits() +error_code SSL_CIPHER_get_bits() { UNIMPLEMENTED_FUNC(cellSsl); return CELL_OK; } -s32 SSL_CIPHER_get_id() +error_code SSL_CIPHER_get_id() { UNIMPLEMENTED_FUNC(cellSsl); return CELL_OK; } -s32 SSL_CIPHER_get_name() +error_code SSL_CIPHER_get_name() { UNIMPLEMENTED_FUNC(cellSsl); return CELL_OK; } -s32 SSL_CIPHER_get_version() +error_code SSL_CIPHER_get_version() { UNIMPLEMENTED_FUNC(cellSsl); return CELL_OK; } -s32 SSL_CTX_ctrl() +error_code SSL_CTX_ctrl() { UNIMPLEMENTED_FUNC(cellSsl); return CELL_OK; } -s32 SSL_CTX_free() +error_code SSL_CTX_free() { UNIMPLEMENTED_FUNC(cellSsl); return CELL_OK; } -s32 SSL_CTX_new() +error_code SSL_CTX_new() { UNIMPLEMENTED_FUNC(cellSsl); return CELL_OK; } -s32 SSL_CTX_set_app_verify_cb() +error_code SSL_CTX_set_app_verify_cb() { UNIMPLEMENTED_FUNC(cellSsl); return CELL_OK; } -s32 SSL_CTX_set_info_cb() +error_code SSL_CTX_set_info_cb() { UNIMPLEMENTED_FUNC(cellSsl); return CELL_OK; } -s32 SSL_CTX_set_options() +error_code SSL_CTX_set_options() { UNIMPLEMENTED_FUNC(cellSsl); return CELL_OK; } -s32 SSL_CTX_set_verify_mode() +error_code SSL_CTX_set_verify_mode() { UNIMPLEMENTED_FUNC(cellSsl); return CELL_OK; } -s32 SSL_CTX_use_certificate() +error_code SSL_CTX_use_certificate() { UNIMPLEMENTED_FUNC(cellSsl); return CELL_OK; } -s32 SSL_CTX_use_PrivateKey() +error_code SSL_CTX_use_PrivateKey() { UNIMPLEMENTED_FUNC(cellSsl); return CELL_OK; } -s32 SSL_SESSION_free() +error_code SSL_SESSION_free() { UNIMPLEMENTED_FUNC(cellSsl); return CELL_OK; } -s32 SSL_alert_desc_string_long() +error_code SSL_alert_desc_string_long() { UNIMPLEMENTED_FUNC(cellSsl); return CELL_OK; } -s32 SSL_alert_type_string_long() +error_code SSL_alert_type_string_long() { UNIMPLEMENTED_FUNC(cellSsl); return CELL_OK; } -s32 SSL_clear() +error_code SSL_clear() { UNIMPLEMENTED_FUNC(cellSsl); return CELL_OK; } -s32 SSL_do_handshake() +error_code SSL_do_handshake() { UNIMPLEMENTED_FUNC(cellSsl); return CELL_OK; } -s32 SSL_free() +error_code SSL_free() { UNIMPLEMENTED_FUNC(cellSsl); return CELL_OK; } -s32 SSL_get_current_cipher() +error_code SSL_get_current_cipher() { UNIMPLEMENTED_FUNC(cellSsl); return CELL_OK; } -s32 SSL_get_error() +error_code SSL_get_error() { UNIMPLEMENTED_FUNC(cellSsl); return CELL_OK; } -s32 SSL_get_rbio() +error_code SSL_get_rbio() { UNIMPLEMENTED_FUNC(cellSsl); return CELL_OK; } -s32 SSL_get_version() +error_code SSL_get_version() { UNIMPLEMENTED_FUNC(cellSsl); return CELL_OK; } -s32 SSL_new() +error_code SSL_new() { UNIMPLEMENTED_FUNC(cellSsl); return CELL_OK; } -s32 SSL_peek() +error_code SSL_peek() { UNIMPLEMENTED_FUNC(cellSsl); return CELL_OK; } -s32 SSL_read() +error_code SSL_read() { UNIMPLEMENTED_FUNC(cellSsl); return CELL_OK; } -s32 SSL_set_bio() +error_code SSL_set_bio() { UNIMPLEMENTED_FUNC(cellSsl); return CELL_OK; } -s32 SSL_set_connect_state() +error_code SSL_set_connect_state() { UNIMPLEMENTED_FUNC(cellSsl); return CELL_OK; } -s32 SSL_set_session() +error_code SSL_set_session() { UNIMPLEMENTED_FUNC(cellSsl); return CELL_OK; } -s32 SSL_set_ssl_method() +error_code SSL_set_ssl_method() { UNIMPLEMENTED_FUNC(cellSsl); return CELL_OK; } -s32 SSL_shutdown() +error_code SSL_shutdown() { UNIMPLEMENTED_FUNC(cellSsl); return CELL_OK; } -s32 SSL_state() +error_code SSL_state() { UNIMPLEMENTED_FUNC(cellSsl); return CELL_OK; } -s32 SSL_state_string_long() +error_code SSL_state_string_long() { UNIMPLEMENTED_FUNC(cellSsl); return CELL_OK; } -s32 SSL_version() +error_code SSL_version() { UNIMPLEMENTED_FUNC(cellSsl); return CELL_OK; } -s32 SSL_want() +error_code SSL_want() { UNIMPLEMENTED_FUNC(cellSsl); return CELL_OK; } -s32 SSL_write() +error_code SSL_write() { UNIMPLEMENTED_FUNC(cellSsl); return CELL_OK; } -s32 SSLCERT_check_private_key() +error_code SSLCERT_check_private_key() { UNIMPLEMENTED_FUNC(cellSsl); return CELL_OK; } -s32 SSLCERT_free() +error_code SSLCERT_free() { UNIMPLEMENTED_FUNC(cellSsl); return CELL_OK; } -s32 SSLCERT_from_binary() +error_code SSLCERT_from_binary() { UNIMPLEMENTED_FUNC(cellSsl); return CELL_OK; } -s32 SSLCERT_get_basic_constraints_int() +error_code SSLCERT_get_basic_constraints_int() { UNIMPLEMENTED_FUNC(cellSsl); return CELL_OK; } -s32 SSLCERT_get_extension() +error_code SSLCERT_get_extension() { UNIMPLEMENTED_FUNC(cellSsl); return CELL_OK; } -s32 SSLCERT_get_issuer_name() +error_code SSLCERT_get_issuer_name() { UNIMPLEMENTED_FUNC(cellSsl); return CELL_OK; } -s32 SSLCERT_get_notAfter() +error_code SSLCERT_get_notAfter() { UNIMPLEMENTED_FUNC(cellSsl); return CELL_OK; } -s32 SSLCERT_get_notBefore() +error_code SSLCERT_get_notBefore() { UNIMPLEMENTED_FUNC(cellSsl); return CELL_OK; } -s32 SSLCERT_get_pubkey() +error_code SSLCERT_get_pubkey() { UNIMPLEMENTED_FUNC(cellSsl); return CELL_OK; } -s32 SSLCERT_get_subject_name() +error_code SSLCERT_get_subject_name() { UNIMPLEMENTED_FUNC(cellSsl); return CELL_OK; } -s32 SSLCERT_NAME_cmp() +error_code SSLCERT_NAME_cmp() { UNIMPLEMENTED_FUNC(cellSsl); return CELL_OK; } -s32 SSLCERT_NAME_ENTRY_get_info() +error_code SSLCERT_NAME_ENTRY_get_info() { UNIMPLEMENTED_FUNC(cellSsl); return CELL_OK; } -s32 SSLCERT_NAME_get_entry() +error_code SSLCERT_NAME_get_entry() { UNIMPLEMENTED_FUNC(cellSsl); return CELL_OK; } -s32 SSLCERT_NAME_get_entry_count() +error_code SSLCERT_NAME_get_entry_count() { UNIMPLEMENTED_FUNC(cellSsl); return CELL_OK; } -s32 SSLCERT_NAME_oneline() +error_code SSLCERT_NAME_oneline() { UNIMPLEMENTED_FUNC(cellSsl); return CELL_OK; } -s32 SSLCERT_OID_to_string() +error_code SSLCERT_OID_to_string() { UNIMPLEMENTED_FUNC(cellSsl); return CELL_OK; } -s32 SSLCERT_verify() +error_code SSLCERT_verify() { UNIMPLEMENTED_FUNC(cellSsl); return CELL_OK; } -s32 SSLv3_client_method() +error_code SSLv3_client_method() { UNIMPLEMENTED_FUNC(cellSsl); return CELL_OK; } -s32 TLSv1_client_method() +error_code TLSv1_client_method() { UNIMPLEMENTED_FUNC(cellSsl); return CELL_OK; diff --git a/rpcs3/Emu/Cell/Modules/cellSysconf.cpp b/rpcs3/Emu/Cell/Modules/cellSysconf.cpp index 5e9038ca35..83989d1309 100644 --- a/rpcs3/Emu/Cell/Modules/cellSysconf.cpp +++ b/rpcs3/Emu/Cell/Modules/cellSysconf.cpp @@ -1,4 +1,4 @@ -#include "stdafx.h" +#include "stdafx.h" #include "Emu/Cell/PPUModule.h" #include "cellSysutil.h" @@ -6,13 +6,27 @@ LOG_CHANNEL(cellSysconf); -s32 cellSysconfAbort() +template<> +void fmt_class_string::format(std::string& out, u64 arg) +{ + format_enum(out, arg, [](auto error) + { + switch (error) + { + STR_CASE(CELL_SYSCONF_ERROR_PARAM); + } + + return unknown; + }); +} + +error_code cellSysconfAbort() { cellSysconf.todo("cellSysconfAbort()"); return CELL_OK; } -s32 cellSysconfOpen(u32 type, vm::ptr func, vm::ptr userdata, vm::ptr extparam, u32 id) +error_code cellSysconfOpen(u32 type, vm::ptr func, vm::ptr userdata, vm::ptr extparam, u32 id) { cellSysconf.todo("cellSysconfOpen(type=%d, func=*0x%x, userdata=*0x%x, extparam=*0x%x, id=%d)", type, func, userdata, extparam, id); @@ -25,7 +39,7 @@ s32 cellSysconfOpen(u32 type, vm::ptr func, vm::ptr u return CELL_OK; } -s32 cellSysconfBtGetDeviceList(vm::ptr deviceList) +error_code cellSysconfBtGetDeviceList(vm::ptr deviceList) { cellSysconf.todo("cellSysconfBtGetDeviceList(deviceList=*0x%x)", deviceList); return CELL_OK; diff --git a/rpcs3/Emu/Cell/Modules/cellSysconf.h b/rpcs3/Emu/Cell/Modules/cellSysconf.h index b84728aa22..c133f5024b 100644 --- a/rpcs3/Emu/Cell/Modules/cellSysconf.h +++ b/rpcs3/Emu/Cell/Modules/cellSysconf.h @@ -1,4 +1,4 @@ -#pragma once +#pragma once #include "Emu/Memory/vm_ptr.h" @@ -30,7 +30,7 @@ enum CellSysconfBtDeviceState : s32 CELL_SYSCONF_BT_DEVICE_STATE_AVAILABLE = 1, }; -enum +enum CellSysConfError : u32 { CELL_SYSCONF_ERROR_PARAM = 0x8002bb01 }; diff --git a/rpcs3/Emu/Cell/Modules/cellSysmodule.cpp b/rpcs3/Emu/Cell/Modules/cellSysmodule.cpp index 4272e41349..e7644140b4 100644 --- a/rpcs3/Emu/Cell/Modules/cellSysmodule.cpp +++ b/rpcs3/Emu/Cell/Modules/cellSysmodule.cpp @@ -3,7 +3,7 @@ LOG_CHANNEL(cellSysmodule); -enum +enum CellSysmoduleError : u32 { CELL_SYSMODULE_LOADED = CELL_OK, CELL_SYSMODULE_ERROR_DUPLICATED = 0x80012001, @@ -13,6 +13,24 @@ enum CELL_SYSMODULE_ERROR_FATAL = 0x800120ff, }; +template<> +void fmt_class_string::format(std::string& out, u64 arg) +{ + format_enum(out, arg, [](auto error) + { + switch (error) + { + STR_CASE(CELL_SYSMODULE_ERROR_DUPLICATED); + STR_CASE(CELL_SYSMODULE_ERROR_UNKNOWN); + STR_CASE(CELL_SYSMODULE_ERROR_UNLOADED); + STR_CASE(CELL_SYSMODULE_ERROR_INVALID_MEMCONTAINER); + STR_CASE(CELL_SYSMODULE_ERROR_FATAL); + } + + return unknown; + }); +} + static const char* get_module_name(u16 id) { switch (id) @@ -259,33 +277,32 @@ static const char* get_module_id(u16 id) return tls_id_name; } -s32 cellSysmoduleInitialize() +error_code cellSysmoduleInitialize() { cellSysmodule.warning("cellSysmoduleInitialize()"); return CELL_OK; } -s32 cellSysmoduleFinalize() +error_code cellSysmoduleFinalize() { cellSysmodule.warning("cellSysmoduleFinalize()"); return CELL_OK; } -s32 cellSysmoduleSetMemcontainer(u32 ct_id) +error_code cellSysmoduleSetMemcontainer(u32 ct_id) { cellSysmodule.todo("cellSysmoduleSetMemcontainer(ct_id=0x%x)", ct_id); return CELL_OK; } -s32 cellSysmoduleLoadModule(u16 id) +error_code cellSysmoduleLoadModule(u16 id) { - cellSysmodule.warning("cellSysmoduleLoadModule(id=%s)", get_module_id(id)); + cellSysmodule.warning("cellSysmoduleLoadModule(id=0x%04X=%s)", id, get_module_id(id)); const auto name = get_module_name(id); if (!name) { - cellSysmodule.error("cellSysmoduleLoadModule() failed: unknown module 0x%04X", id); return CELL_SYSMODULE_ERROR_UNKNOWN; } @@ -298,15 +315,14 @@ s32 cellSysmoduleLoadModule(u16 id) return CELL_OK; } -s32 cellSysmoduleUnloadModule(u16 id) +error_code cellSysmoduleUnloadModule(u16 id) { - cellSysmodule.warning("cellSysmoduleUnloadModule(id=%s)", get_module_id(id)); + cellSysmodule.warning("cellSysmoduleUnloadModule(id=0x%04X=%s)", id, get_module_id(id)); const auto name = get_module_name(id); if (!name) { - cellSysmodule.error("cellSysmoduleUnloadModule() failed: unknown module 0x%04X", id); return CELL_SYSMODULE_ERROR_UNKNOWN; } @@ -324,15 +340,14 @@ s32 cellSysmoduleUnloadModule(u16 id) return CELL_OK; } -s32 cellSysmoduleIsLoaded(u16 id) +error_code cellSysmoduleIsLoaded(u16 id) { - cellSysmodule.warning("cellSysmoduleIsLoaded(id=%s)", get_module_id(id)); + cellSysmodule.warning("cellSysmoduleIsLoaded(id=0x%04X=%s)", id, get_module_id(id)); const auto name = get_module_name(id); if (!name) { - cellSysmodule.error("cellSysmoduleIsLoaded() failed: unknown module 0x%04X", id); return CELL_SYSMODULE_ERROR_UNKNOWN; } @@ -348,43 +363,43 @@ s32 cellSysmoduleIsLoaded(u16 id) return CELL_SYSMODULE_LOADED; } -s32 cellSysmoduleGetImagesize() +error_code cellSysmoduleGetImagesize() { UNIMPLEMENTED_FUNC(cellSysmodule); return CELL_OK; } -s32 cellSysmoduleFetchImage() +error_code cellSysmoduleFetchImage() { UNIMPLEMENTED_FUNC(cellSysmodule); return CELL_OK; } -s32 cellSysmoduleUnloadModuleInternal() +error_code cellSysmoduleUnloadModuleInternal() { UNIMPLEMENTED_FUNC(cellSysmodule); return CELL_OK; } -s32 cellSysmoduleLoadModuleInternal() +error_code cellSysmoduleLoadModuleInternal() { UNIMPLEMENTED_FUNC(cellSysmodule); return CELL_OK; } -s32 cellSysmoduleUnloadModuleEx() +error_code cellSysmoduleUnloadModuleEx() { UNIMPLEMENTED_FUNC(cellSysmodule); return CELL_OK; } -s32 cellSysmoduleLoadModuleEx() +error_code cellSysmoduleLoadModuleEx() { UNIMPLEMENTED_FUNC(cellSysmodule); return CELL_OK; } -s32 cellSysmoduleIsLoadedEx() +error_code cellSysmoduleIsLoadedEx() { UNIMPLEMENTED_FUNC(cellSysmodule); return CELL_OK; diff --git a/rpcs3/Emu/Cell/Modules/cellSysutilAp.cpp b/rpcs3/Emu/Cell/Modules/cellSysutilAp.cpp index 1b36b80a53..549ded2703 100644 --- a/rpcs3/Emu/Cell/Modules/cellSysutilAp.cpp +++ b/rpcs3/Emu/Cell/Modules/cellSysutilAp.cpp @@ -1,4 +1,4 @@ -#include "stdafx.h" +#include "stdafx.h" #include "Emu/Cell/PPUModule.h" @@ -6,7 +6,7 @@ LOG_CHANNEL(cellSysutilAp); // Return Codes -enum +enum CellSysutilApError : u32 { CELL_SYSUTIL_AP_ERROR_OUT_OF_MEMORY = 0x8002cd00, CELL_SYSUTIL_AP_ERROR_FATAL = 0x8002cd01, @@ -18,6 +18,27 @@ enum CELL_SYSUTIL_AP_ERROR_NETIF_CANNOT_CONNECT = 0x8002cd16, }; +template<> +void fmt_class_string::format(std::string& out, u64 arg) +{ + format_enum(out, arg, [](auto error) + { + switch (error) + { + STR_CASE(CELL_SYSUTIL_AP_ERROR_OUT_OF_MEMORY); + STR_CASE(CELL_SYSUTIL_AP_ERROR_FATAL); + STR_CASE(CELL_SYSUTIL_AP_ERROR_INVALID_VALUE); + STR_CASE(CELL_SYSUTIL_AP_ERROR_NOT_INITIALIZED); + STR_CASE(CELL_SYSUTIL_AP_ERROR_ZERO_REGISTERED); + STR_CASE(CELL_SYSUTIL_AP_ERROR_NETIF_DISABLED); + STR_CASE(CELL_SYSUTIL_AP_ERROR_NETIF_NO_CABLE); + STR_CASE(CELL_SYSUTIL_AP_ERROR_NETIF_CANNOT_CONNECT); + } + + return unknown; + }); +} + enum { CELL_SYSUTIL_AP_TITLE_ID_LEN = 9, @@ -58,13 +79,13 @@ s32 cellSysutilApGetRequiredMemSize() return 1024*1024; // Return 1 MB as required size } -s32 cellSysutilApOn(vm::ptr pParam, u32 container) +error_code cellSysutilApOn(vm::ptr pParam, u32 container) { cellSysutilAp.todo("cellSysutilApOn(pParam=*0x%x, container=0x%x)", pParam, container); return CELL_OK; } -s32 cellSysutilApOff() +error_code cellSysutilApOff() { cellSysutilAp.todo("cellSysutilApOff()"); return CELL_OK; diff --git a/rpcs3/Emu/Cell/Modules/cellSysutilAvc.cpp b/rpcs3/Emu/Cell/Modules/cellSysutilAvc.cpp index 54a8c2bc68..cb62e42605 100644 --- a/rpcs3/Emu/Cell/Modules/cellSysutilAvc.cpp +++ b/rpcs3/Emu/Cell/Modules/cellSysutilAvc.cpp @@ -1,123 +1,123 @@ -#include "stdafx.h" +#include "stdafx.h" #include "Emu/Cell/PPUModule.h" LOG_CHANNEL(cellSysutil); -s32 cellSysutilAvcByeRequest() +error_code cellSysutilAvcByeRequest() { cellSysutil.todo("cellSysutilAvcByeRequest()"); return CELL_OK; } -s32 cellSysutilAvcCancelByeRequest() +error_code cellSysutilAvcCancelByeRequest() { cellSysutil.todo("cellSysutilAvcCancelByeRequest()"); return CELL_OK; } -s32 cellSysutilAvcCancelJoinRequest() +error_code cellSysutilAvcCancelJoinRequest() { cellSysutil.todo("cellSysutilAvcCancelJoinRequest()"); return CELL_OK; } -s32 cellSysutilAvcEnumPlayers() +error_code cellSysutilAvcEnumPlayers() { cellSysutil.todo("cellSysutilAvcEnumPlayers()"); return CELL_OK; } -s32 cellSysutilAvcGetAttribute() +error_code cellSysutilAvcGetAttribute() { cellSysutil.todo("cellSysutilAvcGetAttribute()"); return CELL_OK; } -s32 cellSysutilAvcGetLayoutMode() +error_code cellSysutilAvcGetLayoutMode() { cellSysutil.todo("cellSysutilAvcGetLayoutMode()"); return CELL_OK; } -s32 cellSysutilAvcGetShowStatus() +error_code cellSysutilAvcGetShowStatus() { cellSysutil.todo("cellSysutilAvcGetShowStatus()"); return CELL_OK; } -s32 cellSysutilAvcGetSpeakerVolumeLevel() +error_code cellSysutilAvcGetSpeakerVolumeLevel() { cellSysutil.todo("cellSysutilAvcGetSpeakerVolumeLevel()"); return CELL_OK; } -s32 cellSysutilAvcGetVideoMuting() +error_code cellSysutilAvcGetVideoMuting() { cellSysutil.todo("cellSysutilAvcGetVideoMuting()"); return CELL_OK; } -s32 cellSysutilAvcGetVoiceMuting() +error_code cellSysutilAvcGetVoiceMuting() { cellSysutil.todo("cellSysutilAvcGetVoiceMuting()"); return CELL_OK; } -s32 cellSysutilAvcHidePanel() +error_code cellSysutilAvcHidePanel() { cellSysutil.todo("cellSysutilAvcHidePanel()"); return CELL_OK; } -s32 cellSysutilAvcJoinRequest() +error_code cellSysutilAvcJoinRequest() { cellSysutil.todo("cellSysutilAvcJoinRequest()"); return CELL_OK; } -s32 cellSysutilAvcLoadAsync() +error_code cellSysutilAvcLoadAsync() { cellSysutil.todo("cellSysutilAvcLoadAsync()"); return CELL_OK; } -s32 cellSysutilAvcSetAttribute() +error_code cellSysutilAvcSetAttribute() { cellSysutil.todo("cellSysutilAvcSetAttribute()"); return CELL_OK; } -s32 cellSysutilAvcSetLayoutMode() +error_code cellSysutilAvcSetLayoutMode() { cellSysutil.todo("cellSysutilAvcSetLayoutMode()"); return CELL_OK; } -s32 cellSysutilAvcSetSpeakerVolumeLevel() +error_code cellSysutilAvcSetSpeakerVolumeLevel() { cellSysutil.todo("cellSysutilAvcSetSpeakerVolumeLevel()"); return CELL_OK; } -s32 cellSysutilAvcSetVideoMuting() +error_code cellSysutilAvcSetVideoMuting() { cellSysutil.todo("cellSysutilAvcSetVideoMuting()"); return CELL_OK; } -s32 cellSysutilAvcSetVoiceMuting() +error_code cellSysutilAvcSetVoiceMuting() { cellSysutil.todo("cellSysutilAvcSetVoiceMuting()"); return CELL_OK; } -s32 cellSysutilAvcShowPanel() +error_code cellSysutilAvcShowPanel() { cellSysutil.todo("cellSysutilAvcShowPanel()"); return CELL_OK; } -s32 cellSysutilAvcUnloadAsync() +error_code cellSysutilAvcUnloadAsync() { cellSysutil.todo("cellSysutilAvcUnloadAsync()"); return CELL_OK; diff --git a/rpcs3/Emu/Cell/Modules/cellSysutilAvcExt.cpp b/rpcs3/Emu/Cell/Modules/cellSysutilAvcExt.cpp index 11cf399d36..2d5947ab90 100644 --- a/rpcs3/Emu/Cell/Modules/cellSysutilAvcExt.cpp +++ b/rpcs3/Emu/Cell/Modules/cellSysutilAvcExt.cpp @@ -1,183 +1,183 @@ -#include "stdafx.h" +#include "stdafx.h" #include "Emu/Cell/PPUModule.h" LOG_CHANNEL(cellSysutilAvcExt); -s32 cellSysutilAvcExtIsMicAttached() +error_code cellSysutilAvcExtIsMicAttached() { UNIMPLEMENTED_FUNC(cellSysutilAvcExt); return CELL_OK; } -s32 cellSysutilAvcExtStopCameraDetection() +error_code cellSysutilAvcExtStopCameraDetection() { UNIMPLEMENTED_FUNC(cellSysutilAvcExt); return CELL_OK; } -s32 cellSysutilAvcExtSetWindowRotation() +error_code cellSysutilAvcExtSetWindowRotation() { UNIMPLEMENTED_FUNC(cellSysutilAvcExt); return CELL_OK; } -s32 cellSysutilAvcExtGetWindowPosition() +error_code cellSysutilAvcExtGetWindowPosition() { UNIMPLEMENTED_FUNC(cellSysutilAvcExt); return CELL_OK; } -s32 cellSysutilAvcExtSetHideNamePlate() +error_code cellSysutilAvcExtSetHideNamePlate() { UNIMPLEMENTED_FUNC(cellSysutilAvcExt); return CELL_OK; } -s32 cellSysutilAvcExtSetWindowPosition() +error_code cellSysutilAvcExtSetWindowPosition() { UNIMPLEMENTED_FUNC(cellSysutilAvcExt); return CELL_OK; } -s32 cellSysutilAvcExtGetWindowSize() +error_code cellSysutilAvcExtGetWindowSize() { UNIMPLEMENTED_FUNC(cellSysutilAvcExt); return CELL_OK; } -s32 cellSysutilAvcExtStartCameraDetection() +error_code cellSysutilAvcExtStartCameraDetection() { UNIMPLEMENTED_FUNC(cellSysutilAvcExt); return CELL_OK; } -s32 cellSysutilAvcExtGetWindowShowStatus() +error_code cellSysutilAvcExtGetWindowShowStatus() { UNIMPLEMENTED_FUNC(cellSysutilAvcExt); return CELL_OK; } -s32 cellSysutilAvcExtSetChatMode() +error_code cellSysutilAvcExtSetChatMode() { UNIMPLEMENTED_FUNC(cellSysutilAvcExt); return CELL_OK; } -s32 cellSysutilAvcExtGetNamePlateShowStatus() +error_code cellSysutilAvcExtGetNamePlateShowStatus() { UNIMPLEMENTED_FUNC(cellSysutilAvcExt); return CELL_OK; } -s32 cellSysutilAvcExtSetWindowAlpha() +error_code cellSysutilAvcExtSetWindowAlpha() { UNIMPLEMENTED_FUNC(cellSysutilAvcExt); return CELL_OK; } -s32 cellSysutilAvcExtSetWindowSize() +error_code cellSysutilAvcExtSetWindowSize() { UNIMPLEMENTED_FUNC(cellSysutilAvcExt); return CELL_OK; } -s32 cellSysutilAvcExtShowPanelEx() +error_code cellSysutilAvcExtShowPanelEx() { UNIMPLEMENTED_FUNC(cellSysutilAvcExt); return CELL_OK; } -s32 cellSysutilAvcExtLoadAsyncEx() +error_code cellSysutilAvcExtLoadAsyncEx() { UNIMPLEMENTED_FUNC(cellSysutilAvcExt); return CELL_OK; } -s32 cellSysutilAvcExtSetShowNamePlate() +error_code cellSysutilAvcExtSetShowNamePlate() { UNIMPLEMENTED_FUNC(cellSysutilAvcExt); return CELL_OK; } -s32 cellSysutilAvcExtStopVoiceDetection() +error_code cellSysutilAvcExtStopVoiceDetection() { UNIMPLEMENTED_FUNC(cellSysutilAvcExt); return CELL_OK; } -s32 cellSysutilAvcExtShowWindow() +error_code cellSysutilAvcExtShowWindow() { UNIMPLEMENTED_FUNC(cellSysutilAvcExt); return CELL_OK; } -s32 cellSysutilAvcExtIsCameraAttached() +error_code cellSysutilAvcExtIsCameraAttached() { UNIMPLEMENTED_FUNC(cellSysutilAvcExt); return CELL_OK; } -s32 cellSysutilAvcExtHidePanelEx() +error_code cellSysutilAvcExtHidePanelEx() { UNIMPLEMENTED_FUNC(cellSysutilAvcExt); return CELL_OK; } -s32 cellSysutilAvcExtHideWindow() +error_code cellSysutilAvcExtHideWindow() { UNIMPLEMENTED_FUNC(cellSysutilAvcExt); return CELL_OK; } -s32 cellSysutilAvcExtSetChatGroup() +error_code cellSysutilAvcExtSetChatGroup() { UNIMPLEMENTED_FUNC(cellSysutilAvcExt); return CELL_OK; } -s32 cellSysutilAvcExtGetWindowRotation() +error_code cellSysutilAvcExtGetWindowRotation() { UNIMPLEMENTED_FUNC(cellSysutilAvcExt); return CELL_OK; } -s32 cellSysutilAvcExtStartMicDetection() +error_code cellSysutilAvcExtStartMicDetection() { UNIMPLEMENTED_FUNC(cellSysutilAvcExt); return CELL_OK; } -s32 cellSysutilAvcExtGetWindowAlpha() +error_code cellSysutilAvcExtGetWindowAlpha() { UNIMPLEMENTED_FUNC(cellSysutilAvcExt); return CELL_OK; } -s32 cellSysutilAvcExtStartVoiceDetection() +error_code cellSysutilAvcExtStartVoiceDetection() { UNIMPLEMENTED_FUNC(cellSysutilAvcExt); return CELL_OK; } -s32 cellSysutilAvcExtGetSurfacePointer() +error_code cellSysutilAvcExtGetSurfacePointer() { UNIMPLEMENTED_FUNC(cellSysutilAvcExt); return CELL_OK; } -s32 cellSysutilAvcExtStopMicDetection() +error_code cellSysutilAvcExtStopMicDetection() { UNIMPLEMENTED_FUNC(cellSysutilAvcExt); return CELL_OK; } -s32 cellSysutilAvcExtInitOptionParam() +error_code cellSysutilAvcExtInitOptionParam() { UNIMPLEMENTED_FUNC(cellSysutilAvcExt); return CELL_OK; } -s32 cellSysutilAvcExtSetWindowZorder() +error_code cellSysutilAvcExtSetWindowZorder() { UNIMPLEMENTED_FUNC(cellSysutilAvcExt); return CELL_OK; diff --git a/rpcs3/Emu/Cell/Modules/cellUsbd.cpp b/rpcs3/Emu/Cell/Modules/cellUsbd.cpp index 937ea737c9..3e30ad4ca1 100644 --- a/rpcs3/Emu/Cell/Modules/cellUsbd.cpp +++ b/rpcs3/Emu/Cell/Modules/cellUsbd.cpp @@ -1,180 +1,211 @@ -#include "stdafx.h" +#include "stdafx.h" #include "Emu/Cell/PPUModule.h" #include "cellUsbd.h" LOG_CHANNEL(cellUsbd); -s32 cellUsbdInit() +template<> +void fmt_class_string::format(std::string& out, u64 arg) +{ + format_enum(out, arg, [](auto error) + { + switch (error) + { + STR_CASE(CELL_USBD_ERROR_NOT_INITIALIZED); + STR_CASE(CELL_USBD_ERROR_ALREADY_INITIALIZED); + STR_CASE(CELL_USBD_ERROR_NO_MEMORY); + STR_CASE(CELL_USBD_ERROR_INVALID_PARAM); + STR_CASE(CELL_USBD_ERROR_INVALID_TRANSFER_TYPE); + STR_CASE(CELL_USBD_ERROR_LDD_ALREADY_REGISTERED); + STR_CASE(CELL_USBD_ERROR_LDD_NOT_ALLOCATED); + STR_CASE(CELL_USBD_ERROR_LDD_NOT_RELEASED); + STR_CASE(CELL_USBD_ERROR_LDD_NOT_FOUND); + STR_CASE(CELL_USBD_ERROR_DEVICE_NOT_FOUND); + STR_CASE(CELL_USBD_ERROR_PIPE_NOT_ALLOCATED); + STR_CASE(CELL_USBD_ERROR_PIPE_NOT_RELEASED); + STR_CASE(CELL_USBD_ERROR_PIPE_NOT_FOUND); + STR_CASE(CELL_USBD_ERROR_IOREQ_NOT_ALLOCATED); + STR_CASE(CELL_USBD_ERROR_IOREQ_NOT_RELEASED); + STR_CASE(CELL_USBD_ERROR_IOREQ_NOT_FOUND); + STR_CASE(CELL_USBD_ERROR_CANNOT_GET_DESCRIPTOR); + STR_CASE(CELL_USBD_ERROR_FATAL); + } + + return unknown; + }); +} + +error_code cellUsbdInit() { cellUsbd.warning("cellUsbdInit()"); return CELL_OK; } -s32 cellUsbdEnd() +error_code cellUsbdEnd() { cellUsbd.warning("cellUsbdEnd()"); return CELL_OK; } -s32 cellUsbdSetThreadPriority() +error_code cellUsbdSetThreadPriority() { UNIMPLEMENTED_FUNC(cellUsbd); return CELL_OK; } -s32 cellUsbdSetThreadPriority2() +error_code cellUsbdSetThreadPriority2() { UNIMPLEMENTED_FUNC(cellUsbd); return CELL_OK; } -s32 cellUsbdGetThreadPriority() +error_code cellUsbdGetThreadPriority() { UNIMPLEMENTED_FUNC(cellUsbd); return CELL_OK; } -s32 cellUsbdRegisterLdd() +error_code cellUsbdRegisterLdd() { UNIMPLEMENTED_FUNC(cellUsbd); return CELL_OK; } -s32 cellUsbdRegisterCompositeLdd() +error_code cellUsbdRegisterCompositeLdd() { UNIMPLEMENTED_FUNC(cellUsbd); return CELL_OK; } -s32 cellUsbdRegisterExtraLdd() +error_code cellUsbdRegisterExtraLdd() { UNIMPLEMENTED_FUNC(cellUsbd); return CELL_OK; } -s32 cellUsbdRegisterExtraLdd2() +error_code cellUsbdRegisterExtraLdd2() { UNIMPLEMENTED_FUNC(cellUsbd); return CELL_OK; } -s32 cellUsbdUnregisterLdd() +error_code cellUsbdUnregisterLdd() { UNIMPLEMENTED_FUNC(cellUsbd); return CELL_OK; } -s32 cellUsbdUnregisterCompositeLdd() +error_code cellUsbdUnregisterCompositeLdd() { UNIMPLEMENTED_FUNC(cellUsbd); return CELL_OK; } -s32 cellUsbdUnregisterExtraLdd() +error_code cellUsbdUnregisterExtraLdd() { UNIMPLEMENTED_FUNC(cellUsbd); return CELL_OK; } -s32 cellUsbdOpenPipe() +error_code cellUsbdOpenPipe() { UNIMPLEMENTED_FUNC(cellUsbd); return CELL_OK; } -s32 cellUsbdClosePipe() +error_code cellUsbdClosePipe() { UNIMPLEMENTED_FUNC(cellUsbd); return CELL_OK; } -s32 cellUsbdControlTransfer() +error_code cellUsbdControlTransfer() { UNIMPLEMENTED_FUNC(cellUsbd); return CELL_OK; } -s32 cellUsbdBulkTransfer() +error_code cellUsbdBulkTransfer() { UNIMPLEMENTED_FUNC(cellUsbd); return CELL_OK; } -s32 cellUsbdInterruptTransfer() +error_code cellUsbdInterruptTransfer() { UNIMPLEMENTED_FUNC(cellUsbd); return CELL_OK; } -s32 cellUsbdIsochronousTransfer() +error_code cellUsbdIsochronousTransfer() { UNIMPLEMENTED_FUNC(cellUsbd); return CELL_OK; } -s32 cellUsbdHSIsochronousTransfer() +error_code cellUsbdHSIsochronousTransfer() { UNIMPLEMENTED_FUNC(cellUsbd); return CELL_OK; } -s32 cellUsbdScanStaticDescriptor() +error_code cellUsbdScanStaticDescriptor() { UNIMPLEMENTED_FUNC(cellUsbd); return CELL_OK; } -s32 cellUsbdGetDeviceSpeed() +error_code cellUsbdGetDeviceSpeed() { UNIMPLEMENTED_FUNC(cellUsbd); return CELL_OK; } -s32 cellUsbdGetDeviceLocation() +error_code cellUsbdGetDeviceLocation() { UNIMPLEMENTED_FUNC(cellUsbd); return CELL_OK; } -s32 cellUsbdSetPrivateData() +error_code cellUsbdSetPrivateData() { UNIMPLEMENTED_FUNC(cellUsbd); return CELL_OK; } -s32 cellUsbdGetPrivateData() +error_code cellUsbdGetPrivateData() { UNIMPLEMENTED_FUNC(cellUsbd); return CELL_OK; } -s32 cellUsbdAllocateMemory() +error_code cellUsbdAllocateMemory() { UNIMPLEMENTED_FUNC(cellUsbd); return CELL_OK; } -s32 cellUsbdAllocateMemoryFromContainer() +error_code cellUsbdAllocateMemoryFromContainer() { UNIMPLEMENTED_FUNC(cellUsbd); return CELL_OK; } -s32 cellUsbdAllocateSharedMemory() +error_code cellUsbdAllocateSharedMemory() { UNIMPLEMENTED_FUNC(cellUsbd); return CELL_OK; } -s32 cellUsbdFreeMemory() +error_code cellUsbdFreeMemory() { UNIMPLEMENTED_FUNC(cellUsbd); return CELL_OK; } -s32 cellUsbdResetDevice() +error_code cellUsbdResetDevice() { UNIMPLEMENTED_FUNC(cellUsbd); return CELL_OK; diff --git a/rpcs3/Emu/Cell/Modules/cellUsbd.h b/rpcs3/Emu/Cell/Modules/cellUsbd.h index f0c75eb260..4a2fe6c162 100644 --- a/rpcs3/Emu/Cell/Modules/cellUsbd.h +++ b/rpcs3/Emu/Cell/Modules/cellUsbd.h @@ -1,9 +1,9 @@ -#pragma once +#pragma once // Return Codes -enum +enum CellUsbdError : u32 { CELL_USBD_ERROR_NOT_INITIALIZED = 0x80110001, CELL_USBD_ERROR_ALREADY_INITIALIZED = 0x80110002, diff --git a/rpcs3/Emu/Cell/Modules/cellUsbpspcm.cpp b/rpcs3/Emu/Cell/Modules/cellUsbpspcm.cpp index ccd4cae8bb..14b385fba2 100644 --- a/rpcs3/Emu/Cell/Modules/cellUsbpspcm.cpp +++ b/rpcs3/Emu/Cell/Modules/cellUsbpspcm.cpp @@ -1,10 +1,10 @@ -#include "stdafx.h" +#include "stdafx.h" #include "Emu/Cell/PPUModule.h" LOG_CHANNEL(cellUsbPspcm); // Return Codes -enum +enum CellUsbpspcmError : u32 { CELL_USBPSPCM_ERROR_NOT_INITIALIZED = 0x80110401, CELL_USBPSPCM_ERROR_ALREADY = 0x80110402, @@ -20,163 +20,188 @@ enum CELL_USBPSPCM_ERROR_NO_DATA = 0x8011040C, }; -s32 cellUsbPspcmInit() +template<> +void fmt_class_string::format(std::string& out, u64 arg) +{ + format_enum(out, arg, [](auto error) + { + switch (error) + { + STR_CASE(CELL_USBPSPCM_ERROR_NOT_INITIALIZED); + STR_CASE(CELL_USBPSPCM_ERROR_ALREADY); + STR_CASE(CELL_USBPSPCM_ERROR_INVALID); + STR_CASE(CELL_USBPSPCM_ERROR_NO_MEMORY); + STR_CASE(CELL_USBPSPCM_ERROR_BUSY); + STR_CASE(CELL_USBPSPCM_ERROR_INPROGRESS); + STR_CASE(CELL_USBPSPCM_ERROR_NO_SPACE); + STR_CASE(CELL_USBPSPCM_ERROR_CANCELED); + STR_CASE(CELL_USBPSPCM_ERROR_RESETTING); + STR_CASE(CELL_USBPSPCM_ERROR_RESET_END); + STR_CASE(CELL_USBPSPCM_ERROR_CLOSED); + STR_CASE(CELL_USBPSPCM_ERROR_NO_DATA); + } + + return unknown; + }); +} + +error_code cellUsbPspcmInit() { UNIMPLEMENTED_FUNC(cellUsbPspcm); return CELL_OK; } -s32 cellUsbPspcmEnd() +error_code cellUsbPspcmEnd() { UNIMPLEMENTED_FUNC(cellUsbPspcm); return CELL_OK; } -s32 cellUsbPspcmCalcPoolSize() +error_code cellUsbPspcmCalcPoolSize() { UNIMPLEMENTED_FUNC(cellUsbPspcm); return CELL_OK; } -s32 cellUsbPspcmRegister() +error_code cellUsbPspcmRegister() { UNIMPLEMENTED_FUNC(cellUsbPspcm); return CELL_OK; } -s32 cellUsbPspcmUnregister() +error_code cellUsbPspcmUnregister() { UNIMPLEMENTED_FUNC(cellUsbPspcm); return CELL_OK; } -s32 cellUsbPspcmGetAddr() +error_code cellUsbPspcmGetAddr() { UNIMPLEMENTED_FUNC(cellUsbPspcm); return CELL_OK; } -s32 cellUsbPspcmBind() +error_code cellUsbPspcmBind() { UNIMPLEMENTED_FUNC(cellUsbPspcm); return CELL_OK; } -s32 cellUsbPspcmBindAsync() +error_code cellUsbPspcmBindAsync() { UNIMPLEMENTED_FUNC(cellUsbPspcm); return CELL_OK; } -s32 cellUsbPspcmWaitBindAsync() +error_code cellUsbPspcmWaitBindAsync() { UNIMPLEMENTED_FUNC(cellUsbPspcm); return CELL_OK; } -s32 cellUsbPspcmPollBindAsync() +error_code cellUsbPspcmPollBindAsync() { UNIMPLEMENTED_FUNC(cellUsbPspcm); return CELL_OK; } -s32 cellUsbPspcmCancelBind() +error_code cellUsbPspcmCancelBind() { UNIMPLEMENTED_FUNC(cellUsbPspcm); return CELL_OK; } -s32 cellUsbPspcmClose() +error_code cellUsbPspcmClose() { UNIMPLEMENTED_FUNC(cellUsbPspcm); return CELL_OK; } -s32 cellUsbPspcmSend() +error_code cellUsbPspcmSend() { UNIMPLEMENTED_FUNC(cellUsbPspcm); return CELL_OK; } -s32 cellUsbPspcmSendAsync() +error_code cellUsbPspcmSendAsync() { UNIMPLEMENTED_FUNC(cellUsbPspcm); return CELL_OK; } -s32 cellUsbPspcmWaitSendAsync() +error_code cellUsbPspcmWaitSendAsync() { UNIMPLEMENTED_FUNC(cellUsbPspcm); return CELL_OK; } -s32 cellUsbPspcmPollSendAsync() +error_code cellUsbPspcmPollSendAsync() { UNIMPLEMENTED_FUNC(cellUsbPspcm); return CELL_OK; } -s32 cellUsbPspcmRecv() +error_code cellUsbPspcmRecv() { UNIMPLEMENTED_FUNC(cellUsbPspcm); return CELL_OK; } -s32 cellUsbPspcmRecvAsync() +error_code cellUsbPspcmRecvAsync() { UNIMPLEMENTED_FUNC(cellUsbPspcm); return CELL_OK; } -s32 cellUsbPspcmWaitRecvAsync() +error_code cellUsbPspcmWaitRecvAsync() { UNIMPLEMENTED_FUNC(cellUsbPspcm); return CELL_OK; } -s32 cellUsbPspcmPollRecvAsync() +error_code cellUsbPspcmPollRecvAsync() { UNIMPLEMENTED_FUNC(cellUsbPspcm); return CELL_OK; } -s32 cellUsbPspcmReset() +error_code cellUsbPspcmReset() { UNIMPLEMENTED_FUNC(cellUsbPspcm); return CELL_OK; } -s32 cellUsbPspcmResetAsync() +error_code cellUsbPspcmResetAsync() { UNIMPLEMENTED_FUNC(cellUsbPspcm); return CELL_OK; } -s32 cellUsbPspcmWaitResetAsync() +error_code cellUsbPspcmWaitResetAsync() { UNIMPLEMENTED_FUNC(cellUsbPspcm); return CELL_OK; } -s32 cellUsbPspcmPollResetAsync() +error_code cellUsbPspcmPollResetAsync() { UNIMPLEMENTED_FUNC(cellUsbPspcm); return CELL_OK; } -s32 cellUsbPspcmWaitData() +error_code cellUsbPspcmWaitData() { UNIMPLEMENTED_FUNC(cellUsbPspcm); return CELL_OK; } -s32 cellUsbPspcmPollData() +error_code cellUsbPspcmPollData() { UNIMPLEMENTED_FUNC(cellUsbPspcm); return CELL_OK; } -s32 cellUsbPspcmCancelWaitData() +error_code cellUsbPspcmCancelWaitData() { UNIMPLEMENTED_FUNC(cellUsbPspcm); return CELL_OK; diff --git a/rpcs3/Emu/Cell/Modules/cellVideoPlayerUtility.cpp b/rpcs3/Emu/Cell/Modules/cellVideoPlayerUtility.cpp index e0d31fe7bb..0653d961f0 100644 --- a/rpcs3/Emu/Cell/Modules/cellVideoPlayerUtility.cpp +++ b/rpcs3/Emu/Cell/Modules/cellVideoPlayerUtility.cpp @@ -3,103 +3,103 @@ LOG_CHANNEL(cellVideoPlayerUtility); -s32 cellVideoPlayerInitialize() +error_code cellVideoPlayerInitialize() { UNIMPLEMENTED_FUNC(cellVideoPlayerUtility); return CELL_OK; } -s32 cellVideoPlayerSetStartPosition() +error_code cellVideoPlayerSetStartPosition() { UNIMPLEMENTED_FUNC(cellVideoPlayerUtility); return CELL_OK; } -s32 cellVideoPlayerGetVolume() +error_code cellVideoPlayerGetVolume() { UNIMPLEMENTED_FUNC(cellVideoPlayerUtility); return CELL_OK; } -s32 cellVideoPlayerFinalize() +error_code cellVideoPlayerFinalize() { UNIMPLEMENTED_FUNC(cellVideoPlayerUtility); return CELL_OK; } -s32 cellVideoPlayerSetStopPosition() +error_code cellVideoPlayerSetStopPosition() { UNIMPLEMENTED_FUNC(cellVideoPlayerUtility); return CELL_OK; } -s32 cellVideoPlayerClose() +error_code cellVideoPlayerClose() { UNIMPLEMENTED_FUNC(cellVideoPlayerUtility); return CELL_OK; } -s32 cellVideoPlayerGetTransferPictureInfo() +error_code cellVideoPlayerGetTransferPictureInfo() { UNIMPLEMENTED_FUNC(cellVideoPlayerUtility); return CELL_OK; } -s32 cellVideoPlayerSetDownloadPosition() +error_code cellVideoPlayerSetDownloadPosition() { UNIMPLEMENTED_FUNC(cellVideoPlayerUtility); return CELL_OK; } -s32 cellVideoPlayerStartThumbnail() +error_code cellVideoPlayerStartThumbnail() { UNIMPLEMENTED_FUNC(cellVideoPlayerUtility); return CELL_OK; } -s32 cellVideoPlayerEndThumbnail() +error_code cellVideoPlayerEndThumbnail() { UNIMPLEMENTED_FUNC(cellVideoPlayerUtility); return CELL_OK; } -s32 cellVideoPlayerOpen() +error_code cellVideoPlayerOpen() { UNIMPLEMENTED_FUNC(cellVideoPlayerUtility); return CELL_OK; } -s32 cellVideoPlayerSetVolume() +error_code cellVideoPlayerSetVolume() { UNIMPLEMENTED_FUNC(cellVideoPlayerUtility); return CELL_OK; } -s32 cellVideoPlayerGetOutputStereoPicture() +error_code cellVideoPlayerGetOutputStereoPicture() { UNIMPLEMENTED_FUNC(cellVideoPlayerUtility); return CELL_OK; } -s32 cellVideoPlayerGetPlaybackStatus() +error_code cellVideoPlayerGetPlaybackStatus() { UNIMPLEMENTED_FUNC(cellVideoPlayerUtility); return CELL_OK; } -s32 cellVideoPlayerSetTransferComplete() +error_code cellVideoPlayerSetTransferComplete() { UNIMPLEMENTED_FUNC(cellVideoPlayerUtility); return CELL_OK; } -s32 cellVideoPlayerGetOutputPicture() +error_code cellVideoPlayerGetOutputPicture() { UNIMPLEMENTED_FUNC(cellVideoPlayerUtility); return CELL_OK; } -s32 cellVideoPlayerPlaybackControl() +error_code cellVideoPlayerPlaybackControl() { UNIMPLEMENTED_FUNC(cellVideoPlayerUtility); return CELL_OK; diff --git a/rpcs3/Emu/Cell/Modules/cellVideoUpload.cpp b/rpcs3/Emu/Cell/Modules/cellVideoUpload.cpp index 974f1cb41c..4e9c2ab3af 100644 --- a/rpcs3/Emu/Cell/Modules/cellVideoUpload.cpp +++ b/rpcs3/Emu/Cell/Modules/cellVideoUpload.cpp @@ -1,4 +1,4 @@ -#include "stdafx.h" +#include "stdafx.h" #include "Emu/Cell/PPUModule.h" #include "cellVideoUpload.h" @@ -6,6 +6,31 @@ LOG_CHANNEL(cellVideoUpload); +template<> +void fmt_class_string::format(std::string& out, u64 arg) +{ + format_enum(out, arg, [](auto error) + { + switch (error) + { + STR_CASE(CELL_VIDEO_UPLOAD_ERROR_CANCEL); + STR_CASE(CELL_VIDEO_UPLOAD_ERROR_NETWORK); + STR_CASE(CELL_VIDEO_UPLOAD_ERROR_SERVICE_STOP); + STR_CASE(CELL_VIDEO_UPLOAD_ERROR_SERVICE_BUSY); + STR_CASE(CELL_VIDEO_UPLOAD_ERROR_SERVICE_UNAVAILABLE); + STR_CASE(CELL_VIDEO_UPLOAD_ERROR_SERVICE_QUOTA); + STR_CASE(CELL_VIDEO_UPLOAD_ERROR_ACCOUNT_STOP); + STR_CASE(CELL_VIDEO_UPLOAD_ERROR_OUT_OF_MEMORY); + STR_CASE(CELL_VIDEO_UPLOAD_ERROR_FATAL); + STR_CASE(CELL_VIDEO_UPLOAD_ERROR_INVALID_VALUE); + STR_CASE(CELL_VIDEO_UPLOAD_ERROR_FILE_OPEN); + STR_CASE(CELL_VIDEO_UPLOAD_ERROR_INVALID_STATE); + } + + return unknown; + }); +} + error_code cellVideoUploadInitialize(vm::cptr pParam, vm::ptr cb, vm::ptr userdata) { cellVideoUpload.todo("cellVideoUploadInitialize(pParam=*0x%x, cb=*0x%x, userdata=*0x%x)", pParam, cb, userdata); diff --git a/rpcs3/Emu/Cell/Modules/cellVideoUpload.h b/rpcs3/Emu/Cell/Modules/cellVideoUpload.h index 35e49f1e59..662dd7ba83 100644 --- a/rpcs3/Emu/Cell/Modules/cellVideoUpload.h +++ b/rpcs3/Emu/Cell/Modules/cellVideoUpload.h @@ -1,4 +1,4 @@ -#pragma once +#pragma once #include "Emu/Memory/vm_ptr.h" @@ -44,7 +44,7 @@ enum }; // Return Codes -enum +enum CellVideoUploadError : u32 { CELL_VIDEO_UPLOAD_ERROR_CANCEL = 0x8002d000, CELL_VIDEO_UPLOAD_ERROR_NETWORK = 0x8002d001, diff --git a/rpcs3/Emu/Cell/Modules/cellVpost.cpp b/rpcs3/Emu/Cell/Modules/cellVpost.cpp index 2ae5bdd5f6..9bbf6233c0 100644 --- a/rpcs3/Emu/Cell/Modules/cellVpost.cpp +++ b/rpcs3/Emu/Cell/Modules/cellVpost.cpp @@ -24,7 +24,152 @@ extern "C" LOG_CHANNEL(cellVpost); -s32 cellVpostQueryAttr(vm::cptr cfgParam, vm::ptr attr) +template<> +void fmt_class_string::format(std::string& out, u64 arg) +{ + format_enum(out, arg, [](auto error) + { + switch (error) + { + STR_CASE(CELL_VPOST_ERROR_Q_ARG_CFG_NULL); + STR_CASE(CELL_VPOST_ERROR_Q_ARG_CFG_INVALID); + STR_CASE(CELL_VPOST_ERROR_Q_ARG_ATTR_NULL); + STR_CASE(CELL_VPOST_ERROR_O_ARG_CFG_NULL); + STR_CASE(CELL_VPOST_ERROR_O_ARG_CFG_INVALID); + STR_CASE(CELL_VPOST_ERROR_O_ARG_RSRC_NULL); + STR_CASE(CELL_VPOST_ERROR_O_ARG_RSRC_INVALID); + STR_CASE(CELL_VPOST_ERROR_O_ARG_HDL_NULL); + STR_CASE(CELL_VPOST_ERROR_O_FATAL_QUERY_FAIL); + STR_CASE(CELL_VPOST_ERROR_O_FATAL_CREATEMON_FAIL); + STR_CASE(CELL_VPOST_ERROR_O_FATAL_INITSPURS_FAIL); + STR_CASE(CELL_VPOST_ERROR_C_ARG_HDL_NULL); + STR_CASE(CELL_VPOST_ERROR_C_ARG_HDL_INVALID); + STR_CASE(CELL_VPOST_ERROR_C_FATAL_LOCKMON_FAIL); + STR_CASE(CELL_VPOST_ERROR_C_FATAL_UNLOCKMON_FAIL); + STR_CASE(CELL_VPOST_ERROR_C_FATAL_DESTROYMON_FAIL); + STR_CASE(CELL_VPOST_ERROR_C_FATAL_FINSPURS_FAIL); + STR_CASE(CELL_VPOST_ERROR_E_ARG_HDL_NULL); + STR_CASE(CELL_VPOST_ERROR_E_ARG_HDL_INVALID); + STR_CASE(CELL_VPOST_ERROR_E_ARG_INPICBUF_NULL); + STR_CASE(CELL_VPOST_ERROR_E_ARG_INPICBUF_INVALID); + STR_CASE(CELL_VPOST_ERROR_E_ARG_CTRL_NULL); + STR_CASE(CELL_VPOST_ERROR_E_ARG_CTRL_INVALID); + STR_CASE(CELL_VPOST_ERROR_E_ARG_OUTPICBUF_NULL); + STR_CASE(CELL_VPOST_ERROR_E_ARG_OUTPICBUF_INVALID); + STR_CASE(CELL_VPOST_ERROR_E_ARG_PICINFO_NULL); + STR_CASE(CELL_VPOST_ERROR_E_FATAL_LOCKMON_FAIL); + STR_CASE(CELL_VPOST_ERROR_E_FATAL_UNLOCKMON_FAIL); + STR_CASE(CELL_VPOST_ENT_ERROR_Q_ARG_ATTR_NULL); + STR_CASE(CELL_VPOST_ENT_ERROR_O_ARG_RSRC_NULL); + STR_CASE(CELL_VPOST_ENT_ERROR_O_ARG_RSRC_INVALID); + STR_CASE(CELL_VPOST_ENT_ERROR_O_ARG_HDL_NULL); + STR_CASE(CELL_VPOST_ENT_ERROR_O_FATAL_QUERY_FAIL); + STR_CASE(CELL_VPOST_ENT_ERROR_O_FATAL_CSPUCORE_FAIL); + STR_CASE(CELL_VPOST_ENT_ERROR_C_ARG_HDL_NULL); + STR_CASE(CELL_VPOST_ENT_ERROR_C_ARG_HDL_INVALID); + STR_CASE(CELL_VPOST_ENT_ERROR_C_FATAL_SNDCMD_FAIL); + STR_CASE(CELL_VPOST_ENT_ERROR_C_FATAL_RCVRES_FAIL); + STR_CASE(CELL_VPOST_ENT_ERROR_C_FATAL_DSPUCORE_FAIL); + STR_CASE(CELL_VPOST_ENT_ERROR_E_ARG_HDL_NULL); + STR_CASE(CELL_VPOST_ENT_ERROR_E_ARG_HDL_INVALID); + STR_CASE(CELL_VPOST_ENT_ERROR_E_ARG_INPICBUF_NULL); + STR_CASE(CELL_VPOST_ENT_ERROR_E_ARG_INPICBUF_INVALID); + STR_CASE(CELL_VPOST_ENT_ERROR_E_ARG_INPICINFO_NULL); + STR_CASE(CELL_VPOST_ENT_ERROR_E_ARG_INPICINFO_INVALID); + STR_CASE(CELL_VPOST_ENT_ERROR_E_ARG_CTRL_NULL); + STR_CASE(CELL_VPOST_ENT_ERROR_E_ARG_CTRL_INVALID); + STR_CASE(CELL_VPOST_ENT_ERROR_E_ARG_COMB_INVALID); + STR_CASE(CELL_VPOST_ENT_ERROR_E_ARG_OUTPICBUF_NULL); + STR_CASE(CELL_VPOST_ENT_ERROR_E_ARG_OUTPICBUF_INVALID); + STR_CASE(CELL_VPOST_ENT_ERROR_E_ARG_OUTPICINFO_NULL); + STR_CASE(CELL_VPOST_ENT_ERROR_E_FATAL_SNDCMD_FAIL); + STR_CASE(CELL_VPOST_ENT_ERROR_E_FATAL_RCVRES_FAIL); + STR_CASE(CELL_VPOST_ENT_ERROR_E_FATAL_SPUCORE_FAIL); + STR_CASE(CELL_VPOST_IPC_ERROR_Q_ARG_ATTR_NULL); + STR_CASE(CELL_VPOST_IPC_ERROR_O_ARG_RSRC_NULL); + STR_CASE(CELL_VPOST_IPC_ERROR_O_ARG_RSRC_INVALID); + STR_CASE(CELL_VPOST_IPC_ERROR_O_ARG_HDL_NULL); + STR_CASE(CELL_VPOST_IPC_ERROR_O_FATAL_QUERY_FAIL); + STR_CASE(CELL_VPOST_IPC_ERROR_O_FATAL_CSPUCORE_FAIL); + STR_CASE(CELL_VPOST_IPC_ERROR_C_ARG_HDL_NULL); + STR_CASE(CELL_VPOST_IPC_ERROR_C_ARG_HDL_INVALID); + STR_CASE(CELL_VPOST_IPC_ERROR_C_FATAL_SNDCMD_FAIL); + STR_CASE(CELL_VPOST_IPC_ERROR_C_FATAL_RCVRES_FAIL); + STR_CASE(CELL_VPOST_IPC_ERROR_C_FATAL_DSPUCORE_FAIL); + STR_CASE(CELL_VPOST_IPC_ERROR_E_ARG_HDL_NULL); + STR_CASE(CELL_VPOST_IPC_ERROR_E_ARG_HDL_INVALID); + STR_CASE(CELL_VPOST_IPC_ERROR_E_ARG_INPICBUF_NULL); + STR_CASE(CELL_VPOST_IPC_ERROR_E_ARG_INPICBUF_INVALID); + STR_CASE(CELL_VPOST_IPC_ERROR_E_ARG_INPICINFO_NULL); + STR_CASE(CELL_VPOST_IPC_ERROR_E_ARG_INPICINFO_INVALID); + STR_CASE(CELL_VPOST_IPC_ERROR_E_ARG_CTRL_NULL); + STR_CASE(CELL_VPOST_IPC_ERROR_E_ARG_CTRL_INVALID); + STR_CASE(CELL_VPOST_IPC_ERROR_E_ARG_COMB_INVALID); + STR_CASE(CELL_VPOST_IPC_ERROR_E_ARG_OUTPICBUF_NULL); + STR_CASE(CELL_VPOST_IPC_ERROR_E_ARG_OUTPICBUF_INVALID); + STR_CASE(CELL_VPOST_IPC_ERROR_E_ARG_OUTPICINFO_NULL); + STR_CASE(CELL_VPOST_IPC_ERROR_E_FATAL_SNDCMD_FAIL); + STR_CASE(CELL_VPOST_IPC_ERROR_E_FATAL_RCVRES_FAIL); + STR_CASE(CELL_VPOST_IPC_ERROR_E_FATAL_SPUCORE_FAIL); + STR_CASE(CELL_VPOST_VSC_ERROR_Q_ARG_ATTR_NULL); + STR_CASE(CELL_VPOST_VSC_ERROR_O_ARG_RSRC_NULL); + STR_CASE(CELL_VPOST_VSC_ERROR_O_ARG_RSRC_INVALID); + STR_CASE(CELL_VPOST_VSC_ERROR_O_ARG_HDL_NULL); + STR_CASE(CELL_VPOST_VSC_ERROR_O_FATAL_QUERY_FAIL); + STR_CASE(CELL_VPOST_VSC_ERROR_O_FATAL_CSPUCORE_FAIL); + STR_CASE(CELL_VPOST_VSC_ERROR_C_ARG_HDL_NULL); + STR_CASE(CELL_VPOST_VSC_ERROR_C_ARG_HDL_INVALID); + STR_CASE(CELL_VPOST_VSC_ERROR_C_FATAL_SNDCMD_FAIL); + STR_CASE(CELL_VPOST_VSC_ERROR_C_FATAL_RCVRES_FAIL); + STR_CASE(CELL_VPOST_VSC_ERROR_C_FATAL_DSPUCORE_FAIL); + STR_CASE(CELL_VPOST_VSC_ERROR_E_ARG_HDL_NULL); + STR_CASE(CELL_VPOST_VSC_ERROR_E_ARG_HDL_INVALID); + STR_CASE(CELL_VPOST_VSC_ERROR_E_ARG_INPICBUF_NULL); + STR_CASE(CELL_VPOST_VSC_ERROR_E_ARG_INPICBUF_INVALID); + STR_CASE(CELL_VPOST_VSC_ERROR_E_ARG_INPICINFO_NULL); + STR_CASE(CELL_VPOST_VSC_ERROR_E_ARG_INPICINFO_INVALID); + STR_CASE(CELL_VPOST_VSC_ERROR_E_ARG_CTRL_NULL); + STR_CASE(CELL_VPOST_VSC_ERROR_E_ARG_CTRL_INVALID); + STR_CASE(CELL_VPOST_VSC_ERROR_E_ARG_COMB_INVALID); + STR_CASE(CELL_VPOST_VSC_ERROR_E_ARG_OUTPICBUF_NULL); + STR_CASE(CELL_VPOST_VSC_ERROR_E_ARG_OUTPICBUF_INVALID); + STR_CASE(CELL_VPOST_VSC_ERROR_E_ARG_OUTPICINFO_NULL); + STR_CASE(CELL_VPOST_VSC_ERROR_E_FATAL_SNDCMD_FAIL); + STR_CASE(CELL_VPOST_VSC_ERROR_E_FATAL_RCVRES_FAIL); + STR_CASE(CELL_VPOST_VSC_ERROR_E_FATAL_SPUCORE_FAIL); + STR_CASE(CELL_VPOST_CSC_ERROR_Q_ARG_ATTR_NULL); + STR_CASE(CELL_VPOST_CSC_ERROR_O_ARG_RSRC_NULL); + STR_CASE(CELL_VPOST_CSC_ERROR_O_ARG_RSRC_INVALID); + STR_CASE(CELL_VPOST_CSC_ERROR_O_ARG_HDL_NULL); + STR_CASE(CELL_VPOST_CSC_ERROR_O_FATAL_QUERY_FAIL); + STR_CASE(CELL_VPOST_CSC_ERROR_O_FATAL_CSPUCORE_FAIL); + STR_CASE(CELL_VPOST_CSC_ERROR_C_ARG_HDL_NULL); + STR_CASE(CELL_VPOST_CSC_ERROR_C_ARG_HDL_INVALID); + STR_CASE(CELL_VPOST_CSC_ERROR_C_FATAL_SNDCMD_FAIL); + STR_CASE(CELL_VPOST_CSC_ERROR_C_FATAL_RCVRES_FAIL); + STR_CASE(CELL_VPOST_CSC_ERROR_C_FATAL_DSPUCORE_FAIL); + STR_CASE(CELL_VPOST_CSC_ERROR_E_ARG_HDL_NULL); + STR_CASE(CELL_VPOST_CSC_ERROR_E_ARG_HDL_INVALID); + STR_CASE(CELL_VPOST_CSC_ERROR_E_ARG_INPICBUF_NULL); + STR_CASE(CELL_VPOST_CSC_ERROR_E_ARG_INPICBUF_INVALID); + STR_CASE(CELL_VPOST_CSC_ERROR_E_ARG_INPICINFO_NULL); + STR_CASE(CELL_VPOST_CSC_ERROR_E_ARG_INPICINFO_INVALID); + STR_CASE(CELL_VPOST_CSC_ERROR_E_ARG_CTRL_NULL); + STR_CASE(CELL_VPOST_CSC_ERROR_E_ARG_CTRL_INVALID); + STR_CASE(CELL_VPOST_CSC_ERROR_E_ARG_COMB_INVALID); + STR_CASE(CELL_VPOST_CSC_ERROR_E_ARG_OUTPICBUF_NULL); + STR_CASE(CELL_VPOST_CSC_ERROR_E_ARG_OUTPICBUF_INVALID); + STR_CASE(CELL_VPOST_CSC_ERROR_E_ARG_OUTPICINFO_NULL); + STR_CASE(CELL_VPOST_CSC_ERROR_E_FATAL_SNDCMD_FAIL); + STR_CASE(CELL_VPOST_CSC_ERROR_E_FATAL_RCVRES_FAIL); + STR_CASE(CELL_VPOST_CSC_ERROR_E_FATAL_SPUCORE_FAIL); + } + + return unknown; + }); +} + +error_code cellVpostQueryAttr(vm::cptr cfgParam, vm::ptr attr) { cellVpost.warning("cellVpostQueryAttr(cfgParam=*0x%x, attr=*0x%x)", cfgParam, attr); @@ -38,7 +183,7 @@ s32 cellVpostQueryAttr(vm::cptr cfgParam, vm::ptr cfgParam, vm::cptr resource, vm::ptr handle) +error_code cellVpostOpen(vm::cptr cfgParam, vm::cptr resource, vm::ptr handle) { cellVpost.warning("cellVpostOpen(cfgParam=*0x%x, resource=*0x%x, handle=*0x%x)", cfgParam, resource, handle); @@ -47,7 +192,7 @@ s32 cellVpostOpen(vm::cptr cfgParam, vm::cptr cfgParam, vm::cptr resource, vm::ptr handle) +error_code cellVpostOpenEx(vm::cptr cfgParam, vm::cptr resource, vm::ptr handle) { cellVpost.warning("cellVpostOpenEx(cfgParam=*0x%x, resource=*0x%x, handle=*0x%x)", cfgParam, resource, handle); @@ -56,7 +201,7 @@ s32 cellVpostOpenEx(vm::cptr cfgParam, vm::cptr inPicBuff, vm::cptr ctrlParam, vm::ptr outPicBuff, vm::ptr picInfo) +error_code cellVpostExec(u32 handle, vm::cptr inPicBuff, vm::cptr ctrlParam, vm::ptr outPicBuff, vm::ptr picInfo) { cellVpost.trace("cellVpostExec(handle=0x%x, inPicBuff=*0x%x, ctrlParam=*0x%x, outPicBuff=*0x%x, picInfo=*0x%x)", handle, inPicBuff, ctrlParam, outPicBuff, picInfo); diff --git a/rpcs3/Emu/Cell/Modules/cellVpost.h b/rpcs3/Emu/Cell/Modules/cellVpost.h index 633bb11e40..675e810594 100644 --- a/rpcs3/Emu/Cell/Modules/cellVpost.h +++ b/rpcs3/Emu/Cell/Modules/cellVpost.h @@ -1,4 +1,4 @@ -#pragma once +#pragma once #ifdef _MSC_VER #pragma warning(push, 0) @@ -21,7 +21,7 @@ extern "C" #include "Utilities/BEType.h" // Error Codes -enum +enum CellVpostError : u32 { CELL_VPOST_ERROR_Q_ARG_CFG_NULL = 0x80610410, CELL_VPOST_ERROR_Q_ARG_CFG_INVALID = 0x80610411, diff --git a/rpcs3/Emu/Cell/Modules/cellWebBrowser.cpp b/rpcs3/Emu/Cell/Modules/cellWebBrowser.cpp index 9f4034fc55..d496d6aa23 100644 --- a/rpcs3/Emu/Cell/Modules/cellWebBrowser.cpp +++ b/rpcs3/Emu/Cell/Modules/cellWebBrowser.cpp @@ -1,4 +1,4 @@ -#include "stdafx.h" +#include "stdafx.h" #include "Emu/Cell/PPUModule.h" #include "cellWebBrowser.h" @@ -12,13 +12,13 @@ struct browser_info vm::ptr userData; }; -s32 cellWebBrowserActivate() +error_code cellWebBrowserActivate() { cellSysutil.todo("cellWebBrowserActivate()"); return CELL_OK; } -s32 cellWebBrowserConfig() +error_code cellWebBrowserConfig() { cellSysutil.todo("cellWebBrowserConfig()"); return CELL_OK; @@ -30,31 +30,31 @@ error_code cellWebBrowserConfig2(vm::cptr config, u32 ver return CELL_OK; } -s32 cellWebBrowserConfigGetHeapSize() +error_code cellWebBrowserConfigGetHeapSize() { cellSysutil.todo("cellWebBrowserConfigGetHeapSize()"); return CELL_OK; } -s32 cellWebBrowserConfigGetHeapSize2() +error_code cellWebBrowserConfigGetHeapSize2() { cellSysutil.todo("cellWebBrowserConfigGetHeapSize2()"); return CELL_OK; } -s32 cellWebBrowserConfigSetCustomExit() +error_code cellWebBrowserConfigSetCustomExit() { cellSysutil.todo("cellWebBrowserConfigSetCustomExit()"); return CELL_OK; } -s32 cellWebBrowserConfigSetDisableTabs() +error_code cellWebBrowserConfigSetDisableTabs() { cellSysutil.todo("cellWebBrowserConfigSetDisableTabs()"); return CELL_OK; } -s32 cellWebBrowserConfigSetErrorHook2() +error_code cellWebBrowserConfigSetErrorHook2() { cellSysutil.todo("cellWebBrowserConfigSetErrorHook2()"); return CELL_OK; @@ -66,13 +66,13 @@ error_code cellWebBrowserConfigSetFullScreen2(vm::cptr co return CELL_OK; } -s32 cellWebBrowserConfigSetFullVersion2() +error_code cellWebBrowserConfigSetFullVersion2() { cellSysutil.todo("cellWebBrowserConfigSetFullVersion2()"); return CELL_OK; } -s32 cellWebBrowserConfigSetFunction() +error_code cellWebBrowserConfigSetFunction() { cellSysutil.todo("cellWebBrowserConfigSetFunction()"); return CELL_OK; @@ -84,7 +84,7 @@ error_code cellWebBrowserConfigSetFunction2(vm::ptr confi return CELL_OK; } -s32 cellWebBrowserConfigSetHeapSize() +error_code cellWebBrowserConfigSetHeapSize() { cellSysutil.todo("cellWebBrowserConfigSetHeapSize()"); return CELL_OK; @@ -96,7 +96,7 @@ error_code cellWebBrowserConfigSetHeapSize2(vm::ptr confi return CELL_OK; } -s32 cellWebBrowserConfigSetMimeSet() +error_code cellWebBrowserConfigSetMimeSet() { cellSysutil.todo("cellWebBrowserConfigSetMimeSet()"); return CELL_OK; @@ -108,13 +108,13 @@ error_code cellWebBrowserConfigSetNotifyHook2(vm::cptr co return CELL_OK; } -s32 cellWebBrowserConfigSetRequestHook2() +error_code cellWebBrowserConfigSetRequestHook2() { cellSysutil.todo("cellWebBrowserConfigSetRequestHook2()"); return CELL_OK; } -s32 cellWebBrowserConfigSetStatusHook2() +error_code cellWebBrowserConfigSetStatusHook2() { cellSysutil.todo("cellWebBrowserConfigSetStatusHook2()"); return CELL_OK; @@ -132,7 +132,7 @@ error_code cellWebBrowserConfigSetUnknownMIMETypeHook2(vm::cptr return CELL_OK; } -s32 cellWebBrowserConfigSetViewRect2() +error_code cellWebBrowserConfigSetViewRect2() { cellSysutil.todo("cellWebBrowserConfigSetViewRect2()"); return CELL_OK; } -s32 cellWebBrowserConfigWithVer() +error_code cellWebBrowserConfigWithVer() { cellSysutil.todo("cellWebBrowserConfigWithVer()"); return CELL_OK; } -s32 cellWebBrowserCreate() +error_code cellWebBrowserCreate() { cellSysutil.todo("cellWebBrowserCreate()"); return CELL_OK; } -s32 cellWebBrowserCreate2() +error_code cellWebBrowserCreate2() { cellSysutil.todo("cellWebBrowserCreate2()"); return CELL_OK; } -s32 cellWebBrowserCreateRender2() +error_code cellWebBrowserCreateRender2() { cellSysutil.todo("cellWebBrowserCreateRender2()"); return CELL_OK; } -s32 cellWebBrowserCreateRenderWithRect2() +error_code cellWebBrowserCreateRenderWithRect2() { cellSysutil.todo("cellWebBrowserCreateRenderWithRect2()"); return CELL_OK; } -s32 cellWebBrowserCreateWithConfig() +error_code cellWebBrowserCreateWithConfig() { cellSysutil.todo("cellWebBrowserCreateWithConfig()"); return CELL_OK; } -s32 cellWebBrowserCreateWithConfigFull() +error_code cellWebBrowserCreateWithConfigFull() { cellSysutil.todo("cellWebBrowserCreateWithConfigFull()"); return CELL_OK; } -s32 cellWebBrowserCreateWithRect2() +error_code cellWebBrowserCreateWithRect2() { cellSysutil.todo("cellWebBrowserCreateWithRect2()"); return CELL_OK; } -s32 cellWebBrowserDeactivate() +error_code cellWebBrowserDeactivate() { cellSysutil.todo("cellWebBrowserDeactivate()"); return CELL_OK; } -s32 cellWebBrowserDestroy() +error_code cellWebBrowserDestroy() { cellSysutil.todo("cellWebBrowserDestroy()"); return CELL_OK; } -s32 cellWebBrowserDestroy2() +error_code cellWebBrowserDestroy2() { cellSysutil.todo("cellWebBrowserDestroy2()"); return CELL_OK; } -s32 cellWebBrowserEstimate() +error_code cellWebBrowserEstimate() { cellSysutil.todo("cellWebBrowserEstimate()"); return CELL_OK; @@ -254,19 +254,19 @@ error_code cellWebBrowserInitialize(vm::ptr system return CELL_OK; } -s32 cellWebBrowserNavigate2() +error_code cellWebBrowserNavigate2() { cellSysutil.todo("cellWebBrowserNavigate2()"); return CELL_OK; } -s32 cellWebBrowserSetLocalContentsAdditionalTitleID() +error_code cellWebBrowserSetLocalContentsAdditionalTitleID() { cellSysutil.todo("cellWebBrowserSetLocalContentsAdditionalTitleID()"); return CELL_OK; } -s32 cellWebBrowserSetSystemCallbackUsrdata() +error_code cellWebBrowserSetSystemCallbackUsrdata() { cellSysutil.todo("cellWebBrowserSetSystemCallbackUsrdata()"); return CELL_OK; @@ -285,31 +285,31 @@ void cellWebBrowserShutdown() }); } -s32 cellWebBrowserUpdatePointerDisplayPos2() +error_code cellWebBrowserUpdatePointerDisplayPos2() { cellSysutil.todo("cellWebBrowserUpdatePointerDisplayPos2()"); return CELL_OK; } -s32 cellWebBrowserWakeupWithGameExit() +error_code cellWebBrowserWakeupWithGameExit() { cellSysutil.todo("cellWebBrowserWakeupWithGameExit()"); return CELL_OK; } -s32 cellWebComponentCreate() +error_code cellWebComponentCreate() { cellSysutil.todo("cellWebComponentCreate()"); return CELL_OK; } -s32 cellWebComponentCreateAsync() +error_code cellWebComponentCreateAsync() { cellSysutil.todo("cellWebComponentCreateAsync()"); return CELL_OK; } -s32 cellWebComponentDestroy() +error_code cellWebComponentDestroy() { cellSysutil.todo("cellWebComponentDestroy()"); return CELL_OK; diff --git a/rpcs3/Emu/Cell/Modules/cell_FreeType2.cpp b/rpcs3/Emu/Cell/Modules/cell_FreeType2.cpp index 485fb448bd..51f1e5c5d4 100644 --- a/rpcs3/Emu/Cell/Modules/cell_FreeType2.cpp +++ b/rpcs3/Emu/Cell/Modules/cell_FreeType2.cpp @@ -4,931 +4,931 @@ LOG_CHANNEL(cell_FreeType2); // Functions -s32 cellFreeType2Ex() +error_code cellFreeType2Ex() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_Activate_Size() +error_code FT_Activate_Size() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_Add_Default_Modules() +error_code FT_Add_Default_Modules() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_Add_Module() +error_code FT_Add_Module() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_Alloc() +error_code FT_Alloc() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_Angle_Diff() +error_code FT_Angle_Diff() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_Atan2() +error_code FT_Atan2() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_Attach_File() +error_code FT_Attach_File() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_Attach_Stream() +error_code FT_Attach_Stream() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_Bitmap_Convert() +error_code FT_Bitmap_Convert() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_Bitmap_Copy() +error_code FT_Bitmap_Copy() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_Bitmap_Done() +error_code FT_Bitmap_Done() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_Bitmap_Embolden() +error_code FT_Bitmap_Embolden() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_Bitmap_New() +error_code FT_Bitmap_New() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FTC_CMapCache_Lookup() +error_code FTC_CMapCache_Lookup() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FTC_CMapCache_New() +error_code FTC_CMapCache_New() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_CeilFix() +error_code FT_CeilFix() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FTC_ImageCache_Lookup() +error_code FTC_ImageCache_Lookup() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FTC_ImageCache_New() +error_code FTC_ImageCache_New() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FTC_Manager_Done() +error_code FTC_Manager_Done() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FTC_Manager_LookupFace() +error_code FTC_Manager_LookupFace() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FTC_Manager_LookupSize() +error_code FTC_Manager_LookupSize() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FTC_Manager_New() +error_code FTC_Manager_New() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FTC_Manager_RemoveFaceID() +error_code FTC_Manager_RemoveFaceID() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FTC_Node_Unref() +error_code FTC_Node_Unref() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_Cos() +error_code FT_Cos() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FTC_SBitCache_Lookup() +error_code FTC_SBitCache_Lookup() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FTC_SBitCache_New() +error_code FTC_SBitCache_New() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_DivFix() +error_code FT_DivFix() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_Done_Face() +error_code FT_Done_Face() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_Done_FreeType() +error_code FT_Done_FreeType() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_Done_Glyph() +error_code FT_Done_Glyph() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_Done_Library() +error_code FT_Done_Library() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_Done_Size() +error_code FT_Done_Size() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_FloorFix() +error_code FT_FloorFix() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_Free() +error_code FT_Free() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_Get_BDF_Charset_ID() +error_code FT_Get_BDF_Charset_ID() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_Get_BDF_Property() +error_code FT_Get_BDF_Property() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_Get_Char_Index() +error_code FT_Get_Char_Index() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_Get_Charmap_Index() +error_code FT_Get_Charmap_Index() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_Get_CMap_Language_ID() +error_code FT_Get_CMap_Language_ID() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_Get_First_Char() +error_code FT_Get_First_Char() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_Get_Glyph() +error_code FT_Get_Glyph() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_Get_Glyph_Name() +error_code FT_Get_Glyph_Name() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_Get_Kerning() +error_code FT_Get_Kerning() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_Get_MM_Var() +error_code FT_Get_MM_Var() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_Get_Module() +error_code FT_Get_Module() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_Get_Multi_Master() +error_code FT_Get_Multi_Master() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_Get_Name_Index() +error_code FT_Get_Name_Index() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_Get_Next_Char() +error_code FT_Get_Next_Char() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_Get_PFR_Advance() +error_code FT_Get_PFR_Advance() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_Get_PFR_Kerning() +error_code FT_Get_PFR_Kerning() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_Get_PFR_Metrics() +error_code FT_Get_PFR_Metrics() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_Get_Postscript_Name() +error_code FT_Get_Postscript_Name() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_Get_PS_Font_Info() +error_code FT_Get_PS_Font_Info() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_Get_PS_Font_Private() +error_code FT_Get_PS_Font_Private() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_Get_Renderer() +error_code FT_Get_Renderer() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_Get_Sfnt_Name() +error_code FT_Get_Sfnt_Name() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_Get_Sfnt_Name_Count() +error_code FT_Get_Sfnt_Name_Count() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_Get_Sfnt_Table() +error_code FT_Get_Sfnt_Table() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_Get_SubGlyph_Info() +error_code FT_Get_SubGlyph_Info() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_Get_Track_Kerning() +error_code FT_Get_Track_Kerning() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_Get_TrueType_Engine_Type() +error_code FT_Get_TrueType_Engine_Type() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_Get_X11_Font_Format() +error_code FT_Get_X11_Font_Format() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_Get_WinFNT_Header() +error_code FT_Get_WinFNT_Header() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_Glyph_Copy() +error_code FT_Glyph_Copy() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_Glyph_Get_CBox() +error_code FT_Glyph_Get_CBox() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_GlyphSlot_Own_Bitmap() +error_code FT_GlyphSlot_Own_Bitmap() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_Glyph_Stroke() +error_code FT_Glyph_Stroke() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_Glyph_StrokeBorder() +error_code FT_Glyph_StrokeBorder() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_Glyph_To_Bitmap() +error_code FT_Glyph_To_Bitmap() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_Glyph_Transform() +error_code FT_Glyph_Transform() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_Has_PS_Glyph_Names() +error_code FT_Has_PS_Glyph_Names() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_Init_FreeType() +error_code FT_Init_FreeType() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_Library_Version() +error_code FT_Library_Version() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_List_Add() +error_code FT_List_Add() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_List_Finalize() +error_code FT_List_Finalize() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_List_Find() +error_code FT_List_Find() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_List_Insert() +error_code FT_List_Insert() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_List_Iterate() +error_code FT_List_Iterate() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_List_Remove() +error_code FT_List_Remove() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_List_Up() +error_code FT_List_Up() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_Load_Char() +error_code FT_Load_Char() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_Load_Glyph() +error_code FT_Load_Glyph() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_Load_Sfnt_Table() +error_code FT_Load_Sfnt_Table() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_Matrix_Invert() +error_code FT_Matrix_Invert() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_Matrix_Multiply() +error_code FT_Matrix_Multiply() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_MulDiv() +error_code FT_MulDiv() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_MulFix() +error_code FT_MulFix() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_New_Face() +error_code FT_New_Face() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_New_Library() +error_code FT_New_Library() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_New_Memory() +error_code FT_New_Memory() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_New_Memory_Face() +error_code FT_New_Memory_Face() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_New_Size() +error_code FT_New_Size() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_Open_Face() +error_code FT_Open_Face() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_OpenType_Free() +error_code FT_OpenType_Free() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_OpenType_Validate() +error_code FT_OpenType_Validate() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_Outline_Check() +error_code FT_Outline_Check() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_Outline_Copy() +error_code FT_Outline_Copy() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_Outline_Decompose() +error_code FT_Outline_Decompose() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_Outline_Done() +error_code FT_Outline_Done() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_Outline_Embolden() +error_code FT_Outline_Embolden() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_Outline_Get_BBox() +error_code FT_Outline_Get_BBox() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_Outline_Get_Bitmap() +error_code FT_Outline_Get_Bitmap() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_Outline_Get_CBox() +error_code FT_Outline_Get_CBox() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_Outline_GetInsideBorder() +error_code FT_Outline_GetInsideBorder() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_Outline_Get_Orientation() +error_code FT_Outline_Get_Orientation() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_Outline_GetOutsideBorder() +error_code FT_Outline_GetOutsideBorder() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_Outline_New() +error_code FT_Outline_New() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_Outline_Render() +error_code FT_Outline_Render() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_Outline_Reverse() +error_code FT_Outline_Reverse() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_Outline_Transform() +error_code FT_Outline_Transform() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_Outline_Translate() +error_code FT_Outline_Translate() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_Realloc() +error_code FT_Realloc() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_Remove_Module() +error_code FT_Remove_Module() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_Render_Glyph() +error_code FT_Render_Glyph() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_Request_Size() +error_code FT_Request_Size() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_RoundFix() +error_code FT_RoundFix() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_Select_Charmap() +error_code FT_Select_Charmap() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_Select_Size() +error_code FT_Select_Size() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_Set_Charmap() +error_code FT_Set_Charmap() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_Set_Char_Size() +error_code FT_Set_Char_Size() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_Set_Debug_Hook() +error_code FT_Set_Debug_Hook() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_Set_MM_Blend_Coordinates() +error_code FT_Set_MM_Blend_Coordinates() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_Set_MM_Design_Coordinates() +error_code FT_Set_MM_Design_Coordinates() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_Set_Pixel_Sizes() +error_code FT_Set_Pixel_Sizes() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_Set_Renderer() +error_code FT_Set_Renderer() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_Set_Transform() +error_code FT_Set_Transform() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_Set_Var_Blend_Coordinates() +error_code FT_Set_Var_Blend_Coordinates() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_Set_Var_Design_Coordinates() +error_code FT_Set_Var_Design_Coordinates() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_Sfnt_Table_Info() +error_code FT_Sfnt_Table_Info() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_Sin() +error_code FT_Sin() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_Stream_OpenGzip() +error_code FT_Stream_OpenGzip() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_Stream_OpenLZW() +error_code FT_Stream_OpenLZW() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_Stroker_BeginSubPath() +error_code FT_Stroker_BeginSubPath() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_Stroker_ConicTo() +error_code FT_Stroker_ConicTo() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_Stroker_CubicTo() +error_code FT_Stroker_CubicTo() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_Stroker_Done() +error_code FT_Stroker_Done() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_Stroker_EndSubPath() +error_code FT_Stroker_EndSubPath() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_Stroker_Export() +error_code FT_Stroker_Export() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_Stroker_ExportBorder() +error_code FT_Stroker_ExportBorder() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_Stroker_GetBorderCounts() +error_code FT_Stroker_GetBorderCounts() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_Stroker_GetCounts() +error_code FT_Stroker_GetCounts() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_Stroker_LineTo() +error_code FT_Stroker_LineTo() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_Stroker_New() +error_code FT_Stroker_New() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_Stroker_ParseOutline() +error_code FT_Stroker_ParseOutline() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_Stroker_Rewind() +error_code FT_Stroker_Rewind() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_Stroker_Set() +error_code FT_Stroker_Set() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_Tan() +error_code FT_Tan() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_Vector_From_Polar() +error_code FT_Vector_From_Polar() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_Vector_Length() +error_code FT_Vector_Length() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_Vector_Polarize() +error_code FT_Vector_Polarize() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_Vector_Rotate() +error_code FT_Vector_Rotate() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_Vector_Transform() +error_code FT_Vector_Transform() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; } -s32 FT_Vector_Unit() +error_code FT_Vector_Unit() { UNIMPLEMENTED_FUNC(cell_FreeType2); return CELL_OK; diff --git a/rpcs3/Emu/Cell/Modules/libad_async.cpp b/rpcs3/Emu/Cell/Modules/libad_async.cpp index a008cc6e69..7fee0fd52f 100644 --- a/rpcs3/Emu/Cell/Modules/libad_async.cpp +++ b/rpcs3/Emu/Cell/Modules/libad_async.cpp @@ -1,39 +1,39 @@ -#include "stdafx.h" +#include "stdafx.h" #include "Emu/Cell/PPUModule.h" LOG_CHANNEL(libad_async); -s32 sceAdAsyncOpenContext() +error_code sceAdAsyncOpenContext() { UNIMPLEMENTED_FUNC(libad_async); return CELL_OK; } -s32 sceAdAsyncConnectContext() +error_code sceAdAsyncConnectContext() { UNIMPLEMENTED_FUNC(libad_async); return CELL_OK; } -s32 sceAdAsyncSpaceOpen() +error_code sceAdAsyncSpaceOpen() { UNIMPLEMENTED_FUNC(libad_async); return CELL_OK; } -s32 sceAdAsyncFlushReports() +error_code sceAdAsyncFlushReports() { UNIMPLEMENTED_FUNC(libad_async); return CELL_OK; } -s32 sceAdAsyncSpaceClose() +error_code sceAdAsyncSpaceClose() { UNIMPLEMENTED_FUNC(libad_async); return CELL_OK; } -s32 sceAdAsyncCloseContext() +error_code sceAdAsyncCloseContext() { UNIMPLEMENTED_FUNC(libad_async); return CELL_OK; diff --git a/rpcs3/Emu/Cell/Modules/libad_core.cpp b/rpcs3/Emu/Cell/Modules/libad_core.cpp index b7d4a8089b..96bad8c0cc 100644 --- a/rpcs3/Emu/Cell/Modules/libad_core.cpp +++ b/rpcs3/Emu/Cell/Modules/libad_core.cpp @@ -1,45 +1,45 @@ -#include "stdafx.h" +#include "stdafx.h" #include "Emu/Cell/PPUModule.h" LOG_CHANNEL(libad_core); -s32 sceAdOpenContext() +error_code sceAdOpenContext() { UNIMPLEMENTED_FUNC(libad_core); return CELL_OK; } -s32 sceAdFlushReports() +error_code sceAdFlushReports() { UNIMPLEMENTED_FUNC(libad_core); return CELL_OK; } -s32 sceAdGetAssetInfo() +error_code sceAdGetAssetInfo() { UNIMPLEMENTED_FUNC(libad_core); return CELL_OK; } -s32 sceAdCloseContext() +error_code sceAdCloseContext() { UNIMPLEMENTED_FUNC(libad_core); return CELL_OK; } -s32 sceAdGetSpaceInfo() +error_code sceAdGetSpaceInfo() { UNIMPLEMENTED_FUNC(libad_core); return CELL_OK; } -s32 sceAdGetConnectionInfo() +error_code sceAdGetConnectionInfo() { UNIMPLEMENTED_FUNC(libad_core); return CELL_OK; } -s32 sceAdConnectContext() +error_code sceAdConnectContext() { UNIMPLEMENTED_FUNC(libad_core); return CELL_OK; diff --git a/rpcs3/Emu/Cell/Modules/libmedi.cpp b/rpcs3/Emu/Cell/Modules/libmedi.cpp index b378512a41..471c32b744 100644 --- a/rpcs3/Emu/Cell/Modules/libmedi.cpp +++ b/rpcs3/Emu/Cell/Modules/libmedi.cpp @@ -3,61 +3,61 @@ LOG_CHANNEL(libmedi); -s32 cellMediatorCloseContext() +error_code cellMediatorCloseContext() { libmedi.todo("cellMediatorCloseContext"); return CELL_OK; } -s32 cellMediatorCreateContext() +error_code cellMediatorCreateContext() { libmedi.todo("cellMediatorCreateContext"); return CELL_OK; } -s32 cellMediatorFlushCache() +error_code cellMediatorFlushCache() { libmedi.todo("cellMediatorFlushCache"); return CELL_OK; } -s32 cellMediatorGetProviderUrl() +error_code cellMediatorGetProviderUrl() { libmedi.todo("cellMediatorGetProviderUrl"); return CELL_OK; } -s32 cellMediatorGetSignatureLength() +error_code cellMediatorGetSignatureLength() { libmedi.todo("cellMediatorGetSignatureLength"); return CELL_OK; } -s32 cellMediatorGetStatus() +error_code cellMediatorGetStatus() { libmedi.todo("cellMediatorGetStatus"); return CELL_OK; } -s32 cellMediatorGetUserInfo() +error_code cellMediatorGetUserInfo() { libmedi.todo("cellMediatorGetUserInfo"); return CELL_OK; } -s32 cellMediatorPostReports() +error_code cellMediatorPostReports() { libmedi.todo("cellMediatorPostReports"); return CELL_OK; } -s32 cellMediatorReliablePostReports() +error_code cellMediatorReliablePostReports() { libmedi.todo("cellMediatorReliablePostReports"); return CELL_OK; } -s32 cellMediatorSign() +error_code cellMediatorSign() { libmedi.todo("cellMediatorSign"); return CELL_OK; diff --git a/rpcs3/Emu/Cell/Modules/libmixer.cpp b/rpcs3/Emu/Cell/Modules/libmixer.cpp index a72e87208e..c6bc43d04b 100644 --- a/rpcs3/Emu/Cell/Modules/libmixer.cpp +++ b/rpcs3/Emu/Cell/Modules/libmixer.cpp @@ -11,6 +11,27 @@ LOG_CHANNEL(libmixer); +template<> +void fmt_class_string::format(std::string& out, u64 arg) +{ + format_enum(out, arg, [](auto error) + { + switch (error) + { + STR_CASE(CELL_LIBMIXER_ERROR_NOT_INITIALIZED); + STR_CASE(CELL_LIBMIXER_ERROR_INVALID_PARAMATER); + STR_CASE(CELL_LIBMIXER_ERROR_NO_MEMORY); + STR_CASE(CELL_LIBMIXER_ERROR_ALREADY_EXIST); + STR_CASE(CELL_LIBMIXER_ERROR_FULL); + STR_CASE(CELL_LIBMIXER_ERROR_NOT_EXIST); + STR_CASE(CELL_LIBMIXER_ERROR_TYPE_MISMATCH); + STR_CASE(CELL_LIBMIXER_ERROR_NOT_FOUND); + } + + return unknown; + }); +} + struct SurMixerConfig { std::mutex mutex; diff --git a/rpcs3/Emu/Cell/Modules/libmixer.h b/rpcs3/Emu/Cell/Modules/libmixer.h index a12301c65c..ecb8e50ea4 100644 --- a/rpcs3/Emu/Cell/Modules/libmixer.h +++ b/rpcs3/Emu/Cell/Modules/libmixer.h @@ -1,9 +1,9 @@ -#pragma once +#pragma once #include "Emu/Memory/vm_ptr.h" // Error Codes -enum +enum CellLibmixerError : u32 { CELL_LIBMIXER_ERROR_NOT_INITIALIZED = 0x80310002, CELL_LIBMIXER_ERROR_INVALID_PARAMATER = 0x80310003, diff --git a/rpcs3/Emu/Cell/Modules/libsnd3.cpp b/rpcs3/Emu/Cell/Modules/libsnd3.cpp index 6521f57fa0..0e0e11f29e 100644 --- a/rpcs3/Emu/Cell/Modules/libsnd3.cpp +++ b/rpcs3/Emu/Cell/Modules/libsnd3.cpp @@ -1,17 +1,46 @@ -#include "stdafx.h" +#include "stdafx.h" #include "Emu/Cell/PPUModule.h" #include "libsnd3.h" LOG_CHANNEL(libsnd3); -s32 cellSnd3Init(u32 maxVoice, u32 samples, vm::ptr queue) +template<> +void fmt_class_string::format(std::string& out, u64 arg) +{ + format_enum(out, arg, [](auto error) + { + switch (error) + { + STR_CASE(CELL_SND3_ERROR_PARAM); + STR_CASE(CELL_SND3_ERROR_CREATE_MUTEX); + STR_CASE(CELL_SND3_ERROR_SYNTH); + STR_CASE(CELL_SND3_ERROR_ALREADY); + STR_CASE(CELL_SND3_ERROR_NOTINIT); + STR_CASE(CELL_SND3_ERROR_SMFFULL); + STR_CASE(CELL_SND3_ERROR_HD3ID); + STR_CASE(CELL_SND3_ERROR_SMF); + STR_CASE(CELL_SND3_ERROR_SMFCTX); + STR_CASE(CELL_SND3_ERROR_FORMAT); + STR_CASE(CELL_SND3_ERROR_SMFID); + STR_CASE(CELL_SND3_ERROR_SOUNDDATAFULL); + STR_CASE(CELL_SND3_ERROR_VOICENUM); + STR_CASE(CELL_SND3_ERROR_RESERVEDVOICE); + STR_CASE(CELL_SND3_ERROR_REQUESTQUEFULL); + STR_CASE(CELL_SND3_ERROR_OUTPUTMODE); + } + + return unknown; + }); +} + +error_code cellSnd3Init(u32 maxVoice, u32 samples, vm::ptr queue) { UNIMPLEMENTED_FUNC(libsnd3); return CELL_OK; } -s32 cellSnd3Exit() +error_code cellSnd3Exit() { UNIMPLEMENTED_FUNC(libsnd3); return CELL_OK; @@ -29,121 +58,121 @@ u16 cellSnd3Pitch2Note(u16 center_note, u16 center_fine, u16 pitch) return 0; } -s32 cellSnd3SetOutputMode(u32 mode) +error_code cellSnd3SetOutputMode(u32 mode) { UNIMPLEMENTED_FUNC(libsnd3); return CELL_OK; } -s32 cellSnd3Synthesis(vm::ptr pOutL, vm::ptr pOutR) +error_code cellSnd3Synthesis(vm::ptr pOutL, vm::ptr pOutR) { UNIMPLEMENTED_FUNC(libsnd3); return CELL_OK; } -s32 cellSnd3SynthesisEx(vm::ptr pOutL, vm::ptr pOutR, vm::ptr pOutRL, vm::ptr pOutRR) +error_code cellSnd3SynthesisEx(vm::ptr pOutL, vm::ptr pOutR, vm::ptr pOutRL, vm::ptr pOutRR) { UNIMPLEMENTED_FUNC(libsnd3); return CELL_OK; } -s32 cellSnd3BindSoundData(vm::ptr snd3Ctx, vm::ptr hd3, u32 synthMemOffset) +error_code cellSnd3BindSoundData(vm::ptr snd3Ctx, vm::ptr hd3, u32 synthMemOffset) { UNIMPLEMENTED_FUNC(libsnd3); return CELL_OK; } -s32 cellSnd3UnbindSoundData(u32 hd3ID) +error_code cellSnd3UnbindSoundData(u32 hd3ID) { UNIMPLEMENTED_FUNC(libsnd3); return CELL_OK; } -s32 cellSnd3NoteOnByTone(u32 hd3ID, u32 toneIndex, u32 note, u32 keyOnID, vm::ptr keyOnParam) +error_code cellSnd3NoteOnByTone(u32 hd3ID, u32 toneIndex, u32 note, u32 keyOnID, vm::ptr keyOnParam) { libsnd3.todo("cellSnd3NoteOnByTone()"); return CELL_OK; } -s32 cellSnd3KeyOnByTone(u32 hd3ID, u32 toneIndex, u32 pitch, u32 keyOnID, vm::ptr keyOnParam) +error_code cellSnd3KeyOnByTone(u32 hd3ID, u32 toneIndex, u32 pitch, u32 keyOnID, vm::ptr keyOnParam) { libsnd3.todo("cellSnd3KeyOnByTone()"); return CELL_OK; } -s32 cellSnd3VoiceNoteOnByTone(u32 hd3ID, u32 voiceNum, u32 toneIndex, u32 note, u32 keyOnID, vm::ptr keyOnParam) +error_code cellSnd3VoiceNoteOnByTone(u32 hd3ID, u32 voiceNum, u32 toneIndex, u32 note, u32 keyOnID, vm::ptr keyOnParam) { libsnd3.todo("cellSnd3VoiceNoteOnByTone()"); return CELL_OK; } -s32 cellSnd3VoiceKeyOnByTone(u32 hd3ID, u32 voiceNum, u32 toneIndex, u32 pitch, u32 keyOnID, vm::ptr keyOnParam) +error_code cellSnd3VoiceKeyOnByTone(u32 hd3ID, u32 voiceNum, u32 toneIndex, u32 pitch, u32 keyOnID, vm::ptr keyOnParam) { libsnd3.todo("cellSnd3VoiceKeyOnByTone()"); return CELL_OK; } -s32 cellSnd3VoiceSetReserveMode(u32 voiceNum, u32 reserveMode) +error_code cellSnd3VoiceSetReserveMode(u32 voiceNum, u32 reserveMode) { UNIMPLEMENTED_FUNC(libsnd3); return CELL_OK; } -s32 cellSnd3VoiceSetSustainHold(u32 voiceNum, u32 sustainHold) +error_code cellSnd3VoiceSetSustainHold(u32 voiceNum, u32 sustainHold) { UNIMPLEMENTED_FUNC(libsnd3); return CELL_OK; } -s32 cellSnd3VoiceKeyOff(u32 voiceNum) +error_code cellSnd3VoiceKeyOff(u32 voiceNum) { UNIMPLEMENTED_FUNC(libsnd3); return CELL_OK; } -s32 cellSnd3VoiceSetPitch(u32 voiceNum, s32 addPitch) +error_code cellSnd3VoiceSetPitch(u32 voiceNum, s32 addPitch) { UNIMPLEMENTED_FUNC(libsnd3); return CELL_OK; } -s32 cellSnd3VoiceSetVelocity(u32 voiceNum, u32 velocity) +error_code cellSnd3VoiceSetVelocity(u32 voiceNum, u32 velocity) { UNIMPLEMENTED_FUNC(libsnd3); return CELL_OK; } -s32 cellSnd3VoiceSetPanpot(u32 voiceNum, u32 panpot) +error_code cellSnd3VoiceSetPanpot(u32 voiceNum, u32 panpot) { UNIMPLEMENTED_FUNC(libsnd3); return CELL_OK; } -s32 cellSnd3VoiceSetPanpotEx(u32 voiceNum, u32 panpotEx) +error_code cellSnd3VoiceSetPanpotEx(u32 voiceNum, u32 panpotEx) { UNIMPLEMENTED_FUNC(libsnd3); return CELL_OK; } -s32 cellSnd3VoiceSetPitchBend(u32 voiceNum, u32 bendValue) +error_code cellSnd3VoiceSetPitchBend(u32 voiceNum, u32 bendValue) { UNIMPLEMENTED_FUNC(libsnd3); return CELL_OK; } -s32 cellSnd3VoiceAllKeyOff() +error_code cellSnd3VoiceAllKeyOff() { UNIMPLEMENTED_FUNC(libsnd3); return CELL_OK; } -s32 cellSnd3VoiceGetEnvelope(u32 voiceNum) +error_code cellSnd3VoiceGetEnvelope(u32 voiceNum) { UNIMPLEMENTED_FUNC(libsnd3); return CELL_OK; } -s32 cellSnd3VoiceGetStatus(u32 voiceNum) +error_code cellSnd3VoiceGetStatus(u32 voiceNum) { libsnd3.todo("cellSnd3VoiceGetStatus()"); return CELL_OK; @@ -155,151 +184,151 @@ u32 cellSnd3KeyOffByID(u32 keyOnID) return CELL_OK; } -s32 cellSnd3GetVoice(u32 midiChannel, u32 keyOnID, vm::ptr voiceBit) +error_code cellSnd3GetVoice(u32 midiChannel, u32 keyOnID, vm::ptr voiceBit) { UNIMPLEMENTED_FUNC(libsnd3); return CELL_OK; } -s32 cellSnd3GetVoiceByID(u32 ID, vm::ptr voiceBit) +error_code cellSnd3GetVoiceByID(u32 ID, vm::ptr voiceBit) { UNIMPLEMENTED_FUNC(libsnd3); return CELL_OK; } -s32 cellSnd3NoteOn(u32 hd3ID, u32 midiChannel, u32 midiProgram, u32 midiNote, u32 sustain, vm::ptr keyOnParam, u32 keyOnID) +error_code cellSnd3NoteOn(u32 hd3ID, u32 midiChannel, u32 midiProgram, u32 midiNote, u32 sustain, vm::ptr keyOnParam, u32 keyOnID) { UNIMPLEMENTED_FUNC(libsnd3); return CELL_OK; } -s32 cellSnd3NoteOff(u32 midiChannel, u32 midiNote, u32 keyOnID) +error_code cellSnd3NoteOff(u32 midiChannel, u32 midiNote, u32 keyOnID) { UNIMPLEMENTED_FUNC(libsnd3); return CELL_OK; } -s32 cellSnd3SetSustainHold(u32 midiChannel, u32 sustainHold, u32 keyOnID) +error_code cellSnd3SetSustainHold(u32 midiChannel, u32 sustainHold, u32 keyOnID) { UNIMPLEMENTED_FUNC(libsnd3); return CELL_OK; } -s32 cellSnd3SetEffectType(u16 effectType, s16 returnVol, u16 delay, u16 feedback) +error_code cellSnd3SetEffectType(u16 effectType, s16 returnVol, u16 delay, u16 feedback) { UNIMPLEMENTED_FUNC(libsnd3); return CELL_OK; } -s32 cellSnd3SMFBind(vm::ptr smfCtx, vm::ptr smf, u32 hd3ID) +error_code cellSnd3SMFBind(vm::ptr smfCtx, vm::ptr smf, u32 hd3ID) { libsnd3.todo("cellSnd3SMFBind()"); return CELL_OK; } -s32 cellSnd3SMFUnbind(u32 smfID) +error_code cellSnd3SMFUnbind(u32 smfID) { libsnd3.todo("cellSnd3SMFUnbind()"); return CELL_OK; } -s32 cellSnd3SMFPlay(u32 smfID, u32 playVelocity, u32 playPan, u32 playCount) +error_code cellSnd3SMFPlay(u32 smfID, u32 playVelocity, u32 playPan, u32 playCount) { UNIMPLEMENTED_FUNC(libsnd3); return CELL_OK; } -s32 cellSnd3SMFPlayEx(u32 smfID, u32 playVelocity, u32 playPan, u32 playPanEx, u32 playCount) +error_code cellSnd3SMFPlayEx(u32 smfID, u32 playVelocity, u32 playPan, u32 playPanEx, u32 playCount) { UNIMPLEMENTED_FUNC(libsnd3); return CELL_OK; } -s32 cellSnd3SMFPause(u32 smfID) +error_code cellSnd3SMFPause(u32 smfID) { UNIMPLEMENTED_FUNC(libsnd3); return CELL_OK; } -s32 cellSnd3SMFResume(u32 smfID) +error_code cellSnd3SMFResume(u32 smfID) { UNIMPLEMENTED_FUNC(libsnd3); return CELL_OK; } -s32 cellSnd3SMFStop(u32 smfID) +error_code cellSnd3SMFStop(u32 smfID) { UNIMPLEMENTED_FUNC(libsnd3); return CELL_OK; } -s32 cellSnd3SMFAddTempo(u32 smfID, s32 addTempo) +error_code cellSnd3SMFAddTempo(u32 smfID, s32 addTempo) { UNIMPLEMENTED_FUNC(libsnd3); return CELL_OK; } -s32 cellSnd3SMFGetTempo(u32 smfID) +error_code cellSnd3SMFGetTempo(u32 smfID) { libsnd3.todo("cellSnd3SMFGetTempo()"); return CELL_OK; } -s32 cellSnd3SMFSetPlayVelocity(u32 smfID, u32 playVelocity) +error_code cellSnd3SMFSetPlayVelocity(u32 smfID, u32 playVelocity) { UNIMPLEMENTED_FUNC(libsnd3); return CELL_OK; } -s32 cellSnd3SMFGetPlayVelocity(u32 smfID) +error_code cellSnd3SMFGetPlayVelocity(u32 smfID) { libsnd3.todo("cellSnd3SMFGetPlayVelocity()"); return CELL_OK; } -s32 cellSnd3SMFSetPlayPanpot(u32 smfID, u32 playPanpot) +error_code cellSnd3SMFSetPlayPanpot(u32 smfID, u32 playPanpot) { UNIMPLEMENTED_FUNC(libsnd3); return CELL_OK; } -s32 cellSnd3SMFSetPlayPanpotEx(u32 smfID, u32 playPanpotEx) +error_code cellSnd3SMFSetPlayPanpotEx(u32 smfID, u32 playPanpotEx) { UNIMPLEMENTED_FUNC(libsnd3); return CELL_OK; } -s32 cellSnd3SMFGetPlayPanpot(u32 smfID) +error_code cellSnd3SMFGetPlayPanpot(u32 smfID) { libsnd3.todo("cellSnd3SMFGetPlayPanpot()"); return CELL_OK; } -s32 cellSnd3SMFGetPlayPanpotEx(u32 smfID) +error_code cellSnd3SMFGetPlayPanpotEx(u32 smfID) { libsnd3.todo("cellSnd3SMFGetPlayPanpotEx()"); return CELL_OK; } -s32 cellSnd3SMFGetPlayStatus(u32 smfID) +error_code cellSnd3SMFGetPlayStatus(u32 smfID) { libsnd3.todo("cellSnd3SMFGetPlayStatus()"); return CELL_OK; } -s32 cellSnd3SMFSetPlayChannel(u32 smfID, u32 playChannelBit) +error_code cellSnd3SMFSetPlayChannel(u32 smfID, u32 playChannelBit) { UNIMPLEMENTED_FUNC(libsnd3); return CELL_OK; } -s32 cellSnd3SMFGetPlayChannel(u32 smfID, vm::ptr playChannelBit) +error_code cellSnd3SMFGetPlayChannel(u32 smfID, vm::ptr playChannelBit) { libsnd3.todo("cellSnd3SMFGetPlayChannel()"); return CELL_OK; } -s32 cellSnd3SMFGetKeyOnID(u32 smfID, u32 midiChannel, vm::ptr keyOnID) +error_code cellSnd3SMFGetKeyOnID(u32 smfID, u32 midiChannel, vm::ptr keyOnID) { UNIMPLEMENTED_FUNC(libsnd3); return CELL_OK; diff --git a/rpcs3/Emu/Cell/Modules/libsnd3.h b/rpcs3/Emu/Cell/Modules/libsnd3.h index ea296d8162..9ef3a2d428 100644 --- a/rpcs3/Emu/Cell/Modules/libsnd3.h +++ b/rpcs3/Emu/Cell/Modules/libsnd3.h @@ -1,26 +1,26 @@ -#pragma once +#pragma once #include "Emu/Memory/vm_ptr.h" // Error Codes -enum +enum CellSnd3Error : u32 { - CELL_SND3_ERROR_PARAM = 0x80310301, - CELL_SND3_ERROR_CREATE_MUTEX = 0x80310302, - CELL_SND3_ERROR_SYNTH = 0x80310303, - CELL_SND3_ERROR_ALREADY = 0x80310304, - CELL_SND3_ERROR_NOTINIT = 0x80310305, - CELL_SND3_ERROR_SMFFULL = 0x80310306, - CELL_SND3_ERROR_HD3ID = 0x80310307, - CELL_SND3_ERROR_SMF = 0x80310308, - CELL_SND3_ERROR_SMFCTX = 0x80310309, - CELL_SND3_ERROR_FORMAT = 0x8031030a, - CELL_SND3_ERROR_SMFID = 0x8031030b, - CELL_SND3_ERROR_SOUNDDATAFULL = 0x8031030c, - CELL_SND3_ERROR_VOICENUM = 0x8031030d, - CELL_SND3_ERROR_RESERVEDVOICE = 0x8031030e, + CELL_SND3_ERROR_PARAM = 0x80310301, + CELL_SND3_ERROR_CREATE_MUTEX = 0x80310302, + CELL_SND3_ERROR_SYNTH = 0x80310303, + CELL_SND3_ERROR_ALREADY = 0x80310304, + CELL_SND3_ERROR_NOTINIT = 0x80310305, + CELL_SND3_ERROR_SMFFULL = 0x80310306, + CELL_SND3_ERROR_HD3ID = 0x80310307, + CELL_SND3_ERROR_SMF = 0x80310308, + CELL_SND3_ERROR_SMFCTX = 0x80310309, + CELL_SND3_ERROR_FORMAT = 0x8031030a, + CELL_SND3_ERROR_SMFID = 0x8031030b, + CELL_SND3_ERROR_SOUNDDATAFULL = 0x8031030c, + CELL_SND3_ERROR_VOICENUM = 0x8031030d, + CELL_SND3_ERROR_RESERVEDVOICE = 0x8031030e, CELL_SND3_ERROR_REQUESTQUEFULL = 0x8031030f, - CELL_SND3_ERROR_OUTPUTMODE = 0x80310310, + CELL_SND3_ERROR_OUTPUTMODE = 0x80310310, }; struct CellSnd3KeyOnParam diff --git a/rpcs3/Emu/Cell/Modules/libsynth2.cpp b/rpcs3/Emu/Cell/Modules/libsynth2.cpp index bfaae44fae..03314aeaed 100644 --- a/rpcs3/Emu/Cell/Modules/libsynth2.cpp +++ b/rpcs3/Emu/Cell/Modules/libsynth2.cpp @@ -1,4 +1,4 @@ -#include "stdafx.h" +#include "stdafx.h" #include "Emu/Cell/PPUModule.h" #include "libsynth2.h" @@ -7,19 +7,35 @@ LOG_CHANNEL(libsynth2); -s32 cellSoundSynth2Config(s16 param, s32 value) +template<> +void fmt_class_string::format(std::string& out, u64 arg) +{ + format_enum(out, arg, [](auto error) + { + switch (error) + { + STR_CASE(CELL_SOUND_SYNTH2_ERROR_FATAL); + STR_CASE(CELL_SOUND_SYNTH2_ERROR_INVALID_PARAMETER); + STR_CASE(CELL_SOUND_SYNTH2_ERROR_ALREADY_INITIALIZED); + } + + return unknown; + }); +} + +error_code cellSoundSynth2Config(s16 param, s32 value) { libsynth2.todo("cellSoundSynth2Config(param=%d, value=%d)", param, value); return CELL_OK; } -s32 cellSoundSynth2Init(s16 flag) +error_code cellSoundSynth2Init(s16 flag) { libsynth2.todo("cellSoundSynth2Init(flag=%d)", flag); return CELL_OK; } -s32 cellSoundSynth2Exit() +error_code cellSoundSynth2Exit() { libsynth2.todo("cellSoundSynth2Exit()"); return CELL_OK; @@ -47,7 +63,7 @@ u32 cellSoundSynth2GetSwitch(u16 reg) return 0; } -s32 cellSoundSynth2SetAddr(u16 reg, u32 value) +error_code cellSoundSynth2SetAddr(u16 reg, u32 value) { libsynth2.todo("cellSoundSynth2SetAddr(register=0x%x, value=0x%x)", reg, value); return CELL_OK; @@ -59,13 +75,13 @@ u32 cellSoundSynth2GetAddr(u16 reg) return 0; } -s32 cellSoundSynth2SetEffectAttr(s16 bus, vm::ptr attr) +error_code cellSoundSynth2SetEffectAttr(s16 bus, vm::ptr attr) { libsynth2.todo("cellSoundSynth2SetEffectAttr(bus=%d, attr=*0x%x)", bus, attr); return CELL_OK; } -s32 cellSoundSynth2SetEffectMode(s16 bus, vm::ptr attr) +error_code cellSoundSynth2SetEffectMode(s16 bus, vm::ptr attr) { libsynth2.todo("cellSoundSynth2SetEffectMode(bus=%d, attr=*0x%x)", bus, attr); return CELL_OK; @@ -76,19 +92,19 @@ void cellSoundSynth2SetCoreAttr(u16 entry, u16 value) libsynth2.todo("cellSoundSynth2SetCoreAttr(entry=0x%x, value=0x%x)", entry, value); } -s32 cellSoundSynth2Generate(u16 samples, vm::ptr Lout, vm::ptr Rout, vm::ptr Ls, vm::ptr Rs) +error_code cellSoundSynth2Generate(u16 samples, vm::ptr Lout, vm::ptr Rout, vm::ptr Ls, vm::ptr Rs) { libsynth2.todo("cellSoundSynth2Generate(samples=0x%x, Lout=*0x%x, Rout=*0x%x, Ls=*0x%x, Rs=*0x%x)", samples, Lout, Rout, Ls, Rs); return CELL_OK; } -s32 cellSoundSynth2VoiceTrans(s16 channel, u16 mode, vm::ptr m_addr, u32 s_addr, u32 size) +error_code cellSoundSynth2VoiceTrans(s16 channel, u16 mode, vm::ptr m_addr, u32 s_addr, u32 size) { libsynth2.todo("cellSoundSynth2VoiceTrans(channel=%d, mode=0x%x, m_addr=*0x%x, s_addr=0x%x, size=0x%x)", channel, mode, m_addr, s_addr, size); return CELL_OK; } -s32 cellSoundSynth2VoiceTransStatus(s16 channel, s16 flag) +error_code cellSoundSynth2VoiceTransStatus(s16 channel, s16 flag) { libsynth2.todo("cellSoundSynth2VoiceTransStatus(channel=%d, flag=%d)", channel, flag); return CELL_OK; diff --git a/rpcs3/Emu/Cell/Modules/libsynth2.h b/rpcs3/Emu/Cell/Modules/libsynth2.h index fe00ee3bcf..60c2459baa 100644 --- a/rpcs3/Emu/Cell/Modules/libsynth2.h +++ b/rpcs3/Emu/Cell/Modules/libsynth2.h @@ -1,9 +1,9 @@ -#pragma once +#pragma once #include "Utilities/BEType.h" // Error Codes -enum +enum CellSoundSynth2Error : u32 { CELL_SOUND_SYNTH2_ERROR_FATAL = 0x80310201, CELL_SOUND_SYNTH2_ERROR_INVALID_PARAMETER = 0x80310202, diff --git a/rpcs3/Emu/Cell/Modules/sceNpMatchingInt.cpp b/rpcs3/Emu/Cell/Modules/sceNpMatchingInt.cpp index 34e1be1359..3c5a1b6b08 100644 --- a/rpcs3/Emu/Cell/Modules/sceNpMatchingInt.cpp +++ b/rpcs3/Emu/Cell/Modules/sceNpMatchingInt.cpp @@ -1,21 +1,21 @@ -#include "stdafx.h" +#include "stdafx.h" #include "Emu/Cell/PPUModule.h" LOG_CHANNEL(sceNpMatchingInt); -s32 sceNpMatchingCancelRequest() +error_code sceNpMatchingCancelRequest() { UNIMPLEMENTED_FUNC(sceNpMatchingInt); return CELL_OK; } -s32 sceNpMatchingGetRoomMemberList() +error_code sceNpMatchingGetRoomMemberList() { UNIMPLEMENTED_FUNC(sceNpMatchingInt); return CELL_OK; } -s32 sceNpMatchingJoinRoomWithoutGUI() +error_code sceNpMatchingJoinRoomWithoutGUI() { UNIMPLEMENTED_FUNC(sceNpMatchingInt); return CELL_OK; @@ -23,49 +23,49 @@ s32 sceNpMatchingJoinRoomWithoutGUI() // Parameter "unknown" added to distinguish this function // from the one in sceNp.cpp which has the same name -s32 sceNpMatchingJoinRoomGUI(vm::ptr unknown) +error_code sceNpMatchingJoinRoomGUI(vm::ptr unknown) { UNIMPLEMENTED_FUNC(sceNpMatchingInt); return CELL_OK; } -s32 sceNpMatchingSetRoomInfoNoLimit(vm::ptr unknown) +error_code sceNpMatchingSetRoomInfoNoLimit(vm::ptr unknown) { UNIMPLEMENTED_FUNC(sceNpMatchingInt); return CELL_OK; } -s32 sceNpMatchingGetRoomListWithoutGUI() +error_code sceNpMatchingGetRoomListWithoutGUI() { UNIMPLEMENTED_FUNC(sceNpMatchingInt); return CELL_OK; } -s32 sceNpMatchingGetRoomListGUI() +error_code sceNpMatchingGetRoomListGUI() { UNIMPLEMENTED_FUNC(sceNpMatchingInt); return CELL_OK; } -s32 sceNpMatchingGetRoomInfoNoLimit(vm::ptr unknown) +error_code sceNpMatchingGetRoomInfoNoLimit(vm::ptr unknown) { UNIMPLEMENTED_FUNC(sceNpMatchingInt); return CELL_OK; } -s32 sceNpMatchingCancelRequestGUI() +error_code sceNpMatchingCancelRequestGUI() { UNIMPLEMENTED_FUNC(sceNpMatchingInt); return CELL_OK; } -s32 sceNpMatchingSendRoomMessage() +error_code sceNpMatchingSendRoomMessage() { UNIMPLEMENTED_FUNC(sceNpMatchingInt); return CELL_OK; } -s32 sceNpMatchingCreateRoomWithoutGUI() +error_code sceNpMatchingCreateRoomWithoutGUI() { UNIMPLEMENTED_FUNC(sceNpMatchingInt); return CELL_OK; diff --git a/rpcs3/Emu/Cell/Modules/sysPrxForUser.cpp b/rpcs3/Emu/Cell/Modules/sysPrxForUser.cpp index 53f58da1f8..52d6dd9ab9 100644 --- a/rpcs3/Emu/Cell/Modules/sysPrxForUser.cpp +++ b/rpcs3/Emu/Cell/Modules/sysPrxForUser.cpp @@ -62,7 +62,7 @@ s32 sys_process_is_stack(u32 p) return (p >> 28) == 0xD; } -s32 sys_process_get_paramsfo(vm::ptr buffer) +error_code sys_process_get_paramsfo(vm::ptr buffer) { sysPrxForUser.warning("sys_process_get_paramsfo(buffer=*0x%x)", buffer); @@ -70,7 +70,7 @@ s32 sys_process_get_paramsfo(vm::ptr buffer) return _sys_process_get_paramsfo(buffer); } -s32 sys_get_random_number(vm::ptr addr, u64 size) +error_code sys_get_random_number(vm::ptr addr, u64 size) { sysPrxForUser.warning("sys_get_random_number(addr=*0x%x, size=%d)", addr, size); @@ -90,7 +90,7 @@ s32 sys_get_random_number(vm::ptr addr, u64 size) return CELL_OK; } -s32 console_getc() +error_code console_getc() { sysPrxForUser.todo("console_getc()"); return CELL_OK; @@ -109,37 +109,37 @@ error_code console_write(vm::ptr data, u32 len) return CELL_OK; } -s32 cellGamePs1Emu_61CE2BCD() +error_code cellGamePs1Emu_61CE2BCD() { UNIMPLEMENTED_FUNC(sysPrxForUser); return CELL_OK; } -s32 cellSysconfPs1emu_639ABBDE() +error_code cellSysconfPs1emu_639ABBDE() { UNIMPLEMENTED_FUNC(sysPrxForUser); return CELL_OK; } -s32 cellSysconfPs1emu_6A12D11F() +error_code cellSysconfPs1emu_6A12D11F() { UNIMPLEMENTED_FUNC(sysPrxForUser); return CELL_OK; } -s32 cellSysconfPs1emu_83E79A23() +error_code cellSysconfPs1emu_83E79A23() { UNIMPLEMENTED_FUNC(sysPrxForUser); return CELL_OK; } -s32 cellSysconfPs1emu_EFDDAF6C() +error_code cellSysconfPs1emu_EFDDAF6C() { UNIMPLEMENTED_FUNC(sysPrxForUser); return CELL_OK; } -s32 sys_lv2coredump_D725F320() +error_code sys_lv2coredump_D725F320() { fmt::raw_error(__func__); } @@ -168,25 +168,25 @@ error_code sys_crash_dump_set_user_log_area(u8 index, vm::ptr path, vm::cpptr return exitspawn(ppu, path, argv, envp, data, data_size, prio, (flags >> 62) >= 2 ? flags & 0xf0 : flags & 0xc0000000000000f0ull); } -s32 sys_game_board_storage_read() +error_code sys_game_board_storage_read() { sysPrxForUser.todo("sys_game_board_storage_read()"); return CELL_OK; } -s32 sys_game_board_storage_write() +error_code sys_game_board_storage_write() { sysPrxForUser.todo("sys_game_board_storage_write()"); return CELL_OK; } -s32 sys_game_get_rtc_status() +error_code sys_game_get_rtc_status() { sysPrxForUser.todo("sys_game_get_rtc_status()"); return CELL_OK; } -s32 sys_game_get_system_sw_version() +error_code sys_game_get_system_sw_version() { sysPrxForUser.todo("sys_game_get_system_sw_version()"); return CELL_OK; } -s32 sys_game_get_temperature() +error_code sys_game_get_temperature() { sysPrxForUser.todo("sys_game_get_temperature()"); return CELL_OK; } -s32 sys_game_watchdog_clear() +error_code sys_game_watchdog_clear() { sysPrxForUser.todo("sys_game_watchdog_clear()"); return CELL_OK; } -s32 sys_game_watchdog_start() +error_code sys_game_watchdog_start() { sysPrxForUser.todo("sys_game_watchdog_start()"); return CELL_OK; } -s32 sys_game_watchdog_stop() +error_code sys_game_watchdog_stop() { sysPrxForUser.todo("sys_game_watchdog_stop()"); return CELL_OK; diff --git a/rpcs3/Emu/Cell/Modules/sys_heap.cpp b/rpcs3/Emu/Cell/Modules/sys_heap.cpp index b5f73bf3ea..a1945e8f74 100644 --- a/rpcs3/Emu/Cell/Modules/sys_heap.cpp +++ b/rpcs3/Emu/Cell/Modules/sys_heap.cpp @@ -27,7 +27,7 @@ u32 _sys_heap_create_heap(vm::cptr name, u32 arg2, u32 arg3, u32 arg4) return idm::make(name.get_ptr()); } -s32 _sys_heap_delete_heap(u32 heap) +error_code _sys_heap_delete_heap(u32 heap) { sysPrxForUser.warning("_sys_heap_delete_heap(heap=0x%x)", heap); @@ -50,7 +50,7 @@ u32 _sys_heap_memalign(u32 heap, u32 align, u32 size) return vm::alloc(size, vm::main, std::max(align, 0x10000)); } -s32 _sys_heap_free(u32 heap, u32 addr) +error_code _sys_heap_free(u32 heap, u32 addr) { sysPrxForUser.warning("_sys_heap_free(heap=0x%x, addr=0x%x)", heap, addr); @@ -59,25 +59,25 @@ s32 _sys_heap_free(u32 heap, u32 addr) return CELL_OK; } -s32 _sys_heap_alloc_heap_memory() +error_code _sys_heap_alloc_heap_memory() { sysPrxForUser.todo("_sys_heap_alloc_heap_memory()"); return CELL_OK; } -s32 _sys_heap_get_mallinfo() +error_code _sys_heap_get_mallinfo() { sysPrxForUser.todo("_sys_heap_get_mallinfo()"); return CELL_OK; } -s32 _sys_heap_get_total_free_size() +error_code _sys_heap_get_total_free_size() { sysPrxForUser.todo("_sys_heap_get_total_free_size()"); return CELL_OK; } -s32 _sys_heap_stats() +error_code _sys_heap_stats() { sysPrxForUser.todo("_sys_heap_stats()"); return CELL_OK; diff --git a/rpcs3/Emu/Cell/Modules/sys_io_.cpp b/rpcs3/Emu/Cell/Modules/sys_io_.cpp index acf9f19af8..6dd88ec91d 100644 --- a/rpcs3/Emu/Cell/Modules/sys_io_.cpp +++ b/rpcs3/Emu/Cell/Modules/sys_io_.cpp @@ -8,49 +8,49 @@ extern void cellKb_init(); extern void cellMouse_init(); -s32 sys_config_start() +error_code sys_config_start() { sys_io.todo("sys_config_start()"); return CELL_OK; } -s32 sys_config_stop() +error_code sys_config_stop() { sys_io.todo("sys_config_stop()"); return CELL_OK; } -s32 sys_config_add_service_listener() +error_code sys_config_add_service_listener() { sys_io.todo("sys_config_add_service_listener()"); return CELL_OK; } -s32 sys_config_remove_service_listener() +error_code sys_config_remove_service_listener() { sys_io.todo("sys_config_remove_service_listener()"); return CELL_OK; } -s32 sys_config_register_io_error_handler() +error_code sys_config_register_io_error_handler() { sys_io.todo("sys_config_register_io_error_handler()"); return CELL_OK; } -s32 sys_config_register_service() +error_code sys_config_register_service() { sys_io.todo("sys_config_register_service()"); return CELL_OK; } -s32 sys_config_unregister_io_error_handler() +error_code sys_config_unregister_io_error_handler() { sys_io.todo("sys_config_unregister_io_error_handler()"); return CELL_OK; } -s32 sys_config_unregister_service() +error_code sys_config_unregister_service() { sys_io.todo("sys_config_unregister_service()"); return CELL_OK; diff --git a/rpcs3/Emu/Cell/Modules/sys_libc_.cpp b/rpcs3/Emu/Cell/Modules/sys_libc_.cpp index efa562c320..4940cf53b5 100644 --- a/rpcs3/Emu/Cell/Modules/sys_libc_.cpp +++ b/rpcs3/Emu/Cell/Modules/sys_libc_.cpp @@ -1,4 +1,4 @@ -#include "stdafx.h" +#include "stdafx.h" #include "Emu/Cell/lv2/sys_tty.h" #include "Emu/Cell/PPUModule.h" #include "Utilities/cfmt.h" @@ -383,7 +383,7 @@ u32 _sys_memalign(u32 align, u32 size) return vm::alloc(size, vm::main, std::max(align, 0x10000)); } -s32 _sys_free(u32 addr) +error_code _sys_free(u32 addr) { sysPrxForUser.warning("_sys_free(addr=0x%x)", addr); @@ -412,7 +412,7 @@ s32 _sys_snprintf(ppu_thread& ppu, vm::ptr dst, u32 count, vm::cptr } } -s32 _sys_printf(ppu_thread& ppu, vm::cptr fmt, ppu_va_args_t va_args) +error_code _sys_printf(ppu_thread& ppu, vm::cptr fmt, ppu_va_args_t va_args) { sysPrxForUser.warning("_sys_printf(fmt=%s, ...)", fmt); @@ -434,19 +434,19 @@ s32 _sys_sprintf(ppu_thread& ppu, vm::ptr buffer, vm::cptr fmt, ppu_ return static_cast(result.size()); } -s32 _sys_vprintf() +error_code _sys_vprintf() { sysPrxForUser.todo("_sys_vprintf()"); return CELL_OK; } -s32 _sys_vsnprintf() +error_code _sys_vsnprintf() { sysPrxForUser.todo("_sys_vsnprintf()"); return CELL_OK; } -s32 _sys_vsprintf() +error_code _sys_vsprintf() { sysPrxForUser.todo("_sys_vsprintf()"); return CELL_OK; diff --git a/rpcs3/Emu/Cell/Modules/sys_lv2dbg.cpp b/rpcs3/Emu/Cell/Modules/sys_lv2dbg.cpp index 0fdbe813ec..7e8502616a 100644 --- a/rpcs3/Emu/Cell/Modules/sys_lv2dbg.cpp +++ b/rpcs3/Emu/Cell/Modules/sys_lv2dbg.cpp @@ -65,218 +65,218 @@ void fmt_class_string::format(std::string& out, u64 arg) }); } -s32 sys_dbg_read_ppu_thread_context(u64 id, vm::ptr ppu_context) +error_code sys_dbg_read_ppu_thread_context(u64 id, vm::ptr ppu_context) { sys_lv2dbg.todo("sys_dbg_read_ppu_thread_context()"); return CELL_OK; } -s32 sys_dbg_read_spu_thread_context(u32 id, vm::ptr spu_context) +error_code sys_dbg_read_spu_thread_context(u32 id, vm::ptr spu_context) { sys_lv2dbg.todo("sys_dbg_read_spu_thread_context()"); return CELL_OK; } -s32 sys_dbg_read_spu_thread_context2(u32 id, vm::ptr spu_context) +error_code sys_dbg_read_spu_thread_context2(u32 id, vm::ptr spu_context) { sys_lv2dbg.todo("sys_dbg_read_spu_thread_context2()"); return CELL_OK; } -s32 sys_dbg_set_stacksize_ppu_exception_handler(u32 stacksize) +error_code sys_dbg_set_stacksize_ppu_exception_handler(u32 stacksize) { sys_lv2dbg.todo("sys_dbg_set_stacksize_ppu_exception_handler()"); return CELL_OK; } -s32 sys_dbg_initialize_ppu_exception_handler(s32 prio) +error_code sys_dbg_initialize_ppu_exception_handler(s32 prio) { sys_lv2dbg.todo("sys_dbg_initialize_ppu_exception_handler()"); return CELL_OK; } -s32 sys_dbg_finalize_ppu_exception_handler() +error_code sys_dbg_finalize_ppu_exception_handler() { sys_lv2dbg.todo("sys_dbg_finalize_ppu_exception_handler()"); return CELL_OK; } -s32 sys_dbg_register_ppu_exception_handler(vm::ptr callback, u64 ctrl_flags) +error_code sys_dbg_register_ppu_exception_handler(vm::ptr callback, u64 ctrl_flags) { sys_lv2dbg.todo("sys_dbg_register_ppu_exception_handler()"); return CELL_OK; } -s32 sys_dbg_unregister_ppu_exception_handler() +error_code sys_dbg_unregister_ppu_exception_handler() { sys_lv2dbg.todo("sys_dbg_unregister_ppu_exception_handler()"); return CELL_OK; } -s32 sys_dbg_signal_to_ppu_exception_handler(u64 flags) +error_code sys_dbg_signal_to_ppu_exception_handler(u64 flags) { sys_lv2dbg.todo("sys_dbg_signal_to_ppu_exception_handler()"); return CELL_OK; } -s32 sys_dbg_get_mutex_information(u32 id, vm::ptr info) +error_code sys_dbg_get_mutex_information(u32 id, vm::ptr info) { sys_lv2dbg.todo("sys_dbg_get_mutex_information()"); return CELL_OK; } -s32 sys_dbg_get_cond_information(u32 id, vm::ptr info) +error_code sys_dbg_get_cond_information(u32 id, vm::ptr info) { sys_lv2dbg.todo("sys_dbg_get_cond_information()"); return CELL_OK; } -s32 sys_dbg_get_rwlock_information(u32 id, vm::ptr info) +error_code sys_dbg_get_rwlock_information(u32 id, vm::ptr info) { sys_lv2dbg.todo("sys_dbg_get_rwlock_information()"); return CELL_OK; } -s32 sys_dbg_get_event_queue_information(u32 id, vm::ptr info) +error_code sys_dbg_get_event_queue_information(u32 id, vm::ptr info) { sys_lv2dbg.todo("sys_dbg_get_event_queue_information()"); return CELL_OK; } -s32 sys_dbg_get_semaphore_information(u32 id, vm::ptr info) +error_code sys_dbg_get_semaphore_information(u32 id, vm::ptr info) { sys_lv2dbg.todo("sys_dbg_get_semaphore_information()"); return CELL_OK; } -s32 sys_dbg_get_lwmutex_information(u32 id, vm::ptr info) +error_code sys_dbg_get_lwmutex_information(u32 id, vm::ptr info) { sys_lv2dbg.todo("sys_dbg_get_lwmutex_information()"); return CELL_OK; } -s32 sys_dbg_get_lwcond_information(u32 id, vm::ptr info) +error_code sys_dbg_get_lwcond_information(u32 id, vm::ptr info) { sys_lv2dbg.todo("sys_dbg_get_lwcond_information()"); return CELL_OK; } -s32 sys_dbg_get_event_flag_information(u32 id, vm::ptr info) +error_code sys_dbg_get_event_flag_information(u32 id, vm::ptr info) { sys_lv2dbg.todo("sys_dbg_get_event_flag_information()"); return CELL_OK; } -s32 sys_dbg_get_ppu_thread_ids(vm::ptr ids, vm::ptr ids_num, vm::ptr all_ids_num) +error_code sys_dbg_get_ppu_thread_ids(vm::ptr ids, vm::ptr ids_num, vm::ptr all_ids_num) { sys_lv2dbg.todo("sys_dbg_get_ppu_thread_ids()"); return CELL_OK; } -s32 sys_dbg_get_spu_thread_group_ids(vm::ptr ids, vm::ptr ids_num, vm::ptr all_ids_num) +error_code sys_dbg_get_spu_thread_group_ids(vm::ptr ids, vm::ptr ids_num, vm::ptr all_ids_num) { sys_lv2dbg.todo("sys_dbg_get_spu_thread_group_ids()"); return CELL_OK; } -s32 sys_dbg_get_spu_thread_ids(u32 group_id, vm::ptr ids, vm::ptr ids_num, vm::ptr all_ids_num) +error_code sys_dbg_get_spu_thread_ids(u32 group_id, vm::ptr ids, vm::ptr ids_num, vm::ptr all_ids_num) { sys_lv2dbg.todo("sys_dbg_get_spu_thread_ids()"); return CELL_OK; } -s32 sys_dbg_get_ppu_thread_name(u64 id, vm::ptr name) +error_code sys_dbg_get_ppu_thread_name(u64 id, vm::ptr name) { sys_lv2dbg.todo("sys_dbg_get_ppu_thread_name()"); return CELL_OK; } -s32 sys_dbg_get_spu_thread_name(u32 id, vm::ptr name) +error_code sys_dbg_get_spu_thread_name(u32 id, vm::ptr name) { sys_lv2dbg.todo("sys_dbg_get_spu_thread_name()"); return CELL_OK; } -s32 sys_dbg_get_spu_thread_group_name(u32 id, vm::ptr name) +error_code sys_dbg_get_spu_thread_group_name(u32 id, vm::ptr name) { sys_lv2dbg.todo("sys_dbg_get_spu_thread_group_name()"); return CELL_OK; } -s32 sys_dbg_get_ppu_thread_status(u64 id, vm::ptr status) +error_code sys_dbg_get_ppu_thread_status(u64 id, vm::ptr status) { sys_lv2dbg.todo("sys_dbg_get_ppu_thread_status()"); return CELL_OK; } -s32 sys_dbg_get_spu_thread_group_status(u32 id, vm::ptr status) +error_code sys_dbg_get_spu_thread_group_status(u32 id, vm::ptr status) { sys_lv2dbg.todo("sys_dbg_get_spu_thread_group_status()"); return CELL_OK; } -s32 sys_dbg_enable_floating_point_enabled_exception(u64 id, u64 flags, u64 opt1, u64 opt2) +error_code sys_dbg_enable_floating_point_enabled_exception(u64 id, u64 flags, u64 opt1, u64 opt2) { sys_lv2dbg.todo("sys_dbg_enable_floating_point_enabled_exception()"); return CELL_OK; } -s32 sys_dbg_disable_floating_point_enabled_exception(u64 id, u64 flags, u64 opt1, u64 opt2) +error_code sys_dbg_disable_floating_point_enabled_exception(u64 id, u64 flags, u64 opt1, u64 opt2) { sys_lv2dbg.todo("sys_dbg_disable_floating_point_enabled_exception()"); return CELL_OK; } -s32 sys_dbg_vm_get_page_information(u32 addr, u32 num, vm::ptr pageinfo) +error_code sys_dbg_vm_get_page_information(u32 addr, u32 num, vm::ptr pageinfo) { sys_lv2dbg.todo("sys_dbg_vm_get_page_information()"); return CELL_OK; } -s32 sys_dbg_set_address_to_dabr(u64 addr, u64 ctrl_flag) +error_code sys_dbg_set_address_to_dabr(u64 addr, u64 ctrl_flag) { sys_lv2dbg.todo("sys_dbg_set_address_to_dabr()"); return CELL_OK; } -s32 sys_dbg_get_address_from_dabr(vm::ptr addr, vm::ptr ctrl_flag) +error_code sys_dbg_get_address_from_dabr(vm::ptr addr, vm::ptr ctrl_flag) { sys_lv2dbg.todo("sys_dbg_get_address_from_dabr()"); return CELL_OK; } -s32 sys_dbg_signal_to_coredump_handler(u64 data1, u64 data2, u64 data3) +error_code sys_dbg_signal_to_coredump_handler(u64 data1, u64 data2, u64 data3) { sys_lv2dbg.todo("sys_dbg_signal_to_coredump_handler()"); return CELL_OK; } -s32 sys_dbg_mat_set_condition(u32 addr, u64 cond) +error_code sys_dbg_mat_set_condition(u32 addr, u64 cond) { sys_lv2dbg.todo("sys_dbg_mat_set_condition()"); return CELL_OK; } -s32 sys_dbg_mat_get_condition(u32 addr, vm::ptr condp) +error_code sys_dbg_mat_get_condition(u32 addr, vm::ptr condp) { sys_lv2dbg.todo("sys_dbg_mat_get_condition()"); return CELL_OK; } -s32 sys_dbg_get_coredump_params(vm::ptr param) +error_code sys_dbg_get_coredump_params(vm::ptr param) { sys_lv2dbg.todo("sys_dbg_get_coredump_params()"); return CELL_OK; } -s32 sys_dbg_set_mask_to_ppu_exception_handler(u64 mask, u64 flags) +error_code sys_dbg_set_mask_to_ppu_exception_handler(u64 mask, u64 flags) { sys_lv2dbg.todo("sys_dbg_set_mask_to_ppu_exception_handler()"); return CELL_OK; diff --git a/rpcs3/Emu/Cell/Modules/sys_mempool.cpp b/rpcs3/Emu/Cell/Modules/sys_mempool.cpp index 1b74993de1..745d257d21 100644 --- a/rpcs3/Emu/Cell/Modules/sys_mempool.cpp +++ b/rpcs3/Emu/Cell/Modules/sys_mempool.cpp @@ -29,7 +29,7 @@ struct memory_pool_t std::vector> free_blocks; }; -s32 sys_mempool_create(ppu_thread& ppu, vm::ptr mempool, vm::ptr chunk, const u64 chunk_size, const u64 block_size, const u64 ralignment) +error_code sys_mempool_create(ppu_thread& ppu, vm::ptr mempool, vm::ptr chunk, const u64 chunk_size, const u64 block_size, const u64 ralignment) { sysPrxForUser.warning("sys_mempool_create(mempool=*0x%x, chunk=*0x%x, chunk_size=%d, block_size=%d, ralignment=%d)", mempool, chunk, chunk_size, block_size, ralignment); @@ -131,7 +131,7 @@ void sys_mempool_destroy(ppu_thread& ppu, sys_mempool_t mempool) } } -s32 sys_mempool_free_block(ppu_thread& ppu, sys_mempool_t mempool, vm::ptr block) +error_code sys_mempool_free_block(ppu_thread& ppu, sys_mempool_t mempool, vm::ptr block) { sysPrxForUser.warning("sys_mempool_free_block(mempool=%d, block=*0x%x)", mempool, block); diff --git a/rpcs3/Emu/Cell/Modules/sys_mmapper_.cpp b/rpcs3/Emu/Cell/Modules/sys_mmapper_.cpp index 9c693a4194..c6c9a9dd94 100644 --- a/rpcs3/Emu/Cell/Modules/sys_mmapper_.cpp +++ b/rpcs3/Emu/Cell/Modules/sys_mmapper_.cpp @@ -1,38 +1,38 @@ -#include "stdafx.h" +#include "stdafx.h" #include "Emu/Cell/PPUModule.h" #include "Emu/Cell/lv2/sys_mmapper.h" LOG_CHANNEL(sysPrxForUser); -s32 sys_mmapper_allocate_memory(ppu_thread& ppu, u32 size, u64 flags, vm::ptr mem_id) +error_code sys_mmapper_allocate_memory(ppu_thread& ppu, u32 size, u64 flags, vm::ptr mem_id) { sysPrxForUser.notice("sys_mmapper_allocate_memory(size=0x%x, flags=0x%llx, mem_id=*0x%x)", size, flags, mem_id); return sys_mmapper_allocate_shared_memory(ppu, SYS_MMAPPER_NO_SHM_KEY, size, flags, mem_id); } -s32 sys_mmapper_allocate_memory_from_container(ppu_thread& ppu, u32 size, u32 cid, u64 flags, vm::ptr mem_id) +error_code sys_mmapper_allocate_memory_from_container(ppu_thread& ppu, u32 size, u32 cid, u64 flags, vm::ptr mem_id) { sysPrxForUser.notice("sys_mmapper_allocate_memory_from_container(size=0x%x, cid=0x%x, flags=0x%llx, mem_id=*0x%x)", size, cid, flags, mem_id); return sys_mmapper_allocate_shared_memory_from_container(ppu, SYS_MMAPPER_NO_SHM_KEY, size, cid, flags, mem_id); } -s32 sys_mmapper_map_memory(ppu_thread& ppu, u32 addr, u32 mem_id, u64 flags) +error_code sys_mmapper_map_memory(ppu_thread& ppu, u32 addr, u32 mem_id, u64 flags) { sysPrxForUser.notice("sys_mmapper_map_memory(addr=0x%x, mem_id=0x%x, flags=0x%llx)", addr, mem_id, flags); return sys_mmapper_map_shared_memory(ppu, addr, mem_id, flags); } -s32 sys_mmapper_unmap_memory(ppu_thread& ppu, u32 addr, vm::ptr mem_id) +error_code sys_mmapper_unmap_memory(ppu_thread& ppu, u32 addr, vm::ptr mem_id) { sysPrxForUser.notice("sys_mmapper_unmap_memory(addr=0x%x, mem_id=*0x%x)", addr, mem_id); return sys_mmapper_unmap_shared_memory(ppu, addr, mem_id); } -s32 sys_mmapper_free_memory(ppu_thread& ppu, u32 mem_id) +error_code sys_mmapper_free_memory(ppu_thread& ppu, u32 mem_id) { sysPrxForUser.notice("sys_mmapper_free_memory(mem_id=0x%x)", mem_id); diff --git a/rpcs3/Emu/Cell/Modules/sys_rsxaudio_.cpp b/rpcs3/Emu/Cell/Modules/sys_rsxaudio_.cpp index fab7bbccbc..2a8f3fde8d 100644 --- a/rpcs3/Emu/Cell/Modules/sys_rsxaudio_.cpp +++ b/rpcs3/Emu/Cell/Modules/sys_rsxaudio_.cpp @@ -5,55 +5,55 @@ LOG_CHANNEL(sysPrxForUser); -s32 sys_rsxaudio_close_connection() +error_code sys_rsxaudio_close_connection() { UNIMPLEMENTED_FUNC(sysPrxForUser); return CELL_OK; } -s32 sys_rsxaudio_create_connection() +error_code sys_rsxaudio_create_connection() { UNIMPLEMENTED_FUNC(sysPrxForUser); return CELL_OK; } -s32 sys_rsxaudio_finalize() +error_code sys_rsxaudio_finalize() { UNIMPLEMENTED_FUNC(sysPrxForUser); return CELL_OK; } -s32 sys_rsxaudio_import_shared_memory() +error_code sys_rsxaudio_import_shared_memory() { UNIMPLEMENTED_FUNC(sysPrxForUser); return CELL_OK; } -s32 sys_rsxaudio_initialize() +error_code sys_rsxaudio_initialize() { UNIMPLEMENTED_FUNC(sysPrxForUser); return CELL_OK; } -s32 sys_rsxaudio_prepare_process() +error_code sys_rsxaudio_prepare_process() { UNIMPLEMENTED_FUNC(sysPrxForUser); return CELL_OK; } -s32 sys_rsxaudio_start_process() +error_code sys_rsxaudio_start_process() { UNIMPLEMENTED_FUNC(sysPrxForUser); return CELL_OK; } -s32 sys_rsxaudio_stop_process() +error_code sys_rsxaudio_stop_process() { UNIMPLEMENTED_FUNC(sysPrxForUser); return CELL_OK; } -s32 sys_rsxaudio_unimport_shared_memory() +error_code sys_rsxaudio_unimport_shared_memory() { UNIMPLEMENTED_FUNC(sysPrxForUser); return CELL_OK; diff --git a/rpcs3/Emu/Cell/Modules/sys_spinlock.cpp b/rpcs3/Emu/Cell/Modules/sys_spinlock.cpp index 9f76ed9634..0f03eafbd3 100644 --- a/rpcs3/Emu/Cell/Modules/sys_spinlock.cpp +++ b/rpcs3/Emu/Cell/Modules/sys_spinlock.cpp @@ -31,7 +31,7 @@ error_code sys_spinlock_lock(ppu_thread& ppu, vm::ptr> lock) return CELL_OK; } -s32 sys_spinlock_trylock(vm::ptr> lock) +error_code sys_spinlock_trylock(vm::ptr> lock) { sysPrxForUser.trace("sys_spinlock_trylock(lock=*0x%x)", lock); diff --git a/rpcs3/Emu/Cell/Modules/sys_spu_.cpp b/rpcs3/Emu/Cell/Modules/sys_spu_.cpp index d7449d0f91..d4969bfbab 100644 --- a/rpcs3/Emu/Cell/Modules/sys_spu_.cpp +++ b/rpcs3/Emu/Cell/Modules/sys_spu_.cpp @@ -377,7 +377,7 @@ error_code sys_spu_image_close(ppu_thread& ppu, vm::ptr img) return CELL_OK; } -s32 sys_raw_spu_load(s32 id, vm::cptr path, vm::ptr entry) +error_code sys_raw_spu_load(s32 id, vm::cptr path, vm::ptr entry) { sysPrxForUser.warning("sys_raw_spu_load(id=%d, path=%s, entry=*0x%x)", id, path, entry); @@ -385,7 +385,6 @@ s32 sys_raw_spu_load(s32 id, vm::cptr path, vm::ptr entry) if (!elf_file) { - sysPrxForUser.error("sys_raw_spu_load() error: %s not found!", path); return CELL_ENOENT; } @@ -399,7 +398,7 @@ s32 sys_raw_spu_load(s32 id, vm::cptr path, vm::ptr entry) return CELL_OK; } -s32 sys_raw_spu_image_load(ppu_thread& ppu, s32 id, vm::ptr img) +error_code sys_raw_spu_image_load(ppu_thread& ppu, s32 id, vm::ptr img) { sysPrxForUser.warning("sys_raw_spu_image_load(id=%d, img=*0x%x)", id, img);