diff options
| author | Jeod <47716344+JeodC@users.noreply.github.com> | 2026-07-21 20:40:49 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-07-22 01:40:49 +0100 |
| commit | 5f5903421dc58a63499b21df2015b65b3f47d561 (patch) | |
| tree | aebb35f13c27ada1540146667c2b924323e43f3b /src/factories/bk64/ConfigFactory.cpp | |
| parent | 5b79bdbc01cea67ac8ac387e3f6b982017413b39 (diff) | |
BK: suppress extraction warnings per port policy (#229)
Diffstat (limited to 'src/factories/bk64/ConfigFactory.cpp')
| -rw-r--r-- | src/factories/bk64/ConfigFactory.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/factories/bk64/ConfigFactory.cpp b/src/factories/bk64/ConfigFactory.cpp index 1568ad6..2b51018 100644 --- a/src/factories/bk64/ConfigFactory.cpp +++ b/src/factories/bk64/ConfigFactory.cpp @@ -443,6 +443,21 @@ RomhackKind ClassifyRomhack(const std::vector<uint8_t>& rom) { // Public wrapper: thin bool-returning view used by Lighthouse to gate UI before // running the rest of extraction. Same detection logic as DetectCustomCodeBlob // above; we discard the returned metadata for callers that just want a yes/no. +bool GetCustomCodeBlobInfo(const std::vector<uint8_t>& rom, CustomCodeKind& outKind, char outSha1Hex[41]) { + uint32_t blobRom = 0, firstTarget = 0, ramBase = 0; + int jalCount = 0; + uint8_t sha1[20] = {}; + outKind = CustomCodeKind::NONE; + outSha1Hex[0] = '\0'; + if (!DetectCustomCodeBlob(rom, blobRom, jalCount, firstTarget, ramBase, outKind, sha1)) { + return false; + } + for (int i = 0; i < 20; i++) { + std::snprintf(outSha1Hex + i * 2, 3, "%02x", sha1[i]); + } + return true; +} + bool HasCustomCodeBlob(const std::vector<uint8_t>& rom) { uint32_t blobRom = 0, firstTarget = 0, ramBase = 0; int jalCount = 0; |
