Difference between revisions of "RomFS"

From 3dbrew
Jump to navigation Jump to search
m
Line 1: Line 1:
 
{{Stub}}
 
{{Stub}}
 
=== Overview ===
 
=== Overview ===
RomFS or Read-Only Filesystem is part of the [[CXI|NCCH]] format, and is used as external file storage.
+
RomFS or Read-Only Filesystem is part of the [[NCCH]] format, and is used as external file storage.
  
 
RomFS can be used:
 
RomFS can be used:

Revision as of 18:55, 18 July 2012

Overview

RomFS or Read-Only Filesystem is part of the NCCH format, and is used as external file storage.

RomFS can be used:

  • in conjunction with the ExeFS of a NCCH
  • to contain the game manual accessible from the Home Menu
  • or to contain game cartridge update data

(There may be more implementations in the future)


Format

All of the content (including the header) in RomFS appears to be aligned to 0x1000 byte blocks, the first block starts at 0x1000. Starting with the second block, every block begins with a SHA-256 hash. This hashes the whole 0x1000-byte block following this block. For the last block, this hash hashes the first block at 0x1000. The total RomFS filesize is always at least 0x4000.

The RomFS header is 0x80 bytes long and following is known about the structure:

START SIZE DESCRIPTION
0x00 0x4 Magic "IVFC"
0x04 0x4 Magic number 0x10000
0x14 0x4 2nd content size
0x2C 0x4 3rd content size
0x44 0x4 Main (1st) content size
0x60 0x20 Second block hash

The block hash from the header hashes the second block at 0x2000.