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

22
include/fs/ivfc.hpp Normal file
View file

@ -0,0 +1,22 @@
#pragma once
#include <cstddef>
#include <cstring>
#include "helpers.hpp"
namespace IVFC {
struct IVFCLevel {
u64 logicalOffset;
u64 size;
u64 blockSize;
};
struct IVFC {
u64 masterHashSize;
std::vector<IVFCLevel> levels;
};
size_t parseIVFC(uintptr_t ivfcStart, IVFC& ivfc);
} // namespace IVFC

13
include/fs/romfs.hpp Normal file
View file

@ -0,0 +1,13 @@
#pragma once
#include "helpers.hpp"
#include <vector>
namespace RomFS {
struct RomFSNode {
std::vector<RomFSNode> children;
};
RomFSNode parseRomFSTree(uintptr_t romFS, u64 romFSSize);
} // namespace RomFS