Ring-Con: Difference between revisions

Line 158: Line 158:
Then, if any of the 16bit output fields in output_struct are set to 0xCAFE, a flag is set to 0x2 (same field used for invalid-CRC, which uses value 0x1 for that). Then this returns 0. This field is "user_state".
Then, if any of the 16bit output fields in output_struct are set to 0xCAFE, a flag is set to 0x2 (same field used for invalid-CRC, which uses value 0x1 for that). Then this returns 0. This field is "user_state".


This reads the user calibration.
This reads the user calibration. This is normally (?) not calibrated (fields are set to 0xCAFE).


Reply:
Reply:
Line 187: Line 187:
== 0x00023104 ==
== 0x00023104 ==
The code which calls the func implementing this clamps the output value to range 0-500, then copies it elsewhere.
The code which calls the func implementing this clamps the output value to range 0-500, then copies it elsewhere.
This gets the rep-count for Multitask-Mode.


Reply:
Reply:
Line 196: Line 198:
| 0x4 || 0x3 || Data, copied to an output struct as a s32.
| 0x4 || 0x3 || Data, copied to an output struct as a s32.
|-
|-
| 0x7 || 0x1 || [[#CRC]] over the previous 0x3-bytes.
| 0x7 || 0x1 || [[#CRC]] over the previous 0x3-bytes, followed a value-0 byte.
|}
|}


== 0x00023204 ==
== 0x00023204 ==
The func implementing this in the app is identical to [[#0x00023104]] except for the cmd u32. The output field is "total_push_count".
The func implementing this in the app is identical to [[#0x00023104]] except for the cmd u32. The output field is "total_push_count". This is only updated in Multitask Mode.


The code calling this func copies the output into a global field, when it's valid.
The code calling this func copies the output into a global field, when it's valid.
Line 208: Line 210:


Unlike the other cmds, this checks for output_size==0x4, instead of {output buffer size} (it's unknown whether this is intended).
Unlike the other cmds, this checks for output_size==0x4, instead of {output buffer size} (it's unknown whether this is intended).
This resets the value returned by [[#0x00023104]] to 0.


== 0x04011104 ==
== 0x04011104 ==