Commit Graph

127 Commits

Author SHA1 Message Date
Maschell
fe2e7d6fa9 WUPS 0.6.1 support 2021-10-01 17:25:48 +02:00
Maschell
aa90e2478b Formatting and cleanup 2021-09-25 14:26:18 +02:00
Maschell
13ed348f43 Add support for the config and storage API. Bump version to 0.6 2021-09-24 20:37:54 +02:00
Maschell
ed792716fe Code cleanup 2021-09-18 12:21:27 +02:00
Maschell
a968fb3277 Add missing "WUMS_USE_WUT_DEVOPTAB()" hook, use latest WUPS/WUMS version in Dockerfile 2021-09-17 16:45:11 +02:00
Maschell
5247775b03 Support for WUPS 0.5, compile with latest wut version 2021-04-17 14:05:39 +02:00
Maschell
51e1c4c1f2 Tweak some compiler options 2021-04-17 13:38:36 +02:00
Maschell
fe64a68d41 Stop logging every hook call 2021-04-01 00:44:05 +02:00
Maschell
b48a53b63d Try to allocate memory for the plugins via the memory mapping module 2021-04-01 00:37:22 +02:00
Maschell
f11649bc36 Support WUPS 0.4, remove some unused code. 2021-03-16 17:55:32 +01:00
Maschell
189af02743 Reduce logging 2021-02-19 19:41:04 +01:00
Maschell
75735e4e4d Remove some unneeded logging 2021-01-10 18:20:54 +01:00
Maschell
f0b78caec3 Updating logging messages, call DCFlushRange on the actual heap instead of a hardcoded address, general clean up. 2021-01-10 13:17:47 +01:00
Maschell
881337ca41 Allocate memory for storing plugins on the default heap 2021-01-01 01:59:36 +01:00
Maschell
ec443161af Fix potential memory leaks 2021-01-01 01:59:09 +01:00
Maschell
db0f9f70d4 Read plugins into a aligned buffer to improve reading speed. 2020-12-28 14:46:30 +01:00
Maschell
f7b4b568d2 Remove \n in log messages 2020-12-28 14:40:53 +01:00
Maschell
4ef9a90378 Fix patching of dynamic functions by resetting there status on exit 2020-12-28 14:38:49 +01:00
Maschell
75bbf9b457 Call ApplicationEnd-hooks inside WUMS_APPLICATIONS_ENDS, remove __init_wut()/__fini_wut() calls 2020-12-28 14:38:08 +01:00
Maschell
96cfe71230 Add OSDynLoad_AddNotifyCallback to patch function if a new RPL was loaded 2020-12-26 15:59:06 +01:00
Maschell
e9bd4651ca Clean up and formatting 2020-12-26 14:17:50 +01:00
Maschell
0467178650 Add missing __init_wut and __fini_wut calls 2020-12-26 13:27:50 +01:00
Maschell
2e2c46324c Implement WUPS_LOADER_HOOK_VSYNC hook 2020-08-09 18:14:58 +02:00
Maschell
c58428c4b2 Add RELEASE_FORGROUND and ACQUIRED_FOREGROUND hooks 2020-08-09 18:01:18 +02:00
Maschell
c76edf09c4 Actually read the target process from the plugin while function patching 2020-06-19 17:04:39 +02:00
Maschell
ce73ac48e0 Use the function patcher module for the plugin function patches 2020-06-13 16:57:53 +02:00
Maschell
4aeeb09901 Init default return value in WUPSGetPluginDataForContainerHandles 2020-06-12 21:10:32 +02:00
Maschell
2633d983f3 Fix check for NULL-pointer in WUPSGetLoadedPlugins 2020-06-12 21:06:34 +02:00
Maschell
dfb8828829 Use libfunctionpatcher for non-plugin function patches 2020-06-12 20:51:21 +02:00
Maschell
4d13709c00 Check the module information struct version 2020-06-07 14:10:31 +02:00
Maschell
4edc55f02e Get module_information_t pointer from args instead of "guessing" it 2020-06-06 22:10:41 +02:00
Maschell
506b8eaf9a Use definitions from WUMS if possible 2020-06-06 16:40:25 +02:00
Maschell
42866ffbac Don't clear the .bss section anymore, call the wut init functions only once, except the devop one 2020-06-03 19:33:09 +02:00
Maschell
2b517b5699 Remove the elfio reader from the PluginData class, use it when it's needed 2020-06-03 18:34:31 +02:00
Maschell
1917ff9fb4 Adjust the setter the PluginContainer to use const values 2020-06-03 18:30:05 +02:00
Maschell
592ecf8eed Fix setting the trampolineID 2020-06-03 18:23:23 +02:00
Maschell
cfc2d4197e Use alloc/free from memorymapping module if possible 2020-06-03 18:22:44 +02:00
Maschell
b2562f6275 Adopt to new chnages of WUMS 2020-06-03 18:21:43 +02:00
Maschell
62d93a065f elfio: use delete instead of free 2020-06-03 18:20:19 +02:00
Maschell
48683e167e Add flush after patching the functions 2020-05-29 19:27:55 +02:00
Maschell
518d53b5fb Update module_defines.h to match latest SetupPayload version 2020-05-29 17:16:34 +02:00
Maschell
13e5d854d1 Use libkernel for a KernelCopy instead register own kernel functions. 2020-05-28 21:58:15 +02:00
Maschell
9ee8085a64 OSReceiveMessage hook: Only look into the message if the result is true 2020-05-28 20:51:56 +02:00
Maschell
7a7a1f7a63 Organize imports and format code 2020-05-28 20:51:31 +02:00
Maschell
80a0712519 Make sure to use plugins only in proccess 2 and 15. 2020-05-28 20:49:52 +02:00
Maschell
c3cca4926c Build with WiiUModuleSystem, export a bunch of useful functions to control the backend 2020-05-17 21:08:13 +02:00
Maschell
169bea55be Allow direct access to plugin data buffers 2020-05-17 21:07:26 +02:00
Maschell
192b00baae Adopt module_defines to be compatible to the latest SetupPayload 2020-05-17 21:07:07 +02:00
Maschell
b63723eb72 Add option to delete or not delete the actual plugin data when unloading plugins 2020-05-17 21:06:11 +02:00
Maschell
49fde27123 Make sure to restore patches before unloading plugins 2020-05-17 21:06:00 +02:00
Maschell
da5b26b583 Add callDeinitHooks and RestorePatches to the PlugingManagement 2020-05-17 21:04:16 +02:00
Maschell
a2816cea61 Addned functions to load plugin meta information from a path or buffer 2020-05-17 20:50:31 +02:00
Maschell
3d642c25d0 Fix logging of std::string 2020-05-17 20:50:05 +02:00
Maschell
3652eb4204 Remove debug logs 2020-05-17 20:49:48 +02:00
Maschell
05ef5246f0 Improve logging 2020-05-17 20:49:40 +02:00
Maschell
9a5d3a843f Add support for loading a list of plugin data on the next application change 2020-05-17 20:49:31 +02:00
Maschell
db9b113eab Add PluginDataPersistence 2020-05-17 20:45:10 +02:00
Maschell
3b9f4a9a51 Add missing copy constructors 2020-05-17 20:43:04 +02:00
Maschell
7247ad3093 Free trampolin data when unloading plugins 2020-05-17 20:41:11 +02:00
Maschell
e38cd528bf Add missing import 2020-05-17 20:40:12 +02:00
Maschell
3af7de28d8 Move global variables into a own file 2020-05-17 20:40:05 +02:00
Maschell
ccdc22c923 Improve logging 2020-05-08 11:17:24 +02:00
Maschell
3fb7f80050 Move loadPlugins function to PluginManagement 2020-05-03 14:20:00 +02:00
Maschell
0a4652c10a Add a function to unload all plugins from memory in the PluginManagement 2020-05-03 14:16:11 +02:00
Maschell
ead8b14f98 Add the PluginHeapHandle as an argument instead of using the global variable 2020-05-03 14:14:22 +02:00
Maschell
037e1f2ce8 Fix calculating the size needed to store the plugins in memory. 2020-05-03 13:51:39 +02:00
Maschell
80eb885dd2 Refactor loading plugins 2020-05-03 12:37:20 +02:00
Maschell
0c0680be77 Even more formatting 2020-05-03 12:30:15 +02:00
Maschell
4bf4a0eeea Formatting 2020-05-03 12:25:38 +02:00
Maschell
c1c7594926 Save the address of memory allocated on the plugin heap 2020-05-03 12:23:50 +02:00
Maschell
53f454f6ed Fix logic behin calling hooks, improve logging when calling hooks. 2020-05-03 11:40:44 +02:00
Maschell
e556490d27 Call the CRT hooks at each application start, not just once. 2020-05-03 11:34:43 +02:00
Maschell
7c0476fab4 Formatting of hooks.cpp, improving logs when a hook is not implemented 2020-05-03 11:16:22 +02:00
Maschell
4f5de0f889 Add intial support for function patching via plugins 2020-05-03 11:13:55 +02:00
Maschell
6d8fd08f25 Increase the maximum number of relocations from 500 to 1000. Refactor some code to a "PluginManagement" class. 2020-05-03 10:21:05 +02:00
Maschell
89445b77c2 Calling FINI_WUT_DEVOPTAB at the end of a application is softlocking.
MEM2 is cleared anyway so this shouldn't be a memory leak. Needs further research
2020-04-29 18:07:03 +02:00
Maschell
2705a91c13 First iteration of the WUPS-Backend as a .rpx/module for the SetupPayload
- Function replacements are not implemented yet
- Serveral features like the config menu are missing

Still WIP
2020-04-29 18:02:36 +02:00