Cleaning up the memory bus and adding exception handling in the put pixel

This commit is contained in:
AnonymusRaccoon
2020-02-05 14:17:36 +01:00
parent e921306dcc
commit a0e6119841
9 changed files with 38 additions and 24 deletions
+1 -4
View File
@@ -172,10 +172,7 @@ namespace ComSquare::Cartridge
uint32_t headerAddress = this->_getHeaderAddress();
this->header = this->_mapHeader(headerAddress);
char name[22];
std::memcpy(name, &this->_data[headerAddress], 21);
name[21] = '\0';
this->header.gameName = std::string(name);
this->header.gameName = std::string(reinterpret_cast<char *>(&this->_data[headerAddress]), 21);
if (headerAddress & 0x200u) {
this->_romStart = 0x200u;
this->_size -= 0x200u;