Difference between revisions of "Hey! Pikmin save file"

From Pikmin Technical Knowledge Base
Jump to navigation Jump to search
(Well, I give up.)
(Better offsets.)
Line 7: Line 7:
 
=== SAVE ===
 
=== SAVE ===
 
{| class="wikitable sortable"
 
{| class="wikitable sortable"
! Offset || Length || Field || Notes
+
! colspan="2" | Offset || rowspan="2" | Length || rowspan="2" | Field || rowspan="2" | Notes
 
|-
 
|-
| <code>0000</code> || 4 bytes || Block magic word || Always <code>SAVE</code>.
+
! File || Block
 
|-
 
|-
| <code>000C</code> || 4 bytes || Save data checksum || {{unsure|Calculated using an unknown algorithm.}}
+
| <code>0000</code> || <code>0000</code> || 4 bytes || Block magic word || Always <code>SAVE</code>.
 +
|-
 +
| <code>000C</code> || <code>000C</code> || 4 bytes || Save data checksum || {{unsure|Calculated using an unknown algorithm.}}
 
|}
 
|}
  
 
=== NEWS ===
 
=== NEWS ===
 
{| class="wikitable sortable"
 
{| class="wikitable sortable"
! Offset || Length || Field || Notes
+
! colspan="2" | Offset || rowspan="2" | Length || rowspan="2" | Field || rowspan="2" | Notes
 
|-
 
|-
| <code>0000</code> || 4 bytes || Block magic word || Always <code>NEWS</code>.
+
! File || Block
 +
|-
 +
| <code>0010</code> || <code>0000</code> || 4 bytes || Block magic word || Always <code>NEWS</code>.
 
|-
 
|-
 
|}
 
|}
Line 24: Line 28:
 
=== OPTI ===
 
=== OPTI ===
 
{| class="wikitable sortable"
 
{| class="wikitable sortable"
! Offset || Length || Field || Notes
+
! colspan="2" | Offset || rowspan="2" | Length || rowspan="2" | Field || rowspan="2" | Notes
 
|-
 
|-
| <code>0000</code> || 4 bytes || Block magic word || Always <code>OPTI</code>.
+
! File || Block
 
|-
 
|-
| <code>0028</code> || 1 byte || Music volume || <code>01</code>, <code>02</code>, or <code>03</code>.
+
| <code>0020</code> || <code>0000</code> || 4 bytes || Block magic word || Always <code>OPTI</code>.
 +
|-
 +
| <code>0028</code> || <code>0008</code> || 1 byte || Music volume || <code>01</code>, <code>02</code>, or <code>03</code>.
 
|-
 
|-
 
|}
 
|}
Line 34: Line 40:
 
=== PBUF ===
 
=== PBUF ===
 
{| class="wikitable sortable"
 
{| class="wikitable sortable"
! Offset || Length || Field || Notes
+
! colspan="2" | Offset || rowspan="2" | Length || rowspan="2" | Field || rowspan="2" | Notes
 
|-
 
|-
| <code>0000</code> || 4 bytes || Block magic word || Always <code>PBUF</code>.
+
! File || Block
 +
|-
 +
| <code>002C</code> || <code>0000</code> || 4 bytes || Block magic word || Always <code>PBUF</code>.
 
|-
 
|-
 
|}
 
|}
Line 42: Line 50:
 
=== PARK ===
 
=== PARK ===
 
{| class="wikitable sortable"
 
{| class="wikitable sortable"
! Offset || Length || Field || Notes
+
! colspan="2" | Offset || rowspan="2" | Length || rowspan="2" | Field || rowspan="2" | Notes
 +
|-
 +
! File || Block
 
|-
 
|-
| <code>0000</code> || 4 bytes || Block magic word || Always <code>PARK</code>.
+
| <code>0080</code> || <code>0000</code> || 4 bytes || Block magic word || Always <code>PARK</code>.
 
|-
 
|-
 
|}
 
|}
Line 50: Line 60:
 
