Commit Graph

57 Commits

Author SHA1 Message Date
Maschell
38856c5916 [Loader] Adjusting the memory mapping 2018-04-05 15:42:29 +02:00
Maschell
721f739db6 [Travis] trying to fix compiling. (Case senstive issue) 2018-04-04 17:00:42 +02:00
Maschell
a839430ea0 [Loader] Added intial code for Memory mapping!
The loader will now map some (hopefully) unused memory into userland using the segement registers. Currently we can get ~ 65mb of extra memory. At the moment, none if this memory is used, at first it needs to be checked if it's really unused.
Press MINUS in the plugin loader to map the memory, this can take a moment. Check the UDPLogger for the mapping information. When the memory was mapped, values will be written to the PHYSICAL memory addresses, and read from the effective addresses as an test..
2018-04-04 16:30:54 +02:00
Maschell
60e49ea83f [Loader] Added serveral minor clean ups. 2018-04-04 15:36:57 +02:00
Maschell
a8d1960dc3 [Loader] Check the current titleid before calling hooks. 2018-04-04 14:33:22 +02:00
Maschell
720762d891 [Loader] Fixed possible deadlock 2018-04-04 14:27:04 +02:00
Maschell
2c311aea66 [Loader] Modified to loader to use "long jumps" to our code. 2018-04-04 14:26:43 +02:00
Maschell
6ca382bf6e Formatting, added bash script for installing/updating the dependencies (based on the travis script) 2018-03-11 17:12:46 +01:00
Maschell
0e60a9bb48 [Loader] Fixed loader when loaded from the browser hax 2018-03-11 13:50:45 +01:00
Maschell
b9b8bceebf [Loader] Added mkdir support to the plugins 2018-03-08 16:38:26 +01:00
Maschell
fd5acd8932 Added "ON_FUNCTIONS_PATCHED" hook 2018-03-07 18:53:43 +01:00
Maschell
fcd217fa67 [Loader] This is case-sensitiv on unix. well. Removed travis caching, was pointless anyway. 2018-03-04 16:40:02 +01:00
Maschell
36f4b1f350 [Loader] A single plugin can be loaded via wiiload.
Now more sd swapping for ftpiiu while developing plugins!
Simply use the normal wiiload to send a plugin (.mod) file to the Wii U while the plugin loader in running.
This requires zlib, don't forget to add it to your portlib. It can be found in the "libs" folder.
2018-03-04 16:27:57 +01:00
Maschell
1024338498 Added new macros for FS and overlay access.
Now the plugin don't need to use the INITIALIZE_PLUGIN hook for fs and overlay access, but use the WUPS_FS_ACCESS()/WUPS_ALLOW_OVERLAY() macro.
2018-02-25 15:18:52 +01:00
Maschell
2aadfcf68e Added new hook-methods, added more information to the example_plugin
- Split up the WUPS includes into multiple seperate files, renamed some structs
- Added the hooks functions. (INITIALIZE_PLUGIN, DEINITIALIZE_PLUGIN, ON_VYSNC, ON_APP_STATUS_CHANGED, ON_APPLICATION_ENDING). INITIALZE is now "ON_APPLICATION_START". See the example for more information.
- Updated all plugins to fit the new hook. Some profit of the new hooks and are simpler now. (For example SwipSwapMe doesn't need to check if it's the first boot)
- arguments of the ON_APPLICATION_START have changed. It's not a pointer anymore and now has the boolean fields sd_mounted/usb_mounted which indicate if the device was mounted and it available via sd:/ or usb:/
- Some minor cleanups and formatting.
2018-02-25 13:07:49 +01:00
Maschell
a12db00fd9 [Loader] Force make to disable the jobserver while compiling mocha. 2018-02-24 19:23:12 +01:00
Maschell
55dd57d62f [Loader] Code formatting and minor logging improvements. 2018-02-24 12:35:00 +01:00
Maschell
409527fb21 [ALL] Added overlay callback
- Improved the overlay example. It's now using the wups api.
- Not working on TV when the game is rendered in 1080p. (Maybe add option to force screen to 720p?)
2018-02-20 12:41:58 +01:00
Maschell
6067cede64 [Loader] Fixed loading plugin which don't replace any functions. 2018-02-18 21:42:41 +01:00
Maschell
2b1b46363d [ALL] Renamed the EntryData into FunctionData, fixed some comments.
- Also
2018-02-18 19:03:51 +01:00
Maschell
d64f221a92 [ALL] Added more fields to the metadata
- Now the plugin it holds the build timestamp and a description
- Added descriptions for all plugins
2018-02-18 18:43:51 +01:00
Maschell
869b3bc391 [Loader] Now show config GUI when entering Mii Maker
- Added for methods to the plugin loader.
2018-02-18 17:47:03 +01:00
Maschell
41da4db58c Replaced all instances of the word "module" with "plugin" 2018-02-18 16:10:27 +01:00
Maschell
d0908e7eb6 [Loader] Refactored the plugin loading.
- Now all plugins in the "sd:/wiiu/plugins" folder will be loaded.
- Minor code cleanup
2018-02-18 15:55:43 +01:00
Maschell
f6ec4bcc56 [Loader] Fixed stupid typo 2018-02-17 15:30:42 +01:00
Maschell
de95b2e599 [Loader] Added simple, initial gui.
- Added all files for creating a gui.
- Moved some of the module related into an own sub folder
2018-02-17 14:51:05 +01:00
Maschell
46358ce67a Added SD/USB support for plugins!
Now the plugins inherit the SD/USB access from the loader.
Check
(args != NULL && (args->device_mounted & WUPS_SD_MOUNTED) > 0)
in your INITIALZE method if you have SD access, and
(args != NULL && (args->device_mounted & WUPS_USB_MOUNTED) > 0)
for usb access.
You can simply use open, read etc. then with "sd:/" and "usb:".
No (un)mounting required.
NTFS support is NOT implemented yet.

