Fixed PlusROM detection (fixes #1021)

This commit is contained in:
thrust26 2024-03-07 18:28:52 +01:00
parent a311e1d714
commit cd46d87777
2 changed files with 3 additions and 2 deletions

View File

@ -849,7 +849,7 @@ bool CartDetector::isProbablyX07(const ByteBuffer& image, size_t size)
bool CartDetector::isProbablyPlusROM(const ByteBuffer& image, size_t size) bool CartDetector::isProbablyPlusROM(const ByteBuffer& image, size_t size)
{ {
// PlusCart uses this pattern to detect a PlusROM // PlusCart uses this pattern to detect a PlusROM
static constexpr uInt8 signature[3] = { 0x8d, 0xf0, 0x1f }; // STA $1FF0 static constexpr uInt8 signature[3] = { 0x8d, 0xf1, 0x1f }; // STA $1FF1
return searchForBytes(image, size, signature, 3); return searchForBytes(image, size, signature, 3);
} }

View File

@ -24,6 +24,7 @@
#include "Logger.hxx" #include "Logger.hxx"
#include "Version.hxx" #include "Version.hxx"
#include "Settings.hxx" #include "Settings.hxx"
#include "CartDetector.hxx"
#if defined(HTTP_LIB_SUPPORT) #if defined(HTTP_LIB_SUPPORT)
#include "http_lib.hxx" #include "http_lib.hxx"
@ -238,7 +239,7 @@ bool PlusROM::initialize(const ByteBuffer& image, size_t size)
reset(); reset();
return myIsPlusROM = true; return myIsPlusROM = CartDetector::isProbablyPlusROM(image, size);
#else #else
return myIsPlusROM = false; return myIsPlusROM = false;
#endif #endif