=== MINI ===
 
=== MINI ===
 
{| class="wikitable sortable"
 
{| class="wikitable sortable"
! Offset || Length || Field || Notes
+
! colspan="2" | Offset || rowspan="2" | Length || rowspan="2" | Field || rowspan="2" | Notes
 +
|-
 +
! File || Block
 
|-
 
|-
| <code>0000</code> || 4 bytes || Block magic word || Always <code>MINI</code>.
+
| <code>04A4</code> || <code>0000</code> || 4 bytes || Block magic word || Always <code>MINI</code>.
 
|-
 
|-
 
|}
 
|}
Line 58: Line 70:
 
=== CRNT ===
 
=== CRNT ===
 
{| class="wikitable sortable"
 
{| class="wikitable sortable"
! Offset || Length || Field || Notes
+
! colspan="2" | Offset || rowspan="2" | Length || rowspan="2" | Field || rowspan="2" | Notes
 
|-
 
|-
| <code>0000</code> || 4 bytes || Block magic word || Always <code>CRNT</code>.
+
! File || Block
 +
|-
 +
| <code>0588</code> || <code>0000</code> || 4 bytes || Block magic word || Always <code>CRNT</code>.
 
|-
 
|-
 
|}
 
|}
Line 66: Line 80:
 
=== GAME ===
 
=== GAME ===
 
{| class="wikitable sortable"
 
{| class="wikitable sortable"
! Offset || Length || Field || Notes
+
! colspan="2" | Offset || rowspan="2" | Length || rowspan="2" | Field || rowspan="2" | Notes
 
|-
 
|-
| <code>0000</code> || 4 bytes || Block magic word || Always <code>GAME</code>.
+
! File || Block
 +
|-
 +
| <code>09A8</code> || <code>0000</code> || 4 bytes || Block magic word || Always <code>GAME</code>.
 
|-
 
|-
 
|}
 
|}
Line 74: Line 90:
 
=== EVNT ===
 
=== EVNT ===
 
{| class="wikitable sortable"
 
{| class="wikitable sortable"
! Offset || Length || Field || Notes
+
! colspan="2" | Offset || rowspan="2" | Length || rowspan="2" | Field || rowspan="2" | Notes
 
|-
 
|-
| <code>0000</code> || 4 bytes || Block magic word || Always <code>EVNT</code>.
+
! File || Block
 +
|-
 +
| <code>09E0</code> || <code>0000</code> || 4 bytes || Block magic word || Always <code>EVNT</code>.
 
|-
 
|-
 
|}
 
|}
Line 82: Line 100:
 
=== HELP ===
 
=== HELP ===
 
{| class="wikitable sortable"
 
{| class="wikitable sortable"
! Offset || Length || Field || Notes
+
! colspan="2" | Offset || rowspan="2" | Length || rowspan="2" | Field || rowspan="2" | Notes
 
|-
 
|-
| <code>0000</code> || 4 bytes || Block magic word || Always <code>HELP</code>.
+
! File || Block
 +
|-
 +
| <code>0AE8</code> || <code>0000</code> || 4 bytes || Block magic word || Always <code>HELP</code>.
 
|-
 
|-
 
|}
 
|}
Line 90: Line 110:
 
=== RINF ===
 
=== RINF ===
 
{| class="wikitable sortable"
 
{| class="wikitable sortable"
! Offset || Length || Field || Notes
+
! colspan="2" | Offset || rowspan="2" | Length || rowspan="2" | Field || rowspan="2" | Notes
 
|-
 
|-
| <code>0000</code> || 4 bytes || Block magic word || Always <code>RINF</code>.
+
! File || Block
 +
|-
 +
| <code>0BF0</code> || <code>0000</code> || 4 bytes || Block magic word || Always <code>RINF</code>.
 
|-
 
|-
 
|}
 
|}
Line 98: Line 120:
 
=== RSLT ===
 
=== RSLT ===
 
