LLE libc removal

This commit is contained in:
georgemoralis 2024-08-22 11:24:31 +03:00
parent 834a25fa2b
commit 12a65e3fb8
19 changed files with 7 additions and 1924 deletions

View file

@ -19,7 +19,6 @@
#include "core/file_sys/fs.h"
#include "core/libraries/disc_map/disc_map.h"
#include "core/libraries/kernel/thread_management.h"
#include "core/libraries/libc/libc.h"
#include "core/libraries/libc_internal/libc_internal.h"
#include "core/libraries/libs.h"
#include "core/libraries/ngs2/ngs2.h"
@ -63,7 +62,6 @@ Emulator::Emulator() {
LOG_INFO(Config, "Vulkan vkValidationGpu: {}", Config::vkValidationGpuEnabled());
LOG_INFO(Config, "Vulkan rdocEnable: {}", Config::isRdocEnabled());
LOG_INFO(Config, "Vulkan rdocMarkersEnable: {}", Config::isMarkersEnabled());
LOG_INFO(Config, "LLE isLibc: {}", Config::isLleLibc());
// Defer until after logging is initialized.
memory = Core::Memory::Instance();
@ -167,23 +165,14 @@ void Emulator::Run(const std::filesystem::path& file) {
// check if we have system modules to load
LoadSystemModules(file);
// Check if there is a libc.prx in sce_module folder
bool found = false;
if (Config::isLleLibc()) {
std::filesystem::path sce_module_folder = file.parent_path() / "sce_module";
if (std::filesystem::is_directory(sce_module_folder)) {
for (const auto& entry : std::filesystem::directory_iterator(sce_module_folder)) {
if (entry.path().filename() == "libc.prx") {
found = true;
}
LOG_INFO(Loader, "Loading {}", entry.path().string().c_str());
linker->LoadModule(entry.path());
}
// Load all prx from game's sce_module folder
std::filesystem::path sce_module_folder = file.parent_path() / "sce_module";
if (std::filesystem::is_directory(sce_module_folder)) {
for (const auto& entry : std::filesystem::directory_iterator(sce_module_folder)) {
LOG_INFO(Loader, "Loading {}", entry.path().string().c_str());
linker->LoadModule(entry.path());
}
}
if (!found) {
Libraries::LibC::libcSymbolsRegister(&linker->GetHLESymbols());
}
// start execution
std::jthread mainthread =