游戏存档: Difference between revisions
Translation for Savegames, NOT completed. |
|||
Line 33: | Line 33: | ||
=== Wear leveling === | === Wear leveling === | ||
3DS在游戏存档闪存芯片上引入了wear leveling 方案。这是通过使用blockmap和journal来实现的。blockmap在闪存上偏移量为0,其后是journal。初始状态由blockmap指定,然后journal对其进行应用。 | |||
The 3DS employs a wear leveling scheme on the savegame FLASH chips. This is done through the usage of blockmaps and a journal. The blockmap is located at offset 0 of the flash chip, and is immediately followed by the journal. The initial state is dictated by the blockmap, and the journal is then applied to that. | The 3DS employs a wear leveling scheme on the savegame FLASH chips. This is done through the usage of blockmaps and a journal. The blockmap is located at offset 0 of the flash chip, and is immediately followed by the journal. The initial state is dictated by the blockmap, and the journal is then applied to that. | ||
首先,是8字节目前还不明白其确切意义的数据。然后是实际的blockmap。其结构很简单: | |||
<pre> | <pre> | ||
struct header_entry { | struct header_entry { | ||
Line 46: | Line 48: | ||
</pre> | </pre> | ||
每个sector有一个入口,从实际的sector1开始计数(sector 0 包含blockmap/journal)。 | |||
blockmap后2字节为最开始的8个字节,以及blockmap的CRC16校验码(开始值为0xFFFF(像modbus))。 | |||
The 2 bytes that follow the blockmap are the CRC16 (with starting value 0xFFFF (like modbus)) of the first 8 bytes and the blockmap. | The 2 bytes that follow the blockmap are the CRC16 (with starting value 0xFFFF (like modbus)) of the first 8 bytes and the blockmap. | ||
然后是journal。其结构如下: | |||
<pre> | <pre> | ||
struct sector_entry { | struct sector_entry { |