Adding the architecture for the scoring system

This commit is contained in:
AnonymusRaccoon
2020-01-30 18:14:27 +01:00
parent cb6ab59635
commit 390b54c975
+14 -1
View File
@@ -61,7 +61,20 @@ namespace ComSquare::Cartridge
uint32_t Cartridge::_getHeaderAddress()
{
return 0x81c0;
uint32_t address[] = {0x7FC0, 0xFFC0, 0x81C0, 0x101C0};
int bestScore = -1;
uint32_t bestAddress = 0;
for (uint32_t addr : address) {
int score = 0;
// TODO Implement a scoring system for the address here.
if (score > bestScore) {
bestScore = score;
bestAddress = addr;
}
}
return bestAddress;
}
bool Cartridge::_loadHeader()