-
Notifications
You must be signed in to change notification settings - Fork 2
Rename code_25250 -> controller and decompile functions #12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
queueRAM
commented
Jan 17, 2026
- Rename code_25250 -> controller
- Add uv_controller.h interface
- Decompile uvControllerInit (func_802242A0)
- Decompile func_80224548
- Decompile uvControllerButtonCheck (func_802245B0)
- Decompile uvControllerGetButton (func_802245E8)
- Decompile uvControllerCheckInserted (func_8022445C)
- Decompile uvControllerGetStick (func_8022458C)
- Decompile uvControllerButtonPress (func_80224604)
- Decompile uvControllerButtonRelease (func_80224650)
- Decompile fakematch uvIOUpdate
- Rename code_25250 -> controller - Add uv_controller.h interface - Decompile uvControllerInit (func_802242A0) - Decompile func_80224548 - Decompile uvControllerButtonCheck (func_802245B0) - Decompile uvControllerGetButton (func_802245E8) - Decompile uvControllerCheckInserted (func_8022445C) - Decompile uvControllerGetStick (func_8022458C) - Decompile uvControllerButtonPress (func_80224604) - Decompile uvControllerButtonRelease (func_80224650) - Decompile fakematch uvIOUpdate
| u32 contPattern; | ||
| s32 mask; | ||
|
|
||
| // 6 controllers and 3 axes on the stick |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
6 controllers i think was artifact of HW1 and early SDKs supporting that quantity. 3 axes on the stick is curious
| extern s32 gControllerPattern; | ||
| extern ControllerInfo gControllerInfo[6]; | ||
|
|
||
| void uvControllerInit(void) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These function names get a bit long. Let me know if you prefer uvContInit or some other naming scheme
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah we already shorten most other subsystem names so this would be appropriate
it would also be consistent with the os equivalents, e.g. osContStartQuery
|
|
||
| u8 func_8022EA80(void) { | ||
| u8 uvContMesgInit(void) { | ||
| OSMesg mesgBuf[2]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Based on passing 2 to osCreateMesgQueue this needed to be an array. Reordered the stack to continue matching
| return 0; | ||
| } | ||
|
|
||
| #pragma GLOBAL_ASM("asm/nonmatchings/kernel/controller/D_8024DF40.s") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think some of the functions in graphics.c belong in controller.c which may correct this data issue. I'm still experimenting.
Edit: doesn't look like anything should be moved from graphics to controller. Maybe a different file in between. Saving this for another PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah definitely don't assume the current splits are perfect. if the alignment and padding works out, then feel free to make more granular splits if it makes better logical groupings