mirror of
https://github.com/zoriya/ComSquare.git
synced 2026-06-08 20:14:53 +00:00
Parsing the basic rom's data
This commit is contained in:
@@ -76,6 +76,13 @@ namespace ComSquare::Cartridge
|
||||
ADDMAPPINGMODE(this->_data[headerAddress + 21] & 0x1u ? HiRom : LoRom);
|
||||
if (this->_data[headerAddress + 21] & 0x2u || this->_data[headerAddress + 210] & 0x4u)
|
||||
ADDMAPPINGMODE(ExRom);
|
||||
this->header.romType = this->_data[headerAddress + 22];
|
||||
this->header.romSize = 0x400u << this->_data[headerAddress + 23];
|
||||
this->header.sramSize = 0x400u << this->_data[headerAddress + 24];
|
||||
this->header.creatorID = this->_data[headerAddress + 25];
|
||||
this->header.version = this->_data[headerAddress + 27];
|
||||
this->header.checksumComplement = this->_data[headerAddress + 28];
|
||||
this->header.checksum = this->_data[headerAddress + 29];
|
||||
return headerAddress & 0x200u;
|
||||
}
|
||||
}
|
||||
@@ -30,9 +30,9 @@ namespace ComSquare::Cartridge
|
||||
//! @brief The rom type (special information about the rom, still don't know what).
|
||||
uint8_t romType;
|
||||
//! @brief The size (in bytes) of the ram
|
||||
uint8_t romSize;
|
||||
unsigned romSize;
|
||||
//! @brief The size of the SRom inside the cartridge.
|
||||
uint8_t sramSize;
|
||||
unsigned sramSize;
|
||||
//! @brief Creator license ID code.
|
||||
uint8_t creatorID;
|
||||
//! @brief The version of the game
|
||||
|
||||
Reference in New Issue
Block a user