In memory of Ben “bushing” Byer, who passed away on Monday, February 8th, 2016.

Changes

Jump to navigation Jump to search
43 bytes added ,  18:57, 7 December 2021
→‎Metadata layout: guessing what SFFS is short for
Line 18: Line 18:  
The authoritative source of information about the Wii's metadata layout is [http://git.infradead.org/users/segher/wii.git?a=blob;f=zestig.c Segher's zestig.c], but here is an attempt to describe that in English.
 
The authoritative source of information about the Wii's metadata layout is [http://git.infradead.org/users/segher/wii.git?a=blob;f=zestig.c Segher's zestig.c], but here is an attempt to describe that in English.
   −
Each metadata "superblock" starts with the 4 magic bytes "SFFS", followed by a 4-byte "generation number" and another 4-byte number (always 0x10?). When accessing the FS, IOS will choose the superblock with the highest generation number and use it; whenever it modifies the filesystem in any way, it will increment the generation number by 1 and write out an entirely new superblock in the next slot (in round-robin order). This allows the history of the filesystem to be seen.
+
Each metadata "superblock" starts with the 4 magic bytes "SFFS" (probably short for Secure FAT FileSystem), followed by a 4-byte "generation number" and another 4-byte number (always 0x10?). When accessing the FS, IOS will choose the superblock with the highest generation number and use it; whenever it modifies the filesystem in any way, it will increment the generation number by 1 and write out an entirely new superblock in the next slot (in round-robin order). This allows the history of the filesystem to be seen.
    
The next 0x10000 bytes (bytes 0xc:0x1000c within the superblock) are 0x8000 2-byte cluster numbers, and comprise the FAT. The FAT is followed by the FST — the tree structure containing the directory hierarchy and (plaintext!) filenames.
 
The next 0x10000 bytes (bytes 0xc:0x1000c within the superblock) are 0x8000 2-byte cluster numbers, and comprise the FAT. The FAT is followed by the FST — the tree structure containing the directory hierarchy and (plaintext!) filenames.
5,579

edits

Navigation menu