Closed TheOfficialFloW closed 7 years ago
Why not patch the user import?
This won't work, since it's a function (or instruction) inside the kernel function that is checking whether the full range of buttons should be written to pad.buttons or not. (On the PSP it was checking for the $k1 register)
Ah, look at taiHookForOffset
You will be patching the the destination function though. Technically it will work within a function but then it's your responsibility to ensure stack alignment and register saving before calling TAI_CONTINUE
Closing this as there are various workarounds for this specific use-case.
Sometimes you only need to manipulate a single call. Example: sceCtrlPeekBufferPositive does output all buttons (inclusive ps btn, power btn and volumes) if called in kernel mode, whereas from syscall state only user buttons can be received. Patching the import function that checks for syscall mode (not sure if it's really like this) might cause maleffect.