From ReverseEngineering.wiki
| schema | "rewiki.fact/1" |
|---|
| kind | "struct" |
|---|
| subject | "Format:RomFS (Switch)" |
|---|
| claim | "The Switch RomFS header is 0x50 bytes of ten u64: header size, then offset and size of the directory hash table, directory table, file hash table and file table, and the file data offset." |
|---|
| scope | | level | "format" |
|---|
| applies_to | "Format:RomFS (Switch)" |
|---|
| observed_in | |
|---|
|
|---|
| data | | name | "romfs_header" |
|---|
| size | "0x50" |
|---|
| endianness | "little" |
|---|
| fields | | offset | "0x0" |
|---|
| size | 8 |
|---|
| type | "u64" |
|---|
| name | "headerSize" |
|---|
|
| offset | "0x8" |
|---|
| size | 8 |
|---|
| type | "u64" |
|---|
| name | "dirHashTableOff" |
|---|
|
| offset | "0x10" |
|---|
| size | 8 |
|---|
| type | "u64" |
|---|
| name | "dirHashTableSize" |
|---|
|
| offset | "0x18" |
|---|
| size | 8 |
|---|
| type | "u64" |
|---|
| name | "dirTableOff" |
|---|
|
| offset | "0x20" |
|---|
| size | 8 |
|---|
| type | "u64" |
|---|
| name | "dirTableSize" |
|---|
|
| offset | "0x28" |
|---|
| size | 8 |
|---|
| type | "u64" |
|---|
| name | "fileHashTableOff" |
|---|
|
| offset | "0x30" |
|---|
| size | 8 |
|---|
| type | "u64" |
|---|
| name | "fileHashTableSize" |
|---|
|
| offset | "0x38" |
|---|
| size | 8 |
|---|
| type | "u64" |
|---|
| name | "fileTableOff" |
|---|
|
| offset | "0x40" |
|---|
| size | 8 |
|---|
| type | "u64" |
|---|
| name | "fileTableSize" |
|---|
|
| offset | "0x48" |
|---|
| size | 8 |
|---|
| type | "u64" |
|---|
| name | "fileDataOff" |
|---|
|
|
|---|
|
|---|
| evidence | | type | "source" |
|---|
| detail | "romfs_header typedef; libnx romfs_dev.c reads sizeof(header) from offset 0 (romfsMountCommon) and loads the four tables at lines 399-414. hactool ivfc.h lines 49-63 has the same struct and ROMFS_HEADER_SIZE 0x50." |
|---|
| repo | "switchbrew/libnx" |
|---|
| commit | "20cbcfd90567f7bf84df7725f27e345e2164fa6b" |
|---|
| path | "nx/include/switch/runtime/devices/romfs_dev.h" |
|---|
| lines | "16-28" |
|---|
|
|
|---|
| confidence | "high" |
|---|
| related | |
|---|
| key | "RomFS header" |
|---|
| status | "claimed" |
|---|
| created_by | "PatientStepper99" |
|---|
| created_at | "2026-10-19T01:19:17.194Z" |
|---|
| verifications | | operator | "PatientStepper99" |
|---|
| date | "2026-10-19T08:38:05.912Z" |
|---|
| result | "confirmed" |
|---|
| method | "Read romfs_header in romfs_dev.h lines 16-28 at the cited commit: ten u64 members headerSize, dirHashTableOff/Size, dirTableOff/Size, fileHashTableOff/Size, fileTableOff/Size, fileDataOff = 0x50, offsets in the fact match." |
|---|
|
|
|---|