diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5b9fa9b..168f0ad 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,7 +9,7 @@ jobs: clang-format: runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: clang-format run: | docker run --rm -v ${PWD}:/src ghcr.io/wiiu-env/clang-format:13.0.0-2 -r ./source @@ -17,7 +17,7 @@ jobs: runs-on: ubuntu-22.04 needs: clang-format steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: create version.h run: | git_hash=$(git rev-parse --short "$GITHUB_SHA") @@ -48,7 +48,7 @@ jobs: - name: zip artifact run: zip -r ${{ env.REPOSITORY_NAME }}_${{ env.DATETIME }}.zip *.wms - name: Create Release - uses: "softprops/action-gh-release@v1" + uses: "softprops/action-gh-release@v2" with: tag_name: ${{ env.REPOSITORY_NAME }}-${{ env.DATETIME }} draft: false diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 90ac4e9..c82c7e4 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -6,7 +6,7 @@ jobs: clang-format: runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: clang-format run: | docker run --rm -v ${PWD}:/src ghcr.io/wiiu-env/clang-format:13.0.0-2 -r ./source @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-22.04 needs: clang-format steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: build binary with logging run: | docker build . -t builder @@ -25,7 +25,7 @@ jobs: runs-on: ubuntu-22.04 needs: clang-format steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: create version.h run: | git_hash=$(git rev-parse --short "${{ github.event.pull_request.head.sha }}") diff --git a/Dockerfile b/Dockerfile index 319d34e..9cbbdbe 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,7 @@ -FROM ghcr.io/wiiu-env/devkitppc:20230621 +FROM ghcr.io/wiiu-env/devkitppc:20240423 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 +COPY --from=ghcr.io/wiiu-env/libkernel:20230621 /artifacts $DEVKITPRO WORKDIR project diff --git a/Makefile b/Makefile index f6d8b5b..973885a 100644 --- a/Makefile +++ b/Makefile @@ -41,7 +41,7 @@ CFLAGS += $(INCLUDE) -D__WIIU__ -D__WUT__ CXXFLAGS := $(CFLAGS) -std=c++20 ASFLAGS := -g $(ARCH) -LDFLAGS = -g $(ARCH) $(RPXSPECS) -Wl,-Map,$(notdir $*.map) -Tfunctionpatcher.ld $(WUMSSPECS) +LDFLAGS = -g $(ARCH) $(RPXSPECS) -Wl,-Map,$(notdir $*.map) -Tfunctionpatcher.ld -T$(WUMS_ROOT)/share/libkernel.ld $(WUMSSPECS) ifeq ($(DEBUG),1) CXXFLAGS += -DDEBUG -g @@ -53,7 +53,7 @@ CXXFLAGS += -DDEBUG -DVERBOSE_DEBUG -g CFLAGS += -DDEBUG -DVERBOSE_DEBUG -g endif -LIBS := -lwums -lwut -lfunctionpatcher +LIBS := -lwums -lwut -lfunctionpatcher -lkernel #------------------------------------------------------------------------------- # list of directories containing libraries, this must be the top level diff --git a/source/main.cpp b/source/main.cpp index 05662e5..cbd78d0 100644 --- a/source/main.cpp +++ b/source/main.cpp @@ -13,7 +13,7 @@ WUMS_MODULE_EXPORT_NAME("homebrew_basemodule"); WUMS_MODULE_SKIP_INIT_FINI(); WUMS_DEPENDS_ON(homebrew_functionpatcher); -#define VERSION "v0.2.4" +#define VERSION "v0.2.5" WUMS_INITIALIZE(args) { initLogging(); diff --git a/source/patches/patches.cpp b/source/patches/patches.cpp index 68c0cfd..b907cce 100644 --- a/source/patches/patches.cpp +++ b/source/patches/patches.cpp @@ -1,7 +1,9 @@ #include "globals.h" #include "logger.h" #include "patches_replacements.h" +#include #include +#include // init is not called for this module. We need to make sure to init these values in initCommonPatches() uint32_t gHeapMask; @@ -27,6 +29,14 @@ void initCommonPatches() { } } DEBUG_FUNCTION_LINE("Common patches finished"); + + // Patch loader.elf to spit out less warnings when loading .rpx built with wut + KernelNOPAtPhysicalAddress(0x0100b770 - 0x01000000 + 0x32000000); + KernelNOPAtPhysicalAddress(0x0100b800 - 0x01000000 + 0x32000000); + KernelNOPAtPhysicalAddress(0x0100b7b8 - 0x01000000 + 0x32000000); + ICInvalidateRange(reinterpret_cast(0x0100b770), 0x04); + ICInvalidateRange(reinterpret_cast(0x0100b800), 0x04); + ICInvalidateRange(reinterpret_cast(0x0100b7b8), 0x04); } void commonPatchesStart() {