Skip to content

Commit

Permalink
Add developerId 0Bh(SUM)
Browse files Browse the repository at this point in the history
  • Loading branch information
splash5 committed Oct 18, 2019
1 parent 5535679 commit e3a70af
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Cart_Reader/WS.ino
Original file line number Diff line number Diff line change
Expand Up @@ -198,8 +198,9 @@ uint8_t getCartInfo_WS()
}
// games missing 'COLOR' flag
case 0x26db: // SQRC01
case 0xbfdf: // SUMC07
{
sdBuffer[7] = 0x01;
sdBuffer[7] |= 0x01;
break;
}
case 0x7f73: // BAN030
Expand Down Expand Up @@ -281,15 +282,15 @@ uint8_t getCartInfo_WS()
}
}

romType = sdBuffer[7]; // wsc only = 1
romType = (sdBuffer[7] & 0x01); // wsc only = 1
romVersion = sdBuffer[9];
romSize = sdBuffer[10];
sramSize = sdBuffer[11];
wsGameOrientation = (sdBuffer[12] & 0x01);
wsGameHasRTC = (sdBuffer[13] & 0x01);

getDeveloperName(sdBuffer[6], vendorID, 5);
snprintf(cartID, 5, "%c%02X", ((romType & 0x01) ? 'C' : '0'), sdBuffer[8]);
snprintf(cartID, 5, "%c%02X", (romType ? 'C' : '0'), sdBuffer[8]);
snprintf(checksumStr, 5, "%04X", wsGameChecksum);
snprintf(romName, 17, "%s%s", vendorID, cartID);

Expand Down Expand Up @@ -375,6 +376,7 @@ void getDeveloperName(uint8_t id, char *buf, size_t length)
switch (id)
{
case 0x01: devName = PSTR("BAN"); break;
case 0x0b: devName = PSTR("SUM"); break;
case 0x12: devName = PSTR("KNM"); break;
case 0x18: devName = PSTR("KGT"); break;
case 0x1d: devName = PSTR("BEC"); break;
Expand Down

0 comments on commit e3a70af

Please sign in to comment.