- sceKernelUuidCreate, sceAppContentAppParamGetInt, sceAppContentTemporaryDataMount2 (#199)

- PlayGo
- stub libusbd
-added /temp0 and /data mounts at emu start.
(Ghost Files: Memory of a Crime, Abyss: The Wraiths of Eden)
- some posix functions
This commit is contained in:
Younes 2024-06-15 08:51:51 -06:00 committed by GitHub
parent c5d1d579b1
commit 0fa7d5d02c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
19 changed files with 900 additions and 14 deletions

View file

@ -56,13 +56,14 @@ void Emulator::Run(const std::filesystem::path& file) {
mnt->Mount(file.parent_path(), "/app0");
// Loading param.sfo file if exists
std::string id;
std::filesystem::path sce_sys_folder = file.parent_path() / "sce_sys";
if (std::filesystem::is_directory(sce_sys_folder)) {
for (const auto& entry : std::filesystem::directory_iterator(sce_sys_folder)) {
if (entry.path().filename() == "param.sfo") {
auto* param_sfo = Common::Singleton<PSF>::Instance();
param_sfo->open(sce_sys_folder.string() + "/param.sfo", {});
std::string id(param_sfo->GetString("CONTENT_ID"), 7, 9);
id = std::string(param_sfo->GetString("CONTENT_ID"), 7, 9);
std::string title(param_sfo->GetString("TITLE"));
LOG_INFO(Loader, "Game id: {} Title: {}", id, title);
u32 fw_version = param_sfo->GetInteger("SYSTEM_VER");
@ -81,6 +82,14 @@ void Emulator::Run(const std::filesystem::path& file) {
}
}
const auto& mount_data_dir = Common::FS::GetUserPath(Common::FS::PathType::GameDataDir) / id;
if (!std::filesystem::exists(mount_data_dir)) {
std::filesystem::create_directory(mount_data_dir);
}
mnt->Mount(mount_data_dir, "/data"); // should just exist, manually create with game serial
const auto& mount_temp_dir = Common::FS::GetUserPath(Common::FS::PathType::TempDataDir) / id;
mnt->Mount(mount_temp_dir, "/temp0"); // called in app_content ==> stat/mkdir
// Load the module with the linker
linker->LoadModule(file);