-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
IMP sceKernelFindModuleByUID and sceKernelFindModuleByName. #13592
Conversation
pnm += 0x30; | ||
ptemp += 0x30; | ||
memcpy(pnm, ptemp, 0xC0 - 0x2C); | ||
} | ||
Do(p, memoryBlockAddr); |
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.
why not just put modid
last in NativeModule
to keep the struct backwards compatible and avoid this hack ? or is NativeModule
something the real PSP OS uses and it just had wrong offsets before ?
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.
NativeModule is a native struct of PSP, its members have fixed order(offset).
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.
ok I see.
why are you increasing both pnm
and ptemp
by 0x30
though ? shouldn't ptemp
be increased by 0x2C
instead ?
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.
Oops, thanks.
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.
Turns out the math was wrong - have to cast the pointers to bytes first :)
Fixed in 2f4dfed
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.
Oops again, thanks:p
Well done @shenweip |
This should help some patched games like #13205, #13204. I think @sum2012 would be interested in this.