{| class="wikitable sortable"
 
{| class="wikitable sortable"
! Offset || Length || Field || Notes
+
! colspan="2" | Offset || rowspan="2" | Length || rowspan="2" | Field || rowspan="2" | Notes
 
|-
 
|-
| <code>0000</code> || 4 bytes || Block magic word || Always <code>RSLT</code>.
+
! File || Block
 +
|-
 +
| <code>0C2C</code> || <code>0000</code> || 4 bytes || Block magic word || Always <code>RSLT</code>.
 
|-
 
|-
 
|}
 
|}
Line 106: Line 130:
 
=== SPER ===
 
=== SPER ===
 
{| class="wikitable sortable"
 
{| class="wikitable sortable"
! Offset || Length || Field || Notes
+
! colspan="2" | Offset || rowspan="2" | Length || rowspan="2" | Field || rowspan="2" | Notes
 
|-
 
|-
| <code>0000</code> || 4 bytes || Block magic word || Always <code>SPER</code>.
+
! File || Block
 +
|-
 +
| <code>0C38</code> || <code>0000</code> || 4 bytes || Block magic word || Always <code>SPER</code>.
 
|-
 
|-
 
|}
 
|}
Line 114: Line 140:
 
=== STRE ===
 
=== STRE ===
 
{| class="wikitable sortable"
 
{| class="wikitable sortable"
! Offset || Length || Field || Notes
+
! colspan="2" | Offset || rowspan="2" | Length || rowspan="2" | Field || rowspan="2" | Notes
 
|-
 
|-
| <code>0000</code> || 4 bytes || Block magic word || Always <code>STRE</code>.
+
! File || Block
 +
|-
 +
| <code>0C48</code> || <code>0000</code> || 4 bytes || Block magic word || Always <code>STRE</code>.
 
|-
 
|-
 
|}
 
|}
Line 122: Line 150:
 
=== PLRP ===
 
=== PLRP ===
 
{| class="wikitable sortable"
 
{| class="wikitable sortable"
! Offset || Length || Field || Notes
+
! colspan="2" | Offset || rowspan="2" | Length || rowspan="2" | Field || rowspan="2" | Notes
 
|-
 
|-
| <code>0000</code> || 4 bytes || Block magic word || Always <code>PLRP</code>.
+
! File || Block
 +
|-
 +
| <code>0C90</code> || <code>0000</code> || 4 bytes || Block magic word || Always <code>PLRP</code>.
 
|-
 
|-
 
|}
 
|}
Line 130: Line 160:
 
=== DATE ===
 
=== DATE ===
 
{| class="wikitable sortable"
 
{| class="wikitable sortable"
! Offset || Length || Field || Notes
+
! colspan="2" | Offset || rowspan="2" | Length || rowspan="2" | Field || rowspan="2" | Notes
 
|-
 
|-
| <code>0000</code> || 4 bytes || Block magic word || Always <code>DATE</code>.
+
! File || Block
 +
|-
 +
| <code>0CE0</code> || <code>0000</code> || 4 bytes || Block magic word || Always <code>DATE</code>.
 
|-
 
|-
 
|}
 
|}
Line 138: Line 170:
 
=== TTDS ===
 
=== TTDS ===
 
{| class="wikitable sortable"
 
{| class="wikitable sortable"
! Offset || Length || Field || Notes
+
! colspan="2" | Offset || rowspan="2" | Length || rowspan="2" | Field || rowspan="2" | Notes
 +
|-
 +
! File || Block
 
|-
 
|-
| <code>0000</code> || 4 bytes || Block magic word || Always <code>TTDS</code>.
+
| <code>0CFC</code> || <code>0000</code> || 4 bytes || Block magic word || Always <code>TTDS</code>.
 
|-
 
|-
 
|}
 
|}
Line 146: Line 180:
 
=== WMAP ===
 
=== WMAP ===
 