So:
HID to VPAD plugin can now read configurations
SDCafiine now has support for libfat (other games than SSBU + FAT32 USB)
2018-02-14 22:52:16 +01:00
Maschell
dc8a9a81fc [Loader] Added mocha and device mounting.
- Now patching two more function which could be used as hooks (PPCExit and ProcUIProcessMessages)
2018-02-14 19:46:14 +01:00
Maschell
894a60c2bf [Loader] Moved method elfLink from ModuleData to ElfTools, other minor stuff 2018-02-14 18:18:42 +01:00
Maschell
389e3ba5f1 [Loader] Added some more comments and TODOs 2018-02-13 22:36:05 +01:00
Maschell
b7f9e68c90 [Loader] Updated logging message 2018-02-13 22:28:08 +01:00
Maschell
a31d6e8db5 [Loader] Huge refactoring. Getting rid of the global lists in C. Using std::vector now and classes. 2018-02-13 22:20:38 +01:00
Maschell
7aec6a2bfd [General] Updated the wups_loader_entry_t struct
Removed the union
2018-02-12 20:51:24 +01:00
Maschell
8c0a3c965b [Plugin] Added a port of SwapDRC (SwipSwapMe) 2018-02-11 19:49:42 +01:00
Maschell
38e045e41d [Loader] Fixed returning to the HBL if multiple plugin override the same function
- They need to be restored in the reversed order!
- Disabled verbose function patching logging.
2018-02-11 18:52:11 +01:00
Maschell
34e5773714 [Loader] Load the SDCafiine plugin 2018-02-11 18:43:32 +01:00
Maschell
2cbc49b030 [Loader] only procced when the loading was successful 2018-02-11 18:18:10 +01:00
Maschell
db29f7a302 [Loader] Only load plugin if no more relocations are needed. 2018-02-11 03:24:32 +01:00
Maschell
c53b6a3d8e [Loader] unmount sdcard after loading the plugins 2018-02-10 17:10:20 +01:00
Maschell
ec217c6aef [Loader] Added support for the init hook.
- The loader now returns to the system menu and restores all patches when entering mii maker.
2018-02-10 17:05:11 +01:00
Maschell
17e34ad60b [Loader] First successfull, complete replacement!
- Copied the function patcher from the function_patcher example and modified to work with this porject
- Minor formatting
- Added global struct with stores the replacement functions
- Extended the useable space for plugins
2018-02-10 14:58:58 +01:00
Maschell
10c5eccd93 [Example Plugin] Updated the example plugin
- It's now linking with libc/libutils/libdynamiclibs
- moved the main.c into the a "src" folder

[Loader]- Added DCFlushRange and DCInvalidateRange
- Improved logging.

Finally we can load the plugin from the sdcard and call it's function!
2018-02-09 21:31:05 +01:00
Maschell
4cdcbe2d20 [Loader] Added missing relocation type 2018-02-09 21:28:39 +01:00
Maschell
46456df8fc [Loader] Updated the loader to call functions
Progress?
2018-02-04 22:25:15 +01:00
Maschell
ef9579c6ba [Loader] Added code to parse the wups.load section
And copy the functions into the target space. Relocation is next!
2018-02-04 18:05:04 +01:00
Maschell
5ed70a368e [Loader] Code formatting 2018-02-04 16:42:59 +01:00
Maschell
76271cee58 [Loader] Started to work on the module parsing
Based on the original brainslug code with some changes.
Currently it's possible to parse the meta data.
2018-02-04 16:41:00 +01:00
Maschell
b0f7567243 [Loader] removed unused makefile 2018-02-04 16:39:11 +01:00
Maschell
4c2489c1ff [Loader] Add the wups includes to the loader makefile 2018-02-04 16:35:13 +01:00
Maschell
d5800f49a2 [Loader ]Added missing define to libelf 2018-02-04 16:34:39 +01:00