Start implementing SystemSaveData

This commit is contained in:
wheremyfoodat 2023-09-13 22:49:25 +03:00
parent eade124f00
commit c48f8327c6
6 changed files with 64 additions and 2 deletions

View file

@ -0,0 +1,12 @@
#include <algorithm>
#include "fs/archive_system_save_data.hpp"
namespace fs = std::filesystem;
Rust::Result<ArchiveBase*, HorizonResult> SystemSaveDataArchive::openArchive(const FSPath& path) {
if (path.type != PathType::Empty) {
Helpers::panic("Unimplemented path type for SystemSaveData::OpenArchive");
}
return Ok((ArchiveBase*)this);
}

View file

@ -228,6 +228,13 @@ void Kernel::getProcessInfo() {
}
switch (type) {
// Returns the amount of <related unused field> + total supervisor-mode stack size + page-rounded size of the external handle table
case 1:
Helpers::warn("GetProcessInfo: Unimplemented type 1");
regs[1] = 0;
regs[2] = 0;
break;
// According to 3DBrew: Amount of private (code, data, heap) memory used by the process + total supervisor-mode
// stack size + page-rounded size of the external handle table
case 2:

View file

@ -85,6 +85,7 @@ ArchiveBase* FSService::getArchiveFromID(u32 id, const FSPath& archivePath) {
case ArchiveID::SharedExtSaveData:
return &sharedExtSaveData_nand;
case ArchiveID::SystemSaveData: return &systemSaveData;
case ArchiveID::SDMC: return &sdmc;
case ArchiveID::SavedataAndNcch: return &ncch; // This can only access NCCH outside of FSPXI
default: