From 8c5e39c0c5e96fe904b62b477b4077dce271ea76 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Sun, 12 Mar 2017 20:39:45 -0400 Subject: [PATCH] Adjusted Super Chip test to look for two portions of 128 bytes. It now spots Dig Dug and doesn't acquire any further false positives amongst the tested set. So failure to spot the Activision stack-based paging mechanism is now the only remaining failure. --- StaticAnalyser/Atari/StaticAnalyser.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/StaticAnalyser/Atari/StaticAnalyser.cpp b/StaticAnalyser/Atari/StaticAnalyser.cpp index cb92852c0..9e3e33aad 100644 --- a/StaticAnalyser/Atari/StaticAnalyser.cpp +++ b/StaticAnalyser/Atari/StaticAnalyser.cpp @@ -179,13 +179,15 @@ static void DeterminePagingForCartridge(StaticAnalyser::Target &target, const St } // check for a Super Chip. Atari ROM images [almost] always have the same value stored over RAM - // regions. - if(target.atari.paging_model != StaticAnalyser::Atari2600PagingModel::CBSRamPlus && target.atari.paging_model != StaticAnalyser::Atari2600PagingModel::MNetwork) + // regions; when they don't they at least seem to have the first 128 bytes be the same as the + // next 128 bytes. So check for that. + if( target.atari.paging_model != StaticAnalyser::Atari2600PagingModel::CBSRamPlus && + target.atari.paging_model != StaticAnalyser::Atari2600PagingModel::MNetwork) { bool has_superchip = true; - for(size_t address = 0; address < 256; address++) + for(size_t address = 0; address < 128; address++) { - if(segment.data[address] != segment.data[0]) + if(segment.data[address] != segment.data[address+128]) { has_superchip = false; break;