From 0f812ffb242d201908476ae207f439c9cccb8a99 Mon Sep 17 00:00:00 2001 From: Ash Date: Wed, 4 Dec 2024 12:28:36 +1100 Subject: [PATCH] [MK8/Splatoon/Minecraft] Add packs to force network port for multiplayer (#655) Thanks @ashquarky for this PR! --- .../patch_port.asm | 14 +++++ .../rules.txt | 59 +++++++++++++++++++ src/MarioKart8/NetworkPort/patch_port.asm | 7 +++ src/MarioKart8/NetworkPort/rules.txt | 59 +++++++++++++++++++ src/Splatoon/NetworkPort/patch_port.asm | 7 +++ src/Splatoon/NetworkPort/rules.txt | 59 +++++++++++++++++++ 6 files changed, 205 insertions(+) create mode 100644 Workarounds/MinecraftWiiUEdition_NetworkPort/patch_port.asm create mode 100644 Workarounds/MinecraftWiiUEdition_NetworkPort/rules.txt create mode 100644 src/MarioKart8/NetworkPort/patch_port.asm create mode 100644 src/MarioKart8/NetworkPort/rules.txt create mode 100644 src/Splatoon/NetworkPort/patch_port.asm create mode 100644 src/Splatoon/NetworkPort/rules.txt diff --git a/Workarounds/MinecraftWiiUEdition_NetworkPort/patch_port.asm b/Workarounds/MinecraftWiiUEdition_NetworkPort/patch_port.asm new file mode 100644 index 00000000..b9facc7b --- /dev/null +++ b/Workarounds/MinecraftWiiUEdition_NetworkPort/patch_port.asm @@ -0,0 +1,14 @@ +[MinecraftWiiU_ForceMultiplayerPortNumber_v688] +moduleMatches = 0x867317DE + +# GetRandomPortRangeMin +.origin = 0x03579530 +li r3, 0 +ori r3, r3, $port +blr + +# GetRandomPortRangeMax +.origin = 0x0357953c +li r3, 0 +ori r3, r3, $port +blr diff --git a/Workarounds/MinecraftWiiUEdition_NetworkPort/rules.txt b/Workarounds/MinecraftWiiUEdition_NetworkPort/rules.txt new file mode 100644 index 00000000..2e2948b1 --- /dev/null +++ b/Workarounds/MinecraftWiiUEdition_NetworkPort/rules.txt @@ -0,0 +1,59 @@ +[Definition] +titleIds = 00050000101D9D00,00050000101D7500,00050000101DBE00 +name = Multiplayer network port +path = "Minecraft: Wii U Edition/Workarounds/Multiplayer network port" +description = Forces peer-to-peer multiplayer to use a certain network port number, so that you can port forward it in your router.||This might help with connecting to online services, or with some 118-XXXX errors. +version = 6 + +[Default] +$port = 58000 + +[Preset] +name = UDP 58000 +category = Use network port +$port = 58000 + +[Preset] +name = UDP 58001 +category = Use network port +$port = 58001 + +[Preset] +name = UDP 58002 +category = Use network port +$port = 58002 + +[Preset] +name = UDP 58003 +category = Use network port +$port = 58003 + +[Preset] +name = UDP 58004 +category = Use network port +$port = 58004 + +[Preset] +name = UDP 58005 +category = Use network port +$port = 58005 + +[Preset] +name = UDP 58006 +category = Use network port +$port = 58006 + +[Preset] +name = UDP 58007 +category = Use network port +$port = 58007 + +[Preset] +name = UDP 58008 +category = Use network port +$port = 58008 + +[Preset] +name = UDP 58009 +category = Use network port +$port = 58009 diff --git a/src/MarioKart8/NetworkPort/patch_port.asm b/src/MarioKart8/NetworkPort/patch_port.asm new file mode 100644 index 00000000..eaa0516e --- /dev/null +++ b/src/MarioKart8/NetworkPort/patch_port.asm @@ -0,0 +1,7 @@ +[MarioKart8_ForceMultiplayerPortNumber_v81] +moduleMatches = 0x9F0A90B7 + +# min port range +0x101a9a52 = .short $port +# max port range +0x101a9a54 = .short $port diff --git a/src/MarioKart8/NetworkPort/rules.txt b/src/MarioKart8/NetworkPort/rules.txt new file mode 100644 index 00000000..d0abd54d --- /dev/null +++ b/src/MarioKart8/NetworkPort/rules.txt @@ -0,0 +1,59 @@ +[Definition] +titleIds = 000500001010ec00,000500001010ed00,000500001010eb00 +name = Multiplayer network port +path = "Mario Kart 8/Workarounds/Multiplayer network port" +description = Forces peer-to-peer multiplayer to use a certain network port number, so that you can port forward it in your router.||This might help with connecting to online services, or with some 118-XXXX errors. +version = 6 + +[Default] +$port = 58000 + +[Preset] +name = UDP 58000 +category = Use network port +$port = 58000 + +[Preset] +name = UDP 58001 +category = Use network port +$port = 58001 + +[Preset] +name = UDP 58002 +category = Use network port +$port = 58002 + +[Preset] +name = UDP 58003 +category = Use network port +$port = 58003 + +[Preset] +name = UDP 58004 +category = Use network port +$port = 58004 + +[Preset] +name = UDP 58005 +category = Use network port +$port = 58005 + +[Preset] +name = UDP 58006 +category = Use network port +$port = 58006 + +[Preset] +name = UDP 58007 +category = Use network port +$port = 58007 + +[Preset] +name = UDP 58008 +category = Use network port +$port = 58008 + +[Preset] +name = UDP 58009 +category = Use network port +$port = 58009 diff --git a/src/Splatoon/NetworkPort/patch_port.asm b/src/Splatoon/NetworkPort/patch_port.asm new file mode 100644 index 00000000..30b67ed4 --- /dev/null +++ b/src/Splatoon/NetworkPort/patch_port.asm @@ -0,0 +1,7 @@ +[Splatoon_ForceMultiplayerPortNumber_v288] +moduleMatches = 0x659C782E + +# min port range +0x101e8952 = .short $port +# max port range +0x101e8954 = .short $port diff --git a/src/Splatoon/NetworkPort/rules.txt b/src/Splatoon/NetworkPort/rules.txt new file mode 100644 index 00000000..097e4a78 --- /dev/null +++ b/src/Splatoon/NetworkPort/rules.txt @@ -0,0 +1,59 @@ +[Definition] +titleIds = 0005000010176900,0005000010176A00,0005000010162B00 +name = Multiplayer network port +path = "Splatoon/Workarounds/Multiplayer network port" +description = Forces peer-to-peer multiplayer to use a certain network port number, so that you can port forward it in your router.||This might help with connecting to online services, or with some 118-XXXX errors. +version = 6 + +[Default] +$port = 58000 + +[Preset] +name = UDP 58000 +category = Use network port +$port = 58000 + +[Preset] +name = UDP 58001 +category = Use network port +$port = 58001 + +[Preset] +name = UDP 58002 +category = Use network port +$port = 58002 + +[Preset] +name = UDP 58003 +category = Use network port +$port = 58003 + +[Preset] +name = UDP 58004 +category = Use network port +$port = 58004 + +[Preset] +name = UDP 58005 +category = Use network port +$port = 58005 + +[Preset] +name = UDP 58006 +category = Use network port +$port = 58006 + +[Preset] +name = UDP 58007 +category = Use network port +$port = 58007 + +[Preset] +name = UDP 58008 +category = Use network port +$port = 58008 + +[Preset] +name = UDP 58009 +category = Use network port +$port = 58009