private bool FindSVBLSequenceOne(byte[] allBytes, string filename, SymbolCollection newSymbols, List<CodeBlock> newCodeBlocks)
{
bool found = true;
int offset = 0;
bool svblfound = false;
while (found)
{
int SVBLAddress = Tools.Instance.findSequence(allBytes, offset, new byte[10] { 0x2B, 0x7D, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2B, 0x7D }, new byte[10] { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 });
if (SVBLAddress > 0)
{
//Console.WriteLine("Alternative SVBL " + SVBLAddress.ToString("X8"));
svblfound = true;
SymbolHelper shsvbl = new SymbolHelper();
shsvbl.Category = "Detected maps";
shsvbl.Subcategory = "Limiters";
shsvbl.Flash_start_address = SVBLAddress - 2;
// if value = 0xC3 0x00 -> two more back
int[] testValue = Tools.Instance.readdatafromfileasint(filename, (int)shsvbl.Flash_start_address, 1, EDCFileType.MSA15);
if (testValue[0] == 0xC300) shsvbl.Flash_start_address -= 2;
shsvbl.Varname = "SVBL Boost limiter [" + DetermineNumberByFlashBank(shsvbl.Flash_start_address, newCodeBlocks) + "]";
shsvbl.Length = 2;
shsvbl.CodeBlock = DetermineCodeBlockByByAddress(shsvbl.Flash_start_address, newCodeBlocks);
newSymbols.Add(shsvbl);
offset = SVBLAddress + 1;
}
else found = false;
}
return svblfound;
}