From f7a864981c1a34367b81c06909d555f541e4ff89 Mon Sep 17 00:00:00 2001 From: sum2012 Date: Wed, 16 Dec 2020 22:33:55 +0800 Subject: [PATCH] Add stack value in scempeg and scepsmf from jpcsp Might help video corruption issue --- Core/HLE/sceMpeg.cpp | 18 +++++++++--------- Core/HLE/scePsmf.cpp | 32 ++++++++++++++++---------------- 2 files changed, 25 insertions(+), 25 deletions(-) diff --git a/Core/HLE/sceMpeg.cpp b/Core/HLE/sceMpeg.cpp index d4cc48f0964f..60a6a0e06d3b 100644 --- a/Core/HLE/sceMpeg.cpp +++ b/Core/HLE/sceMpeg.cpp @@ -2289,21 +2289,21 @@ const HLEFunction sceMpeg[] = { {0XE1CE83A7, &WrapI_UUUU, "sceMpegGetAtracAu", 'i', "xxxx" }, {0XFE246728, &WrapI_UUUU, "sceMpegGetAvcAu", 'i', "xxxx" }, - {0XD8C5F121, &WrapU_UUUUUUU, "sceMpegCreate", 'x', "xxxxxxx"}, + {0XD8C5F121, &WrapU_UUUUUUU, "sceMpegCreate", 'x', "xxxxxxx" ,HLE_CLEAR_STACK_BYTES, 0xA8}, {0XF8DCB679, &WrapI_UUU, "sceMpegQueryAtracEsSize", 'i', "xxx" }, - {0XC132E22F, &WrapU_V, "sceMpegQueryMemSize", 'x', "" }, - {0X21FF80E4, &WrapI_UUU, "sceMpegQueryStreamOffset", 'i', "xxx" }, - {0X611E9E11, &WrapU_UU, "sceMpegQueryStreamSize", 'x', "xx" }, - {0X42560F23, &WrapI_UUU, "sceMpegRegistStream", 'i', "xxx" }, - {0X591A4AA2, &WrapU_UI, "sceMpegUnRegistStream", 'x', "xi" }, + {0XC132E22F, &WrapU_V, "sceMpegQueryMemSize", 'x', "" ,HLE_CLEAR_STACK_BYTES, 0x18}, + {0X21FF80E4, &WrapI_UUU, "sceMpegQueryStreamOffset", 'i', "xxx",HLE_CLEAR_STACK_BYTES, 0x18}, + {0X611E9E11, &WrapU_UU, "sceMpegQueryStreamSize", 'x', "xx",HLE_CLEAR_STACK_BYTES, 0x8}, + {0X42560F23, &WrapI_UUU, "sceMpegRegistStream", 'i', "xxx" ,HLE_CLEAR_STACK_BYTES, 0x48}, + {0X591A4AA2, &WrapU_UI, "sceMpegUnRegistStream", 'x', "xi" ,HLE_CLEAR_STACK_BYTES, 0x18 }, {0X707B7629, &WrapU_U, "sceMpegFlushAllStream", 'x', "x" }, {0X500F0429, &WrapU_UI, "sceMpegFlushStream", 'x', "xi" }, {0XA780CF7E, &WrapI_U, "sceMpegMallocAvcEsBuf", 'i', "x" }, {0XCEB870B1, &WrapI_UI, "sceMpegFreeAvcEsBuf", 'i', "xi" }, {0X167AFD9E, &WrapI_UUU, "sceMpegInitAu", 'i', "xxx" }, - {0X682A619B, &WrapU_V, "sceMpegInit", 'x', "" }, - {0X606A4649, &WrapI_U, "sceMpegDelete", 'i', "x" }, - {0X874624D6, &WrapU_V, "sceMpegFinish", 'x', "" }, + {0X682A619B, &WrapU_V, "sceMpegInit", 'x', "" ,HLE_CLEAR_STACK_BYTES, 0x48}, + {0X606A4649, &WrapI_U, "sceMpegDelete", 'i', "x",HLE_CLEAR_STACK_BYTES, 0x18}, + {0X874624D6, &WrapU_V, "sceMpegFinish", 'x', "" ,HLE_CLEAR_STACK_BYTES, 0x18}, {0X800C44DF, &WrapU_UUUI, "sceMpegAtracDecode", 'x', "xxxi" }, {0X0E3C2E9D, &WrapU_UUUUU, "sceMpegAvcDecode", 'x', "xxxxx" }, {0X740FCCD1, &WrapU_UUUU, "sceMpegAvcDecodeStop", 'x', "xxxx" }, diff --git a/Core/HLE/scePsmf.cpp b/Core/HLE/scePsmf.cpp index 51bb3beedcac..985b36d18e28 100644 --- a/Core/HLE/scePsmf.cpp +++ b/Core/HLE/scePsmf.cpp @@ -2078,29 +2078,29 @@ static int __PsmfPlayerFinish(u32 psmfPlayer) { } const HLEFunction scePsmf[] = { - {0XC22C8327, &WrapU_UU, "scePsmfSetPsmf", 'x', "xx" }, - {0XC7DB3A5B, &WrapU_UUU, "scePsmfGetCurrentStreamType", 'i', "xpp"}, + {0XC22C8327, &WrapU_UU, "scePsmfSetPsmf", 'x', "xx" ,HLE_CLEAR_STACK_BYTES, 0x50}, + {0XC7DB3A5B, &WrapU_UUU, "scePsmfGetCurrentStreamType", 'i', "xpp" ,HLE_CLEAR_STACK_BYTES, 0x50}, {0X28240568, &WrapU_U, "scePsmfGetCurrentStreamNumber", 'i', "x" }, - {0X1E6D9013, &WrapU_UUU, "scePsmfSpecifyStreamWithStreamType", 'i', "xii"}, + {0X1E6D9013, &WrapU_UUU, "scePsmfSpecifyStreamWithStreamType", 'i', "xii" ,HLE_CLEAR_STACK_BYTES, 0x20}, {0X0C120E1D, &WrapU_UUU, "scePsmfSpecifyStreamWithStreamTypeNumber", 'i', "xii"}, - {0X4BC9BDE0, &WrapU_UI, "scePsmfSpecifyStream", 'i', "xi" }, - {0X76D3AEBA, &WrapU_UU, "scePsmfGetPresentationStartTime", 'x', "xx" }, - {0XBD8AE0D8, &WrapU_UU, "scePsmfGetPresentationEndTime", 'x', "xx" }, - {0XEAED89CD, &WrapU_U, "scePsmfGetNumberOfStreams", 'i', "x" }, - {0X7491C438, &WrapU_U, "scePsmfGetNumberOfEPentries", 'x', "x" }, - {0X0BA514E5, &WrapU_UU, "scePsmfGetVideoInfo", 'i', "xp" }, - {0XA83F7113, &WrapU_UU, "scePsmfGetAudioInfo", 'i', "xp" }, - {0X971A3A90, &WrapU_U, "scePsmfCheckEPmap", 'x', "x" }, - {0X68D42328, &WrapU_UI, "scePsmfGetNumberOfSpecificStreams", 'i', "xi" }, + {0X4BC9BDE0, &WrapU_UI, "scePsmfSpecifyStream", 'i', "xi" ,HLE_CLEAR_STACK_BYTES, 0x40}, + {0X76D3AEBA, &WrapU_UU, "scePsmfGetPresentationStartTime", 'x', "xx" ,HLE_CLEAR_STACK_BYTES, 0x10}, + {0XBD8AE0D8, &WrapU_UU, "scePsmfGetPresentationEndTime", 'x', "xx" ,HLE_CLEAR_STACK_BYTES, 0x10}, + {0XEAED89CD, &WrapU_U, "scePsmfGetNumberOfStreams", 'i', "x" ,HLE_CLEAR_STACK_BYTES, 0x10}, + {0X7491C438, &WrapU_U, "scePsmfGetNumberOfEPentries", 'x', "x" ,HLE_CLEAR_STACK_BYTES, 0x10}, + {0X0BA514E5, &WrapU_UU, "scePsmfGetVideoInfo", 'i', "xp" ,HLE_CLEAR_STACK_BYTES, 0x20}, + {0XA83F7113, &WrapU_UU, "scePsmfGetAudioInfo", 'i', "xp" ,HLE_CLEAR_STACK_BYTES, 0x20}, + {0X971A3A90, &WrapU_U, "scePsmfCheckEPmap", 'x', "x" ,HLE_CLEAR_STACK_BYTES, 0x10}, + {0X68D42328, &WrapU_UI, "scePsmfGetNumberOfSpecificStreams", 'i', "xi" ,HLE_CLEAR_STACK_BYTES, 0x20}, {0X5B70FCC1, &WrapU_UU, "scePsmfQueryStreamOffset", 'x', "xx" }, {0X9553CC91, &WrapU_UU, "scePsmfQueryStreamSize", 'x', "xx" }, {0XB78EB9E9, &WrapU_UU, "scePsmfGetHeaderSize", 'x', "xx" }, {0XA5EBFE81, &WrapU_UU, "scePsmfGetStreamSize", 'x', "xx" }, {0XE1283895, &WrapU_U, "scePsmfGetPsmfVersion", 'x', "x" }, - {0X2673646B, &WrapU_U, "scePsmfVerifyPsmf", 'x', "x" }, - {0X4E624A34, &WrapU_UIU, "scePsmfGetEPWithId", 'x', "xix"}, - {0X7C0E7AC3, &WrapU_UUU, "scePsmfGetEPWithTimestamp", 'x', "xxx"}, - {0X5F457515, &WrapU_UU, "scePsmfGetEPidWithTimestamp", 'x', "xx" }, + {0X2673646B, &WrapU_U, "scePsmfVerifyPsmf", 'x', "x" ,HLE_CLEAR_STACK_BYTES, 0x100}, + {0X4E624A34, &WrapU_UIU, "scePsmfGetEPWithId", 'x', "xix" ,HLE_CLEAR_STACK_BYTES, 0x10}, + {0X7C0E7AC3, &WrapU_UUU, "scePsmfGetEPWithTimestamp", 'x', "xxx" ,HLE_CLEAR_STACK_BYTES, 0x10}, + {0X5F457515, &WrapU_UU, "scePsmfGetEPidWithTimestamp", 'x', "xx" ,HLE_CLEAR_STACK_BYTES, 0x20}, {0X43AC7DBB, nullptr, "scePsmfGetPsmfMark", '?', "" }, {0XDE78E9FC, nullptr, "scePsmfGetNumberOfPsmfMarks", '?', "" }, };