Difference between revisions of "BOSSU:GetErrorCode"

From 3dbrew
Jump to navigation Jump to search
(Created page with "=Request= {{IPC/Request}} {{#vardefine:ipc_offset|0}} {{IPC/RequestEntry|Header code [0x002E0040]}} {{IPC/RequestEntry|s8 input}} {{IPC/RequestEnd}} =Response= {{IPC/Request}...")
 
(Use IPC template header)
 
(One intermediate revision by the same user not shown)
Line 2: Line 2:
 
{{IPC/Request}}
 
{{IPC/Request}}
 
{{#vardefine:ipc_offset|0}}
 
{{#vardefine:ipc_offset|0}}
{{IPC/RequestEntry|Header code [0x002E0040]}}
+
{{IPC/RequestHeader|0x002E|1|0}}
{{IPC/RequestEntry|s8 input}}
+
{{IPC/RequestEntry|u8, TaskResultCode}}
 
{{IPC/RequestEnd}}
 
{{IPC/RequestEnd}}
  
Line 9: Line 9:
 
{{IPC/Request}}
 
{{IPC/Request}}
 
{{#vardefine:ipc_offset|0}}
 
{{#vardefine:ipc_offset|0}}
{{IPC/RequestEntry|Header code}}
+
{{IPC/RequestHeader|0x002E|2|0}}
 
{{IPC/RequestEntry|Result code}}
 
{{IPC/RequestEntry|Result code}}
{{IPC/RequestEntry|u32 Output value}}
+
{{IPC/RequestEntry|u32, Error code}}
 
{{IPC/RequestEnd}}
 
{{IPC/RequestEnd}}
  
 
=Description=
 
=Description=
This loads a 16bit value from a table using the input value. This loops through the table, comparing a field in each array entry with the input. When the input value is 0x71, the output is 0xB3B1+5(0xB3B6). Otherwise when no match is found in the table and it's not 0x71, the output is 0xB3B1.
+
Converts the given task result code into an error code (004-XXXX). The returned value is an integer 004XXXX.
  
This always returns result-code 0.
+
The error code is looked up in a table. When the input value is 0x71, the output is 46001+5 (004-6006). Otherwise when no match is found in the table and it's not 0x71, the error code is 004-6001.
 +
 
 +
This always returns result code 0.

Latest revision as of 00:41, 8 February 2025

Request[edit]

Index Word Description
0
Header 0x002E0040 Cmd 0x002E Param 1 Xlat 0
1 u8, TaskResultCode

Response[edit]

Index Word Description
0
Header 0x002E0080 Cmd 0x002E Param 2 Xlat 0
1 Result code
2 u32, Error code

Description[edit]

Converts the given task result code into an error code (004-XXXX). The returned value is an integer 004XXXX.

The error code is looked up in a table. When the input value is 0x71, the output is 46001+5 (004-6006). Otherwise when no match is found in the table and it's not 0x71, the error code is 004-6001.

This always returns result code 0.