diff --git a/Source/Core/Core/Boot/Boot.cpp b/Source/Core/Core/Boot/Boot.cpp index 2f27bc3540..e030522369 100644 --- a/Source/Core/Core/Boot/Boot.cpp +++ b/Source/Core/Core/Boot/Boot.cpp @@ -572,7 +572,7 @@ bool CBoot::BootUp(Core::System& system, const Core::CPUThreadGuard& guard, // 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(system, IOS::HLE::IOSC::ConsoleType::Retail); - IOS::HLE::GetIOS()->BootIOS(system, Titles::IOS(58)); + IOS::HLE::GetIOS()->BootIOS(Titles::IOS(58)); } else { diff --git a/Source/Core/Core/Boot/Boot_BS2Emu.cpp b/Source/Core/Core/Boot/Boot_BS2Emu.cpp index 86c026f558..faae0e704d 100644 --- a/Source/Core/Core/Boot/Boot_BS2Emu.cpp +++ b/Source/Core/Core/Boot/Boot_BS2Emu.cpp @@ -559,7 +559,7 @@ bool CBoot::EmulatedBS2_Wii(Core::System& system, const Core::CPUThreadGuard& gu const u64 ios = ios_override >= 0 ? Titles::IOS(static_cast(ios_override)) : tmd.GetIOSId(); const auto console_type = volume.GetTicket(data_partition).GetConsoleType(); - if (!SetupWiiMemory(system, console_type) || !IOS::HLE::GetIOS()->BootIOS(system, ios)) + if (!SetupWiiMemory(system, console_type) || !IOS::HLE::GetIOS()->BootIOS(ios)) return false; auto di = diff --git a/Source/Core/Core/IOS/ES/ES.cpp b/Source/Core/Core/IOS/ES/ES.cpp index ec8a5aa5ab..128d28787f 100644 --- a/Source/Core/Core/IOS/ES/ES.cpp +++ b/Source/Core/Core/IOS/ES/ES.cpp @@ -374,7 +374,7 @@ bool ESDevice::LaunchIOS(u64 ios_title_id, HangPPC hang_ppc) const ES::TicketReader ticket = m_core.FindSignedTicket(ios_title_id); ES::Content content; if (!tmd.IsValid() || !ticket.IsValid() || !tmd.GetContent(tmd.GetBootIndex(), &content) || - !GetEmulationKernel().BootIOS(GetSystem(), ios_title_id, hang_ppc, + !GetEmulationKernel().BootIOS(ios_title_id, hang_ppc, m_core.GetContentPath(ios_title_id, content))) { PanicAlertFmtT("Could not launch IOS {0:016x} because it is missing from the NAND.\n" @@ -385,7 +385,7 @@ bool ESDevice::LaunchIOS(u64 ios_title_id, HangPPC hang_ppc) return true; } - return GetEmulationKernel().BootIOS(GetSystem(), ios_title_id, hang_ppc); + return GetEmulationKernel().BootIOS(ios_title_id, hang_ppc); } s32 ESDevice::WriteLaunchFile(const ES::TMDReader& tmd, Ticks ticks) @@ -490,8 +490,7 @@ bool ESDevice::LaunchPPCTitle(u64 title_id) bool ESDevice::BootstrapPPC() { - const bool result = - GetEmulationKernel().BootstrapPPC(GetSystem(), m_pending_ppc_boot_content_path); + const bool result = GetEmulationKernel().BootstrapPPC(m_pending_ppc_boot_content_path); m_pending_ppc_boot_content_path = {}; return result; } diff --git a/Source/Core/Core/IOS/IOS.cpp b/Source/Core/Core/IOS/IOS.cpp index cb324e16ed..ae56e0fe73 100644 --- a/Source/Core/Core/IOS/IOS.cpp +++ b/Source/Core/Core/IOS/IOS.cpp @@ -434,7 +434,7 @@ static std::vector ReadBootContent(FSCore& fs, const std::string& path, size // This corresponds to syscall 0x41, which loads a binary from the NAND and bootstraps the PPC. // Unlike 0x42, IOS will set up some constants in memory before booting the PPC. -bool EmulationKernel::BootstrapPPC(Core::System& system, const std::string& boot_content_path) +bool EmulationKernel::BootstrapPPC(const std::string& boot_content_path) { // Seeking and processing overhead is ignored as most time is spent reading from the NAND. u64 ticks = 0; @@ -453,11 +453,11 @@ bool EmulationKernel::BootstrapPPC(Core::System& system, const std::string& boot if (dol.IsAncast()) INFO_LOG_FMT(IOS, "BootstrapPPC: Loading ancast image"); - if (!dol.LoadIntoMemory(system)) + if (!dol.LoadIntoMemory(m_system)) return false; INFO_LOG_FMT(IOS, "BootstrapPPC: {}", boot_content_path); - system.GetCoreTiming().ScheduleEvent(ticks, s_event_finish_ppc_bootstrap, dol.IsAncast()); + m_system.GetCoreTiming().ScheduleEvent(ticks, s_event_finish_ppc_bootstrap, dol.IsAncast()); return true; } @@ -508,7 +508,7 @@ static constexpr SystemTimers::TimeBaseTick GetIOSBootTicks(u32 version) // Passing a boot content path is optional because we do not require IOSes // to be installed at the moment. If one is passed, the boot binary must exist // on the NAND, or the call will fail like on a Wii. -bool EmulationKernel::BootIOS(Core::System& system, const u64 ios_title_id, HangPPC hang_ppc, +bool EmulationKernel::BootIOS(const u64 ios_title_id, HangPPC hang_ppc, const std::string& boot_content_path) { // IOS suspends regular PPC<->ARM IPC before loading a new IOS. @@ -525,7 +525,7 @@ bool EmulationKernel::BootIOS(Core::System& system, const u64 ios_title_id, Hang return false; ElfReader elf{binary.GetElf()}; - if (!elf.LoadIntoMemory(system, true)) + if (!elf.LoadIntoMemory(m_system, true)) return false; } @@ -534,12 +534,12 @@ bool EmulationKernel::BootIOS(Core::System& system, const u64 ios_title_id, Hang if (Core::IsRunningAndStarted()) { - system.GetCoreTiming().ScheduleEvent(GetIOSBootTicks(GetVersion()), s_event_finish_ios_boot, - ios_title_id); + m_system.GetCoreTiming().ScheduleEvent(GetIOSBootTicks(GetVersion()), s_event_finish_ios_boot, + ios_title_id); } else { - FinishIOSBoot(system, ios_title_id); + FinishIOSBoot(m_system, ios_title_id); } return true; diff --git a/Source/Core/Core/IOS/IOS.h b/Source/Core/Core/IOS/IOS.h index 4581e146c2..e3ebbfb99e 100644 --- a/Source/Core/Core/IOS/IOS.h +++ b/Source/Core/Core/IOS/IOS.h @@ -177,8 +177,8 @@ public: void SetGidForPPC(u16 gid); u16 GetGidForPPC() const; - bool BootstrapPPC(Core::System& system, const std::string& boot_content_path); - bool BootIOS(Core::System& system, u64 ios_title_id, HangPPC hang_ppc = HangPPC::No, + bool BootstrapPPC(const std::string& boot_content_path); + bool BootIOS(u64 ios_title_id, HangPPC hang_ppc = HangPPC::No, const std::string& boot_content_path = {}); void InitIPC();