Difference between revisions of "AM:ReadTwlBackupInfo"

From 3dbrew
Jump to navigation Jump to search
(Add information on constant in the send buffer. Add missing recieve parameters in the IPC response.)
 
(3 intermediate revisions by 2 users not shown)
Line 9: Line 9:
 
|-
 
|-
 
| 1
 
| 1
| Buffer 1 Size
+
| Output Info Size (usually 0x20)
 
|-
 
|-
 
| 2
 
| 2
| Buffer 2 Size
+
| Banner Size (usually 0x4000)
 
|-
 
|-
 
| 3
 
| 3
| Buffer 3 Size
+
| Working Buffer Size
 
|-
 
|-
 
| 4
 
| 4
| 0x10
+
| 0x10 (Magic Word Header, 0x10 = HANDLE_MOVE, we are moving this handle into the IPC server)
 
|-
 
|-
 
| 5
 
| 5
Line 24: Line 24:
 
|-
 
|-
 
| 6
 
| 6
| (Buffer 1 Size << 4) <nowiki>|</nowiki> 0xC
+
| (Output Info Size << 4) <nowiki>|</nowiki> 0xC
 
|-
 
|-
 
| 7
 
| 7
| Buffer 1 Pointer, output info. Processing is skipped for this when the pointer is NULL.
+
| [[Application_Manager_Services#TwlBackupInfo|TwlBackupInfo]] Output Pointer. Processing is skipped for this when the pointer is NULL.
 
|-
 
|-
 
| 8
 
| 8
| (Buffer 2 Size << 4) <nowiki>|</nowiki> 0xC
+
| (Banner Size << 4) <nowiki>|</nowiki> 0xC
 
|-
 
|-
 
| 9
 
| 9
| Buffer 2 Pointer, [[DSiWare_Exports|DSiWare]] header.
+
| [[DSiWare_Exports|DSiWare]] Banner Output Pointer. Processing is skipped for this when the pointer is NULL.
 
|-
 
|-
 
| 10
 
| 10
| (Buffer 3 Size << 4) <nowiki>|</nowiki> 0xC
+
| (Working Buffer Size << 4) <nowiki>|</nowiki> 0xC
 
|-
 
|-
 
| 11
 
| 11
| Buffer 3 Pointer, [[DSiWare_Exports|DSiWare]] banner. Processing is skipped for this when the pointer is NULL.
+
| Working Buffer Pointer
 
|}
 
|}
  
Line 53: Line 53:
 
| 1
 
| 1
 
| Result code
 
| Result code
 +
|-
 +
| 2
 +
| (Output Info Size << 4) <nowiki>|</nowiki> 0xC
 +
|-
 +
| 3
 +
| [[Application_Manager_Services#TwlBackupInfo|TwlBackupInfo]] Output Pointer.
 +
|-
 +
| 4
 +
| (Banner Size << 4) <nowiki>|</nowiki> 0xC
 +
|-
 +
| 5
 +
| [[DSiWare_Exports|DSiWare]] Banner Output Pointer.
 +
|-
 +
| 6
 +
| (Working Buffer Size << 4) <nowiki>|</nowiki> 0xC
 +
|-
 +
| 7
 +
| Working Buffer Pointer
 
|}
 
|}
  
 
=Description=
 
=Description=
The specified [[DSiWare_Exports|file]] size must be >=0x4500. This reads data from the specified file, and writes the decrypted+verified section data into the last 2 output buffers. This also writes some data into Buf1.
+
The specified [[DSiWare_Exports|file]] size must be at least 0x4500. This reads the DSiWare header+banner from the file, and decrypts+verifies these sections.
 +
 
 +
It should be noted that this command is meant for use with Exports that use 11 content sections.

Latest revision as of 10:53, 5 June 2023

Request[edit]

Index Word Description
0 Header code [0x001E00C8]
1 Output Info Size (usually 0x20)
2 Banner Size (usually 0x4000)
3 Working Buffer Size
4 0x10 (Magic Word Header, 0x10 = HANDLE_MOVE, we are moving this handle into the IPC server)
5 FSFile Handle
6 (Output Info Size << 4) | 0xC
7 TwlBackupInfo Output Pointer. Processing is skipped for this when the pointer is NULL.
8 (Banner Size << 4) | 0xC
9 DSiWare Banner Output Pointer. Processing is skipped for this when the pointer is NULL.
10 (Working Buffer Size << 4) | 0xC
11 Working Buffer Pointer

Response[edit]

Index Word Description
0 Header code
1 Result code
2 (Output Info Size << 4) | 0xC
3 TwlBackupInfo Output Pointer.
4 (Banner Size << 4) | 0xC
5 DSiWare Banner Output Pointer.
6 (Working Buffer Size << 4) | 0xC
7 Working Buffer Pointer

Description[edit]

The specified file size must be at least 0x4500. This reads the DSiWare header+banner from the file, and decrypts+verifies these sections.

It should be noted that this command is meant for use with Exports that use 11 content sections.