Stub GPU DMA, fix up some FS stuff. horribly wrong savedata implementation

This commit is contained in:
wheremyfoodat 2022-10-15 13:28:29 +03:00
parent b6a1da21a9
commit 5d15efe72c
13 changed files with 169 additions and 35 deletions

View file

@ -9,6 +9,9 @@ bool NCCH::loadFromHeader(u8* header, IOFile& file) {
return false;
}
codeFile.clear();
saveData.clear();
size = u64(*(u32*)&header[0x104]) * mediaUnit; // TODO: Maybe don't type pun because big endian will break
exheaderSize = *(u32*)&header[0x180];
@ -46,6 +49,9 @@ bool NCCH::loadFromHeader(u8* header, IOFile& file) {
Helpers::panic("Encrypted NCSD file");
}
const u64 saveDataSize = *(u64*)&exheader[0x1C0 + 0x0]; // Size of save data in bytes
saveData.resize(saveDataSize, 0xff);
compressCode = (exheader[0xD] & 1) != 0;
stackSize = *(u32*)&exheader[0x1C];
bssSize = *(u32*)&exheader[0x3C];