Changes

309 bytes added ,  18:51, 13 March 2020
Line 86: Line 86:     
== 0x00020504 ==
 
== 0x00020504 ==
Reply+0x4 is a s16 which is used with the output from calling a func (which uses various other cmds) to generate a value which is written to the output param.
+
Reply+0x4 is a s16. After successfully using this cmd, this calls the func for [[#0x00020A04]]. When that's successful, this does the following with the output from that func and the earlier reply data: <code>s16 tmp = s16_struct_x2 - s16_struct_x0; if (tmp < 0) tmp++; *16bit_outparam = replydata + (tmp>>1);</code> Then this returns 0, regardless of whether [[#0x00020A04]] was successful.
    
== 0x00020A04 ==
 
== 0x00020A04 ==
 
The app uses cmd [[#0x00020000]] first. When u8 reply_x5 from that cmd is >=0x20, it proceeds to use cmd 0x00020A04 then returns. Otherwise, the following cmds are used with the output being copied to the output struct, then returns: [[#0x00020104]] (output_struct+0x0), [[#0x00020204]] (output_struct+0x2), [[#0x00020404]] (output_struct+0x6), [[#0x00020304]] (output_struct+0x4).
 
The app uses cmd [[#0x00020000]] first. When u8 reply_x5 from that cmd is >=0x20, it proceeds to use cmd 0x00020A04 then returns. Otherwise, the following cmds are used with the output being copied to the output struct, then returns: [[#0x00020104]] (output_struct+0x0), [[#0x00020204]] (output_struct+0x2), [[#0x00020404]] (output_struct+0x6), [[#0x00020304]] (output_struct+0x4).
 +
 +
The func for this is only called by the func implementing [[#0x00020504]].
    
Reply:
 
Reply: