From 225348821f0f597e2d7e26e828ba4d80a22f406e Mon Sep 17 00:00:00 2001 From: "fix94.1" Date: Sat, 26 May 2012 11:40:31 +0000 Subject: [PATCH] -made our homebrew stub even smaller and now its also possible to edit the title id to exit to directly without recompiling the whole stub but only wiiflow ;) --- data/stub.bin | Bin 1308 -> 1240 bytes source/homebrew/homebrew.cpp | 19 ++++++++++++++++--- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/data/stub.bin b/data/stub.bin index 487120782e2993784ca791cd215e35f3db4298ac..c2baa1cbbea180dc3cbecefdd57da59a2bb8041e 100644 GIT binary patch delta 221 zcmbQkb%S$)I&Xso0|Ubp#{UOA7?@KhhCF9vm~6v18%W+@yw1r0lw_a4Da$Z<2h({$ z7X1bW28TTiJhloA3=NsGER$z2%hXR%{QshcgK3#X1B1f;g$z9Q3mO=#_sU$Dz{ns| zzxZ`U_+Ey6-v9p|1ZlEo8$8P(6obJtIS+W>`g{*V*?#@fM)ig@YA6cIO diff --git a/source/homebrew/homebrew.cpp b/source/homebrew/homebrew.cpp index 68dc86c1..1705e8d3 100644 --- a/source/homebrew/homebrew.cpp +++ b/source/homebrew/homebrew.cpp @@ -8,9 +8,9 @@ #include "smartptr.hpp" #include "gecko.h" -#define EXECUTE_ADDR ((u8 *) 0x92000000) -#define BOOTER_ADDR ((u8 *) 0x93000000) -#define ARGS_ADDR ((u8 *) 0x93200000) +#define EXECUTE_ADDR ((u8 *)0x92000000) +#define BOOTER_ADDR ((u8 *)0x93000000) +#define ARGS_ADDR ((u8 *)0x93200000) using namespace std; @@ -125,6 +125,19 @@ int BootHomebrew(bool wiiflow_stub) /* Copy our own stub into memory */ memcpy((void*)0x80001800, stub_bin, stub_bin_size); + + /* Lower Title ID */ + *(vu8*)0x80001bf2 = 0x00; + *(vu8*)0x80001bf3 = 0x01; + *(vu8*)0x80001c06 = 0x00; + *(vu8*)0x80001c07 = 0x08; + + /* Upper Title ID */ + *(vu8*)0x80001bfa = 0x57; + *(vu8*)0x80001bfb = 0x49; + *(vu8*)0x80001c0a = 0x49; + *(vu8*)0x80001c0b = 0x48; + DCFlushRange((void*)0x80001800, stub_bin_size); }