Changes

397 bytes added ,  17:33, 24 June 2012
no edit summary
Line 14: Line 14:     
(There may be more implementations in the future)
 
(There may be more implementations in the future)
 +
    
=== Format ===
 
=== Format ===
   −
All of the content (including the header) in RomFS appears to be aligned to 0x1000 byte blocks.
+
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:
 
The RomFS header is 0x80 bytes long and following is known about the structure:
Line 30: Line 31:  
|  0x4
 
|  0x4
 
|  Magic "IVFC"
 
|  Magic "IVFC"
 +
|-
 +
| 0x04
 +
| 0x4
 +
| Magic number 0x10000
 
|-
 
|-
 
|  0x14
 
|  0x14
Line 45: Line 50:  
|  0x60
 
|  0x60
 
|  0x20
 
|  0x20
Header Hash
+
Second block hash
 
|}
 
|}
 +
 +
The block hash from the header hashes the second block at 0x2000.