mirror of
https://github.com/zoriya/ComSquare.git
synced 2026-06-02 18:21:19 +00:00
Solving a parsing bug of the SMC
This commit is contained in:
@@ -132,7 +132,6 @@ namespace ComSquare::Cartridge
|
|||||||
if (info.checksum + info.checksumComplement == 0xFFFF && info.checksum != 0 && info.checksumComplement != 0)
|
if (info.checksum + info.checksumComplement == 0xFFFF && info.checksum != 0 && info.checksumComplement != 0)
|
||||||
score += 8;
|
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).
|
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;
|
continue;
|
||||||
uint8_t resetOpCode = this->_data[info.emulationInterrupts.reset - 0x8000u];
|
uint8_t resetOpCode = this->_data[info.emulationInterrupts.reset - 0x8000u];
|
||||||
@@ -176,7 +175,7 @@ namespace ComSquare::Cartridge
|
|||||||
|
|
||||||
this->header = this->_mapHeader(headerAddress);
|
this->header = this->_mapHeader(headerAddress);
|
||||||
this->header.gameName = std::string(reinterpret_cast<char *>(&this->_data[headerAddress]), 21);
|
this->header.gameName = std::string(reinterpret_cast<char *>(&this->_data[headerAddress]), 21);
|
||||||
if (headerAddress & 0x200u) {
|
if (headerAddress & 0x1C0u) {
|
||||||
this->_romStart = 0x200u;
|
this->_romStart = 0x200u;
|
||||||
this->_size -= 0x200u;
|
this->_size -= 0x200u;
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
Reference in New Issue
Block a user