No gba save format

From DeSmuME
(Difference between revisions)
Jump to: navigation, search
m
 
(8 intermediate revisions by 2 users not shown)
Line 2: Line 2:
  
 
*'''HEADER:'''
 
*'''HEADER:'''
**addr   size       description
+
{| border="1" |
**00-1E   31       ID string = 'NocashGbaBackupMediaSavDataFile'
+
!addr
**1F       1       always 0x1A
+
!size
**20-23     4       unknown
+
!description
**24-27     4        unknown
+
|-
**28-2B     4        unknown
+
|00-1E
**2C-2F     4       unknown
+
|31
**30-3F   16       always 0x00
+
|ID string = 'NocashGbaBackupMediaSavDataFile'
**40-43     4       always 'SRAM'
+
|-
**44-47     4       method compression:
+
|1F
***                                0 - uncompressed;
+
|1
***                                1 - compressed;
+
|Always 0x1A
**48-4B     4       if method=0 then size of unpacked data;
+
|-
**                  else
+
|20-23
**                      size of packed data
+
|4
**4C-4F     4       if method=0 then begin data
+
|Unknown (may be for No$GBA internal use)
**                  else
+
|-
**                      size of unpacked data
+
|24
 +
|1
 +
|Day of the last time No$GBA saved (1-31)
 +
|-
 +
|25
 +
|1
 +
|Month of the last time No$GBA saved (1-12)
 +
|-
 +
|26-27
 +
|2
 +
|Year of the last time No$GBA saved (''eg.'' 2012)
 +
|-
 +
|28
 +
|1
 +
|Hour of the last time No$GBA saved (0-23)
 +
|-
 +
|29
 +
|1
 +
|Minute of the last time No$GBA saved (0-59)
 +
|-
 +
|2A-2B
 +
|2
 +
|Unknown (may be for No$GBA internal use)
 +
|-
 +
|2C-2F
 +
|4
 +
|Unknown (may be for No$GBA internal use)
 +
|-
 +
|30-3F
 +
|16
 +
|Always 0x00
 +
|-
 +
|40-43
 +
|4
 +
|Always 'SRAM'
 +
|-
 +
|44-47
 +
|4
 +
|Compression method:
 +
*0 - Uncompressed;
 +
*1 - Compressed
 +
|-
 +
|48-4B
 +
|4
 +
|If method = 0 then<br />''size of unpacked data''<br />else<br />''size of packed data''
 +
|-
 +
|4C-4F
 +
|4
 +
|If method = 0 then<br />''start address of data''<br />else<br />''size of unpacked data''
 +
|-
 +
|}
  
 
*'''unpack:'''
 
*'''unpack:'''
**all data splited on blocks.
+
All data splited on blocks.
***xx yy
+
{| border="1" |
***xx > 0x80 then yy repeat xx-0x80 times;
+
|xx yy
***
+
|xx > 0x80 then yy repeat xx-0x80 times;
***xx yy zz zz
+
|-
***xx == 0x80 then yy repeat zzzz times;
+
|xx yy zz zz
***xx yy...zz
+
|xx == 0x80 then yy repeat zzzz times;
***xx < 0x80 then data read xx times
+
|-
 +
|xx yy...zz
 +
|xx < 0x80 then data read next xx values
 +
|}

Latest revision as of 15:36, 4 October 2012

No$GBA SRAM save file format:

  • HEADER:
addr size description
00-1E 31 ID string = 'NocashGbaBackupMediaSavDataFile'
1F 1 Always 0x1A
20-23 4 Unknown (may be for No$GBA internal use)
24 1 Day of the last time No$GBA saved (1-31)
25 1 Month of the last time No$GBA saved (1-12)
26-27 2 Year of the last time No$GBA saved (eg. 2012)
28 1 Hour of the last time No$GBA saved (0-23)
29 1 Minute of the last time No$GBA saved (0-59)
2A-2B 2 Unknown (may be for No$GBA internal use)
2C-2F 4 Unknown (may be for No$GBA internal use)
30-3F 16 Always 0x00
40-43 4 Always 'SRAM'
44-47 4 Compression method:
  • 0 - Uncompressed;
  • 1 - Compressed
48-4B 4 If method = 0 then
size of unpacked data
else
size of packed data
4C-4F 4 If method = 0 then
start address of data
else
size of unpacked data
  • unpack:

All data splited on blocks.

xx yy xx > 0x80 then yy repeat xx-0x80 times;
xx yy zz zz xx == 0x80 then yy repeat zzzz times;
xx yy...zz xx < 0x80 then data read next xx values
Personal tools