From 0bdcabdfa966660a9c1a19cda9468e2683748d9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Lam?= Date: Sun, 6 Aug 2017 20:38:02 +0800 Subject: [PATCH] Boot/BS2: Write the "devkit boot program version" --- Source/Core/Core/Boot/Boot_BS2Emu.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Source/Core/Core/Boot/Boot_BS2Emu.cpp b/Source/Core/Core/Boot/Boot_BS2Emu.cpp index 6cb4c3e851..9723622715 100644 --- a/Source/Core/Core/Boot/Boot_BS2Emu.cpp +++ b/Source/Core/Core/Boot/Boot_BS2Emu.cpp @@ -300,6 +300,15 @@ bool CBoot::SetupWiiMemory(u64 ios_title_id) Memory::Write_U16(0x8201, 0x000030e6); // Dev console / debug capable Memory::Write_U32(0x00000000, 0x000030f0); // Apploader + // During the boot process, 0x315c is first set to 0xdeadbeef by IOS + // in the boot_ppc syscall. The value is then partly overwritten by SDK titles. + // Two bytes at 0x315e are used to indicate the "devkit boot program version". + // It is only written to by the system menu, so we must do so here as well. + // + // 0x0113 appears to mean v1.13, which is the latest version. + // It is fine to always use the latest value as apploaders work with all versions. + Memory::Write_U16(0x0113, 0x0000315e); + if (!IOS::HLE::GetIOS()->BootIOS(ios_title_id)) return false;