{| class="wikitable sortable"
 
{| class="wikitable sortable"
! Offset || Length || Field || Notes
+
! colspan="2" | Offset || rowspan="2" | Length || rowspan="2" | Field || rowspan="2" | Notes
 +
|-
 +
! File || Block
 
|-
 
|-
| <code>0000</code> || 4 bytes || Block magic word || Always <code>WMAP</code>.
+
| <code>0D08</code> || <code>0000</code> || 4 bytes || Block magic word || Always <code>WMAP</code>.
 
|-
 
|-
 
|}
 
|}
Line 154: Line 190:
 
=== SAMI ===
 
=== SAMI ===
 
{| class="wikitable sortable"
 
{| class="wikitable sortable"
! Offset || Length || Field || Notes
+
! colspan="2" | Offset || rowspan="2" | Length || rowspan="2" | Field || rowspan="2" | Notes
 +
|-
 +
! File || Block
 
|-
 
|-
| <code>0000</code> || 4 bytes || Block magic word || Always <code>SAMI</code>.
+
| <code>0D80</code> || <code>0000</code> || 4 bytes || Block magic word || Always <code>SAMI</code>.
 
|-
 
|-
 
|}
 
|}

Revision as of 15:01, 26 November 2017

This article is a stub.

The file format for a Hey! Pikmin saved game. Note: this comes from analyses of the .sav files generated by Citra.

Format

The save data is split into several blocks that start with 4-byte magic words.

SAVE

Offset Length Field Notes
File Block
0000 0000 4 bytes Block magic word Always SAVE.
000C 000C 4 bytes Save data checksum Calculated using an unknown algorithm.[unsure]

NEWS

Offset Length Field Notes
File Block
0010 0000 4 bytes Block magic word Always NEWS.

OPTI

Offset Length Field Notes
File Block
0020 0000 4 bytes Block magic word Always OPTI.
0028 0008 1 byte Music volume 01, 02, or 03.

PBUF

Offset Length Field Notes
File Block
002C 0000 4 bytes Block magic word Always PBUF.

PARK

Offset Length Field Notes
File Block
0080 0000 4 bytes Block magic word Always PARK.

MINI

Offset Length Field Notes
File Block
04A4 0000 4 bytes Block magic word Always MINI.

CRNT

Offset Length Field Notes
File Block
0588 0000 4 bytes Block magic word Always CRNT.

GAME

Offset Length Field Notes
File Block
09A8 0000 4 bytes Block magic word Always GAME.

EVNT

Offset Length Field Notes
File Block
09E0 0000 4 bytes Block magic word Always EVNT.

HELP

Offset Length Field Notes
File Block
0AE8 0000 4 bytes Block magic word Always HELP.

RINF

Offset Length Field Notes
File Block
0BF0 0000 4 bytes Block magic word Always RINF.

RSLT

Offset Length Field Notes
File Block
0C2C 0000 4 bytes Block magic word Always RSLT.

SPER

Offset Length Field Notes
File Block
0C38 0000 4 bytes Block magic word Always SPER.

STRE

Offset Length Field Notes
File Block
0C48 0000 4 bytes Block magic word Always STRE.

PLRP

Offset Length Field Notes
File Block
0C90 0000 4 bytes Block magic word Always PLRP.

DATE

Offset Length Field Notes
File Block
0CE0 0000 4 bytes Block magic word Always DATE.

TTDS

Offset Length Field Notes
File Block
0CFC 0000 4 bytes Block magic word Always TTDS.

WMAP

Offset Length Field Notes
File Block
0D08 0000 4 bytes Block magic word Always WMAP.

SAMI

Offset Length Field Notes
File Block
0D80 0000 4 bytes Block magic word Always SAMI.

Checksum

Although the checksum is unknown, it's known that it's NOT the following:

  • CRC32 of:
    • The bytes after the checksum.
    • The bytes before and after the checksum.
    • The bytes after the checksum, but excluding section start magic words.
    • The bytes before and after the checksum, but excluding section start magic words.
  • SHA1 of the previous.
  • MD5 of the previous.