From 78f7e097d5baf686c05a51956bf62780077f8423 Mon Sep 17 00:00:00 2001 From: Luke Usher Date: Tue, 1 Mar 2022 20:37:24 +0000 Subject: [PATCH] chihiro: emulate a chihiro system when boot.id is present --- src/core/kernel/init/CxbxKrnl.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/core/kernel/init/CxbxKrnl.cpp b/src/core/kernel/init/CxbxKrnl.cpp index 39036eba4..bc119b85d 100644 --- a/src/core/kernel/init/CxbxKrnl.cpp +++ b/src/core/kernel/init/CxbxKrnl.cpp @@ -693,6 +693,7 @@ static bool CxbxrKrnlXbeSystemSelector(int BootFlags, unsigned& reserved_systems // Detect XBE type : XbeType xbeType = CxbxKrnl_Xbe->GetXbeType(); EmuLogInit(LOG_LEVEL::INFO, "Auto detect: XbeType = %s", GetXbeTypeToStr(xbeType)); + // Convert XBE type into corresponding system to emulate. switch (xbeType) { case XbeType::xtChihiro: @@ -706,6 +707,10 @@ static bool CxbxrKrnlXbeSystemSelector(int BootFlags, unsigned& reserved_systems break; DEFAULT_UNREACHABLE; } + + if (std::filesystem::exists(xbeDirectory / "boot.id")) { + emulate_system = SYSTEM_CHIHIRO; + } } EmuLogInit(LOG_LEVEL::INFO, "Host's compatible system types: %2X", reserved_systems);