mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-06-09 20:41:38 +12:00
Add IVFC parser
This commit is contained in:
parent
72b45377e1
commit
f3ce29bf2d
5 changed files with 137 additions and 1 deletions
21
src/core/fs/romfs.cpp
Normal file
21
src/core/fs/romfs.cpp
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue