Savegames: Difference between revisions
Line 626: | Line 626: | ||
<pre> | <pre> | ||
struct folder_entry { | struct folder_entry { | ||
u32 parent_folder_index; // | u32 parent_folder_index; // 0 for the root folder (the second entry) | ||
u8 filename[0x10]; // | u8 filename[0x10]; // "" for the root folder (the second entry) | ||
u32 next_folder_index; // 0 if the last | u32 next_folder_index; // 0 if the last folder | ||
u32 first_sub_folder_index; // 0 if has no sub | u32 first_sub_folder_index; // 0 if has no sub folder | ||
u32 first_sub_file_index; // 0 if has no sub file(?) | u32 first_sub_file_index; // 0 if has no sub file(?) | ||
u32 | u32 unk1; // flags? always 0? | ||
u32 next_dummy_folder_index; // 0 if the last dummy folder; | u32 unk2; // often 0? | ||
} | |||
struct dummy_folder_entry { | |||
u32 total_entry_count; | |||
u32 unk; // max_entry_count? FolderMapSize related? | |||
u32 zero_padding[7]; | |||
u32 next_dummy_folder_index; // 0 if the last dummy folder; | |||
} | } | ||
</pre> | </pre> | ||
Line 639: | Line 645: | ||
<pre> | <pre> | ||
struct file_entry { | struct file_entry { | ||
u32 parent_folder_index; | u32 parent_folder_index; | ||
u8 filename[0x10]; | u8 filename[0x10]; | ||
u32 next_file_index; // 0 if the last | u32 next_file_index; // 0 if the last file | ||
u32 unk1; // looks like time stamp? | u32 unk1; // looks like time stamp? | ||
u32 block_offset; | u32 block_offset; | ||
u64 file_size; | u64 file_size; | ||
u32 unk2; // flags? | u32 unk2; // flags? | ||
u32 next_dummy_file_index; // 0 if the last dummy file | u32 zero; // ? | ||
} | |||
struct dummy_file_entry { | |||
u32 total_entry_count; | |||
u32 unk; // max_entry_count? FileMapSize related? | |||
u32 zero_padding[9]; | |||
u32 next_dummy_file_index; // 0 if the last dummy file; | |||
} | } | ||
</pre> | </pre> | ||
Both table contains some "dummy" entries, which are probably left there when deleting files/folders, reserved for future use. The first entry of the two tables are always a dummy entry. | Both table contains some "dummy" entries, which are probably left there when deleting files/folders, reserved for future use. The first entry of the two tables are always a dummy entry (as the "first" dummy entry). | ||
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. |