Changes

Jump to navigation Jump to search
955 bytes added ,  11:30, 1 June 2011
no edit summary
Line 46: Line 46:  
=== Partitions ===
 
=== Partitions ===
   −
There can be multiple partitions on the chip. For some games one is a backup partition, some other games seem to use only one partition, yet other games actually use multiple partitions. Partitions are defined at the start of the de-wearleveled blob. At offset 0x200 into the image, the DIFI blobs start. These 0x130 large blobs describe the partitions. Every DIFI blob describes a partition. In order to find the partitions, you will need the uint32_t at 0x9C into the DIFI blob, and the uint32_t at 0xA4. The uint32_t at 0x9C describes the beginning of the filesystem from the base of the partition, the uint32_t at 0xA4 is the length of the filesystem. Partitions are catted together, so the end of one partition is the beginning of the next. The first partition starts at 0x2000.
+
There can be multiple partitions on the chip. For some games one is a backup partition, some other games seem to use only one partition, yet other games actually use multiple partitions. Partitions are defined at the start of the de-wearleveled blob. At offset 0x200 into the image, the DIFI blobs start. These 0x130 large blobs describe the partitions. Every DIFI blob describes a partition. In order to find the partitions, you will need the uint32_t at 0x9C into the DIFI blob, and the uint32_t at 0xA4. The uint32_t at 0x9C describes the length of the hash table at the start of the partition, the uint32_t at 0xA4 is the length of the filesystem. Partitions are catted together, so the end of one partition is the beginning of the next.  
   −
=== ファイルシステム ===
+
The first partition starts at 0x2000. The hashtable at the start of the partitions describe each in-use block in the partition with a SHA256 of the 0x1000 sized block.
 +
 
 +
* The exact location of the partition can vary in each save/game.
 +
* The first two hashes don't seem to be associated with any 0x1000 block.
 +
* The last 0x20 bytes of the hash table, doesn't appear to change along with the rest of the data and repeats at the end of all other hash-tables, even when the hashes/data are different.
 +
 
 +
The hash in the DISA blob hashes 300 bytes of the first DIFI blob.
 +
 
 +
* If the uint32 before the hash in the DISA is 0x01, the first DIFI blob is hashed, if it's 0x00 the second DIFI is hashed. The offsets and size for each DIFI can be found beneath the DISA tag (10h, 20h and 18h, 30h relative to the DISA location).
 +
 
 +
 
 +
=== 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 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).
 
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 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 85: Line 96:  
00038b0: 1c210000 00000000 00000000 00000000  .!..............
 
00038b0: 1c210000 00000000 00000000 00000000  .!..............
 
</pre>
 
</pre>
 +
 +
=== Initialization ===
 +
 +
When a save EEPROM contains all xFFFF blocks it's assumed uninitialized by the game cartridges and it initializes default data in place, without prompting the user.
 +
 +
 +
 
[[Savegames|English]]
 
[[Savegames|English]]
405

edits

Navigation menu