Add IVFC parser

This commit is contained in:
offtkp 2023-07-28 19:54:18 +03:00
parent 72b45377e1
commit f3ce29bf2d
5 changed files with 137 additions and 1 deletions

21
src/core/fs/romfs.cpp Normal file
View file

@ -0,0 +1,21 @@
#include "fs/romfs.hpp"
#include "fs/ivfc.hpp"
#include <cstdio>
namespace RomFS {
RomFSNode parseRomFSTree(uintptr_t romFS, u64 romFSSize) {
RomFSNode root;
IVFC::IVFC ivfc;
size_t ivfcSize = IVFC::parseIVFC((uintptr_t)romFS, ivfc);
if (ivfcSize == 0) {
printf("Failed to parse IVFC\n");
return {};
}
return root;
}
} // namespace RomFS