Skip to content

Conversation

@queueRAM
Copy link
Contributor

  • 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
Copy link
Contributor Author

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) {
Copy link
Contributor Author

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

Copy link
Owner

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];
Copy link
Contributor Author

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")
Copy link
Contributor Author

@queueRAM queueRAM Jan 17, 2026

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

Copy link
Owner

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

@gcsmith gcsmith merged commit e76f0bf into gcsmith:main Jan 17, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants