]> Chaos Git - corbenik/corbenik.git/commitdiff
Add contrib directory and mysterymachine patch based on @Wolfvak's original conversion
authorchaoskagami <chaos.kagami@gmail.com>
Mon, 13 Jun 2016 01:56:02 +0000 (21:56 -0400)
committerchaoskagami <chaos.kagami@gmail.com>
Mon, 13 Jun 2016 02:13:43 +0000 (22:13 -0400)
Makefile
contrib/Makefile [new file with mode: 0644]
contrib/README.md [new file with mode: 0644]
contrib/mysterymachine.pco [new file with mode: 0644]

index 1a3ac59b8d2c5b971a22588b498465567f5d5e69..f36b9f4240cc17c69c8a63f8f943e35d960dc363 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -32,10 +32,14 @@ objects_cfw = $(patsubst $(dir_source)/%.s, $(dir_build)/%.o, \
 all: a9lh patch external
 
 .PHONY: full
-full: all out/corbenik/locale
+full: all contrib out/corbenik/locale
        cp README.md LICENSE.txt out/
        cd out && zip -r9 release.zip *
 
+.PHONY: contrib
+contrib:
+       make -C contrib
+
 .PHONY: external
 external:
        make -C external
diff --git a/contrib/Makefile b/contrib/Makefile
new file mode 100644 (file)
index 0000000..d41aaaf
--- /dev/null
@@ -0,0 +1,18 @@
+.PHONY: all
+all: build install
+
+.PHONY: build
+build: clean $(patsubst %.pco, %.vco, $(wildcard *.pco))
+       mkdir -p ../out/corbenik/patch
+       cp *.vco ../out/corbenik/patch/
+
+.PHONY: install
+install: build
+       mkdir -p ../out/contrib
+       cp *.vco ../out/contrib/
+
+%.vco: %.pco
+       ../host/bytecode_asm.py $< $@
+
+clean:
+       rm -f *.vco
diff --git a/contrib/README.md b/contrib/README.md
new file mode 100644 (file)
index 0000000..0e78edd
--- /dev/null
@@ -0,0 +1,10 @@
+Contributed patches
+----------------------
+
+This directory is for any patches not part of the official distribution and potentially contributed by users. Anything in here must be distributed under the GPLv3, otherwise it cannot be included. I'll make an effort to maintain these as part of the official release zips, but these may not have the same quality standards as `patches/` due to being non-essential to operation.
+
+If you want your patch in the release zips, submit a PR! As long as it does what it says on the tin can and uses GPLv3 as the license, I'll merge it. ;P I can only hope someday this becomes a useful repository of patches for people.
+
+Current contrib patches:
+
+ * mysterymachine.pco - Patches mystery gift in ORAS/XY to point to SALT servers (Original patch: @Wolfvak)
diff --git a/contrib/mysterymachine.pco b/contrib/mysterymachine.pco
new file mode 100644 (file)
index 0000000..6b0ee00
--- /dev/null
@@ -0,0 +1,45 @@
+# $name  MysteryMachine Patcher
+# $desc  Patches Mystery Gift to point to SALT servers
+# $title 000400000011C400 000400000011C500 0004000000055D00 0004000000055E00
+# $ver   01
+# $uuid  0010
+
+# This is for current-gen pokemon games, and points mystery gift
+# to SALT's servers. See here:
+#   http://mys.salthax.org/
+# This performs the same patching done by the official HANS-based
+# patcher here:
+#   https://github.com/shinyquagsire23/MysteryMachine-Patcher
+# You do not need to use HBLauncher to use this, either. ;P
+
+# This patch was originally created by @Wolfvak although there's
+# really only one way to implement it. Forward all kudos to him.
+
+# I extended it to the other games using newer VM features - that's
+# about it.
+
+rel exe_ro
+
+find  "https://3ds1-fushigi.pokemon-gl.com/api/"
+jmpf  seturl
+
+rewind
+find  "https://3ds2-fushigi.pokemon-gl.com/api/"
+abortnf
+
+seturl:
+
+set   "http://mys.salthax.org/api/"
+set   00
+rewind
+
+find  "https://npdl.cdn.nintendowifi.net/p01/nsa/%s/%s/%s"
+abortnf
+set   "http://mys.salthax.org/p01/nsa/%s/%s/%s"
+set   00
+rewind
+
+find  "https://npfl.c.app.nintendowifi.net/p01/filelist/"
+abortnf
+set   "http://mys.salthax.org/p01/filelist/"
+set   00