From b42a4fa16f7a75e2a96a7c107e6359c80b685863 Mon Sep 17 00:00:00 2001 From: Jeod <47716344+JeodC@users.noreply.github.com> Date: Mon, 22 Jun 2026 07:28:04 -0400 Subject: BK64: Add BB romhack support --- src/Companion.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'src/Companion.cpp') diff --git a/src/Companion.cpp b/src/Companion.cpp index e8ca2c0..40899ec 100644 --- a/src/Companion.cpp +++ b/src/Companion.cpp @@ -98,6 +98,7 @@ #ifdef BK64_SUPPORT #include "factories/bk64/AnimFactory.h" #include "factories/bk64/BKAssetFactory.h" +#include "factories/bk64/ConfigFactory.h" #include "factories/bk64/DemoInputFactory.h" #include "factories/bk64/DialogFactory.h" #include "factories/bk64/GeoLayoutFactory.h" @@ -1193,8 +1194,17 @@ void Companion::Process(std::atomic& assetCount) { this->gCartridge->Initialize(); if (!config[this->gCartridge->GetHash()]) { - SPDLOG_ERROR("No config found for {}", this->gCartridge->GetHash()); - return; + bool synthesized = false; +#ifdef BK64_SUPPORT + if (this->gRomPath.has_value()) { + synthesized = BK64::TrySynthesizeRomConfig(config, this->gCartridge->GetHash(), this->gRomPath.value(), + this->gRomData); + } +#endif + if (!synthesized) { + SPDLOG_ERROR("No config found for {}", this->gCartridge->GetHash()); + return; + } } this->gConfig.parseMode = ParseMode::Default; -- cgit v1.2.3