E78K signature fix

This commit is contained in:
thrust26 2017-11-28 22:25:09 +01:00
parent 247cac9233
commit a239d94df9
1 changed files with 3 additions and 5 deletions

View File

@ -757,16 +757,14 @@ bool CartDetector::isProbablyE7(const BytePtr& image, uInt32 size)
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
bool CartDetector::isProbablyE78K(const BytePtr& image, uInt32 size)
{
// E7 cart bankswitching is triggered by accessing addresses
// $FE0 to $FE6 using absolute non-indexed addressing
// E78K cart bankswitching is triggered by accessing addresses
// $FE4 to $FE6 using absolute non-indexed addressing
// To eliminate false positives (and speed up processing), we
// search for only certain known signatures
// Thanks to "stella@casperkitty.com" for this advice
// These signatures are attributed to the MESS project
uInt8 signature[3][3] = {
{ 0xAD, 0xE4, 0xFF }, // LDA $FFE4
{ 0xAD, 0xE5, 0xFF }, // LDA $FFE5
{ 0xAD, 0xE6, 0x1F }, // LDA $1FE6
{ 0xAD, 0xE6, 0xFF }, // LDA $FFE6
};
for(uInt32 i = 0; i < 3; ++i)
if(searchForBytes(image.get(), size, signature[i], 3, 1))