diff --git a/Source/Core/Core/Boot/Boot_BS2Emu.cpp b/Source/Core/Core/Boot/Boot_BS2Emu.cpp index f8a283144e..cb87d02651 100644 --- a/Source/Core/Core/Boot/Boot_BS2Emu.cpp +++ b/Source/Core/Core/Boot/Boot_BS2Emu.cpp @@ -148,7 +148,7 @@ bool CBoot::RunApploader(bool is_wii, const DiscIO::VolumeDisc& volume, // TODO - Make Apploader(or just RunFunction()) debuggable!!! // Call iAppLoaderEntry. - DEBUG_LOG_FMT(MASTER_LOG, "Call iAppLoaderEntry"); + DEBUG_LOG_FMT(BOOT, "Call iAppLoaderEntry"); const u32 iAppLoaderFuncAddr = is_wii ? 0x80004000 : 0x80003100; PowerPC::ppcState.gpr[3] = iAppLoaderFuncAddr + 0; PowerPC::ppcState.gpr[4] = iAppLoaderFuncAddr + 4; @@ -159,15 +159,16 @@ bool CBoot::RunApploader(bool is_wii, const DiscIO::VolumeDisc& volume, const u32 iAppLoaderClose = PowerPC::Read_U32(iAppLoaderFuncAddr + 8); // iAppLoaderInit - DEBUG_LOG_FMT(MASTER_LOG, "Call iAppLoaderInit"); - HLE::Patch(0x81300000, "AppLoaderReport"); // HLE OSReport for Apploader + DEBUG_LOG_FMT(BOOT, "Call iAppLoaderInit"); + PowerPC::HostWrite_U32(0x4E800020, 0x81300000); // Write BLR + HLE::Patch(0x81300000, "AppLoaderReport"); // HLE OSReport for Apploader PowerPC::ppcState.gpr[3] = 0x81300000; RunFunction(iAppLoaderInit); // iAppLoaderMain - Here we load the apploader, the DOL (the exe) and the FST (filesystem). // To give you an idea about where the stuff is located on the disc take a look at yagcd // ch 13. - DEBUG_LOG_FMT(MASTER_LOG, "Call iAppLoaderMain"); + DEBUG_LOG_FMT(BOOT, "Call iAppLoaderMain"); PowerPC::ppcState.gpr[3] = 0x81300004; PowerPC::ppcState.gpr[4] = 0x81300008; @@ -185,7 +186,7 @@ bool CBoot::RunApploader(bool is_wii, const DiscIO::VolumeDisc& volume, const u32 length = PowerPC::Read_U32(0x81300008); const u32 dvd_offset = PowerPC::Read_U32(0x8130000c) << (is_wii ? 2 : 0); - INFO_LOG_FMT(MASTER_LOG, "DVDRead: offset: {:08x} memOffset: {:08x} length: {}", dvd_offset, + INFO_LOG_FMT(BOOT, "DVDRead: offset: {:08x} memOffset: {:08x} length: {}", dvd_offset, ram_address, length); DVDRead(volume, dvd_offset, ram_address, length, partition); @@ -199,7 +200,7 @@ bool CBoot::RunApploader(bool is_wii, const DiscIO::VolumeDisc& volume, } // iAppLoaderClose - DEBUG_LOG_FMT(MASTER_LOG, "call iAppLoaderClose"); + DEBUG_LOG_FMT(BOOT, "call iAppLoaderClose"); RunFunction(iAppLoaderClose); HLE::UnPatch("AppLoaderReport"); diff --git a/Source/Core/Core/Boot/ElfReader.cpp b/Source/Core/Core/Boot/ElfReader.cpp index 3a6fe040bc..bb0cd17036 100644 --- a/Source/Core/Core/Boot/ElfReader.cpp +++ b/Source/Core/Core/Boot/ElfReader.cpp @@ -125,7 +125,7 @@ const char* ElfReader::GetSectionName(int section) const // This is just a simple elf loader, good enough to load elfs generated by devkitPPC bool ElfReader::LoadIntoMemory(bool only_in_mem1) const { - INFO_LOG_FMT(MASTER_LOG, "String section: {}", header->e_shstrndx); + INFO_LOG_FMT(BOOT, "String section: {}", header->e_shstrndx); if (bRelocate) { @@ -133,14 +133,14 @@ bool ElfReader::LoadIntoMemory(bool only_in_mem1) const return false; } - INFO_LOG_FMT(MASTER_LOG, "{} segments:", header->e_phnum); + INFO_LOG_FMT(BOOT, "{} segments:", header->e_phnum); // Copy segments into ram. for (int i = 0; i < header->e_phnum; i++) { Elf32_Phdr* p = segments + i; - INFO_LOG_FMT(MASTER_LOG, "Type: {} Vaddr: {:08x} Filesz: {} Memsz: {}", p->p_type, p->p_vaddr, + INFO_LOG_FMT(BOOT, "Type: {} Vaddr: {:08x} Filesz: {} Memsz: {}", p->p_type, p->p_vaddr, p->p_filesz, p->p_memsz); if (p->p_type == PT_LOAD) @@ -157,12 +157,11 @@ bool ElfReader::LoadIntoMemory(bool only_in_mem1) const if (srcSize < dstSize) Memory::Memset(writeAddr + srcSize, 0, dstSize - srcSize); // zero out bss - INFO_LOG_FMT(MASTER_LOG, "Loadable Segment Copied to {:08x}, size {:08x}", writeAddr, - p->p_memsz); + INFO_LOG_FMT(BOOT, "Loadable Segment Copied to {:08x}, size {:08x}", writeAddr, p->p_memsz); } } - INFO_LOG_FMT(MASTER_LOG, "Done loading."); + INFO_LOG_FMT(BOOT, "Done loading."); return true; } diff --git a/Source/Core/Core/HLE/HLE.cpp b/Source/Core/Core/HLE/HLE.cpp index 264a3013d7..fef1cad648 100644 --- a/Source/Core/Core/HLE/HLE.cpp +++ b/Source/Core/Core/HLE/HLE.cpp @@ -58,7 +58,7 @@ constexpr std::array os_patches{{ {"GeckoCodehandler", HLE_Misc::GeckoCodeHandlerICacheFlush, HookType::Start, HookFlag::Fixed}, {"GeckoHandlerReturnTrampoline", HLE_Misc::GeckoReturnTrampoline, HookType::Replace, HookFlag::Fixed}, - {"AppLoaderReport", HLE_OS::HLE_GeneralDebugPrint, HookType::Replace, HookFlag::Fixed} // apploader needs OSReport-like function + {"AppLoaderReport", HLE_OS::HLE_GeneralDebugPrint, HookType::Start, HookFlag::Fixed} // apploader needs OSReport-like function }}; // clang-format on