Solving a parsing bug of the SMC

This commit is contained in:
Anonymus Raccoon
2020-02-25 21:23:46 +01:00
parent 4eff507c75
commit da5cec8d06
+1 -2
View File
@@ -132,7 +132,6 @@ namespace ComSquare::Cartridge
if (info.checksum + info.checksumComplement == 0xFFFF && info.checksum != 0 && info.checksumComplement != 0)
score += 8;
//Fail here
if (info.emulationInterrupts.reset < 0x8000u) // The reset vector is the first thing called by the SNES so It must execute the code inside the ROM (the rom starts at 0x8000).
continue;
uint8_t resetOpCode = this->_data[info.emulationInterrupts.reset - 0x8000u];
@@ -176,7 +175,7 @@ namespace ComSquare::Cartridge
this->header = this->_mapHeader(headerAddress);
this->header.gameName = std::string(reinterpret_cast<char *>(&this->_data[headerAddress]), 21);
if (headerAddress & 0x200u) {
if (headerAddress & 0x1C0u) {
this->_romStart = 0x200u;
this->_size -= 0x200u;
return true;