Changes

73 bytes added ,  16:01, 21 October 2011
→‎The SAVE file system: more on the SAVE header and structure
Line 351: Line 351:  
[[File:Sfimg_drawing.png]]
 
[[File:Sfimg_drawing.png]]
   −
==== The SAVE file system ====
+
==== The SAVE partition ====
 
  −
Savefiles are stored on the FLASH in a custom filesystem called SAVE. SAVE has a header which describes where the various bits of the filesystem live.
      
* The SAVE filesystem works with a backup. There are two SAVE blocks inside the partition concatenated. Which SAVE block is the updated one is unknown yet.. (I'm guessing from experience that (image[0x100B] & 0x20) == 0x20 --> 1st SAVE --[[User:Elisherer|Elisherer]] 01:30, 18 October 2011 (CEST))
 
* The SAVE filesystem works with a backup. There are two SAVE blocks inside the partition concatenated. Which SAVE block is the updated one is unknown yet.. (I'm guessing from experience that (image[0x100B] & 0x20) == 0x20 --> 1st SAVE --[[User:Elisherer|Elisherer]] 01:30, 18 October 2011 (CEST))
Line 376: Line 374:  
     u32 folder_index;
 
     u32 folder_index;
 
     u32 unk1;  
 
     u32 unk1;  
     u32 unk2; // flags?
+
     u32 last_file_index;
 
     u32 unk3;  
 
     u32 unk3;  
 
     u32 unk4;
 
     u32 unk4;
Line 396: Line 394:  
</pre>
 
</pre>
   −
The first entry is the both tables is the count of the table, the parent directory index will be the amount of table rows. The root includes the itself, so there are amount - 1 folders in the root directory. The entries that follow after the root are the actual folders/files.  
+
The first entry in both tables is the count of the table, the parent directory index will be the amount of table rows. The root includes itself, so there are the amount - 1 (minus one) folders in the root directory (or files). The entries that follow after the root are the actual folders/files.
    
Reading the files out is as simple as taking the file base offset and adding (block_offset * 0x200) to it.
 
Reading the files out is as simple as taking the file base offset and adding (block_offset * 0x200) to it.
Line 436: Line 434:  
| 0x10
 
| 0x10
 
| 8
 
| 8
| Partition Size
+
| Partition Size [medias]
 
|-
 
|-
 
| 0x18
 
| 0x18
 
| 4
 
| 4
| Unknown
+
| Partition Media Size
 
|-
 
|-
 
| 0x1C
 
| 0x1C
Line 452: Line 450:  
| 0x28
 
| 0x28
 
| 8
 
| 8
| Unknown (First table offset)
+
| FolderMap Offset
 
|-
 
|-
 
| 0x30
 
| 0x30
 
| 4
 
| 4
| Unknown (num of u32 in table)
+
| FolderMap Size
 
|-
 
|-
 
| 0x34
 
| 0x34
 
| 4
 
| 4
| Unknown (size of media)
+
| FolderMap Media Size
 
|-
 
|-
 
| 0x38
 
| 0x38
 
| 8
 
| 8
| Unknown (Second table offset)
+
| FileMap Offset
 
|-
 
|-
 
| 0x40
 
| 0x40
 
| 4
 
| 4
| Unknown (num of u32 in table)
+
| FileMap Size
 
|-
 
|-
 
| 0x44
 
| 0x44
 
| 4
 
| 4
| Unknown (size of media)
+
| FileMap Media Size
 
|-
 
|-
 
| 0x48
 
| 0x48
 
| 8
 
| 8
| Unknown (Second table offset)
+
| BlockMap Offset
 
|-
 
|-
 
| 0x50
 
| 0x50
 
| 4
 
| 4
| Unknown (num of u32 in table)
+
| BlockMap Size
 
|-
 
|-
 
| 0x54
 
| 0x54
 
| 4
 
| 4
| Unknown (size of media)
+
| BlockMap Media Size
 
|-
 
|-
 
| 0x58
 
| 0x58
Line 492: Line 490:  
| 0x60
 
| 0x60
 
| 4
 
| 4
| File store length (medias)
+
| File store length [medias]
 
|-
 
|-
 
| 0x64
 
| 0x64
Line 531: Line 529:  
|-
 
|-
 
|}
 
|}
 +
 +
* The FolderMap and FileMap still unknown. They are tables of uint32.
 +
* The BlockMap is a map of the blocks in the filestore. An entry in the BlockMap is 2 uint32: {uint32 start_block; uint32 end_block; }. This is still being researched. (You can use [[3DSExplorer]] to see those maps.
    
=== Initialization ===
 
=== Initialization ===
399

edits