AMPXI:WriteTWLSavedata: Difference between revisions

From 3dbrew
Jump to navigation Jump to search
Steveice10 (talk | contribs)
mNo edit summary
Line 8: Line 8:
| Header code [0x00460182]
| Header code [0x00460182]
|-
|-
| 1
| 1-2
| TWL TitleID lower word
| u64, TWL Title ID
|-
| 2
| TWL TitleID upper word
|-
|-
| 3
| 3
| Input buffer size
| Input size
|-
|-
| 4
| 4
| u32 filepos for the NAND save-image file, for writing.
| NAND save-image file offset
|-
|-
| 5
| 5
| u8, section type. Valid values are 5, 6, and 7. 5 = "public.new".
| u8, Section type (5 = "public.new", 6 = ?, 7 = ?)
|-
|-
| 6
| 6
| u8 [[AM:ImportDSiWare|Operation]]
| u8, [[AM:ImportDSiWare|Operation]]
|-
|-
| 7
| 7
| (Size<<8) <nowiki>|</nowiki> 6
| (Size << 8) <nowiki>|</nowiki> 6
|-
|-
| 8
| 8
| Ptr for the input buffer
| Input pointer
|}
|}


Line 40: Line 37:
|-
|-
| 0
| 0
| Header code
| Header code [0x00460040]
|-
|-
| 1
| 1

Revision as of 03:00, 10 January 2016

Request

Index Word Description
0 Header code [0x00460182]
1-2 u64, TWL Title ID
3 Input size
4 NAND save-image file offset
5 u8, Section type (5 = "public.new", 6 = ?, 7 = ?)
6 u8, Operation
7 (Size << 8) | 6
8 Input pointer

Response

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

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", it's unknown how "public.sav" is updated with "public.new".