Difference between revisions of "AMPXI:WriteTWLSavedata"

From 3dbrew
Jump to navigation Jump to search
Line 15: Line 15:
 
|-
 
|-
 
| 4
 
| 4
| NAND save-image file offset
+
| NAND file offset
 
|-
 
|-
 
| 5
 
| 5
| u8, Section type (5 = "public.new", 6 = ?, 7 = ?)
+
| u8, Section type. See below.
 
|-
 
|-
 
| 6
 
| 6
| u8, [[AM:ImportDSiWare|Operation]]
+
| u8, [[AM:ImportDSiWare|Operation]]. Must be 5 or 11.
 
|-
 
|-
 
| 7
 
| 7
Line 41: Line 41:
 
| 1
 
| 1
 
| Result code
 
| Result code
 +
|}
 +
 +
=Section types=
 +
{| class="wikitable" border="1"
 +
|-
 +
!  Section type
 +
!  Allowed with operation type
 +
!  Written filename
 +
!  Normal filename
 +
|-
 +
| 5
 +
| Both
 +
| "public.new"
 +
| "public.sav"
 +
|-
 +
| 6
 +
| Both
 +
| "banner.new"
 +
| "banner.sav"
 +
|-
 +
| 7
 +
| 11
 +
| "private.new"
 +
| "private.sav"
 
|}
 
|}
  
 
=Description=
 
=Description=
This writes the specified input plaintext buffer data to the specified TWL-NAND title raw savedata image. The file which is written to in NAND depends on the section_index(public.sav, banner.sav, ...). This actually writes to "public.new" for "public.sav".
+
This writes the specified input plaintext buffer data to the specified TWL-NAND title raw ".new" file. The file which is written to in NAND depends on the section_type.
  
 
The ".new" files written by this are moved to the regular filenames by [[AMPXI:InstallTitlesFinish]] / other install-finish command(s).
 
The ".new" files written by this are moved to the regular filenames by [[AMPXI:InstallTitlesFinish]] / other install-finish command(s).

Revision as of 01:06, 3 August 2016

Request

Index Word Description
0 Header code [0x00460182]
1-2 u64, TWL Title ID
3 Input size
4 NAND file offset
5 u8, Section type. See below.
6 u8, Operation. Must be 5 or 11.
7 (Size << 8) | 6
8 Input pointer

Response

Index Word Description
0 Header code [0x00460040]
1 Result code

Section types

Section type Allowed with operation type Written filename Normal filename
5 Both "public.new" "public.sav"
6 Both "banner.new" "banner.sav"
7 11 "private.new" "private.sav"

Description

This writes the specified input plaintext buffer data to the specified TWL-NAND title raw ".new" file. The file which is written to in NAND depends on the section_type.

The ".new" files written by this are moved to the regular filenames by AMPXI:InstallTitlesFinish / other install-finish command(s).