From a146093e4e3750e934f9fb54fe306eed1a1258e8 Mon Sep 17 00:00:00 2001 From: BearOso Date: Sat, 6 Feb 2021 13:08:46 -0600 Subject: [PATCH] memmap: Add heuristic to detect Earthbound hack. Fixes issue #691. --- memmap.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/memmap.cpp b/memmap.cpp index bd714e68..6caa27a5 100644 --- a/memmap.cpp +++ b/memmap.cpp @@ -1104,6 +1104,9 @@ int CMemory::ScoreHiROM (bool8 skip_header, int32 romoff) uint8 *buf = ROM + 0xff00 + romoff + (skip_header ? 0x200 : 0); int score = 0; + if (buf[0xd7] == 13 && CalculatedSize > 1024 * 1024 * 4) + score += 5; + if (buf[0xd5] & 0x1) score += 2;