forked from PretendoNetwork/Inkay
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
56a115ca79 |
|||
| cc7d9e8d84 | |||
| 14501054ac | |||
| dc1466eb36 | |||
| bc2014fbe8 | |||
| 04bbcbfda9 | |||
| 257d4ba119 | |||
| e14b6b69f1 | |||
| e421ac5a40 | |||
|
|
5960ff1e40 |
||
|
|
890be941a9 | ||
|
|
6df031b26d |
||
| d5f9207deb | |||
| 1796ebebb5 | |||
| 998abca200 | |||
| 4c432b753c | |||
| 7403eaecd3 | |||
| bf5336cba9 | |||
| c2e1eef7e5 | |||
| d01d322003 | |||
| 00a75e94cb |
32 changed files with 277 additions and 225 deletions
19
.github/dependabot.yml
vendored
19
.github/dependabot.yml
vendored
|
|
@ -1,19 +0,0 @@
|
|||
# To get started with Dependabot version updates, you'll need to specify which
|
||||
# package ecosystems to update and where the package manifests are located.
|
||||
# Please see the documentation for all configuration options:
|
||||
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
|
||||
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: "docker" # See documentation for possible values
|
||||
directory: "/" # Location of package manifests
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
commit-message:
|
||||
prefix: "chore: "
|
||||
- package-ecosystem: "github-actions" # See documentation for possible values
|
||||
directory: "/" # Location of package manifests
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
commit-message:
|
||||
prefix: "chore: "
|
||||
12
.github/workflows/ci.yml
vendored
12
.github/workflows/ci.yml
vendored
|
|
@ -8,17 +8,15 @@ on:
|
|||
|
||||
jobs:
|
||||
build-inkay:
|
||||
runs-on: ubuntu-22.04
|
||||
runs-on: debian-trixie
|
||||
steps:
|
||||
- uses: actions/checkout@v7
|
||||
with:
|
||||
submodules: 'true'
|
||||
- name: build toolchain container
|
||||
run: docker build . -t builder
|
||||
- uses: ammaraskar/gcc-problem-matcher@master
|
||||
- uses: https://github.com/ammaraskar/gcc-problem-matcher@master
|
||||
- name: build Inkay
|
||||
run: docker run --rm -v ${PWD}:${PWD} -w ${PWD} builder
|
||||
- uses: actions/upload-artifact@v7
|
||||
run: docker run --rm -v ${PWD}:/app -w /app builder
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: inkay
|
||||
path: dist/
|
||||
path: dist/
|
||||
3
.gitmodules
vendored
3
.gitmodules
vendored
|
|
@ -1,3 +0,0 @@
|
|||
[submodule "src/ext/libplum"]
|
||||
path = src/ext/libplum
|
||||
url = https://github.com/PretendoNetwork/libplum
|
||||
12
Dockerfile
12
Dockerfile
|
|
@ -1,11 +1,11 @@
|
|||
FROM ghcr.io/wiiu-env/devkitppc:20260504
|
||||
|
||||
COPY --from=ghcr.io/wiiu-env/libnotifications:20260404 /artifacts $DEVKITPRO
|
||||
COPY --from=ghcr.io/wiiu-env/libfunctionpatcher:20260331 /artifacts $DEVKITPRO
|
||||
COPY --from=ghcr.io/wiiu-env/libkernel:20260331 /artifacts $DEVKITPRO
|
||||
COPY --from=ghcr.io/wiiu-env/libmocha:20260331 /artifacts $DEVKITPRO
|
||||
COPY --from=ghcr.io/wiiu-env/wiiumodulesystem:20260418 /artifacts $DEVKITPRO
|
||||
COPY --from=ghcr.io/wiiu-env/wiiupluginsystem:20260503 /artifacts $DEVKITPRO
|
||||
COPY --from=ghcr.io/wiiu-env/libnotifications:20240426 /artifacts $DEVKITPRO
|
||||
COPY --from=ghcr.io/wiiu-env/libfunctionpatcher:20230621 /artifacts $DEVKITPRO
|
||||
COPY --from=ghcr.io/wiiu-env/libkernel:20230621 /artifacts $DEVKITPRO
|
||||
COPY --from=ghcr.io/wiiu-env/libmocha:20231127 /artifacts $DEVKITPRO
|
||||
COPY --from=ghcr.io/wiiu-env/wiiumodulesystem:20250219 /artifacts $DEVKITPRO
|
||||
COPY --from=ghcr.io/wiiu-env/wiiupluginsystem:20240505 /artifacts $DEVKITPRO
|
||||
|
||||
WORKDIR /app
|
||||
CMD make -f Makefile -j$(nproc)
|
||||
|
|
|
|||
6
Makefile
6
Makefile
|
|
@ -19,11 +19,11 @@ WUT_ROOT := $(DEVKITPRO)/wut
|
|||
# DATA is a list of directories containing data files
|
||||
# INCLUDES is a list of directories containing header files
|
||||
#-------------------------------------------------------------------------------
|
||||
TARGET := Inkay-pretendo
|
||||
TARGET := Malamar-spfn
|
||||
BUILD := build
|
||||
SOURCES := src src/patches src/utils src/ext/inih src/ext/libplum/src common
|
||||
SOURCES := src src/patches src/utils src/ext/inih common
|
||||
DATA := data
|
||||
INCLUDES := src src/ext/inih src/ext/libplum/include/plum src/lang common
|
||||
INCLUDES := src src/ext/inih src/lang common
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# options for code generation
|
||||
|
|
|
|||
25
README.md
25
README.md
|
|
@ -1,8 +1,6 @@
|
|||
# Inkay - Aroma patches for Pretendo
|
||||
# Malamar - Aroma patches for Splatfestival Network/Spacebar
|
||||
|
||||
[](https://pretendo.network)
|
||||
|
||||
Inkay is an Aroma/WUPS plugin that patches various Nintendo Network URLs on a Wii U to use Pretendo Network instead. It also (for the time being) bypasses SSL verification in most cases. It redirects Nintendo Network in:
|
||||
Malamar is an Aroma/WUPS plugin based on Pretendo's Malamar that patches various Nintendo Network URLs on a Wii U to use Splatfestival/Spacebar Network instead. It also (for the time being) bypasses SSL verification in most cases. It redirects Nintendo Network in:
|
||||
|
||||
- IOSU-side connections (Friends, SpotPass, accounts etc.)
|
||||
- Account Settings
|
||||
|
|
@ -11,27 +9,27 @@ Inkay is an Aroma/WUPS plugin that patches various Nintendo Network URLs on a Wi
|
|||
- Miiverse (in-game)
|
||||
- Miiverse applet
|
||||
|
||||
Inkay also includes game-specific patches to add extra features:
|
||||
Malamar also includes game-specific patches to add extra features:
|
||||
- Modpack-specific matchmaking for global, regional rooms (by simulating extra DLC) - **Mario Kart 8**
|
||||
- P2P port override for better connection stability (if you port forward) - **Minecraft: Wii U Edition**, **Mario Kart 8**, **Splatoon**
|
||||
|
||||
## Requirements
|
||||
Inkay is only supported on the release version of Aroma configured for autoboot/coldboot. Other configurations (specifically lacking coldboot) may cause issues with SpotPass.
|
||||
Malamar is only supported on the release version of Aroma configured for autoboot/coldboot. Other configurations (specifically lacking coldboot) may cause issues with SpotPass.
|
||||
|
||||
## Safety
|
||||
Inkay's patches are all temporary, and only applied in-memory without modifying your console. The SSL patch, while also temporary, could reduce the overall security of your console while active - this is because it no longer checks if a server is verified. However, this does not apply to the Internet Browser, where SSL still works as expected.
|
||||
Malamar's patches are all temporary, and only applied in-memory without modifying your console. The SSL patch, while also temporary, could reduce the overall security of your console while active - this is because it no longer checks if a server is verified. However, this does not apply to the Internet Browser, where SSL still works as expected.
|
||||
|
||||
## Compiling - Docker
|
||||
Inkay's dependencies and build tooling can be handled as a container, which is recommended for WUPS plugins. Using `docker` or `podman`:
|
||||
Malamar's dependencies and build tooling can be handled as a container, which is recommended for WUPS plugins. Using `docker` or `podman`:
|
||||
```shell
|
||||
docker build -t inkay .
|
||||
docker run --rm -v $(pwd):/app inkay make
|
||||
docker build -t malamar .
|
||||
docker run --rm -v $(pwd):/app malamar make
|
||||
# you can replace "make" with other commands - e.g. make clean
|
||||
```
|
||||
If using `podman` on SELinux systems (like Fedora Linux), you might need to use `$(pwd):/app:Z` instead of `$(pwd):/app`.
|
||||
|
||||
## Compiling - System
|
||||
Inkay has the following dependencies aside from devkitPPC and wut:
|
||||
Malamar has the following dependencies aside from devkitPPC and wut:
|
||||
- [WiiUPluginSystem](https://github.com/wiiu-env/WiiUPluginSystem)
|
||||
- [WiiUModuleSystem](https://github.com/wiiu-env/WiiUModuleSystem)
|
||||
- [libmocha](https://github.com/wiiu-env/libmocha)
|
||||
|
|
@ -39,7 +37,4 @@ Inkay has the following dependencies aside from devkitPPC and wut:
|
|||
- [libnotifications](https://github.com/wiiu-env/libnotifications/)
|
||||
- [libfunctionpatcher](https://github.com/wiiu-env/libfunctionpatcher)
|
||||
|
||||
Each of these should be `make install`-able. After that, you can compile Inkay with `make`.
|
||||
|
||||
## TODO
|
||||
See [Issues](https://github.com/PretendoNetwork/Inkay/issues).
|
||||
Each of these should be `make install`-able. After that, you can compile Malamar with `make`.
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
#endif
|
||||
|
||||
#ifndef NETWORK_BASEURL
|
||||
#define NETWORK_BASEURL "pretendo.cc"
|
||||
#define NETWORK_BASEURL "spbr.net"
|
||||
#endif
|
||||
|
||||
#endif //INKAY_INKAY_CONFIG_H
|
||||
|
|
|
|||
|
|
@ -25,9 +25,6 @@ config_strings get_config_strings(inkay_language language) {
|
|||
case inkay_language::SimplifiedChinese: return {
|
||||
#include "zh_CN.lang"
|
||||
};
|
||||
case inkay_language::TraditionalChinese: return {
|
||||
#include "zh_Hant.lang"
|
||||
};
|
||||
case inkay_language::Portuguese: return {
|
||||
#include "pt_BR.lang"
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,8 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#include <nn/ac/ac_c.h>
|
||||
|
||||
NNResult ACGetAssignedAlternativeDns(uint32_t *ip);
|
||||
NNResult ACGetAssignedGateway(uint32_t *ip);
|
||||
NNResult ACGetAssignedPreferedDns(uint32_t *ip); // sic
|
||||
NNResult ACGetAssignedSubnet(uint32_t *ip);
|
||||
|
|
@ -19,7 +19,7 @@ WUMS_ROOT := $(DEVKITPRO)/wums
|
|||
# DATA is a list of directories containing data files
|
||||
# INCLUDES is a list of directories containing header files
|
||||
#-------------------------------------------------------------------------------
|
||||
TARGET := Inkay-pretendo
|
||||
TARGET := Malamar-spfn
|
||||
BUILD := build
|
||||
SOURCES := src src/utils ../common
|
||||
DATA := data
|
||||
|
|
|
|||
|
|
@ -21,6 +21,9 @@
|
|||
#include <notifications/notifications.h>
|
||||
#include <utils/logger.h>
|
||||
#include "config.h"
|
||||
#include<coreinit/title.h>
|
||||
#include<coreinit/dynload.h>
|
||||
#include<vector>
|
||||
#include "module.h"
|
||||
|
||||
#define INKAY_VERSION "v3.1.0"
|
||||
|
|
@ -29,14 +32,95 @@
|
|||
Mandatory plugin information.
|
||||
If not set correctly, the loader will refuse to use the plugin.
|
||||
**/
|
||||
WUPS_PLUGIN_NAME("Inkay");
|
||||
WUPS_PLUGIN_DESCRIPTION("Pretendo Network Patcher");
|
||||
WUPS_META(name, "Malamar (SPFN)");
|
||||
WUPS_META(wups, WUPS_VERSION_STR);
|
||||
WUPS_USE_WUT_MALLOC();
|
||||
WUPS_USE_WUT_SOCKETS();
|
||||
WUPS_USE_WUT_NEWLIB();
|
||||
WUPS___INIT_WRAPPER();
|
||||
WUPS___FINI_WRAPPER();
|
||||
WUPS_INIT_CONFIG_FUNCTIONS();
|
||||
WUPS_META(buildtimestamp, __DATE__ " " __TIME__);
|
||||
extern const char wups_meta_plugin_name[] WUPS_SECTION("meta");
|
||||
const char wups_meta_plugin_name[] = "Malamar (SPFN)";
|
||||
extern const char wups_meta_info_dump[] WUPS_SECTION("meta");
|
||||
const char wups_meta_info_dump[] = "(plugin: Malamar (SPFN);" \
|
||||
"wups " WUPS_VERSION_STR ";" \
|
||||
"buildtime: " __DATE__ " " __TIME__ ")";
|
||||
extern const char wups_meta_info_linking_order[] WUPS_SECTION("meta");
|
||||
const char wups_meta_info_linking_order[] = "Loading \"Malamar (SPFN)\" failed.\n" \
|
||||
"Function \"wut_get_thread_specific\" returned unexpected value.\n" \
|
||||
"Please check linking order (expected \"-lwups -lwut\")";
|
||||
|
||||
WUPS_PLUGIN_DESCRIPTION("SPFN Network Patcher");
|
||||
WUPS_PLUGIN_VERSION(INKAY_VERSION);
|
||||
WUPS_PLUGIN_AUTHOR("Pretendo contributors");
|
||||
WUPS_PLUGIN_AUTHOR("redbinder0526, kittentm and Pretendo contributors");
|
||||
WUPS_PLUGIN_LICENSE("GPLv3");
|
||||
|
||||
WUPS_USE_STORAGE("inkay");
|
||||
|
||||
WUPS_USE_WUT_DEVOPTAB();
|
||||
|
||||
bool is_current_game_splatoon(){
|
||||
auto current_game = OSGetTitleID();
|
||||
|
||||
if(
|
||||
current_game == 0x0005000010162B00 ||
|
||||
current_game == 0x0005000010176900 ||
|
||||
current_game == 0x0005000010176A00
|
||||
){
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void splatoon_patcher(){
|
||||
if (!Config::connect_to_network) {
|
||||
DEBUG_FUNCTION_LINE_VERBOSE("Inkay: Splatoon patches skipped");
|
||||
return;
|
||||
}
|
||||
if(is_current_game_splatoon()){
|
||||
NotificationModule_AddInfoNotification("Splatoon Detected, applying patch");
|
||||
|
||||
auto rpl_count = OSDynLoad_GetNumberOfRPLs();
|
||||
|
||||
std::vector<OSDynLoad_NotifyData> rpls(rpl_count);
|
||||
|
||||
if(!OSDynLoad_GetRPLInfo(0, rpl_count, rpls.data())){
|
||||
NotificationModule_AddInfoNotification("failed to get rpls");
|
||||
}
|
||||
|
||||
for(auto rpl: rpls){
|
||||
if(rpl.name != 0){
|
||||
if(strstr(rpl.name, "Gambit") != NULL){
|
||||
NotificationModule_AddInfoNotification(rpl.name);
|
||||
auto text_color = NMColor();
|
||||
text_color.r = 255;
|
||||
text_color.g = 255;
|
||||
text_color.b = 255;
|
||||
text_color.a = 255;
|
||||
|
||||
auto bg_color = NMColor();
|
||||
bg_color.r = 0;
|
||||
bg_color.g = 0;
|
||||
bg_color.b = 0;
|
||||
bg_color.a = 0;
|
||||
|
||||
NotificationModule_AddInfoNotificationEx(rpl.name, 30.0f, text_color, bg_color, nullptr, nullptr, true);
|
||||
|
||||
NotificationModule_AddInfoNotification("applying patches!!!!");
|
||||
|
||||
void* game_data_region = (void*)rpl.dataAddr;
|
||||
|
||||
auto str_loc = (char*)(0x000009ac + (uint32_t)game_data_region);
|
||||
|
||||
strcpy(str_loc, "https://splatpost.spbr.net/post");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
INITIALIZE_PLUGIN() {
|
||||
WHBLogCafeInit();
|
||||
|
||||
|
|
@ -59,6 +143,7 @@ DEINITIALIZE_PLUGIN() {
|
|||
|
||||
ON_APPLICATION_START() {
|
||||
// Tell the module the plugin is running!
|
||||
splatoon_patcher();
|
||||
Inkay_SetPluginRunning();
|
||||
}
|
||||
|
||||
|
|
|
|||
3
renovate.json
Normal file
3
renovate.json
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"$schema": "https://docs.renovatebot.com/renovate-schema.json"
|
||||
}
|
||||
|
|
@ -1 +0,0 @@
|
|||
Subproject commit 79e85e61e638e04c10f74f65e1e06957d7658ac7
|
||||
|
|
@ -8,35 +8,35 @@ typedef struct URL_Patch {
|
|||
|
||||
static const URL_Patch url_patches[] = {
|
||||
//nim-boss .rodata
|
||||
{0xE2282550, "http://pushmore.wup.shop.pretendo.cc/pushmore/r/%s"},
|
||||
{0xE229A0A0, "http://npns-dev.c.app.pretendo.cc/bst.dat"},
|
||||
{0xE229A0D0, "http://npns-dev.c.app.pretendo.cc/bst2.dat"},
|
||||
{0xE2281964, "https://tagaya.wup.shop.pretendo.cc/tagaya/versionlist/%s/%s/%s"},
|
||||
{0xE22819B4, "https://tagaya.wup.shop.pretendo.cc/tagaya/versionlist/%s/%s/latest_version"},
|
||||
{0xE2282584, "http://pushmo.wup.shop.pretendo.cc/pushmo/d/%s/%u"},
|
||||
{0xE22825B8, "http://pushmo.wup.shop.pretendo.cc/pushmo/c/%u/%u"},
|
||||
{0xE2282DB4, "https://ecs.wup.shop.pretendo.cc/ecs/services/ECommerceSOAP"},
|
||||
{0xE22830A0, "https://ecs.wup.shop.pretendo.cc/ecs/services/ECommerceSOAP"},
|
||||
{0xE22830E0, "https://nus.wup.shop.pretendo.cc/nus/services/NetUpdateSOAP"},
|
||||
{0xE2299990, "nppl.app.pretendo.cc"},
|
||||
{0xE229A600, "https://pls.wup.shop.pretendo.cc/pls/upload"},
|
||||
{0xE229A6AC, "https://npvk-dev.app.pretendo.cc/reports"},
|
||||
{0xE229A6D8, "https://npvk.app.pretendo.cc/reports"},
|
||||
{0xE229B1F4, "https://npts.app.pretendo.cc/p01/tasksheet/%s/%s/%s/%s?c=%s&l=%s"},
|
||||
{0xE229B238, "https://npts.app.pretendo.cc/p01/tasksheet/%s/%s/%s?c=%s&l=%s"},
|
||||
{0xE22AB2D8, "https://idbe-wup.cdn.pretendo.cc/icondata/%02X/%016llX.idbe"},
|
||||
{0xE22AB318, "https://idbe-ctr.cdn.pretendo.cc/icondata/%02X/%016llX.idbe"},
|
||||
{0xE22AB358, "https://idbe-wup.cdn.pretendo.cc/icondata/%02X/%016llX-%d.idbe"},
|
||||
{0xE22AB398, "https://idbe-ctr.cdn.pretendo.cc/icondata/%02X/%016llX-%d.idbe"},
|
||||
{0xE22B3EF8, "https://ecs.c.shop.pretendo.cc"},
|
||||
{0xE22B3F30, "https://ecs.c.shop.pretendo.cc/ecs/services/ECommerceSOAP"},
|
||||
{0xE22B3F70, "https://ias.c.shop.pretendo.cc/ias/services/IdentityAuthenticationSOAP"},
|
||||
{0xE22B3FBC, "https://cas.c.shop.pretendo.cc/cas/services/CatalogingSOAP"},
|
||||
{0xE22B3FFC, "https://nus.c.shop.pretendo.cc/nus/services/NetUpdateSOAP"},
|
||||
{0xE229DE0C, "n.app.pretendo.cc"},
|
||||
{0xE2282550, "http://pushmorewupshop.spbr.net/pushmore/r/%s"},
|
||||
{0xE229A0A0, "http://npns-devcapp.spbr.net/bst.dat"},
|
||||
{0xE229A0D0, "http://npns-devcapp.spbr.net/bst2.dat"},
|
||||
{0xE2281964, "https://tagayawupshop.spbr.net/tagaya/versionlist/%s/%s/%s"},
|
||||
{0xE22819B4, "https://tagayawupshop.spbr.net/tagaya/versionlist/%s/%s/latest_version"},
|
||||
{0xE2282584, "http://pushmowupshop.spbr.net/pushmo/d/%s/%u"},
|
||||
{0xE22825B8, "http://pushmowupshop.spbr.net/pushmo/c/%u/%u"},
|
||||
{0xE2282DB4, "https://ecswupshop.spbr.net/ecs/services/ECommerceSOAP"},
|
||||
{0xE22830A0, "https://ecswupshop.spbr.net/ecs/services/ECommerceSOAP"},
|
||||
{0xE22830E0, "https://nuswupshop.spbr.net/nus/services/NetUpdateSOAP"},
|
||||
{0xE2299990, "policylist.spbr.net"},
|
||||
{0xE229A600, "https://plswupshop.spbr.net/pls/upload"},
|
||||
{0xE229A6AC, "https://npvk-devapp.spbr.net/reports"},
|
||||
{0xE229A6D8, "https://npvkapp.spbr.net/reports"},
|
||||
{0xE229B1F4, "https://tasksheets.spbr.net/p01/tasksheet/%s/%s/%s/%s?c=%s&l=%s"},
|
||||
{0xE229B238, "https://tasksheets.spbr.net/p01/tasksheet/%s/%s/%s?c=%s&l=%s"},
|
||||
{0xE22AB2D8, "https://idbe-wupcdn.spbr.net/icondata/%02X/%016llX.idbe"},
|
||||
{0xE22AB318, "https://idbe-ctrcdn.spbr.net/icondata/%02X/%016llX.idbe"},
|
||||
{0xE22AB358, "https://idbe-wupcdn.spbr.net/icondata/%02X/%016llX-%d.idbe"},
|
||||
{0xE22AB398, "https://idbe-ctrcdn.spbr.net/icondata/%02X/%016llX-%d.idbe"},
|
||||
{0xE22B3EF8, "https://ecscshop.spbr.net"},
|
||||
{0xE22B3F30, "https://ecscshop.spbr.net/ecs/services/ECommerceSOAP"},
|
||||
{0xE22B3F70, "https://iascshop.spbr.net/ias/services/IdentityAuthenticationSOAP"},
|
||||
{0xE22B3FBC, "https://cascshop.spbr.net/cas/services/CatalogingSOAP"},
|
||||
{0xE22B3FFC, "https://nuscshop.spbr.net/nus/services/NetUpdateSOAP"},
|
||||
{0xE229DE0C, "n.app.spbr.net"},
|
||||
//nim-boss .bss
|
||||
{0xE24B8A24, "https://nppl.app.pretendo.cc/p01/policylist/1/1/UNK"},
|
||||
{0xE31930D4, "https://%s%saccount.pretendo.cc/v%u/api/"}
|
||||
{0xE24B8A24, "https://policylist.spbr.net/p01/policylist/1/1/UNK"},
|
||||
{0xE31930D4, "https://%s%saccount.spbr.net/v%u/api/"}
|
||||
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -1,17 +1,16 @@
|
|||
.plugin_name="Inkay"
|
||||
,.network_category="Netzwerkauswahl"
|
||||
,.connect_to_network_setting="Mit Pretendo Network verbinden"
|
||||
,.show_startup_toast_setting=""
|
||||
,.connect_to_network_setting="Verbinde zum SPFN"
|
||||
,.other_category="Andere Einstellungen"
|
||||
,.reset_wwp_setting="Wara Wara Plaza zurücksetzen"
|
||||
,.press_a_action="Drücke A"
|
||||
,.restart_to_apply_action="Neustarten zum Anwenden"
|
||||
,.need_menu_action="Nur vom Wii U-Menü aus"
|
||||
,.using_nintendo_network="Nutze Nintendo Network"
|
||||
,.using_pretendo_network="Nutze Pretendo Network"
|
||||
,.using_pretendo_network="Nutze SPFN"
|
||||
,.multiplayer_port_display="Nutze UDP Port %hu für Mehrspieler"
|
||||
,.module_not_found="Pretendo Network Patch fehlgeschlagen - nutze Aroma Updater zum Reparieren (686-1001 Module missing)"
|
||||
,.module_init_not_found="Pretendo Network Patch fehlgeschlagen - nutze Aroma Updater zum Reparieren (686-1002 Module init)"
|
||||
,.module_not_found="SPFN Patch fehlgeschlagen - nutze Aroma Updater zum Reparieren (686-1001 Module missing)"
|
||||
,.module_init_not_found="SPFN Patch fehlgeschlagen - nutze Aroma Updater zum Reparieren (686-1002 Module init)"
|
||||
,.setting_yes=""
|
||||
,.setting_no=""
|
||||
,.language_setting=""
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
.plugin_name="Inkay"
|
||||
.plugin_name="Malamar"
|
||||
,.network_category="Network selection"
|
||||
,.connect_to_network_setting="Connect to Pretendo Network"
|
||||
,.connect_to_network_setting="Connect to SPFN"
|
||||
,.show_startup_toast_setting="Show startup toast"
|
||||
,.other_category="Other settings"
|
||||
,.reset_wwp_setting="Reset Wara Wara Plaza"
|
||||
|
|
@ -8,10 +8,10 @@
|
|||
,.restart_to_apply_action="Restart to apply"
|
||||
,.need_menu_action="From WiiU menu only"
|
||||
,.using_nintendo_network="Using Nintendo Network"
|
||||
,.using_pretendo_network="Using Pretendo Network"
|
||||
,.using_pretendo_network="Using SPFN"
|
||||
,.multiplayer_port_display="Using UDP port %hu for multiplayer"
|
||||
,.module_not_found="Pretendo Network patch failed - use Aroma Updater to repair (686-1001 Module missing)"
|
||||
,.module_init_not_found="Pretendo Network patch failed - use Aroma Updater to repair (686-1002 Module init)"
|
||||
,.module_not_found="SPFN patch failed - use Aroma Updater to repair (686-1001 Module missing)"
|
||||
,.module_init_not_found="SPFN patch failed - use Aroma Updater to repair (686-1002 Module init)"
|
||||
,.setting_yes="Yes"
|
||||
,.setting_no="No"
|
||||
,.language_setting="Language"
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
.plugin_name="Inkay"
|
||||
,.network_category="Seleccionar red"
|
||||
,.connect_to_network_setting="Conectar a Pretendo Network"
|
||||
,.connect_to_network_setting="Conectar a SPFN"
|
||||
,.show_startup_toast_setting=""
|
||||
,.other_category="Otros ajustes"
|
||||
,.reset_wwp_setting="Restablecer Plaza Wara Wara"
|
||||
|
|
@ -8,10 +8,10 @@
|
|||
,.restart_to_apply_action="Reiniciar para aplicar"
|
||||
,.need_menu_action="Solo desde el Menú de Wii U"
|
||||
,.using_nintendo_network="Usando Nintendo Network"
|
||||
,.using_pretendo_network="Usando Pretendo Network"
|
||||
,.using_pretendo_network="Usando SPFN"
|
||||
,.multiplayer_port_display="Usando puerto UDP %hu para multijugador"
|
||||
,.module_not_found="Ha fallado el parche Pretendo Network - usa Aroma Updater para repararlo (686-1001 Falta un módulo)"
|
||||
,.module_init_not_found="Ha fallado el parche Pretendo Network - usa Aroma Updater para repararlo (686-1002 Inicialización del módulo)"
|
||||
,.module_not_found="Ha fallado el parche SPFN - usa Aroma Updater para repararlo (686-1001 Falta un módulo)"
|
||||
,.module_init_not_found="Ha fallado el parche SPFN - usa Aroma Updater para repararlo (686-1002 Inicialización del módulo)"
|
||||
,.setting_yes=""
|
||||
,.setting_no=""
|
||||
,.language_setting=""
|
||||
|
|
|
|||
|
|
@ -1,17 +1,16 @@
|
|||
.plugin_name="Inkay"
|
||||
,.network_category="Sélection du réseau"
|
||||
,.connect_to_network_setting="Connexion au Pretendo Network"
|
||||
,.show_startup_toast_setting=""
|
||||
,.connect_to_network_setting="Connexion au SPFN"
|
||||
,.other_category="Autres paramètres"
|
||||
,.reset_wwp_setting="Réinitialiser la place WaraWara"
|
||||
,.press_a_action="Appuyez sur A"
|
||||
,.restart_to_apply_action="Redémarrer pour appliquer"
|
||||
,.need_menu_action="(retournez d'abord au menu Wii U)"
|
||||
,.using_nintendo_network="Réseau sélectionné : Nintendo Network"
|
||||
,.using_pretendo_network="Réseau sélectionné : Pretendo Network"
|
||||
,.using_pretendo_network="Réseau sélectionné : SPFN"
|
||||
,.multiplayer_port_display="Le port UDP %hu sera utilisé pour le multijoueur"
|
||||
,.module_not_found="Le patch Pretendo Network a rencontré un problème, veuillez le réparer avec Aroma Updater (686-1001 Module missing)"
|
||||
,.module_init_not_found="Le patch Pretendo Network a rencontré un problème, veuillez le réparer avec Aroma Updater (686-1002 Module init)"
|
||||
,.module_not_found="Le patch SPFN a rencontré un problème, veuillez le réparer avec Aroma Updater (686-1001 Module missing)"
|
||||
,.module_init_not_found="Le patch SPFN a rencontré un problème, veuillez le réparer avec Aroma Updater (686-1002 Module init)"
|
||||
,.setting_yes=""
|
||||
,.setting_no=""
|
||||
,.language_setting=""
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
.plugin_name="Inkay"
|
||||
,.network_category="Seleziona la rete"
|
||||
,.connect_to_network_setting="Connettiti a Pretendo Network"
|
||||
,.connect_to_network_setting="Connettiti a SPFN"
|
||||
,.show_startup_toast_setting=""
|
||||
,.other_category="Altre impostazioni"
|
||||
,.reset_wwp_setting="Ripristina Wara Wara Plaza"
|
||||
|
|
@ -8,10 +8,10 @@
|
|||
,.restart_to_apply_action="Riavvia per applicare"
|
||||
,.need_menu_action="Solo dal menu WiiU"
|
||||
,.using_nintendo_network="In uso Nintendo Network"
|
||||
,.using_pretendo_network="In uso Pretendo Network"
|
||||
,.using_pretendo_network="In uso SPFN"
|
||||
,.multiplayer_port_display="È in uso la porta UDP %hu per il multigiocatore"
|
||||
,.module_not_found="Patch Pretendo Network fallita - usa Aroma Updater per riparare (686-1001 Modulo mancante)"
|
||||
,.module_init_not_found="Patch Pretendo Network fallita - usa Aroma Updater per riparare (686-1002 Module init)"
|
||||
,.module_not_found="Patch di SPFN fallita - usa Aroma Updater per correggere (686-1001 Modulo mancante)"
|
||||
,.module_init_not_found="Patch di SPFN fallita - usa Aroma Updater per correggere (686-1002 Module init)"
|
||||
,.setting_yes=""
|
||||
,.setting_no=""
|
||||
,.language_setting=""
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
.plugin_name="Inkay"
|
||||
,.network_category="ネットワークの選択"
|
||||
,.connect_to_network_setting="Pretendoネットワークに接続する"
|
||||
,.connect_to_network_setting="SPFNネットワークに接続する"
|
||||
,.show_startup_toast_setting=""
|
||||
,.other_category="その他の設定"
|
||||
,.reset_wwp_setting="わらわら広場をリセット"
|
||||
|
|
@ -8,10 +8,10 @@
|
|||
,.restart_to_apply_action="再起動後に反映されます"
|
||||
,.need_menu_action="Wii Uメニューからのみ実行可能"
|
||||
,.using_nintendo_network="選択済み:ニンテンドーネットワーク"
|
||||
,.using_pretendo_network="選択済み:Pretendo ネットワーク"
|
||||
,.using_pretendo_network="選択済み:SPFN ネットワーク"
|
||||
,.multiplayer_port_display="マルチプレイに UDPポート %hu を使用します"
|
||||
,.module_not_found="Pretendo パッチに失敗しました。Aroma Updaterを使用して解決してみてください。(686-1001 Module missing)"
|
||||
,.module_init_not_found="Pretendo パッチに失敗しました。Aroma Updaterを使用して解決してみてください。(686-1002 Module init)"
|
||||
,.module_not_found="SPFN パッチに失敗しました。Aroma Updaterを使用して解決してみてください。(686-1001 Module missing)"
|
||||
,.module_init_not_found="SPFN パッチに失敗しました。Aroma Updaterを使用して解決してみてください。(686-1002 Module init)"
|
||||
,.setting_yes=""
|
||||
,.setting_no=""
|
||||
,.language_setting=""
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
.plugin_name="Inkay"
|
||||
,.network_category="네트워크 선택"
|
||||
,.connect_to_network_setting="Pretendo Network 사용"
|
||||
,.connect_to_network_setting="SPFN 사용"
|
||||
,.show_startup_toast_setting=""
|
||||
,.other_category="기타 설정"
|
||||
,.reset_wwp_setting="Wara Wara Plaza 초기화"
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
,.restart_to_apply_action="재시작 후 적용"
|
||||
,.need_menu_action="Wii U 메뉴에서만"
|
||||
,.using_nintendo_network="Nintendo Network 사용 중"
|
||||
,.using_pretendo_network="Pretendo Network 사용 중"
|
||||
,.using_pretendo_network="SPFN 사용 중"
|
||||
,.multiplayer_port_display="멀티플레이어에 UDP 포트 %hu을(를) 사용합니다"
|
||||
,.module_not_found="패치를 적용하는 데 실패했습니다. Aroma Updater로 복구해 주세요. (686-1001 모듈 없음)"
|
||||
,.module_init_not_found="패치를 적용하는 데 실패했습니다. Aroma Updater로 복구해 주세요. (686-1002 모듈 초기화)"
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
.plugin_name="Inkay"
|
||||
,.network_category="Netwerkselectie"
|
||||
,.connect_to_network_setting="Verbind met het Pretendo-Netwerk"
|
||||
,.connect_to_network_setting="Verbind met het SPFN-netwerk"
|
||||
,.show_startup_toast_setting=""
|
||||
,.other_category="Overige instellingen"
|
||||
,.reset_wwp_setting="Reset het Wara Wara Plaza"
|
||||
|
|
@ -8,10 +8,10 @@
|
|||
,.restart_to_apply_action="Herstart om toe te passen"
|
||||
,.need_menu_action="Alleen vanuit het WiiU-menu"
|
||||
,.using_nintendo_network="Nintendo Network wordt gebruikt"
|
||||
,.using_pretendo_network="Pretendo Network wordt gebruikt"
|
||||
,.using_pretendo_network="SPFN wordt gebruikt"
|
||||
,.multiplayer_port_display="Gebruikt UDP port %hu voor multiplayer"
|
||||
,.module_not_found="Pretendo patch mislukt - gebruik Aroma Updater om het te herstellen (686-1001 Module ontbreekt)"
|
||||
,.module_init_not_found="Pretendo-Netwerk patch mislukt - gebruik Aroma Updater om het te herstellen (686-1002 Module init)"
|
||||
,.module_not_found="SPFN patch mislukt - gebruik Aroma Updater om het te herstellen (686-1001 Module ontbreekt)"
|
||||
,.module_init_not_found="SPFN patch mislukt - gebruik Aroma Updater om het te herstellen (686-1002 Module init)"
|
||||
,.setting_yes=""
|
||||
,.setting_no=""
|
||||
,.language_setting=""
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
.plugin_name="Inkay"
|
||||
,.network_category="Selecionar rede"
|
||||
,.connect_to_network_setting="Conecta-se à Pretendo Network"
|
||||
,.connect_to_network_setting="Conecta-se à SPFN"
|
||||
,.show_startup_toast_setting=""
|
||||
,.other_category="Outras configurações"
|
||||
,.reset_wwp_setting="Resetar Wara Wara Plaza"
|
||||
|
|
@ -8,10 +8,10 @@
|
|||
,.restart_to_apply_action="Reinicie para aplicar"
|
||||
,.need_menu_action="Apenas no menu do Wii U"
|
||||
,.using_nintendo_network="Usando Nintendo Network"
|
||||
,.using_pretendo_network="Usando Pretendo Network"
|
||||
,.using_pretendo_network="Usando SPFN"
|
||||
,.multiplayer_port_display="Usando UDP port %hu para a jogatina multiplayer"
|
||||
,.module_not_found="Atualização do Pretendo falhou - use o Aroma Updater para corrigir (686-1001 Módulo faltando)"
|
||||
,.module_init_not_found="Atualização do Pretendo falhou - use o Aroma Updater para corrigir (686-1002 Módulo de início)"
|
||||
,.module_not_found="Atualização do SPFN falhou - use o Aroma Updater para corrigir (686-1001 Módulo faltando)"
|
||||
,.module_init_not_found="Atualização do SPFN falhou - use o Aroma Updater para corrigir (686-1002 Módulo de início)"
|
||||
,.setting_yes=""
|
||||
,.setting_no=""
|
||||
,.language_setting=""
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
.plugin_name="Inkay"
|
||||
,.network_category="Выбор сети"
|
||||
,.connect_to_network_setting="Подключиться к Pretendo Network"
|
||||
,.connect_to_network_setting="Подключиться к SPFN"
|
||||
,.show_startup_toast_setting=""
|
||||
,.other_category="Другие настройки"
|
||||
,.reset_wwp_setting="Сбросить Wara Wara Plaza"
|
||||
|
|
@ -8,10 +8,10 @@
|
|||
,.restart_to_apply_action="Перезагрузите для применения изменений"
|
||||
,.need_menu_action="Только из меню Wii U"
|
||||
,.using_nintendo_network="Используется Nintendo Network"
|
||||
,.using_pretendo_network="Используется Pretendo Network"
|
||||
,.using_pretendo_network="Используется SPFN"
|
||||
,.multiplayer_port_display="Используем UDP-порт %hu для сетевой игры"
|
||||
,.module_not_found="Ошибка установки патча Pretendo - для восстановления, запустите Aroma Updater (686-1001 Модуль отсутствует)"
|
||||
,.module_init_not_found="Ошибка установки патча Pretendo - для восстановления, запустите Aroma Updater (686-1002 Инициализация модуля)"
|
||||
,.module_not_found="Ошибка установки патча SPFN - для восстановления, запустите Aroma Updater (686-1001 Модуль отсутствует)"
|
||||
,.module_init_not_found="Ошибка установки патча SPFN - для восстановления, запустите Aroma Updater (686-1002 Инициализация модуля)"
|
||||
,.setting_yes=""
|
||||
,.setting_no=""
|
||||
,.language_setting=""
|
||||
|
|
|
|||
|
|
@ -1,17 +1,16 @@
|
|||
.plugin_name="Inkay"
|
||||
,.network_category="选择网络"
|
||||
,.connect_to_network_setting="连接到Pretendo Network"
|
||||
,.show_startup_toast_setting=""
|
||||
,.connect_to_network_setting="连接到SPFN"
|
||||
,.other_category="其他设置"
|
||||
,.reset_wwp_setting="重置Wara Wara Plaza"
|
||||
,.press_a_action="请按 A"
|
||||
,.restart_to_apply_action="重启以应用设置"
|
||||
,.need_menu_action="仅来自WiiU Menu"
|
||||
,.using_nintendo_network="使用 Nintendo Network"
|
||||
,.using_pretendo_network="使用 Pretendo Network"
|
||||
,.using_pretendo_network="使用 SPFN"
|
||||
,.multiplayer_port_display="多人游戏使用 UDP 端口 %hu"
|
||||
,.module_not_found="Pretendo Network 补丁失败 - 使用 Aroma Updater 修复(686-1001 模块丢失)"
|
||||
,.module_init_not_found="Pretendo Network 补丁失败 - 使用 Aroma Updater 修复(686-1002 模块初始化)"
|
||||
,.module_not_found="SPFN 补丁失败 - 使用 Aroma Updater 修复(686-1001 模块丢失)"
|
||||
,.module_init_not_found="SPFN 补丁失败 - 使用 Aroma Updater 修复(686-1002 模块初始化)"
|
||||
,.setting_yes=""
|
||||
,.setting_no=""
|
||||
,.language_setting=""
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
.plugin_name="Inkay"
|
||||
,.network_category="選擇網路"
|
||||
,.connect_to_network_setting="連接到Pretendo Network"
|
||||
,.connect_to_network_setting="連接到SPFN"
|
||||
,.show_startup_toast_setting=""
|
||||
,.other_category="其他設定"
|
||||
,.reset_wwp_setting="重置Wara Wara Plaza"
|
||||
|
|
@ -8,10 +8,11 @@
|
|||
,.restart_to_apply_action="重啓以套用設定"
|
||||
,.need_menu_action="僅來自WiiU Menu"
|
||||
,.using_nintendo_network="使用 Nintendo Network"
|
||||
,.using_pretendo_network="使用 Pretendo Network"
|
||||
,.using_pretendo_network="使用 SPFN"
|
||||
,.multiplayer_port_display="Using UDP port %hu for multiplayer"
|
||||
,.module_not_found="SPFN patch failed - use Aroma Updater to repair (686-1001 Module missing)"
|
||||
,.module_init_not_found="SPFN patch failed - use Aroma Updater to repair (686-1002 Module init)"
|
||||
,.multiplayer_port_display="使用 UDP 端口 %hu 進行多人遊戲"
|
||||
,.module_not_found="Pretendo Network 補丁失敗 - 請使用 Aroma Updater 修復(缺少 686-1001 模組)"
|
||||
,.module_init_not_found="Pretendo Network 補丁失敗 - 請使用 Aroma Updater 修復(缺少 686-1002 模組)"
|
||||
,.setting_yes=""
|
||||
,.setting_no=""
|
||||
,.language_setting=""
|
||||
|
|
|
|||
34
src/main.cpp
34
src/main.cpp
|
|
@ -23,7 +23,6 @@
|
|||
#include "patches/olv_urls.h"
|
||||
#include "patches/game_matchmaking.h"
|
||||
|
||||
#include <plum.h>
|
||||
#include <wums.h>
|
||||
|
||||
#include <coreinit/dynload.h>
|
||||
|
|
@ -46,10 +45,28 @@
|
|||
Mandatory plugin information.
|
||||
If not set correctly, the loader will refuse to use the plugin.
|
||||
**/
|
||||
WUMS_MODULE_EXPORT_NAME("inkay");
|
||||
WUMS_MODULE_DESCRIPTION("Pretendo Network Patcher");
|
||||
WUMS_META(export_name, "inkay");
|
||||
WUMS_META(wums, WUMS_VERSION);
|
||||
WUMS_USE_WUT_MALLOC();
|
||||
WUMS_USE_WUT_SOCKETS();
|
||||
WUMS_USE_WUT_NEWLIB();
|
||||
WUMS___INIT_WRAPPER();
|
||||
WUMS___FINI_WRAPPER();
|
||||
WUMS_META(buildtimestamp, __DATE__ " " __TIME__);
|
||||
extern const char wums_meta_module_name[] WUMS_SECTION("meta");
|
||||
const char wums_meta_module_name[] = "inkay";
|
||||
extern const char wums_meta_info_dump[] WUMS_SECTION("meta");
|
||||
const char wums_meta_info_dump[] = "(module: inkay;" \
|
||||
"wums " WUMS_VERSION ";" \
|
||||
"buildtime: " __DATE__ " " __TIME__ ")";
|
||||
extern const char wums_meta_info_linking_order[] WUMS_SECTION("meta");
|
||||
const char wums_meta_info_linking_order[] = "Loading module \"inkay\" failed.\n" \
|
||||
"Function \"wut_get_thread_specific\" returned unexpected value.\n" \
|
||||
"Please check linking order (expected \"-lwums -lwut\")";
|
||||
|
||||
WUMS_MODULE_DESCRIPTION("SPFN Network Patcher");
|
||||
WUMS_MODULE_VERSION(INKAY_VERSION);
|
||||
WUMS_MODULE_AUTHOR("Pretendo contributors");
|
||||
WUMS_MODULE_AUTHOR("Pretendo contributors and RusticMaple");
|
||||
WUMS_MODULE_LICENSE("GPLv3");
|
||||
|
||||
WUMS_DEPENDS_ON(homebrew_functionpatcher);
|
||||
|
|
@ -190,12 +207,6 @@ WUMS_INITIALIZE() {
|
|||
if (NotificationModule_InitLibrary() != NOTIFICATION_MODULE_RESULT_SUCCESS) {
|
||||
DEBUG_FUNCTION_LINE("NotificationModule_InitLibrary failed");
|
||||
}
|
||||
|
||||
const plum_config_t plum_config = {
|
||||
.log_level = PLUM_LOG_LEVEL_VERBOSE,
|
||||
.log_callback = [](const plum_log_level_t level, const char *message) { DEBUG_FUNCTION_LINE("[PLUM-%d] %s", level, message) },
|
||||
};
|
||||
plum_init(&plum_config);
|
||||
}
|
||||
|
||||
WUMS_DEINITIALIZE() {
|
||||
|
|
@ -209,8 +220,6 @@ WUMS_DEINITIALIZE() {
|
|||
NotificationModule_DeInitLibrary();
|
||||
FunctionPatcher_DeInitLibrary();
|
||||
|
||||
plum_cleanup();
|
||||
|
||||
WHBLogCafeDeinit();
|
||||
WHBLogUdpDeinit();
|
||||
}
|
||||
|
|
@ -246,7 +255,6 @@ WUMS_ALL_APPLICATION_STARTS_DONE() {
|
|||
}
|
||||
|
||||
WUMS_APPLICATION_ENDS() {
|
||||
peertopeer_notify_titleswitch();
|
||||
}
|
||||
|
||||
WUMS_EXPORT_FUNCTION(Inkay_Initialize);
|
||||
|
|
|
|||
|
|
@ -34,7 +34,6 @@ constexpr std::pair<const char *, const char *> dns_replacements[] = {
|
|||
|
||||
static const char * replace_dns_name(const char *dns_name) {
|
||||
if (!Config::connect_to_network) return dns_name;
|
||||
if (!dns_name) return dns_name;
|
||||
|
||||
for (auto [original, replacement] : dns_replacements) {
|
||||
if (strcmp(original, dns_name) == 0)
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@
|
|||
|
||||
#include <coreinit/title.h>
|
||||
#include <coreinit/dynload.h>
|
||||
#include <plum.h>
|
||||
#include "game_peertopeer.h"
|
||||
|
||||
#include "config.h"
|
||||
|
|
@ -27,31 +26,6 @@
|
|||
#include <string_view>
|
||||
using namespace std::string_view_literals;
|
||||
|
||||
static std::optional<int> upnp_id;
|
||||
|
||||
static void upnp_cb(int id, plum_state_t state, const plum_mapping_t *mapping) {
|
||||
DEBUG_FUNCTION_LINE("Plum result %d, %s:%hu", state, mapping->external_host, mapping->external_port);
|
||||
}
|
||||
|
||||
static void upnp_go() {
|
||||
const plum_mapping_t mapping = {
|
||||
.protocol = PLUM_IP_PROTOCOL_UDP,
|
||||
.internal_port = get_console_peertopeer_port(),
|
||||
.user_ptr = nullptr,
|
||||
};
|
||||
int id = plum_create_mapping(&mapping, upnp_cb);
|
||||
if (id < 0) return;
|
||||
|
||||
upnp_id = id;
|
||||
}
|
||||
|
||||
static void upnp_stop() {
|
||||
if (!upnp_id) return;
|
||||
|
||||
plum_destroy_mapping(*upnp_id);
|
||||
upnp_id = std::nullopt;
|
||||
}
|
||||
|
||||
static struct {
|
||||
std::array<uint64_t, 3> tid;
|
||||
uint16_t version;
|
||||
|
|
@ -77,25 +51,24 @@ static struct {
|
|||
},
|
||||
};
|
||||
|
||||
static bool generic_peertopeer_patch() {
|
||||
static void generic_peertopeer_patch() {
|
||||
uint64_t tid = OSGetTitleID();
|
||||
uint16_t title_version = 0;
|
||||
if (const auto version_opt = get_current_title_version(); !version_opt) {
|
||||
DEBUG_FUNCTION_LINE("Failed to detect current title version");
|
||||
return false;
|
||||
return;
|
||||
} else {
|
||||
title_version = *version_opt;
|
||||
DEBUG_FUNCTION_LINE("Title version detected: %d", title_version);
|
||||
}
|
||||
|
||||
bool result = false;
|
||||
for (const auto &patch: generic_patch_games) {
|
||||
if (std::ranges::find(patch.tid, tid) == patch.tid.end()) continue;
|
||||
|
||||
std::optional<OSDynLoad_NotifyData> game = search_for_rpl(patch.rpx);
|
||||
if (!game) {
|
||||
DEBUG_FUNCTION_LINE("Couldn't find game rpx! (%s)", patch.rpx.data());
|
||||
return false;
|
||||
return;
|
||||
}
|
||||
|
||||
if (title_version != patch.version) {
|
||||
|
|
@ -112,23 +85,19 @@ static bool generic_peertopeer_patch() {
|
|||
|
||||
target = (uint16_t *)rpl_addr(*game, patch.max_port_addr);
|
||||
replace_unsigned<uint16_t>(target, 0xffff, port);
|
||||
|
||||
result = true;
|
||||
break;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
static bool minecraft_peertopeer_patch() {
|
||||
static void minecraft_peertopeer_patch() {
|
||||
std::optional<OSDynLoad_NotifyData> minecraft = search_for_rpl("Minecraft.Client.rpx"sv);
|
||||
if (!minecraft) {
|
||||
DEBUG_FUNCTION_LINE("Couldn't find minecraft rpx!");
|
||||
return false;
|
||||
return;
|
||||
}
|
||||
if (const auto version_opt = get_current_title_version(); !version_opt || *version_opt != 688) {
|
||||
DEBUG_FUNCTION_LINE("Wrong mincecraft version detected");
|
||||
return false;
|
||||
return;
|
||||
}
|
||||
|
||||
auto port = get_console_peertopeer_port();
|
||||
|
|
@ -143,8 +112,6 @@ static bool minecraft_peertopeer_patch() {
|
|||
replace_instruction(&target_func[0], 0x3c600001, 0x3c600000); // li r3, 0
|
||||
replace_instruction(&target_func[1], 0x3863ffff, 0x60630000 | port); // ori r3, r3, port
|
||||
// blr
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void peertopeer_patch() {
|
||||
|
|
@ -152,21 +119,13 @@ void peertopeer_patch() {
|
|||
return;
|
||||
}
|
||||
|
||||
bool patched;
|
||||
const uint64_t tid = OSGetTitleID();
|
||||
uint64_t tid = OSGetTitleID();
|
||||
if (tid == 0x00050000'101D7500 || // EUR
|
||||
tid == 0x00050000'101D9D00 || // USA
|
||||
tid == 0x00050000'101DBE00) { // JPN
|
||||
|
||||
patched = minecraft_peertopeer_patch();
|
||||
minecraft_peertopeer_patch();
|
||||
} else {
|
||||
patched = generic_peertopeer_patch();
|
||||
generic_peertopeer_patch();
|
||||
}
|
||||
|
||||
if (patched)
|
||||
upnp_go();
|
||||
}
|
||||
|
||||
void peertopeer_notify_titleswitch() {
|
||||
upnp_stop();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,4 +14,3 @@
|
|||
#pragma once
|
||||
|
||||
void peertopeer_patch();
|
||||
void peertopeer_notify_titleswitch();
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ constexpr struct olv_allowlist original_entry = {
|
|||
|
||||
constexpr struct olv_allowlist new_entry = {
|
||||
.scheme = "https",
|
||||
.domain = "." NETWORK_BASEURL,
|
||||
.domain = ".spbr.net",
|
||||
.path = "",
|
||||
.flags = {1, 1, 1, 1, 1},
|
||||
};
|
||||
|
|
@ -77,6 +77,7 @@ const replacement replacements[] = {
|
|||
};
|
||||
|
||||
static std::optional<FSFileHandle> rootca_pem_handle{};
|
||||
static std::optional<FSFileHandle> valid_tld_handle{};
|
||||
std::vector<PatchedFunctionHandle> olv_patches;
|
||||
|
||||
DECL_FUNCTION(int, FSOpenFile, FSClient *client, FSCmdBlock *block, char *path, const char *mode, uint32_t *handle,
|
||||
|
|
@ -106,33 +107,74 @@ DECL_FUNCTION(int, FSOpenFile, FSClient *client, FSCmdBlock *block, char *path,
|
|||
DEBUG_FUNCTION_LINE_VERBOSE("Inkay: Found Miiverse CA, replacing...");
|
||||
return ret;
|
||||
}
|
||||
else if (strcmp("vol/content/browser/effective_tld_names.dat", path) == 0)
|
||||
{
|
||||
// we patch the TLD because .cafe isnt on the list
|
||||
int ret = real_FSOpenFile(client, block, path, mode, handle, error);
|
||||
valid_tld_handle = *handle;
|
||||
DEBUG_FUNCTION_LINE_VERBOSE("Inkay: Found Miiverse TLD List, patching...");
|
||||
return ret;
|
||||
}
|
||||
|
||||
return real_FSOpenFile(client, block, path, mode, handle, error);
|
||||
}
|
||||
|
||||
DECL_FUNCTION(FSStatus, FSReadFile, FSClient *client, FSCmdBlock *block, uint8_t *buffer, uint32_t size, uint32_t count,
|
||||
FSFileHandle handle, uint32_t unk1, uint32_t flags) {
|
||||
if (size != 1) {
|
||||
DEBUG_FUNCTION_LINE("Inkay: Miiverse CA replacement failed!");
|
||||
FSFileHandle handle, uint32_t unk1, uint32_t flags)
|
||||
{
|
||||
if (size != 1)
|
||||
{
|
||||
DEBUG_FUNCTION_LINE("Inkay: Miiverse CA/LTD replacement failed!");
|
||||
}
|
||||
|
||||
if (rootca_pem_handle && *rootca_pem_handle == handle) {
|
||||
strlcpy((char *) buffer, (const char *) ca_pem, size * count);
|
||||
if (rootca_pem_handle && *rootca_pem_handle == handle)
|
||||
{
|
||||
strlcpy((char *)buffer, (const char *)ca_pem, size * count);
|
||||
|
||||
//this can't be done above (in the FSOpenFile hook) since it's not loaded yet.
|
||||
//the hardcoded offsets suck but they really are at Random Places In The Heap
|
||||
replaceBulk(0x11000000, 0x02000000, replacements);
|
||||
return (FSStatus) count;
|
||||
// this can't be done above (in the FSOpenFile hook) since it's not loaded yet.
|
||||
// the hardcoded offsets suck but they really are at Random Places In The Heap
|
||||
return (FSStatus)count;
|
||||
}
|
||||
else if (valid_tld_handle && *valid_tld_handle == handle)
|
||||
{
|
||||
// we patch the tld "aero"...
|
||||
FSStatus ret = real_FSReadFile(
|
||||
client, block, buffer, size, count, handle, unk1, flags);
|
||||
|
||||
if (ret > 0)
|
||||
{
|
||||
uint32_t totalSize = size * count;
|
||||
char *buf = (char *)buffer;
|
||||
|
||||
for (uint32_t i = 0; i + 4 <= totalSize; i++)
|
||||
{
|
||||
if (memcmp(&buf[i], "aero", 4) == 0)
|
||||
{
|
||||
memcpy(&buf[i], "cafe", 4);
|
||||
|
||||
DEBUG_FUNCTION_LINE_VERBOSE(
|
||||
"Inkay: patched TLD aero -> cafe");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
return real_FSReadFile(client, block, buffer, size, count, handle, unk1, flags);
|
||||
}
|
||||
|
||||
|
||||
DECL_FUNCTION(FSStatus, FSCloseFile, FSClient *client, FSCmdBlock *block, FSFileHandle handle, FSErrorFlag errorMask) {
|
||||
if (handle == rootca_pem_handle) {
|
||||
rootca_pem_handle.reset();
|
||||
}
|
||||
|
||||
if (handle == valid_tld_handle)
|
||||
{
|
||||
valid_tld_handle.reset();
|
||||
}
|
||||
|
||||
return real_FSCloseFile(client, block, handle, errorMask);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -18,9 +18,9 @@
|
|||
#include "inkay_config.h"
|
||||
|
||||
constexpr char original_url[] = "discovery.olv.nintendo.net/v1/endpoint";
|
||||
constexpr char new_url[] = "discovery.olv." NETWORK_BASEURL "/v1/endpoint";
|
||||
constexpr char new_url[] = "discovery.olv.spbr.net/v1/endpoint";
|
||||
|
||||
_Static_assert(sizeof(original_url) > sizeof(new_url),
|
||||
_Static_assert(sizeof(original_url) >= sizeof(new_url),
|
||||
"new_url too long! Must be less than 38chars.");
|
||||
|
||||
bool setup_olv_libs();
|
||||
|
|
|
|||
Loading…
Reference in a new issue