From d3d55a831ab604724f2ab1b647355714a959dce5 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sun, 30 Jun 2013 11:12:36 -0700 Subject: [PATCH 1/2] Add a couple extra stubs to sceCcc. --- Core/HLE/sceCcc.cpp | 93 ++++++++++++++++++++++++++++++--------------- 1 file changed, 62 insertions(+), 31 deletions(-) diff --git a/Core/HLE/sceCcc.cpp b/Core/HLE/sceCcc.cpp index 5513587ae8..1ce4fd6497 100644 --- a/Core/HLE/sceCcc.cpp +++ b/Core/HLE/sceCcc.cpp @@ -18,52 +18,83 @@ #include "Core/HLE/HLE.h" #include "Core/Reporting.h" -int sceCccUTF8toUTF16() -{ - ERROR_LOG_REPORT(HLE, "UNIMPL sceCccUTF8toUTF16"); - return 0; -} - -int sceCccStrlenUTF16(int strUTF16) -{ - ERROR_LOG_REPORT(HLE, "UNIMPL sceCccStrlenUTF16"); - return 0; -} - - -int sceCccUTF8toSJIS(int dstAddr, int dstSize, int srcAddr) -{ - ERROR_LOG_REPORT(HLE, "UNIMPL sceCccUTF8toSJIS"); - return 0; -} - -int sceCccSetTable(int jis2ucs, int ucs2jis) +int sceCccSetTable(u32 jis2ucs, u32 ucs2jis) { // Both tables jis2ucs and ucs2jis have a size of 0x20000 bytes - ERROR_LOG_REPORT(HLE, "UNIMPL sceCccSetTable"); + ERROR_LOG_REPORT(HLE, "UNIMPL sceCccSetTable(%08x, %08x)", jis2ucs, ucs2jis); return 0; } -int sceCccSJIStoUTF16(int dstUTF16, int dstSize, int srcSJIS) +int sceCccUTF8toUTF16(u32 dstAddr, int dstSize, u32 srcAddr) { - ERROR_LOG_REPORT(HLE, "UNIMPL sceCccSJIStoUTF16"); + ERROR_LOG_REPORT(HLE, "UNIMPL sceCccUTF8toUTF16(%08x, %d, %08x)", dstAddr, dstSize, srcAddr); return 0; } -int sceCccUTF16toSJIS() +int sceCccUTF8toSJIS(u32 dstAddr, int dstSize, u32 srcAddr) { - ERROR_LOG_REPORT(HLE, "UNIMPL sceCccUTF16toSJIS"); + ERROR_LOG_REPORT(HLE, "UNIMPL sceCccUTF8toSJIS(%08x, %d, %08x)", dstAddr, dstSize, srcAddr); + Memory::Memcpy(dstAddr, Memory::GetCharPointer(srcAddr), dstSize); + return 0; +} + +int sceCccUTF16toSJIS(u32 dstAddr, int dstSize, u32 srcAddr) +{ + ERROR_LOG_REPORT(HLE, "UNIMPL sceCccUTF16toSJIS(%08x, %d, %08x)", dstAddr, dstSize, srcAddr); + return 0; +} + +int sceCccSJIStoUTF8(u32 dstAddr, int dstSize, u32 srcAddr) +{ + ERROR_LOG_REPORT(HLE, "UNIMPL sceCccSJIStoUTF8(%08x, %d, %08x)", dstAddr, dstSize, srcAddr); + // TODO: Use the tables set in sceCccSetTable()? + // Some characters are the same, so let's copy which is better than doing nothing. + Memory::Memcpy(dstAddr, Memory::GetCharPointer(srcAddr), dstSize); + return 0; +} + +int sceCccSJIStoUTF16(u32 dstAddr, int dstSize, u32 srcAddr) +{ + ERROR_LOG_REPORT(HLE, "UNIMPL sceCccSJIStoUTF16(%08x, %d, %08x)", dstAddr, dstSize, srcAddr); + return 0; +} + +int sceCccStrlenUTF16(u32 strUTF16) +{ + ERROR_LOG_REPORT(HLE, "UNIMPL sceCccStrlenUTF16(%08x)", strUTF16); + return 0; +} + +int sceCccEncodeUTF8(u32 dstAddr, u32 ucs) +{ + ERROR_LOG_REPORT(HLE, "UNIMPL sceCccEncodeUTF8(%08x, U+%04x)", dstAddr, ucs); + return 0; +} + +int sceCccEncodeUTF16(u32 dstAddr, u32 ucs) +{ + ERROR_LOG_REPORT(HLE, "UNIMPL sceCccEncodeUTF8(%08x, U+%04x)", dstAddr, ucs); + return 0; +} + +int sceCccDecodeUTF8(u32 dstAddrAddr) +{ + ERROR_LOG_REPORT(HLE, "UNIMPL sceCccDecodeUTF8(%08x)", dstAddrAddr); return 0; } const HLEFunction sceCcc[] = { - {0x00D1378F, WrapI_V, "sceCccUTF8toUTF16"}, - {0x4BDEB2A8, WrapI_I, "sceCccStrlenUTF16"}, - {0x6F82EE03, WrapI_III, "sceCccUTF8toSJIS"}, - {0xB4D1CBBF, WrapI_II, "sceCccSetTable"}, - {0xBEB47224, WrapI_III, "sceCccSJIStoUTF16"}, - {0xF1B73D12, WrapI_V, "sceCccUTF16toSJIS"}, + {0xB4D1CBBF, WrapI_UU, "sceCccSetTable"}, + {0x00D1378F, WrapI_UIU, "sceCccUTF8toUTF16"}, + {0x6F82EE03, WrapI_UIU, "sceCccUTF8toSJIS"}, + {0xF1B73D12, WrapI_UIU, "sceCccUTF16toSJIS"}, + {0xA62E6E80, WrapI_UIU, "sceCccSJIStoUTF8"}, + {0xBEB47224, WrapI_UIU, "sceCccSJIStoUTF16"}, + {0x4BDEB2A8, WrapI_U, "sceCccStrlenUTF16"}, + {0x92C05851, WrapI_UU, "sceCccEncodeUTF8"}, + {0x8406F469, WrapI_UU, "sceCccEncodeUTF16"}, + {0xc6a8bee2, WrapI_U, "sceCccDecodeUTF8"}, }; void Register_sceCcc() From d8eede0b9a2ec39e1ccfc3c785efd4a0effcffa7 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sun, 30 Jun 2013 11:40:52 -0700 Subject: [PATCH 2/2] Add some unknown syscalls from reporting. These are being linked in by games, so defining them will log them when they are hit. --- Core/HLE/HLETables.cpp | 4 ++-- Core/HLE/sceAudiocodec.cpp | 2 +- Core/HLE/sceDmac.cpp | 1 + Core/HLE/sceKernelMemory.cpp | 8 +++++++- Core/HLE/sceMpeg.cpp | 5 +++++ Core/HLE/scePsmf.cpp | 1 + Core/HLE/sceRtc.cpp | 4 ++++ Core/HLE/sceUtility.cpp | 5 +++++ Core/HLE/sceVaudio.cpp | 3 +++ 9 files changed, 29 insertions(+), 4 deletions(-) diff --git a/Core/HLE/HLETables.cpp b/Core/HLE/HLETables.cpp index ce795dfaa9..e44f436ab0 100644 --- a/Core/HLE/HLETables.cpp +++ b/Core/HLE/HLETables.cpp @@ -180,9 +180,9 @@ const HLEFunction KDebugForKernel[] = {0xE6554FDA, 0, "sceKernelRegisterDebugRead"}, {0xB9C643C9, 0, "sceKernelDebugEcho"}, {0x7D1C74F0, 0, "sceKernelDebugEchoSet"}, - {0x24C32559, 0, "KDebugForKernel_24C32559"}, + {0x24C32559, 0, "sceKernelDipsw"}, {0xD636B827, 0, "sceKernelRemoveByDebugSection"}, - {0x5282DD5E, 0, "KDebugForKernel_5282DD5E"}, + {0x5282DD5E, 0, "sceKernelDipswSet"}, {0x9F8703E4, 0, "KDebugForKernel_9F8703E4"}, {0x333DCEC7, 0, "KDebugForKernel_333DCEC7"}, {0xE892D9A1, 0, "KDebugForKernel_E892D9A1"}, diff --git a/Core/HLE/sceAudiocodec.cpp b/Core/HLE/sceAudiocodec.cpp index b89b3e6e1d..57cde5cb67 100644 --- a/Core/HLE/sceAudiocodec.cpp +++ b/Core/HLE/sceAudiocodec.cpp @@ -36,7 +36,7 @@ const HLEFunction sceAudiocodec[] = {0x8ACA11D5, 0, "sceAudiocodecGetInfo"}, {0x3A20A200, 0, "sceAudiocodecGetEDRAM"}, {0x29681260, 0, "sceAudiocodecReleaseEDRAM"}, - {0x9D3F790C, 0, "sceAudiocodeCheckNeedMem"}, + {0x9D3F790C, 0, "sceAudiocodecCheckNeedMem"}, }; void Register_sceAudiocodec() diff --git a/Core/HLE/sceDmac.cpp b/Core/HLE/sceDmac.cpp index 8450124229..74d6abd221 100644 --- a/Core/HLE/sceDmac.cpp +++ b/Core/HLE/sceDmac.cpp @@ -43,6 +43,7 @@ u32 sceDmacMemcpy(u32 dst, u32 src, u32 size) const HLEFunction sceDmac[] = { {0x617f3fe6, &WrapU_UUU, "sceDmacMemcpy"}, + {0xd97f94d8, 0, "sceDmacTryMemcpy"}, }; void Register_sceDmac() diff --git a/Core/HLE/sceKernelMemory.cpp b/Core/HLE/sceKernelMemory.cpp index 753fe8b393..f37290fcc0 100644 --- a/Core/HLE/sceKernelMemory.cpp +++ b/Core/HLE/sceKernelMemory.cpp @@ -1584,11 +1584,17 @@ const HLEFunction SysMemUserForUser[] = { {0x1b4217bc,&WrapV_I,"sceKernelSetCompiledSdkVersion603_605"}, {0x358ca1bb,&WrapV_I,"sceKernelSetCompiledSdkVersion606"}, {0xfc114573,&WrapI_V,"sceKernelGetCompiledSdkVersion"}, + {0x2a3e5280,0,"sceKernelQueryMemoryInfo"}, + {0xacbd88ca,0,"SysMemUserForUser_ACBD88CA"}, + {0x945e45da,0,"SysMemUserForUser_945E45DA"}, + {0xa6848df8,0,"sceKernelSetUsersystemLibWork"}, + {0x6231a71d,0,"sceKernelSetPTRIG"}, + {0x39f49610,0,"sceKernelGetPTRIG"}, // Obscure raw block API {0xDB83A952,WrapU_UU,"SysMemUserForUser_DB83A952"}, // GetMemoryBlockAddr {0x50F61D8A,WrapU_U,"SysMemUserForUser_50F61D8A"}, // FreeMemoryBlock {0xFE707FDF,WrapU_CUUU,"SysMemUserForUser_FE707FDF"}, // AllocMemoryBlock - {0xD8DE5C1E,WrapU_V,"SysMemUserForUser_D8DE5C1E"} + {0xD8DE5C1E,WrapU_V,"SysMemUserForUser_D8DE5C1E"}, }; diff --git a/Core/HLE/sceMpeg.cpp b/Core/HLE/sceMpeg.cpp index 77070f56d8..71d7d39967 100644 --- a/Core/HLE/sceMpeg.cpp +++ b/Core/HLE/sceMpeg.cpp @@ -1403,6 +1403,11 @@ const HLEFunction sceMpeg[] = {0xab0e9556,0,"sceMpegAvcDecodeDetailIndex"}, {0xcf3547a2,0,"sceMpegAvcDecodeDetail2"}, {0x921fcccf,0,"sceMpegGetAvcEsAu"}, + {0xd4dd6e75,0,"sceMpeg_D4DD6E75"}, + {0x11cab459,0,"sceMpeg_11CAB459"}, + {0xc345ded2,0,"sceMpeg_C345DED2"}, + {0xb27711a8,0,"sceMpeg_B27711A8"}, + {0x988e9e12,0,"sceMpeg_988E9E12"}, }; void Register_sceMpeg() diff --git a/Core/HLE/scePsmf.cpp b/Core/HLE/scePsmf.cpp index b4e3245f36..366906c7eb 100644 --- a/Core/HLE/scePsmf.cpp +++ b/Core/HLE/scePsmf.cpp @@ -1293,6 +1293,7 @@ const HLEFunction scePsmfPlayer[] = {0x2D0E4E0A, WrapI_UUU, "scePsmfPlayerSetTempBuf"}, {0x76C0F4AE, WrapI_UCI, "scePsmfPlayerSetPsmfOffset"}, {0xA72DB4F9, WrapI_UCI, "scePsmfPlayerSetPsmfOffsetCB"}, + {0x340c12cb, 0, "scePsmfPlayer_340C12CB"}, }; void Register_scePsmf() { diff --git a/Core/HLE/sceRtc.cpp b/Core/HLE/sceRtc.cpp index 65f0942ec2..0695dc04b0 100644 --- a/Core/HLE/sceRtc.cpp +++ b/Core/HLE/sceRtc.cpp @@ -917,6 +917,10 @@ const HLEFunction sceRtc[] = {0x203ceb0d, 0, "sceRtcGetLastReincarnatedTime"}, {0x7d1fbed3, &WrapI_UU, "sceRtcSetAlarmTick"}, {0xf5fcc995, 0, "sceRtc_F5FCC995"}, + {0x81fcda34, 0, "sceRtcIsAlarmed"}, + {0xfb3b18cd, 0, "sceRtcRegisterCallback"}, + {0x6a676d2d, 0, "sceRtcUnregisterCallback"}, + {0xc2ddbeb5, 0, "sceRtcGetAlarmTick"}, }; void Register_sceRtc() diff --git a/Core/HLE/sceUtility.cpp b/Core/HLE/sceUtility.cpp index afe4fb2537..d77899fe5d 100644 --- a/Core/HLE/sceUtility.cpp +++ b/Core/HLE/sceUtility.cpp @@ -635,6 +635,11 @@ const HLEFunction sceUtility[] = {0xd23665f4, 0, "sceUtility_D23665F4"}, {0xd4c2bd73, 0, "sceUtility_D4C2BD73"}, + {0x06A48659, 0, "sceUtilityRssSubscriberShutdownStart"}, + {0x4B0A8FE5, 0, "sceUtilityRssSubscriberInitStart"}, + {0xA084E056, 0, "sceUtilityRssSubscriberUpdate"}, + {0x2B96173B, 0, "sceUtilityRssSubscriberGetStatus"}, + {0x0e0c27af, 0, "sceUtility_0E0C27AF"}, }; diff --git a/Core/HLE/sceVaudio.cpp b/Core/HLE/sceVaudio.cpp index e6cb7e0e20..46e91d2c61 100644 --- a/Core/HLE/sceVaudio.cpp +++ b/Core/HLE/sceVaudio.cpp @@ -93,6 +93,9 @@ const HLEFunction sceVaudio[] = { {0x67585dfd, WrapU_V, "sceVaudioChRelease"}, {0x346FBE94, WrapU_II, "sceVaudioSetEffectType"}, {0xCBD4AC51, WrapU_I, "sceVaudioSetAlcMode"}, + {0x504e4745, 0, "sceVaudio_504E4745"}, + {0x27acc20b, 0, "sceVaudio_27ACC20B"}, + {0xe8e78dc8, 0, "sceVaudio_E8E78DC8"}, }; void Register_sceVaudio() {