mirror of
https://github.com/wiiu-env/FunctionPatcherModule.git
synced 2024-09-29 08:48:37 +02:00
Compare commits
4 Commits
597788ff96
...
6c05c4dbdc
Author | SHA1 | Date | |
---|---|---|---|
|
6c05c4dbdc | ||
|
df287468a1 | ||
|
52192d0cb4 | ||
|
8de9c37137 |
1
.gitignore
vendored
1
.gitignore
vendored
@ -8,3 +8,4 @@ build/
|
|||||||
cmake-build-debug/
|
cmake-build-debug/
|
||||||
CMakeLists.txt
|
CMakeLists.txt
|
||||||
*.wms
|
*.wms
|
||||||
|
*.zip
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
FROM ghcr.io/wiiu-env/devkitppc:20230621
|
FROM ghcr.io/wiiu-env/devkitppc:20240423
|
||||||
|
|
||||||
COPY --from=ghcr.io/wiiu-env/libkernel:20230621 /artifacts $DEVKITPRO
|
COPY --from=ghcr.io/wiiu-env/libkernel:20230621 /artifacts $DEVKITPRO
|
||||||
COPY --from=ghcr.io/wiiu-env/libfunctionpatcher:20230621 /artifacts $DEVKITPRO
|
COPY --from=ghcr.io/wiiu-env/libfunctionpatcher:20230621 /artifacts $DEVKITPRO
|
||||||
COPY --from=ghcr.io/wiiu-env/wiiumodulesystem:20230719 /artifacts $DEVKITPRO
|
COPY --from=ghcr.io/wiiu-env/wiiumodulesystem:20240424 /artifacts $DEVKITPRO
|
||||||
|
|
||||||
WORKDIR project
|
WORKDIR project
|
||||||
|
@ -232,15 +232,15 @@ void PatchedFunctionData::generateJumpToOriginal() {
|
|||||||
|
|
||||||
uint32_t jumpToAddress = this->realEffectiveFunctionAddress + 4;
|
uint32_t jumpToAddress = this->realEffectiveFunctionAddress + 4;
|
||||||
|
|
||||||
this->jumpToOriginal[0] = this->replacedInstruction;
|
|
||||||
|
|
||||||
if (((uint32_t) jumpToAddress & 0x01FFFFFC) != (uint32_t) jumpToAddress) {
|
if (((uint32_t) jumpToAddress & 0x01FFFFFC) != (uint32_t) jumpToAddress) {
|
||||||
// We need to do a long jump
|
// We need to do a long jump
|
||||||
this->jumpToOriginal[1] = 0x3d600000 | ((jumpToAddress >> 16) & 0x0000FFFF); // lis r11 ,0x1234
|
this->jumpToOriginal[0] = 0x3d600000 | ((jumpToAddress >> 16) & 0x0000FFFF); // lis r11 ,0x1234
|
||||||
this->jumpToOriginal[2] = 0x616b0000 | (jumpToAddress & 0x0000ffff); // ori r11 ,r11 ,0x5678
|
this->jumpToOriginal[1] = 0x616b0000 | (jumpToAddress & 0x0000ffff); // ori r11 ,r11 ,0x5678
|
||||||
this->jumpToOriginal[3] = 0x7d6903a6; // mtspr CTR ,r11
|
this->jumpToOriginal[2] = 0x7d6903a6; // mtspr CTR ,r11
|
||||||
this->jumpToOriginal[4] = 0x4e800420; // bctr
|
this->jumpToOriginal[3] = this->replacedInstruction;
|
||||||
|
this->jumpToOriginal[4] = 0x4e800420; // bctr
|
||||||
} else {
|
} else {
|
||||||
|
this->jumpToOriginal[0] = this->replacedInstruction;
|
||||||
this->jumpToOriginal[1] = 0x48000002 | (jumpToAddress & 0x01FFFFFC);
|
this->jumpToOriginal[1] = 0x48000002 | (jumpToAddress & 0x01FFFFFC);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
#include <memory>
|
#include <memory>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#define MODULE_VERSION "v0.2.2"
|
#define MODULE_VERSION "v0.2.3"
|
||||||
#define MODULE_VERSION_FULL MODULE_VERSION MODULE_VERSION_EXTRA
|
#define MODULE_VERSION_FULL MODULE_VERSION MODULE_VERSION_EXTRA
|
||||||
|
|
||||||
#define JUMP_HEAP_DATA_SIZE (32 * 1024)
|
#define JUMP_HEAP_DATA_SIZE (32 * 1024)
|
||||||
|
Loading…
Reference in New Issue
Block a user