Add all padscore functions.#445
Conversation
- Added all KPAD functions. - Changed KPADStatus::mplus to have all directions in a KPADBase3D struct.
GaryOderNichts
left a comment
There was a problem hiding this comment.
Thanks for the PR!
I think all the functions which are completely unknown or have parameters with unknown types, shouldn't be included for now (e.g. WUDSerialFlash*, WUDSetSniffMode, etc.). Once these have been fully figured out they can be added with a separate PR.
| /** | ||
| * Called by `WPADInit()`. | ||
| */ | ||
| void | ||
| wpad_im_setup(void); | ||
|
|
||
| void | ||
| wpad_im_state_active(WPADChan chan); | ||
|
|
||
| void | ||
| wpad_im_state_home(uint32_t type, uint32_t unknown); | ||
|
|
||
| void | ||
| wpad_im_state_inactive(WPADChan chan); | ||
|
|
||
| void | ||
| wpad_im_state_power(void); | ||
|
|
||
| void | ||
| wpad_im_teardown(void); |
There was a problem hiding this comment.
I feel like these should be moved below all the regular user-facing WPAD functions, if added at all.
There was a problem hiding this comment.
My reasoning was to have 100% of the exported symbols there. There are already other internal functions in the header.
I tried to keep the order alphabetical, without sorting the existing functions. I think somebody can find the best aesthetics for ordering the headers later.
- Replaced snake_case vars with camelCase. - Removed leftover comment. - Fixed `WPADClearDeviceCallback` to take a `uint32_t` argument. - Fixed second argument of `WPADSyncDeviceCallback` to be uknown `uint32_t`. - Fixed return type of `WPADiControllerInfoInNand` to be `BOOL`.
What harm does it do? We have plenty of functions and structs with unknown arguments, fields in wut. |
I'm currently going through some of the WUD functions for Bloopair, and it seems like some of the functions parameters have the wrong types in some places (e.g. pointers instead of enums/integers). This requires awkward casts of integer values to pointers. Fixing the parameters later on would then raise compiler warnings/errors in existing code. Anyways, what do you think about moving |
This adds declarations for all padscore functions listed in
padscore.def, even the stubs.The functions I could not figure out entirely, I just made sure the arguments match the usage in the implementation, through ghidra.