diff --git a/Core/HLE/HLE.cpp b/Core/HLE/HLE.cpp index bea3ee683a..71845918da 100644 --- a/Core/HLE/HLE.cpp +++ b/Core/HLE/HLE.cpp @@ -179,21 +179,21 @@ void HLEShutdown() { mipsCallActions.clear(); } -int GetNumRegisteredModules() { +int GetNumRegisteredHLEModules() { return (int)moduleDB.size(); } -void RegisterModule(std::string_view name, int numFunctions, const HLEFunction *funcTable) { +void RegisterHLEModule(std::string_view name, int numFunctions, const HLEFunction *funcTable) { HLEModule module = {name, numFunctions, funcTable}; moduleDB.push_back(module); } -const HLEModule *GetModuleByIndex(int index) { +const HLEModule *GetHLEModuleByIndex(int index) { return &moduleDB[index]; } // TODO: Do something faster. -const HLEModule *GetModuleByName(std::string_view name) { +const HLEModule *GetHLEModuleByName(std::string_view name) { for (auto &module : moduleDB) { if (name == module.name) { return &module; @@ -203,7 +203,7 @@ const HLEModule *GetModuleByName(std::string_view name) { } // TODO: Do something faster. -const HLEFunction *GetFuncByName(const HLEModule *module, std::string_view name) { +const HLEFunction *GetHLEFuncByName(const HLEModule *module, std::string_view name) { for (int i = 0; i < module->numFunctions; i++) { auto &func = module->funcTable[i]; if (func.name == name) { @@ -213,14 +213,14 @@ const HLEFunction *GetFuncByName(const HLEModule *module, std::string_view name) return nullptr; } -int GetModuleIndex(std::string_view moduleName) { +int GetHLEModuleIndex(std::string_view moduleName) { for (size_t i = 0; i < moduleDB.size(); i++) if (moduleDB[i].name == moduleName) return (int)i; return -1; } -int GetFuncIndex(int moduleIndex, u32 nib) { +int GetHLEFuncIndexByNib(int moduleIndex, u32 nib) { const HLEModule &module = moduleDB[moduleIndex]; for (int i = 0; i < module.numFunctions; i++) { if (module.funcTable[i].ID == nib) @@ -230,7 +230,7 @@ int GetFuncIndex(int moduleIndex, u32 nib) { } u32 GetNibByName(std::string_view moduleName, std::string_view function) { - int moduleIndex = GetModuleIndex(moduleName); + int moduleIndex = GetHLEModuleIndex(moduleName); if (moduleIndex == -1) return -1; @@ -242,20 +242,21 @@ u32 GetNibByName(std::string_view moduleName, std::string_view function) { return -1; } -const HLEFunction *GetFunc(std::string_view moduleName, u32 nib) { - int moduleIndex = GetModuleIndex(moduleName); +const HLEFunction *GetHLEFunc(std::string_view moduleName, u32 nib) { + int moduleIndex = GetHLEModuleIndex(moduleName); if (moduleIndex != -1) { - int idx = GetFuncIndex(moduleIndex, nib); + int idx = GetHLEFuncIndexByNib(moduleIndex, nib); if (idx != -1) return &(moduleDB[moduleIndex].funcTable[idx]); } return 0; } -const char *GetFuncName(std::string_view moduleName, u32 nib) { +// WARNING: Not thread-safe! +const char *GetHLEFuncName(std::string_view moduleName, u32 nib) { _dbg_assert_msg_(!moduleName.empty(), "Invalid module name."); - const HLEFunction *func = GetFunc(moduleName, nib); + const HLEFunction *func = GetHLEFunc(moduleName, nib); if (func) return func->name; @@ -264,15 +265,25 @@ const char *GetFuncName(std::string_view moduleName, u32 nib) { return temp; } +const char *GetHLEFuncName(int moduleIndex, int func) { + if (moduleIndex >= 0 && moduleIndex < (int)moduleDB.size()) { + const HLEModule &module = moduleDB[moduleIndex]; + if (func >= 0 && func < module.numFunctions) { + return module.funcTable[func].name; + } + } + return "[unknown]"; +} + u32 GetSyscallOp(std::string_view moduleName, u32 nib) { // Special case to hook up bad imports. if (moduleName.empty()) { return (0x03FFFFCC); // invalid syscall } - int modindex = GetModuleIndex(moduleName); + int modindex = GetHLEModuleIndex(moduleName); if (modindex != -1) { - int funcindex = GetFuncIndex(modindex, nib); + int funcindex = GetHLEFuncIndexByNib(modindex, nib); if (funcindex != -1) { return (0x0000000c | (modindex<<18) | (funcindex<<6)); } else { @@ -287,7 +298,7 @@ u32 GetSyscallOp(std::string_view moduleName, u32 nib) { bool FuncImportIsSyscall(std::string_view module, u32 nib) { - return GetFunc(module, nib) != nullptr; + return GetHLEFunc(module, nib) != nullptr; } void WriteFuncStub(u32 stubAddr, u32 symAddr) @@ -315,7 +326,7 @@ bool WriteSyscall(std::string_view moduleName, u32 nib, u32 address) Memory::Write_U32(MIPS_MAKE_NOP(), address+4); //patched out? return true; } - int modindex = GetModuleIndex(moduleName); + int modindex = GetHLEModuleIndex(moduleName); if (modindex != -1) { Memory::Write_U32(MIPS_MAKE_JR_RA(), address); // jr ra @@ -329,19 +340,6 @@ bool WriteSyscall(std::string_view moduleName, u32 nib, u32 address) } } -const char *GetFuncName(int moduleIndex, int func) -{ - if (moduleIndex >= 0 && moduleIndex < (int)moduleDB.size()) - { - const HLEModule &module = moduleDB[moduleIndex]; - if (func >= 0 && func < module.numFunctions) - { - return module.funcTable[func].name; - } - } - return "[unknown]"; -} - void hleCheckCurrentCallbacks() { hleAfterSyscall |= HLE_AFTER_CURRENT_CALLBACKS; @@ -858,12 +856,12 @@ void CallSyscall(MIPSOpcode op) { } void hlePushFuncDesc(std::string_view module, std::string_view funcName) { - const HLEModule *mod = GetModuleByName(module); + const HLEModule *mod = GetHLEModuleByName(module); _dbg_assert_(mod != nullptr); if (!mod) { return; } - const HLEFunction *func = GetFuncByName(mod, funcName); + const HLEFunction *func = GetHLEFuncByName(mod, funcName); _dbg_assert_(func != nullptr); // Push to the stack. Be careful (due to the nasty adhoc thread..) int stackSize = g_stackSize; diff --git a/Core/HLE/HLE.h b/Core/HLE/HLE.h index c70a34e098..1b2cfd774d 100644 --- a/Core/HLE/HLE.h +++ b/Core/HLE/HLE.h @@ -97,15 +97,16 @@ struct Syscall { #define RETURN64(n) {u64 RETURN64_tmp = n; currentMIPS->r[MIPS_REG_V0] = RETURN64_tmp & 0xFFFFFFFF; currentMIPS->r[MIPS_REG_V1] = RETURN64_tmp >> 32;} #define RETURNF(fl) currentMIPS->f[0] = fl -const char *GetFuncName(std::string_view module, u32 nib); -const char *GetFuncName(int module, int func); -const HLEFunction *GetFunc(std::string_view module, u32 nib); -int GetFuncIndex(int moduleIndex, u32 nib); -int GetModuleIndex(std::string_view modulename); +const char *GetHLEFuncName(std::string_view module, u32 nib); +const char *GetHLEFuncName(int module, int func); +const HLEFunction *GetHLEFunc(std::string_view module, u32 nib); +int GetHLEFuncIndexByNib(int moduleIndex, u32 nib); +int GetHLEModuleIndex(std::string_view modulename); +u32 GetNibByName(std::string_view module, std::string_view function); -void RegisterModule(std::string_view name, int numFunctions, const HLEFunction *funcTable); -int GetNumRegisteredModules(); -const HLEModule *GetModuleByIndex(int index); +void RegisterHLEModule(std::string_view name, int numFunctions, const HLEFunction *funcTable); +int GetNumRegisteredHLEModules(); +const HLEModule *GetHLEModuleByIndex(int index); // Run the current thread's callbacks after the syscall finishes. void hleCheckCurrentCallbacks(); @@ -158,7 +159,6 @@ inline s64 hleDelayResult(s64 result, const char *reason, int usec) { void HLEInit(); void HLEDoState(PointerWrap &p); void HLEShutdown(); -u32 GetNibByName(std::string_view module, std::string_view function); u32 GetSyscallOp(std::string_view module, u32 nib); bool FuncImportIsSyscall(std::string_view module, u32 nib); bool WriteSyscall(std::string_view module, u32 nib, u32 address); diff --git a/Core/HLE/HLETables.cpp b/Core/HLE/HLETables.cpp index 6412586658..ec896920ad 100644 --- a/Core/HLE/HLETables.cpp +++ b/Core/HLE/HLETables.cpp @@ -288,13 +288,13 @@ void RegisterAllModules() { Register_sceHeap(); for (int i = 0; i < numModules; i++) { - RegisterModule(moduleList[i].name, moduleList[i].numFunctions, moduleList[i].funcTable); + RegisterHLEModule(moduleList[i].name, moduleList[i].numFunctions, moduleList[i].funcTable); } // IMPORTANT: New modules have to be added at the end, or they will break savestates. Register_StdioForKernel(); - RegisterModule("LoadCoreForKernel", ARRAY_SIZE(LoadCoreForKernel), LoadCoreForKernel); + RegisterHLEModule("LoadCoreForKernel", ARRAY_SIZE(LoadCoreForKernel), LoadCoreForKernel); Register_IoFileMgrForKernel(); Register_LoadExecForKernel(); Register_SysMemForKernel(); diff --git a/Core/HLE/KUBridge.cpp b/Core/HLE/KUBridge.cpp index 763efcf3a3..aebb69a284 100644 --- a/Core/HLE/KUBridge.cpp +++ b/Core/HLE/KUBridge.cpp @@ -43,5 +43,5 @@ const HLEFunction KUBridge[] = }; void Register_KUBridge() { - RegisterModule("KUBridge", ARRAY_SIZE(KUBridge), KUBridge); + RegisterHLEModule("KUBridge", ARRAY_SIZE(KUBridge), KUBridge); } diff --git a/Core/HLE/sceAac.cpp b/Core/HLE/sceAac.cpp index 2a93131c0c..83b49769d5 100644 --- a/Core/HLE/sceAac.cpp +++ b/Core/HLE/sceAac.cpp @@ -219,5 +219,5 @@ const HLEFunction sceAac[] = { }; void Register_sceAac() { - RegisterModule("sceAac", ARRAY_SIZE(sceAac), sceAac); + RegisterHLEModule("sceAac", ARRAY_SIZE(sceAac), sceAac); } diff --git a/Core/HLE/sceAdler.cpp b/Core/HLE/sceAdler.cpp index fe74d313cf..3632116b8a 100644 --- a/Core/HLE/sceAdler.cpp +++ b/Core/HLE/sceAdler.cpp @@ -44,5 +44,5 @@ const HLEFunction sceAdler[] = { }; void Register_sceAdler() { - RegisterModule("sceAdler", ARRAY_SIZE(sceAdler), sceAdler); + RegisterHLEModule("sceAdler", ARRAY_SIZE(sceAdler), sceAdler); } diff --git a/Core/HLE/sceAtrac.cpp b/Core/HLE/sceAtrac.cpp index 0a27836758..38426f9ba9 100644 --- a/Core/HLE/sceAtrac.cpp +++ b/Core/HLE/sceAtrac.cpp @@ -1200,6 +1200,6 @@ const HLEFunction sceAtrac3plus[] = { void Register_sceAtrac3plus() { // Two names - RegisterModule("sceATRAC3plus_Library", ARRAY_SIZE(sceAtrac3plus), sceAtrac3plus); - RegisterModule("sceAtrac3plus", ARRAY_SIZE(sceAtrac3plus), sceAtrac3plus); + RegisterHLEModule("sceATRAC3plus_Library", ARRAY_SIZE(sceAtrac3plus), sceAtrac3plus); + RegisterHLEModule("sceAtrac3plus", ARRAY_SIZE(sceAtrac3plus), sceAtrac3plus); } diff --git a/Core/HLE/sceAudio.cpp b/Core/HLE/sceAudio.cpp index 8cb8f535fa..00038090f2 100644 --- a/Core/HLE/sceAudio.cpp +++ b/Core/HLE/sceAudio.cpp @@ -549,5 +549,5 @@ const HLEFunction sceAudio[] = void Register_sceAudio() { - RegisterModule("sceAudio", ARRAY_SIZE(sceAudio), sceAudio); + RegisterHLEModule("sceAudio", ARRAY_SIZE(sceAudio), sceAudio); } diff --git a/Core/HLE/sceAudioRouting.cpp b/Core/HLE/sceAudioRouting.cpp index c2e34221d6..35e4320539 100644 --- a/Core/HLE/sceAudioRouting.cpp +++ b/Core/HLE/sceAudioRouting.cpp @@ -61,5 +61,5 @@ const HLEFunction sceAudioRouting[] = void Register_sceAudioRouting() { - RegisterModule("sceAudioRouting", ARRAY_SIZE(sceAudioRouting), sceAudioRouting); + RegisterHLEModule("sceAudioRouting", ARRAY_SIZE(sceAudioRouting), sceAudioRouting); } diff --git a/Core/HLE/sceAudiocodec.cpp b/Core/HLE/sceAudiocodec.cpp index 8b5ebed479..f210c53f35 100644 --- a/Core/HLE/sceAudiocodec.cpp +++ b/Core/HLE/sceAudiocodec.cpp @@ -174,7 +174,7 @@ const HLEFunction sceAudiocodec[] = { }; void Register_sceAudiocodec() { - RegisterModule("sceAudiocodec", ARRAY_SIZE(sceAudiocodec), sceAudiocodec); + RegisterHLEModule("sceAudiocodec", ARRAY_SIZE(sceAudiocodec), sceAudiocodec); } void __sceAudiocodecDoState(PointerWrap &p){ diff --git a/Core/HLE/sceCcc.cpp b/Core/HLE/sceCcc.cpp index 780b389af7..281ed185f6 100644 --- a/Core/HLE/sceCcc.cpp +++ b/Core/HLE/sceCcc.cpp @@ -567,5 +567,5 @@ const HLEFunction sceCcc[] = void Register_sceCcc() { - RegisterModule("sceCcc", ARRAY_SIZE(sceCcc), sceCcc); + RegisterHLEModule("sceCcc", ARRAY_SIZE(sceCcc), sceCcc); } diff --git a/Core/HLE/sceChnnlsv.cpp b/Core/HLE/sceChnnlsv.cpp index 6a28cfc903..b8aea6eee8 100644 --- a/Core/HLE/sceChnnlsv.cpp +++ b/Core/HLE/sceChnnlsv.cpp @@ -525,6 +525,6 @@ const HLEFunction sceChnnlsv[] = void Register_sceChnnlsv() { - RegisterModule("sceChnnlsv", ARRAY_SIZE(sceChnnlsv), sceChnnlsv); + RegisterHLEModule("sceChnnlsv", ARRAY_SIZE(sceChnnlsv), sceChnnlsv); kirk_init(); } diff --git a/Core/HLE/sceCtrl.cpp b/Core/HLE/sceCtrl.cpp index 12bd2710b4..634e3c0e91 100644 --- a/Core/HLE/sceCtrl.cpp +++ b/Core/HLE/sceCtrl.cpp @@ -591,12 +591,12 @@ static const HLEFunction sceCtrl[] = void Register_sceCtrl() { - RegisterModule("sceCtrl", ARRAY_SIZE(sceCtrl), sceCtrl); + RegisterHLEModule("sceCtrl", ARRAY_SIZE(sceCtrl), sceCtrl); } void Register_sceCtrl_driver() { - RegisterModule("sceCtrl_driver", ARRAY_SIZE(sceCtrl), sceCtrl); + RegisterHLEModule("sceCtrl_driver", ARRAY_SIZE(sceCtrl), sceCtrl); } u16 sceCtrlGetRightVibration() { diff --git a/Core/HLE/sceDeflt.cpp b/Core/HLE/sceDeflt.cpp index 5ebc42a4b5..21b1a3720c 100644 --- a/Core/HLE/sceDeflt.cpp +++ b/Core/HLE/sceDeflt.cpp @@ -96,5 +96,5 @@ const HLEFunction sceDeflt[] = { }; void Register_sceDeflt() { - RegisterModule("sceDeflt", ARRAY_SIZE(sceDeflt), sceDeflt); + RegisterHLEModule("sceDeflt", ARRAY_SIZE(sceDeflt), sceDeflt); } diff --git a/Core/HLE/sceDisplay.cpp b/Core/HLE/sceDisplay.cpp index 8c469dfd87..87de2f4f36 100644 --- a/Core/HLE/sceDisplay.cpp +++ b/Core/HLE/sceDisplay.cpp @@ -1132,11 +1132,11 @@ const HLEFunction sceDisplay[] = { }; void Register_sceDisplay() { - RegisterModule("sceDisplay", ARRAY_SIZE(sceDisplay), sceDisplay); + RegisterHLEModule("sceDisplay", ARRAY_SIZE(sceDisplay), sceDisplay); } void Register_sceDisplay_driver() { - RegisterModule("sceDisplay_driver", ARRAY_SIZE(sceDisplay), sceDisplay); + RegisterHLEModule("sceDisplay_driver", ARRAY_SIZE(sceDisplay), sceDisplay); } static void __DisplaySetFramerate(void) { diff --git a/Core/HLE/sceDmac.cpp b/Core/HLE/sceDmac.cpp index 05ec30520c..2b601e0573 100644 --- a/Core/HLE/sceDmac.cpp +++ b/Core/HLE/sceDmac.cpp @@ -121,5 +121,5 @@ const HLEFunction sceDmac[] = { }; void Register_sceDmac() { - RegisterModule("sceDmac", ARRAY_SIZE(sceDmac), sceDmac); + RegisterHLEModule("sceDmac", ARRAY_SIZE(sceDmac), sceDmac); } diff --git a/Core/HLE/sceFont.cpp b/Core/HLE/sceFont.cpp index bd26a47f2f..2a06454f79 100644 --- a/Core/HLE/sceFont.cpp +++ b/Core/HLE/sceFont.cpp @@ -1669,9 +1669,9 @@ const HLEFunction sceLibFont[] = { }; void Register_sceFont() { - RegisterModule("sceLibFont", ARRAY_SIZE(sceLibFont), sceLibFont); + RegisterHLEModule("sceLibFont", ARRAY_SIZE(sceLibFont), sceLibFont); } void Register_sceLibFttt() { - RegisterModule("sceLibFttt", ARRAY_SIZE(sceLibFont), sceLibFont); + RegisterHLEModule("sceLibFttt", ARRAY_SIZE(sceLibFont), sceLibFont); } diff --git a/Core/HLE/sceG729.cpp b/Core/HLE/sceG729.cpp index 9030eca9ba..c143d4486d 100644 --- a/Core/HLE/sceG729.cpp +++ b/Core/HLE/sceG729.cpp @@ -36,5 +36,5 @@ const HLEFunction sceG729[] = void Register_sceG729() { - RegisterModule("sceG729", ARRAY_SIZE(sceG729), sceG729); + RegisterHLEModule("sceG729", ARRAY_SIZE(sceG729), sceG729); } diff --git a/Core/HLE/sceGameUpdate.cpp b/Core/HLE/sceGameUpdate.cpp index 57314172f2..269c238c3c 100644 --- a/Core/HLE/sceGameUpdate.cpp +++ b/Core/HLE/sceGameUpdate.cpp @@ -53,5 +53,5 @@ const HLEFunction sceGameUpdate[] = void Register_sceGameUpdate() { - RegisterModule("sceGameUpdate", ARRAY_SIZE(sceGameUpdate), sceGameUpdate); + RegisterHLEModule("sceGameUpdate", ARRAY_SIZE(sceGameUpdate), sceGameUpdate); } diff --git a/Core/HLE/sceGe.cpp b/Core/HLE/sceGe.cpp index e2727436d1..31cca8352c 100644 --- a/Core/HLE/sceGe.cpp +++ b/Core/HLE/sceGe.cpp @@ -643,5 +643,5 @@ const HLEFunction sceGe_user[] = { }; void Register_sceGe_user() { - RegisterModule("sceGe_user", ARRAY_SIZE(sceGe_user), sceGe_user); + RegisterHLEModule("sceGe_user", ARRAY_SIZE(sceGe_user), sceGe_user); } diff --git a/Core/HLE/sceHeap.cpp b/Core/HLE/sceHeap.cpp index 48d8a83076..6797e30b60 100644 --- a/Core/HLE/sceHeap.cpp +++ b/Core/HLE/sceHeap.cpp @@ -250,5 +250,5 @@ static const HLEFunction sceHeap[] = void Register_sceHeap() { - RegisterModule("sceHeap", ARRAY_SIZE(sceHeap), sceHeap); + RegisterHLEModule("sceHeap", ARRAY_SIZE(sceHeap), sceHeap); } diff --git a/Core/HLE/sceHprm.cpp b/Core/HLE/sceHprm.cpp index fb2b56ffd9..688ccf3087 100644 --- a/Core/HLE/sceHprm.cpp +++ b/Core/HLE/sceHprm.cpp @@ -72,5 +72,5 @@ const HLEFunction sceHprm[] = void Register_sceHprm() { - RegisterModule("sceHprm", ARRAY_SIZE(sceHprm), sceHprm); + RegisterHLEModule("sceHprm", ARRAY_SIZE(sceHprm), sceHprm); } diff --git a/Core/HLE/sceHttp.cpp b/Core/HLE/sceHttp.cpp index 01f2c89037..288cc1d91a 100644 --- a/Core/HLE/sceHttp.cpp +++ b/Core/HLE/sceHttp.cpp @@ -874,5 +874,5 @@ const HLEFunction sceHttp[] = { void Register_sceHttp() { - RegisterModule("sceHttp",ARRAY_SIZE(sceHttp),sceHttp); + RegisterHLEModule("sceHttp",ARRAY_SIZE(sceHttp),sceHttp); } diff --git a/Core/HLE/sceImpose.cpp b/Core/HLE/sceImpose.cpp index 828c59c972..1298b78afe 100644 --- a/Core/HLE/sceImpose.cpp +++ b/Core/HLE/sceImpose.cpp @@ -125,5 +125,5 @@ const HLEFunction sceImpose[] = { }; void Register_sceImpose() { - RegisterModule("sceImpose", ARRAY_SIZE(sceImpose), sceImpose); + RegisterHLEModule("sceImpose", ARRAY_SIZE(sceImpose), sceImpose); } diff --git a/Core/HLE/sceIo.cpp b/Core/HLE/sceIo.cpp index 1ec25c8aae..a8c754e9ad 100644 --- a/Core/HLE/sceIo.cpp +++ b/Core/HLE/sceIo.cpp @@ -3013,7 +3013,7 @@ const HLEFunction IoFileMgrForUser[] = { }; void Register_IoFileMgrForUser() { - RegisterModule("IoFileMgrForUser", ARRAY_SIZE(IoFileMgrForUser), IoFileMgrForUser); + RegisterHLEModule("IoFileMgrForUser", ARRAY_SIZE(IoFileMgrForUser), IoFileMgrForUser); } const HLEFunction IoFileMgrForKernel[] = { @@ -3053,7 +3053,7 @@ const HLEFunction IoFileMgrForKernel[] = { }; void Register_IoFileMgrForKernel() { - RegisterModule("IoFileMgrForKernel", ARRAY_SIZE(IoFileMgrForKernel), IoFileMgrForKernel); + RegisterHLEModule("IoFileMgrForKernel", ARRAY_SIZE(IoFileMgrForKernel), IoFileMgrForKernel); } const HLEFunction StdioForUser[] = { @@ -3071,7 +3071,7 @@ const HLEFunction StdioForUser[] = { }; void Register_StdioForUser() { - RegisterModule("StdioForUser", ARRAY_SIZE(StdioForUser), StdioForUser); + RegisterHLEModule("StdioForUser", ARRAY_SIZE(StdioForUser), StdioForUser); } const HLEFunction StdioForKernel[] = { @@ -3086,5 +3086,5 @@ const HLEFunction StdioForKernel[] = { }; void Register_StdioForKernel() { - RegisterModule("StdioForKernel", ARRAY_SIZE(StdioForKernel), StdioForKernel); + RegisterHLEModule("StdioForKernel", ARRAY_SIZE(StdioForKernel), StdioForKernel); } diff --git a/Core/HLE/sceJpeg.cpp b/Core/HLE/sceJpeg.cpp index 6a36851aa6..366499d3ba 100644 --- a/Core/HLE/sceJpeg.cpp +++ b/Core/HLE/sceJpeg.cpp @@ -655,5 +655,5 @@ const HLEFunction sceJpeg[] = }; void Register_sceJpeg() { - RegisterModule("sceJpeg", ARRAY_SIZE(sceJpeg), sceJpeg); + RegisterHLEModule("sceJpeg", ARRAY_SIZE(sceJpeg), sceJpeg); } diff --git a/Core/HLE/sceKernel.cpp b/Core/HLE/sceKernel.cpp index a3804e5f06..44c83ecdb5 100644 --- a/Core/HLE/sceKernel.cpp +++ b/Core/HLE/sceKernel.cpp @@ -946,7 +946,7 @@ const HLEFunction ThreadManForKernel[] = void Register_ThreadManForUser() { - RegisterModule("ThreadManForUser", ARRAY_SIZE(ThreadManForUser), ThreadManForUser); + RegisterHLEModule("ThreadManForUser", ARRAY_SIZE(ThreadManForUser), ThreadManForUser); } @@ -962,7 +962,7 @@ const HLEFunction LoadExecForUser[] = void Register_LoadExecForUser() { - RegisterModule("LoadExecForUser", ARRAY_SIZE(LoadExecForUser), LoadExecForUser); + RegisterHLEModule("LoadExecForUser", ARRAY_SIZE(LoadExecForUser), LoadExecForUser); } const HLEFunction LoadExecForKernel[] = @@ -975,7 +975,7 @@ const HLEFunction LoadExecForKernel[] = void Register_LoadExecForKernel() { - RegisterModule("LoadExecForKernel", ARRAY_SIZE(LoadExecForKernel), LoadExecForKernel); + RegisterHLEModule("LoadExecForKernel", ARRAY_SIZE(LoadExecForKernel), LoadExecForKernel); } const HLEFunction ExceptionManagerForKernel[] = @@ -992,7 +992,7 @@ const HLEFunction ExceptionManagerForKernel[] = void Register_ExceptionManagerForKernel() { - RegisterModule("ExceptionManagerForKernel", ARRAY_SIZE(ExceptionManagerForKernel), ExceptionManagerForKernel); + RegisterHLEModule("ExceptionManagerForKernel", ARRAY_SIZE(ExceptionManagerForKernel), ExceptionManagerForKernel); } // Seen in some homebrew @@ -1021,12 +1021,12 @@ const HLEFunction UtilsForKernel[] = { void Register_UtilsForKernel() { - RegisterModule("UtilsForKernel", ARRAY_SIZE(UtilsForKernel), UtilsForKernel); + RegisterHLEModule("UtilsForKernel", ARRAY_SIZE(UtilsForKernel), UtilsForKernel); } void Register_ThreadManForKernel() { - RegisterModule("ThreadManForKernel", ARRAY_SIZE(ThreadManForKernel), ThreadManForKernel); + RegisterHLEModule("ThreadManForKernel", ARRAY_SIZE(ThreadManForKernel), ThreadManForKernel); } const char *KernelErrorToString(u32 err) { diff --git a/Core/HLE/sceKernelHeap.cpp b/Core/HLE/sceKernelHeap.cpp index 5c4439e7e7..0bfb214c50 100644 --- a/Core/HLE/sceKernelHeap.cpp +++ b/Core/HLE/sceKernelHeap.cpp @@ -174,5 +174,5 @@ const HLEFunction SysMemForKernel[] = { }; void Register_SysMemForKernel() { - RegisterModule("SysMemForKernel", ARRAY_SIZE(SysMemForKernel), SysMemForKernel); + RegisterHLEModule("SysMemForKernel", ARRAY_SIZE(SysMemForKernel), SysMemForKernel); } diff --git a/Core/HLE/sceKernelInterrupt.cpp b/Core/HLE/sceKernelInterrupt.cpp index e847e54164..a83731553b 100644 --- a/Core/HLE/sceKernelInterrupt.cpp +++ b/Core/HLE/sceKernelInterrupt.cpp @@ -1005,12 +1005,12 @@ const HLEFunction SysclibForKernel[] = void Register_Kernel_Library() { - RegisterModule("Kernel_Library", ARRAY_SIZE(Kernel_Library), Kernel_Library); + RegisterHLEModule("Kernel_Library", ARRAY_SIZE(Kernel_Library), Kernel_Library); } void Register_SysclibForKernel() { - RegisterModule("SysclibForKernel", ARRAY_SIZE(SysclibForKernel), SysclibForKernel); + RegisterHLEModule("SysclibForKernel", ARRAY_SIZE(SysclibForKernel), SysclibForKernel); } const HLEFunction InterruptManager[] = @@ -1029,7 +1029,7 @@ const HLEFunction InterruptManager[] = void Register_InterruptManager() { - RegisterModule("InterruptManager", ARRAY_SIZE(InterruptManager), InterruptManager); + RegisterHLEModule("InterruptManager", ARRAY_SIZE(InterruptManager), InterruptManager); } @@ -1057,5 +1057,5 @@ const HLEFunction InterruptManagerForKernel[] = void Register_InterruptManagerForKernel() { - RegisterModule("InterruptManagerForKernel", ARRAY_SIZE(InterruptManagerForKernel), InterruptManagerForKernel); + RegisterHLEModule("InterruptManagerForKernel", ARRAY_SIZE(InterruptManagerForKernel), InterruptManagerForKernel); } diff --git a/Core/HLE/sceKernelMemory.cpp b/Core/HLE/sceKernelMemory.cpp index eaf77c4564..423c31c771 100644 --- a/Core/HLE/sceKernelMemory.cpp +++ b/Core/HLE/sceKernelMemory.cpp @@ -2118,5 +2118,5 @@ const HLEFunction SysMemUserForUser[] = { }; void Register_SysMemUserForUser() { - RegisterModule("SysMemUserForUser", ARRAY_SIZE(SysMemUserForUser), SysMemUserForUser); + RegisterHLEModule("SysMemUserForUser", ARRAY_SIZE(SysMemUserForUser), SysMemUserForUser); } diff --git a/Core/HLE/sceKernelModule.cpp b/Core/HLE/sceKernelModule.cpp index 5f8939a18d..494f13aea0 100644 --- a/Core/HLE/sceKernelModule.cpp +++ b/Core/HLE/sceKernelModule.cpp @@ -286,11 +286,11 @@ void PSPModule::ImportFunc(const FuncSymbolImport &func, bool reimporting) { return; } - DEBUG_LOG(Log::Loader, "Importing %s : %08x", GetFuncName(func.moduleName, func.nid), func.stubAddr); + DEBUG_LOG(Log::Loader, "Importing %s : %08x", GetHLEFuncName(func.moduleName, func.nid), func.stubAddr); // Add the symbol to the symbol map for debugging. char temp[256]; - snprintf(temp, sizeof(temp), "zz_%s", GetFuncName(func.moduleName, func.nid)); + snprintf(temp, sizeof(temp), "zz_%s", GetHLEFuncName(func.moduleName, func.nid)); g_symbolMap->AddFunction(temp, func.stubAddr, 8); // Keep track and actually hook it up if possible. @@ -644,7 +644,7 @@ void ImportFuncSymbol(const FuncSymbolImport &func, bool reimporting, const char // TODO: Or not? if (FuncImportIsSyscall(func.moduleName, func.nid)) { if (reimporting && Memory::Read_Instruction(func.stubAddr + 4) != GetSyscallOp(func.moduleName, func.nid)) { - WARN_LOG(Log::Loader, "Reimporting updated syscall %s", GetFuncName(func.moduleName, func.nid)); + WARN_LOG(Log::Loader, "Reimporting updated syscall %s", GetHLEFuncName(func.moduleName, func.nid)); } WriteSyscall(func.moduleName, func.nid, func.stubAddr); currentMIPS->InvalidateICache(func.stubAddr, 8); @@ -677,15 +677,15 @@ void ImportFuncSymbol(const FuncSymbolImport &func, bool reimporting, const char } } - // It hasn't been exported yet, but hopefully it will later. - bool isKnownModule = GetModuleIndex(func.moduleName) != -1; - if (isKnownModule) { + // It hasn't been exported yet, but hopefully it will later. Check if we know about it through HLE. + const bool isKnownHLEModule = GetHLEModuleIndex(func.moduleName) != -1; + if (isKnownHLEModule) { // We used to report this, but I don't think it's very interesting anymore. - WARN_LOG(Log::Loader, "Unknown syscall from known module '%s': 0x%08x (import for '%s')", func.moduleName, func.nid, importingModule); + WARN_LOG(Log::Loader, "Unknown syscall from known HLE module '%s': 0x%08x (import for '%s')", func.moduleName, func.nid, importingModule); } else { INFO_LOG(Log::Loader, "Function (%s,%08x) unresolved in '%s', storing for later resolving", func.moduleName, func.nid, importingModule); } - if (isKnownModule || !reimporting) { + if (isKnownHLEModule || !reimporting) { WriteFuncMissingStub(func.stubAddr, func.nid); currentMIPS->InvalidateICache(func.stubAddr, 8); } @@ -2607,9 +2607,9 @@ const HLEFunction ModuleMgrForKernel[] = { }; void Register_ModuleMgrForUser() { - RegisterModule("ModuleMgrForUser", ARRAY_SIZE(ModuleMgrForUser), ModuleMgrForUser); + RegisterHLEModule("ModuleMgrForUser", ARRAY_SIZE(ModuleMgrForUser), ModuleMgrForUser); } void Register_ModuleMgrForKernel() { - RegisterModule("ModuleMgrForKernel", ARRAY_SIZE(ModuleMgrForKernel), ModuleMgrForKernel); + RegisterHLEModule("ModuleMgrForKernel", ARRAY_SIZE(ModuleMgrForKernel), ModuleMgrForKernel); } diff --git a/Core/HLE/sceKernelSemaphore.cpp b/Core/HLE/sceKernelSemaphore.cpp index 70908f34ab..e5bc89c794 100644 --- a/Core/HLE/sceKernelSemaphore.cpp +++ b/Core/HLE/sceKernelSemaphore.cpp @@ -427,5 +427,5 @@ const HLEFunction semaphore[] = { }; void Register_semaphore() { - RegisterModule("semaphore", ARRAY_SIZE(semaphore), semaphore); + RegisterHLEModule("semaphore", ARRAY_SIZE(semaphore), semaphore); } diff --git a/Core/HLE/sceMd5.cpp b/Core/HLE/sceMd5.cpp index 7a279d5bcb..8ac8d02c61 100644 --- a/Core/HLE/sceMd5.cpp +++ b/Core/HLE/sceMd5.cpp @@ -185,5 +185,5 @@ const HLEFunction sceMd5[] = { }; void Register_sceMd5() { - RegisterModule("sceMd5", ARRAY_SIZE(sceMd5), sceMd5); + RegisterHLEModule("sceMd5", ARRAY_SIZE(sceMd5), sceMd5); } diff --git a/Core/HLE/sceMp3.cpp b/Core/HLE/sceMp3.cpp index 6a5f57d990..cd17d8829c 100644 --- a/Core/HLE/sceMp3.cpp +++ b/Core/HLE/sceMp3.cpp @@ -782,5 +782,5 @@ const HLEFunction sceMp3[] = { }; void Register_sceMp3() { - RegisterModule("sceMp3", ARRAY_SIZE(sceMp3), sceMp3); + RegisterHLEModule("sceMp3", ARRAY_SIZE(sceMp3), sceMp3); } diff --git a/Core/HLE/sceMp4.cpp b/Core/HLE/sceMp4.cpp index d9fb3e3b34..2c98b19e88 100644 --- a/Core/HLE/sceMp4.cpp +++ b/Core/HLE/sceMp4.cpp @@ -185,9 +185,9 @@ const HLEFunction mp4msv[] = { }; void Register_sceMp4() { - RegisterModule("sceMp4", ARRAY_SIZE(sceMp4), sceMp4); + RegisterHLEModule("sceMp4", ARRAY_SIZE(sceMp4), sceMp4); } void Register_mp4msv() { - RegisterModule("mp4msv", ARRAY_SIZE(mp4msv), mp4msv); + RegisterHLEModule("mp4msv", ARRAY_SIZE(mp4msv), mp4msv); } diff --git a/Core/HLE/sceMpeg.cpp b/Core/HLE/sceMpeg.cpp index 471932475a..b9d6b25a88 100644 --- a/Core/HLE/sceMpeg.cpp +++ b/Core/HLE/sceMpeg.cpp @@ -2318,7 +2318,7 @@ const HLEFunction sceMpeg[] = void Register_sceMpeg() { - RegisterModule("sceMpeg", ARRAY_SIZE(sceMpeg), sceMpeg); + RegisterHLEModule("sceMpeg", ARRAY_SIZE(sceMpeg), sceMpeg); } // This function is currently only been used for PMP videos @@ -2354,5 +2354,5 @@ const HLEFunction sceMpegbase[] = void Register_sceMpegbase() { - RegisterModule("sceMpegbase", ARRAY_SIZE(sceMpegbase), sceMpegbase); + RegisterHLEModule("sceMpegbase", ARRAY_SIZE(sceMpegbase), sceMpegbase); }; diff --git a/Core/HLE/sceMt19937.cpp b/Core/HLE/sceMt19937.cpp index 6b7e8d43cf..198ec25555 100644 --- a/Core/HLE/sceMt19937.cpp +++ b/Core/HLE/sceMt19937.cpp @@ -56,5 +56,5 @@ const HLEFunction sceMt19937[] = void Register_sceMt19937() { - RegisterModule("sceMt19937", ARRAY_SIZE(sceMt19937), sceMt19937); + RegisterHLEModule("sceMt19937", ARRAY_SIZE(sceMt19937), sceMt19937); } diff --git a/Core/HLE/sceNet.cpp b/Core/HLE/sceNet.cpp index 91c50bb6ee..adc332f8ea 100644 --- a/Core/HLE/sceNet.cpp +++ b/Core/HLE/sceNet.cpp @@ -1720,21 +1720,21 @@ const HLEFunction sceNetIfhandle[] = { }; void Register_sceNet() { - RegisterModule("sceNet", ARRAY_SIZE(sceNet), sceNet); + RegisterHLEModule("sceNet", ARRAY_SIZE(sceNet), sceNet); } void Register_sceNetApctl() { - RegisterModule("sceNetApctl", ARRAY_SIZE(sceNetApctl), sceNetApctl); + RegisterHLEModule("sceNetApctl", ARRAY_SIZE(sceNetApctl), sceNetApctl); } void Register_sceWlanDrv() { - RegisterModule("sceWlanDrv", ARRAY_SIZE(sceWlanDrv), sceWlanDrv); + RegisterHLEModule("sceWlanDrv", ARRAY_SIZE(sceWlanDrv), sceWlanDrv); } void Register_sceNetUpnp() { - RegisterModule("sceNetUpnp", ARRAY_SIZE(sceNetUpnp), sceNetUpnp); + RegisterHLEModule("sceNetUpnp", ARRAY_SIZE(sceNetUpnp), sceNetUpnp); } void Register_sceNetIfhandle() { - RegisterModule("sceNetIfhandle", ARRAY_SIZE(sceNetIfhandle), sceNetIfhandle); + RegisterHLEModule("sceNetIfhandle", ARRAY_SIZE(sceNetIfhandle), sceNetIfhandle); } diff --git a/Core/HLE/sceNetAdhoc.cpp b/Core/HLE/sceNetAdhoc.cpp index e081888890..a187591bf2 100644 --- a/Core/HLE/sceNetAdhoc.cpp +++ b/Core/HLE/sceNetAdhoc.cpp @@ -5235,13 +5235,13 @@ const HLEFunction sceNetAdhocDiscover[] = { }; void Register_sceNetAdhoc() { - RegisterModule("sceNetAdhoc", ARRAY_SIZE(sceNetAdhoc), sceNetAdhoc); + RegisterHLEModule("sceNetAdhoc", ARRAY_SIZE(sceNetAdhoc), sceNetAdhoc); } void Register_sceNetAdhocDiscover() { - RegisterModule("sceNetAdhocDiscover", ARRAY_SIZE(sceNetAdhocDiscover), sceNetAdhocDiscover); + RegisterHLEModule("sceNetAdhocDiscover", ARRAY_SIZE(sceNetAdhocDiscover), sceNetAdhocDiscover); } void Register_sceNetAdhocctl() { - RegisterModule("sceNetAdhocctl", ARRAY_SIZE(sceNetAdhocctl), sceNetAdhocctl); + RegisterHLEModule("sceNetAdhocctl", ARRAY_SIZE(sceNetAdhocctl), sceNetAdhocctl); } diff --git a/Core/HLE/sceNetAdhocMatching.cpp b/Core/HLE/sceNetAdhocMatching.cpp index 1b275ec1ac..9351b8d761 100644 --- a/Core/HLE/sceNetAdhocMatching.cpp +++ b/Core/HLE/sceNetAdhocMatching.cpp @@ -2677,7 +2677,7 @@ const HLEFunction sceNetAdhocMatching[] = { void Register_sceNetAdhocMatching() { - RegisterModule("sceNetAdhocMatching", ARRAY_SIZE(sceNetAdhocMatching), sceNetAdhocMatching); + RegisterHLEModule("sceNetAdhocMatching", ARRAY_SIZE(sceNetAdhocMatching), sceNetAdhocMatching); } void __NetAdhocMatchingInit() { diff --git a/Core/HLE/sceNetInet.cpp b/Core/HLE/sceNetInet.cpp index a749b2bbc5..f199d8b369 100644 --- a/Core/HLE/sceNetInet.cpp +++ b/Core/HLE/sceNetInet.cpp @@ -1205,5 +1205,5 @@ const HLEFunction sceNetInet[] = { }; void Register_sceNetInet() { - RegisterModule("sceNetInet", std::size(sceNetInet), sceNetInet); + RegisterHLEModule("sceNetInet", std::size(sceNetInet), sceNetInet); } diff --git a/Core/HLE/sceNetResolver.cpp b/Core/HLE/sceNetResolver.cpp index 4bcba1904b..ed83fd58ba 100644 --- a/Core/HLE/sceNetResolver.cpp +++ b/Core/HLE/sceNetResolver.cpp @@ -294,5 +294,5 @@ const HLEFunction sceNetResolver[] = { }; void Register_sceNetResolver() { - RegisterModule("sceNetResolver", ARRAY_SIZE(sceNetResolver), sceNetResolver); + RegisterHLEModule("sceNetResolver", ARRAY_SIZE(sceNetResolver), sceNetResolver); } diff --git a/Core/HLE/sceNet_lib.cpp b/Core/HLE/sceNet_lib.cpp index 6fd2f956f4..593493e235 100644 --- a/Core/HLE/sceNet_lib.cpp +++ b/Core/HLE/sceNet_lib.cpp @@ -133,5 +133,5 @@ const HLEFunction sceNet_lib[] = { void Register_sceNet_lib() { - RegisterModule("sceNet_lib", ARRAY_SIZE(sceNet_lib), sceNet_lib); + RegisterHLEModule("sceNet_lib", ARRAY_SIZE(sceNet_lib), sceNet_lib); } diff --git a/Core/HLE/sceNp.cpp b/Core/HLE/sceNp.cpp index ffe899757c..c66a9f1799 100644 --- a/Core/HLE/sceNp.cpp +++ b/Core/HLE/sceNp.cpp @@ -307,7 +307,7 @@ const HLEFunction sceNp[] = { void Register_sceNp() { - RegisterModule("sceNp", ARRAY_SIZE(sceNp), sceNp); + RegisterHLEModule("sceNp", ARRAY_SIZE(sceNp), sceNp); } static int sceNpAuthTerm() @@ -552,7 +552,7 @@ const HLEFunction sceNpAuth[] = { void Register_sceNpAuth() { - RegisterModule("sceNpAuth", ARRAY_SIZE(sceNpAuth), sceNpAuth); + RegisterHLEModule("sceNpAuth", ARRAY_SIZE(sceNpAuth), sceNpAuth); } static int sceNpServiceTerm() @@ -637,7 +637,7 @@ const HLEFunction sceNpService[] = { void Register_sceNpService() { - RegisterModule("sceNpService", ARRAY_SIZE(sceNpService), sceNpService); + RegisterHLEModule("sceNpService", ARRAY_SIZE(sceNpService), sceNpService); } // TODO: Move NpCommerce2-related stuff to sceNpCommerce2.cpp? @@ -662,6 +662,6 @@ const HLEFunction sceNpCommerce2[] = { void Register_sceNpCommerce2() { - RegisterModule("sceNpCommerce2", ARRAY_SIZE(sceNpCommerce2), sceNpCommerce2); + RegisterHLEModule("sceNpCommerce2", ARRAY_SIZE(sceNpCommerce2), sceNpCommerce2); } diff --git a/Core/HLE/sceNp2.cpp b/Core/HLE/sceNp2.cpp index b1ae418f33..977e006621 100644 --- a/Core/HLE/sceNp2.cpp +++ b/Core/HLE/sceNp2.cpp @@ -602,5 +602,5 @@ const HLEFunction sceNpMatching2[] = { void Register_sceNpMatching2() { - RegisterModule("sceNpMatching2", ARRAY_SIZE(sceNpMatching2), sceNpMatching2); + RegisterHLEModule("sceNpMatching2", ARRAY_SIZE(sceNpMatching2), sceNpMatching2); } diff --git a/Core/HLE/sceOpenPSID.cpp b/Core/HLE/sceOpenPSID.cpp index f3e4d07c13..058e2491e5 100644 --- a/Core/HLE/sceOpenPSID.cpp +++ b/Core/HLE/sceOpenPSID.cpp @@ -82,7 +82,7 @@ const HLEFunction sceOpenPSID[] = { void Register_sceOpenPSID() { - RegisterModule("sceOpenPSID", ARRAY_SIZE(sceOpenPSID), sceOpenPSID); + RegisterHLEModule("sceOpenPSID", ARRAY_SIZE(sceOpenPSID), sceOpenPSID); } // According to https://playstationdev.wiki/pspprxlibraries/5.00/kd/openpsid.xml @@ -95,7 +95,7 @@ const HLEFunction sceOpenPSID_driver[] = void Register_sceOpenPSID_driver() { - RegisterModule("sceOpenPSID_driver", ARRAY_SIZE(sceOpenPSID_driver), sceOpenPSID_driver); + RegisterHLEModule("sceOpenPSID_driver", ARRAY_SIZE(sceOpenPSID_driver), sceOpenPSID_driver); } const HLEFunction sceDdrdb[] = { @@ -104,5 +104,5 @@ const HLEFunction sceDdrdb[] = void Register_sceDdrdb() { - RegisterModule("sceDdrdb", ARRAY_SIZE(sceDdrdb), sceDdrdb); + RegisterHLEModule("sceDdrdb", ARRAY_SIZE(sceDdrdb), sceDdrdb); } diff --git a/Core/HLE/sceP3da.cpp b/Core/HLE/sceP3da.cpp index d130206dbe..0527d0c0dc 100644 --- a/Core/HLE/sceP3da.cpp +++ b/Core/HLE/sceP3da.cpp @@ -73,5 +73,5 @@ const HLEFunction sceP3da[] = void Register_sceP3da() { - RegisterModule("sceP3da", ARRAY_SIZE(sceP3da), sceP3da); + RegisterHLEModule("sceP3da", ARRAY_SIZE(sceP3da), sceP3da); } diff --git a/Core/HLE/sceParseHttp.cpp b/Core/HLE/sceParseHttp.cpp index 58826bb556..5b98e4fc81 100644 --- a/Core/HLE/sceParseHttp.cpp +++ b/Core/HLE/sceParseHttp.cpp @@ -175,5 +175,5 @@ const HLEFunction sceParseHttp[] = { }; void Register_sceParseHttp() { - RegisterModule("sceParseHttp", ARRAY_SIZE(sceParseHttp), sceParseHttp); + RegisterHLEModule("sceParseHttp", ARRAY_SIZE(sceParseHttp), sceParseHttp); } diff --git a/Core/HLE/sceParseUri.cpp b/Core/HLE/sceParseUri.cpp index 7729652907..e450946759 100644 --- a/Core/HLE/sceParseUri.cpp +++ b/Core/HLE/sceParseUri.cpp @@ -163,5 +163,5 @@ const HLEFunction sceParseUri[] = void Register_sceParseUri() { - RegisterModule("sceParseUri", ARRAY_SIZE(sceParseUri), sceParseUri); + RegisterHLEModule("sceParseUri", ARRAY_SIZE(sceParseUri), sceParseUri); } diff --git a/Core/HLE/scePauth.cpp b/Core/HLE/scePauth.cpp index a9915e9ebc..cdd61e2eef 100644 --- a/Core/HLE/scePauth.cpp +++ b/Core/HLE/scePauth.cpp @@ -68,5 +68,5 @@ const HLEFunction scePauth[] = { void Register_scePauth() { - RegisterModule("scePauth", ARRAY_SIZE(scePauth), scePauth); + RegisterHLEModule("scePauth", ARRAY_SIZE(scePauth), scePauth); } diff --git a/Core/HLE/scePower.cpp b/Core/HLE/scePower.cpp index 5734efd6e8..087735caed 100644 --- a/Core/HLE/scePower.cpp +++ b/Core/HLE/scePower.cpp @@ -630,9 +630,9 @@ const HLEFunction sceSuspendForUser[] = { void Register_scePower() { - RegisterModule("scePower",ARRAY_SIZE(scePower),scePower); + RegisterHLEModule("scePower",ARRAY_SIZE(scePower),scePower); } void Register_sceSuspendForUser() { - RegisterModule("sceSuspendForUser", ARRAY_SIZE(sceSuspendForUser), sceSuspendForUser); + RegisterHLEModule("sceSuspendForUser", ARRAY_SIZE(sceSuspendForUser), sceSuspendForUser); } diff --git a/Core/HLE/scePsmf.cpp b/Core/HLE/scePsmf.cpp index dc69178291..98ad3865e9 100644 --- a/Core/HLE/scePsmf.cpp +++ b/Core/HLE/scePsmf.cpp @@ -2051,9 +2051,9 @@ const HLEFunction scePsmfPlayer[] = }; void Register_scePsmf() { - RegisterModule("scePsmf",ARRAY_SIZE(scePsmf),scePsmf); + RegisterHLEModule("scePsmf",ARRAY_SIZE(scePsmf),scePsmf); } void Register_scePsmfPlayer() { - RegisterModule("scePsmfPlayer",ARRAY_SIZE(scePsmfPlayer),scePsmfPlayer); + RegisterHLEModule("scePsmfPlayer",ARRAY_SIZE(scePsmfPlayer),scePsmfPlayer); } diff --git a/Core/HLE/scePspNpDrm_user.cpp b/Core/HLE/scePspNpDrm_user.cpp index ef79fd03d6..4eef617052 100644 --- a/Core/HLE/scePspNpDrm_user.cpp +++ b/Core/HLE/scePspNpDrm_user.cpp @@ -53,7 +53,7 @@ const HLEFunction sceNpDrm[] = { }; void Register_sceNpDrm() { - RegisterModule("sceNpDrm", ARRAY_SIZE(sceNpDrm), sceNpDrm); - RegisterModule("scePspNpDrm_user", ARRAY_SIZE(sceNpDrm), sceNpDrm); + RegisterHLEModule("sceNpDrm", ARRAY_SIZE(sceNpDrm), sceNpDrm); + RegisterHLEModule("scePspNpDrm_user", ARRAY_SIZE(sceNpDrm), sceNpDrm); } diff --git a/Core/HLE/sceRtc.cpp b/Core/HLE/sceRtc.cpp index 885eab5ee9..5129346404 100644 --- a/Core/HLE/sceRtc.cpp +++ b/Core/HLE/sceRtc.cpp @@ -1015,5 +1015,5 @@ const HLEFunction sceRtc[] = void Register_sceRtc() { - RegisterModule("sceRtc", ARRAY_SIZE(sceRtc), sceRtc); + RegisterHLEModule("sceRtc", ARRAY_SIZE(sceRtc), sceRtc); } diff --git a/Core/HLE/sceSas.cpp b/Core/HLE/sceSas.cpp index 0d9d854adf..94a4205a8a 100644 --- a/Core/HLE/sceSas.cpp +++ b/Core/HLE/sceSas.cpp @@ -764,6 +764,6 @@ const HLEFunction sceSasCore[] = { void Register_sceSasCore() { - RegisterModule("sceSasCore", ARRAY_SIZE(sceSasCore), sceSasCore); + RegisterHLEModule("sceSasCore", ARRAY_SIZE(sceSasCore), sceSasCore); } diff --git a/Core/HLE/sceSfmt19937.cpp b/Core/HLE/sceSfmt19937.cpp index 4e56b97c41..f05aa5138a 100644 --- a/Core/HLE/sceSfmt19937.cpp +++ b/Core/HLE/sceSfmt19937.cpp @@ -119,5 +119,5 @@ const HLEFunction sceSfmt19937[] = void Register_sceSfmt19937() { - RegisterModule("sceSfmt19937", ARRAY_SIZE(sceSfmt19937), sceSfmt19937); + RegisterHLEModule("sceSfmt19937", ARRAY_SIZE(sceSfmt19937), sceSfmt19937); } diff --git a/Core/HLE/sceSha256.cpp b/Core/HLE/sceSha256.cpp index 1663d64bba..a24f4afc0a 100644 --- a/Core/HLE/sceSha256.cpp +++ b/Core/HLE/sceSha256.cpp @@ -45,5 +45,5 @@ const HLEFunction sceSha256[] = void Register_sceSha256() { - RegisterModule("sceSha256", ARRAY_SIZE(sceSha256), sceSha256); + RegisterHLEModule("sceSha256", ARRAY_SIZE(sceSha256), sceSha256); } diff --git a/Core/HLE/sceSircs.cpp b/Core/HLE/sceSircs.cpp index 981aa71e58..f7a7eb21fb 100644 --- a/Core/HLE/sceSircs.cpp +++ b/Core/HLE/sceSircs.cpp @@ -52,5 +52,5 @@ const HLEFunction sceSircs[] = void Register_sceSircs() { - RegisterModule("sceSircs", ARRAY_SIZE(sceSircs), sceSircs); + RegisterHLEModule("sceSircs", ARRAY_SIZE(sceSircs), sceSircs); } diff --git a/Core/HLE/sceSsl.cpp b/Core/HLE/sceSsl.cpp index 0d7a12890e..f1c668c995 100644 --- a/Core/HLE/sceSsl.cpp +++ b/Core/HLE/sceSsl.cpp @@ -122,5 +122,5 @@ const HLEFunction sceSsl[] = void Register_sceSsl() { - RegisterModule("sceSsl", ARRAY_SIZE(sceSsl), sceSsl); + RegisterHLEModule("sceSsl", ARRAY_SIZE(sceSsl), sceSsl); } diff --git a/Core/HLE/sceUmd.cpp b/Core/HLE/sceUmd.cpp index 844eb54657..87834dd713 100644 --- a/Core/HLE/sceUmd.cpp +++ b/Core/HLE/sceUmd.cpp @@ -534,5 +534,5 @@ const HLEFunction sceUmdUser[] = void Register_sceUmdUser() { - RegisterModule("sceUmdUser", ARRAY_SIZE(sceUmdUser), sceUmdUser); + RegisterHLEModule("sceUmdUser", ARRAY_SIZE(sceUmdUser), sceUmdUser); } diff --git a/Core/HLE/sceUsb.cpp b/Core/HLE/sceUsb.cpp index a031be6356..d890000f41 100644 --- a/Core/HLE/sceUsb.cpp +++ b/Core/HLE/sceUsb.cpp @@ -241,7 +241,7 @@ const HLEFunction sceUsbstorBoot[] = void Register_sceUsb() { - RegisterModule("sceUsbstor", ARRAY_SIZE(sceUsbstor), sceUsbstor); - RegisterModule("sceUsbstorBoot", ARRAY_SIZE(sceUsbstorBoot), sceUsbstorBoot); - RegisterModule("sceUsb", ARRAY_SIZE(sceUsb), sceUsb); + RegisterHLEModule("sceUsbstor", ARRAY_SIZE(sceUsbstor), sceUsbstor); + RegisterHLEModule("sceUsbstorBoot", ARRAY_SIZE(sceUsbstorBoot), sceUsbstorBoot); + RegisterHLEModule("sceUsb", ARRAY_SIZE(sceUsb), sceUsb); } diff --git a/Core/HLE/sceUsbAcc.cpp b/Core/HLE/sceUsbAcc.cpp index d2b83ca67c..da4a3bf473 100644 --- a/Core/HLE/sceUsbAcc.cpp +++ b/Core/HLE/sceUsbAcc.cpp @@ -42,5 +42,5 @@ const HLEFunction sceUsbAcc[] = void Register_sceUsbAcc() { - RegisterModule("sceUsbAcc", ARRAY_SIZE(sceUsbAcc), sceUsbAcc); + RegisterHLEModule("sceUsbAcc", ARRAY_SIZE(sceUsbAcc), sceUsbAcc); } diff --git a/Core/HLE/sceUsbCam.cpp b/Core/HLE/sceUsbCam.cpp index 44542235b4..0046b82023 100644 --- a/Core/HLE/sceUsbCam.cpp +++ b/Core/HLE/sceUsbCam.cpp @@ -324,7 +324,7 @@ const HLEFunction sceUsbCam[] = void Register_sceUsbCam() { - RegisterModule("sceUsbCam", ARRAY_SIZE(sceUsbCam), sceUsbCam); + RegisterHLEModule("sceUsbCam", ARRAY_SIZE(sceUsbCam), sceUsbCam); } std::vector Camera::getDeviceList() { diff --git a/Core/HLE/sceUsbGps.cpp b/Core/HLE/sceUsbGps.cpp index dbd0dd7b7c..e749185675 100644 --- a/Core/HLE/sceUsbGps.cpp +++ b/Core/HLE/sceUsbGps.cpp @@ -127,7 +127,7 @@ const HLEFunction sceUsbGps[] = void Register_sceUsbGps() { - RegisterModule("sceUsbGps", ARRAY_SIZE(sceUsbGps), sceUsbGps); + RegisterHLEModule("sceUsbGps", ARRAY_SIZE(sceUsbGps), sceUsbGps); } void GPS::init() { diff --git a/Core/HLE/sceUsbMic.cpp b/Core/HLE/sceUsbMic.cpp index ec5e9c5a16..07075d1e43 100644 --- a/Core/HLE/sceUsbMic.cpp +++ b/Core/HLE/sceUsbMic.cpp @@ -454,5 +454,5 @@ const HLEFunction sceUsbMic[] = { }; void Register_sceUsbMic() { - RegisterModule("sceUsbMic", ARRAY_SIZE(sceUsbMic), sceUsbMic); + RegisterHLEModule("sceUsbMic", ARRAY_SIZE(sceUsbMic), sceUsbMic); } diff --git a/Core/HLE/sceUtility.cpp b/Core/HLE/sceUtility.cpp index cbe1a8f7c8..108e2e6391 100644 --- a/Core/HLE/sceUtility.cpp +++ b/Core/HLE/sceUtility.cpp @@ -1476,5 +1476,5 @@ const HLEFunction sceUtility[] = void Register_sceUtility() { - RegisterModule("sceUtility", ARRAY_SIZE(sceUtility), sceUtility); + RegisterHLEModule("sceUtility", ARRAY_SIZE(sceUtility), sceUtility); } diff --git a/Core/HLE/sceVaudio.cpp b/Core/HLE/sceVaudio.cpp index cd0969911d..d3a807fc61 100644 --- a/Core/HLE/sceVaudio.cpp +++ b/Core/HLE/sceVaudio.cpp @@ -105,5 +105,5 @@ const HLEFunction sceVaudio[] = { }; void Register_sceVaudio() { - RegisterModule("sceVaudio",ARRAY_SIZE(sceVaudio), sceVaudio ); + RegisterHLEModule("sceVaudio",ARRAY_SIZE(sceVaudio), sceVaudio ); } diff --git a/Core/MIPS/MIPSDis.cpp b/Core/MIPS/MIPSDis.cpp index a6b9d59145..43a2bbbc37 100644 --- a/Core/MIPS/MIPSDis.cpp +++ b/Core/MIPS/MIPSDis.cpp @@ -123,7 +123,7 @@ namespace MIPSDis u32 callno = (op>>6) & 0xFFFFF; //20 bits int funcnum = callno & 0xFFF; int modulenum = (callno & 0xFF000) >> 12; - snprintf(out, outSize, "syscall\t %s", GetFuncName(modulenum, funcnum)); + snprintf(out, outSize, "syscall\t %s", GetHLEFuncName(modulenum, funcnum)); } void Dis_ToHiloTransfer(MIPSOpcode op, uint32_t pc, char *out, size_t outSize) { diff --git a/UI/ImDebugger/ImDebugger.cpp b/UI/ImDebugger/ImDebugger.cpp index 94a2d6a1fa..028b500481 100644 --- a/UI/ImDebugger/ImDebugger.cpp +++ b/UI/ImDebugger/ImDebugger.cpp @@ -1526,11 +1526,11 @@ void DrawHLEModules(ImConfig &config) { return; } - const int moduleCount = GetNumRegisteredModules(); + const int moduleCount = GetNumRegisteredHLEModules(); std::vector modules; modules.reserve(moduleCount); for (int i = 0; i < moduleCount; i++) { - modules.push_back(GetModuleByIndex(i)); + modules.push_back(GetHLEModuleByIndex(i)); } std::sort(modules.begin(), modules.end(), [](const HLEModule* a, const HLEModule* b) { diff --git a/unittest/JitHarness.cpp b/unittest/JitHarness.cpp index 22bc6df980..0cf90b668c 100644 --- a/unittest/JitHarness.cpp +++ b/unittest/JitHarness.cpp @@ -97,7 +97,7 @@ double ExecCPUTest(bool clearCache = true) { static void SetupJitHarness() { // We register a syscall so we have an easy way to finish the test. - RegisterModule("UnitTestFakeSyscalls", ARRAY_SIZE(UnitTestFakeSyscalls), UnitTestFakeSyscalls); + RegisterHLEModule("UnitTestFakeSyscalls", ARRAY_SIZE(UnitTestFakeSyscalls), UnitTestFakeSyscalls); // This is pretty much the bare minimum required to setup jit. coreState = CORE_POWERUP;