From b671df990678b7fcf73b263320fdb7451fe275f2 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Sun, 12 Mar 2017 22:11:58 -0400 Subject: [PATCH] 'Perfected' the Activision stack paging detector. --- StaticAnalyser/Atari/StaticAnalyser.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/StaticAnalyser/Atari/StaticAnalyser.cpp b/StaticAnalyser/Atari/StaticAnalyser.cpp index f6c837ee5..4fb8ac29e 100644 --- a/StaticAnalyser/Atari/StaticAnalyser.cpp +++ b/StaticAnalyser/Atari/StaticAnalyser.cpp @@ -91,10 +91,12 @@ static void DeterminePagingFor2kCartridge(StaticAnalyser::Target &target, const static void DeterminePagingFor8kCartridge(StaticAnalyser::Target &target, const Storage::Cartridge::Cartridge::Segment &segment, const StaticAnalyser::MOS6502::Disassembly &disassembly) { // Activision stack titles have their vectors at the top of the low 4k, not the top, and - // always list 0xf000 as both vectors; they do not repeat them + // always list 0xf000 as both vectors; they do not repeat them, and, inexplicably, they all + // issue an SEI as their first instruction (maybe some sort of relic of the development environment?) if( segment.data[4095] == 0xf0 && segment.data[4093] == 0xf0 && segment.data[4094] == 0x00 && segment.data[4092] == 0x00 && - (segment.data[8191] != 0xf0 || segment.data[8189] != 0xf0 || segment.data[8190] != 0x00 || segment.data[8188] != 0x00) + (segment.data[8191] != 0xf0 || segment.data[8189] != 0xf0 || segment.data[8190] != 0x00 || segment.data[8188] != 0x00) && + segment.data[0] == 0x78 ) { target.atari.paging_model = StaticAnalyser::Atari2600PagingModel::ActivisionStack;