yifanlu / taiHEN

CFW framework for PS Vita
MIT License
307 stars 46 forks source link

Vita kernel limits the number of pre-loaded modules #68

Closed yifanlu closed 7 years ago

yifanlu commented 7 years ago

If you try to load > 2 user plugins, the app will refuse to start. The observed behavior is seen here: https://github.com/henkaku/henkaku/issues/56

There is some internal mechanism that limits the number of preloaded modules to (?) 16. We should find and patch out this limit.

yifanlu commented 7 years ago

Root caused the problem. int SceModulemgrForKernel_432DCC7A(int pid) is a function that gets a list of preloaded modules and starts each one. It is called by SceProcessmgr to start every preloaded module. Unfortunately, the module list is stored in the stack with a hard coded size of 15 elements. That means a maximum of 15 modules can be loaded (although good job not overflowing anything) and error is silently ignored--so the earliest preloaded modules are not actually started.

Anyone want to file a ticket with SCE? ;)

To fix this, I will write a patch that increases the limit to a much larger size.