From 4cc1bd972a12186b320d5e1142f10ab145df3203 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Lam?= Date: Wed, 4 Oct 2017 10:48:49 +0200 Subject: [PATCH] CommonTitles: Add a named constant for IOS TIDs --- Source/Core/Core/Boot/Boot.cpp | 2 +- Source/Core/Core/CommonTitles.h | 17 +++++++++++------ 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/Source/Core/Core/Boot/Boot.cpp b/Source/Core/Core/Boot/Boot.cpp index 5d4bf93c7a..a3083308ef 100644 --- a/Source/Core/Core/Boot/Boot.cpp +++ b/Source/Core/Core/Boot/Boot.cpp @@ -339,7 +339,7 @@ bool CBoot::BootUp(std::unique_ptr boot) // Because there is no TMD to get the requested system (IOS) version from, // we default to IOS58, which is the version used by the Homebrew Channel. SetupWiiMemory(); - IOS::HLE::GetIOS()->BootIOS(0x000000010000003a); + IOS::HLE::GetIOS()->BootIOS(Titles::IOS(58)); } else { diff --git a/Source/Core/Core/CommonTitles.h b/Source/Core/Core/CommonTitles.h index 5b86db8f17..3ed6176e2f 100644 --- a/Source/Core/Core/CommonTitles.h +++ b/Source/Core/Core/CommonTitles.h @@ -12,11 +12,16 @@ constexpr u64 BOOT2 = 0x0000000100000001; constexpr u64 SYSTEM_MENU = 0x0000000100000002; -// IOS used by the latest System Menu (4.3). Corresponds to IOS80. -constexpr u64 SYSTEM_MENU_IOS = 0x0000000100000050; - -constexpr u64 BC = 0x0000000100000100; -constexpr u64 MIOS = 0x0000000100000101; - constexpr u64 SHOP = 0x0001000248414241; + +constexpr u64 IOS(u32 major_version) +{ + return 0x0000000100000000 | major_version; +} + +// IOS used by the latest System Menu (4.3). Corresponds to IOS80. +constexpr u64 SYSTEM_MENU_IOS = IOS(80); + +constexpr u64 BC = IOS(0x100); +constexpr u64 MIOS = IOS(0x101); } // namespace Titles