Changes

Jump to navigation Jump to search
1,934 bytes added ,  14:17, 21 September 2011
fixed a few lines.. raising a question..so what is the save structure?
Line 72: Line 72:  
=== Filesystem ===
 
=== Filesystem ===
 
   
 
   
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 header can be found by searching for the string "SAVE" (minus quotation marks) in the savefile. The address where the 'S' is located is the base address for the SAVE header/filesystem.
+
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 most important information in the savefile is the FST or filesystem table. You can find the FST by first finding the file base offset which is the offset to which all the entries in the FST are relative. The file base offset is a uint16_t at 0x58 from the filesystem start. The FST offset is a uint32_t at 0x6C and is in blocks (which are 0x200 bytes large).
 
The most important information in the savefile is the FST or filesystem table. You can find the FST by first finding the file base offset which is the offset to which all the entries in the FST are relative. The file base offset is a uint16_t at 0x58 from the filesystem start. The FST offset is a uint32_t at 0x6C and is in blocks (which are 0x200 bytes large).
Line 124: Line 124:  
00002670: 00000000 01000000 69921100 03000000  ........i’......
 
00002670: 00000000 01000000 69921100 03000000  ........i’......
 
00002680: DC140000 00000000 04000000 00000000  Ü...............
 
00002680: DC140000 00000000 04000000 00000000  Ü...............
 +
</pre>
 +
 +
Example for a different file with different SAVE structure:
 +
 +
<pre>
 +
00002400 53415645 00000400 20000000 00000000 SAVE.... ....... //Save from Steel Diver
 +
00002410 28030000 00000000 00020000 00000000 (...............
 +
00002420 00000000 00020000 88000000 00000000 ................
 +
00002430 03000000 00020000 94000000 00000000 ................
 +
00002440 43000000 00020000 A0010000 00000000 C...............
 +
00002450 28030000 00020000 00000000 00000000 (............... //[0x58] = 0 and
 +
00002460 28030000 00020000 E81A0000 00000000 (............... //[0x6C] = 0, but
 +
00002470 00000000 00020000 381B0000 00000000 ........8....... //On offset 0x68 There's an exact offset to the FST
 +
00002480 40000000 00020000 01000000 00000000 @............... //meaning a uint32_t at 0x68 into the SAVE struct
 +
00002490 00000000 00000000 00000000 02000000 ................
 +
 +
00003F30 00000000 00000000 04000000 41000000 ............A... // first fs_entry '04 00 00 00'
 +
00003F40 00000000 00000000 00000000 00000000 ................ //exectly 0x1B38 from the save header struct
 +
00003F50 00000000 00000000 00000000 00000000 ................
 +
00003F60 00000000 00000000 01000000 67686F73 ............ghos
 +
00003F70 742E7374 30370000 00000000 00000000 t.st07..........
 +
00003F80 D57B1100 00000000 7E290000 00000000 .{......~)......
 +
00003F90 00000000 00000000 01000000 73617665 ............save
 +
00003FA0 2E737562 00000000 00000000 01000000 .sub............
 +
00003FB0 D57B1100 15000000 9C090000 00000000 .{..............
 +
00003FC0 00000000 00000000 01000000 73617665 ............save
 +
00003FD0 2E706572 69730000 00000000 02000000 .peris..........
 +
00003FE0 D57B1100 1A000000 29070000 00000000 .{......).......
 +
00003FF0 00000000 00000000 00000000 00000000 ................
 +
</pre>
 +
 +
known struct until now:
 +
 +
<pre>
 +
struct save_header {
 +
        char magic[4];          //'SAVE'
 +
        u8 unknown0[0x54];
 +
        u32 fst_offset;
 +
        u8 unknown1[0x10];
 +
        u32 fst_block_offset;    //FST is in [fst_block_offset] * 0x200 + [fst_offset]
 +
        u8 unknown2[8];          //or
 +
        uint32 fst_exact_offset; //the exact offset from the header start
 +
}
 
</pre>
 
</pre>
  
399

edits

Navigation menu